summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/r/collation_connection_func.result
diff options
context:
space:
mode:
authorHorst Hunger <horst@mysql.com>2008-12-19 16:03:32 +0100
committerHorst Hunger <horst@mysql.com>2008-12-19 16:03:32 +0100
commit357b5009409ed6666bf1df48a80d76cd42a482c8 (patch)
tree7a2fa9b404ffb20d1572c51a0bca7ecc64992310 /mysql-test/suite/sys_vars/r/collation_connection_func.result
parentba816c14a9bc8012759da9d58f858f1e73bec708 (diff)
downloadmariadb-git-357b5009409ed6666bf1df48a80d76cd42a482c8.tar.gz
WL#4681: Took the system variable tests out of the main test suite, put them into "sys_vars", updated some reult files and tests.
Diffstat (limited to 'mysql-test/suite/sys_vars/r/collation_connection_func.result')
-rw-r--r--mysql-test/suite/sys_vars/r/collation_connection_func.result60
1 files changed, 60 insertions, 0 deletions
diff --git a/mysql-test/suite/sys_vars/r/collation_connection_func.result b/mysql-test/suite/sys_vars/r/collation_connection_func.result
new file mode 100644
index 00000000000..18f82dc60e1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/collation_connection_func.result
@@ -0,0 +1,60 @@
+'#--------------------FN_DYNVARS_015_01-------------------------#'
+SET @global_collation_connection = @@global.collation_connection;
+SET @session_collation_connection = @@session.collation_connection;
+SET @@global.collation_connection = latin1_danish_ci;
+'connect (con1,localhost,root,,,,)'
+'connection con1'
+SELECT @@global.collation_connection;
+@@global.collation_connection
+latin1_danish_ci
+SELECT @@session.collation_connection;
+@@session.collation_connection
+latin1_danish_ci
+'#--------------------FN_DYNVARS_015_02-------------------------#'
+'connection default'
+DROP TABLE IF EXISTS t1;
+'----check if collation_connection update character_set_connection---'
+SET @@session.collation_connection = utf8_spanish_ci;
+SELECT @@collation_connection, @@character_set_database;
+@@collation_connection @@character_set_database
+utf8_spanish_ci latin1
+'---check if collation_connection works for literal string comparision--'
+SET @@session.collation_connection = latin1_swedish_ci;
+SELECT 'mysql'='MySql';
+'mysql'='MySql'
+1
+SELECT _latin2'mysql' COLLATE latin2_general_ci='MySql';
+_latin2'mysql' COLLATE latin2_general_ci='MySql'
+1
+SELECT _utf8'mysql'=_utf8'MySql' COLLATE utf8_unicode_ci;
+_utf8'mysql'=_utf8'MySql' COLLATE utf8_unicode_ci
+1
+SET @@session.collation_connection = latin1_general_cs;
+SELECT 'mysql'='MySql';
+'mysql'='MySql'
+0
+SELECT _latin2'mysql'COLLATE latin2_general_ci='MySql';
+_latin2'mysql'COLLATE latin2_general_ci='MySql'
+1
+SELECT _utf8'mysql'COLLATE utf8_danish_ci=_utf8'MySql'COLLATE utf8_unicode_ci;
+ERROR HY000: Illegal mix of collations (utf8_danish_ci,EXPLICIT) and (utf8_unicode_ci,EXPLICIT) for operation '='
+'---collation_connection does not effect comparision with column---'
+CREATE TABLE t1(a CHAR(20)CHARACTER SET latin1 COLLATE latin1_german2_ci);
+INSERT INTO t1 VALUES('Müller');
+SET @@session.collation_connection = latin2_hungarian_ci;
+SELECT * FROM t1 WHERE a='Müller';
+a
+Müller
+SET @@session.collation_connection = latin1_general_cs;
+SELECT * FROM t1 WHERE a='müller';
+a
+Müller
+'check if string literal collation is used';
+SELECT * FROM t1 WHERE a='müller' COLLATE latin1_general_cs;
+a
+SELECT * FROM t1 WHERE a='müller' COLLATE latin1_german1_ci;
+a
+Müller
+DROP TABLE t1;
+SET @@global.collation_connection = @global_collation_connection;
+SET @@session.collation_connection = @session_collation_connection;