*** This is the test for known bugs in index version1 ***
SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (v varbinary(10), comment varchar(30), key(v));
INSERT INTO t1 values ('A','A'),(0x00,'single byte zero'),('','zero length value'),(0x01, 'single byte one'),(NULL, 'SQL null');
SELECT hex(v), comment FROM t1 FORCE INDEX FOR ORDER BY(v) ORDER BY v LIMIT 5 ;
hex(v)	comment
NULL	SQL null
	zero length value
00	single byte zero
01	single byte one
41	A
SELECT hex(v), comment FROM t1 IGNORE INDEX FOR ORDER BY(v) ORDER BY v LIMIT 5 ;
hex(v)	comment
NULL	SQL null
	zero length value
00	single byte zero
01	single byte one
41	A
CREATE TABLE t2(v1 varbinary(5), v2 varbinary(5), comment varchar(30));
CREATE INDEX i2 on t2(v1,v2);
INSERT INTO t2 values (0x00000000,0x00000000, "4 zero bytes");
INSERT INTO t2 values (0x000000,0x000000, "3 zero bytes");
INSERT INTO t2 values (0x0000,0x00000, "2 zero bytes");
INSERT INTO t2 values (0x00,0x00, "1 zero byte");
INSERT INTO t2 values ('','', "zero length value");
INSERT INTO t2 values (NULL,NULL, "SQL NULL");
SELECT hex(v1), comment FROM t2 FORCE INDEX(i2) ORDER BY v1,v2 LIMIT 6;
hex(v1)	comment
NULL	SQL NULL
	zero length value
00	1 zero byte
0000	2 zero bytes
000000	3 zero bytes
00000000	4 zero bytes
SELECT hex(v1), comment FROM t2 IGNORE INDEX(i2) ORDER BY v1,v2 LIMIT 6;
hex(v1)	comment
NULL	SQL NULL
	zero length value
00	1 zero byte
0000	2 zero bytes
000000	3 zero bytes
00000000	4 zero bytes
DROP TABLE t1;
DROP TABLE t2;
