#At file:///home/hakan/work/mysql/mysql-6.0-falcon-team/
2820 Hakan Kuecuekyilmaz 2008-09-13
Rescued another test from falcon_team suite.
renamed:
mysql-test/suite/falcon_team/r/falcon_bug_30480_A.result => mysql-test/suite/falcon/r/falcon_bug_30480_A.result
mysql-test/suite/falcon_team/t/falcon_bug_30480_A.test => mysql-test/suite/falcon/t/falcon_bug_30480_A.test
modified:
mysql-test/suite/falcon/r/falcon_bug_30480_A.result
mysql-test/suite/falcon/t/falcon_bug_30480_A.test
per-file messages:
mysql-test/suite/falcon/r/falcon_bug_30480_A.result
Adjusted result file.
mysql-test/suite/falcon/t/falcon_bug_30480_A.test
Reworked test case to apply to our
test case coding standards.
No functional changes.
=== renamed file 'mysql-test/suite/falcon_team/r/falcon_bug_30480_A.result' => 'mysql-test/suite/falcon/r/falcon_bug_30480_A.result'
--- a/mysql-test/suite/falcon_team/r/falcon_bug_30480_A.result 2008-04-23 08:50:47 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_30480_A.result 2008-09-12 23:28:15 +0000
@@ -1,21 +1,18 @@
-SET storage_engine = Falcon;
*** Bug #30480 ***
+SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
-CREATE TABLE t1 (s1 varchar(5) CHARACTER SET latin1);
SET NAMES utf8;
-CREATE INDEX id on t1 (s1);
+CREATE TABLE t1 (s1 varchar(5) CHARACTER SET latin1, INDEX id (s1));
+CREATE TABLE t2 (s1 varchar(5) CHARACTER SET latin1, INDEX id (s1)) partition by key(s1);
INSERT INTO t1 VALUES (0x8e);
INSERT INTO t1 VALUES ('AA');
+INSERT INTO t2 VALUES (0x8e);
+INSERT INTO t2 VALUES ('AA');
SELECT s1, HEX(s1) FROM t1;
s1 HEX(s1)
Ž 8E
AA 4141
-CREATE TABLE t2 (s1 varchar(5) CHARACTER SET latin1) partition by key(s1);
-SET NAMES utf8;
-CREATE INDEX id on t2 (s1);
-INSERT INTO t2 VALUES (0x8e);
-INSERT INTO t2 VALUES ('AA');
SELECT s1, HEX(s1) FROM t2;
s1 HEX(s1)
Ž 8E
@@ -26,4 +23,11 @@ AA 4141
SELECT s1, HEX(s1) FROM t2 WHERE s1 like 'A%';
s1 HEX(s1)
AA 4141
+SELECT count(*) FROM t1;
+count(*)
+2
+SELECT count(*) FROM t2;
+count(*)
+2
DROP TABLE t1;
+DROP TABLE t2;
=== renamed file 'mysql-test/suite/falcon_team/t/falcon_bug_30480_A.test' => 'mysql-test/suite/falcon/t/falcon_bug_30480_A.test'
--- a/mysql-test/suite/falcon_team/t/falcon_bug_30480_A.test 2008-04-20 00:05:17 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_30480_A.test 2008-09-12 23:28:15 +0000
@@ -1,45 +1,46 @@
--source include/have_falcon.inc
---disable_abort_on_error
-SET storage_engine = Falcon;
+
#
# Bug #30480: Falcon: searches fail if LIKE and key partition
#
--echo *** Bug #30480 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
--disable_warnings
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
--enable_warnings
-###########################################################################
-# Description:
-# create a Falcon table with a latin1 column with a default collation.
-# The table is partitioned and indexed.
-# insert two rows, containing '� and 'AA'.
-# search for LIKE 'A%'.
-# get no rows, even though I inserted 'AA'.
-#
-# The result is similar to Bug#28527
-# But Bug#28527 requires an ascii() function, which should soon be
-# illegal, so it will probably disappear.
-# This is different: a key partition, no
-# ascii() function, a non-ASCII value, and a default collation.
-
-CREATE TABLE t1 (s1 varchar(5) CHARACTER SET latin1);
SET NAMES utf8;
-CREATE INDEX id on t1 (s1);
+CREATE TABLE t1 (s1 varchar(5) CHARACTER SET latin1, INDEX id (s1));
+CREATE TABLE t2 (s1 varchar(5) CHARACTER SET latin1, INDEX id (s1)) partition by key(s1);
INSERT INTO t1 VALUES (0x8e);
INSERT INTO t1 VALUES ('AA');
-SELECT s1, HEX(s1) FROM t1;
-
-CREATE TABLE t2 (s1 varchar(5) CHARACTER SET latin1) partition by key(s1);
-SET NAMES utf8;
-CREATE INDEX id on t2 (s1);
INSERT INTO t2 VALUES (0x8e);
INSERT INTO t2 VALUES ('AA');
+
+# ----------------------------------------------------- #
+# --- Test --- #
+# ----------------------------------------------------- #
+SELECT s1, HEX(s1) FROM t1;
SELECT s1, HEX(s1) FROM t2;
SELECT s1, HEX(s1) FROM t1 WHERE s1 like 'A%';
SELECT s1, HEX(s1) FROM t2 WHERE s1 like 'A%';
-# Final cleanup.
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+SELECT count(*) FROM t1;
+SELECT count(*) FROM t2;
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
DROP TABLE t1;
+DROP TABLE t2;
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon branch (hky:2820) | Hakan Kuecuekyilmaz | 13 Sep |