summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-10-15 13:39:44 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-10-15 13:39:44 +0400
commitce069b1f6b3847309b06e548adf23fa0c7238336 (patch)
treec65a8382f7b2bc68502871e4c93d9e52e02bd553 /sql
parenta9240dce9e2f32941611b4f1a52e3b30a1508fc2 (diff)
downloadmariadb-git-ce069b1f6b3847309b06e548adf23fa0c7238336.tar.gz
A follow-up for WL#5624: Collation customization improvements
The reasons for failures to initialize a user collation defined in Index.xml are now correctly reported (in SHOW WARNINGS and in the server error log) if the COLLATE clause is used with an expression, e.g.: SELECT <exrp> COLLATE <collation name> FROM t1; Previously, the failure reasons were reported only by COLLATE clauses in SET NAMES and in DDL statements, e.g.: SET NAMES utf8 COLLATE utf8_xxx_ci; CREATE TABLE t1 (a VARCHAR(1) CHARACTER SET utf8 COLLATE utf8_xxx_ci);
Diffstat (limited to 'sql')
-rw-r--r--sql/item_strfunc.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 8dd2a33b1a0..68237ef4951 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -3463,11 +3463,8 @@ void Item_func_set_collation::fix_length_and_dec()
MY_CS_BINSORT,MYF(0));
else
{
- if (!(set_collation= get_charset_by_name(colname,MYF(0))))
- {
- my_error(ER_UNKNOWN_COLLATION, MYF(0), colname);
+ if (!(set_collation= mysqld_collation_get_by_name(colname)))
return;
- }
}
if (!set_collation ||