diff options
author | Sergey Glukhov <sergey.glukhov@oracle.com> | 2011-03-28 17:24:25 +0400 |
---|---|---|
committer | Sergey Glukhov <sergey.glukhov@oracle.com> | 2011-03-28 17:24:25 +0400 |
commit | d6125b27b38432d1a465397c0c5a9e62bb1c65d3 (patch) | |
tree | 82c83e03cac4cf1059a361f9a2efd46cf30ce0a0 /mysql-test/r/func_time.result | |
parent | 4ed8cb4a76275a28231a842c9112834d384b7b4c (diff) | |
download | mariadb-git-d6125b27b38432d1a465397c0c5a9e62bb1c65d3.tar.gz |
Bug#11765216 58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
Valgrind warning happens due to uninitialized cached_format_type field
which is used later in Item_func_str_to_date::val_str method.
The fix is to init cached_format_type field.
mysql-test/r/func_time.result:
test case
mysql-test/t/func_time.test:
test case
sql/item_timefunc.cc:
init cached_format_type field
Diffstat (limited to 'mysql-test/r/func_time.result')
-rw-r--r-- | mysql-test/r/func_time.result | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index f63860039d7..01743e4a1dc 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1381,4 +1381,10 @@ DROP TABLE t1; SELECT STR_TO_DATE(SPACE(2),'1'); STR_TO_DATE(SPACE(2),'1') 0000-00-00 +# +# Bug#11765216 58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION +# +SET GLOBAL SQL_MODE=''; +DO STR_TO_DATE((''), FROM_DAYS(@@GLOBAL.SQL_MODE)); +SET GLOBAL SQL_MODE=DEFAULT; End of 5.1 tests |