summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-04-10 12:40:33 +0500
committerunknown <bar@mysql.com>2005-04-10 12:40:33 +0500
commitebdf2c0153c23b41442cacf4cdf78d499305a748 (patch)
tree3c57e9853390c53423a48d67ecadc420c906c58b /mysql-test
parentf2824c4d6066c8b0759eaba06a7010232a3baa55 (diff)
downloadmariadb-git-ebdf2c0153c23b41442cacf4cdf78d499305a748.tar.gz
ctype_collate.result, ctype_collate.test, union.result, union.test:
fixing tests accordingly item.cc: Allow mixing non-binary collation and binary collation even if coercibility is the same. For easier 4.0 -> 4.1 migrating. sql/item.cc: Allow mixing non-binary collation and binary collation even if coercibility is the same. For easier 4.0 -> 4.1 migrating. mysql-test/t/union.test: fixing tests accordingly mysql-test/r/union.result: fixing tests accordingly mysql-test/t/ctype_collate.test: fixing tests accordingly mysql-test/r/ctype_collate.result: fixing tests accordingly
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_collate.result13
-rw-r--r--mysql-test/r/union.result2
-rw-r--r--mysql-test/t/ctype_collate.test12
-rw-r--r--mysql-test/t/union.test2
4 files changed, 27 insertions, 2 deletions
diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result
index bc77e9c2362..cdf890f2c6c 100644
--- a/mysql-test/r/ctype_collate.result
+++ b/mysql-test/r/ctype_collate.result
@@ -535,6 +535,19 @@ s2 CHAR(5) COLLATE latin1_swedish_ci);
SELECT * FROM t1 WHERE s1 = s2;
ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='
DROP TABLE t1;
+CREATE TABLE t1
+(s1 CHAR(5) COLLATE latin1_german1_ci,
+s2 CHAR(5) COLLATE latin1_swedish_ci,
+s3 CHAR(5) COLLATE latin1_bin);
+INSERT INTO t1 VALUES ('a','A','A');
+SELECT * FROM t1 WHERE s1 = s2;
+ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='
+SELECT * FROM t1 WHERE s1 = s3;
+s1 s2 s3
+SELECT * FROM t1 WHERE s2 = s3;
+s1 s2 s3
+a A A
+DROP TABLE t1;
SET NAMES latin1;
CREATE TABLE t1
(s1 char(10) COLLATE latin1_german1_ci,
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 96baf36d151..c140ecd26e1 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -1103,7 +1103,7 @@ count(*)
drop table t1;
create table t2 (
a char character set latin1 collate latin1_swedish_ci,
-b char character set latin1 collate latin1_bin);
+b char character set latin1 collate latin1_german1_ci);
create table t1 as
(select a from t2) union
(select b from t2);
diff --git a/mysql-test/t/ctype_collate.test b/mysql-test/t/ctype_collate.test
index 3599beeacc4..b65067a36cf 100644
--- a/mysql-test/t/ctype_collate.test
+++ b/mysql-test/t/ctype_collate.test
@@ -158,6 +158,18 @@ SELECT * FROM t1 WHERE s1 = s2;
DROP TABLE t1;
+CREATE TABLE t1
+(s1 CHAR(5) COLLATE latin1_german1_ci,
+ s2 CHAR(5) COLLATE latin1_swedish_ci,
+ s3 CHAR(5) COLLATE latin1_bin);
+INSERT INTO t1 VALUES ('a','A','A');
+--error 1267
+SELECT * FROM t1 WHERE s1 = s2;
+SELECT * FROM t1 WHERE s1 = s3;
+SELECT * FROM t1 WHERE s2 = s3;
+DROP TABLE t1;
+
+
#
# Test that optimizer doesn't use indexes with wrong collation
#
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 94cbd71c00c..b0446e1ea4a 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -641,7 +641,7 @@ drop table t1;
create table t2 (
a char character set latin1 collate latin1_swedish_ci,
-b char character set latin1 collate latin1_bin);
+b char character set latin1 collate latin1_german1_ci);
--error 1271
create table t1 as
(select a from t2) union