-
Notifications
You must be signed in to change notification settings - Fork 403
Description
A test plan by @kostja:
- A transaction which swaps two spaces by name.
name = foo.name;
foo.name = bar.name
bar.name = name
-
A transaction which creates a space, formats it to have an integer column, changes the format to 'any', changes the values to 'string', changes the format to 'string'
-
A transaction which creates a space, a user, and grants all privileges on this space to the user. Then sudoes to the user and tries to use the space.
-
A transaction, which revokes all privileges from a user and drops the space.
-
A transaction which creates a space and secondary indexes
-
A transaction which creates a space with a sequence.
-
Transactional drop a) empty b) nonempty space with all its belongings: secondary indexes, check constraints, sequences.
-
A transaction which creates a space and sets space triggers, as well as on_rollback trigger, then inserts a bunch of data and then a) commits b) rolls back.
-
An error injection crash test which starts 10 fibers which perform a random combination of transactional DDL in a loop, then, after 0.1 second ER_WAL_IO is enabled, fibers are joined, ER_WAL_IO is disabled. The DDL is using objects which names clash, so that it does something useful, e.g:
function name(object_type)
return object_type_name .. math.random(1, NUM_NAMES)
end
function ddl(object_type, object_name)
-- this function actually checks if the name exists
-- at the moment and only returns valid statements
if object_type is user or role then
return random("grant", "revoke", "create", "drop")
end
if object_type is table then
return random("create ", "format", "rename", "add
index", "drop index", "rename index", "change index
keys", "change unique -> non_unique", "add
constraint", "drop constraint", "drop")
end
function gen_test()
for each object type:
eval = "box.begin()"
eval = eval .. ddl(object_type, name(object_type))
eval = eval .. "box.commit()"
end
return eval
end
function fiber()
while true do
eval(gen_test)
end
end
for i in 1.. NUM_FIBERS do
fibers[i] = fiber.create(fiber)
end
fiber.sleep(0.1)
errinj.enable(er_wal_io)
for i in 1.. NUM_FIBERS do
fiber.join(fibers[i])
end
(cleanup all objects matching the name..$i pattern)Follow-up #4083