summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-03-21 11:21:01 +0400
committerunknown <bar@bar.mysql.r18.ru>2003-03-21 11:21:01 +0400
commit2dc27531c8952c00133440d54f60dd2030361080 (patch)
tree91a1c3ec185a2c02cea750090603b6f8cf2776ee /sql/item.cc
parentd7bccdbe817be53d38cba08648998ad24626aa9b (diff)
downloadmariadb-git-2dc27531c8952c00133440d54f60dd2030361080.tar.gz
A separate variable national_charset_info
Fixes according coercibility tables, p162, SQL Complete include/my_sys.h: Declaration has been moved to /sql directory sql/item.cc: Fixes acording SQL complete, page 162 sql/item_cmpfunc.cc: Fixes acording SQL complete, page 162 sql/mysql_priv.h: Declaration has been moved here from /include sql/sql_string.cc: A separate variable national_charset_info sql/sql_yacc.yy: A separate variable national_charset_info
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/sql/item.cc b/sql/item.cc
index aed0a823603..b4d2d0670d8 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -199,10 +199,17 @@ bool Item::set_charset(CHARSET_INFO *cs1, enum coercion co1,
{
if (cs1 != cs2)
{
- CHARSET_INFO *bin= get_charset_by_csname(cs1->csname, MY_CS_BINSORT,MYF(0));
- if (!bin)
- return 1;
- set_charset(bin, COER_NOCOLL);
+ if (co1 == COER_EXPLICIT)
+ {
+ return 1;
+ }
+ else
+ {
+ CHARSET_INFO *bin= get_charset_by_csname(cs1->csname, MY_CS_BINSORT,MYF(0));
+ if (!bin)
+ return 1;
+ set_charset(bin, COER_NOCOLL);
+ }
}
else
set_charset(cs2, co2);
@@ -987,6 +994,7 @@ Item_varbinary::Item_varbinary(const char *str, uint str_length)
str+=2;
}
*ptr=0; // Keep purify happy
+ coercibility= COER_COERCIBLE;
}
longlong Item_varbinary::val_int()