Skip to content
Snippets Groups Projects
Commit c64a02eb authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

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.
parent 3d4ba788
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment