SET @@storage_engine = Falcon;
*** Bug #24511 ***
DROP TABLE IF EXISTS t1;
SET @char32  = '12345678901234567890123456789012';
SET @char128 = concat(@char32, @char32, @char32, @char32);
CREATE TABLE t1 (
a varchar(4) NOT NULL,
b int(11) NOT NULL,
c varchar(8) DEFAULT NULL,
PRIMARY KEY (a, b)
) DEFAULT CHARSET utf8;
INSERT INTO t1 VALUES ('a',    1, '654321');
INSERT INTO t1 VALUES ('bc',   2, '7654321');
INSERT INTO t1 VALUES ('defg', 3, '87654321');
SELECT count(*) FROM t1 WHERE a BETWEEN 'bd' AND 'defgh';
count(*)
1
SELECT count(*) FROM t1 WHERE a BETWEEN '@char128' AND 'a';
count(*)
1
SELECT count(*) FROM t1 WHERE a BETWEEN 'defg' AND 'defghi';
count(*)
1
SELECT count(*) FROM t1 WHERE c BETWEEN '77' and '876543210000';
count(*)
1
DROP TABLE t1;
