schema: allow to store smaller field count that specified in format
If a field is not indexed and no more indexed or not nullable fields after that, than allow to skip it in insertion. Such field value looks like MP_NIL, but MP_NIL is not explicitly stored. Named access to this field in lua returns nil. Example: format = {{'field1'}, {'field2'}, {'field3', is_nullable = true}, {'field4', is_nullable = true}} t = space:insert{1, 2} -- ok. t.field1 == 1, t.field2 == 2, t.field3 == nil, t.field4 == nil Closes #2880
Showing
- src/box/errcode.h 1 addition, 1 deletionsrc/box/errcode.h
- src/box/tuple.c 6 additions, 4 deletionssrc/box/tuple.c
- src/box/tuple_format.c 8 additions, 3 deletionssrc/box/tuple_format.c
- src/box/tuple_format.h 5 additions, 0 deletionssrc/box/tuple_format.h
- src/box/vy_stmt.c 1 addition, 1 deletionsrc/box/vy_stmt.c
- test/box/alter.result 4 additions, 4 deletionstest/box/alter.result
- test/box/alter_limits.result 2 additions, 2 deletionstest/box/alter_limits.result
- test/box/ddl.result 6 additions, 6 deletionstest/box/ddl.result
- test/box/sql.result 3 additions, 3 deletionstest/box/sql.result
- test/box/tree_pk_multipart.result 2 additions, 2 deletionstest/box/tree_pk_multipart.result
- test/engine/ddl.result 1 addition, 1 deletiontest/engine/ddl.result
- test/engine/null.result 159 additions, 0 deletionstest/engine/null.result
- test/engine/null.test.lua 50 additions, 0 deletionstest/engine/null.test.lua
- test/vinyl/constraint.result 3 additions, 3 deletionstest/vinyl/constraint.result
- test/vinyl/savepoint.result 2 additions, 2 deletionstest/vinyl/savepoint.result
Loading
Please register or sign in to comment