Bug #57434 | Mysql returns wrong result when column is nullable and has an index | ||
---|---|---|---|
Submitted: | 13 Oct 2010 15:38 | Modified: | 13 Oct 2010 16:44 |
Reporter: | Nathan Kontny | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: General | Severity: | S2 (Serious) |
Version: | 5.1.51, 5.5.7 | OS: | MacOS |
Assigned to: | CPU Architecture: | Any | |
Tags: | 5.1, INDEX, null, nullable |
[13 Oct 2010 15:38]
Nathan Kontny
[13 Oct 2010 15:48]
MySQL Verification Team
looks like bug #50402 to me ?
[13 Oct 2010 15:53]
Valeriy Kravchuk
Not so sure. It still happens for me with current 5.5.7 (mysql-5.5 from bzr) on Mac OS X: mysql> CREATE TABLE `test_table` ( -> `some_id` int(11) DEFAULT '0', -> `another_id` int(11) DEFAULT NULL, -> KEY `some_id` (`some_id`), -> KEY `another_id` (`another_id`) -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; Query OK, 0 rows affected (0.06 sec) mysql> INSERT INTO `test_table` VALUES -> (460536956,20),(460536956,19),(460536956,16),(1023153465,15),(460536956,15),(460536956,27),(460536956,24),(460536956,22),(460536956,346856985),(930089099,21),(460536956,21),(460536956,1035990391),(460536956,25),(460536956,23),(1023153465,827722210),(460536956,827722210),(460536956,228466266),(460536956,8),(930089099,31),(460536956,29),(460536956,17),(460536956,12),(460536956,30),(460536956,28),(930089099,14),(460536956,14); Query OK, 26 rows affected (0.00 sec) Records: 26 Duplicates: 0 Warnings: 0 mysql> mysql> select * from test_table where some_id = 930089099 AND another_id = 14 -> ; Empty set (0.00 sec) mysql> alter table test_table drop key `some_id`; Query OK, 0 rows affected (0.05 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> select * from test_table where some_id = 930089099 AND another_id = 14; +-----------+------------+ | some_id | another_id | +-----------+------------+ | 930089099 | 14 | +-----------+------------+ 1 row in set (0.00 sec) mysql> select version(); +----------------+ | version() | +----------------+ | 5.5.7-rc-debug | +----------------+ 1 row in set (0.00 sec)
[13 Oct 2010 16:44]
Valeriy Kravchuk
Duplicate of bug #50402. Not in mysql-5.5 tree yet, as of: macbook-pro:mysql-5.5-work openxs$ bzr revision-info 3088 alexander.nozdrin@oracle.com-20101002180831-590ka2tuit9qoxbb