| Bug #13419 | NOT IN with one value returns 0 rows | ||
|---|---|---|---|
| Submitted: | 23 Sep 2005 5:08 | Modified: | 23 Sep 2005 23:40 |
| Reporter: | Kolbe Kegel | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S1 (Critical) |
| Version: | 4.1.15 | OS: | Linux (Linux) |
| Assigned to: | Sergey Petrunya | CPU Architecture: | Any |
[23 Sep 2005 5:08]
Kolbe Kegel
[23 Sep 2005 5:11]
Kolbe Kegel
Notes:
* NOT IN functions correctly if the column is not indexed
alter table t drop index id;
select count(*) from t where id not in (1);
+----------+
| count(*) |
+----------+
| 2 |
+----------+
* Verified that myisam_stats_method has no effect
* Verified against MyISAM and InnoDB storage engines
[23 Sep 2005 9:40]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/30257
[23 Sep 2005 22:22]
Sergey Petrunya
Bug description: Queries that contain "t.key NOT IN(const)" could produce wrong results. This bug was introduced by fix for BUG#12101 (which was pushed into 4.1.15) and the fix was pushed into 4.1.15 too, so this bug doesn't appear in released versions).
[23 Sep 2005 23:40]
Paul DuBois
No changelog entry needed.
