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

Assertion `info.length < field->field_length' failed in bool is_part_of_a_key_prefix(const Field_longstr*)

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (a CHAR CHARACTER SET utf16,INDEX a (a)) ENGINE=INNODB;
      SET STATEMENT sql_mode='' FOR ALTER TABLE t MODIFY a TINYTEXT CHARACTER SET utf8;
      ALTER TABLE t MODIFY a TINYTEXT CHARACTER SET utf8mb4;
      

      Leads to:

      10.8.0 1e8bcbd0a0bfa07052e9458830672ea215c8664a (Debug)

      mysqld: /test/10.8_dbg/storage/innobase/handler/ha_innodb.cc:20446: bool is_part_of_a_key_prefix(const Field_longstr*): Assertion `info.length < field->field_length' failed.
      

      10.8.0 1e8bcbd0a0bfa07052e9458830672ea215c8664a (Debug)

      Core was generated by `/test/MD091221-mariadb-10.8.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14d300b5d700 (LWP 2409179))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014d30372b859 in __GI_abort () at abort.c:79
      #2  0x000014d30372b729 in __assert_fail_base (fmt=0x14d3038c1588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55ab77a06348 "info.length < field->field_length", file=0x55ab77a06370 "/test/10.8_dbg/storage/innobase/handler/ha_innodb.cc", line=20446, function=<optimized out>) at assert.c:92
      #3  0x000014d30373cf36 in __GI___assert_fail (assertion=assertion@entry=0x55ab77a06348 "info.length < field->field_length", file=file@entry=0x55ab77a06370 "/test/10.8_dbg/storage/innobase/handler/ha_innodb.cc", line=line@entry=20446, function=function@entry=0x55ab77a063a8 "bool is_part_of_a_key_prefix(const Field_longstr*)") at assert.c:101
      #4  0x000055ab7716ee8e in is_part_of_a_key_prefix (field=field@entry=0x14d2b406bc00) at /test/10.8_dbg/storage/innobase/handler/ha_innodb.cc:20446
      #5  0x000055ab77171fac in ha_innobase::can_convert_blob (this=<optimized out>, field=0x14d2b406bc00, new_type=@0x14d2b4014708: {<Sql_alloc> = {<No data fields>}, <Type_handler_hybrid_field_type> = {m_type_handler = 0x55ab78144460 <type_handler_tiny_blob>}, <Column_definition_attributes> = {length = 8, interval = 0x0, charset = 0x55ab78101d00 <my_charset_utf8mb4_general_ci>, srid = 0, pack_flag = 33800, decimals = 0, unireg_check = Field::NONE}, compression_method_ptr = 0x0, field_name = {str = 0x14d2b40145c8 "a", length = 1}, comment = {str = 0x0, length = 0}, on_update = 0x0, invisible = VISIBLE, char_length = 0, flags = 16, pack_length = 9, interval_list = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55ab78119b00 <end_of_list>, last = 0x14d2b4014778, elements = 0}, <No data fields>}, option_list = 0x0, vcol_info = 0x0, default_value = 0x0, check_constraint = 0x0, versioning = Column_definition::VERSIONING_NOT_SET, period = 0x0}) at /test/10.8_dbg/storage/innobase/handler/ha_innodb.cc:20595
      #6  0x000055ab76dbaa7e in Field_blob::can_be_converted_by_engine (this=<optimized out>, new_type=<optimized out>) at /test/10.8_dbg/sql/field.h:4658
      #7  0x000055ab76bae737 in fill_alter_inplace_info (thd=thd@entry=0x14d2b4000db8, table=table@entry=0x14d2b402cad8, varchar=varchar@entry=false, ha_alter_info=ha_alter_info@entry=0x14d300b58f80) at /test/10.8_dbg/sql/sql_table.cc:6515
      #8  0x000055ab76bbfe8a in mysql_alter_table (thd=thd@entry=0x14d2b4000db8, new_db=new_db@entry=0x14d2b4005a58, new_name=new_name@entry=0x14d2b4005e70, create_info=create_info@entry=0x14d300b5b4b0, table_list=<optimized out>, table_list@entry=0x14d2b4013ee0, alter_info=alter_info@entry=0x14d300b5b3c0, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>) at /test/10.8_dbg/sql/sql_table.cc:10214
      #9  0x000055ab76c50438 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14d2b4000db8) at /test/10.8_dbg/sql/structs.h:568
      #10 0x000055ab76ad6114 in mysql_execute_command (thd=thd@entry=0x14d2b4000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.8_dbg/sql/sql_parse.cc:5989
      #11 0x000055ab76abcc64 in mysql_parse (thd=thd@entry=0x14d2b4000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14d300b5c400) at /test/10.8_dbg/sql/sql_parse.cc:8028
      #12 0x000055ab76acb8e9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d2b4000db8, packet=packet@entry=0x14d2b400b879 "ALTER TABLE t MODIFY a TINYTEXT CHARACTER SET utf8mb4", packet_length=packet_length@entry=53, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_class.h:1360
      #13 0x000055ab76aced2b in do_command (thd=0x14d2b4000db8, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_parse.cc:1402
      #14 0x000055ab76c481c0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55ab7adbae28, put_in_cache=put_in_cache@entry=true) at /test/10.8_dbg/sql/sql_connect.cc:1418
      #15 0x000055ab76c487c5 in handle_one_connection (arg=arg@entry=0x55ab7adbae28) at /test/10.8_dbg/sql/sql_connect.cc:1312
      #16 0x000055ab770cade6 in pfs_spawn_thread (arg=0x55ab7acce688) at /test/10.8_dbg/storage/perfschema/pfs.cc:2201
      #17 0x000014d303c39609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #18 0x000014d303828293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.22 (dbg), 10.5.13 (dbg), 10.6.5 (dbg), 10.7.1 (dbg), 10.8.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (opt), 10.5.13 (opt), 10.6.5 (opt), 10.7.1 (opt), 10.8.0 (opt)

      Attachments

        Activity

          People

            bar Alexander Barkov
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.