Bug #39234 | Mysql return empty set on select with range on primary key with order by + limit | ||
---|---|---|---|
Submitted: | 4 Sep 2008 9:52 | Modified: | 10 Sep 2008 20:34 |
Reporter: | Grégory Clause | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | cluster 6.2.15 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | select ; order by ; limit |
[4 Sep 2008 9:52]
Grégory Clause
[4 Sep 2008 10:04]
Valeriy Kravchuk
Thank you for a problem report. I can not repeat this with 5.1.26 though: C:\Program Files\MySQL\MySQL Server 6.0\bin>mysql -uroot -proot -P3310 test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.1.26-rc-community-log MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE TABLE `a` ( -> `x` int(11) unsigned NOT NULL AUTO_INCREMENT, -> `y` int(11) DEFAULT NULL, -> PRIMARY KEY (`x`), -> KEY `y` (`y`) -> ) ENGINE=MyISAM; Query OK, 0 rows affected (0.06 sec) mysql> mysql> INSERT INTO `test`.`a` (`x`, `y`) VALUES (NULL, '10'), (NULL, '10'); Query OK, 2 rows affected (0.02 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> INSERT INTO `test`.`a` (`x`, `y`) VALUES (NULL, '10'), (NULL, '10'); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> INSERT INTO `test`.`a` (`x`, `y`) VALUES (NULL, '10'), (NULL, '10'); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> select * from a where x > 1 and y=10 order by x desc limit 5; +---+------+ | x | y | +---+------+ | 6 | 10 | | 5 | 10 | | 4 | 10 | | 3 | 10 | | 2 | 10 | +---+------+ 5 rows in set (0.06 sec) mysql> select * from a where x > 1 and y=10 order by x desc limit 1; +---+------+ | x | y | +---+------+ | 6 | 10 | +---+------+ 1 row in set (0.00 sec) What I am missing?
[4 Sep 2008 11:11]
Grégory Clause
I did my test with the latest cluster binaries (mysql-cluster-gpl-6.2.15-linux-i686-glibc23) and then tried on 5.1.26 but I certainly missed something(certainly started the wrong server) since I am not able to reproduce in 5.1.26. I apologize for this but the problem is still on the cluster binaries which uses 5.1.23 for sql nodes.
[4 Sep 2008 12:03]
MySQL Verification Team
See bugs: http://bugs.mysql.com/bug.php?id=37964 and http://bugs.mysql.com/bug.php?id=37830
[4 Sep 2008 12:46]
Valeriy Kravchuk
Looks like a duplicate of bug #35206 (fixed in 5.1.24). Please, check.
[10 Sep 2008 12:34]
Grégory Clause
I tested against 5.1.23rc and 5.1.24rc. The bug was solved in 5.1.24rc and is a duplicate of bug #35206. But cluster is using a server version based on 5.1.23 for sql nodes (Server version: 5.1.23-ndb-6.2.15-cluster-gpl-log MySQL Cluster Server (GPL)).
[10 Sep 2008 20:34]
Sveta Smirnova
Thank you for the feedback. Bug is also fixed in version mysql-5.1.24-ndb-6.3.16-telco, so you can upgrade to this version or wait next ndb-6.2* release. So I mark this report as duplicate of bug #35206