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

Assertion `time.valid(undo->top_undo_no)' fails upon ALTER IGNORE on partitioned table

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      --source include/have_partition.inc
      --source include/have_innodb.inc
       
      CREATE TABLE t (a INT) ENGINE=InnoDB PARTITION BY LIST (a) (PARTITION p0 VALUES IN (1,2), PARTITION pdef DEFAULT);
      INSERT INTO t (a) VALUES (1),(6);
      ALTER IGNORE TABLE t FORCE, ALGORITHM=COPY;
       
      DROP TABLE t;
      

      10.11 e5fed9eaf49419fe81d3695a4323816db1df8e32

      mariadbd: /data/bld/10.11-bug/storage/innobase/trx/trx0rec.cc:2035: dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*): Assertion `time.valid(undo->top_undo_no)' failed.
      260303 13:12:29 [ERROR] /share8t/bld/10.11-bug/sql/mariadbd got signal 6 ;
       
      #8  0x00007f02dc445395 in __assert_fail_base (fmt=0x7f02dc5b9a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55f99cce9fe0 "time.valid(undo->top_undo_no)", file=file@entry=0x55f99cce78a0 "/data/bld/10.11-bug/storage/innobase/trx/trx0rec.cc", line=line@entry=2035, function=function@entry=0x55f99cce9ae0 "dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*)") at ./assert/assert.c:92
      #9  0x00007f02dc453eb2 in __GI___assert_fail (assertion=0x55f99cce9fe0 "time.valid(undo->top_undo_no)", file=0x55f99cce78a0 "/data/bld/10.11-bug/storage/innobase/trx/trx0rec.cc", line=2035, function=0x55f99cce9ae0 "dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*)") at ./assert/assert.c:101
      #10 0x000055f99b5fc969 in trx_undo_report_row_operation (thr=0x620000013860, index=0x616000a63320, clust_entry=0x61700005f020, update=0x0, cmpl_info=0, rec=0x0, offsets=0x0, roll_ptr=0x7f02cc556c20) at /data/bld/10.11-bug/storage/innobase/trx/trx0rec.cc:2035
      #11 0x000055f99b6d7189 in btr_cur_ins_lock_and_undo (flags=0, cursor=0x7f02cc557480, entry=0x61700005f020, thr=0x620000013860, mtr=0x7f02cc557870, inherit=0x7f02cc556db0) at /data/bld/10.11-bug/storage/innobase/btr/btr0cur.cc:2352
      #12 0x000055f99b6d8b3f in btr_cur_optimistic_insert (flags=0, cursor=0x7f02cc557480, offsets=0x7f02cc5573b0, heap=0x7f02cc557390, entry=0x61700005f020, rec=0x7f02cc5573d0, big_rec=0x7f02cc557370, n_ext=0, thr=0x620000013860, mtr=0x7f02cc557870) at /data/bld/10.11-bug/storage/innobase/btr/btr0cur.cc:2579
      #13 0x000055f99b449493 in row_ins_clust_index_entry_low (flags=0, mode=BTR_MODIFY_LEAF, index=0x616000a63320, n_uniq=0, entry=0x61700005f020, n_ext=0, thr=0x620000013860) at /data/bld/10.11-bug/storage/innobase/row/row0ins.cc:2954
      #14 0x000055f99b44bdef in row_ins_clust_index_entry (index=0x616000a63320, entry=0x61700005f020, thr=0x620000013860, n_ext=0) at /data/bld/10.11-bug/storage/innobase/row/row0ins.cc:3357
      #15 0x000055f99b44cac7 in row_ins_index_entry (index=0x616000a63320, entry=0x61700005f020, thr=0x620000013860) at /data/bld/10.11-bug/storage/innobase/row/row0ins.cc:3502
      #16 0x000055f99b44dcec in row_ins_index_entry_step (node=0x6200000135e8, thr=0x620000013860) at /data/bld/10.11-bug/storage/innobase/row/row0ins.cc:3668
      #17 0x000055f99b44e87b in row_ins (node=0x6200000135e8, thr=0x620000013860) at /data/bld/10.11-bug/storage/innobase/row/row0ins.cc:3793
      #18 0x000055f99b44fb79 in row_ins_step (thr=0x620000013860) at /data/bld/10.11-bug/storage/innobase/row/row0ins.cc:3922
      #19 0x000055f99b4a3b19 in row_insert_for_mysql (mysql_rec=0x625000293208 "\375\006", prebuilt=0x620000013120, ins_mode=ROW_INS_NORMAL) at /data/bld/10.11-bug/storage/innobase/row/row0mysql.cc:1301
      #20 0x000055f99afd0d67 in ha_innobase::write_row (this=0x625000292a00, record=0x625000293208 "\375\006") at /data/bld/10.11-bug/storage/innobase/handler/ha_innodb.cc:7777
      #21 0x000055f99a5e71a3 in handler::ha_write_row (this=0x625000292a00, buf=0x625000293208 "\375\006") at /data/bld/10.11-bug/sql/handler.cc:7808
      #22 0x000055f99ad585cb in ha_partition::write_row (this=0x625000291948, buf=0x625000293208 "\375\006") at /data/bld/10.11-bug/sql/ha_partition.cc:4683
      #23 0x000055f99a5e71a3 in handler::ha_write_row (this=0x625000291948, buf=0x625000293208 "\375\006") at /data/bld/10.11-bug/sql/handler.cc:7808
      #24 0x000055f999fbb14e in copy_data_between_tables (thd=0x62c0001f0218, from=0x6190000be098, to=0x6190000c0398, ignore=true, order_num=0, order=0x0, copied=0x7f02cc55a020, deleted=0x7f02cc55a040, alter_info=0x7f02cc55cf20, alter_ctx=0x7f02cc55c060) at /data/bld/10.11-bug/sql/sql_table.cc:12429
      #25 0x000055f999fb3e6d in mysql_alter_table (thd=0x62c0001f0218, new_db=0x62c0001f4fc8, new_name=0x62c0001f5428, create_info=0x7f02cc55d0d0, table_list=0x62d0000a0578, recreate_info=0x7f02cc55ce60, alter_info=0x7f02cc55cf20, order_num=0, order=0x0, ignore=true, if_exists=false) at /data/bld/10.11-bug/sql/sql_table.cc:11597
      #26 0x000055f99a1806d4 in Sql_cmd_alter_table::execute (this=0x62d0000a0cb0, thd=0x62c0001f0218) at /data/bld/10.11-bug/sql/sql_alter.cc:688
      #27 0x000055f999cafacd in mysql_execute_command (thd=0x62c0001f0218, is_called_from_prepared_stmt=false) at /data/bld/10.11-bug/sql/sql_parse.cc:6201
      #28 0x000055f999cbc94c in mysql_parse (thd=0x62c0001f0218, rawbuf=0x62d0000a0438 "ALTER IGNORE TABLE t FORCE, ALGORITHM=COPY", length=42, parser_state=0x7f02cc55ea80) at /data/bld/10.11-bug/sql/sql_parse.cc:8223
      #29 0x000055f999c91d6c in dispatch_command (command=COM_QUERY, thd=0x62c0001f0218, packet=0x62900028a219 "ALTER IGNORE TABLE t FORCE, ALGORITHM=COPY", packet_length=42, blocking=true) at /data/bld/10.11-bug/sql/sql_parse.cc:1924
      #30 0x000055f999c8ea3f in do_command (thd=0x62c0001f0218, blocking=true) at /data/bld/10.11-bug/sql/sql_parse.cc:1434
      #31 0x000055f99a1613cc in do_handle_one_connection (connect=0x6080000155b8, put_in_cache=true) at /data/bld/10.11-bug/sql/sql_connect.cc:1475
      #32 0x000055f99a160f2b in handle_one_connection (arg=0x608000015538) at /data/bld/10.11-bug/sql/sql_connect.cc:1387
      #33 0x000055f99ada15ee in pfs_spawn_thread (arg=0x617000007e98) at /data/bld/10.11-bug/storage/perfschema/pfs.cc:2201
      #34 0x00007f02dc4a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #35 0x00007f02dc52885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this commit in 10.11:

      commit e5fed9eaf49419fe81d3695a4323816db1df8e32 (HEAD)
      Author: Thirunarayanan Balathandayuthapani
      Date:   Thu Feb 26 12:07:23 2026 +0530
       
          MDEV-36436  Assertion "unexpected references" == 0 after ALTER IGNORE TABLE
      

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.