From af3c76631cfbc506478483c0d6a5e54fc091af09 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jun 2006 22:39:48 -0700 Subject: [PATCH] Modified the test case for bug 16674 to have the same execution plans in 4.1 and 5.0. --- mysql-test/r/ctype_utf8.result | 14 ++++++++++---- mysql-test/t/ctype_utf8.test | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index c2f4dce0175..fc5645ae10b 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1173,6 +1173,7 @@ INSERT INTO t1 VALUES ('Käli Käli 2-4'), ('Käli Käli 2-4'), ('Käli Käli 2+4'), ('Käli Käli 2+4'), ('Käli Käli 2-6'), ('Käli Käli 2-6'); +INSERT INTO t1 SELECT * FROM t1; CREATE TABLE t2 ( a CHAR(13) DEFAULT '', INDEX(a) @@ -1181,26 +1182,31 @@ INSERT INTO t2 VALUES ('Kali Kali 2-4'), ('Kali Kali 2-4'), ('Kali Kali 2+4'), ('Kali Kali 2+4'), ('Kali Kali 2-6'), ('Kali Kali 2-6'); +INSERT INTO t2 SELECT * FROM t2; SELECT a FROM t1 WHERE a LIKE 'Käli Käli 2+4'; a Käli Käli 2+4 Käli Käli 2+4 +Käli Käli 2+4 +Käli Käli 2+4 SELECT a FROM t2 WHERE a LIKE 'Kali Kali 2+4'; a Kali Kali 2+4 Kali Kali 2+4 +Kali Kali 2+4 +Kali Kali 2+4 EXPLAIN SELECT a FROM t1 WHERE a LIKE 'Käli Käli 2+4'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 40 NULL 2 Using where; Using index +1 SIMPLE t1 range a a 40 NULL 4 Using where; Using index EXPLAIN SELECT a FROM t1 WHERE a = 'Käli Käli 2+4'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 40 const 2 Using where; Using index +1 SIMPLE t1 ref a a 40 const 4 Using where; Using index EXPLAIN SELECT a FROM t2 WHERE a LIKE 'Kali Kali 2+4'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range a a 14 NULL 2 Using where; Using index +1 SIMPLE t2 range a a 14 NULL 4 Using where; Using index EXPLAIN SELECT a FROM t2 WHERE a = 'Kali Kali 2+4'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref a a 14 const 2 Using where; Using index +1 SIMPLE t2 ref a a 14 const 4 Using where; Using index DROP TABLE t1,t2; CREATE TABLE t1 ( a char(255) DEFAULT '', diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index f646142de67..de9bb4687b1 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -966,6 +966,7 @@ INSERT INTO t1 VALUES ('Käli Käli 2-4'), ('Käli Käli 2-4'), ('Käli Käli 2+4'), ('Käli Käli 2+4'), ('Käli Käli 2-6'), ('Käli Käli 2-6'); +INSERT INTO t1 SELECT * FROM t1; CREATE TABLE t2 ( a CHAR(13) DEFAULT '', @@ -976,6 +977,7 @@ INSERT INTO t2 VALUES ('Kali Kali 2-4'), ('Kali Kali 2-4'), ('Kali Kali 2+4'), ('Kali Kali 2+4'), ('Kali Kali 2-6'), ('Kali Kali 2-6'); +INSERT INTO t2 SELECT * FROM t2; SELECT a FROM t1 WHERE a LIKE 'Käli Käli 2+4'; SELECT a FROM t2 WHERE a LIKE 'Kali Kali 2+4';