Commit a16fea43 authored by Alexander Barkov's avatar Alexander Barkov

Merging from mysql-5.1

parents 67bcf3e3 1c9515f6
...@@ -182,4 +182,9 @@ INSERT INTO t2 VALUES (1), (2), (3); ...@@ -182,4 +182,9 @@ INSERT INTO t2 VALUES (1), (2), (3);
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a; SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
1 1
DROP TABLE t1, t2; DROP TABLE t1, t2;
#
# Bug#59149 valgrind warnings with "like .. escape .." function
#
SELECT '' LIKE '1' ESCAPE COUNT(1);
ERROR HY000: Incorrect arguments to ESCAPE
End of 5.1 tests End of 5.1 tests
...@@ -126,5 +126,10 @@ INSERT INTO t2 VALUES (1), (2), (3); ...@@ -126,5 +126,10 @@ INSERT INTO t2 VALUES (1), (2), (3);
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a; SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
DROP TABLE t1, t2; DROP TABLE t1, t2;
--echo #
--echo # Bug#59149 valgrind warnings with "like .. escape .." function
--echo #
--error ER_WRONG_ARGUMENTS
SELECT '' LIKE '1' ESCAPE COUNT(1);
--echo End of 5.1 tests --echo End of 5.1 tests
...@@ -445,6 +445,7 @@ class Item_sum :public Item_result_field ...@@ -445,6 +445,7 @@ class Item_sum :public Item_result_field
forced_const= TRUE; forced_const= TRUE;
} }
virtual bool const_item() const { return forced_const; } virtual bool const_item() const { return forced_const; }
virtual bool const_during_execution() const { return false; }
virtual void print(String *str, enum_query_type query_type); virtual void print(String *str, enum_query_type query_type);
void fix_num_length_and_dec(); void fix_num_length_and_dec();
......
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