sql: allow to use vectors as left value of IN operator
In SQL, it is allowed to use vector expressions, that is, an operation that uses vectors as operands. For instance, vector comparison: SELECT (1,2,3) < (1,2,4); Accidentally, routines handling IN operator contained a bug: in cases where we used a vector as the left value in the IN operator, we received an assertion in debug build or a segmentation fault in release. This was due to some legacy code in which it was assumed that the left value of the IN operator can have only one column in case it is a vector. Let's fix this by allowing vectors of the other sizes as the left value of the IN operator and providing check which verifies that both sides of IN operator have the same dimension. Closes #4204
Showing
- src/box/errcode.h 1 addition, 0 deletionssrc/box/errcode.h
- src/box/sql/expr.c 5 additions, 13 deletionssrc/box/sql/expr.c
- src/box/sql/resolve.c 2 additions, 9 deletionssrc/box/sql/resolve.c
- src/box/sql/select.c 2 additions, 4 deletionssrc/box/sql/select.c
- test/box/misc.result 1 addition, 0 deletionstest/box/misc.result
- test/sql-tap/in1.test.lua 7 additions, 7 deletionstest/sql-tap/in1.test.lua
- test/sql-tap/select7.test.lua 4 additions, 4 deletionstest/sql-tap/select7.test.lua
- test/sql-tap/sql-errors.test.lua 162 additions, 2 deletionstest/sql-tap/sql-errors.test.lua
- test/sql-tap/subselect.test.lua 1 addition, 1 deletiontest/sql-tap/subselect.test.lua
Loading
Please register or sign in to comment