mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
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 mysql-test/r/type_datetime.result: result added mysql-test/t/type_datetime.test: testcase sql/item_timefunc.h: added double conversion to Item_datetime_typecast
This commit is contained in:
parent
6ef0fee8e6
commit
50b5064ccd
3 changed files with 16 additions and 0 deletions
|
|
@ -166,3 +166,6 @@ dt
|
|||
0000-00-00 00:00:00
|
||||
0000-00-00 00:00:00
|
||||
drop table t1;
|
||||
select cast('2006-12-05 22:10:10' as datetime) + 0;
|
||||
cast('2006-12-05 22:10:10' as datetime) + 0
|
||||
20061205221010.000000
|
||||
|
|
|
|||
|
|
@ -113,4 +113,10 @@ insert into t1 values ("00-00-00"), ("00-00-00 00:00:00");
|
|||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #16546 DATETIME+0 not always coerced the same way
|
||||
#
|
||||
select cast('2006-12-05 22:10:10' as datetime) + 0;
|
||||
|
||||
|
||||
# End of 4.1 tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue