box: fix box.iproto.override crash if used before box.cfg
The function can't be called on an unconfigured instance because it needs IPROTO threads up and running. Let's raise an error to avoid a crash. Since we have two other places where we need to raise the same error (box.session.su and box.__index), let's introduce the new code ER_UNCONFIGURED for this error. Closes #8975 NO_DOC=bug fix
Showing
- changelogs/unreleased/gh-8975-box-iproto-override-without-cfg.md 4 additions, 0 deletions...ogs/unreleased/gh-8975-box-iproto-override-without-cfg.md
- src/box/box.cc 10 additions, 0 deletionssrc/box/box.cc
- src/box/box.h 6 additions, 0 deletionssrc/box/box.h
- src/box/errcode.h 1 addition, 0 deletionssrc/box/errcode.h
- src/box/lua/iproto.c 2 additions, 0 deletionssrc/box/lua/iproto.c
- src/box/lua/load_cfg.lua 2 additions, 3 deletionssrc/box/lua/load_cfg.lua
- src/box/lua/session.c 2 additions, 2 deletionssrc/box/lua/session.c
- test/box-luatest/iproto_request_handlers_overriding_test.lua 8 additions, 0 deletionstest/box-luatest/iproto_request_handlers_overriding_test.lua
- test/box/error.result 1 addition, 0 deletionstest/box/error.result
Loading