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

Assertion `index->table->is_instant()' failed upon multi-update on table with WITHOUT OVERLAPS

    XMLWordPrintable

    Details

      Description

      MyISAM version

      CREATE TABLE t1 (a INT) ENGINE=MyISAM;
      INSERT INTO t1 VALUES (0),(NULL),(0);
       
      CREATE TABLE t2 (f INT, s DATE, e DATE, PERIOD FOR p(s,e), UNIQUE(f, p WITHOUT OVERLAPS)) ENGINE=MyISAM;
      INSERT INTO t2 VALUES (NULL,'2026-02-12','2036-09-16'), (NULL,'2025-03-09','2032-12-05');
       
      UPDATE IGNORE t1 JOIN t2 SET f = a;
       
      # Cleanup
      DROP TABLE t1, t2;
      

      10.5 8569dac1

      mysqltest: At line 9: query 'UPDATE IGNORE t1 JOIN t2 SET f = a' failed: 126: Index for table './test/t2.MYI' is corrupt; try to repair it
      

      Aria version

      CREATE TABLE t1 (a INT) ENGINE=Aria;
      INSERT INTO t1 VALUES (0),(NULL),(0);
       
      CREATE TABLE t2 (f INT, s DATE, e DATE, PERIOD FOR p(s,e), UNIQUE(f, p WITHOUT OVERLAPS)) ENGINE=Aria;
      INSERT INTO t2 VALUES (NULL,'2026-02-12','2036-09-16'), (NULL,'2025-03-09','2032-12-05');
       
      UPDATE IGNORE t1 JOIN t2 SET f = a;
       
      # Cleanup
      DROP TABLE t1, t2;
      

      mysqltest: At line 9: query 'UPDATE IGNORE t1 JOIN t2 SET f = a' failed: 1032: Can't find record in 't2'
      

      InnoDB version

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (0),(NULL),(0);
       
      CREATE TABLE t2 (f INT, s DATE, e DATE, PERIOD FOR p(s,e), UNIQUE(f, p WITHOUT OVERLAPS)) ENGINE=InnoDB;
      INSERT INTO t2 VALUES (NULL,'2026-02-12','2036-09-16'), (NULL,'2025-03-09','2032-12-05');
       
      UPDATE IGNORE t1 JOIN t2 SET f = a;
       
      # Cleanup
      DROP TABLE t1, t2;
      

      10.5 8569dac1 debug

      mariadbd: /data/src/10.5/storage/innobase/btr/btr0cur.cc:4137: void btr_cur_upd_rec_in_place(rec_t*, const dict_index_t*, const rec_offs*, const upd_t*, buf_block_t*, mtr_t*): Assertion `index->table->is_instant()' failed.
      200526 13:07:59 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fc046fd7f12 in __GI___assert_fail (assertion=0x55fb9884f972 "index->table->is_instant()", file=0x55fb9884dbf8 "/data/src/10.5/storage/innobase/btr/btr0cur.cc", line=4137, function=0x55fb98854f00 <btr_cur_upd_rec_in_place(unsigned char*, dict_index_t const*, unsigned short const*, upd_t const*, buf_block_t*, mtr_t*)::__PRETTY_FUNCTION__> "void btr_cur_upd_rec_in_place(rec_t*, const dict_index_t*, const rec_offs*, const upd_t*, buf_block_t*, mtr_t*)") at assert.c:101
      #8  0x000055fb9813e5f3 in btr_cur_upd_rec_in_place (rec=0x7fc02c92409d "", index=0x7fc00005bca8, offsets=0x7fc038f54c60, update=0x7fc00005f2d0, block=0x7fc02c02aee0, mtr=0x7fc038f54ec0) at /data/src/10.5/storage/innobase/btr/btr0cur.cc:4137
      #9  0x000055fb9813f933 in btr_cur_update_in_place (flags=2, cursor=0x7fc000062328, offsets=0x7fc038f54c60, update=0x7fc00005f2d0, cmpl_info=0, thr=0x7fc0000624c8, trx_id=50, mtr=0x7fc038f54ec0) at /data/src/10.5/storage/innobase/btr/btr0cur.cc:4317
      #10 0x000055fb98141403 in btr_cur_optimistic_update (flags=2, cursor=0x7fc000062328, offsets=0x7fc038f54b70, heap=0x7fc038f54c10, update=0x7fc00005f2d0, cmpl_info=0, thr=0x7fc0000624c8, trx_id=50, mtr=0x7fc038f54ec0) at /data/src/10.5/storage/innobase/btr/btr0cur.cc:4561
      #11 0x000055fb98076a22 in row_upd_clust_rec (flags=0, node=0x7fc00005f1a8, index=0x7fc00005bca8, offsets=0x7fc038f54c60, offsets_heap=0x7fc038f54c10, thr=0x7fc0000624c8, mtr=0x7fc038f54ec0) at /data/src/10.5/storage/innobase/row/row0upd.cc:2566
      #12 0x000055fb98077cb9 in row_upd_clust_step (node=0x7fc00005f1a8, thr=0x7fc0000624c8) at /data/src/10.5/storage/innobase/row/row0upd.cc:2930
      #13 0x000055fb98078039 in row_upd (node=0x7fc00005f1a8, thr=0x7fc0000624c8) at /data/src/10.5/storage/innobase/row/row0upd.cc:2995
      #14 0x000055fb980785ff in row_upd_step (thr=0x7fc0000624c8) at /data/src/10.5/storage/innobase/row/row0upd.cc:3139
      #15 0x000055fb980196f8 in row_update_for_mysql (prebuilt=0x7fc00005e6d8) at /data/src/10.5/storage/innobase/row/row0mysql.cc:1888
      #16 0x000055fb97e63f05 in ha_innobase::update_row (this=0x7fc0000570b0, old_row=0x7fc00005a038 "\375", new_row=0x7fc00005a028 "\377") at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:8504
      #17 0x000055fb97a18405 in handler::ha_update_row (this=0x7fc0000570b0, old_data=0x7fc00005a038 "\375", new_data=0x7fc00005a028 "\377") at /data/src/10.5/sql/handler.cc:7037
      #18 0x000055fb977d6dc1 in multi_update::send_data (this=0x7fc0000152d0, not_used_values=...) at /data/src/10.5/sql/sql_update.cc:2530
      #19 0x000055fb9774b6b9 in select_result_sink::send_data_with_check (this=0x7fc0000152d0, items=..., u=0x7fc000004b30, sent=4) at /data/src/10.5/sql/sql_class.h:5279
      #20 0x000055fb977325fa in end_send (join=0x7fc0000153a8, join_tab=0x7fc000018468, end_of_records=false) at /data/src/10.5/sql/sql_select.cc:21807
      #21 0x000055fb9772fc8e in evaluate_join_record (join=0x7fc0000153a8, join_tab=0x7fc0000180c0, error=0) at /data/src/10.5/sql/sql_select.cc:20838
      #22 0x000055fb9772f710 in sub_select (join=0x7fc0000153a8, join_tab=0x7fc0000180c0, end_of_records=false) at /data/src/10.5/sql/sql_select.cc:20654
      #23 0x000055fb9772fc8e in evaluate_join_record (join=0x7fc0000153a8, join_tab=0x7fc000017d18, error=0) at /data/src/10.5/sql/sql_select.cc:20838
      #24 0x000055fb9772f710 in sub_select (join=0x7fc0000153a8, join_tab=0x7fc000017d18, end_of_records=false) at /data/src/10.5/sql/sql_select.cc:20654
      #25 0x000055fb9772e9ae in do_select (join=0x7fc0000153a8, procedure=0x0) at /data/src/10.5/sql/sql_select.cc:20149
      #26 0x000055fb97702741 in JOIN::exec_inner (this=0x7fc0000153a8) at /data/src/10.5/sql/sql_select.cc:4464
      #27 0x000055fb9770186d in JOIN::exec (this=0x7fc0000153a8) at /data/src/10.5/sql/sql_select.cc:4245
      #28 0x000055fb97702f9e in mysql_select (thd=0x7fc000000b18, tables=0x7fc000013a48, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2200096997504, result=0x7fc0000152d0, unit=0x7fc000004b30, select_lex=0x7fc000005330) at /data/src/10.5/sql/sql_select.cc:4669
      #29 0x000055fb977d4bef in mysql_multi_update (thd=0x7fc000000b18, table_list=0x7fc000013a48, fields=0x7fc000005480, values=0x7fc0000059f8, conds=0x0, options=0, handle_duplicates=DUP_ERROR, ignore=true, unit=0x7fc000004b30, select_lex=0x7fc000005330, result=0x7fc038f56050) at /data/src/10.5/sql/sql_update.cc:1929
      #30 0x000055fb976b110a in mysql_execute_command (thd=0x7fc000000b18) at /data/src/10.5/sql/sql_parse.cc:4477
      #31 0x000055fb976bcf89 in mysql_parse (thd=0x7fc000000b18, rawbuf=0x7fc000013950 "UPDATE IGNORE t1 JOIN t2 SET f = a", length=34, parser_state=0x7fc038f56520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7991
      #32 0x000055fb976a9335 in dispatch_command (command=COM_QUERY, thd=0x7fc000000b18, packet=0x7fc000171499 "UPDATE IGNORE t1 JOIN t2 SET f = a", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1875
      #33 0x000055fb976a7a6d in do_command (thd=0x7fc000000b18) at /data/src/10.5/sql/sql_parse.cc:1356
      #34 0x000055fb9784b531 in do_handle_one_connection (connect=0x55fb9adaac78, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1411
      #35 0x000055fb9784b299 in handle_one_connection (arg=0x55fb9adaac78) at /data/src/10.5/sql/sql_connect.cc:1313
      #36 0x000055fb97d81da2 in pfs_spawn_thread (arg=0x55fb9adaa8a8) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #37 0x00007fc048f604a4 in start_thread (arg=0x7fc038f57700) at pthread_create.c:456
      #38 0x00007fc047094d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Corruption errors are reproducible on debug and release alike.
      InnoDB failure seems to only affect debug builds.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nikitamalyavin Nikita Malyavin
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: