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

Assertion `trid >= info->s->state.create_trid' failed in transid_store_packed and mariadbd: Got error '126 "Index is corrupted"' for './test/t.MAI' on DELETE after LOCK & REPAIR

    XMLWordPrintable

Details

    Description

      # mysqld options required for replay:  --binlog_format=ROW
      CREATE TABLE t (c INT,KEY(c)) ENGINE=Aria;
      INSERT INTO t VALUES (0);
      INSERT INTO t VALUES (0);
      LOCK TABLES t WRITE;
      REPAIR TABLE t;
      DELETE FROM t;
      

      Leads to:

      11.1.0 2b61ff8f2221745f0a96855a0feb0825c426f993 (Optimized)

      2023-04-08 15:44:40 4 [ERROR] mariadbd: Got error '126 "Index is corrupted"' for './test/t.MAI'
      2023-04-08 15:44:40 4 [ERROR] mariadbd: Index for table 't' is corrupt; try to repair it
      

      11.1.0 2b61ff8f2221745f0a96855a0feb0825c426f993 (Debug)

      mariadbd: /test/11.1_dbg/storage/maria/ma_key.c:106: transid_store_packed: Assertion `trid >= info->s->state.create_trid' failed.
      

      11.1.0 2b61ff8f2221745f0a96855a0feb0825c426f993 (Debug)

      Core was generated by `/test/MD070423-mariadb-11.1.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22645416728128)
          at ./nptl/pthread_kill.c:44
      [Current thread is 1 (Thread 0x14988c051640 (LWP 2782741))]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22645416728128) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=22645416728128) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=22645416728128, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  0x00001498a4bdc476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  0x00001498a4bc27f3 in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00001498a4bc271b in __assert_fail_base (fmt=0x1498a4d77150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55c709928700 "trid >= info->s->state.create_trid", file=0x55c7099286d8 "/test/11.1_dbg/storage/maria/ma_key.c", line=106, function=<optimized out>) at ./assert/assert.c:92
      #6  0x00001498a4bd3e96 in __GI___assert_fail (assertion=assertion@entry=0x55c709928700 "trid >= info->s->state.create_trid", file=file@entry=0x55c7099286d8 "/test/11.1_dbg/storage/maria/ma_key.c", line=line@entry=106, function=function@entry=0x55c709928830 <__PRETTY_FUNCTION__.3> "transid_store_packed") at ./assert/assert.c:101
      #7  0x000055c7091314e3 in transid_store_packed (info=info@entry=0x1498140298b8, to=0x14981402e0af "\004", '\245' <repeats 48 times>, "\217\217\217\217\217\217\217\217", '\245' <repeats 32 times>, '\217' <repeats 16 times>, trid=trid@entry=43) at /test/11.1_dbg/storage/maria/ma_key.c:106
      #8  0x000055c709131a75 in _ma_make_key (info=0x1498140298b8, int_key=0x14988c04f990, keynr=<optimized out>, key=0x14981402e0aa "", record=0x149814021628 <incomplete sequence \375>, filepos=256, trid=43) at /test/11.1_dbg/storage/maria/ma_key.c:327
      #9  0x000055c70914b981 in maria_delete (info=0x1498140298b8, record=0x149814021628 <incomplete sequence \375>) at /test/11.1_dbg/storage/maria/ma_delete.c:88
      #10 0x000055c7090f6dd1 in ha_maria::delete_row (this=<optimized out>, buf=<optimized out>) at /test/11.1_dbg/storage/maria/ha_maria.cc:2514
      #11 0x000055c708f06ac3 in handler::ha_delete_row (this=0x149814021a40, buf=0x149814021628 <incomplete sequence \375>) at /test/11.1_dbg/sql/handler.cc:7927
      #12 0x000055c708bdaca9 in TABLE::delete_row (this=this@entry=0x149814021228) at /test/11.1_dbg/sql/sql_delete.cc:284
      #13 0x000055c708bd83f0 in Sql_cmd_delete::delete_from_single_table (this=this@entry=0x149814014098, thd=thd@entry=0x149814000d58) at /test/11.1_dbg/sql/sql_delete.cc:813
      #14 0x000055c708bd9398 in Sql_cmd_delete::execute_inner (this=0x149814014098, thd=0x149814000d58) at /test/11.1_dbg/sql/sql_delete.cc:1784
      #15 0x000055c708c68c80 in Sql_cmd_dml::execute (this=0x149814014098, thd=0x149814000d58) at /test/11.1_dbg/sql/sql_select.cc:32536
      #16 0x000055c708c29b7c in mysql_execute_command (thd=thd@entry=0x149814000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.1_dbg/sql/sql_parse.cc:4393
      #17 0x000055c708c2ef05 in mysql_parse (thd=thd@entry=0x149814000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14988c050230) at /test/11.1_dbg/sql/sql_parse.cc:7760
      #18 0x000055c708c31099 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x149814000d58, packet=packet@entry=0x14981400ae49 "DELETE FROM t", packet_length=packet_length@entry=13, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_class.h:242
      #19 0x000055c708c32ef5 in do_command (thd=0x149814000d58, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
      #20 0x000055c708d84cfc in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55c70c112838, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1416
      #21 0x000055c708d84f5b in handle_one_connection (arg=0x55c70c112838) at /test/11.1_dbg/sql/sql_connect.cc:1318
      #22 0x00001498a4c2eb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #23 0x00001498a4cc0a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Bug confirmed present in:
      MariaDB: 10.4.29 (dbg), 10.4.29 (opt), 10.5.20 (dbg), 10.5.20 (opt), 10.6.13 (dbg), 10.6.13 (opt), 10.7.8 (dbg), 10.7.8 (opt), 10.8.8 (dbg), 10.8.8 (opt), 10.9.6 (dbg), 10.9.6 (opt), 10.10.4 (dbg), 10.10.4 (opt), 10.11.3 (dbg), 10.11.3 (opt), 11.0.2 (dbg), 11.0.2 (opt), 11.1.0 (dbg), 11.1.0 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.40 (dbg), 5.7.40 (opt), 8.0.31 (dbg), 8.0.31 (opt)

      Attachments

        Activity

          People

            monty Michael Widenius
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.