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

Assertion `!ctx->online || num_fts_index == 0' failed in bool prepare_inplace_alter_table_dict(Alter_inplace_info *, const TABLE *, const TABLE *, const ha_table_option_struct *, const char *, ulint, ulint, ulint, bool, bool)

    XMLWordPrintable

Details

    • Can result in hang or crash
    • Q3/2026 Server Maintenance

    Description

      --source include/have_innodb.inc
      --source include/have_partition.inc
       
      CREATE TABLE t1 (c1 VARCHAR(1) KEY) WITH SYSTEM VERSIONING ENGINE=InnoDB PARTITION BY SYSTEM_TIME SUBPARTITION BY KEY(c1) SUBPARTITIONS 2 (PARTITION hist HISTORY,PARTITION cur CURRENT);
      ALTER TABLE t1 ADD FULLTEXT INDEX (c1);
      ALTER TABLE t1 ENCRYPTED=NO;
       
      #cleanup 
      DROP TABLE t1;
      

      Leads to:

      CS 13.1.0 a06be0288f63f520aec95982cc6f872d26c4f23c (Debug, Clang 18.1.3-11) Build 02/06/2026

      mariadbd: /test/13.0_dbg/storage/innobase/handler/handler0alter.cc:7153: bool prepare_inplace_alter_table_dict(Alter_inplace_info *, const TABLE *, const TABLE *, const ha_table_option_struct *, const char *, ulint, ulint, ulint, bool, bool): Assertion `!ctx->online || num_fts_index == 0' failed.
      

      CS 13.1.0 a06be0288f63f520aec95982cc6f872d26c4f23c (Debug, Clang 18.1.3-11) Build 02/06/2026

      Core was generated by `/test/MD020626-mariadb-13.1.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --loo'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 3786379)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x00007f7b1c04527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00007f7b1c0288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00007f7b1c02881b in __assert_fail_base (fmt=0x7f7b1c1d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x639e29aff7e2 "!ctx->online || num_fts_index == 0", file=file@entry=0x639e29afc2b3 "/test/13.0_dbg/storage/innobase/handler/handler0alter.cc", line=line@entry=7153, function=function@entry=0x639e29afecca "bool prepare_inplace_alter_table_dict(Alter_inplace_info *, const TABLE *, const TABLE *, const ha_table_option_struct *, const char *, ulint, ulint, ulint, bool, bool)") at ./assert/assert.c:96
      #6  0x00007f7b1c03b517 in __assert_fail (assertion=0x639e29aff7e2 "!ctx->online || num_fts_index == 0", file=0x639e29afc2b3 "/test/13.0_dbg/storage/innobase/handler/handler0alter.cc", line=7153, function=0x639e29afecca "bool prepare_inplace_alter_table_dict(Alter_inplace_info *, const TABLE *, const TABLE *, const ha_table_option_struct *, const char *, ulint, ulint, ulint, bool, bool)") at ./assert/assert.c:105
      #7  0x0000639e29116173 in prepare_inplace_alter_table_dict (ha_alter_info=0x7f7b18119e98, altered_table=0x7f7b1811a1c0, old_table=0x775868029d80, old_opt=0x77586803ede0, table_name=0x775868047785 "t1", flags=33, flags2=94, fts_doc_id_col=4, add_fts_doc_id=true, add_fts_doc_id_idx=true)at /test/13.0_dbg/storage/innobase/handler/handler0alter.cc:7153
      #8  0x0000639e2910ec96 in ha_innobase::prepare_inplace_alter_table (this=0x77586804cab0, altered_table=0x7f7b1811a1c0, ha_alter_info=0x7f7b18119e98)at /test/13.0_dbg/storage/innobase/handler/handler0alter.cc:8754
      #9  0x0000639e28c9be81 in handler::ha_prepare_inplace_alter_table (this=0x77586804cab0, altered_table=0x7f7b1811a1c0, ha_alter_info=0x7f7b18119e98) at /test/13.0_dbg/sql/handler.cc:5997
      #10 0x0000639e2904d43b in ha_partition::prepare_inplace_alter_table (this=0x77586804c180, altered_table=0x7f7b1811a1c0, ha_alter_info=0x7f7b18119e98) at /test/13.0_dbg/sql/ha_partition.cc:10936
      #11 0x0000639e28c9be81 in handler::ha_prepare_inplace_alter_table (this=0x77586804c180, altered_table=0x7f7b1811a1c0, ha_alter_info=0x7f7b18119e98) at /test/13.0_dbg/sql/handler.cc:5997
      #12 0x0000639e28969879 in mysql_inplace_alter_table (thd=0x775868000d60, table_list=0x77586801a4d0, table=0x775868029d80, altered_table=0x7f7b1811a1c0, ha_alter_info=0x7f7b18119e98, target_mdl_request=0x7f7b1811bec0, ddl_log_state=0x7f7b1811a130, trigger_param=0x7f7b1811bac0, alter_ctx=0x7f7b1811ae18, partial_alter=@0x7f7b1811a0fd: false, start_alter_id=@0x7f7b1811a0f0: 0, if_exists=false) at /test/13.0_dbg/sql/sql_table.cc:8203
      #13 0x0000639e28961bd1 in mysql_alter_table (thd=0x775868000d60, new_db=0x775868005ba0, new_name=0x775868006038, create_info=0x7f7b1811cf90, table_list=0x77586801a4d0, recreate_info=0x7f7b1811c6a8, alter_info=0x7f7b1811ce18, order_num=0, order=0x0, ignore=false, if_exists=false)at /test/13.0_dbg/sql/sql_table.cc:11755
      #14 0x0000639e28a33633 in Sql_cmd_alter_table::execute (this=0x77586801ac80, thd=0x775868000d60) at /test/13.0_dbg/sql/sql_alter.cc:697
      #15 0x0000639e28839a45 in mysql_execute_command (thd=0x775868000d60, is_called_from_prepared_stmt=false) at /test/13.0_dbg/sql/sql_parse.cc:5905
      #16 0x0000639e28828bc4 in mysql_parse (thd=0x775868000d60, rawbuf=0x77586801a3c0 "ALTER TABLE t1 ENCRYPTED=NO", length=27, parser_state=0x7f7b1811e9f0) at /test/13.0_dbg/sql/sql_parse.cc:7945
      #17 0x0000639e28825f0d in dispatch_command (command=COM_QUERY, thd=0x775868000d60, packet=0x77586800b5f1 "ALTER TABLE t1 ENCRYPTED=NO", packet_length=27, blocking=true) at /test/13.0_dbg/sql/sql_parse.cc:1903
      #18 0x0000639e28829773 in do_command (thd=0x775868000d60, blocking=true)at /test/13.0_dbg/sql/sql_parse.cc:1437
      #19 0x0000639e28a27c89 in do_handle_one_connection (connect=0x639e577acb90, put_in_cache=true) at /test/13.0_dbg/sql/sql_connect.cc:1503
      #20 0x0000639e28a27a2e in handle_one_connection (arg=0x639e5778b4f0)at /test/13.0_dbg/sql/sql_connect.cc:1415
      #21 0x00007f7b1c09caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #22 0x00007f7b1c129c6c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.11  dbg  020626  612f4e2fd810423793b3bc878c3b1c00f5af25fb  No bug found                  
      CS  10.11  opt  020626  612f4e2fd810423793b3bc878c3b1c00f5af25fb  No bug found                  
      CS  11.4   dbg  020626  d2ebea4febdbc102da09a3b51bea4ef2819a3843  No bug found                  
      CS  11.4   opt  020626  d2ebea4febdbc102da09a3b51bea4ef2819a3843  No bug found                  
      CS  11.8   dbg  020626  080a7318acc2fc578b5915d1908f838b6f942de0  No bug found                  
      CS  11.8   opt  020626  080a7318acc2fc578b5915d1908f838b6f942de0  No bug found                  
      CS  12.3   dbg  020626  8fd382adf6380ee299937b831ffdb4f22eaab37e  !ctx->online || num_fts_index == 0|SIGABRT|prepare_inplace_alter_table_dict|ha_innobase::prepare_inplace_alter_table|handler::ha_prepare_inplace_alter_table|ha_partition::prepare_inplace_alter_table
      CS  12.3   opt  020626  8fd382adf6380ee299937b831ffdb4f22eaab37e  No bug found                  
      CS  13.0   dbg  220526  c8e8d33309606e682c98675d594dbd23ebc2ddf6  !ctx->online || num_fts_index == 0|SIGABRT|prepare_inplace_alter_table_dict|ha_innobase::prepare_inplace_alter_table|handler::ha_prepare_inplace_alter_table|ha_partition::prepare_inplace_alter_table
      CS  13.1   dbg  020626  a06be0288f63f520aec95982cc6f872d26c4f23c  !ctx->online || num_fts_index == 0|SIGABRT|prepare_inplace_alter_table_dict|ha_innobase::prepare_inplace_alter_table|handler::ha_prepare_inplace_alter_table|ha_partition::prepare_inplace_alter_table
      CS  13.1   opt  020626  a06be0288f63f520aec95982cc6f872d26c4f23c  No bug found                
      ES  10.6   dbg  040825  9b794f34b48fb7eee490b6da44edc0f33a947447  No bug found                  
      ES  10.6   opt  040825  9b794f34b48fb7eee490b6da44edc0f33a947447  No bug found                  
      ES  11.4   dbg  040825  a1c03ccd54b582e75506687ee19b273ca897f261  No bug found                  
      ES  11.4   opt  040825  a1c03ccd54b582e75506687ee19b273ca897f261  No bug found                  
      ES  11.8   dbg  151025  780565c207e9ce0ebf7d8e3d59f223801447b619  No bug found                  
      ES  11.8   opt  151025  780565c207e9ce0ebf7d8e3d59f223801447b619  No bug found                  
      ES  12.3   opt  220426  613a6253fe9efc12e166f83a97663ba263db8317  !ctx->online || num_fts_index == 0|SIGABRT|prepare_inplace_alter_table_dict|ha_innobase::prepare_inplace_alter_table|handler::ha_prepare_inplace_alter_table|ha_partition::prepare_inplace_alter_table
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.