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

When the ctas from a big table is interrupted ,then you can't drop or recreate the table!

    XMLWordPrintable

Details

    Description

      MariaDB [lfdb]> create table t5 as select * from t1;
      ^CCtrl-C – query killed. Continuing normally.
      ERROR 1317 (70100): Query execution was interrupted
      MariaDB [lfdb]> create table t5 as select * from t1;
      ERROR 1813 (HY000): Tablespace for table '`lfdb`.`t5`' exists. Please DISCARD the tablespace before IMPORT

      try to delete the tablespace
      [root@19c lfdb]# rm t5.ibd
      rm: remove regular file ‘t5.ibd’? y
      [root@19c lfdb]# ls
      db.opt t1.frm t1.ibd t2.frm t2.ibd t3.frm t3.ibd t4.frm t4.ibd

      try to recreate the table
      MariaDB [lfdb]> truncate table t5;
      ERROR 1146 (42S02): Table 'lfdb.t5' doesn't exist
      MariaDB [lfdb]> create table t5 as select * from t1;
      ERROR 1050 (42S01): Table '`lfdb`.`t5`' already exists
      MariaDB [lfdb]> drop table t5;
      ERROR 1051 (42S02): Unknown table 'lfdb.t5'

      why? and how do i fix this?
      Thanks.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              oilz oilz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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