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

[Draft] Atomic DDL is not very atomic on partitioned table

    XMLWordPrintable

    Details

      Description

      # perl ./mtr bug.orphan_partition --mem  --mysqld=--innodb --mysqld=--default-storage-engine=InnoDB --mysqld=--partition  --repeat=40
       
      --disable_abort_on_error
      CREATE TABLE E (pk INTEGER AUTO_INCREMENT,
       col_int_key INTEGER,
       col_varchar_key VARCHAR(1),
       PRIMARY KEY (pk ASC));
      ALTER TABLE E PARTITION BY HASH(pk);
      --let $shutdown_timeout= 0
      --send
      ALTER TABLE E ADD KEY IF NOT EXISTS ord_index_87_1209748 (col_int_key), ALGORITHM=INPLACE;
      --connect (con9_11,localhost,root,,test)
      --source include/restart_mysqld.inc
      CHECK TABLE E;
       
      DROP TABLE E;
      

      10.6 21778b8a

      HECK TABLE E;
      Table	Op	Msg_type	Msg_text
      test.E	check	Warning	InnoDB: Table test/E#P#p0 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MariaDB 
      test.E	check	Warning	InnoDB: Table test/E#P#p0 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MariaDB 
      test.E	check	Warning	InnoDB: Table test/E#P#p0 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MariaDB 
      test.E	check	Warning	InnoDB: Table test/E#P#p0 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MariaDB 
      test.E	check	status	OK
      DROP TABLE E;
      bug.desc6                                [ fail ]  Found warnings/errors in server log file!
              Test ended at 2022-01-25 17:15:39
      line
      2022-01-25 17:15:38 3 [ERROR] InnoDB indexes are inconsistent with what defined in .frm for table ./test/E#P#p0
      2022-01-25 17:15:38 3 [ERROR] InnoDB: Table test/E#P#p0 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the .frm file. See https://mariadb.com/kb/en/innodb-troubleshooting/
      2022-01-25 17:15:38 3 [ERROR] InnoDB could not find key no 1 with name ord_index_87_1209748 from dict cache for table test/E#P#p0
      2022-01-25 17:15:38 3 [ERROR] InnoDB: Table test/E#P#p0 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the .frm file. See https://mariadb.com/kb/en/innodb-troubleshooting/
      2022-01-25 17:15:38 3 [ERROR] InnoDB: Table test/E#P#p0 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the .frm file. See https://mariadb.com/kb/en/innodb-troubleshooting/
      2022-01-25 17:15:38 3 [ERROR] InnoDB could not find key no 1 with name ord_index_87_1209748 from dict cache for table test/E#P#p0
      2022-01-25 17:15:38 3 [ERROR] InnoDB: Table test/E#P#p0 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the .frm file. See https://mariadb.com/kb/en/innodb-troubleshooting/
      {code}
       
      Sometimes the "orphan temporary .par file" issue occurs first
      

      partition 1.0 ACTIVE STORAGE ENGINE 100606.0 NULL NULL Mikael Ronstrom, MySQL AB Partition Storage Engine Helper GPL ON Stable 1.0
      VARIABLE_NAME VARIABLE_VALUE
      DEBUG_SYNC ON - current signal: ''
      +#sql-alter-4086d-7.par

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              elenst Elena Stepanova
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.