mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
"like" did not work in some cases with character set big5
This commit is contained in:
4
mysql-test/include/have_big5.inc
Normal file
4
mysql-test/include/have_big5.inc
Normal file
@ -0,0 +1,4 @@
|
||||
-- require r/have_big5.require
|
||||
disable_query_log;
|
||||
show collation like "big5_chinese_ci";
|
||||
enable_query_log;
|
10
mysql-test/r/ctype_big5.result
Normal file
10
mysql-test/r/ctype_big5.result
Normal file
@ -0,0 +1,10 @@
|
||||
drop table if exists t1;
|
||||
SET NAMES big5;
|
||||
CREATE TABLE t1 (c CHAR(10) CHARACTER SET big5, KEY(c));
|
||||
INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa');
|
||||
SELECT * FROM t1 WHERE c LIKE 'aaa%';
|
||||
c
|
||||
aaa
|
||||
aaaa
|
||||
aaaaa
|
||||
DROP TABLE t1;
|
2
mysql-test/r/have_big5.require
Normal file
2
mysql-test/r/have_big5.require
Normal file
@ -0,0 +1,2 @@
|
||||
Collation Charset Id Default Compiled Sortlen
|
||||
big5_chinese_ci big5 1 Yes Yes 1
|
18
mysql-test/t/ctype_big5.test
Normal file
18
mysql-test/t/ctype_big5.test
Normal file
@ -0,0 +1,18 @@
|
||||
-- source include/have_big5.inc
|
||||
|
||||
#
|
||||
# Tests with the big5 character set
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
SET NAMES big5;
|
||||
|
||||
#
|
||||
# Bug 1883: LIKE did not work in some cases with a key.
|
||||
#
|
||||
CREATE TABLE t1 (c CHAR(10) CHARACTER SET big5, KEY(c));
|
||||
INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa');
|
||||
SELECT * FROM t1 WHERE c LIKE 'aaa%';
|
||||
DROP TABLE t1;
|
Reference in New Issue
Block a user