mariadb/mysql-test/suite/tokudb.add_index/r/falcon_bug_23692.result
Rich Prohaska c5c9c4a824 refs #5545 make mysql add index tests run on 5.5 and 5.6
git-svn-id: file:///svn/mysql/tests/mysql-test@48524 c7de825b-a66e-492c-adef-691d508d4ae1
2012-10-02 17:41:18 +00:00

68 lines
1.5 KiB
Text

SET @@DEFAULT_STORAGE_ENGINE = tokudb;
*** Bug #23692 ***
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP TABLE IF EXISTS t4;
CREATE TABLE t1 (a char(1), key (a));
INSERT INTO t1 VALUES (0x00);
SELECT count(*) FROM t1 WHERE a < '';
count(*)
1
SELECT count(*) FROM t1 WHERE a = '';
count(*)
0
SELECT count(*) FROM t1 WHERE a > '';
count(*)
0
CREATE TABLE t2 (a varbinary(5));
CREATE INDEX i ON t2 (a);
INSERT INTO t2 VALUES (0x02), (0x0202);
SELECT count(*) FROM t2 WHERE a >= 0x02 OR a = 0x0202;
count(*)
2
SELECT hex(a) FROM t2 WHERE a < 0x02;
hex(a)
SELECT hex(a) FROM t2 WHERE a = 0x02;
hex(a)
02
SELECT hex(a) FROM t2 WHERE a > 0x02;
hex(a)
0202
CREATE TABLE t3 (a char(5));
CREATE INDEX i ON t3 (a);
INSERT INTO t3 VALUES (0x4200), (0x4209), (0x42), (0x4220), (0x4242);
SELECT hex(a) FROM t3 WHERE a < 0x42;
hex(a)
4200
4209
SELECT hex(a) FROM t3 WHERE a = 0x42;
hex(a)
42
42
SELECT hex(a) FROM t3 WHERE a > 0x42;
hex(a)
4242
SELECT hex(a) FROM t3 WHERE a LIKE 'a%';
hex(a)
CREATE TABLE t4 (a varchar(5) character set ucs2, key(a)) engine=tokudb;
INSERT INTO t4 VALUES (0x00420000), (0x00420009), (0x0041001f), (0x0042), (0x00420020), (0x00420042);
SELECT hex(a) FROM t4 WHERE a < 'a';
hex(a)
0041001F
SELECT hex(a) FROM t4 WHERE a = 'a';
hex(a)
SELECT hex(a) FROM t4 WHERE a > 'a';
hex(a)
00420000
00420009
0042
00420020
00420042
SELECT hex(a) FROM t4 WHERE a LIKE 'a%';
hex(a)
0041001F
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;