Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-37188

CREATE TEMPORARY TABLE LIKE reports "not unique table/alias"

    XMLWordPrintable

Details

    Description

      MariaDB [test]> CREATE OR REPLACE TABLE x (x INT);
      Query OK, 0 rows affected (0.024 sec)
       
      MariaDB [test]> CREATE TEMPORARY TABLE x LIKE x;
      ERROR 1066 (42000): Not unique table/alias: 'x'
      

      Do not confuse with error 1050 (Table already exists), which doesn't apply in this case because a temporary table can have the same name as a base table. Error 1066 is about invalid syntax.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            f_razzoli Federico Razzoli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.