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

ER_KEY_NOT_FOUND upon concurrent online auto-increment addition and DELETE

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

            Transition Time In Source Status Execution Times
            Nikita Malyavin made transition -
            Open In Progress
            7d 15h 11m 1
            Nikita Malyavin made transition -
            In Progress Stalled
            2d 7h 5m 1
            Sergei Golubchik made transition -
            In Testing Stalled
            6s 1
            Nikita Malyavin made transition -
            Stalled In Progress
            36d 20h 53m 3
            Nikita Malyavin made transition -
            In Progress In Review
            20d 13h 57m 3
            Sergei Golubchik made transition -
            In Review Stalled
            13d 18h 15m 2
            Nikita Malyavin made transition -
            Stalled In Review
            21h 44m 1
            Sergei Golubchik made transition -
            In Review In Testing
            61d 19h 4m 2
            Sergei Golubchik made transition -
            In Testing Closed
            119d 18h 35m 1

            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.