diff options
Diffstat (limited to 'mysql-test/t/cast.test')
-rw-r--r-- | mysql-test/t/cast.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index ab2859a5346..5563e260a06 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -237,4 +237,13 @@ select hex(cast('a' as char(2) binary)); select hex(cast('a' as binary(2))); select hex(cast('a' as char(2) binary)); +# +# Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag. +# +CREATE TABLE t1 (d1 datetime); +INSERT INTO t1(d1) VALUES ('2007-07-19 08:30:00'), (NULL), + ('2007-07-19 08:34:00'), (NULL), ('2007-07-19 08:36:00'); +SELECT cast(date(d1) as signed) FROM t1; +drop table t1; + --echo End of 5.0 tests |