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

Non-debug failing assertion node->pcur->rel_pos == BTR_PCUR_ON upon violating long unique under READ-COMMITTED

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      --source include/have_partition.inc
      --source include/have_innodb.inc
       
      SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
       
      CREATE TABLE t (id INT, f BLOB, UNIQUE(id,f)) ENGINE=InnoDB PARTITION BY KEY(id) PARTITIONS 2;
      INSERT INTO t VALUES (1,'foo'),(2,'foo');
      UPDATE IGNORE t SET id = 2;
       
      DROP TABLE t;
      

      bb-10.6-release 390d2b466b2f717ab6c463cedbfa58a214fb1b74

      2025-07-24 23:53:54 0x7f286bd236c0  InnoDB: Assertion failure in file /data/bld/bb-10.6-release/storage/innobase/row/row0mysql.cc line 1641
      InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON
       
      #8  0x0000563b67223b39 in ut_dbg_assertion_failed (expr=0x563b687213a0 "node->pcur->rel_pos == BTR_PCUR_ON", file=0x563b6871f320 "/data/bld/bb-10.6-release/storage/innobase/row/row0mysql.cc", line=1641) at /data/bld/bb-10.6-release/storage/innobase/ut/ut0dbg.cc:60
      #9  0x0000563b67071b00 in row_update_for_mysql (prebuilt=0x620000011120) at /data/bld/bb-10.6-release/storage/innobase/row/row0mysql.cc:1641
      #10 0x0000563b66bfeddd in ha_innobase::delete_row (this=0x625000286230, record=0x625000286a38 "\370\002") at /data/bld/bb-10.6-release/storage/innobase/handler/ha_innodb.cc:8766
      #11 0x0000563b661a5f9e in handler::ha_delete_row (this=0x625000286230, buf=0x625000286a38 "\370\002") at /data/bld/bb-10.6-release/sql/handler.cc:7944
      #12 0x0000563b6697ae0e in ha_partition::update_row (this=0x625000285148, old_data=0x625000286a38 "\370\002", new_data=0x625000286a50 "\370\001") at /data/bld/bb-10.6-release/sql/ha_partition.cc:4766
      #13 0x0000563b661a43bf in handler::ha_update_row (this=0x625000285148, old_data=0x625000286a50 "\370\001", new_data=0x625000286a38 "\370\002") at /data/bld/bb-10.6-release/sql/handler.cc:7865
      #14 0x0000563b65c10929 in mysql_update (thd=0x62b0000bd218, table_list=0x62d0000a0558, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, ignore=true, found_return=0x7f286bd20ea0, updated_return=0x7f286bd20ec0) at /data/bld/bb-10.6-release/sql/sql_update.cc:1110
      #15 0x0000563b658d3043 in mysql_execute_command (thd=0x62b0000bd218, is_called_from_prepared_stmt=false) at /data/bld/bb-10.6-release/sql/sql_parse.cc:4477
      #16 0x0000563b658ecd8e in mysql_parse (thd=0x62b0000bd218, rawbuf=0x62d0000a0438 "UPDATE IGNORE t SET id = 2", length=26, parser_state=0x7f286bd21a90) at /data/bld/bb-10.6-release/sql/sql_parse.cc:8200
      #17 0x0000563b658c21d7 in dispatch_command (command=COM_QUERY, thd=0x62b0000bd218, packet=0x629000276219 "UPDATE IGNORE t SET id = 2", packet_length=26, blocking=true) at /data/bld/bb-10.6-release/sql/sql_parse.cc:1908
      #18 0x0000563b658bef0b in do_command (thd=0x62b0000bd218, blocking=true) at /data/bld/bb-10.6-release/sql/sql_parse.cc:1421
      #19 0x0000563b65d448b9 in do_handle_one_connection (connect=0x6080000189b8, put_in_cache=true) at /data/bld/bb-10.6-release/sql/sql_connect.cc:1386
      #20 0x0000563b65d44418 in handle_one_connection (arg=0x608000018938) at /data/bld/bb-10.6-release/sql/sql_connect.cc:1298
      #21 0x0000563b669c2d88 in pfs_spawn_thread (arg=0x617000007e98) at /data/bld/bb-10.6-release/storage/perfschema/pfs.cc:2201
      #22 0x00007f287a8a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #23 0x00007f287a92885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this commit in 10.6:

      commit 9703c90712f33014b9f222c08e272e898937a1bb
      Author: Sergei Golubchik
      Date:   Fri Jul 11 15:49:53 2025 +0200
       
          MDEV-37199 UNIQUE KEY USING HASH accepting duplicate records
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              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.