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

Concurrent DML and REPAIR leads to replication failure

    XMLWordPrintable

Details

    Description

      git clone https://github.com/MariaDB/randgen --branch mdev38599 rqg-mdev38599
      cd rqg-mdev38599
      . ./mdev38599.cmd <basedir>
      

      It fails for me within seconds with

      11.8

      2026-01-19 21:31:50 7 [ERROR] mysqld: Can't find record in 't'
      2026-01-19 21:31:50 7 [ERROR] Slave SQL: Could not execute Delete_rows_v1 event on table test.t; Can't find record in 't', Error_code: 1032; handler error HA_ERR
      _END_OF_FILE; the event's master log mysql-bin.000001, end_log_pos 0, Gtid 0-1001-83, Internal MariaDB error code: 1032
      2026-01-19 21:31:50 7 [Warning] Slave: Can't find record in 't' Error_code: 1032
      

      The actual command line within the .cmd file is

      perl ./run.pl --base-port=17000 --basedir=$basedir --duration=200 --grammar=mdev38599.yy --mysqld=--innodb-lock-wait-timeout=2 --mysqld=--lock-wait-timeout=4 --mysqld=--log-bin --mysqld=--max-statement-time=6 --scenario=Replication --threads=4 --vardir=/dev/shm/var-mdev38599 --seed=1768603409 --nometadata-reload
      

      For purposes of post-fix retesting, the command line can be run with --trials=N as an extra command-line option.

      The grammar is

      query_init:
        CREATE TABLE IF NOT EXISTS test.t (a INT) ENGINE=InnoDB ;
       
      query:
        ==FACTOR:2== INSERT INTO test.t VALUES (_int),(_int),(_int),(_int) |
        DELETE FROM test.t ORDER BY a LIMIT _digit
      ;
       
      thread1:
        REPAIR TABLE test.t;
      

      The failure happens easily on 11.5+, but not on 11.4. I think it was introduced by MDEV-33449, but didn't bisect to confirm.
      The test is rr-able.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.