diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-05-10 19:13:06 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2016-05-10 19:13:06 +0400 |
commit | 964c4f070a7e96bf45979d8755beb10aa6e6617b (patch) | |
tree | 415424175ada49bdc0bacca8a5d466f601f61e08 /sql/item_timefunc.cc | |
parent | 672bbcd7411b20e87eca7845aceed81f361d6424 (diff) | |
download | mariadb-git-964c4f070a7e96bf45979d8755beb10aa6e6617b.tar.gz |
MDEV-10052 Illegal mix of collations with DAYNAME(date_field)<>varchar_field
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 873dcdac4b9..28e93683422 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -935,9 +935,8 @@ void Item_func_monthname::fix_length_and_dec() { THD* thd= current_thd; CHARSET_INFO *cs= thd->variables.collation_connection; - uint32 repertoire= my_charset_repertoire(cs); locale= thd->variables.lc_time_names; - collation.set(cs, DERIVATION_COERCIBLE, repertoire); + collation.set(cs, DERIVATION_COERCIBLE, locale->repertoire()); decimals=0; max_length= locale->max_month_name_length * collation.collation->mbmaxlen; maybe_null=1; @@ -1082,9 +1081,8 @@ void Item_func_dayname::fix_length_and_dec() { THD* thd= current_thd; CHARSET_INFO *cs= thd->variables.collation_connection; - uint32 repertoire= my_charset_repertoire(cs); locale= thd->variables.lc_time_names; - collation.set(cs, DERIVATION_COERCIBLE, repertoire); + collation.set(cs, DERIVATION_COERCIBLE, locale->repertoire()); decimals=0; max_length= locale->max_day_name_length * collation.collation->mbmaxlen; maybe_null=1; |