Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.5.39, 10.0.13
-
None
-
None
Description
Run an new iso-8859-1 terminal window.
For example, in gnome-terminal, do:
Terminal -> Set character encoding -> Western (ISO-8859-1)
Execute this command:
LANG=de_DE.iso88591 ; mysql test <<END
|
SET NAMES binary;
|
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 AS SELECT 'aaaßßß';
|
END
|
Now run a new UTF8 terminal window.
For example, in gnome-terminal, do:
Terminal -> Set character encoding -> Unicode (UTF-8)
Execute this command:
mysql --table test << END
|
SET NAMES utf8;
|
SHOW CREATE TABLE t1;
|
END
|
The output is incorrect:
+-------+---------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+---------------------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`aaa��� ` varbinary(6) NOT NULL DEFAULT ''
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+---------------------------------------------------------------------------------------------------------+
|
Notice, the column name after 'aaa' has replacement characters,
which are printed for invalid sequences.
The desired behavior would be to report an error at CREATE TABLE,
as the supplied name is not a valid UTF-8 string.