Convert errinj.test to space-by-name usage.
Modify 'space' object contents when altering it, rather than create a new Lua table. In Lua, when saving a copy of a table in a local variable a shallow copy is saved, in other words, table variables initialized from each other share state. Make use of this feature in the following scenario: space = box.schema.create_space() space:create_index() -- modifies box.space[id] which 'space' is a shared ptr to space.index[0] - great, space.index[0] has the added index.
Showing
- src/box/box_lua_space.cc 41 additions, 21 deletionssrc/box/box_lua_space.cc
- src/box/lua/schema.lua 5 additions, 4 deletionssrc/box/lua/schema.lua
- test/box/errinj.result 23 additions, 25 deletionstest/box/errinj.result
- test/box/errinj.test.lua 23 additions, 23 deletionstest/box/errinj.test.lua
- test/box/test_init.lua 3 additions, 4 deletionstest/box/test_init.lua
Please register or sign in to comment