-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Open
Labels
Description
MySQL:
mysql> show create table t1;
+-------+-------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-------------------------------------------------------------------------------------------------------------------+
| t1 | CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-------+-------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> create table t4 select t1.* from t1;
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> show create table t4;
+-------+-------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-------------------------------------------------------------------------------------------------------------------+
| t4 | CREATE TABLE `t4` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-------+-------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
TiDB:
mysql> create table t4 select t1.* from t1;
ERROR 1105 (HY000): line 1 column 22 near " t1.* from t1" (total length 35)
What version of TiDB are you using (tidb-server -V)?
mysql> select tidb_version();
+-----------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-----------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: 0.9.0
Git Commit Hash: a7aaa64c76b5a1e5bb66caf94b888515cc334cf1
Git Branch: master
UTC Build Time: 2017-10-10 08:44:43 |
+-----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
ref https://dev.mysql.com/doc/refman/5.7/en/create-table-select.html
this case is from mysql-test/alias.test
Reactions are currently unavailable