mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
This commit is contained in:
25
mysql-test/include/ctype_like_range_f1f2.inc
Normal file
25
mysql-test/include/ctype_like_range_f1f2.inc
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# Bug#32510 LIKE search fails with indexed 'eucjpms' and 'ujis' char column
|
||||
#
|
||||
# Testing my_ctype_like_range_xxx
|
||||
# (used in LIKE optimization for an indexed column)
|
||||
#
|
||||
|
||||
# Create table using @@character_set_connection and @@collation_connection
|
||||
# for the string columns.
|
||||
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
|
||||
# Check pattern (important for ucs2, utf16, utf32)
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
|
||||
--echo 3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
DROP TABLE t1;
|
Reference in New Issue
Block a user