diff options
author | Alexander Barkov <alexander.barkov@oracle.com> | 2011-01-17 12:39:59 +0300 |
---|---|---|
committer | Alexander Barkov <alexander.barkov@oracle.com> | 2011-01-17 12:39:59 +0300 |
commit | 579df0dfc654e437e7f3aaceaf29d1390cae94d5 (patch) | |
tree | eeff2b630673f2c37228d46150752d9036cbd8af | |
parent | 8e3dde5e2f993f912bb420df6d1406b6bc7be254 (diff) | |
parent | a2850a2f5323bfe8eaae17746c88986cee37fc76 (diff) | |
download | mariadb-git-579df0dfc654e437e7f3aaceaf29d1390cae94d5.tar.gz |
Merging from mysql-5.1
-rw-r--r-- | mysql-test/r/func_like.result | 5 | ||||
-rw-r--r-- | mysql-test/t/func_like.test | 5 | ||||
-rw-r--r-- | sql/item_sum.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result index 552ff564a89..39590eb1c99 100644 --- a/mysql-test/r/func_like.result +++ b/mysql-test/r/func_like.result @@ -182,4 +182,9 @@ INSERT INTO t2 VALUES (1), (2), (3); SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a; 1 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 diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test index 1204d04d9a0..f1fe52274b2 100644 --- a/mysql-test/t/func_like.test +++ b/mysql-test/t/func_like.test @@ -126,5 +126,10 @@ INSERT INTO t2 VALUES (1), (2), (3); SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a; 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 diff --git a/sql/item_sum.h b/sql/item_sum.h index 634d593935f..81e5e10fffa 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -445,6 +445,7 @@ public: forced_const= TRUE; } 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); void fix_num_length_and_dec(); |