tuple: make fields nullable by default except array/map
Since e1d3fe8a (tuple format: don't allow null where array/map is expected) tuple fields are non-nullable by default. It seems strange at least in case we have implicit fields in front of explicit nullable field. Also it causes incorrect behaviour in case of using explicitly nullable array/map fields for multikey index. Now fields are nullable by default except arrays & maps, as far as their implicit nullability might break field accessors expectations, provide confusing error messages and cause incorrect behaviour of tuple_multikey_count(). In case explicitly nullable array/map fields are being used for multikey index, clear error message is provided. Closes #5027
Showing
- src/box/memtx_space.c 24 additions, 14 deletionssrc/box/memtx_space.c
- src/box/tuple_format.c 21 additions, 1 deletionsrc/box/tuple_format.c
- src/box/vinyl.c 15 additions, 4 deletionssrc/box/vinyl.c
- test/engine/gh-5027-fields-nullability.result 119 additions, 0 deletionstest/engine/gh-5027-fields-nullability.result
- test/engine/gh-5027-fields-nullability.test.lua 37 additions, 0 deletionstest/engine/gh-5027-fields-nullability.test.lua
Loading
Please register or sign in to comment