Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
-
None
Description
CREATE TABLE t (a CHAR(8) DEFAULT REVERSE('aha')) CHARACTER SET utf32; |
|
--echo # In MTR
|
SHOW CREATE TABLE t; |
--echo # In the command line client
|
--exec $MYSQL test -e "SHOW CREATE TABLE t"
|
--echo # In mysqldump
|
--exec $MYSQL_DUMP test > $MYSQL_TMP_DIR/1.dump
|
--cat_file $MYSQL_TMP_DIR/1.dump
|
DROP TABLE t; |
In MTR, the output of SHOW CREATE looks all right, but the client and the dump demonstrate the problem:
10.3 92be8d20 |
# In the command line client |
Table Create Table |
t CREATE TABLE `t` (\n `a` char(8) DEFAULT \0\0\0r\0\0\0e\0\0\0v\0\0\0e\0\0\0r\0\0\0s\0\0\0e('aha')\n) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_general_ci |
|
# In mysqldump |
...
|
CREATE TABLE `t` ( |
`a` char(8) DEFAULT ; |
/*!40101 SET character_set_client = @saved_cs_client */; |
Reproducible on all of 10.3-10.11, and 10.2 too; seemingly with any function for a default of a string column.
Attachments
Issue Links
- is duplicated by
-
MDEV-35403 invalid SHOW CREATE TABLE for tables in utf16 charset
- Closed
Reproducible in the command line client:
MariaDB [test]> CREATE OR REPLACE TABLE t (a CHAR(8) DEFAULT REVERSE('aha')) CHARACTER SET utf32;
Query OK, 0 rows affected (6.158 sec)
MariaDB [test]> SHOW CREATE TABLE t;
+-------+---------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------+
| t | CREATE TABLE `t` (
`a` char(8) DEFAULT r e v e r s e('aha')
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_general_ci |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------+