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

Assertion `index->table->is_temporary() || !page_is_leaf(block->frame) || !!(index)->is_primary()' failed.

    XMLWordPrintable

    Details

      Description

      CREATE TEMPORARY TABLE t1 (c1 INT,c2 VARCHAR(3), INDEX (c1)) ENGINE=InnoDB;
      CREATE TABLE t1 (c1 INT, c2 VARCHAR(3), KEY(c1,c2)) ENGINE=InnoDB;
      DROP TABLE t1;
      SET debug_dbug='+d,do_page_reorganize,do_lock_reverse_page_reorganize';
      INSERT INTO t1 VALUES(1, 1), (2, 2);
      

      Leads to:

      10.6.0 8dd35a2507f8d63ca8df9335d2c6072d5c0e3b86 (Debug)

      mysqld: /test/10.6_dbg/storage/innobase/btr/btr0btr.cc:1425: void btr_page_reorganize_low(page_cur_t*, dict_index_t*, mtr_t*): Assertion `index->table->is_temporary() || !page_is_leaf(block->frame) || !!(index)->is_primary()' failed.
      

      10.6.0 8dd35a2507f8d63ca8df9335d2c6072d5c0e3b86 (Debug)

      Core was generated by `/test/MD160321-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x152c1814d700 (LWP 526214))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000559256416d0b in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x0000559255bae313 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:331
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000152c1aefb859 in __GI_abort () at abort.c:79
      #6  0x0000152c1aefb729 in __assert_fail_base (fmt=0x152c1b091588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x559256834210 "index->table->is_temporary() || !page_is_leaf(block->frame) || !!(index)->is_primary()", file=0x559256833040 "/test/10.6_dbg/storage/innobase/btr/btr0btr.cc", line=1425, function=<optimized out>) at assert.c:92
      #7  0x0000152c1af0cf36 in __GI___assert_fail (assertion=assertion@entry=0x559256834210 "index->table->is_temporary() || !page_is_leaf(block->frame) || !!(index)->is_primary()", file=file@entry=0x559256833040 "/test/10.6_dbg/storage/innobase/btr/btr0btr.cc", line=line@entry=1425, function=function@entry=0x559256834090 "void btr_page_reorganize_low(page_cur_t*, dict_index_t*, mtr_t*)") at assert.c:101
      #8  0x0000559256205936 in btr_page_reorganize_low (cursor=cursor@entry=0x152c1814a438, index=index@entry=0x152bc8028628, mtr=mtr@entry=0x152c1814a9b0) at /test/10.6_dbg/storage/innobase/include/dict0mem.h:1158
      #9  0x00005592562069b5 in btr_page_reorganize (cursor=cursor@entry=0x152c1814a438, index=index@entry=0x152bc8028628, mtr=mtr@entry=0x152c1814a9b0) at /test/10.6_dbg/storage/innobase/btr/btr0btr.cc:1653
      #10 0x000055925622e9b4 in btr_cur_optimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x152c1814a430, offsets=offsets@entry=0x152c1814a388, heap=heap@entry=0x152c1814a378, entry=entry@entry=0x152bc80257b8, rec=rec@entry=0x152c1814a3e0, big_rec=0x152c1814a4d0, n_ext=<optimized out>, thr=0x152bc802a648, mtr=0x152c1814a9b0) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3517
      #11 0x000055925610b70b in row_ins_sec_index_entry_low (flags=flags@entry=0, mode=mode@entry=2, index=index@entry=0x152bc8028628, offsets_heap=<optimized out>, offsets_heap@entry=0x152bc8070078, heap=heap@entry=0x152bc8070518, entry=entry@entry=0x152bc80257b8, trx_id=0, thr=0x152bc802a648) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3135
      #12 0x000055925610bf0e in row_ins_sec_index_entry (index=index@entry=0x152bc8028628, entry=entry@entry=0x152bc80257b8, thr=thr@entry=0x152bc802a648, check_foreign=check_foreign@entry=true) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3336
      #13 0x000055925610db09 in row_ins_index_entry (thr=0x152bc802a648, entry=0x152bc80257b8, index=0x152bc8028628) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3383
      #14 row_ins_index_entry_step (thr=0x152bc802a648, node=0x152bc802a408) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3550
      #15 row_ins (thr=0x152bc802a648, node=0x152bc802a408) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3696
      #16 row_ins_step (thr=thr@entry=0x152bc802a648) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3838
      #17 0x00005592561322f0 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x152bc80240f8 "\374\001", prebuilt=0x152bc8029ed8, ins_mode=ROW_INS_NORMAL) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:1381
      #18 0x0000559255fb55cc in ha_innobase::write_row (this=0x152bc8029680, record=0x152bc80240f8 "\374\001") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7355
      #19 0x0000559255bc2057 in handler::ha_write_row (this=0x152bc8029680, buf=0x152bc80240f8 "\374\001") at /test/10.6_dbg/sql/handler.cc:7155
      #20 0x00005592558a08c0 in write_record (thd=thd@entry=0x152bc8000db8, table=table@entry=0x152bc8020288, info=info@entry=0x152c1814bd10, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2106
      #21 0x00005592558ac162 in mysql_insert (thd=thd@entry=0x152bc8000db8, table_list=0x152bc8013c90, fields=@0x152bc8005e58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x559256ec2240 <end_of_list>, last = 0x152bc8005e58, elements = 0}, <No data fields>}, values_list=@0x152bc8005ea0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152bc8014968, last = 0x152bc8014af0, elements = 2}, <No data fields>}, update_fields=@0x152bc8005e88: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x559256ec2240 <end_of_list>, last = 0x152bc8005e88, elements = 0}, <No data fields>}, update_values=@0x152bc8005e70: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x559256ec2240 <end_of_list>, last = 0x152bc8005e70, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1099
      #22 0x00005592558f2973 in mysql_execute_command (thd=thd@entry=0x152bc8000db8) at /test/10.6_dbg/sql/sql_parse.cc:4545
      #23 0x00005592558dd876 in mysql_parse (thd=thd@entry=0x152bc8000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152c1814c410) at /test/10.6_dbg/sql/sql_parse.cc:7998
      #24 0x00005592558ec1e7 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152bc8000db8, packet=packet@entry=0x152bc800b359 "INSERT INTO t1 VALUES(1, 1), (2, 2)", packet_length=packet_length@entry=35, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1318
      #25 0x00005592558ef5c1 in do_command (thd=0x152bc8000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1397
      #26 0x0000559255a47178 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5592591825c8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #27 0x0000559255a4777d in handle_one_connection (arg=arg@entry=0x5592591825c8) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #28 0x0000559255ef2a5b in pfs_spawn_thread (arg=0x5592590cad98) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #29 0x0000152c1b409609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #30 0x0000152c1aff8293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.38 (dbg), 10.3.29 (dbg), 10.4.19 (dbg), 10.5.10 (dbg), 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (opt), 10.3.29 (opt), 10.4.19 (opt), 10.5.10 (opt), 10.6.0 (opt)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.