box: use dd_version_id instead of _schema.version in get_version
By default a user might not have privileges to access the _schema space, that will cause an error during schema_needs_upgrade(), which calls get_version(). Fix this by using C variable dd_version_id, which is updated in the _schema.version replace trigger. There's a special case for upgrade() during bootstrap() - triggers are disabled during bootstrap, that's why dd_version_id is not being updated. Handle this by passing _initial_version=1.7.5 to the upgrade function. Part of #7149 NO_DOC=internal NO_CHANGELOG=internal
Showing
- extra/exports 1 addition, 0 deletionsextra/exports
- src/box/lua/upgrade.lua 9 additions, 9 deletionssrc/box/lua/upgrade.lua
- src/box/schema.cc 6 additions, 1 deletionsrc/box/schema.cc
- src/box/schema.h 5 additions, 0 deletionssrc/box/schema.h
- test/box-luatest/gh_7149_forbid_ddl_until_box_schema_upgrade_test.lua 23 additions, 0 deletions...test/gh_7149_forbid_ddl_until_box_schema_upgrade_test.lua
- test/box/stat.result 8 additions, 8 deletionstest/box/stat.result
Loading
Please register or sign in to comment