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

Assertion `index->table->instant' failed in btr_pcur_store_position

    XMLWordPrintable

    Details

      Description

      Split from MDEV-22714:

      I cannot get the testcase to repeat at the command prompt, however I have been able to reduce is using the C-API/pquery to the following;

      # mysqld options that were in use during reduction: --sql_mode=ONLY_FULL_GROUP_BY --performance-schema --performance-schema-instrument='%=on' --default-tmp-storage-engine=MyISAM --innodb_file_per_table=1 --innodb_flush_method=O_DIRECT
      USE test;
      CREATE TABLE t1(a BIGINT UNSIGNED) ENGINE=InnoDB;
      set global innodb_limit_optimistic_insert_debug = 2;
      INSERT INTO t1 VALUES(12979);
      ALTER TABLE t1 algorithm=inplace, ADD f DECIMAL(5,2);
      insert into t1 values (5175,'abcdefghijklmnopqrstuvwxyz');
      DELETE FROM t1;
      SELECT HEX(a), HEX(@a:=CONVERT(a USING utf8mb4)), HEX(CONVERT(@a USING utf16le)) FROM t1; ;
      

      10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03

      mysqld: /test/10.4_dbg/storage/innobase/btr/btr0pcur.cc:154: void btr_pcur_store_position(btr_pcur_t*, mtr_t*): Assertion `index->table->instant' failed.
      

      10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03

      Core was generated by `/test/MD110820-mariadb-10.4.15-linux-x86_64-dbg/bin/mysqld --no-defaults --max_'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x14d82c06d700 (LWP 1089182))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055943ec758a6 in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:482
      #2  0x000055943e3f1cdc in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x000014d834a778b1 in __GI_abort () at abort.c:79
      #6  0x000014d834a6742a in __assert_fail_base (fmt=0x14d834beea38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55943ef93086 "index->table->instant", file=file@entry=0x55943efe8838 "/test/10.4_dbg/storage/innobase/btr/btr0pcur.cc", line=line@entry=154, function=function@entry=0x55943efe9e00 <btr_pcur_store_position(btr_pcur_t*, mtr_t*)::__PRETTY_FUNCTION__> "void btr_pcur_store_position(btr_pcur_t*, mtr_t*)") at assert.c:92
      #7  0x000014d834a674a2 in __GI___assert_fail (assertion=assertion@entry=0x55943ef93086 "index->table->instant", file=file@entry=0x55943efe8838 "/test/10.4_dbg/storage/innobase/btr/btr0pcur.cc", line=line@entry=154, function=function@entry=0x55943efe9e00 <btr_pcur_store_position(btr_pcur_t*, mtr_t*)::__PRETTY_FUNCTION__> "void btr_pcur_store_position(btr_pcur_t*, mtr_t*)") at assert.c:101
      #8  0x000055943e8d646f in btr_pcur_store_position (cursor=cursor@entry=0x14d7c43ae988, mtr=mtr@entry=0x14d82c069430) at /test/10.4_dbg/storage/innobase/btr/btr0pcur.cc:154
      #9  0x000055943e7eccf3 in row_search_mvcc (buf=buf@entry=0x14d7c4433650 "\377", mode=mode@entry=PAGE_CUR_G, prebuilt=0x14d7c43ae7c0, match_mode=match_mode@entry=0, direction=direction@entry=0) at /test/10.4_dbg/storage/innobase/row/row0sel.cc:5632
      #10 0x000055943e6304f4 in ha_innobase::index_read (this=this@entry=0x14d7c4432358, buf=buf@entry=0x14d7c4433650 "\377", key_ptr=key_ptr@entry=0x0, key_len=key_len@entry=0, find_flag=find_flag@entry=HA_READ_AFTER_KEY) at /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:9214
      #11 0x000055943e630772 in ha_innobase::index_first (this=this@entry=0x14d7c4432358, buf=buf@entry=0x14d7c4433650 "\377") at /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:9588
      #12 0x000055943e6307f3 in ha_innobase::rnd_next (this=0x14d7c4432358, buf=0x14d7c4433650 "\377") at /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:9681
      #13 0x000055943e3f95d7 in handler::ha_rnd_next (this=0x14d7c4432358, buf=0x14d7c4433650 "\377") at /test/10.4_dbg/sql/handler.cc:2862
      #14 0x000055943e58f634 in rr_sequential (info=0x14d7c4015768) at /test/10.4_dbg/sql/records.cc:485
      #15 0x000055943e19f94a in READ_RECORD::read_record (this=0x14d7c4015768) at /test/10.4_dbg/sql/records.h:70
      #16 join_init_read_record (tab=0x14d7c40156a0) at /test/10.4_dbg/sql/sql_select.cc:21342
      #17 0x000055943e189eeb in sub_select (join=0x14d7c40142c0, join_tab=0x14d7c40156a0, end_of_records=<optimized out>) at /test/10.4_dbg/sql/sql_select.cc:20397
      #18 0x000055943e1bba70 in do_select (procedure=0x0, join=0x14d7c40142c0) at /test/10.4_dbg/sql/sql_select.cc:19938
      #19 JOIN::exec_inner (this=this@entry=0x14d7c40142c0) at /test/10.4_dbg/sql/sql_select.cc:4473
      #20 0x000055943e1bc04d in JOIN::exec (this=this@entry=0x14d7c40142c0) at /test/10.4_dbg/sql/sql_select.cc:4255
      #21 0x000055943e1ba3f3 in mysql_select (thd=thd@entry=0x14d7c4000d50, tables=<optimized out>, wild_num=0, fields=@0x14d7c4012398: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14d7c4012908, last = 0x14d7c4013240, elements = 3}, <No data fields>}, conds=0x0, og_num=<optimized out>, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2148803328, result=0x14d7c4014298, unit=0x14d7c4004c78, select_lex=0x14d7c4012250) at /test/10.4_dbg/sql/sql_select.cc:4687
      #22 0x000055943e1ba71e in handle_select (thd=thd@entry=0x14d7c4000d50, lex=lex@entry=0x14d7c4004bb8, result=result@entry=0x14d7c4014298, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.4_dbg/sql/sql_select.cc:410
      #23 0x000055943e1333c6 in execute_sqlcom_select (thd=thd@entry=0x14d7c4000d50, all_tables=0x14d7c40132e8) at /test/10.4_dbg/sql/sql_parse.cc:6355
      #24 0x000055943e13e79a in mysql_execute_command (thd=thd@entry=0x14d7c4000d50) at /test/10.4_dbg/sql/sql_parse.cc:3889
      #25 0x000055943e149090 in mysql_parse (thd=thd@entry=0x14d7c4000d50, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14d82c06c470, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7896
      #26 0x000055943e14b920 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d7c4000d50, packet=packet@entry=0x14d7c401a4b1 "", packet_length=packet_length@entry=90, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:1834
      #27 0x000055943e14f35b in do_command (thd=0x14d7c4000d50) at /test/10.4_dbg/sql/sql_parse.cc:1352
      #28 0x000055943e27b8b6 in do_handle_one_connection (connect=connect@entry=0x55944187a4f0) at /test/10.4_dbg/sql/sql_connect.cc:1412
      #29 0x000055943e27b9d6 in handle_one_connection (arg=arg@entry=0x55944187a4f0) at /test/10.4_dbg/sql/sql_connect.cc:1316
      #30 0x000055943eb88898 in pfs_spawn_thread (arg=0x5594417874f0) at /test/10.4_dbg/storage/perfschema/pfs.cc:1869
      #31 0x000014d8359de6db in start_thread (arg=0x14d82c06d700) at pthread_create.c:463
      #32 0x000014d834b58a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      This in turn may be connected to the other `innodb_limit_optimistic_insert_debug` bugs out there.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration