summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-06-05 19:25:51 +0200
committerSergei Golubchik <sergii@pisem.net>2014-06-05 19:25:51 +0200
commit6d75570e99fbf070cdbeefdfbcfc94d1c7b3ad1f (patch)
treeca14517e0a6d12d28eff28a5f03f6d7b667673cc
parentc7e5a1f70d15cba2424f66e5a55d4d7fef445fab (diff)
downloadmariadb-git-mariadb-5.5.38.tar.gz
fix range.testmariadb-5.5.38
-rw-r--r--mysql-test/r/range.result2
-rw-r--r--mysql-test/r/range_mrr_icp.result54
-rw-r--r--mysql-test/t/range.test1
3 files changed, 56 insertions, 1 deletions
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 21acfee897e..3942f517e7c 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -2087,7 +2087,7 @@ Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
# The following must not use range access:
explain select count(*) from t1 where fd <'😁';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ix_fd ix_fd 63 NULL 41410 Using where; Using index
+1 SIMPLE t1 index ix_fd ix_fd 63 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
select count(*) from t1 where fd <'😁';
diff --git a/mysql-test/r/range_mrr_icp.result b/mysql-test/r/range_mrr_icp.result
index a5c14d99975..11a1687e5bf 100644
--- a/mysql-test/r/range_mrr_icp.result
+++ b/mysql-test/r/range_mrr_icp.result
@@ -2048,4 +2048,58 @@ f1 f2 f3 f4
10 0 0 0
DROP TABLE t1;
DROP VIEW v3;
+#
+# MDEV-6105: Emoji unicode character string search query makes mariadb performance down
+#
+SET NAMES utf8;
+DROP TABLE IF EXISTS t1;
+Warnings:
+Note 1051 Unknown table 't1'
+CREATE TABLE t1(
+id int AUTO_INCREMENT,
+fd varchar(20),
+primary key(id),
+index ix_fd(fd)
+)engine=innodb default charset=UTF8;
+INSERT INTO t1(id, fd) VALUES (null, ''),(null, 'matt'),(null, 'pitt'),(null, 'lee'),(null, 'kim');
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+INSERT INTO t1 (fd) SELECT fd FROM t1;
+# The following should show "Impossible WHERE" :
+explain
+SELECT * FROM t1 WHERE fd='😁';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+SELECT * FROM t1 WHERE fd='😁';
+id fd
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+# The following must not use range access:
+explain select count(*) from t1 where fd <'😁';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index ix_fd ix_fd 63 NULL # Using where; Using index
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+select count(*) from t1 where fd <'😁';
+count(*)
+40960
+Warnings:
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+select count(*) from t1 ignore index (ix_fd) where fd <'😁';
+count(*)
+40960
+drop table t1;
+set names default;
set optimizer_switch=@mrr_icp_extra_tmp;
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 5791509a739..0b8e1a9b3f3 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -1670,6 +1670,7 @@ SELECT * FROM t1 WHERE fd='😁';
SELECT * FROM t1 WHERE fd='😁';
--echo # The following must not use range access:
+--replace_column 9 #
explain select count(*) from t1 where fd <'😁';
select count(*) from t1 where fd <'😁';
select count(*) from t1 ignore index (ix_fd) where fd <'😁';