Bug #60885 | (not so) wrong NOT IN result (when NULL values are involved) | ||
---|---|---|---|
Submitted: | 15 Apr 2011 20:49 | Modified: | 16 Apr 2011 2:33 |
Reporter: | Vares Pierre-Olivier | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 5.0.32-Debian_7etch11 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | equivalence, not exists, NOT IN, null |
[15 Apr 2011 20:49]
Vares Pierre-Olivier
[15 Apr 2011 22:56]
Vares Pierre-Olivier
Test case to reproduce
Attachment: test_case.sql (text/x-sql), 58.27 KiB.
[15 Apr 2011 23:05]
Vares Pierre-Olivier
Oh my god ! I just realize, looking at the dump : would the NULL values be the cause of that ? It would effectively be coherent, "NOT IN" being taken as a term-by-term comparison (a comparison with NULL being NULL) And coherent with the add of BEETWEEN, because this condition eliminates every NULL value. Really tricky... I should have been more aware of the NULL power. So a NOT IN and a NOT EXISTS are not equivalent, I'll know it from now on... Do I have to set the bug as "Not a bug" or close it ?
[16 Apr 2011 2:33]
MySQL Verification Team
Thank you for the feedback.