summaryrefslogtreecommitdiff
path: root/mysql-test/r/ctype_cp1251.result
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-08-29 19:26:30 +0400
committerAlexander Barkov <bar@mariadb.org>2015-08-29 19:26:30 +0400
commitf071a12498e47921ce2dcc472ff6dafaf16d4d61 (patch)
treeb0f6c0d59f3f168b6c56f7864443fe75d9f45d10 /mysql-test/r/ctype_cp1251.result
parent09fb51255aea93025d782641906a552040d008c9 (diff)
downloadmariadb-git-f071a12498e47921ce2dcc472ff6dafaf16d4d61.tar.gz
MDEV-8688 Wrong result for
SELECT..WHERE varchar_column IN (1,2,3) AND varchar_column=' 1';
Diffstat (limited to 'mysql-test/r/ctype_cp1251.result')
-rw-r--r--mysql-test/r/ctype_cp1251.result31
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index 7a91abbe4f5..ffe16753c5c 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -3334,3 +3334,34 @@ DROP TABLE t1;
#
# End of 5.5 tests
#
+#
+# Start of 10.1 tests
+#
+#
+# MDEV-8688 Wrong result for SELECT..WHERE varchar_column IN (1,2,3) AND varchar_column=' 1';
+#
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET cp1251 COLLATE cp1251_ukrainian_ci);
+INSERT INTO t1 VALUES (' 1'),('`1');
+SELECT * FROM t1 WHERE a IN (1,2,3);
+a
+ 1
+SELECT * FROM t1 WHERE a IN (1,2,3) AND a=' 1';
+a
+ 1
+SELECT * FROM t1 WHERE a IN (1,2,3,'4') AND a=' 1';
+a
+ 1
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (1,2,3) AND a=' 1';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = ' 1') and (`test`.`t1`.`a` in (1,2,3)))
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (1,2,3,'x') AND a=' 1';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = ' 1') and (`test`.`t1`.`a` in (1,2,3,'x')))
+DROP TABLE t1;
+#
+# End of 10.1 tests
+#