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

Assertion `ha_alter_info->key_count + .... in prepare_inplace_alter_table_dict

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4.3
    • 10.4.4
    • None
    • Linux Ubunty 17.10 but most probably not important.

    Description

      Problem found during RQG testing

      Version: '10.4.3-MariaDB-debug-log'  socket: 'bld_debug/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
      mysqld: storage/innobase/handler/handler0alter.cc:6431: bool prepare_inplace_alter_table_dict(Alter_inplace_info*, const TABLE*, const TABLE*, const char*, ulint, ulint, ulint, bool, bool): Assertion `ha_alter_info->key_count + (dict_table_get_first_index(ctx->new_table))->is_gen_clust() + (ctx->old_table->fts_doc_id_index && innobase_fts_check_doc_id_index_in_def( altered_table->s->keys, altered_table->key_info) != FTS_EXIST_DOC_ID_INDEX) == ctx->num_to_add_index' failed.
      190218 11:38:43 [ERROR] mysqld got signal 6 ;
      ...
      Query (0x7f8f440144d0): ALTER TABLE t1 CHANGE COLUMN col_text col_text TEXT
      Connection ID (thread ID): 9
      Status: NOT_KILLED
      ...
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007f8f9fb6ef5d in __GI_abort () at abort.c:90
      #6  0x00007f8f9fb64f17 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x559036ef7a98 "ha_alter_info->key_count + (dict_table_get_first_index(ctx->new_table))->is_gen_clust() + (ctx->old_table->fts_doc_id_index && innobase_fts_check_doc_id_index_in_def( altered_table->s->keys, altered_t"..., file=file@entry=0x559036ef4820 "storage/innobase/handler/handler0alter.cc", line=line@entry=6431, function=function@entry=0x559036efcbe0 <prepare_inplace_alter_table_dict(Alter_inplace_info*, TABLE const*, TABLE const*, char const*, unsigned long, unsigned long, unsigned long, bool, bool)::__PRETTY_FUNCTION__> "bool prepare_inplace_alter_table_dict(Alter_inplace_info*, const TABLE*, const TABLE*, const char*, ulint, ulint, ulint, bool, bool)") at assert.c:92
      #7  0x00007f8f9fb64fc2 in __GI___assert_fail (assertion=0x559036ef7a98 "ha_alter_info->key_count + (dict_table_get_first_index(ctx->new_table))->is_gen_clust() + (ctx->old_table->fts_doc_id_index && innobase_fts_check_doc_id_index_in_def( altered_table->s->keys, altered_t"..., file=0x559036ef4820 "storage/innobase/handler/handler0alter.cc", line=6431, function=0x559036efcbe0 <prepare_inplace_alter_table_dict(Alter_inplace_info*, TABLE const*, TABLE const*, char const*, unsigned long, unsigned long, unsigned long, bool, bool)::__PRETTY_FUNCTION__> "bool prepare_inplace_alter_table_dict(Alter_inplace_info*, const TABLE*, const TABLE*, const char*, ulint, ulint, ulint, bool, bool)") at assert.c:101
      #8  0x0000559036687f2c in prepare_inplace_alter_table_dict (ha_alter_info=0x7f8f98e87a90, altered_table=0x7f8f440dee58, old_table=0x7f8f4417eca8, table_name=0x7f8f44064ab5 "t1", flags=0, flags2=80, fts_doc_id_col=18446744073709551615, add_fts_doc_id=false, add_fts_doc_id_idx=false) at storage/innobase/handler/handler0alter.cc:6421
      #9  0x000055903668d62f in ha_innobase::prepare_inplace_alter_table (this=0x7f8f440d4c40, altered_table=0x7f8f440dee58, ha_alter_info=0x7f8f98e87a90) at storage/innobase/handler/handler0alter.cc:8086
      #10 0x00005590364260c3 in handler::ha_prepare_inplace_alter_table (this=0x7f8f440d4c40, altered_table=0x7f8f440dee58, ha_alter_info=0x7f8f98e87a90) at sql/handler.cc:4653
      #11 0x00005590361c1115 in mysql_inplace_alter_table (thd=0x7f8f44000ce8, table_list=0x7f8f440145e8, table=0x7f8f4417eca8, altered_table=0x7f8f440dee58, ha_alter_info=0x7f8f98e87a90, inplace_supported=HA_ALTER_INPLACE_INSTANT, target_mdl_request=0x7f8f98e87cc0, alter_ctx=0x7f8f98e88270) at sql/sql_table.cc:7520
      #12 0x00005590361c7359 in mysql_alter_table (thd=0x7f8f44000ce8, new_db=0x7f8f440053e0, new_name=0x7f8f440057c8, create_info=0x7f8f98e88e60, table_list=0x7f8f440145e8, alter_info=0x7f8f98e88da0, order_num=0, order=0x0, ignore=false) at sql/sql_table.cc:9703
      #13 0x0000559036252807 in Sql_cmd_alter_table::execute (this=0x7f8f44014d50, thd=0x7f8f44000ce8) at sql/sql_alter.cc:493
      #14 0x00005590360e95e1 in mysql_execute_command (thd=0x7f8f44000ce8) at sql/sql_parse.cc:6330
      #15 0x00005590360eea34 in mysql_parse (thd=0x7f8f44000ce8, rawbuf=0x7f8f440144d0 "ALTER TABLE t1 CHANGE COLUMN col_text col_text TEXT", length=51, parser_state=0x7f8f98e8a1e0, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:8141
      #16 0x00005590360d9e40 in dispatch_command (command=COM_QUERY, thd=0x7f8f44000ce8, packet=0x7f8f44009f39 "ALTER TABLE t1 CHANGE COLUMN col_text col_text TEXT ", packet_length=52, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:1819
      #17 0x00005590360d8688 in do_command (thd=0x7f8f44000ce8) at sql/sql_parse.cc:1357
      #18 0x000055903624c745 in do_handle_one_connection (connect=0x559038978db8) at sql/sql_connect.cc:1399
      #19 0x000055903624c4a9 in handle_one_connection (arg=0x559038978db8) at sql/sql_connect.cc:1302
      #20 0x0000559036b7ea4e in pfs_spawn_thread (arg=0x559038a9a488) at storage/perfschema/pfs.cc:1862
      #21 0x00007f8fa0a147fc in start_thread (arg=0x7f8f98e8b700) at pthread_create.c:465
      #22 0x00007f8f9fc4ab5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
       
      10.4 commit 19c6a7bbd75d8a72716ecba3aa32d4e9f13daebb 2019-02-18
       
      No replay of problem on
      10.3 commit e8b6c15010e6fffe17e27c165b8c60b51a8f66a7 2019-02-13
       
      Attachments:
      bs_3.test
         My MTR based test.
         Please note that only ROW_FORMAT = Redundant seems to have that problem.
      prt1
         Slightly edited protocol of my MTR test run 
      

      Attachments

        1. bs_3.test
          0.4 kB
          Matthias Leich
        2. prt1
          54 kB
          Matthias Leich

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              mleich Matthias Leich
              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.