Commit 62484d2e authored by Alexander Barkov's avatar Alexander Barkov

Merge from 5.3

pending merges:
  Alexander Barkov 2013-08-08 MDEV-4512 Valgrind warnings in my_long10_to_...
parents 22062357 e6a6f653
......@@ -160,6 +160,25 @@ CONVERT( a USING latin1 )
DROP TABLE t1, t2;
#
# 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
#
#
# BUG#59405: FIND_IN_SET won't work normaly after upgrade from 5.1 to 5.5
#
CREATE TABLE t1(days set('1','2','3','4','5','6','7'));
......
......@@ -98,6 +98,23 @@ SELECT CONVERT( a USING latin1 ) FROM t2;
DROP TABLE t1, t2;
--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 #
--echo #
--echo # BUG#59405: FIND_IN_SET won't work normaly after upgrade from 5.1 to 5.5
--echo #
......
......@@ -1966,7 +1966,7 @@ void Item_func_interval::fix_length_and_dec()
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 &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment