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

Crash in ALTER TABLE…AUTO_INCREMENT=1 after DISCARD TABLESPACE

    XMLWordPrintable

    Details

      Description

      MariaDB 10.0 or 10.1 are not affected; they would report an error. But MariaDB 10.2 will crash if AUTO_INCREMENT is being set on a table whose data file has been discarded:

      --source include/have_innodb.inc
      CREATE TABLE t1(a SERIAL)ENGINE=InnoDB;
      INSERT INTO t1 VALUES(1),(2),(3);
      ALTER TABLE t1 DISCARD TABLESPACE;
      --error ER_TABLESPACE_DISCARDED
      ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=INPLACE;
      --error ER_TABLESPACE_DISCARDED
      ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=COPY;
      DROP TABLE t1;
      

      This bug was introduced somewhere in MySQL 5.7, which was merged to MariaDB 10.2.2.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: