[Commits] Rev 3676: in file:///home/bell/maria/bzr/work-maria-10.0-base-merge-5.5/

sanja at montyprogram.com sanja at montyprogram.com
Mon Aug 19 13:12:04 EEST 2013


At file:///home/bell/maria/bzr/work-maria-10.0-base-merge-5.5/

------------------------------------------------------------
revno: 3676
revision-id: sanja at montyprogram.com-20130819101203-ku8zyjedy1k4evug
parent: igor at askmonty.org-20130818192906-39spjhz7xqi88jqz
committer: sanja at montyprogram.com
branch nick: work-maria-10.0-base-merge-5.5
timestamp: Mon 2013-08-19 13:12:03 +0300
message:
  (no message)
-------------- next part --------------
=== modified file 'mysql-test/r/func_set.result'
--- a/mysql-test/r/func_set.result	2011-03-04 14:46:17 +0000
+++ b/mysql-test/r/func_set.result	2013-08-19 10:12:03 +0000
@@ -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
+#

=== modified file 'mysql-test/t/func_set.test'
--- a/mysql-test/t/func_set.test	2011-03-04 14:46:17 +0000
+++ b/mysql-test/t/func_set.test	2013-08-19 10:12:03 +0000
@@ -119,3 +119,18 @@ SELECT * FROM t1 WHERE FIND_IN_SET(NULL,
 
 --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 #

=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc	2013-07-17 19:24:29 +0000
+++ b/sql/item_cmpfunc.cc	2013-08-19 10:12:03 +0000
@@ -2006,7 +2006,7 @@ void Item_func_interval::fix_length_and_
     for (uint i= 1; not_null_consts && i < rows; i++)
     {
       Item *el= row->element_index(i);
-      not_null_consts&= el->const_item() & !el->is_null();
+      not_null_consts&= el->const_item() && !el->is_null();
     }
 
     if (not_null_consts &&



More information about the commits mailing list