sql: disallow returning many rows from subselect
To follow ANSI SQL standard we should dissallow returning multiple rows from subselects after = and in braces (). To achieve this goal we have introduced Select SF_SingleRow flag that indicates the case of subselect having no client-defined LIMIT 1 to patch system implicit LIMIT 1 to be LIMIT 2 and generate extra bytecode to HALT execution on reaching this restrict. Resolves #2366.
Showing
- src/box/sql/expr.c 11 additions, 4 deletionssrc/box/sql/expr.c
- src/box/sql/select.c 71 additions, 2 deletionssrc/box/sql/select.c
- src/box/sql/sqliteInt.h 4 additions, 0 deletionssrc/box/sql/sqliteInt.h
- src/box/sql/vdbe.c 1 addition, 1 deletionsrc/box/sql/vdbe.c
- test/sql-tap/aggnested.test.lua 1 addition, 1 deletiontest/sql-tap/aggnested.test.lua
- test/sql-tap/e_expr.test.lua 21 additions, 21 deletionstest/sql-tap/e_expr.test.lua
- test/sql-tap/misc5.test.lua 6 additions, 9 deletionstest/sql-tap/misc5.test.lua
- test/sql-tap/select4.test.lua 4 additions, 4 deletionstest/sql-tap/select4.test.lua
- test/sql-tap/select7.test.lua 1 addition, 1 deletiontest/sql-tap/select7.test.lua
- test/sql-tap/selectA.test.lua 7 additions, 7 deletionstest/sql-tap/selectA.test.lua
- test/sql-tap/subquery.test.lua 7 additions, 7 deletionstest/sql-tap/subquery.test.lua
- test/sql-tap/subquery2.test.lua 2 additions, 2 deletionstest/sql-tap/subquery2.test.lua
- test/sql-tap/subselect.test.lua 49 additions, 5 deletionstest/sql-tap/subselect.test.lua
- test/sql-tap/tkt1473.test.lua 36 additions, 36 deletionstest/sql-tap/tkt1473.test.lua
- test/sql-tap/with1.test.lua 1 addition, 1 deletiontest/sql-tap/with1.test.lua
Loading
Please register or sign in to comment