diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-05-31 13:25:11 +0400 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-05-31 13:25:11 +0400 |
commit | 89b83c05e0946e0fdd7cf9392a5e5b7e7a78957e (patch) | |
tree | fe89d7122a6e41e82ab872980dc52799becb5ed3 /mysql-test/r/type_time.result | |
parent | 9731b3852b0be5820fc795cf4f27d0f260ebe761 (diff) | |
download | mariadb-git-89b83c05e0946e0fdd7cf9392a5e5b7e7a78957e.tar.gz |
Bug#53942 valgrind warnings with timestamp() function and incomplete datetime values
Field_time::get_date method does not initialize MYSQL_TIME::time_type field.
The fix is to init this field.
mysql-test/r/type_time.result:
test case
mysql-test/t/type_time.test:
test case
sql/field.cc:
--use Field_time::get_time in Field_time::get_date
--removed duplicated code in Field_time::get_date method
Diffstat (limited to 'mysql-test/r/type_time.result')
-rw-r--r-- | mysql-test/r/type_time.result | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index e4b90196c2d..86712bebfa1 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -138,3 +138,13 @@ CAST(c AS TIME) 00:00:00 DROP TABLE t1; End of 5.0 tests +# +# Bug#53942 valgrind warnings with timestamp() function and incomplete datetime values +# +CREATE TABLE t1(f1 TIME); +INSERT INTO t1 VALUES ('23:38:57'); +SELECT TIMESTAMP(f1,'1') FROM t1; +TIMESTAMP(f1,'1') +NULL +DROP TABLE t1; +End of 5.1 tests |