summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_time.test
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2011-03-28 11:53:18 +0400
committerSergey Glukhov <sergey.glukhov@oracle.com>2011-03-28 11:53:18 +0400
commite9935c6363b9fb1f132c4ca43dd38fddd61ebc10 (patch)
tree34c536aba575ebcc9c2a27bd666d70071fc73656 /mysql-test/t/func_time.test
parent257e39aa44a9d035575846ad4f3e3a0fbeff0667 (diff)
downloadmariadb-git-e9935c6363b9fb1f132c4ca43dd38fddd61ebc10.tar.gz
Bug#11766112 59151:UNINITIALIZED VALUES IN EXTRACT_DATE_TIME WITH STR_TO_DATE(SPACE(..) ...
Valgrind warining happens due to missing 'end of the string' check. The fix is to check if we reached the end of the string.
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r--mysql-test/t/func_time.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index f32110ef87c..c48351d33f2 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -881,4 +881,10 @@ INSERT INTO t1 VALUES (''),('');
SELECT COUNT(*) FROM t1 GROUP BY TIME_TO_SEC(a);
DROP TABLE t1;
+--echo #
+--echo # Bug#11766112 59151:UNINITIALIZED VALUES IN EXTRACT_DATE_TIME WITH STR_TO_DATE(SPACE(..) ...
+--echo #
+
+SELECT STR_TO_DATE(SPACE(2),'1');
+
--echo End of 5.1 tests