Bug #38517 | min() returns values from unmatched rows when used on unique index | ||
---|---|---|---|
Submitted: | 1 Aug 2008 8:56 | Modified: | 1 Aug 2008 13:35 |
Reporter: | Nico Meyer | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | 5.0.45 | OS: | Any (Linux 64bit) |
Assigned to: | CPU Architecture: | Any |
[1 Aug 2008 8:56]
Nico Meyer
[1 Aug 2008 9:24]
Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.0.51b at least, and inform about the results. On 5.0.66a I've got: C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -uroot -proot -P3308 test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 5.0.66a-enterprise-gpl-nt MySQL Enterprise Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create table test (d date not null default '0000-00-00' primary key); Query OK, 0 rows affected (0.13 sec) mysql> insert into test values ('2008-07-31'),('2008-08-01'); Query OK, 2 rows affected (0.03 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> select min(d) from test where d>'2008-08-01'; +--------+ | min(d) | +--------+ | NULL | +--------+ 1 row in set (0.00 sec)
[1 Aug 2008 11:32]
Nico Meyer
Hello, I tried with the lastest official version (5.0.51a), and there the bug is still there (installed the lastest Ubuntu package on my desktop). In the 5.0.64 snapshot the behaviour seems to be correct again. Bye, Nico
[1 Aug 2008 13:35]
MySQL Verification Team
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html