#At file:///home/lb200670/mysql/23692/ based on revid:lars-erik.bjork@stripped
3031 lars-erik.bjork@stripped 2009-02-20
Follow-up commit to the patch for bug#23962 including the test files for the patch
added:
mysql-test/suite/falcon/r/falcon_bug_23692.result
mysql-test/suite/falcon/t/falcon_bug_23692.test
per-file messages:
mysql-test/suite/falcon/r/falcon_bug_23692.result
Expected test result
mysql-test/suite/falcon/t/falcon_bug_23692.test
Test file based on the bug report
=== added file 'mysql-test/suite/falcon/r/falcon_bug_23692.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_23692.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_23692.result 2009-02-20 12:16:36 +0000
@@ -0,0 +1,39 @@
+*** Bug #23692 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (s1 char(5), key(s1));
+INSERT INTO t1 VALUES (0x4200), (0x4209), (0x42), (0x4242);
+SELECT hex(s1) FROM t1 WHERE s1 < 0x42;
+hex(s1)
+4200
+4209
+SELECT hex(s1) FROM t1 WHERE s1 < 0x4209;
+hex(s1)
+4200
+DROP TABLE t1;
+CREATE TABLE t1 (s1 char(1),key(s1));
+INSERT INTO t1 VALUES (0x00);
+SELECT hex(s1) FROM t1 WHERE s1 < '';
+hex(s1)
+00
+DROP TABLE t1;
+CREATE TABLE t1 (s1 varbinary(5));
+CREATE INDEX i on t1 (s1);
+INSERT INTO t1 VALUES (0x02),(0x0202);
+SELECT hex(s1) FROM t1 WHERE s1 >= 0x02 or s1 = 0x0202;
+hex(s1)
+02
+0202
+DROP TABLE t1;
+CREATE TABLE t1(s1 varbinary(3) primary key);
+INSERT INTO t1 VALUES (0x41),(0x4100),(0x4120),(0x4121),(0x4141);
+SELECT hex(s1) FROM t1 WHERE s1 > 0x41;
+hex(s1)
+4100
+4120
+4121
+4141
+SELECT count(*) FROM t1;
+count(*)
+5
+DROP TABLE t1;
=== added file 'mysql-test/suite/falcon/t/falcon_bug_23692.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_23692.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_23692.test 2009-02-20 12:16:36 +0000
@@ -0,0 +1,53 @@
+--source include/have_falcon.inc
+
+#
+# Bug #23692: Falcon: searches fail if data is 0x00
+#
+--echo *** Bug #23692 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+# ----------------------------------------------------- #
+# --- Test --- #
+# ----------------------------------------------------- #
+
+CREATE TABLE t1 (s1 char(5), key(s1));
+INSERT INTO t1 VALUES (0x4200), (0x4209), (0x42), (0x4242);
+
+# Should return 0x4200 & 0x4209
+SELECT hex(s1) FROM t1 WHERE s1 < 0x42;
+SELECT hex(s1) FROM t1 WHERE s1 < 0x4209;
+DROP TABLE t1;
+
+CREATE TABLE t1 (s1 char(1),key(s1));
+INSERT INTO t1 VALUES (0x00);
+SELECT hex(s1) FROM t1 WHERE s1 < '';
+DROP TABLE t1;
+
+CREATE TABLE t1 (s1 varbinary(5));
+CREATE INDEX i on t1 (s1);
+INSERT INTO t1 VALUES (0x02),(0x0202);
+SELECT hex(s1) FROM t1 WHERE s1 >= 0x02 or s1 = 0x0202;
+DROP TABLE t1;
+
+CREATE TABLE t1(s1 varbinary(3) primary key);
+INSERT INTO t1 VALUES (0x41),(0x4100),(0x4120),(0x4121),(0x4141);
+SELECT hex(s1) FROM t1 WHERE s1 > 0x41;
+
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+SELECT count(*) FROM t1;
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
+DROP TABLE t1;
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon-team branch (lars-erik.bjork:3031) Bug#23962 | lars-erik.bjork | 20 Feb |