Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.1
-
Fix Version/s: 10.1.7
-
Component/s: Virtual Columns
-
Labels:None
-
Sprint:10.1.6-2
Description
DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a DATETIME, b TIMESTAMP AS (TIMESTAMP(a))); SHOW CREATE TABLE t1;
returns:
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | t1 | CREATE TABLE `t1` ( `a` datetime DEFAULT NULL, `b` timestamp AS (timestamp(a)) VIRTUAL NULL ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1 | +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Now if I copy the SHOW ouput and paste it into the client, it returns syntax error:
MariaDB [test]> CREATE TABLE `t1` (`a` datetime DEFAULT NULL, `b` timestamp AS (timestamp(a)) VIRTUAL NULL ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULL ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1' at line 1 MariaDB [test]>
Gliffy Diagrams
Attachments
Issue Links
- blocks
-
MDEV-3929 Add system variable explicit_defaults_for_timestamp for compatibility with MySQL
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
OK to push.