Details
Description
MariaDB [test]> CREATE TABLE tab (c INT) ENGINE = InnoDB; Query OK, 0 rows affected (0.43 sec) MariaDB [test]> CREATE TEMPORARY TABLE tab LIKE tab; ERROR 1066 (42000): Not unique table/alias: 'tab'
I suppose that this error should only appear if I omit the TEMPORARY keyword, or if a temporary table with that name already exists. In this case, the old table and the new table are distinct entities...
Gliffy Diagrams
Attachments
Issue Links
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
I agree that it looks weird, especially since CREATE TEMPORARY TABLE tab AS SELECT * FROM tab works, although I suppose there is an explanation for this, since it's an upstream issue that has survived so long. Do you want to file one at bugs.mysql.com and see what they say?