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

Assertion `!strcmp(index->table->name.m_name, "SYS_FOREIGN") || !strcmp(index->table->name.m_name, "SYS_FOREIGN_COLS")' failed in btr_node_ptr_max_size upon reducing column length

    XMLWordPrintable

    Details

      Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (c CHAR(3), KEY(c)) ENGINE=InnoDB;
      INSERT INTO t1 VALUES ('foo');
      ALTER IGNORE TABLE t1 MODIFY c CHAR(0);
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 06e5f28f9

      mysqld: /data/src/10.3/storage/innobase/btr/btr0cur.cc:984: ulint btr_node_ptr_max_size(const dict_index_t*): Assertion `!strcmp(index->table->name.m_name, "SYS_FOREIGN") || !strcmp(index->table->name.m_name, "SYS_FOREIGN_COLS")' failed.
      181123 13:43:13 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fb029844ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000560efe2241cc in btr_node_ptr_max_size (index=0x7fafa02c3758) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:981
      #9  0x0000560efe225399 in btr_cur_search_to_nth_level_func (index=0x7fafa02c3758, level=0, tuple=0x7fafa00ed460, mode=PAGE_CUR_LE, latch_mode=2, cursor=0x7fb01409f160, ahi_latch=0x0, file=0x560efe78b840 "/data/src/10.3/storage/innobase/row/row0ins.cc", line=2982, mtr=0x7fb01409fc70, autoinc=0) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:1352
      #10 0x0000560efe1035e2 in row_ins_sec_index_entry_low (flags=3, mode=2, index=0x7fafa02c3758, offsets_heap=0x7fafa03ec970, heap=0x7fafa022f980, entry=0x7fafa00ed460, trx_id=3106, thr=0x7fafa0337a50, dup_chk_only=false) at /data/src/10.3/storage/innobase/row/row0ins.cc:2982
      #11 0x0000560efe1045df in row_ins_sec_index_entry (index=0x7fafa02c3758, entry=0x7fafa00ed460, thr=0x7fafa0337a50, dup_chk_only=false) at /data/src/10.3/storage/innobase/row/row0ins.cc:3334
      #12 0x0000560efe1047b3 in row_ins_index_entry (index=0x7fafa02c3758, entry=0x7fafa00ed460, thr=0x7fafa0337a50) at /data/src/10.3/storage/innobase/row/row0ins.cc:3380
      #13 0x0000560efe104d5a in row_ins_index_entry_step (node=0x7fafa0337090, thr=0x7fafa0337a50) at /data/src/10.3/storage/innobase/row/row0ins.cc:3528
      #14 0x0000560efe105194 in row_ins (node=0x7fafa0337090, thr=0x7fafa0337a50) at /data/src/10.3/storage/innobase/row/row0ins.cc:3671
      #15 0x0000560efe105999 in row_ins_step (thr=0x7fafa0337a50) at /data/src/10.3/storage/innobase/row/row0ins.cc:3916
      #16 0x0000560efe126198 in row_insert_for_mysql (mysql_rec=0x7fafa032e618 "\375\377\377\375\357\377", prebuilt=0x7fafa0335f98, ins_mode=ROW_INS_NORMAL) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1459
      #17 0x0000560efdfce9f8 in ha_innobase::write_row (this=0x7fafa02e0178, record=0x7fafa032e618 "\375\377\377\375\357\377") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8032
      #18 0x0000560efdcb91a4 in handler::ha_write_row (this=0x7fafa02e0178, buf=0x7fafa032e618 "\375\377\377\375\357\377") at /data/src/10.3/sql/handler.cc:6237
      #19 0x0000560efda9414d in copy_data_between_tables (thd=0x7fafa0000b00, from=0x7fafa03ed270, to=0x7fafa01f3f80, create=..., ignore=false, order_num=0, order=0x0, copied=0x7fb0140a12d0, deleted=0x7fb0140a12d8, keys_onoff=Alter_info::LEAVE_AS_IS, alter_ctx=0x7fb0140a20e0) at /data/src/10.3/sql/sql_table.cc:10446
      #20 0x0000560efda9213e in mysql_alter_table (thd=0x7fafa0000b00, new_db=0x7fafa00051b8, new_name=0x7fafa0005578, create_info=0x7fb0140a2cd0, table_list=0x7fafa0014538, alter_info=0x7fb0140a2c10, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9883
      #21 0x0000560efdb19447 in Sql_cmd_alter_table::execute (this=0x7fafa0014d38, thd=0x7fafa0000b00) at /data/src/10.3/sql/sql_alter.cc:497
      #22 0x0000560efd9bb043 in mysql_execute_command (thd=0x7fafa0000b00) at /data/src/10.3/sql/sql_parse.cc:6283
      #23 0x0000560efd9c0113 in mysql_parse (thd=0x7fafa0000b00, rawbuf=0x7fafa00142e8 "ALTER TABLE `table150_innodb_compressed_int` MODIFY `col_varchar_utf8_unique_default_null` CHAR( 0 ) NULL FIRST /* QNO 2417 CON_ID 18 */", length=136, parser_state=0x7fb0140a4640, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8090
      #24 0x0000560efd9ad2d9 in dispatch_command (command=COM_QUERY, thd=0x7fafa0000b00, packet=0x7fafa000b1e1 "ALTER TABLE `table150_innodb_compressed_int` MODIFY `col_varchar_utf8_unique_default_null` CHAR( 0 ) NULL FIRST /* QNO 2417 CON_ID 18 */", packet_length=136, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1850
      #25 0x0000560efd9abcfd in do_command (thd=0x7fafa0000b00) at /data/src/10.3/sql/sql_parse.cc:1395
      #26 0x0000560efdb139d2 in do_handle_one_connection (connect=0x560f022beb80) at /data/src/10.3/sql/sql_connect.cc:1402
      #27 0x0000560efdb13756 in handle_one_connection (arg=0x560f022beb80) at /data/src/10.3/sql/sql_connect.cc:1308
      #28 0x00007fb02b300494 in start_thread (arg=0x7fb0140a5700) at pthread_create.c:333
      #29 0x00007fb02990193f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible on 10.1.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marko Marko Mäkelä
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: