box: forbid DDL operations until box.schema.upgrade
Currently, in case of recovery from an old snapshot, Tarantool allows to perform DDL operations on an instance with non-upgraded schema. It leads to various unpredictable errors (because the DDL code assumes that the schema is already upgraded). This patch forbids the following operations unless the user has the most recent schema version: - box.schema.space.create - box.schema.space.drop - box.schema.space.alter - box.schema.index.create - box.schema.index.drop - box.schema.index.alter - box.schema.sequence.create - box.schema.sequence.drop - box.schema.sequence.alter - box.schema.func.create - box.schema.func.drop Closes #7149 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-7149-forbid-ddl-until-box-schema-upgrade.md 3 additions, 0 deletions...unreleased/gh-7149-forbid-ddl-until-box-schema-upgrade.md
- src/box/errcode.h 1 addition, 0 deletionssrc/box/errcode.h
- src/box/lua/load_cfg.lua 1 addition, 5 deletionssrc/box/lua/load_cfg.lua
- src/box/lua/schema.lua 19 additions, 0 deletionssrc/box/lua/schema.lua
- src/box/lua/upgrade.lua 20 additions, 8 deletionssrc/box/lua/upgrade.lua
- test/box-luatest/gh_7149_forbid_ddl_until_box_schema_upgrade_test.lua 59 additions, 0 deletions...test/gh_7149_forbid_ddl_until_box_schema_upgrade_test.lua
- test/box-luatest/upgrade/1.10/00000000000000000004.snap 0 additions, 0 deletionstest/box-luatest/upgrade/1.10/00000000000000000004.snap
- test/box/error.result 1 addition, 0 deletionstest/box/error.result
Loading
Please register or sign in to comment