|
A simpler script (without system variables) reproducing the same problem:
SET NAMES utf8;
|
DROP DATABASE IF EXISTS test_big5;
|
CREATE DATABASE test_big5 DEFAULT CHARACTER SET big5;
|
CREATE TABLE test_big5.t (c1 BLOB);
|
ALTER TABLE test_big5.t ADD c2 CHAR(30) CHARACTER SET latin1 DEFAULT CONCAT ('ß');
|
|
|
Even simpler test, without a separate database:
USE test;
|
SET NAMES utf8;
|
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (c1 BLOB) DEFAULT CHARACTER SET big5;
|
ALTER TABLE t1 ADD c2 CHAR(30) CHARACTER SET latin1 DEFAULT CONCAT ('ß');
|
|
|
A related problem:
SET NAMES utf8;
|
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (c1 BLOB, c2 CHAR(30) CHARACTER SET latin1 DEFAULT CONCAT (_utf8mb3'ß')) DEFAULT CHARACTER SET big5;
|
SHOW CREATE TABLE t1;
|
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`c1` blob DEFAULT NULL,
|
`c2` char(30) CHARACTER SET latin1 DEFAULT concat(_utf8mb3'xC3x83xC5xB8')
|
) ENGINE=InnoDB DEFAULT CHARSET=big5 |
|
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
Notice, the default value in c2 in the SHOW CREATE output is wrong.
But the inserted default value looks correct:
INSERT INTO t1 VALUES ();
|
SELECT * FROM t1;
|
+------+------+
|
| c1 | c2 |
|
+------+------+
|
| NULL | ß |
|
+------+------+
|
|
|
Another probably related problem:
CREATE TABLE t (
|
a enum('foo','bar') CHARACTER SET utf32,
|
b enum('foo','bar') CHARACTER SET utf8mb3
|
);
|
ALTER TABLE t CONVERT TO CHARACTER SET utf8mb3;
|
|
# Cleanup
|
DROP TABLE t;
|
|
10.4 b54e4bf0
|
query 'ALTER TABLE t CONVERT TO CHARACTER SET utf8mb3' failed: 1033: Incorrect information in file: './test/#sql-32ff38_4.frm'
|
|