Bug #11853 | DELETE ... NOT LIKE doesn't seem to work properly when index present | ||
---|---|---|---|
Submitted: | 11 Jul 2005 0:52 | Modified: | 18 Jul 2005 19:13 |
Reporter: | Paul Keenan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.0.7-beta | OS: | Linux (Linux) |
Assigned to: | Igor Babaev | CPU Architecture: | Any |
[11 Jul 2005 0:52]
Paul Keenan
[11 Jul 2005 4:06]
Aleksey Kishkin
Well. I would say it also presents on linux and on innodb handler. So I changed category to 'MySQL Server'
[13 Jul 2005 15:02]
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/27007
[13 Jul 2005 15:04]
Evgeny Potemkin
Function get_func_mm_tree() was ingoring NOT when building SEL_TREE for NOT LIKE , which results in creation SEL_TREE same as for LIKE predicate.
[13 Jul 2005 21:05]
Sergey Petrunya
The problem affects not only "x NOT LIKE y" (which is internally converted to "NOT (x LIKE y"): mysql> select * from tn where NOT (a <=> 4); +------+ | a | +------+ | NULL | | 1 | | 2 | | 3 | +------+ 4 rows in set (2.56 sec) mysql> delete from tn where NOT (a <=> 4); Query OK, 0 rows affected (5.63 sec) mysql> select * from tn where NOT (a <=> 4); +------+ | a | +------+ | NULL | | 1 | | 2 | | 3 | +------+ 4 rows in set (3.25 sec)
[13 Jul 2005 21:12]
Sergey Petrunya
The bug was created by a new 5.0 optimization.
[16 Jul 2005 15:19]
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/27218
[16 Jul 2005 15:52]
Igor Babaev
The bug was due to some incorrect code in the range optimization for NOT IN and NOT BETWEEN added in 5.0. ChangeSet 1.1949 05/07/16 08:19:20 igor@rurik.mysql.com +3 -0 opt_range.cc: Fixed bug #11853. Corrected the code of the range optimization for NOT IN and NOT BETWEEN. range.test, range.result: Fixed bug #11853. The fix will appear in 5.0.10
[18 Jul 2005 19:13]
Paul DuBois
Noted in 5.0.10 changelog.