Commit 37c3268c authored by Horst.Hunger's avatar Horst.Hunger

Push the test to next-mr-bar2 to let them run in pushbuild.

parent 93287d61
This diff is collapsed.
...@@ -2158,6 +2158,10 @@ u_decimal hex(utf8mb4_encoding) ...@@ -2158,6 +2158,10 @@ u_decimal hex(utf8mb4_encoding)
INSERT INTO t1 VALUES (1114111, x'f5808080'); INSERT INTO t1 VALUES (1114111, x'f5808080');
Warnings: Warnings:
Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1 Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't1' AND column_name= 'utf8mb4_encoding';
character_maximum_length character_octet_length
10 40
DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t2;
CREATE TABLE t2 ( CREATE TABLE t2 (
u_decimal int NOT NULL, u_decimal int NOT NULL,
...@@ -2168,20 +2172,197 @@ INSERT INTO t2 VALUES (65131, x'efb9ab'); ...@@ -2168,20 +2172,197 @@ INSERT INTO t2 VALUES (65131, x'efb9ab');
INSERT INTO t2 VALUES (1114111, x'f48fbfbf'); INSERT INTO t2 VALUES (1114111, x'f48fbfbf');
Warnings: Warnings:
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1 Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't2' AND column_name= 'utf8mb3_encoding';
character_maximum_length character_octet_length
10 30
UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
Warnings:
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
SELECT HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8')) FROM t1;
HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8'))
F09D8480EA9DA8
F09D849EEA9DA8
F09D859EEA9DA8
F09D878FEA9DA8
F09D9C9FEA9DA8
F09D9E9FEA9DA8
F48FBFBFEA9DA8
F3A087AFEA9DA8
F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8
EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9ABEA9DA8
F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8
EA9DA8
SELECT HEX(CONCAT(utf8mb4_encoding, utf8mb3_encoding)) FROM t1,t2;
HEX(CONCAT(utf8mb4_encoding, utf8mb3_encoding))
F09D8480EA9DA8
F09D8480EFB9AB
F09D8480
F09D849EEA9DA8
F09D849EEFB9AB
F09D849E
F09D859EEA9DA8
F09D859EEFB9AB
F09D859E
F09D878FEA9DA8
F09D878FEFB9AB
F09D878F
F09D9C9FEA9DA8
F09D9C9FEFB9AB
F09D9C9F
F09D9E9FEA9DA8
F09D9E9FEFB9AB
F09D9E9F
F48FBFBFEA9DA8
F48FBFBFEFB9AB
F48FBFBF
F3A087AFEA9DA8
F3A087AFEFB9AB
F3A087AF
F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8
F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EFB9AB
F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480
EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9ABEA9DA8
EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9ABEFB9AB
EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB
F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8
F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EFB9AB
F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480
EA9DA8
EFB9AB
SELECT count(*) FROM t1, t2
WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding;
count(*)
33
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x84\x80' for column 'utf8mb4_encoding' at row 1
Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E' for column 'utf8mb4_encoding' at row 2
Warning 1366 Incorrect string value: '\xF0\x9D\x85\x9E' for column 'utf8mb4_encoding' at row 3
Warning 1366 Incorrect string value: '\xF0\x9D\x87\x8F' for column 'utf8mb4_encoding' at row 4
Warning 1366 Incorrect string value: '\xF0\x9D\x9C\x9F' for column 'utf8mb4_encoding' at row 5
Warning 1366 Incorrect string value: '\xF0\x9D\x9E\x9F' for column 'utf8mb4_encoding' at row 6
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb4_encoding' at row 7
Warning 1366 Incorrect string value: '\xF3\xA0\x87\xAF' for column 'utf8mb4_encoding' at row 8
Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column 'utf8mb4_encoding' at row 9
Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column 'utf8mb4_encoding' at row 10
Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column 'utf8mb4_encoding' at row 11
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`u_decimal` int(11) NOT NULL, `u_decimal` int(11) NOT NULL,
`utf8mb4_encoding` varchar(10) NOT NULL `utf8mb4_encoding` varchar(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
SELECT u_decimal,hex(utf8mb4_encoding),utf8mb4_encoding FROM t1;
u_decimal hex(utf8mb4_encoding) utf8mb4_encoding
119040 3F ?
119070 3F ?
119134 3F ?
119247 3F ?
120607 3F ?
120735 3F ?
1114111 3F ?
917999 3F ?
119070 3F3F3F3F3F3F3F3F3F3F ??????????
65131 EFB9AB3F3F3F3F3FEFB9ABEFB9AB3FEFB9AB ﹫?????﹫﹫?﹫
119070 3F3F3F3F3F3F3F3F3F3F ??????????
1114111
ALTER TABLE t2 CONVERT TO CHARACTER SET utf8mb4;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`u_decimal` int(11) NOT NULL,
`utf8mb3_encoding` varchar(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4
SELECT u_decimal,hex(utf8mb3_encoding) FROM t2;
u_decimal hex(utf8mb3_encoding)
42856 EA9DA8
65131 EFB9AB
1114111
ALTER TABLE t2 CONVERT TO CHARACTER SET utf8mb3;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`u_decimal` int(11) NOT NULL, `u_decimal` int(11) NOT NULL,
`utf8mb3_encoding` varchar(10) NOT NULL `utf8mb3_encoding` varchar(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
SELECT u_decimal,hex(utf8mb3_encoding) FROM t2;
u_decimal hex(utf8mb3_encoding)
42856 EA9DA8
65131 EFB9AB
1114111
ALTER TABLE t1 MODIFY utf8mb4_encoding VARCHAR(10) CHARACTER SET utf8mb3;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`u_decimal` int(11) NOT NULL,
`utf8mb4_encoding` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
SELECT u_decimal,hex(utf8mb4_encoding) FROM t1;
u_decimal hex(utf8mb4_encoding)
119040 3F
119070 3F
119134 3F
119247 3F
120607 3F
120735 3F
1114111 3F
917999 3F
119070 3F3F3F3F3F3F3F3F3F3F
65131 EFB9AB3F3F3F3F3FEFB9ABEFB9AB3FEFB9AB
119070 3F3F3F3F3F3F3F3F3F3F
1114111
ALTER TABLE t1 MODIFY utf8mb4_encoding VARCHAR(10) CHARACTER SET utf8mb4;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`u_decimal` int(11) NOT NULL,
`utf8mb4_encoding` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
SELECT u_decimal,hex(utf8mb4_encoding) FROM t1;
u_decimal hex(utf8mb4_encoding)
119040 3F
119070 3F
119134 3F
119247 3F
120607 3F
120735 3F
1114111 3F
917999 3F
119070 3F3F3F3F3F3F3F3F3F3F
65131 EFB9AB3F3F3F3F3FEFB9ABEFB9AB3FEFB9AB
119070 3F3F3F3F3F3F3F3F3F3F
1114111
ALTER TABLE t2 MODIFY utf8mb3_encoding VARCHAR(10) CHARACTER SET utf8mb4;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`u_decimal` int(11) NOT NULL,
`utf8mb3_encoding` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
SELECT u_decimal,hex(utf8mb3_encoding) FROM t2;
u_decimal hex(utf8mb3_encoding)
42856 EA9DA8
65131 EFB9AB
1114111
DROP TABLE IF EXISTS t3;
CREATE TABLE t3 (
u_decimal int NOT NULL,
utf8mb3_encoding VARCHAR(10) NOT NULL
) CHARACTER SET utf8;
INSERT INTO t3 SELECT * FROM t1;
DROP TABLE IF EXISTS t4;
CREATE TABLE t4 (
u_decimal int NOT NULL,
utf8mb4_encoding VARCHAR(10) NOT NULL
) CHARACTER SET utf8mb4;
INSERT INTO t3 SELECT * FROM t2;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;
# #
# Testing that mixing utf8 and utf8mb4 collations returns utf8mb4 # Testing that mixing utf8 and utf8mb4 collations returns utf8mb4
# #
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -1603,6 +1603,8 @@ SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLAT ...@@ -1603,6 +1603,8 @@ SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLAT
# First invalid 4 byte value # First invalid 4 byte value
INSERT INTO t1 VALUES (1114111, x'f5808080'); INSERT INTO t1 VALUES (1114111, x'f5808080');
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't1' AND column_name= 'utf8mb4_encoding';
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t2;
...@@ -1618,11 +1620,84 @@ INSERT INTO t2 VALUES (65131, x'efb9ab'); ...@@ -1618,11 +1620,84 @@ INSERT INTO t2 VALUES (65131, x'efb9ab');
# <Plane 16 Private Use, Last> (last 4 byte character) # <Plane 16 Private Use, Last> (last 4 byte character)
INSERT INTO t2 VALUES (1114111, x'f48fbfbf'); INSERT INTO t2 VALUES (1114111, x'f48fbfbf');
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't2' AND column_name= 'utf8mb3_encoding';
# Update a 3-byte char col with a 4-byte char, error
UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
# Update to a 3-byte char casted to 4-byte, error?
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
# Returns utfmb4
SELECT HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8')) FROM t1;
SELECT HEX(CONCAT(utf8mb4_encoding, utf8mb3_encoding)) FROM t1,t2;
#--error ER_INVALID_CHARACTER_STRING
#SELECT CONCAT(_utf8 utf8mb4_encoding, _utf8 '|') FROM t1;
#--error ER_INVALID_CHARACTER_STRING
#SELECT CONCAT(_utf8mb3 utf8mb4_encoding, _utf8 '|') FROM t1;
SELECT count(*) FROM t1, t2
WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding;
# Alter from 4-byte charset to 3-byte charset, error
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
SHOW CREATE TABLE t1;
SELECT u_decimal,hex(utf8mb4_encoding),utf8mb4_encoding FROM t1;
# Alter table from utf8 to utf8mb4
ALTER TABLE t2 CONVERT TO CHARACTER SET utf8mb4;
SHOW CREATE TABLE t2;
SELECT u_decimal,hex(utf8mb3_encoding) FROM t2;
# Alter table back from utf8mb4 to utf8
ALTER TABLE t2 CONVERT TO CHARACTER SET utf8mb3;
SHOW CREATE TABLE t2;
SELECT u_decimal,hex(utf8mb3_encoding) FROM t2;
# ALter of utf8mb4 column to utf8
ALTER TABLE t1 MODIFY utf8mb4_encoding VARCHAR(10) CHARACTER SET utf8mb3;
SHOW CREATE TABLE t1;
SELECT u_decimal,hex(utf8mb4_encoding) FROM t1;
# ALter of utf8 column to utf8mb4
ALTER TABLE t1 MODIFY utf8mb4_encoding VARCHAR(10) CHARACTER SET utf8mb4;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT u_decimal,hex(utf8mb4_encoding) FROM t1;
# ALter of utf8 column to utf8mb4
ALTER TABLE t2 MODIFY utf8mb3_encoding VARCHAR(10) CHARACTER SET utf8mb4;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
SELECT u_decimal,hex(utf8mb3_encoding) FROM t2;
--disable_warnings
DROP TABLE IF EXISTS t3;
--enable_warnings
CREATE TABLE t3 (
u_decimal int NOT NULL,
utf8mb3_encoding VARCHAR(10) NOT NULL
) CHARACTER SET utf8;
# Insert select utf8mb4 (4-byte) into utf8 (3-byte), error
#--error ER_INVALID_CHARACTER_STRING
INSERT INTO t3 SELECT * FROM t1;
--disable_warnings
DROP TABLE IF EXISTS t4;
--enable_warnings
CREATE TABLE t4 (
u_decimal int NOT NULL,
utf8mb4_encoding VARCHAR(10) NOT NULL
) CHARACTER SET utf8mb4;
# Insert select utf8 (3-byte) into utf8mb4 (4-byte)
INSERT INTO t3 SELECT * FROM t2;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;
--echo # --echo #
--echo # Testing that mixing utf8 and utf8mb4 collations returns utf8mb4 --echo # Testing that mixing utf8 and utf8mb4 collations returns utf8mb4
......
--source include/have_utf8mb4.inc
let $engine= heap;
let $is_heap= 1;
--source include/ctype_utf8mb4.inc
--source include/have_utf8mb4.inc
--source include/have_innodb.inc
let $engine= InnoDB;
--source include/ctype_utf8mb4.inc
--source include/have_utf8mb4.inc
let $engine= MyISAM;
--source include/ctype_utf8mb4.inc
--source include/have_utf8mb4.inc
--source include/have_ndb.inc
let $engine= ndb;
let $is_ndb= 1;
--source include/ctype_utf8mb4.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment