Commit 6dfb7847 authored by unknown's avatar unknown

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.
parent 76fade75
......@@ -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;
......@@ -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;
......@@ -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()) : '\\';
/*
......
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