Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.8
-
None
-
None
Description
TABLE_SHARE::init_from_sql_statement_string calls promote_first_timestamp_column unconditionally; CREATE TABLE only when explicit_defaults_for_timestamp is OFF. Suite sql_discovery:
--source inc.inc
|
SELECT @@explicit_defaults_for_timestamp; |
CREATE TABLE t1 (ts TIMESTAMP NOT NULL); |
SHOW CREATE TABLE t1; |
SET test_sql_discovery_statement='t2:CREATE TABLE t2 (ts TIMESTAMP NOT NULL)'; |
SHOW CREATE TABLE t2; |
DROP TABLE t1, t2; |
Result (11.8.9):
SELECT @@explicit_defaults_for_timestamp;
|
@@explicit_defaults_for_timestamp
|
1
|
CREATE TABLE t1 (ts TIMESTAMP NOT NULL);
|
SHOW CREATE TABLE t1;
|
Table Create Table
|
t1 CREATE TABLE `t1` (
|
`ts` timestamp NOT NULL
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
SET test_sql_discovery_statement='t2:CREATE TABLE t2 (ts TIMESTAMP NOT NULL)';
|
SHOW CREATE TABLE t2;
|
Table Create Table
|
t2 CREATE TABLE `t2` (
|
`ts` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
|
) ENGINE=TEST_SQL_DISCOVERY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
DROP TABLE t1, t2;
|
Attachments
Issue Links
- relates to
-
MDEV-28632 Change default of explicit_defaults_for_timestamp to ON
-
- Closed
-
-
MDEV-29227 deprecate explicit_defaults_for_timestamp=0
-
- Closed
-