sql: remove one row limit in EXISTS subquery
According to ANSI, EXISTS is a predicate that tests a given subquery and returns true if it returns more than 0 rows, false otherwise. However, after 2a720d11, EXISTS worked correctly only if there were exactly 0 or 1 rows, and in all other cases it gave an error. This patch makes EXITS work properly. Closes #8676 NO_DOC=bugfix (cherry picked from commit a5e498d1)
Showing
- changelogs/unreleased/gh-8676-fix-exists-predicate.md 4 additions, 0 deletionschangelogs/unreleased/gh-8676-fix-exists-predicate.md
- src/box/sql/expr.c 15 additions, 8 deletionssrc/box/sql/expr.c
- test/sql-luatest/gh_8676_exists_in_multiselect_test.lua 20 additions, 0 deletionstest/sql-luatest/gh_8676_exists_in_multiselect_test.lua
- test/sql-tap/tkt1473.test.lua 20 additions, 20 deletionstest/sql-tap/tkt1473.test.lua
Loading
Please register or sign in to comment