mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
- Adding big5, cp932, gbk, sjis tests covering characters that can
have 0x5C as the second byte in a multi-byte character. - Adding big5 tests covering an unassigned character 0xC840 being stored into char/varchar/text/enum columns.
This commit is contained in:
parent
86957d414f
commit
50e67fe3bf
9 changed files with 960 additions and 0 deletions
94
mysql-test/include/ctype_E05C.inc
Normal file
94
mysql-test/include/ctype_E05C.inc
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
--echo # Start of ctype_E05C.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# A shared test for character sets big5, cp932, gbk, sjis
|
||||||
|
# They all can have 0x5C as the second byte in a multi-byte character.
|
||||||
|
# 0xE05C is one of such characters.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Checking that the character 0xE05C correctly understands 5C as the second byte
|
||||||
|
# rather than a stand-alone backslash, including the strings that also
|
||||||
|
# have real backslash escapes and/or separator escapes.
|
||||||
|
|
||||||
|
SELECT HEX('à\'),HEX('à\t');
|
||||||
|
SELECT HEX('\\à\'),HEX('\\à\t'),HEX('\\à\t\t');
|
||||||
|
SELECT HEX('''à\'),HEX('à\''');
|
||||||
|
SELECT HEX('\\''à\'),HEX('à\''\\');
|
||||||
|
|
||||||
|
SELECT HEX(BINARY('à\')),HEX(BINARY('à\t'));
|
||||||
|
SELECT HEX(BINARY('\\à\')),HEX(BINARY('\\à\t')),HEX(BINARY('\\à\t\t'));
|
||||||
|
SELECT HEX(BINARY('''à\')),HEX(BINARY('à\'''));
|
||||||
|
SELECT HEX(BINARY('\\''à\')),HEX(BINARY('à\''\\'));
|
||||||
|
|
||||||
|
SELECT HEX(_BINARY'à\'),HEX(_BINARY'à\t');
|
||||||
|
SELECT HEX(_BINARY'\\à\'),HEX(_BINARY'\\à\t'),HEX(_BINARY'\\à\t\t');
|
||||||
|
SELECT HEX(_BINARY'''à\'),HEX(_BINARY'à\''');
|
||||||
|
SELECT HEX(_BINARY'\\''à\'),HEX(_BINARY'à\''\\');
|
||||||
|
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 VALUES ('à\'),('à\t');
|
||||||
|
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES ('''à\'),('à\''');
|
||||||
|
INSERT INTO t1 VALUES ('\\''à\'),('à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES ('à\'),('à\t');
|
||||||
|
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES ('''à\'),('à\''');
|
||||||
|
INSERT INTO t1 VALUES ('\\''à\'),('à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\'''));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\'));
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\'''));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\'));
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\''');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\''');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
# Checking that with character_set_client=binary 0x5C in 0xE05C
|
||||||
|
# is treated as escape rather than the second byte of a multi-byte character,
|
||||||
|
# even if character_set_connection is big5/cp932/gbk/sjis.
|
||||||
|
# Note, the other 0x5C which is before 0xE05C is also treated as escape.
|
||||||
|
#
|
||||||
|
SET character_set_client=binary, character_set_results=binary;
|
||||||
|
SELECT @@character_set_client, @@character_set_connection, @@character_set_results;
|
||||||
|
SELECT HEX('à\['), HEX('\à\[');
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 VALUES ('à\['),('\à\[');
|
||||||
|
SELECT HEX(a) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo # Start of ctype_E05C.inc
|
||||||
|
|
|
@ -4374,6 +4374,253 @@ DROP FUNCTION mysql_real_escape_string_generated;
|
||||||
DROP FUNCTION iswellformed;
|
DROP FUNCTION iswellformed;
|
||||||
DROP TABLE allbytes;
|
DROP TABLE allbytes;
|
||||||
# End of ctype_backslash.inc
|
# End of ctype_backslash.inc
|
||||||
|
SET NAMES big5;
|
||||||
|
# Start of ctype_E05C.inc
|
||||||
|
SELECT HEX('à\'),HEX('à\t');
|
||||||
|
HEX('à\') HEX('à\t')
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX('\\à\'),HEX('\\à\t'),HEX('\\à\t\t');
|
||||||
|
HEX('\\à\') HEX('\\à\t') HEX('\\à\t\t')
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX('''à\'),HEX('à\''');
|
||||||
|
HEX('''à\') HEX('à\''')
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX('\\''à\'),HEX('à\''\\');
|
||||||
|
HEX('\\''à\') HEX('à\''\\')
|
||||||
|
5C27E05C E05C275C
|
||||||
|
SELECT HEX(BINARY('à\')),HEX(BINARY('à\t'));
|
||||||
|
HEX(BINARY('à\')) HEX(BINARY('à\t'))
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX(BINARY('\\à\')),HEX(BINARY('\\à\t')),HEX(BINARY('\\à\t\t'));
|
||||||
|
HEX(BINARY('\\à\')) HEX(BINARY('\\à\t')) HEX(BINARY('\\à\t\t'))
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX(BINARY('''à\')),HEX(BINARY('à\'''));
|
||||||
|
HEX(BINARY('''à\')) HEX(BINARY('à\'''))
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX(BINARY('\\''à\')),HEX(BINARY('à\''\\'));
|
||||||
|
HEX(BINARY('\\''à\')) HEX(BINARY('à\''\\'))
|
||||||
|
5C27E05C E05C275C
|
||||||
|
SELECT HEX(_BINARY'à\'),HEX(_BINARY'à\t');
|
||||||
|
HEX(_BINARY'à\') HEX(_BINARY'à\t')
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX(_BINARY'\\à\'),HEX(_BINARY'\\à\t'),HEX(_BINARY'\\à\t\t');
|
||||||
|
HEX(_BINARY'\\à\') HEX(_BINARY'\\à\t') HEX(_BINARY'\\à\t\t')
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX(_BINARY'''à\'),HEX(_BINARY'à\''');
|
||||||
|
HEX(_BINARY'''à\') HEX(_BINARY'à\''')
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX(_BINARY'\\''à\'),HEX(_BINARY'à\''\\');
|
||||||
|
HEX(_BINARY'\\''à\') HEX(_BINARY'à\''\\')
|
||||||
|
5C27E05C E05C275C
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET big5 NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('à\'),('à\t');
|
||||||
|
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES ('''à\'),('à\''');
|
||||||
|
INSERT INTO t1 VALUES ('\\''à\'),('à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES ('à\'),('à\t');
|
||||||
|
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES ('''à\'),('à\''');
|
||||||
|
INSERT INTO t1 VALUES ('\\''à\'),('à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET big5 NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\'''));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\'));
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\'''));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\'));
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET big5 NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\''');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\''');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET character_set_client=binary, character_set_results=binary;
|
||||||
|
SELECT @@character_set_client, @@character_set_connection, @@character_set_results;
|
||||||
|
@@character_set_client @@character_set_connection @@character_set_results
|
||||||
|
binary big5 binary
|
||||||
|
SELECT HEX('à\['), HEX('\à\[');
|
||||||
|
HEX('à\[') HEX('\à\[')
|
||||||
|
E05B E05B
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET big5 NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('à\['),('\à\[');
|
||||||
|
SELECT HEX(a) FROM t1;
|
||||||
|
HEX(a)
|
||||||
|
E05B
|
||||||
|
E05B
|
||||||
|
DROP TABLE t1;
|
||||||
|
# Start of ctype_E05C.inc
|
||||||
|
SET NAMES big5;
|
||||||
|
CREATE TABLE t1 (a ENUM('È@') CHARACTER SET big5);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` enum('?') CHARACTER SET big5 DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('È@');
|
||||||
|
INSERT INTO t1 VALUES (_big5 0xC840);
|
||||||
|
INSERT INTO t1 VALUES (0xC840);
|
||||||
|
SELECT HEX(a),a FROM t1;
|
||||||
|
HEX(a) a
|
||||||
|
C840 È@
|
||||||
|
C840 È@
|
||||||
|
C840 È@
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET NAMES binary;
|
||||||
|
CREATE TABLE t1 (a ENUM('È@') CHARACTER SET big5);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` enum('?') CHARACTER SET big5 DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('È@');
|
||||||
|
INSERT INTO t1 VALUES (_big5 0xC840);
|
||||||
|
INSERT INTO t1 VALUES (0xC840);
|
||||||
|
SELECT HEX(a),a FROM t1;
|
||||||
|
HEX(a) a
|
||||||
|
C840 È@
|
||||||
|
C840 È@
|
||||||
|
C840 È@
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET NAMES big5;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
c1 CHAR(10) CHARACTER SET big5,
|
||||||
|
c2 VARCHAR(10) CHARACTER SET big5,
|
||||||
|
c3 TEXT CHARACTER SET big5
|
||||||
|
);
|
||||||
|
INSERT INTO t1 VALUES ('È@','È@','È@');
|
||||||
|
INSERT INTO t1 VALUES (_big5 0xC840,_big5 0xC840,_big5 0xC840);
|
||||||
|
INSERT INTO t1 VALUES (0xC840,0xC840,0xC840);
|
||||||
|
SELECT HEX(c1),HEX(c2),HEX(c3) FROM t1;
|
||||||
|
HEX(c1) HEX(c2) HEX(c3)
|
||||||
|
C840 C840 C840
|
||||||
|
C840 C840 C840
|
||||||
|
C840 C840 C840
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET NAMES binary;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
c1 CHAR(10) CHARACTER SET big5,
|
||||||
|
c2 VARCHAR(10) CHARACTER SET big5,
|
||||||
|
c3 TEXT CHARACTER SET big5
|
||||||
|
);
|
||||||
|
INSERT INTO t1 VALUES ('È@','È@','È@');
|
||||||
|
INSERT INTO t1 VALUES (_big5 0xC840,_big5 0xC840,_big5 0xC840);
|
||||||
|
INSERT INTO t1 VALUES (0xC840,0xC840,0xC840);
|
||||||
|
SELECT HEX(c1),HEX(c2),HEX(c3) FROM t1;
|
||||||
|
HEX(c1) HEX(c2) HEX(c3)
|
||||||
|
C840 C840 C840
|
||||||
|
C840 C840 C840
|
||||||
|
C840 C840 C840
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET NAMES binary;
|
||||||
|
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET big5, KEY(a));
|
||||||
|
INSERT INTO t1 VALUES (0xC840),(0xC841),(0xC842);
|
||||||
|
SELECT HEX(a) FROM t1 WHERE a='È@';
|
||||||
|
HEX(a)
|
||||||
|
C840
|
||||||
|
SELECT HEX(a) FROM t1 IGNORE KEY(a) WHERE a='È@';
|
||||||
|
HEX(a)
|
||||||
|
C840
|
||||||
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# End of 10.0 tests
|
# End of 10.0 tests
|
||||||
#
|
#
|
||||||
|
|
|
@ -20060,3 +20060,184 @@ hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0))
|
||||||
#
|
#
|
||||||
# End of 5.6 tests
|
# End of 5.6 tests
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# Start of 10.0 tests
|
||||||
|
#
|
||||||
|
SET NAMES cp932;
|
||||||
|
# Start of ctype_E05C.inc
|
||||||
|
SELECT HEX('à\'),HEX('à\t');
|
||||||
|
HEX('à\') HEX('à\t')
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX('\\à\'),HEX('\\à\t'),HEX('\\à\t\t');
|
||||||
|
HEX('\\à\') HEX('\\à\t') HEX('\\à\t\t')
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX('''à\'),HEX('à\''');
|
||||||
|
HEX('''à\') HEX('à\''')
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX('\\''à\'),HEX('à\''\\');
|
||||||
|
HEX('\\''à\') HEX('à\''\\')
|
||||||
|
5C27E05C E05C275C
|
||||||
|
SELECT HEX(BINARY('à\')),HEX(BINARY('à\t'));
|
||||||
|
HEX(BINARY('à\')) HEX(BINARY('à\t'))
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX(BINARY('\\à\')),HEX(BINARY('\\à\t')),HEX(BINARY('\\à\t\t'));
|
||||||
|
HEX(BINARY('\\à\')) HEX(BINARY('\\à\t')) HEX(BINARY('\\à\t\t'))
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX(BINARY('''à\')),HEX(BINARY('à\'''));
|
||||||
|
HEX(BINARY('''à\')) HEX(BINARY('à\'''))
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX(BINARY('\\''à\')),HEX(BINARY('à\''\\'));
|
||||||
|
HEX(BINARY('\\''à\')) HEX(BINARY('à\''\\'))
|
||||||
|
5C27E05C E05C275C
|
||||||
|
SELECT HEX(_BINARY'à\'),HEX(_BINARY'à\t');
|
||||||
|
HEX(_BINARY'à\') HEX(_BINARY'à\t')
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX(_BINARY'\\à\'),HEX(_BINARY'\\à\t'),HEX(_BINARY'\\à\t\t');
|
||||||
|
HEX(_BINARY'\\à\') HEX(_BINARY'\\à\t') HEX(_BINARY'\\à\t\t')
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX(_BINARY'''à\'),HEX(_BINARY'à\''');
|
||||||
|
HEX(_BINARY'''à\') HEX(_BINARY'à\''')
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX(_BINARY'\\''à\'),HEX(_BINARY'à\''\\');
|
||||||
|
HEX(_BINARY'\\''à\') HEX(_BINARY'à\''\\')
|
||||||
|
5C27E05C E05C275C
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET cp932 NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('à\'),('à\t');
|
||||||
|
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES ('''à\'),('à\''');
|
||||||
|
INSERT INTO t1 VALUES ('\\''à\'),('à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES ('à\'),('à\t');
|
||||||
|
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES ('''à\'),('à\''');
|
||||||
|
INSERT INTO t1 VALUES ('\\''à\'),('à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET cp932 NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\'''));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\'));
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\'''));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\'));
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET cp932 NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\''');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\''');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET character_set_client=binary, character_set_results=binary;
|
||||||
|
SELECT @@character_set_client, @@character_set_connection, @@character_set_results;
|
||||||
|
@@character_set_client @@character_set_connection @@character_set_results
|
||||||
|
binary cp932 binary
|
||||||
|
SELECT HEX('à\['), HEX('\à\[');
|
||||||
|
HEX('à\[') HEX('\à\[')
|
||||||
|
E05B E05B
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET cp932 NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('à\['),('\à\[');
|
||||||
|
SELECT HEX(a) FROM t1;
|
||||||
|
HEX(a)
|
||||||
|
E05B
|
||||||
|
E05B
|
||||||
|
DROP TABLE t1;
|
||||||
|
# Start of ctype_E05C.inc
|
||||||
|
#
|
||||||
|
# End of 10.0 tests
|
||||||
|
#
|
||||||
|
|
|
@ -4748,6 +4748,181 @@ DROP FUNCTION mysql_real_escape_string_generated;
|
||||||
DROP FUNCTION iswellformed;
|
DROP FUNCTION iswellformed;
|
||||||
DROP TABLE allbytes;
|
DROP TABLE allbytes;
|
||||||
# End of ctype_backslash.inc
|
# End of ctype_backslash.inc
|
||||||
|
SET NAMES gbk;
|
||||||
|
# Start of ctype_E05C.inc
|
||||||
|
SELECT HEX('à\'),HEX('à\t');
|
||||||
|
HEX('à\') HEX('à\t')
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX('\\à\'),HEX('\\à\t'),HEX('\\à\t\t');
|
||||||
|
HEX('\\à\') HEX('\\à\t') HEX('\\à\t\t')
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX('''à\'),HEX('à\''');
|
||||||
|
HEX('''à\') HEX('à\''')
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX('\\''à\'),HEX('à\''\\');
|
||||||
|
HEX('\\''à\') HEX('à\''\\')
|
||||||
|
5C27E05C E05C275C
|
||||||
|
SELECT HEX(BINARY('à\')),HEX(BINARY('à\t'));
|
||||||
|
HEX(BINARY('à\')) HEX(BINARY('à\t'))
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX(BINARY('\\à\')),HEX(BINARY('\\à\t')),HEX(BINARY('\\à\t\t'));
|
||||||
|
HEX(BINARY('\\à\')) HEX(BINARY('\\à\t')) HEX(BINARY('\\à\t\t'))
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX(BINARY('''à\')),HEX(BINARY('à\'''));
|
||||||
|
HEX(BINARY('''à\')) HEX(BINARY('à\'''))
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX(BINARY('\\''à\')),HEX(BINARY('à\''\\'));
|
||||||
|
HEX(BINARY('\\''à\')) HEX(BINARY('à\''\\'))
|
||||||
|
5C27E05C E05C275C
|
||||||
|
SELECT HEX(_BINARY'à\'),HEX(_BINARY'à\t');
|
||||||
|
HEX(_BINARY'à\') HEX(_BINARY'à\t')
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX(_BINARY'\\à\'),HEX(_BINARY'\\à\t'),HEX(_BINARY'\\à\t\t');
|
||||||
|
HEX(_BINARY'\\à\') HEX(_BINARY'\\à\t') HEX(_BINARY'\\à\t\t')
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX(_BINARY'''à\'),HEX(_BINARY'à\''');
|
||||||
|
HEX(_BINARY'''à\') HEX(_BINARY'à\''')
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX(_BINARY'\\''à\'),HEX(_BINARY'à\''\\');
|
||||||
|
HEX(_BINARY'\\''à\') HEX(_BINARY'à\''\\')
|
||||||
|
5C27E05C E05C275C
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET gbk NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('à\'),('à\t');
|
||||||
|
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES ('''à\'),('à\''');
|
||||||
|
INSERT INTO t1 VALUES ('\\''à\'),('à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES ('à\'),('à\t');
|
||||||
|
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES ('''à\'),('à\''');
|
||||||
|
INSERT INTO t1 VALUES ('\\''à\'),('à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET gbk NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\'''));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\'));
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\'''));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\'));
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET gbk NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\''');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\''');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET character_set_client=binary, character_set_results=binary;
|
||||||
|
SELECT @@character_set_client, @@character_set_connection, @@character_set_results;
|
||||||
|
@@character_set_client @@character_set_connection @@character_set_results
|
||||||
|
binary gbk binary
|
||||||
|
SELECT HEX('à\['), HEX('\à\[');
|
||||||
|
HEX('à\[') HEX('\à\[')
|
||||||
|
E05B E05B
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET gbk NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('à\['),('\à\[');
|
||||||
|
SELECT HEX(a) FROM t1;
|
||||||
|
HEX(a)
|
||||||
|
E05B
|
||||||
|
E05B
|
||||||
|
DROP TABLE t1;
|
||||||
|
# Start of ctype_E05C.inc
|
||||||
#
|
#
|
||||||
# End of 10.0 tests
|
# End of 10.0 tests
|
||||||
#
|
#
|
||||||
|
|
|
@ -18311,6 +18311,181 @@ DROP FUNCTION mysql_real_escape_string_generated;
|
||||||
DROP FUNCTION iswellformed;
|
DROP FUNCTION iswellformed;
|
||||||
DROP TABLE allbytes;
|
DROP TABLE allbytes;
|
||||||
# End of ctype_backslash.inc
|
# End of ctype_backslash.inc
|
||||||
|
SET NAMES sjis;
|
||||||
|
# Start of ctype_E05C.inc
|
||||||
|
SELECT HEX('à\'),HEX('à\t');
|
||||||
|
HEX('à\') HEX('à\t')
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX('\\à\'),HEX('\\à\t'),HEX('\\à\t\t');
|
||||||
|
HEX('<27>_<EFBFBD>_à\') HEX('<27>_<EFBFBD>_à\t') HEX('<27>_<EFBFBD>_à\t<>_t')
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX('''à\'),HEX('à\''');
|
||||||
|
HEX('''à\') HEX('à\''')
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX('\\''à\'),HEX('à\''\\');
|
||||||
|
HEX('<27>_<EFBFBD>_''à\') HEX('à\''<27>_<EFBFBD>_')
|
||||||
|
5C27E05C E05C275C
|
||||||
|
SELECT HEX(BINARY('à\')),HEX(BINARY('à\t'));
|
||||||
|
HEX(BINARY('à\')) HEX(BINARY('à\t'))
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX(BINARY('\\à\')),HEX(BINARY('\\à\t')),HEX(BINARY('\\à\t\t'));
|
||||||
|
HEX(BINARY('<27>_<EFBFBD>_à\')) HEX(BINARY('<27>_<EFBFBD>_à\t')) HEX(BINARY('<27>_<EFBFBD>_à\t<>_t'))
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX(BINARY('''à\')),HEX(BINARY('à\'''));
|
||||||
|
HEX(BINARY('''à\')) HEX(BINARY('à\'''))
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX(BINARY('\\''à\')),HEX(BINARY('à\''\\'));
|
||||||
|
HEX(BINARY('<27>_<EFBFBD>_''à\')) HEX(BINARY('à\''<27>_<EFBFBD>_'))
|
||||||
|
5C27E05C E05C275C
|
||||||
|
SELECT HEX(_BINARY'à\'),HEX(_BINARY'à\t');
|
||||||
|
HEX(_BINARY'à\') HEX(_BINARY'à\t')
|
||||||
|
E05C E05C74
|
||||||
|
SELECT HEX(_BINARY'\\à\'),HEX(_BINARY'\\à\t'),HEX(_BINARY'\\à\t\t');
|
||||||
|
HEX(_BINARY'<27>_<EFBFBD>_à\') HEX(_BINARY'<27>_<EFBFBD>_à\t') HEX(_BINARY'<27>_<EFBFBD>_à\t<>_t')
|
||||||
|
5CE05C 5CE05C74 5CE05C7409
|
||||||
|
SELECT HEX(_BINARY'''à\'),HEX(_BINARY'à\''');
|
||||||
|
HEX(_BINARY'''à\') HEX(_BINARY'à\''')
|
||||||
|
27E05C E05C27
|
||||||
|
SELECT HEX(_BINARY'\\''à\'),HEX(_BINARY'à\''\\');
|
||||||
|
HEX(_BINARY'<27>_<EFBFBD>_''à\') HEX(_BINARY'à\''<27>_<EFBFBD>_')
|
||||||
|
5C27E05C E05C275C
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET sjis NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('à\'),('à\t');
|
||||||
|
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES ('''à\'),('à\''');
|
||||||
|
INSERT INTO t1 VALUES ('\\''à\'),('à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES ('à\'),('à\t');
|
||||||
|
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES ('''à\'),('à\''');
|
||||||
|
INSERT INTO t1 VALUES ('\\''à\'),('à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET sjis NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\'''));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\'));
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('''à\')),(BINARY('à\'''));
|
||||||
|
INSERT INTO t1 VALUES (BINARY('\\''à\')),(BINARY('à\''\\'));
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET sjis NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\''');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a BLOB);
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'''à\'),(_BINARY'à\''');
|
||||||
|
INSERT INTO t1 VALUES (_BINARY'\\''à\'),(_BINARY'à\''\\');
|
||||||
|
SELECT a, HEX(a) FROM t1;
|
||||||
|
a HEX(a)
|
||||||
|
à\ E05C
|
||||||
|
à\t E05C74
|
||||||
|
\à\ 5CE05C
|
||||||
|
\à\t 5CE05C74
|
||||||
|
\à\t 5CE05C7409
|
||||||
|
'à\ 27E05C
|
||||||
|
à\' E05C27
|
||||||
|
\'à\ 5C27E05C
|
||||||
|
à\'\ E05C275C
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET character_set_client=binary, character_set_results=binary;
|
||||||
|
SELECT @@character_set_client, @@character_set_connection, @@character_set_results;
|
||||||
|
@@character_set_client @@character_set_connection @@character_set_results
|
||||||
|
binary sjis binary
|
||||||
|
SELECT HEX('à\['), HEX('\à\[');
|
||||||
|
HEX('à\[') HEX('\à\[')
|
||||||
|
E05B E05B
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET sjis NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('à\['),('\à\[');
|
||||||
|
SELECT HEX(a) FROM t1;
|
||||||
|
HEX(a)
|
||||||
|
E05B
|
||||||
|
E05B
|
||||||
|
DROP TABLE t1;
|
||||||
|
# Start of ctype_E05C.inc
|
||||||
#
|
#
|
||||||
# End of 10.0 tests
|
# End of 10.0 tests
|
||||||
#
|
#
|
||||||
|
|
|
@ -177,6 +177,73 @@ set collation_connection=big5_bin;
|
||||||
let $ctype_unescape_combinations=selected;
|
let $ctype_unescape_combinations=selected;
|
||||||
--source include/ctype_unescape.inc
|
--source include/ctype_unescape.inc
|
||||||
|
|
||||||
|
--character_set big5
|
||||||
|
SET NAMES big5;
|
||||||
|
--source include/ctype_E05C.inc
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checking unassigned character 0xC840 in an ENUM
|
||||||
|
#
|
||||||
|
|
||||||
|
SET NAMES big5;
|
||||||
|
CREATE TABLE t1 (a ENUM('È@') CHARACTER SET big5);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 VALUES ('È@');
|
||||||
|
INSERT INTO t1 VALUES (_big5 0xC840);
|
||||||
|
INSERT INTO t1 VALUES (0xC840);
|
||||||
|
SELECT HEX(a),a FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
SET NAMES binary;
|
||||||
|
CREATE TABLE t1 (a ENUM('È@') CHARACTER SET big5);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 VALUES ('È@');
|
||||||
|
INSERT INTO t1 VALUES (_big5 0xC840);
|
||||||
|
INSERT INTO t1 VALUES (0xC840);
|
||||||
|
SELECT HEX(a),a FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checking unassigned character in CHAR, VARCHAR, TEXT
|
||||||
|
#
|
||||||
|
|
||||||
|
SET NAMES big5;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
c1 CHAR(10) CHARACTER SET big5,
|
||||||
|
c2 VARCHAR(10) CHARACTER SET big5,
|
||||||
|
c3 TEXT CHARACTER SET big5
|
||||||
|
);
|
||||||
|
INSERT INTO t1 VALUES ('È@','È@','È@');
|
||||||
|
INSERT INTO t1 VALUES (_big5 0xC840,_big5 0xC840,_big5 0xC840);
|
||||||
|
INSERT INTO t1 VALUES (0xC840,0xC840,0xC840);
|
||||||
|
SELECT HEX(c1),HEX(c2),HEX(c3) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
SET NAMES binary;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
c1 CHAR(10) CHARACTER SET big5,
|
||||||
|
c2 VARCHAR(10) CHARACTER SET big5,
|
||||||
|
c3 TEXT CHARACTER SET big5
|
||||||
|
);
|
||||||
|
INSERT INTO t1 VALUES ('È@','È@','È@');
|
||||||
|
INSERT INTO t1 VALUES (_big5 0xC840,_big5 0xC840,_big5 0xC840);
|
||||||
|
INSERT INTO t1 VALUES (0xC840,0xC840,0xC840);
|
||||||
|
SELECT HEX(c1),HEX(c2),HEX(c3) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checking binary->big5 conversion of an unassigned character 0xC840 in optimizer
|
||||||
|
#
|
||||||
|
SET NAMES binary;
|
||||||
|
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET big5, KEY(a));
|
||||||
|
INSERT INTO t1 VALUES (0xC840),(0xC841),(0xC842);
|
||||||
|
SELECT HEX(a) FROM t1 WHERE a='È@';
|
||||||
|
SELECT HEX(a) FROM t1 IGNORE KEY(a) WHERE a='È@';
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.0 tests
|
--echo # End of 10.0 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
|
@ -185,3 +185,14 @@ set collation_connection=cp932_bin;
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 5.6 tests
|
--echo # End of 5.6 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Start of 10.0 tests
|
||||||
|
--echo #
|
||||||
|
SET NAMES cp932;
|
||||||
|
--source include/ctype_E05C.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.0 tests
|
||||||
|
--echo #
|
||||||
|
|
|
@ -195,6 +195,11 @@ set collation_connection=gbk_bin;
|
||||||
let $ctype_unescape_combinations=selected;
|
let $ctype_unescape_combinations=selected;
|
||||||
--source include/ctype_unescape.inc
|
--source include/ctype_unescape.inc
|
||||||
|
|
||||||
|
--character_set gbk
|
||||||
|
SET NAMES gbk;
|
||||||
|
--source include/ctype_E05C.inc
|
||||||
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.0 tests
|
--echo # End of 10.0 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
|
@ -223,6 +223,11 @@ set collation_connection=sjis_bin;
|
||||||
let $ctype_unescape_combinations=selected;
|
let $ctype_unescape_combinations=selected;
|
||||||
--source include/ctype_unescape.inc
|
--source include/ctype_unescape.inc
|
||||||
|
|
||||||
|
--character_set sjis
|
||||||
|
SET NAMES sjis;
|
||||||
|
--source include/ctype_E05C.inc
|
||||||
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.0 tests
|
--echo # End of 10.0 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
Loading…
Add table
Reference in a new issue