Bug #58065 join condition handles date columns differently if there's a unique key
| Submitted: | 8 Nov 2010 21:31 | Modified: | 13 Dec 2025 16:08 |
|---|---|---|---|
| Reporter: | Balint Toth | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server: Data Types | Severity: | S2 (Serious) |
| Version: | 5.1.51, 5.1.52, 5.0, 5.1, 5.6.99 bzr | OS: | Linux (x64, 2.6.32) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | const date format, unique key | ||
[8 Nov 2010 21:31]
Balint Toth
[8 Nov 2010 21:35]
Balint Toth
Also tested with InnoDB, same results.
[8 Nov 2010 21:45]
Balint Toth
Also interesting: if you remove the where condition, the result is good: select * From t_i left join t_d on t_i.a=t_d.a and t_d.d='20101108' ; +---+------+------------+ | a | a | d | +---+------+------------+ | 1 | 1 | 2010-11-08 | | 2 | 2 | 2010-11-08 | +---+------+------------+
[9 Nov 2010 21:47]
Peter Szekvolgyi
I have the same problem with version 5.1.52. mysql --version output: mysql Ver 14.14 Distrib 5.1.52, for portbld-freebsd8.1 (amd64) using 5.2
[10 Nov 2010 12:26]
Sveta Smirnova
Thank you for the report. Verified as described.
[13 Dec 2025 16:08]
Roy Lyseng
Posted by developer: Not reproducible on version 8.0 and later.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.058 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.