diff options
| author | Alexander Barkov <bar@mariadb.org> | 2017-10-07 13:42:11 +0400 |
|---|---|---|
| committer | Alexander Barkov <bar@mariadb.org> | 2017-10-07 13:42:11 +0400 |
| commit | ca948e335e0e43538f994484938dd729b32ae286 (patch) | |
| tree | 42c88abe8149ad003a5305da526c0cf0afbf326f /mysql-test/t | |
| parent | dbeffabc83ed01112e09d7e782d44f044cfcb691 (diff) | |
| download | mariadb-git-ca948e335e0e43538f994484938dd729b32ae286.tar.gz | |
MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant
Diffstat (limited to 'mysql-test/t')
| -rw-r--r-- | mysql-test/t/ctype_gbk.test | 14 | ||||
| -rw-r--r-- | mysql-test/t/ctype_latin1.test | 16 |
2 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test index d44009b6109..454377d98a7 100644 --- a/mysql-test/t/ctype_gbk.test +++ b/mysql-test/t/ctype_gbk.test @@ -199,6 +199,20 @@ let $ctype_unescape_combinations=selected; SET NAMES gbk; --source include/ctype_E05C.inc +--echo # +--echo # MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +--echo # + +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET gbk); +INSERT INTO t1 VALUES (0xEE5D); +SELECT a<>0xEE5D AS a FROM t1; +CREATE VIEW v1 AS SELECT a<>0xEE5D AS a FROM t1; +SHOW CREATE VIEW v1; +SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1; + --echo # --echo # End of 10.0 tests diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test index aeaad2cc026..8a188b71e24 100644 --- a/mysql-test/t/ctype_latin1.test +++ b/mysql-test/t/ctype_latin1.test @@ -245,6 +245,22 @@ DROP TABLE t1; --echo # SELECT _latin1 0x7E, _latin1 X'7E', _latin1 B'01111110'; + +--echo # +--echo # MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +--echo # + +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET latin1); +INSERT INTO t1 VALUES (0xC0); +SELECT a<>0xEE5D AS a FROM t1; +CREATE VIEW v1 AS SELECT a<>0xC0 AS a FROM t1; +SHOW CREATE VIEW v1; +SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1; + + --echo # --echo # End of 10.0 tests --echo # |
