1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-6688 Illegal mix of collation with bit string B'01100001'

This commit is contained in:
Alexander Barkov
2014-09-03 16:31:47 +04:00
parent 36f50be970
commit e42f4e3199
4 changed files with 71 additions and 83 deletions

View File

@ -5996,5 +5996,17 @@ id select_type table type possible_keys key key_len ref rows Extra
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
#
# MDEV-6688 Illegal mix of collation with bit string B'01100001'
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1, b INT);
INSERT INTO t1 VALUES ('a',1);
SELECT CONCAT(a, IF(b>10, _utf8 X'61', _utf8 X'61')) FROM t1;
CONCAT(a, IF(b>10, _utf8 X'61', _utf8 X'61'))
aa
SELECT CONCAT(a, IF(b>10, _utf8 X'61', _utf8 B'01100001')) FROM t1;
CONCAT(a, IF(b>10, _utf8 X'61', _utf8 B'01100001'))
aa
DROP TABLE t1;
#
# End of 10.0 tests
#

View File

@ -1710,6 +1710,16 @@ EXECUTE stmt USING @arg;
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
--echo #
--echo # MDEV-6688 Illegal mix of collation with bit string B'01100001'
--echo #
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1, b INT);
INSERT INTO t1 VALUES ('a',1);
SELECT CONCAT(a, IF(b>10, _utf8 X'61', _utf8 X'61')) FROM t1;
SELECT CONCAT(a, IF(b>10, _utf8 X'61', _utf8 B'01100001')) FROM t1;
DROP TABLE t1;
--echo #
--echo # End of 10.0 tests
--echo #