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

FusionIO: Failure to create a table with ATOMIC_WRITES option leaves the database in inconsistent state

    XMLWordPrintable

Details

    Description

      If table creation fails due to an atomic_write-related problem, the failed CREATE statement leaves an orphan .ibd file behind, which is not easy to get rid of, apart from removing it from the file system:

      MariaDB [test]> create table t1 (i int) engine=InnoDB atomic_writes=off;
      ERROR 1005 (HY000): Can't create table `test`.`t1` (errno: -1 "Internal error < 0 (Not system error)")
      MariaDB [test]> system ls -l data/test/
      -rw-rw---- 1 elenst elenst 0 Apr 11 01:48 t1.ibd
      MariaDB [test]> show tables;
      Empty set (0.00 sec)
       
      MariaDB [test]> create table t1 (i int);
      ERROR 1813 (HY000): Tablespace for table '`test`.`t1`' exists. Please DISCARD the tablespace before IMPORT.
      MariaDB [test]> alter table t1 discard tablespace;
      ERROR 1146 (42S02): Table 'test.t1' doesn't exist

      Attachments

        Activity

          People

            jplindst Jan Lindström (Inactive)
            elenst Elena Stepanova
            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.