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

InnoDB: assertion: node->pcur->rel_pos == BTR_PCUR_ON in row_update_for_mysql

Details

    Description

      --source include/have_innodb.inc
      --source include/have_partition.inc
       
      CREATE TABLE t (a INT KEY) ENGINE=INNODB WITH SYSTEM VERSIONING PARTITION BY KEY() PARTITIONS 3;
      XA START 'a';
      INSERT INTO t VALUES (1),(2),(3),(4),(5),(6),(7),(8);
      SET TIMESTAMP=+1;
      DELETE FROM t;
      INSERT INTO t VALUES (1),(2);
      DELETE FROM t;
      

      Leads to:

      CS 10.11.12 91de54e098b179f033deb1ee61fc3d7d5997f588 (Optimized) Build 10/02/2025

      InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON
      

      CS 10.11.12 91de54e098b179f033deb1ee61fc3d7d5997f588 (Optimized) Build 10/02/2025

      Core was generated by `/test/MD100225-mariadb-10.11.12-linux-x86_64-opt/bin/mariadbd --no-defaults --m'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (Thread 0x14e82c0e86c0 (LWP 2692712))]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x000014e82e84527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000014e82e8288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000055b565d3c029 in ut_dbg_assertion_failed (expr=expr@entry=0x55b5668933e8 "node->pcur->rel_pos == BTR_PCUR_ON", file=file@entry=0x55b566892ee8 "/test/10.11_opt/storage/innobase/row/row0mysql.cc", line=line@entry=1635)at /test/10.11_opt/storage/innobase/ut/ut0dbg.cc:60
      #6  0x000055b565d2e8d8 in row_update_for_mysql (prebuilt=0x14e7d4031fe8)at /test/10.11_opt/storage/innobase/row/row0mysql.cc:1635
      #7  0x000055b5663b6b38 in ha_innobase::delete_row (this=0x14e7d4020918, record=0x14e7d4021918 "\377\002")at /test/10.11_opt/storage/innobase/handler/ha_innodb.cc:8743
      #8  0x000055b56611c9e3 in handler::ha_delete_row (this=0x14e7d4020918, buf=0x14e7d4021918 "\377\002") at /test/10.11_opt/sql/handler.cc:7893
      #9  0x000055b56611c9e3 in handler::ha_delete_row (this=0x14e7d4020068, buf=0x14e7d4021918 "\377\002") at /test/10.11_opt/sql/handler.cc:7893
      #10 0x000055b565e692bd in mysql_delete (thd=thd@entry=0x14e7d4000c68, table_list=<optimized out>, conds=<optimized out>, order_list=order_list@entry=0x14e7d4005890, limit=18446744073709551614, options=<optimized out>, result=<optimized out>)at /test/10.11_opt/sql/sql_delete.cc:867
      #11 0x000055b565eb4a6c in mysql_execute_command (thd=thd@entry=0x14e7d4000c68, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/10.11_opt/sql/sql_limit.h:94
      #12 0x000055b565eb857b in mysql_parse (rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, thd=0x14e7d4000c68)at /test/10.11_opt/sql/sql_parse.cc:8188
      #13 mysql_parse (thd=0x14e7d4000c68, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>)at /test/10.11_opt/sql/sql_parse.cc:8110
      #14 0x000055b565eba782 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14e7d4000c68, packet=packet@entry=0x14e7d4008559 "DELETE FROM t", packet_length=packet_length@entry=13, blocking=blocking@entry=true)at /test/10.11_opt/sql/sql_parse.cc:2004
      #15 0x000055b565ebc468 in do_command (thd=thd@entry=0x14e7d4000c68, blocking=blocking@entry=true) at /test/10.11_opt/sql/sql_parse.cc:1418
      #16 0x000055b565fe18ed in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.11_opt/sql/sql_connect.cc:1386
      #17 0x000055b565fe1bcd in handle_one_connection (arg=0x55b5a049bf48)at /test/10.11_opt/sql/sql_connect.cc:1298
      #18 0x000014e82e89caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #19 0x000014e82e929c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug confirmed present in:
      MariaDB: 10.6.21 (dbg), 10.6.21 (opt), 10.11.12 (dbg), 10.11.12 (opt), 11.4.6 (dbg), 11.4.6 (opt), 11.7.2 (dbg), 11.7.2 (opt), 11.8.0 (dbg), 11.8.0 (opt), 11.8.1 (opt)

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Aleksey Midenkov made transition -
            Open In Progress
            26d 22h 31m 1
            Aleksey Midenkov made transition -
            In Progress In Review
            1d 48m 1
            Sergei Golubchik made transition -
            In Review Stalled
            4d 1h 51m 1
            Aleksey Midenkov made transition -
            Stalled In Progress
            1d 19h 34m 1

            People

              midenok Aleksey Midenkov
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.