summaryrefslogtreecommitdiff
path: root/mysql-test
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 /mysql-test
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 'mysql-test')
-rw-r--r--mysql-test/r/ctype_ldml.result8
-rw-r--r--mysql-test/t/ctype_ldml.test6
2 files changed, 12 insertions, 2 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;