summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2011-03-28 17:24:25 +0400
committerSergey Glukhov <sergey.glukhov@oracle.com>2011-03-28 17:24:25 +0400
commitd6125b27b38432d1a465397c0c5a9e62bb1c65d3 (patch)
tree82c83e03cac4cf1059a361f9a2efd46cf30ce0a0 /mysql-test/t
parent4ed8cb4a76275a28231a842c9112834d384b7b4c (diff)
downloadmariadb-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/t')
-rw-r--r--mysql-test/t/func_time.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index c48351d33f2..3f441c42d48 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -887,4 +887,12 @@ DROP TABLE t1;
SELECT STR_TO_DATE(SPACE(2),'1');
+--echo #
+--echo # Bug#11765216 58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
+--echo #
+
+SET GLOBAL SQL_MODE='';
+DO STR_TO_DATE((''), FROM_DAYS(@@GLOBAL.SQL_MODE));
+SET GLOBAL SQL_MODE=DEFAULT;
+
--echo End of 5.1 tests