box: make box.schema DDL functions transactional
Wraps multistatement DDL functions into begin/commit block if no transaction is active. The functions are: - `box.schema.space.drop` - `box.schema.index.create` - `box.schema.index.drop` - `box.schema.index.alter` - `box.schema.sequence.drop` - `box.schema.func.drop` - `box.schema.user.create` - `box.schema.user.drop` - `box.schema.role.drop` Added tests for atomicity of each transactioned function except the `box.schema.role.drop`, which is implicitly tested with the `box.schema.user.drop` test, and the `box.schema.index.drop`, which is impossible to test in this flavor without using error injection. Updated the tests modified in tarantool/tarantool#8947, because the space drop is atomic now. Closes #4348 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-4348-transactional-ddl.md 4 additions, 0 deletionschangelogs/unreleased/gh-4348-transactional-ddl.md
- src/box/lua/schema.lua 40 additions, 30 deletionssrc/box/lua/schema.lua
- test/box-luatest/builtin_events_test.lua 1 addition, 1 deletiontest/box-luatest/builtin_events_test.lua
- test/box-luatest/gh_4348_transactional_ddl_test.lua 271 additions, 0 deletionstest/box-luatest/gh_4348_transactional_ddl_test.lua
- test/box/errinj.result 10 additions, 0 deletionstest/box/errinj.result
- test/box/errinj.test.lua 6 additions, 0 deletionstest/box/errinj.test.lua
- test/box/sequence.result 1 addition, 1 deletiontest/box/sequence.result
- test/box/sequence.test.lua 1 addition, 1 deletiontest/box/sequence.test.lua
- test/engine-luatest/gh_6436_complex_foreign_key_test.lua 3 additions, 3 deletionstest/engine-luatest/gh_6436_complex_foreign_key_test.lua
- test/engine-luatest/gh_6436_field_foreign_key_test.lua 3 additions, 3 deletionstest/engine-luatest/gh_6436_field_foreign_key_test.lua
- test/engine/func_index.result 0 additions, 3 deletionstest/engine/func_index.result
- test/engine/func_index.test.lua 0 additions, 1 deletiontest/engine/func_index.test.lua
- test/sql/no-pk-space.result 0 additions, 27 deletionstest/sql/no-pk-space.result
- test/sql/no-pk-space.test.lua 0 additions, 11 deletionstest/sql/no-pk-space.test.lua
Loading
Please register or sign in to comment