[MDEV-3387] LP:780386 - Incorrect result of NULL <op> ALL (<empty set>) Created: 2011-05-10 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query: SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ; returns 1 row for which a1.f3 = NULL with join_cache_level = 0 and 2 rows with join_cache_level = 3 . maria-5.1 returns 2 rows. Notice that the subquery returns an empty result. Note that the server reports that NULL < ALL ( SELECT f3 FROM t3 WHERE 0 ) is TRUE test case: DROP TABLE IF EXISTS t1; CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ; DROP TABLE IF EXISTS t3; --let $query = SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ; SET SESSION join_cache_level = 0; SELECT COUNT |
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2011-06-14 ] |
|
Re: Diverging results with join_cache_level=0, join_cache_level=3 in maria-5.3 with ALL() subquery + NULLs |
| Comment by Oleksandr Byelkin [ 2011-07-19 ] |
|
Re: Diverging results with join_cache_level=0, join_cache_level=3 in maria-5.3 with ALL() subquery + NULLs |
| Comment by Oleksandr Byelkin [ 2011-07-20 ] |
|
Re: Diverging results with join_cache_level=0, join_cache_level=3 in maria-5.3 with ALL() subquery + NULLs +SET SESSION join_cache_level = 0; |
| Comment by Oleksandr Byelkin [ 2011-07-20 ] |
|
Re: Diverging results with join_cache_level=0, join_cache_level=3 in maria-5.3 with ALL() subquery + NULLs |
| Comment by Oleksandr Byelkin [ 2011-07-20 ] |
|
Re: Diverging results with join_cache_level=0, join_cache_level=3 in maria-5.3 with ALL() subquery + NULLs DROP TABLE IF EXISTS t1; CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ; DROP TABLE IF EXISTS t3; SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ; |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 780386 |