summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorbar@mysql.com <>2005-09-28 11:51:03 +0500
committerbar@mysql.com <>2005-09-28 11:51:03 +0500
commit6e88f14eea5b09a2bd8485c6f260e47fe499c61f (patch)
tree106fffa779db46db173c03d5e9d9a2e8b4091678 /sql
parentc0b8b6db48281b0278402b889134cd247341a9b4 (diff)
parent1c38733f4af1748bd969fbe1d5524c67a2ce87d2 (diff)
downloadmariadb-git-6e88f14eea5b09a2bd8485c6f260e47fe499c61f.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 74eed7fa41a..c4d3d6f7ab4 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))