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

Assertion `0' failed in row_upd_sec_index_entry on DELETE

    XMLWordPrintable

Details

    Description

      Similar to, but not the same, as MDEV-28190/MDEV-26453. Different versions and testcase.

      # mysqld options required for replay: --log-bin 
      CREATE TABLE t0 (c0 YEAR UNIQUE) ENGINE=InnoDB;
      SET unique_checks=0,foreign_key_checks=0,autocommit=0;
      INSERT INTO t0 VALUES (0),(0),(0),(0),(0),(0),(0);
      DELETE FROM t0;
      

      Leads to:

      10.9.0 5be92887c2caacb45af87b1131db952ce627e83a (Debug)

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

      10.9.0 5be92887c2caacb45af87b1131db952ce627e83a (Debug)

      Core was generated by `/test/MD160322-mariadb-10.9.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 0x15171c1b3700 (LWP 4043152))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000151738873859 in __GI_abort () at abort.c:79
      #2  0x0000151738873729 in __assert_fail_base (fmt=0x151738a09588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55c04b2271e7 "0", file=0x55c04b315380 "/test/10.9_dbg/storage/innobase/row/row0upd.cc", line=2050, function=<optimized out>) at assert.c:92
      #3  0x0000151738885006 in __GI___assert_fail (assertion=assertion@entry=0x55c04b2271e7 "0", file=file@entry=0x55c04b315380 "/test/10.9_dbg/storage/innobase/row/row0upd.cc", line=line@entry=2050, function=function@entry=0x55c04b316768 "dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*)") at assert.c:101
      #4  0x000055c04ac36866 in row_upd_sec_index_entry (node=node@entry=0x1516c403c878, thr=thr@entry=0x1516c4082818) at /test/10.9_dbg/storage/innobase/row/row0upd.cc:2050
      #5  0x000055c04ac3763e in row_upd_sec_step (thr=0x1516c4082818, node=0x1516c403c878) at /test/10.9_dbg/storage/innobase/row/row0upd.cc:2199
      #6  row_upd (thr=0x1516c4082818, node=0x1516c403c878) at /test/10.9_dbg/storage/innobase/row/row0upd.cc:2936
      #7  row_upd_step (thr=thr@entry=0x1516c4082818) at /test/10.9_dbg/storage/innobase/row/row0upd.cc:3051
      #8  0x000055c04abde359 in row_update_for_mysql (prebuilt=0x1516c403be88) at /test/10.9_dbg/storage/innobase/row/row0mysql.cc:1700
      #9  0x000055c04aa46944 in ha_innobase::delete_row (this=0x1516c403b620, record=0x1516c403b198 <incomplete sequence \375>) at /test/10.9_dbg/storage/innobase/handler/ha_innodb.cc:8673
      #10 0x000055c04a6b1176 in handler::ha_delete_row (this=0x1516c403b620, buf=0x1516c403b198 <incomplete sequence \375>) at /test/10.9_dbg/sql/handler.cc:7659
      #11 0x000055c04a338afd in TABLE::delete_row (this=0x1516c4025288) at /test/10.9_dbg/sql/sql_delete.cc:281
      #12 0x000055c04a336a6d in mysql_delete (thd=thd@entry=0x1516c4000db8, table_list=0x1516c4013fc0, conds=<optimized out>, order_list=order_list@entry=0x1516c4005ca8, limit=18446744073709551615, options=<optimized out>, result=<optimized out>) at /test/10.9_dbg/sql/sql_delete.cc:834
      #13 0x000055c04a399589 in mysql_execute_command (thd=thd@entry=0x1516c4000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_limit.h:85
      #14 0x000055c04a383437 in mysql_parse (thd=thd@entry=0x1516c4000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x15171c1b2400) at /test/10.9_dbg/sql/sql_parse.cc:8027
      #15 0x000055c04a3920d3 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1516c4000db8, packet=packet@entry=0x1516c400b9a9 "DELETE FROM t0", packet_length=packet_length@entry=14, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1362
      #16 0x000055c04a39551a in do_command (thd=0x1516c4000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1402
      #17 0x000055c04a510228 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55c04d11c198, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
      #18 0x000055c04a51082d in handle_one_connection (arg=arg@entry=0x55c04d11c198) at /test/10.9_dbg/sql/sql_connect.cc:1312
      #19 0x000055c04a996f23 in pfs_spawn_thread (arg=0x55c04d0304c8) at /test/10.9_dbg/storage/perfschema/pfs.cc:2201
      #20 0x0000151738d84609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x0000151738970163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.9.0 5be92887c2caacb45af87b1131db952ce627e83a (Debug)

      2022-04-04 19:50:50 0 [Note] /test/MD160322-mariadb-10.9.0-linux-x86_64-dbg/bin/mysqld: ready for connections.
      Version: '10.9.0-MariaDB-debug-log'  socket: '/test/MD160322-mariadb-10.9.0-linux-x86_64-dbg/socket.sock'  port: 10908  MariaDB Server
      2022-04-04 19:50:52 5 [ERROR] InnoDB: Record in index `c0` of table `test`.`t0` was not found on update: TUPLE (info_bits=0, 2 fields): {[1] (0x00),[6]      (0x000000000200)} at: COMPACT RECORD(info_bits=0, 1 fields): {[8]infimum (0x696E66696D756D00)}
      mysqld: /test/10.9_dbg/storage/innobase/row/row0upd.cc:2050: dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*): Assertion `0' failed.
      

      Bug confirmed present in:
      MariaDB: 10.7.4 (dbg), 10.8.3 (dbg), 10.9.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (dbg), 10.3.35 (opt), 10.4.25 (dbg), 10.4.25 (opt), 10.5.16 (dbg), 10.5.16 (opt), 10.6.8 (dbg), 10.6.8 (opt), 10.7.4 (opt), 10.8.3 (opt), 10.9.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.37 (dbg), 5.7.37 (opt), 8.0.28 (dbg), 8.0.28 (opt)

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.