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

Assertion `opt->value.str' failed in append_create_options on ALTER TABLE ... REORGANIZE PARTITION

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      CREATE TABLE t (c1 INT,c2 DATETIME,KEY(c2)) ENGINE=InnoDB PARTITION BY HASH(c1) (PARTITION p1,PARTITION p2);
      ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO(PARTITION p1,i2 i1:=DEFAULT);
      

      Leads to:

      CS 13.0.2 84c246ca5387c0611f75097136ff4f4bea092aa3 (Debug, Clang 22.1.8-20260622) Build 22/07/2026

      mariadbd: /test/13.0_dbg/sql/sql_show.cc:1991: void append_create_options(THD *, String *, engine_option_value *, bool, ha_create_table_option *): Assertion `opt->value.str' failed.
      

      CS 13.0.2 84c246ca5387c0611f75097136ff4f4bea092aa3 (Debug, Clang 22.1.8-20260622) Build 22/07/2026

      Core was generated by `/test/MD220726-mariadb-13.0.2-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 2781761)]
      (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  0x00007d5ffc84526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00007d5ffc8288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00007d5ffc82881b in __assert_fail_base (fmt=0x7d5ffc9d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5834e8bcbf1e "opt->value.str", file=file@entry=0x5834e8c77393 "/test/13.0_dbg/sql/sql_show.cc", line=line@entry=1991, function=function@entry=0x5834e8bcbf2d "void append_create_options(THD *, String *, engine_option_value *, bool, ha_create_table_option *)")at ./assert/assert.c:94
      #6  0x00007d5ffc83b507 in __assert_fail (assertion=0x5834e8bcbf1e "opt->value.str", file=0x5834e8c77393 "/test/13.0_dbg/sql/sql_show.cc", line=1991, function=0x5834e8bcbf2d "void append_create_options(THD *, String *, engine_option_value *, bool, ha_create_table_option *)") at ./assert/assert.c:103
      #7  0x00005834e99d6aab in append_create_options (thd=0x755ed4000d60, packet=0x7d5ff0babe78, opt=0x755ed401b0b0, check_options=true, rules=0x5834ea7e7c40 <innodb_table_option_list>)at /test/13.0_dbg/sql/sql_show.cc:1991
      #8  0x00005834e991bf8e in generate_partition_syntax (thd=0x755ed4000d60, part_info=0x755ed40392c0, buf_length=0x7d5ff0bac65c, show_partition_options=true, create_info=0x7d5ff0bb0f90, alter_info=0x7d5ff0bb0e18) at /test/13.0_dbg/sql/sql_partition.cc:2741
      #9  0x00005834e991b02b in generate_partition_syntax_for_frm (thd=0x755ed4000d60, part_info=0x755ed40392c0, buf_length=0x7d5ff0bac65c, create_info=0x7d5ff0bb0f90, alter_info=0x7d5ff0bb0e18)at /test/13.0_dbg/sql/sql_partition.cc:2505
      #10 0x00005834e9a20935 in mysql_write_frm (lpt=0x7d5ff0bad3f8, flags=1)at /test/13.0_dbg/sql/sql_table.cc:828
      #11 0x00005834e9924468 in fast_alter_partition_table (thd=0x755ed4000d60, table=0x755ed4035af0, alter_info=0x7d5ff0bb0e18, alter_ctx=0x7d5ff0baee18, create_info=0x7d5ff0bb0f90, table_list=0x755ed401a530)at /test/13.0_dbg/sql/sql_partition.cc:7905
      #12 0x00005834e9a33ef3 in mysql_alter_table (thd=0x755ed4000d60, new_db=0x755ed4005ba0, new_name=0x755ed4006038, create_info=0x7d5ff0bb0f90, table_list=0x755ed401a530, recreate_info=0x7d5ff0bb06a8, alter_info=0x7d5ff0bb0e18, order_num=0, order=0x0, ignore=false, if_exists=false)at /test/13.0_dbg/sql/sql_table.cc:11411
      #13 0x00005834e9b0a0fc in Sql_cmd_alter_table::execute (this=0x755ed401b0e0, thd=0x755ed4000d60) at /test/13.0_dbg/sql/sql_alter.cc:697
      #14 0x00005834e9907d76 in mysql_execute_command (thd=0x755ed4000d60, is_called_from_prepared_stmt=false) at /test/13.0_dbg/sql/sql_parse.cc:5905
      #15 0x00005834e98f8e88 in mysql_parse (thd=0x755ed4000d60, rawbuf=0x755ed401a3c0 "ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO(PARTITION p1,i2 i1:=DEFAULT)", length=74, parser_state=0x7d5ff0bb29f0)at /test/13.0_dbg/sql/sql_parse.cc:7945
      #16 0x00005834e98f65de in dispatch_command (command=COM_QUERY, thd=0x755ed4000d60, packet=0x755ed400b5f1 "ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO(PARTITION p1,i2 i1:=DEFAULT)", packet_length=74, blocking=true)at /test/13.0_dbg/sql/sql_parse.cc:1903
      #17 0x00005834e98f990a in do_command (thd=0x755ed4000d60, blocking=true)at /test/13.0_dbg/sql/sql_parse.cc:1437
      #18 0x00005834e9afe0be in do_handle_one_connection (connect=0x5834ec2e0ae0, put_in_cache=true) at /test/13.0_dbg/sql/sql_connect.cc:1510
      #19 0x00005834e9afdea1 in handle_one_connection (arg=0x5834ec2bf440)at /test/13.0_dbg/sql/sql_connect.cc:1422
      #20 0x00007d5ffc89ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #21 0x00007d5ffc929c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.6   dbg  220726  5520c9aac5b6a5a9ea60d78582ddffa5349e2d0f  No bug found                  
      CS  10.6   opt  220726  5520c9aac5b6a5a9ea60d78582ddffa5349e2d0f  No bug found                  
      CS  10.11  dbg  220726  6268f6023fe3e8dc8ec81869dea711e14cbb28c3  No bug found                  
      CS  10.11  opt  220726  6268f6023fe3e8dc8ec81869dea711e14cbb28c3  No bug found                  
      CS  11.4   dbg  220726  2cbce592c39dd39902c8f03db2b35069832fd10b  No bug found                  
      CS  11.4   opt  220726  2cbce592c39dd39902c8f03db2b35069832fd10b  No bug found                  
      CS  11.8   dbg  220726  1d23deff797ab448f091e39756434903d81a98c2  No bug found                  
      CS  11.8   opt  220726  1d23deff797ab448f091e39756434903d81a98c2  No bug found                  
      CS  12.3   dbg  220726  9b075b2cb53338f67e7230cc585e02d2d34514ed  opt->value.str|SIGABRT|append_create_options|generate_partition_syntax|generate_partition_syntax_for_frm|mysql_write_frm
      CS  12.3   opt  220726  9b075b2cb53338f67e7230cc585e02d2d34514ed  No bug found                  
      CS  13.0   dbg  220726  84c246ca5387c0611f75097136ff4f4bea092aa3  opt->value.str|SIGABRT|append_create_options|generate_partition_syntax|generate_partition_syntax_for_frm|mysql_write_frm
      CS  13.0   opt  220726  84c246ca5387c0611f75097136ff4f4bea092aa3  No bug found                  
      CS  13.1   dbg  220726  934108aab5cb541b3fc09672b5d4090558ab408e  opt->value.str|SIGABRT|append_create_options|generate_partition_syntax|generate_partition_syntax_for_frm|mysql_write_frm
      CS  13.1   opt  220726  934108aab5cb541b3fc09672b5d4090558ab408e  No bug found                  
      ES  10.6   dbg  220726  fcecb2620f25965723d640decede7c018bcb1dcc  No bug found                  
      ES  10.6   opt  220726  fcecb2620f25965723d640decede7c018bcb1dcc  No bug found                  
      ES  11.4   dbg  220726  3b34189bfe675c18c4ced3ef531d016ea74c76f4  No bug found                  
      ES  11.4   opt  220726  3b34189bfe675c18c4ced3ef531d016ea74c76f4  No bug found                  
      ES  11.8   dbg  220726  4694e931d10fecf733c34f83ea2146d31b708eb3  No bug found                  
      ES  11.8   opt  220726  4694e931d10fecf733c34f83ea2146d31b708eb3  No bug found                  
      ES  12.3   dbg  220726  9d8abb61e913bec023cd8caeccad4b42717151cb  opt->value.str|SIGABRT|append_create_options|generate_partition_syntax|generate_partition_syntax_for_frm|mysql_write_frm
      ES  12.3   opt  220726  9d8abb61e913bec023cd8caeccad4b42717151cb  No bug found                  
      MS  5.5    dbg  070123  bac287c315b1792e7ae33f91add6a60292f9bae8  No bug found                  
      MS  5.5    opt  070123  bac287c315b1792e7ae33f91add6a60292f9bae8  No bug found                  
      MS  5.6    dbg  070123  dab95781a1244104d6b87020ac2fc4d190ba2946  No bug found                  
      MS  5.6    opt  070123  dab95781a1244104d6b87020ac2fc4d190ba2946  No bug found                  
      MS  5.7    dbg  070525  f7680e98b6bbe3500399fbad465d08a6b75d7a5c  No bug found                  
      MS  5.7    opt  070525  f7680e98b6bbe3500399fbad465d08a6b75d7a5c  No bug found                  
      MS  8.0    dbg  060224  49ef33f7edadef3ae04665e73d1babd40179a4f1  No bug found                  
      MS  8.0    opt  060224  49ef33f7edadef3ae04665e73d1babd40179a4f1  No bug found                  
      MS  9.1    dbg  211024  61a3a1d8ef15512396b4c2af46e922a19bf2b174  No bug found                  
      MS  9.1    opt  211024  61a3a1d8ef15512396b4c2af46e922a19bf2b174  No bug found                  
      

      Attachments

        Activity

          People

            ycp Yuchen Pei
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0d
                0d
                Remaining:
                Time Spent - 1.25h Remaining Estimate - 1.5d
                1.5d
                Logged:
                Time Spent - 1.25h Remaining Estimate - 1.5d
                1.25h

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.