Bug #16546 DATETIME+0 not always coerced the same way
| Submitted: | 16 Jan 2006 18:55 | Modified: | 23 Apr 2007 19:46 |
|---|---|---|---|
| Reporter: | Paul DuBois | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 4.1.x, 5.0.x | OS: | Any |
| Assigned to: | Alexey Botchkov | CPU Architecture: | Any |
[16 Jan 2006 18:55]
Paul DuBois
[2 May 2006 13: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/commits/5801
[9 May 2006 7:59]
Peter Laursen
It is possible to describe here how it will function after the patch?
[6 Jun 2006 9:07]
Ramil Kalimullin
fixed in 4.1.21
[6 Jun 2006 19:58]
Paul DuBois
I tried my second input test again and the results are a bit better, but the CAST(... AS DATETIME)+0 expressions still don't convert properly: +---------------------+-----------------------+ | d | d+0 | +---------------------+-----------------------+ | 2006-06-06 14:55:47 | 20060606145547.000000 | +---------------------+-----------------------+ +---------------------+-----------------------+ | now() | now()+0 | +---------------------+-----------------------+ | 2006-06-06 14:55:47 | 20060606145547.000000 | +---------------------+-----------------------+ +---------------------+-----------------------+ | cast(d as datetime) | cast(d as datetime)+0 | +---------------------+-----------------------+ | 2006-06-06 14:55:47 | 2006 | +---------------------+-----------------------+ +-------------------------+---------------------------+ | cast(now() as datetime) | cast(now() as datetime)+0 | +-------------------------+---------------------------+ | 2006-06-06 14:55:47 | 2006 | +-------------------------+---------------------------+ Shouldn't the second two lines convert the same way as the first two lines?
[13 Jun 2006 21:12]
Paul DuBois
Re-opening. Still doesn't seem completely fixed. See previous comment.
[23 Aug 2006 17:30]
Sveta Smirnova
There is duplicate bug #21791
[14 Nov 2006 13:58]
Chad MILLER
http://lists.mysql.com/commits/15268
[6 Dec 2006 6:29]
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/commits/16490 ChangeSet@1.2563, 2006-12-06 11:03:54+04:00, holyfoot@mysql.com +3 -0 bug #16546 (DATETIME + 0 not always coerced in the same way) fix for cast( AS DATETIME) + 0 operation. I just implemented Item_datetime_typecast::val() method as it is usually done in other classes. Should be fixed more radically in 5.0
[6 Dec 2006 7:32]
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/commits/16492 ChangeSet@1.2326, 2006-12-06 12:06:04+04:00, holyfoot@mysql.com +1 -0 bug #16546 (DATETIME+0 not always coerced the same way) fix for cast( AS DATETIME)+0 in 5.0 and above versions. val_real now works using val_decimal for DATETIME Items
[6 Dec 2006 8:06]
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/commits/16493 ChangeSet@1.2327, 2006-12-06 12:39:14+04:00, holyfoot@mysql.com +1 -0 bug #16546 (DATATIME+0 problems) sove val_real() implementations became superfluous, so removed
[22 Mar 2007 8:24]
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/commits/22570 ChangeSet@1.2624, 2007-03-22 12:24:56+04:00, holyfoot@mysql.com +3 -0 bug #16546 (DATETIME + 0 not always coerced in the same way) fix for cast( AS DATETIME) + 0 operation. I just implemented Item_datetime_typecast::val() method as it is usually done in other classes. Should be fixed more radically in 5.0
[22 Mar 2007 8:44]
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/commits/22573 ChangeSet@1.2490, 2007-03-22 12:44:38+04:00, holyfoot@mysql.com +1 -0 bug #16546 (DATETIME+0 not always coerced the same way) fix for cast( AS DATETIME)+0 in 5.0 and above versions. val_real now works using val_decimal for DATETIME Items Superfluous val_real() methods deleted
[23 Mar 2007 13:56]
Alexey Botchkov
Pushed in 4.1.23, 5.0.40 and 5.1.18
[23 Apr 2007 19:46]
Paul DuBois
Noted in 4.1.23, 5.0.40, 5.1.18 changelogs. Conversion of DATETIME values in numeric contexts sometimes did not produce a double (YYYYMMDDHHMMSS.uuuuuu) value.
[3 Aug 2007 14:14]
Konstantin Osipov
Bug#Bug #19765 CAST(), DATE() and TIME() returning wrong data type for dates? was marked a duplicate of this bug.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.050 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.