Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL)
-
None
-
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]>
|