Branch: refs/heads/master
Home: https://github.com/tarantool/tarantool
Commit: c64a02eb642dbdf47ea98cc0bb2486e77b24c194
https://github.com/tarantool/tarantool/commit/c64a02eb642dbdf47ea98cc0bb2486e77b24c194
Author: Konstantin Osipov <[email protected]>
Date: 2013-09-05 (Thu, 05 Sep 2013)
Changed paths:
M src/box/box_lua_space.cc
M src/box/lua/schema.lua
M test/box/errinj.result
M test/box/errinj.test.lua
M test/box/test_init.lua
Log Message:
-----------
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.
_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help : https://help.launchpad.net/ListHelp