Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
-
None
Description
With sjis for a client character set (maybe with others, too), an empty default value of a binary column, which is usually a line of zero-characters, shows some garbage instead, and thus an attempt to re-create the table using the displayed CREATE TABLE fails with ER_INVALID_DEFAULT.
10.3 92be8d20 |
MariaDB [test]> create table t (a binary default ''); |
Query OK, 0 rows affected (0.044 sec) |
|
MariaDB [test]> set names sjis; |
Query OK, 0 rows affected (0.000 sec) |
|
MariaDB [test]> show create table t; |
+-------+-------------------------------------------------------------------------------------------------------------------+ |
| Table | Create Table | |
+-------+-------------------------------------------------------------------------------------------------------------------+ |
| t | CREATE TABLE `t` ( |
`a` binary(1) DEFAULT '�_0' |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci | |
+-------+-------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.000 sec) |
|
MariaDB [test]> set names utf8; |
Query OK, 0 rows affected (0.000 sec) |
|
MariaDB [test]> show create table t; |
+-------+------------------------------------------------------------------------------------------------------------------+ |
| Table | Create Table | |
+-------+------------------------------------------------------------------------------------------------------------------+ |
| t | CREATE TABLE `t` ( |
`a` binary(1) DEFAULT '\0' |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci | |
+-------+------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.001 sec) |