summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-10-05 11:28:08 +0500
committerunknown <bar@mysql.com>2005-10-05 11:28:08 +0500
commit709f8556bfbc33243086545bb001a18066addb50 (patch)
treea2666f6a2268536077d179e63a6423a9c95076da /sql
parente4470578411b9afe207e11fd8781560317d11365 (diff)
parent84454656f6f7a0e9e19edd95a303bcfa0d28a5a4 (diff)
downloadmariadb-git-709f8556bfbc33243086545bb001a18066addb50.tar.gz
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/bar/mysql-4.1.b13046
Diffstat (limited to 'sql')
-rw-r--r--sql/item_cmpfunc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index f3ba276ec04..009e31c8665 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2443,9 +2443,9 @@ bool Item_func_like::fix_fields(THD *thd, TABLE_LIST *tlist, Item ** ref)
String *escape_str= escape_item->val_str(&tmp_value1);
if (escape_str)
{
- CHARSET_INFO *cs= cmp.cmp_collation.collation;
- if (use_mb(cs))
+ if (use_mb(cmp_collation.collation))
{
+ CHARSET_INFO *cs= escape_str->charset();
my_wc_t wc;
int rc= cs->cset->mb_wc(cs, &wc,
(const uchar*) escape_str->ptr(),
@@ -2460,6 +2460,7 @@ bool Item_func_like::fix_fields(THD *thd, TABLE_LIST *tlist, Item ** ref)
code instead of Unicode code as "escape" argument.
Convert to "cs" if charset of escape differs.
*/
+ CHARSET_INFO *cs= cmp_collation.collation;
uint32 unused;
if (escape_str->needs_conversion(escape_str->length(),
escape_str->charset(), cs, &unused))