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

Assertion `!param->got_error' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      CLI compatible Test case

      CREATE TABLE t1 (c1 INT);
      CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a=1;
      SET max_session_mem_used=8192;
      RENAME TABLE t1 TO t2,t1 TO t1;
      

      Leads to:

      CS 13.0.2 1a4bb1bbfde5fa17ba148cb62678902f11c66a1a (Debug, Clang 22.1.8-20260621) Build 10/08/2026

      mariadbd: /test/13.0_dbg/sql/sql_trigger.cc:2628: static bool Table_triggers_list::change_table_name(THD *, TRIGGER_RENAME_PARAM *, const LEX_CSTRING *, const LEX_CSTRING *, const LEX_CSTRING *, const LEX_CSTRING *, const LEX_CSTRING *): Assertion `!param->got_error' failed.
      

      CS 13.0.2 1a4bb1bbfde5fa17ba148cb62678902f11c66a1a (Debug, Clang 22.1.8-20260621) Build 10/08/2026

      Core was generated by `/test/MD100826-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 1367640)]
      (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  0x00007b927844527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00007b92784288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00007b927842881b in __assert_fail_base (fmt=0x7b92785d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x600c5ed433ff "!param->got_error", file=file@entry=0x600c5ed42edc "/test/13.0_dbg/sql/sql_trigger.cc", line=line@entry=2628, function=function@entry=0x600c5ed43411 "static bool Table_triggers_list::change_table_name(THD *, TRIGGER_RENAME_PARAM *, const LEX_CSTRING *, const LEX_CSTRING *, const LEX_CSTRING *, const LEX_CSTRING *, const LEX_CSTRING *)")at ./assert/assert.c:96
      #6  0x00007b927843b517 in __assert_fail (assertion=0x600c5ed433ff "!param->got_error", file=0x600c5ed42edc "/test/13.0_dbg/sql/sql_trigger.cc", line=2628, function=0x600c5ed43411 "static bool Table_triggers_list::change_table_name(THD *, TRIGGER_RENAME_PARAM *, const LEX_CSTRING *, const LEX_CSTRING *, const LEX_CSTRING *, const LEX_CSTRING *, const LEX_CSTRING *)")at ./assert/assert.c:105
      #7  0x0000600c5de7f76b in Table_triggers_list::change_table_name (thd=0x739160000d60, param=0x7b92741a9a40, db=0x7b92741a99d8, old_alias=0x7b92741a9a08, old_table=0x7b92741a99f8, new_db=0x7b92741a99e8, new_table=0x7b92741a9a18) at /test/13.0_dbg/sql/sql_trigger.cc:2628
      #8  0x0000600c5de94c2d in rename_triggers (thd=0x739160000d60, ddl_log_entry=0x7b92741ab020, swap_tables=false)at /test/13.0_dbg/sql/ddl_log.cc:1276
      #9  0x0000600c5de9203a in ddl_log_execute_action (thd=0x739160000d60, mem_root=0x7b92741aafd0, ddl_log_entry=0x7b92741ab020)at /test/13.0_dbg/sql/ddl_log.cc:1505
      #10 0x0000600c5de8eacc in ddl_log_execute_entry_no_lock (thd=0x739160000d60, first_entry=1) at /test/13.0_dbg/sql/ddl_log.cc:2471
      #11 0x0000600c5de8f6b6 in ddl_log_revert (thd=0x739160000d60, state=0x7b92741ab1a0) at /test/13.0_dbg/sql/ddl_log.cc:3003
      #12 0x0000600c5dd91073 in mysql_rename_tables (thd=0x739160000d60, table_list=0x73916001a510, silent=false, if_exists=false)at /test/13.0_dbg/sql/sql_rename.cc:226
      #13 0x0000600c5dd494c4 in mysql_execute_command (thd=0x739160000d60, is_called_from_prepared_stmt=false) at /test/13.0_dbg/sql/sql_parse.cc:4380
      #14 0x0000600c5dd40d18 in mysql_parse (thd=0x739160000d60, rawbuf=0x73916001a3c0 "RENAME TABLE t1 TO t2,t1 TO t1", length=30, parser_state=0x7b92741ac9f0) at /test/13.0_dbg/sql/sql_parse.cc:7943
      #15 0x0000600c5dd3e46e in dispatch_command (command=COM_QUERY, thd=0x739160000d60, packet=0x73916000b5f1 "RENAME TABLE t1 TO t2,t1 TO t1", packet_length=30, blocking=true) at /test/13.0_dbg/sql/sql_parse.cc:1903
      #16 0x0000600c5dd4179a in do_command (thd=0x739160000d60, blocking=true)at /test/13.0_dbg/sql/sql_parse.cc:1437
      #17 0x0000600c5df1375e in do_handle_one_connection (connect=0x600c84ed5700, put_in_cache=true) at /test/13.0_dbg/sql/sql_connect.cc:1514
      #18 0x0000600c5df13541 in handle_one_connection (arg=0x600c84eb4060)at /test/13.0_dbg/sql/sql_connect.cc:1426
      #19 0x00007b927849cb84 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #20 0x00007b9278529d6c 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  100826  0931994096b84ecc9ffc8eb3517c7e09e6e8631e  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      CS  10.6   opt  100826  0931994096b84ecc9ffc8eb3517c7e09e6e8631e  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      CS  10.11  dbg  100826  aba2caa893cdfa880dbb9a4f2d8e6dfaa7ed8ebe  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      CS  10.11  opt  100826  aba2caa893cdfa880dbb9a4f2d8e6dfaa7ed8ebe  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      CS  11.4   dbg  100826  f6418ff7b2a0ecbc158f53331735994446bed0ac  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      CS  11.4   opt  100826  f6418ff7b2a0ecbc158f53331735994446bed0ac  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      CS  11.8   dbg  100826  da0beac410cc761be4ee52b90fded6c7fa2f8947  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      CS  11.8   opt  100826  da0beac410cc761be4ee52b90fded6c7fa2f8947  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      CS  12.3   dbg  100826  6b174bfb25be06f7efdab149183665e1a36b3dd5  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      CS  12.3   opt  100826  6b174bfb25be06f7efdab149183665e1a36b3dd5  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      CS  13.0   dbg  100826  1a4bb1bbfde5fa17ba148cb62678902f11c66a1a  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      CS  13.0   opt  100826  1a4bb1bbfde5fa17ba148cb62678902f11c66a1a  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      CS  13.1   dbg  100826  a217e1000f37a429a9c1d1c308952a959276b77e  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      CS  13.1   opt  100826  a217e1000f37a429a9c1d1c308952a959276b77e  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      ES  10.6   dbg  100826  fcecb2620f25965723d640decede7c018bcb1dcc  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      ES  10.6   opt  100826  fcecb2620f25965723d640decede7c018bcb1dcc  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      ES  11.4   dbg  100826  3b34189bfe675c18c4ced3ef531d016ea74c76f4  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      ES  11.4   opt  100826  3b34189bfe675c18c4ced3ef531d016ea74c76f4  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      ES  11.8   dbg  100826  4694e931d10fecf733c34f83ea2146d31b708eb3  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      ES  11.8   opt  100826  4694e931d10fecf733c34f83ea2146d31b708eb3  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      ES  12.3   dbg  100826  ad4d36b69e4813957c35d5e148b93a51a61c91c6  !param->got_error|SIGABRT|Table_triggers_list::change_table_name|rename_triggers|ddl_log_execute_action|ddl_log_execute_entry_no_lock
      ES  12.3   opt  100826  ad4d36b69e4813957c35d5e148b93a51a61c91c6  GOT_ERROR|Got error 1064|when trying to execute action for entry 1 of type 'rename table'
      

      Attachments

        Activity

          People

            oleg.smirnov Oleg Smirnov
            saahil Saahil Alam
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.25d
                0.25d

                Git Integration

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