Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
13.1
-
None
-
Not for Release Notes
Description
CREATE TABLE t1 (a VARCHAR DEFAULT 'x'); |
# shows `a` text DEFAULT '' , but expected DEFAULT 'x' in CREATE TABLE statement |
SHOW CREATE TABLE t1; |
INSERT INTO t1 () VALUES (); |
# returns '' , 0 , but expected result set is 'x' , 1 |
SELECT a, LENGTH(a) FROM t1; |
DROP TABLE t1; |
13.0.1-opt>CREATE TABLE t1 (a VARCHAR DEFAULT 'x'); |
Query OK, 0 rows affected (0.012 sec) |
|
|
13.0.1-opt>SHOW CREATE TABLE t1\G |
*************************** 1. row ***************************
|
Table: t1 |
Create Table: CREATE TABLE `t1` ( |
`a` text DEFAULT '' |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci |
1 row in set (0.000 sec) |
|
|
13.0.1-opt>INSERT INTO t1 () VALUES (); |
Query OK, 1 row affected (0.002 sec)
|
|
|
13.0.1-opt>SELECT a, LENGTH(a) FROM t1; |
+------+-----------+ |
| a | LENGTH(a) |
|
+------+-----------+ |
| | 0 |
|
+------+-----------+ |
1 row in set (0.000 sec) |
|
|
13.0.1-opt>DROP TABLE t1; |
Query OK, 0 rows affected (0.007 sec) |
|
|
13.0.1-opt>
|
Attachments
Issue Links
- is caused by
-
MDEV-31414 Implement optional lengths for string types
-
- In Testing
-