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

Index count mismatch due to aborted FULLTEXT INDEX

    XMLWordPrintable

    Details

      Description

      origin/10.6 4903031baa196dfc9a75638d141b515883cd254c 2021-03-18T17:05:31+02:00
      Worflow:
      1. Start server and generate some initial data
      2. Two sessions run concurrent a DDL mix
           Session 1 runs random
           CHECK TABLE t1 |
           determine processlist id of session 2; KILL SOFT QUERY processlist id of session 2 ;
           Session 2 runs
           ALTER TABLE t1 ADD FULLTEXT KEY ( col_text ) ;
      At some point of time session 1 runs CHECK TABLE t1 and harvests
          Warning InnoDB: Table test/t1 contains 3 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MariaDB
       
      RQG grammar for illustration
      ---------------------------------------------
      thread1:
          CHECK TABLE t1 |
          COMMIT ; SELECT MIN(processlist_id) INTO @kill_id FROM rqg . rqg_sessions WHERE rqg_id <> _thread_id AND processlist_id IS NOT NULL ; COMMIT ; KILL SOFT QUERY @kill_id ;
      thread1_connect:
          ;
      thread1_init:
          CREATE TABLE t1 ( col1 INT, col_text TEXT ) ENGINE = InnoDB ROW_FORMAT = Dynamic ; ALTER TABLE t1 ADD COLUMN col1_derivate INT GENERATED ALWAYS AS (col1 * 2) ;
      thread2:
          ALTER TABLE t1 ADD FULLTEXT KEY ( col_text ) ;
      thread2_connect:
          REPLACE INTO rqg . rqg_sessions SET rqg_id = _thread_id , processlist_id = CONNECTION_ID(); COMMIT ;   # thread2 publishes his processlist_id
      thread2_init:
          ;
      query:   # Maybe existing but not needed sessions like thread3, thread4 ... just exit
          { exit 0 };
       
      pluto:/data/Results/1616102002/CATCH-001/dev/shm/vardir/1616102002/8/1/rr
      _RR_TRACE_DIR="." rr replay --mark-stdio
      Hint: The rr trace ends with receiving the SIGKILL sent by RQG because of the problem above.
       
      RQG
      ====
      git clone https://github.com/mleich1/rqg --branch experimental RQG
       
      perl rqg.pl \
      --duration=100 \
      --queries=10000000 \
      --no_mask \
      --seed=random \
      --gendata=conf/mariadb/table_stress.zz \
      --gendata_sql=conf/mariadb/table_stress.sql \
      --engine=InnoDB \
      --rpl_mode=none \
      --mysqld=--log-bin \
      --mysqld=--loose-debug_assert_on_not_freed_memory=0 \
      --mysqld=--innodb-buffer-pool-size=24M \
      --mysqld=--loose-idle_write_transaction_timeout=0 \
      --mysqld=--loose-idle_readonly_transaction_timeout=0 \
      --mysqld=--log-output=none \
      --mysqld=--lock-wait-timeout=86400 \
      --mysqld=--loose-idle_transaction_timeout=0 \
      --mysqld=--innodb-lock-wait-timeout=50 \
      --mysqld=--slave_net_timeout=60 \
      --mysqld=--loose_innodb_lock_schedule_algorithm=fcfs \
      --mysqld=--innodb_page_size=64K \
      --mysqld=--loose-table_lock_wait_timeout=50 \
      --mysqld=--net_read_timeout=30 \
      --mysqld=--connect_timeout=60 \
      --mysqld=--innodb_stats_persistent=off \
      --mysqld=--interactive_timeout=28800 \
      --mysqld=--loose-max-statement-time=3 \
      --mysqld=--wait_timeout=28800 \
      --mysqld=--net_write_timeout=60 \
      --mysqld=--plugin-load-add=file_key_management.so \
      --mysqld=--file-key-management-filename=$RQG_HOME/conf/mariadb/encryption_keys.txt \
      --mysqld=--loose_innodb_use_native_aio=0 \
      --mysqld=--log_bin_trust_function_creators=1 \
      --reporters=Backtrace,Deadlock1,ErrorLog \
      --validators=None \
      --threads=3 \
      --grammar=CATCH-001.yy \
      --workdir=<local settings> \
      --vardir=<local settings> \
      --mtr-build-thread=<local settings> \
      --basedir1=<local settings> \
      --script_debug=_nix_ \
      --rr=Extended \
      --rr_options=--chaos
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              thiru Thirunarayanan Balathandayuthapani
              Reporter:
              mleich Matthias Leich
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: