diff options
author | Alexander Barkov <bar@mariadb.org> | 2015-08-26 22:32:01 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2015-08-26 22:32:01 +0400 |
commit | 1b6b44b6b52e9f86bb32669a68bd7c067bc63d49 (patch) | |
tree | d094abc4292ccd30061cd77d666a6f9b8f8dc977 /mysql-test/r/ctype_latin1.result | |
parent | c0b7bf2625a305eae54e3065edffcd7a2da206b2 (diff) | |
download | mariadb-git-1b6b44b6b52e9f86bb32669a68bd7c067bc63d49.tar.gz |
MDEV-8661 Wrong result for SELECT..WHERE a='a' AND a='a' COLLATE latin1_bin
MDEV-8679 Equal field propagation is not used for VARCHAR when it safely could
Diffstat (limited to 'mysql-test/r/ctype_latin1.result')
-rw-r--r-- | mysql-test/r/ctype_latin1.result | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result index 727886091f7..df492800147 100644 --- a/mysql-test/r/ctype_latin1.result +++ b/mysql-test/r/ctype_latin1.result @@ -7915,3 +7915,41 @@ _latin1 0x7E _latin1 X'7E' _latin1 B'01111110' # # End of 10.0 tests # +# +# Start of 10.1 tests +# +# +# MDEV-8661 Wrong result for SELECT..WHERE a='a' AND a='a' COLLATE latin1_bin +# +SET NAMES latin1; +CREATE TABLE t1 (a CHAR(10)); +INSERT INTO t1 VALUES ('a'),('A'); +SELECT * FROM t1 WHERE a='a' AND a='a' COLLATE latin1_bin; +a +a +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci); +INSERT INTO t1 VALUES ('a'),('A'); +SELECT * FROM t1 WHERE a='a' COLLATE latin1_bin AND a='A' COLLATE latin1_swedish_ci; +a +a +DROP TABLE t1; +# +# MDEV-8679 Equal field propagation is not used for VARCHAR when it safely could +# +CREATE TABLE t1 (a VARCHAR(10)); +INSERT INTO t1 VALUES ('10'),('11'),('12'); +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='10' AND IF(a='10',1,0)=1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = '10') +EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='10' AND CASE WHEN a='10' THEN 1 ELSE 0 END; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = '10') +DROP TABLE t1; +# +# End of 10.1 tests +# |