summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-08-17 19:56:14 -0700
committerunknown <jimw@mysql.com>2005-08-17 19:56:14 -0700
commit6dfb784791aecfb85315239b370b8ef157a08cb2 (patch)
tree33cc4259ecccb75271dac30a4fbc259353a8192d
parent76fade759e8e67aee96b43861879f0c29aaed7d7 (diff)
downloadmariadb-git-6dfb784791aecfb85315239b370b8ef157a08cb2.tar.gz
Revert patch for Bug #12595, it causes the sql_mode test to fail.
mysql-test/r/select.result: Update results mysql-test/t/select.test: Remove regression test sql/item_cmpfunc.cc: Revert patch for checking length of ESCAPE, it is not correct.
-rw-r--r--mysql-test/r/select.result11
-rw-r--r--mysql-test/t/select.test11
-rw-r--r--sql/item_cmpfunc.cc6
3 files changed, 0 insertions, 28 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 1b35df534a0..b20949d4a62 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -2756,14 +2756,3 @@ DROP TABLE t1,t2;
select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0;
x'10' + 0 X'10' + 0 b'10' + 0 B'10' + 0
16 16 2 2
-CREATE TABLE BUG_12595(a varchar(100));
-INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an");
-SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*';
-a
-hakan%
-SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**';
-ERROR HY000: Incorrect arguments to ESCAPE
-SELECT * FROM BUG_12595 WHERE a LIKE 'ha%%an' ESCAPE '%';
-a
-ha%an
-DROP TABLE BUG_12595;
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 390c4372f16..8e74167852b 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2348,14 +2348,3 @@ DROP TABLE t1,t2;
#
select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0;
-
-#
-# BUG #12595
-#
-CREATE TABLE BUG_12595(a varchar(100));
-INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an");
-SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*';
--- error 1210
-SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**';
-SELECT * FROM BUG_12595 WHERE a LIKE 'ha%%an' ESCAPE '%';
-DROP TABLE BUG_12595;
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index c305196615a..b513fb26bdb 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2792,12 +2792,6 @@ bool Item_func_like::fix_fields(THD *thd, Item **ref)
{
/* If we are on execution stage */
String *escape_str= escape_item->val_str(&tmp_value1);
- /* ESCAPE must be 1 char in length.*/
- if (escape_str && escape_str->numchars() != 1)
- {
- my_error(ER_WRONG_ARGUMENTS,MYF(0),"ESCAPE");
- return TRUE;
- }
escape= escape_str ? *(escape_str->ptr()) : '\\';
/*