diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-03-21 11:21:01 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-03-21 11:21:01 +0400 |
commit | 2dc27531c8952c00133440d54f60dd2030361080 (patch) | |
tree | 91a1c3ec185a2c02cea750090603b6f8cf2776ee /sql/item_cmpfunc.cc | |
parent | d7bccdbe817be53d38cba08648998ad24626aa9b (diff) | |
download | mariadb-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_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index da63e3bbf4b..ff6f4022877 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -111,7 +111,21 @@ bool Item_bool_func2::set_cmp_charset(CHARSET_INFO *cs1, enum coercion co1, if (cs1 == cs2) cmp_charset= cs1; else - return 1; + { + if (co1 == COER_COERCIBLE) + { + CHARSET_INFO *c= get_charset_by_csname(cs1->csname,MY_CS_PRIMARY,MYF(0)); + if (c) + { + cmp_charset= c; + return 0; + } + else + return 1; + } + else + return 1; + } } return 0; } |