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

Server crash or assertion `num_fts_index <= 1' failure upon ALTER TABLE adding two fulltext indexes

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
      ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b);
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 debug 0c8d6fd66cf

      mysqld: /data/src/10.3/storage/innobase/handler/handler0alter.cc:5340: bool prepare_inplace_alter_table_dict(Alter_inplace_info*, const TABLE*, const TABLE*, const char*, ulint, ulint, ulint, bool, bool): Assertion `num_fts_index <= 1' failed.
      180409 19:51:50 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f3b60004ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055ebdccb353a in prepare_inplace_alter_table_dict (ha_alter_info=0x7f3b59347240, altered_table=0x7f3b04169100, old_table=0x7f3b0416cb80, table_name=0x7f3b0400df4d "t1", flags=33, flags2=94, fts_doc_id_col=2, add_fts_doc_id=true, add_fts_doc_id_idx=true) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:5340
      #9  0x000055ebdccb81c4 in ha_innobase::prepare_inplace_alter_table (this=0x7f3b0416d7c8, altered_table=0x7f3b04169100, ha_alter_info=0x7f3b59347240) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:6858
      #10 0x000055ebdc966015 in handler::ha_prepare_inplace_alter_table (this=0x7f3b0416d7c8, altered_table=0x7f3b04169100, ha_alter_info=0x7f3b59347240) at /data/src/10.3/sql/handler.cc:4386
      #11 0x000055ebdc74cabc in mysql_inplace_alter_table (thd=0x7f3b04000b00, table_list=0x7f3b04014ea8, table=0x7f3b0416cb80, altered_table=0x7f3b04169100, ha_alter_info=0x7f3b59347240, inplace_supported=HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE, target_mdl_request=0x7f3b593473b0, alter_ctx=0x7f3b59348060) at /data/src/10.3/sql/sql_table.cc:7567
      #12 0x000055ebdc75318b in mysql_alter_table (thd=0x7f3b04000b00, new_db=0x7f3b04005158, new_name=0x7f3b04005508, create_info=0x7f3b59348c50, table_list=0x7f3b04014ea8, alter_info=0x7f3b59348b90, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9821
      #13 0x000055ebdc7d8850 in Sql_cmd_alter_table::execute (this=0x7f3b040157b8, thd=0x7f3b04000b00) at /data/src/10.3/sql/sql_alter.cc:334
      #14 0x000055ebdc67dcb3 in mysql_execute_command (thd=0x7f3b04000b00) at /data/src/10.3/sql/sql_parse.cc:6284
      #15 0x000055ebdc682886 in mysql_parse (thd=0x7f3b04000b00, rawbuf=0x7f3b04014d58 "ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b)", length=80, parser_state=0x7f3b5934a5d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8013
      #16 0x000055ebdc66ff39 in dispatch_command (command=COM_QUERY, thd=0x7f3b04000b00, packet=0x7f3b04125fb1 "ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b)", packet_length=80, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1842
      #17 0x000055ebdc66e978 in do_command (thd=0x7f3b04000b00) at /data/src/10.3/sql/sql_parse.cc:1387
      #18 0x000055ebdc7d3243 in do_handle_one_connection (connect=0x55ebdfed80c0) at /data/src/10.3/sql/sql_connect.cc:1402
      #19 0x000055ebdc7d2fd0 in handle_one_connection (arg=0x55ebdfed80c0) at /data/src/10.3/sql/sql_connect.cc:1308
      #20 0x000055ebdcc5a6d3 in pfs_spawn_thread (arg=0x55ebdfef8f60) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #21 0x00007f3b61cdb494 in start_thread (arg=0x7f3b5934b700) at pthread_create.c:333
      #22 0x00007f3b600c193f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.3 non-debug 209375fdd07

      #2  <signal handler called>
      #3  __GI___pthread_mutex_lock (mutex=0x10) at ../nptl/pthread_mutex_lock.c:67
      #4  0x00005623f4e3b4e5 in enter (this=0x10) at /data/src/10.3/storage/innobase/include/sync0types.h:469
      #5  reset (this=this@entry=0x0) at /data/src/10.3/storage/innobase/os/os0event.cc:81
      #6  os_event_reset (event=event@entry=0x0) at /data/src/10.3/storage/innobase/os/os0event.cc:492
      #7  0x00005623f4e82a8a in row_merge_build_indexes (trx=0x7f31056f13d0, old_table=0x7f30b0073d00, new_table=new_table@entry=0x7f30b0075a40, online=false, indexes=<optimized out>, key_numbers=0x7f30b0068a38, n_indexes=4, table=0x7f30b0066bd8, add_cols=0x7f30b006a3b0, col_map=0x7f30b006a480, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=true, stage=0x7f30b00827f0, add_v=0x0, eval_table=0x7f30b0066bd8, drop_historical=false) at /data/src/10.3/storage/innobase/row/row0merge.cc:4825
      #8  0x00005623f4de40d1 in ha_innobase::inplace_alter_table (this=0x7f30b006b860, altered_table=0x7f30b0066bd8, ha_alter_info=0x7f3104c27be0) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:7101
      #9  0x00005623f491f319 in ha_inplace_alter_table (ha_alter_info=0x7f3104c27be0, altered_table=0x7f30b0066bd8, this=<optimized out>) at /data/src/10.3/sql/handler.h:4130
      #10 mysql_inplace_alter_table (thd=thd@entry=0x7f30b00009a8, table_list=0x7f30b00117b0, table=table@entry=0x7f30b00726e8, altered_table=altered_table@entry=0x7f30b0066bd8, ha_alter_info=ha_alter_info@entry=0x7f3104c27be0, inplace_supported=HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE, alter_ctx=0x7f3104c28a50, target_mdl_request=0x7f3104c27da0) at /data/src/10.3/sql/sql_table.cc:7637
      #11 0x00005623f4a8a61c in mysql_alter_table (thd=0x7f30b00009a8, new_db=<optimized out>, new_name=<optimized out>, create_info=0x7f3104c295f0, table_list=0x7f30b00117b0, alter_info=0x7f3104c29540, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9847
      #12 0x00005623f4ad660d in Sql_cmd_alter_table::execute (this=0x10, thd=0x7f30b00009a8) at /data/src/10.3/sql/sql_alter.cc:334
      #13 0x00005623f49f8b7b in mysql_execute_command (thd=0x7f30b00009a8) at /data/src/10.3/sql/sql_parse.cc:6284
      #14 0x00005623f4a00c5a in mysql_parse (thd=0x7f30b00009a8, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8013
      #15 0x00005623f4a04559 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f30b00009a8, packet=packet@entry=0x7f30b00092f9 "ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b)", packet_length=packet_length@entry=80, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1842
      #16 0x00005623f4a04b2f in do_command (thd=0x7f30b00009a8) at /data/src/10.3/sql/sql_parse.cc:1387
      #17 0x00005623f4ad3894 in do_handle_one_connection (connect=connect@entry=0x5623f85408a8) at /data/src/10.3/sql/sql_connect.cc:1402
      #18 0x00005623f4ad3a34 in handle_one_connection (arg=arg@entry=0x5623f85408a8) at /data/src/10.3/sql/sql_connect.cc:1308
      #19 0x00005623f4db57a4 in pfs_spawn_thread (arg=0x5623f8566358) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #20 0x00007f310d58e494 in start_thread (arg=0x7f3104c2c700) at pthread_create.c:333
      #21 0x00007f310b97493f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.2 returns a reasonable error:

      'ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b)' failed: 1795: InnoDB presently supports one FULLTEXT index creation at a time
      

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.