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

Assertion `!field->prefix_len || field->fixed_len == field->prefix_len' failed in btr_node_ptr_max_size and in dict_index_node_ptr_max_size

    XMLWordPrintable

Details

    Description

      USE test;
      CREATE TABLE t(c CHAR(255) CHARACTER SET UTF32, KEY k1(c)) ENGINE=MyISAM;
      INSERT INTO t VALUES(100000);
      ALTER TABLE t ENGINE=InnoDB;
      

      Leads to:

      10.5.4 6877ef9a7c9c7ee55d67e4baaf4e8f7b874c9f89

      mysqld: /test/10.5_dbg/storage/innobase/btr/btr0cur.cc:1099: ulint btr_node_ptr_max_size(const dict_index_t*): Assertion `!field->prefix_len || field->fixed_len == field->prefix_len' failed.
      

      10.5.4 6877ef9a7c9c7ee55d67e4baaf4e8f7b874c9f89

      Core was generated by `/test/MD060620-mariadb-10.5.4-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:57
      [Current thread is 1 (Thread 0x154e9e4c1700 (LWP 3147773))]
      (gdb) bt
      (gdb) (gdb) #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055a4d822000d in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x000055a4d79c9bbc in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x0000154ea6e0f801 in __GI_abort () at abort.c:79
      #6  0x0000154ea6dff39a in __assert_fail_base (fmt=0x154ea6f867d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55a4d86ad5e8 "!field->prefix_len || field->fixed_len == field->prefix_len", file=file@entry=0x55a4d86ad558 "/test/10.5_dbg/storage/innobase/btr/btr0cur.cc", line=line@entry=1099, function=function@entry=0x55a4d86b3960 <btr_node_ptr_max_size(dict_index_t const*)::__PRETTY_FUNCTION__> "ulint btr_node_ptr_max_size(const dict_index_t*)") at assert.c:92
      #7  0x0000154ea6dff412 in __GI___assert_fail (assertion=assertion@entry=0x55a4d86ad5e8 "!field->prefix_len || field->fixed_len == field->prefix_len", file=file@entry=0x55a4d86ad558 "/test/10.5_dbg/storage/innobase/btr/btr0cur.cc", line=line@entry=1099, function=function@entry=0x55a4d86b3960 <btr_node_ptr_max_size(dict_index_t const*)::__PRETTY_FUNCTION__> "ulint btr_node_ptr_max_size(const dict_index_t*)") at assert.c:101
      #8  0x000055a4d8009c76 in btr_node_ptr_max_size (index=index@entry=0x154e864bda18) at /test/10.5_dbg/storage/innobase/btr/btr0cur.cc:1099
      #9  0x000055a4d802284d in btr_cur_search_to_nth_level_func (index=index@entry=0x154e864bda18, level=level@entry=0, tuple=tuple@entry=0x154e864b4930, mode=mode@entry=PAGE_CUR_LE, latch_mode=<optimized out>, latch_mode@entry=514, cursor=cursor@entry=0x154e9e4baf80, ahi_latch=0x0, file=0x55a4d8663680 "/test/10.5_dbg/storage/innobase/row/row0ins.cc", line=2947, mtr=0x154e9e4bb500, autoinc=0) at /test/10.5_dbg/storage/innobase/btr/btr0cur.cc:1524
      #10 0x000055a4d7edc7ee in row_ins_sec_index_entry_low (flags=flags@entry=3, mode=mode@entry=2, index=index@entry=0x154e864bda18, offsets_heap=<optimized out>, offsets_heap@entry=0x154e86457a18, heap=heap@entry=0x154e86458418, entry=entry@entry=0x154e864b4930, trx_id=29, thr=0x154e86558bb0) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:2944
      #11 0x000055a4d7ee2051 in row_ins_sec_index_entry (index=index@entry=0x154e864bda18, entry=entry@entry=0x154e864b4930, thr=thr@entry=0x154e86558bb0, check_foreign=check_foreign@entry=true) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3266
      #12 0x000055a4d7ee3acf in row_ins_index_entry (thr=0x154e86558bb0, entry=0x154e864b4930, index=0x154e864bda18) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3313
      #13 row_ins_index_entry_step (thr=0x154e86558bb0, node=0x154e86558590) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3480
      #14 row_ins (thr=0x154e86558bb0, node=0x154e86558590) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3617
      #15 row_ins_step (thr=thr@entry=0x154e86558bb0) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3756
      #16 0x000055a4d7f039f1 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x154e86525ca0 <incomplete sequence \375>, prebuilt=0x154e86558098, ins_mode=ROW_INS_NORMAL) at /test/10.5_dbg/storage/innobase/row/row0mysql.cc:1461
      #17 0x000055a4d7d9c8d8 in ha_innobase::write_row (this=0x154e865248a0, record=0x154e86525ca0 <incomplete sequence \375>) at /test/10.5_dbg/storage/innobase/handler/ha_innodb.cc:7729
      #18 0x000055a4d79dda26 in handler::ha_write_row (this=0x154e865248a0, buf=0x154e86525ca0 <incomplete sequence \375>) at /test/10.5_dbg/sql/handler.cc:6999
      #19 0x000055a4d77f8025 in copy_data_between_tables (alter_ctx=0x154e9e4be630, keys_onoff=<optimized out>, deleted=<synthetic pointer>, copied=<synthetic pointer>, order=<optimized out>, order_num=0, ignore=false, create=@0x154e9e4be750: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x0, last = 0x0, elements = 0}, <No data fields>}, to=0x154e86557088, from=0x154e864aa088, thd=0x154e86415088) at /test/10.5_dbg/sql/sql_table.cc:11231
      #20 mysql_alter_table (thd=thd@entry=0x154e86415088, new_db=new_db@entry=0x154e86419950, new_name=new_name@entry=0x154e86419d58, create_info=create_info@entry=0x154e9e4bf220, table_list=<optimized out>, table_list@entry=0x154e86474188, alter_info=alter_info@entry=0x154e9e4bf150, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/10.5_dbg/sql/sql_table.cc:10610
      #21 0x000055a4d787a82c in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x154e86415088) at /test/10.5_dbg/sql/sql_alter.cc:532
      #22 0x000055a4d7724a13 in mysql_execute_command (thd=thd@entry=0x154e86415088) at /test/10.5_dbg/sql/sql_parse.cc:5950
      #23 0x000055a4d772c322 in mysql_parse (thd=thd@entry=0x154e86415088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x154e9e4c0350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7992
      #24 0x000055a4d7718e1c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x154e86415088, packet=packet@entry=0x154e86467089 "ALTER TABLE t ENGINE=InnoDB", packet_length=packet_length@entry=27, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1874
      #25 0x000055a4d77175f6 in do_command (thd=0x154e86415088) at /test/10.5_dbg/sql/sql_parse.cc:1355
      #26 0x000055a4d78729f9 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x154e88515808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
      #27 0x000055a4d7873115 in handle_one_connection (arg=arg@entry=0x154e88515808) at /test/10.5_dbg/sql/sql_connect.cc:1313
      #28 0x000055a4d7cd2104 in pfs_spawn_thread (arg=0x154ea5845888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #29 0x0000154ea7af26db in start_thread (arg=0x154e9e4c1700) at pthread_create.c:463
      #30 0x0000154ea6ef088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.33 (dbg), 10.3.24 (dbg), 10.4.14 (dbg), 10.5.4 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (opt), 10.3.24 (opt), 10.4.14 (opt), 10.5.4 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.