diff options
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 7aa3bbbdd7b..ad4eb9f6801 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -533,21 +533,23 @@ bool THD::convert_string(String *s, CHARSET_INFO *from_cs, CHARSET_INFO *to_cs) return FALSE; } + /* Update some cache variables when character set changes */ void THD::update_charset() { - charset_is_system_charset= my_charset_same(charset(),system_charset_info); - charset_is_collation_connection= my_charset_same(charset(), - variables. - collation_connection); + uint32 not_used; + charset_is_system_charset= !String::needs_conversion(0,charset(), + system_charset_info, + ¬_used); + charset_is_collation_connection= + !String::needs_conversion(0,charset(),variables.collation_connection, + ¬_used); } - - /* routings to adding tables to list of changed in transaction tables */ inline static void list_include(CHANGED_TABLE_LIST** prev, |