mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl mysql-test/extra/binlog_tests/ctype_cp932.test: Auto merged mysql-test/r/ctype_euckr.result: Auto merged mysql-test/r/ctype_sjis.result: Auto merged mysql-test/r/ctype_uca.result: Auto merged mysql-test/r/ctype_ujis.result: Auto merged mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result: Auto merged mysql-test/t/ctype_sjis.test: Auto merged mysql-test/t/ctype_uca.test: Auto merged mysql-test/t/ctype_ujis.test: Auto merged strings/ctype-euc_kr.c: Auto merged strings/ctype-eucjpms.c: Auto merged strings/ctype-gb2312.c: Auto merged strings/ctype-ucs2.c: Auto merged strings/ctype-ujis.c: Auto merged mysql-test/r/ctype_ucs.result: SCCS merged mysql-test/t/ctype_ucs.test: SCCS merged
This commit is contained in:
@ -404,8 +404,10 @@ DROP TABLE t4;
|
||||
|
||||
SET collation_connection='cp932_japanese_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='cp932_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bug#29333 myisam corruption with
|
||||
|
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;
|
@ -124,6 +124,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='big5_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
@ -174,6 +191,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES big5;
|
||||
CREATE TABLE t1 (a text) character set big5;
|
||||
INSERT INTO t1 VALUES ('<27><>');
|
||||
|
@ -9809,6 +9809,23 @@ eucjpms_japanese_ci 6109
|
||||
eucjpms_japanese_ci 61
|
||||
eucjpms_japanese_ci 6120
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='eucjpms_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
@ -9819,6 +9836,23 @@ eucjpms_bin 6109
|
||||
eucjpms_bin 61
|
||||
eucjpms_bin 6120
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
select hex(convert(_eucjpms 0xA5FE41 using ucs2));
|
||||
hex(convert(_eucjpms 0xA5FE41 using ucs2))
|
||||
003F0041
|
||||
|
@ -124,6 +124,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='euckr_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
@ -174,6 +191,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES euckr;
|
||||
CREATE TABLE t1 (a text) character set euckr;
|
||||
INSERT INTO t1 VALUES (0xA2E6),(0xFEF7);
|
||||
|
@ -124,6 +124,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='gb2312_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
@ -174,6 +191,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES gb2312;
|
||||
CREATE TABLE t1 (a text) character set gb2312;
|
||||
INSERT INTO t1 VALUES (0xA2A1),(0xD7FE);
|
||||
|
@ -124,6 +124,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='gbk_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
@ -174,6 +191,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES gbk;
|
||||
CREATE TABLE t1 (a text) character set gbk;
|
||||
INSERT INTO t1 VALUES (0xA3A0),(0xA1A1);
|
||||
|
@ -121,6 +121,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='sjis_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
@ -171,6 +188,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES sjis;
|
||||
SELECT HEX('<27><><EFBFBD><EFBFBD><EFBFBD>@<40>\') FROM DUAL;
|
||||
HEX('<27><><EFBFBD><EFBFBD><EFBFBD>@<40>\')
|
||||
|
@ -2850,5 +2850,22 @@ NULL
|
||||
NULL
|
||||
NULL
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
set names utf8;
|
||||
End for 5.0 tests
|
||||
|
@ -648,6 +648,23 @@ ss
|
||||
u,<2C>
|
||||
ue
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
SET collation_connection='ucs2_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
@ -677,6 +694,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
select hex(substr(_ucs2 0x00e400e50068,1));
|
||||
hex(substr(_ucs2 0x00e400e50068,1))
|
||||
00E400E50068
|
||||
|
@ -2257,6 +2257,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='ujis_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
@ -2307,6 +2324,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
select hex(convert(_ujis 0xA5FE41 using ucs2));
|
||||
hex(convert(_ujis 0xA5FE41 using ucs2))
|
||||
003F0041
|
||||
|
@ -11399,6 +11399,23 @@ cp932_japanese_ci 6109
|
||||
cp932_japanese_ci 61
|
||||
cp932_japanese_ci 6120
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='cp932_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
@ -11409,6 +11426,23 @@ cp932_bin 6109
|
||||
cp932_bin 61
|
||||
cp932_bin 6120
|
||||
drop table t1;
|
||||
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));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
create table t2 (a char(1));
|
||||
insert into t2 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7');
|
||||
insert into t2 values ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F');
|
||||
|
@ -16,10 +16,12 @@ SET collation_connection='big5_chinese_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='big5_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bugs#9357: TEXT columns break string with special word in BIG5 charset.
|
||||
|
@ -361,9 +361,10 @@ DROP TABLE t1;
|
||||
|
||||
SET collation_connection='eucjpms_japanese_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='eucjpms_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bugs#15375: Unassigned multibyte codes are broken
|
||||
|
@ -16,10 +16,12 @@ SET collation_connection='euckr_korean_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='euckr_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bug#15377 Valid multibyte sequences are truncated on INSERT
|
||||
|
@ -16,10 +16,12 @@ SET collation_connection='gb2312_chinese_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='gb2312_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bug#15377 Valid multibyte sequences are truncated on INSERT
|
||||
|
@ -16,10 +16,12 @@ SET collation_connection='gbk_chinese_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='gbk_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bug#11987 mysql will truncate the text when
|
||||
|
@ -68,10 +68,12 @@ SET collation_connection='sjis_japanese_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='sjis_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
# Check parsing of string literals in SJIS with multibyte characters that
|
||||
# have an embedded \ in them. (Bug #8303)
|
||||
|
@ -540,7 +540,8 @@ select * from t1 where a like 'c%';
|
||||
drop table t1;
|
||||
|
||||
set collation_connection=ucs2_unicode_ci;
|
||||
--source include/ctype_regex.inc
|
||||
-- source include/ctype_regex.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
set names utf8;
|
||||
|
||||
-- echo End for 5.0 tests
|
||||
|
@ -374,10 +374,12 @@ SET collation_connection='ucs2_general_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_german.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET NAMES latin1;
|
||||
SET collation_connection='ucs2_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bug#10344 Some string functions fail for UCS2
|
||||
|
@ -1147,10 +1147,12 @@ SET collation_connection='ujis_japanese_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='ujis_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bugs#15375: Unassigned multibyte codes are broken
|
||||
|
Reference in New Issue
Block a user