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

Assertion `col->len == len' failed in innobase_rename_or_enlarge_column_try

    XMLWordPrintable

Details

    Description

      USE test;
      CREATE TABLE t (c CHAR(10) BINARY) ENGINE=InnoDB;
      ALTER TABLE t CHANGE COLUMN c a CHAR(11);
      

      Leads to:

      10.5.3 cfe5ee90c8e4b9dfa98a41fcd299197a59261be7

      mysqld: /test/10.5_dbg/storage/innobase/handler/handler0alter.cc:9178: bool innobase_rename_or_enlarge_column_try(ha_innobase_inplace_ctx*, trx_t*, const char*, ulint, const Field&, bool): Assertion `col->len == len' failed.
      

      10.5.3 cfe5ee90c8e4b9dfa98a41fcd299197a59261be7

      Core was generated by `/test/MD110520-mariadb-10.5.3-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 0x15222d84f700 (LWP 1387734))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055c0a43b5c11 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x000055c0a3b5af8d in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x000015222bf93801 in __GI_abort () at abort.c:79
      #6  0x000015222bf8339a in __assert_fail_base (fmt=0x15222c10a7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55c0a47ab48c "col->len == len", file=file@entry=0x55c0a47a02e8 "/test/10.5_dbg/storage/innobase/handler/handler0alter.cc", line=line@entry=9178, function=function@entry=0x55c0a47a56a0 <innobase_rename_or_enlarge_column_try(ha_innobase_inplace_ctx*, trx_t*, char const*, unsigned long, Field const&, bool)::__PRETTY_FUNCTION__> "bool innobase_rename_or_enlarge_column_try(ha_innobase_inplace_ctx*, trx_t*, const char*, ulint, const Field&, bool)") at assert.c:92
      #7  0x000015222bf83412 in __GI___assert_fail (assertion=assertion@entry=0x55c0a47ab48c "col->len == len", file=file@entry=0x55c0a47a02e8 "/test/10.5_dbg/storage/innobase/handler/handler0alter.cc", line=line@entry=9178, function=function@entry=0x55c0a47a56a0 <innobase_rename_or_enlarge_column_try(ha_innobase_inplace_ctx*, trx_t*, char const*, unsigned long, Field const&, bool)::__PRETTY_FUNCTION__> "bool innobase_rename_or_enlarge_column_try(ha_innobase_inplace_ctx*, trx_t*, const char*, ulint, const Field&, bool)") at assert.c:101
      #8  0x000055c0a3f66c7b in innobase_rename_or_enlarge_column_try (is_v=<optimized out>, f=..., pos=0, table_name=0x15220a4dfc2d "t", trx=0x1522194033b0, ctx=0x15220a4755f8) at /test/10.5_dbg/storage/innobase/handler/handler0alter.cc:9178
      #9  innobase_rename_or_enlarge_columns_try (table_name=0x15220a4dfc2d "t", trx=0x1522194033b0, table=0x15220a4f0088, altered_table=0x15222d84aa70, ctx=0x15220a4755f8, ha_alter_info=0x15222d84a9d0) at /test/10.5_dbg/storage/innobase/handler/handler0alter.cc:9253
      #10 commit_try_norebuild (ha_alter_info=ha_alter_info@entry=0x15222d84a9d0, ctx=ctx@entry=0x15220a4755f8, altered_table=altered_table@entry=0x15222d84aa70, old_table=0x15220a4f0088, trx=0x1522194033b0, table_name=0x15220a4dfc2d "t") at /test/10.5_dbg/storage/innobase/handler/handler0alter.cc:10167
      #11 0x000055c0a3f53959 in ha_innobase::commit_inplace_alter_table (this=0x15220a436ca0, altered_table=0x15222d84aa70, ha_alter_info=0x15222d84a9d0, commit=true) at /test/10.5_dbg/storage/innobase/handler/handler0alter.cc:10899
      #12 0x000055c0a3b69549 in handler::ha_commit_inplace_alter_table (this=0x15220a436ca0, altered_table=altered_table@entry=0x15222d84aa70, ha_alter_info=ha_alter_info@entry=0x15222d84a9d0, commit=commit@entry=true) at /test/10.5_dbg/sql/handler.cc:4735
      #13 0x000055c0a397bb4c in mysql_inplace_alter_table (thd=thd@entry=0x15220a415088, table_list=0x15220a4741a0, table=table@entry=0x15220a4f0088, altered_table=altered_table@entry=0x15222d84aa70, ha_alter_info=ha_alter_info@entry=0x15222d84a9d0, inplace_supported=inplace_supported@entry=HA_ALTER_INPLACE_INSTANT, target_mdl_request=0x15222d84b830, alter_ctx=0x15222d84c6c0) at /test/10.5_dbg/sql/sql_table.cc:7920
      #14 0x000055c0a3987f17 in mysql_alter_table (thd=thd@entry=0x15220a415088, new_db=new_db@entry=0x15220a419940, new_name=new_name@entry=0x15220a419d48, create_info=create_info@entry=0x15222d84d2b0, table_list=<optimized out>, table_list@entry=0x15220a4741a0, alter_info=alter_info@entry=0x15222d84d1e0, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/10.5_dbg/sql/sql_table.cc:10442
      #15 0x000055c0a3a0b7d0 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x15220a415088) at /test/10.5_dbg/sql/sql_alter.cc:532
      #16 0x000055c0a38b6eda in mysql_execute_command (thd=thd@entry=0x15220a415088) at /test/10.5_dbg/sql/sql_parse.cc:5912
      #17 0x000055c0a38be804 in mysql_parse (thd=thd@entry=0x15220a415088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x15222d84e3e0, 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:7957
      #18 0x000055c0a38aaffd in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x15220a415088, packet=packet@entry=0x15220a467089 "ALTER TABLE t CHANGE COLUMN c a CHAR(11)", packet_length=packet_length@entry=40, 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:1839
      #19 0x000055c0a38a98cc in do_command (thd=0x15220a415088) at /test/10.5_dbg/sql/sql_parse.cc:1358
      #20 0x000055c0a3a0399d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x15220c0433a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
      #21 0x000055c0a3a040b9 in handle_one_connection (arg=arg@entry=0x15220c0433a8) at /test/10.5_dbg/sql/sql_connect.cc:1313
      #22 0x000055c0a3e6210a in pfs_spawn_thread (arg=0x15222b445888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #23 0x000015222cc766db in start_thread (arg=0x15222d84f700) at pthread_create.c:463
      #24 0x000015222c07488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Not reproducible on MyISAM or Aria.

      Bug confirmed present in:
      MariaDB: 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (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

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.