diff options
-rw-r--r-- | mysql-test/r/ctype_ldml.result | 8 | ||||
-rw-r--r-- | mysql-test/t/ctype_ldml.test | 6 | ||||
-rw-r--r-- | sql/item_strfunc.cc | 5 |
3 files changed, 13 insertions, 6 deletions
diff --git a/mysql-test/r/ctype_ldml.result b/mysql-test/r/ctype_ldml.result index d80e0726e76..5eef6c38640 100644 --- a/mysql-test/r/ctype_ldml.result +++ b/mysql-test/r/ctype_ldml.result @@ -769,6 +769,12 @@ SHOW WARNINGS; Level Code Message Error 1273 Unknown collation: 'utf8_5624_2' Warning 1273 Syntax error at '[strength tertiary]' +SELECT _utf8'test' COLLATE utf8_5624_2; +ERROR HY000: Unknown collation: 'utf8_5624_2' +SHOW WARNINGS; +Level Code Message +Error 1273 Unknown collation: 'utf8_5624_2' +Warning 1273 Syntax error at '[strength tertiary]' # # WL#5624, reset before primary ignorable # @@ -1086,4 +1092,4 @@ DROP TABLE t1; # Bug#14197426 PARSE ERRORS IN LOADABLE UCA / LDML COLLATIONS ARE SILENTLY IGNORED # # Search for occurrences of [ERROR] Syntax error at '[strength tertiary]' -Occurances : 1 +Occurances : 2 diff --git a/mysql-test/t/ctype_ldml.test b/mysql-test/t/ctype_ldml.test index e67ee730510..bcb16334df4 100644 --- a/mysql-test/t/ctype_ldml.test +++ b/mysql-test/t/ctype_ldml.test @@ -249,6 +249,10 @@ DROP TABLE t1; SET NAMES utf8 COLLATE utf8_5624_2; SHOW WARNINGS; +--error ER_UNKNOWN_COLLATION +SELECT _utf8'test' COLLATE utf8_5624_2; +SHOW WARNINGS; + --echo # --echo # WL#5624, reset before primary ignorable --echo # @@ -353,7 +357,7 @@ DROP TABLE t1; --let $out_file= $MYSQLTEST_VARDIR/tmp/ctype_ldml_log.err --let OUTF= $out_file # Error messages are not seen in error log in embedded version ---let EMBEDDED=`SELECT version() LIKE '%embedded%'` +--let EMBEDDED=`SELECT IF(version() LIKE '%embedded%',2,0)` --echo # Search for occurrences of [ERROR] Syntax error at '[strength tertiary]' perl; 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 || |