summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_set.result19
-rw-r--r--mysql-test/t/func_set.test15
2 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result
index ba9500bff46..492349fab2d 100644
--- a/mysql-test/r/func_set.result
+++ b/mysql-test/r/func_set.result
@@ -201,3 +201,22 @@ NULL
1,2,3,4,5,6,7
DROP TABLE t1;
+#
+# Start of 5.3 tests
+#
+#
+# MDEV-4512 Valgrind warnings in my_long10_to_str_8bit on INTERVAL and DATE_ADD with incorrect types
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY);
+INSERT INTO t1 VALUES (10),(11);
+SELECT INTERVAL( 9, 1, DATE_ADD( pk, INTERVAL pk MINUTE_SECOND ), 9, 8, 3, 5, 2, 1 ) FROM t1;
+INTERVAL( 9, 1, DATE_ADD( pk, INTERVAL pk MINUTE_SECOND ), 9, 8, 3, 5, 2, 1 )
+8
+8
+Warnings:
+Warning 1292 Incorrect datetime value: '10'
+Warning 1292 Incorrect datetime value: '11'
+DROP TABLE t1;
+#
+# End of 5.3 tests
+#
diff --git a/mysql-test/t/func_set.test b/mysql-test/t/func_set.test
index 3531864c860..c3428c2a868 100644
--- a/mysql-test/t/func_set.test
+++ b/mysql-test/t/func_set.test
@@ -119,3 +119,18 @@ SELECT * FROM t1 WHERE FIND_IN_SET(NULL, NULL) IS UNKNOWN;
--echo
DROP TABLE t1;
+--echo #
+--echo # Start of 5.3 tests
+--echo #
+
+--echo #
+--echo # MDEV-4512 Valgrind warnings in my_long10_to_str_8bit on INTERVAL and DATE_ADD with incorrect types
+--echo #
+CREATE TABLE t1 (pk INT PRIMARY KEY);
+INSERT INTO t1 VALUES (10),(11);
+SELECT INTERVAL( 9, 1, DATE_ADD( pk, INTERVAL pk MINUTE_SECOND ), 9, 8, 3, 5, 2, 1 ) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 5.3 tests
+--echo #