mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
fix for bug #12595 (ESCAPE must be exactly 1 character long)
ESCAPE has length of 1 if specified and sql_mode is NO_BACKSLASH_ESCAPES or has length of 0 or 1 in every other situation. (approved patch applied on a up-to-date tree re-commit)
This commit is contained in:
@@ -599,7 +599,8 @@ SQL_SELECT *prepare_select_for_name(THD *thd, const char *mask, uint mlen,
|
||||
{
|
||||
Item *cond= new Item_func_like(new Item_field(pfname),
|
||||
new Item_string(mask,mlen,pfname->charset()),
|
||||
new Item_string("\\",1,&my_charset_latin1));
|
||||
new Item_string("\\",1,&my_charset_latin1),
|
||||
FALSE);
|
||||
if (thd->is_fatal_error)
|
||||
return 0; // OOM
|
||||
return prepare_simple_select(thd, cond, table, error);
|
||||
|
||||
Reference in New Issue
Block a user