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

Assertion `table->found_next_number_field && !altered_table->found_next_number_field' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      INSTALL SONAME 'ha_duckdb';
      CREATE TABLE t1 (c1 INT KEY) ENGINE=DuckDB PARTITION BY HASH(c1);
      ALTER TABLE t1 FORCE;
      

      Leads to:

      CS 13.1.0 02c842c30dcb05a962eaac58c69920e6be3369cf (Debug, Clang 22.1.8-20260621) Build 09/09/2026

      mariadbd: /test/13.1_dbg/sql/ha_partition.cc:11060: virtual bool ha_partition::commit_inplace_alter_table(TABLE *, Alter_inplace_info *, bool): Assertion `table->found_next_number_field && !altered_table->found_next_number_field' failed.
      

      CS 13.1.0 02c842c30dcb05a962eaac58c69920e6be3369cf (Debug, Clang 22.1.8-20260621) Build 09/09/2026

      Core was generated by `/test/MD090926-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 1646912)]
      (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  0x000071901e84527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000071901e8288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000071901e82881b in __assert_fail_base (fmt=0x71901e9d1208 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x6088c6a3b850 "table->found_next_number_field && !altered_table->found_next_number_field", file=file@entry=0x6088c6a39c9d "/test/13.1_dbg/sql/ha_partition.cc", line=line@entry=11060, function=function@entry=0x6088c6a3b7ae "virtual bool ha_partition::commit_inplace_alter_table(TABLE *, Alter_inplace_info *, bool)")at ./assert/assert.c:96
      #6  0x000071901e83b517 in __assert_fail (assertion=0x6088c6a3b850 "table->found_next_number_field && !altered_table->found_next_number_field", file=0x6088c6a39c9d "/test/13.1_dbg/sql/ha_partition.cc", line=11060, function=0x6088c6a3b7ae "virtual bool ha_partition::commit_inplace_alter_table(TABLE *, Alter_inplace_info *, bool)") at ./assert/assert.c:105
      #7  0x00006088c605afd9 in ha_partition::commit_inplace_alter_table (this=0x698f08300d10, altered_table=0x698fdb958080, ha_alter_info=0x698fdb957d58, commit=true)at /test/13.1_dbg/sql/ha_partition.cc:11059
      #8  0x00006088c5cf2ef0 in handler::ha_commit_inplace_alter_table (this=0x698f08300d10, altered_table=0x698fdb958080, ha_alter_info=0x698fdb957d58, commit=true)at /test/13.1_dbg/sql/handler.cc:6021
      #9  0x00006088c59f2731 in mysql_inplace_alter_table (thd=0x698f08000d60, table_list=0x698f0801a590, table=0x698f080a4f60, altered_table=0x698fdb958080, ha_alter_info=0x698fdb957d58, target_mdl_request=0x698fdb959e70, ddl_log_state=0x698fdb957ff0, trigger_param=0x698fdb959a60, alter_ctx=0x698fdb958ce8, partial_alter=@0x698fdb957fbd: false, start_alter_id=@0x698fdb957fb0: 0, if_exists=false) at /test/13.1_dbg/sql/sql_table.cc:8368
      #10 0x00006088c59eb184 in mysql_alter_table (thd=0x698f08000d60, new_db=0x698f08005c28, new_name=0x698f080060c0, create_info=0x698fdb95af60, table_list=0x698f0801a590, recreate_info=0x698fdb95a668, alter_info=0x698fdb95ade8, order_num=0, order=0x0, ignore=false, if_exists=false)at /test/13.1_dbg/sql/sql_table.cc:11807
      #11 0x00006088c5aab4e8 in Sql_cmd_alter_table::execute (this=0x698f0801acf0, thd=0x698f08000d60) at /test/13.1_dbg/sql/sql_alter.cc:705
      #12 0x00006088c58d707b in mysql_execute_command (thd=0x698f08000d60, is_called_from_prepared_stmt=false) at /test/13.1_dbg/sql/sql_parse.cc:5960
      #13 0x00006088c58c8038 in mysql_parse (thd=0x698f08000d60, rawbuf=0x698f0801a490 "ALTER TABLE t1 FORCE", length=20, parser_state=0x698fdb95c9c0) at /test/13.1_dbg/sql/sql_parse.cc:8018
      #14 0x00006088c58c575e in dispatch_command (command=COM_QUERY, thd=0x698f08000d60, packet=0x698f0800b6c1 "ALTER TABLE t1 FORCE", packet_length=20, blocking=true) at /test/13.1_dbg/sql/sql_parse.cc:1903
      #15 0x00006088c58c8aba in do_command (thd=0x698f08000d60, blocking=true)at /test/13.1_dbg/sql/sql_parse.cc:1437
      #16 0x00006088c5aa07ee in do_handle_one_connection (connect=0x6088d675e570, put_in_cache=true) at /test/13.1_dbg/sql/sql_connect.cc:1514
      #17 0x00006088c5aa05d1 in handle_one_connection (arg=0x6088d66f6f20)at /test/13.1_dbg/sql/sql_connect.cc:1426
      #18 0x000071901e89cb84 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #19 0x000071901e929ecc 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  090926  2753b5919a10abd32ba822877c6a1cbf602d3748  No bug found                  
      CS  10.11  opt  090926  2753b5919a10abd32ba822877c6a1cbf602d3748  No bug found                  
      CS  11.4   dbg  090926  42038e1145dd43b3910055c364fb720a8a152d61  No bug found                  
      CS  11.4   opt  090926  42038e1145dd43b3910055c364fb720a8a152d61  No bug found                  
      CS  11.8   dbg  090926  e2e060ce3d8c3ce11b6c7ba28ced0f1a30c50a54  No bug found                  
      CS  11.8   opt  090926  e2e060ce3d8c3ce11b6c7ba28ced0f1a30c50a54  No bug found                  
      CS  12.3   dbg  090926  e9f84a1fdf7093191e55b55dc14b08b9d4ebaa20  No bug found                  
      CS  12.3   opt  090926  e9f84a1fdf7093191e55b55dc14b08b9d4ebaa20  No bug found                  
      CS  13.0   dbg  090926  b2c4e675049e23ce8c7346985f40840fcd4e583f  table->found_next_number_field && !altered_table->found_next_number_field|SIGABRT|ha_partition::commit_inplace_alter_table|handler::ha_commit_inplace_alter_table|mysql_inplace_alter_table|mysql_alter_table
      CS  13.0   opt  090926  b2c4e675049e23ce8c7346985f40840fcd4e583f  No bug found                  
      CS  13.1   dbg  090926  02c842c30dcb05a962eaac58c69920e6be3369cf  table->found_next_number_field && !altered_table->found_next_number_field|SIGABRT|ha_partition::commit_inplace_alter_table|handler::ha_commit_inplace_alter_table|mysql_inplace_alter_table|mysql_alter_table
      CS  13.1   opt  090926  02c842c30dcb05a962eaac58c69920e6be3369cf  No bug found                  
      ES  10.6   dbg  090926  aa3fb9800c358182ee2a1f8cca8ffbdd6d0a37eb  No bug found                  
      ES  10.6   opt  090926  aa3fb9800c358182ee2a1f8cca8ffbdd6d0a37eb  No bug found                  
      ES  11.4   dbg  090926  32807340954440071ca8ae8e2de51fb180d134c6  No bug found                  
      ES  11.4   opt  090926  32807340954440071ca8ae8e2de51fb180d134c6  No bug found                  
      ES  11.8   dbg  090926  c4af6f687a2dd983072457429aa2294f11957650  No bug found                  
      ES  11.8   opt  090926  c4af6f687a2dd983072457429aa2294f11957650  No bug found                  
      ES  12.3   dbg  090926  c3bd5108d81f19e33efb93f7b6ae971293732fd0  No bug found                  
      ES  12.3   opt  090926  c3bd5108d81f19e33efb93f7b6ae971293732fd0  No bug found                  
      

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            saahil Saahil Alam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 0.5h
                0.5h

                Git Integration

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