lua: don't raise a Lua error from luaT_tuple_new()
This change fixes incorrect behaviour at tuple serialization error in several places: <space_object>:frommap(), <key_def_object>:compare(), <merge_source>:select(). See more in #5382. Disallow creating a tuple from objects on the Lua stack (idx == 0) in luaT_tuple_new() for simplicity. There are no such usages in tarantool. The function is not exposed yet to the module API. This is only necessary in box.tuple.new(), which anyway raises Lua errors by its contract. The better way to implement it would be rewritting of serialization from Lua to msgpack without raising Lua errors, but it is labirous work. Some day, I hope, I'll return here. Part of #5273 Fixes #5382
Showing
- src/box/lua/tuple.c 104 additions, 28 deletionssrc/box/lua/tuple.c
- src/box/lua/tuple.h 2 additions, 5 deletionssrc/box/lua/tuple.h
- test/unit/luaT_tuple_new.c 31 additions, 11 deletionstest/unit/luaT_tuple_new.c
- test/unit/luaT_tuple_new.result 5 additions, 1 deletiontest/unit/luaT_tuple_new.result
Loading
Please register or sign in to comment