[Bug]: Show Create table Result Error #16179
Labels
kind/bug
Something isn't working
resolved/v1.2.1
severity/s0
Extreme impact: Cause the application to break down and seriously affect the use
Milestone
Is there an existing issue for the same bug?
Branch Name
main, 1.2-dev
Commit ID
9571a73
Other Environment Information
Actual Behavior
mysql> CREATE TABLE t (
-> id INT PRIMARY KEY,
-> a VARCHAR(30) NULL default 'foo',
-> b VARCHAR(30) NOT NULL default 'foo',
-> c INT NULL DEFAULT 1000,
-> d INT NOT NULL DEFAULT 2000
-> );
Query OK, 0 rows affected (0.35 sec)
mysql> show create table t;
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t | CREATE TABLE
t
(id
INT NOT NULL,a
VARCHAR(30) DEFAULT 'foo',b
VARCHAR(30) DEFAULT 'foo',c
INT DEFAULT 1000,d
INT DEFAULT 2000,PRIMARY KEY (
id
)) |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Note: MO execute of
show create table
lost table columnnot null
constraint informationExpected Behavior
mysql> CREATE TABLE t (
-> id INT PRIMARY KEY,
-> a VARCHAR(30) NULL default 'foo',
-> b VARCHAR(30) NOT NULL default 'foo',
-> c INT NULL DEFAULT 1000,
-> d INT NOT NULL DEFAULT 2000
-> );
Query OK, 0 rows affected (0.00 sec)
mysql> show create table t;
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t | CREATE TABLE
t
(id
int NOT NULL,a
varchar(30) DEFAULT 'foo',b
varchar(30) NOT NULL DEFAULT 'foo',c
int DEFAULT '1000',d
int NOT NULL DEFAULT '2000',PRIMARY KEY (
id
)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Steps to Reproduce
Additional information
No response
The text was updated successfully, but these errors were encountered: