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

ER_KEY_NOT_FOUND upon concurrent online auto-increment addition and DELETE

    XMLWordPrintable

Details

    Description

      --source include/have_debug_sync.inc
      --source include/have_innodb.inc
       
      create table t1 (a int) engine=InnoDB;
      insert into t1 values (10),(20),(30);
      --send
        set debug_sync= 'now wait_for downgraded';
       
      --connect (con_alter,localhost,root,,test)
      set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
      --send
        alter table t1 add pk int auto_increment primary key, algorithm=copy, lock=none;
       
      --connection default
      --reap
      delete from t1 where a = 20;
      set debug_sync= 'now signal goforit';
       
      --connection con_alter
      --reap
      select * from t1;
      show create table t1;
       
      # Cleanup
      drop table t1;
      set debug_sync= reset;
      

      ALTER fails with:

      bb-10.10-MDEV-16329 49ad87590

      mysqltest: At line 20: query 'reap' failed: ER_KEY_NOT_FOUND (1032): Can't find record in 't1'
      

      For a side note, in the client the error gets scrambled reliably (at least for me), like this:

      MariaDB [test]> alter table t1 add pk int auto_increment primary key, algorithm=copy, lock=none;
      ERROR 1032 (HY000): Can't find record in 't1'e done
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              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.