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

Assertion `0' failed in row_upd_sec_index_entry & corruption

    XMLWordPrintable

Details

    Description

      SET sql_mode= '';
      CREATE TEMPORARY TABLE t (c INT AUTO_INCREMENT KEY,c2 INT,INDEX idx (c2)) ENGINE=InnoDB;
      CREATE UNIQUE INDEX i1 USING HASH ON t (c ASC);
      INSERT INTO t VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','E0');
      DELETE FROM t;
      

      Leads to:

      10.7.0 52505bf20de0ce77a5c0b0a74af021051987bb0d (Debug)

      2021-08-28 10:55:06 0 [Note] /test/MD160821-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld: ready for connections.
      Version: '10.7.0-MariaDB-debug'  socket: '/test/MD160821-mariadb-10.7.0-linux-x86_64-dbg/socket.sock'  port: 25303  MariaDB Server
      2021-08-28 10:55:09 4 [ERROR] InnoDB: Record in index `i1` of table `data`.`#sql-temptable-3d10e-4-1` was not found on update: TUPLE (info_bits=0, 2 fields): {[8]        (0x00000104000002D0),[4]    (0x80000001)} at: COMPACT RECORD(info_bits=0, 2 fields): {[8]        (0x00000104000002C4),[4]    (0x80000001)}
      mysqld: /test/10.7_dbg/storage/innobase/row/row0upd.cc:2051: dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*): Assertion `0' failed.
      

      10.7.0 52505bf20de0ce77a5c0b0a74af021051987bb0d (Debug)

      mysqld: /test/10.7_dbg/storage/innobase/row/row0upd.cc:2051: dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*): Assertion `0' failed.
      

      10.7.0 52505bf20de0ce77a5c0b0a74af021051987bb0d (Debug)

      Core was generated by `/test/MD160821-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14f400e3d700 (LWP 1962842))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014f4039fb859 in __GI_abort () at abort.c:79
      #2  0x000014f4039fb729 in __assert_fail_base (fmt=0x14f403b91588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5567400ceb6b "0", file=0x5567401a5310 "/test/10.7_dbg/storage/innobase/row/row0upd.cc", line=2051, function=<optimized out>) at assert.c:92
      #3  0x000014f403a0cf36 in __GI___assert_fail (assertion=assertion@entry=0x5567400ceb6b "0", file=file@entry=0x5567401a5310 "/test/10.7_dbg/storage/innobase/row/row0upd.cc", line=line@entry=2051, function=function@entry=0x5567401a66e8 "dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*)") at assert.c:101
      #4  0x000055673fb0a1c1 in row_upd_sec_index_entry (node=node@entry=0x14f3bc02af58, thr=thr@entry=0x14f3bc022b18) at /test/10.7_dbg/storage/innobase/row/row0upd.cc:2051
      #5  0x000055673fb0afcf in row_upd_sec_step (thr=0x14f3bc022b18, node=0x14f3bc02af58) at /test/10.7_dbg/storage/innobase/row/row0upd.cc:2200
      #6  row_upd (thr=0x14f3bc022b18, node=0x14f3bc02af58) at /test/10.7_dbg/storage/innobase/row/row0upd.cc:2936
      #7  row_upd_step (thr=thr@entry=0x14f3bc022b18) at /test/10.7_dbg/storage/innobase/row/row0upd.cc:3051
      #8  0x000055673faafbb3 in row_update_for_mysql (prebuilt=0x14f3bc02a4b8) at /test/10.7_dbg/storage/innobase/row/row0mysql.cc:1740
      #9  0x000055673f938b50 in ha_innobase::delete_row (this=0x14f3bc0297d0, record=0x14f3bc026c28 "\375\001") at /test/10.7_dbg/storage/innobase/handler/ha_innodb.cc:8660
      #10 0x000055673f59e53a in handler::ha_delete_row (this=0x14f3bc0297d0, buf=0x14f3bc026c28 "\375\001") at /test/10.7_dbg/sql/handler.cc:7646
      #11 0x000055673f2347a1 in TABLE::delete_row (this=0x14f3bc026798) at /test/10.7_dbg/sql/sql_delete.cc:281
      #12 0x000055673f2327d3 in mysql_delete (thd=thd@entry=0x14f3bc000db8, table_list=0x14f3bc013d40, conds=<optimized out>, order_list=order_list@entry=0x14f3bc005c00, limit=18446744073709551615, options=<optimized out>, result=<optimized out>) at /test/10.7_dbg/sql/sql_delete.cc:825
      #13 0x000055673f294a26 in mysql_execute_command (thd=thd@entry=0x14f3bc000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_limit.h:83
      #14 0x000055673f27eac3 in mysql_parse (thd=thd@entry=0x14f3bc000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14f400e3c400) at /test/10.7_dbg/sql/sql_parse.cc:8030
      #15 0x000055673f28d6c8 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14f3bc000db8, packet=packet@entry=0x14f3bc00b739 "DELETE FROM t", packet_length=packet_length@entry=13, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1357
      #16 0x000055673f290ae9 in do_command (thd=0x14f3bc000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1404
      #17 0x000055673f406dd6 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x556741e96f38, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
      #18 0x000055673f4073db in handle_one_connection (arg=arg@entry=0x556741e96f38) at /test/10.7_dbg/sql/sql_connect.cc:1312
      #19 0x000055673f86fce4 in pfs_spawn_thread (arg=0x556741dbffe8) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
      #20 0x000014f403f0a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x000014f403af8293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.22 (dbg), 10.5.13 (dbg), 10.6.5 (dbg), 10.7.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (opt), 10.5.13 (opt), 10.6.5 (opt), 10.7.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt)

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              Roel Roel Van de Paar
              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.