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

Assertion failure in Diagnostics_area::set_error_status upon trigger using a view

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.4, 11.8, 12.3, 13.0
    • 11.4, 11.8, 12.3
    • Triggers, Views
    • None

    Description

      CREATE TABLE t1 (a INT);
      CREATE TABLE t2 (f INT);
      CREATE VIEW v AS SELECT f FROM t2;
      CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO v (f) VALUES (1);
       
      INSERT INTO t1 VALUES (1);
      CREATE OR REPLACE VIEW v AS SELECT f FROM t2;
      CREATE OR REPLACE TABLE t2 (f INT);
      INSERT INTO t1 VALUES (1);
       
      DROP TRIGGER tr;
      DROP VIEW v;
      DROP TABLE t1, t2;
      

      11.4 c57069561c4fe8f72191d4a2a4a829e5b57537dc

      mariadbd: /data/bld/11.4-asan-ubsan/sql/sql_error.cc:468: void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*): Assertion `! is_set() || m_can_overwrite_status' failed.
      260808 18:30:10 [ERROR] /share8t/bld/11.4-asan-ubsan/sql/mariadbd got signal 6 ;
       
      #9  0x00007fe083c44395 in __assert_fail_base (fmt=0x7fe083db9a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55c9456bfce0 "! is_set() || m_can_overwrite_status", file=file@entry=0x55c9456c0b80 "/data/bld/11.4-asan-ubsan/sql/sql_error.cc", line=line@entry=468, function=function@entry=0x55c9456bfd40 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at ./assert/assert.c:94
      #10 0x00007fe083c52ec2 in __GI___assert_fail (assertion=0x55c9456bfce0 "! is_set() || m_can_overwrite_status", file=0x55c9456c0b80 "/data/bld/11.4-asan-ubsan/sql/sql_error.cc", line=468, function=0x55c9456bfd40 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at ./assert/assert.c:103
      #11 0x000055c941af0b34 in Diagnostics_area::set_error_status (this=this@entry=0x62c0000b63b0, sql_errno=sql_errno@entry=1615, message=<optimized out>, sqlstate=sqlstate@entry=0x55c9457c1140 "HY000", ucid=..., error_condition=error_condition@entry=0x0) at /data/bld/11.4-asan-ubsan/sql/sql_error.cc:468
      #12 0x000055c941af1156 in Diagnostics_area::set_error_status (this=this@entry=0x62c0000b63b0, sql_errno=sql_errno@entry=1615) at /data/bld/11.4-asan-ubsan/sql/sql_error.cc:430
      #13 0x000055c941dece33 in Reprepare_observer::report_error (this=this@entry=0x7fe076f841d0, thd=thd@entry=0x62c0000b0218) at /data/bld/11.4-asan-ubsan/sql/sql_prepare.cc:3858
      #14 0x000055c94193df7b in check_and_update_table_version (thd=thd@entry=0x62c0000b0218, tables=tables@entry=0x6250002591f8, table_share=0x62500027b138) at /data/bld/11.4-asan-ubsan/sql/sql_base.cc:3174
      #15 0x000055c941965388 in open_and_process_table (thd=thd@entry=0x62c0000b0218, tables=tables@entry=0x6250002591f8, counter=counter@entry=0x7fe076f82970, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7fe076f82aa0, has_prelocking_list=has_prelocking_list@entry=false, ot_ctx=<optimized out>) at /data/bld/11.4-asan-ubsan/sql/sql_base.cc:4350
      #16 0x000055c94198fe0c in open_tables (thd=thd@entry=0x62c0000b0218, options=..., start=start@entry=0x7fe076f82980, counter=counter@entry=0x7fe076f82970, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7fe076f82aa0) at /data/bld/11.4-asan-ubsan/sql/sql_base.cc:4778
      #17 0x000055c941993480 in open_and_lock_tables (thd=thd@entry=0x62c0000b0218, options=..., tables=tables@entry=0x6250002541c0, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7fe076f82aa0) at /data/bld/11.4-asan-ubsan/sql/sql_base.cc:5805
      #18 0x000055c9419bb994 in open_and_lock_tables (thd=thd@entry=0x62c0000b0218, tables=tables@entry=0x6250002541c0, derived=derived@entry=true, flags=flags@entry=0) at /data/bld/11.4-asan-ubsan/sql/sql_base.h:534
      #19 0x000055c941b6733c in mysql_insert (thd=thd@entry=0x62c0000b0218, table_list=<optimized out>, fields=..., values_list=..., update_fields=..., update_values=..., duplic=<optimized out>, ignore=<optimized out>, result=<optimized out>) at /data/bld/11.4-asan-ubsan/sql/sql_insert.cc:801
      #20 0x000055c941d03c38 in mysql_execute_command (thd=0x62c0000b0218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/bld/11.4-asan-ubsan/sql/sql_parse.cc:4515
      #21 0x000055c94293d6d0 in sp_instr_stmt::exec_core (this=0x6250002576d8, thd=<optimized out>, nextp=0x7fe076f845d0) at /data/bld/11.4-asan-ubsan/sql/sp_instr.cc:1169
      #22 0x000055c942952585 in sp_lex_keeper::reset_lex_and_exec_core (this=this@entry=0x625000257710, thd=thd@entry=0x62c0000b0218, nextp=nextp@entry=0x7fe076f845d0, open_tables=open_tables@entry=false, instr=instr@entry=0x6250002576d8, rerun_the_same_instr=rerun_the_same_instr@entry=false) at /data/bld/11.4-asan-ubsan/sql/sp_instr.cc:333
      #23 0x000055c94295f41c in sp_lex_keeper::validate_lex_and_exec_core (this=this@entry=0x625000257710, thd=thd@entry=0x62c0000b0218, nextp=nextp@entry=0x7fe076f845d0, open_tables=open_tables@entry=false, instr=instr@entry=0x6250002576d8) at /data/bld/11.4-asan-ubsan/sql/sp_instr.cc:512
      #24 0x000055c942961fb4 in sp_instr_stmt::execute (this=0x6250002576d8, thd=0x62c0000b0218, nextp=<optimized out>) at /data/bld/11.4-asan-ubsan/sql/sp_instr.cc:1072
      #25 0x000055c941827025 in sp_head::execute (this=this@entry=0x625000253138, thd=thd@entry=0x62c0000b0218, merge_da_on_success=merge_da_on_success@entry=false) at /data/bld/11.4-asan-ubsan/sql/sp_head.cc:1326
      #26 0x000055c94182ce68 in sp_head::execute_trigger (this=this@entry=0x625000253138, thd=thd@entry=0x62c0000b0218, db_name=db_name@entry=0x62500024e528, table_name=table_name@entry=0x62500024e538, grant_info=grant_info@entry=0x625000251a00) at /data/bld/11.4-asan-ubsan/sql/sp_head.cc:1839
      #27 0x000055c942297a7d in Table_triggers_list::process_triggers (this=this@entry=0x625000251438, thd=thd@entry=0x62c0000b0218, event=event@entry=TRG_EVENT_INSERT, time_type=time_type@entry=TRG_ACTION_BEFORE, old_row_is_record1=old_row_is_record1@entry=true) at /data/bld/11.4-asan-ubsan/sql/sql_trigger.cc:2540
      #28 0x000055c941975045 in fill_record_n_invoke_before_triggers (thd=thd@entry=0x62c0000b0218, table=table@entry=0x61900005a598, ptr=0x625000251170, values=..., ignore_errors=ignore_errors@entry=false, event=event@entry=TRG_EVENT_INSERT) at /data/bld/11.4-asan-ubsan/sql/sql_base.cc:9572
      #29 0x000055c941b6d089 in mysql_insert (thd=thd@entry=0x62c0000b0218, table_list=<optimized out>, fields=..., values_list=..., update_fields=..., update_values=..., duplic=<optimized out>, ignore=<optimized out>, result=<optimized out>) at /data/bld/11.4-asan-ubsan/sql/sql_insert.cc:1177
      #30 0x000055c941d03c38 in mysql_execute_command (thd=thd@entry=0x62c0000b0218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/bld/11.4-asan-ubsan/sql/sql_parse.cc:4515
      #31 0x000055c941d1b6f4 in mysql_parse (thd=thd@entry=0x62c0000b0218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fe076f869f0) at /data/bld/11.4-asan-ubsan/sql/sql_parse.cc:7941
      #32 0x000055c941d24a07 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62c0000b0218, packet=packet@entry=0x629000253219 "INSERT INTO t1 VALUES (1)", packet_length=packet_length@entry=25, blocking=blocking@entry=true) at /data/bld/11.4-asan-ubsan/sql/sql_parse.cc:1925
      #33 0x000055c941d30f17 in do_command (thd=thd@entry=0x62c0000b0218, blocking=blocking@entry=true) at /data/bld/11.4-asan-ubsan/sql/sql_parse.cc:1433
      #34 0x000055c9425573e4 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x608000003a38, put_in_cache=put_in_cache@entry=true) at /data/bld/11.4-asan-ubsan/sql/sql_connect.cc:1508
      #35 0x000055c942558541 in handle_one_connection (arg=0x608000003a38) at /data/bld/11.4-asan-ubsan/sql/sql_connect.cc:1420
      #36 0x000055c943f712f5 in pfs_spawn_thread (arg=0x617000005f18) at /data/bld/11.4-asan-ubsan/storage/perfschema/pfs.cc:2201
      #37 0x00007fe083ca71f5 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #38 0x00007fe083d278ec in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      No visible error on a non-debug build.

      The failure started happening after a set of commits for MDEV-5816 in 11.2.

      Attachments

        Issue Links

          Activity

            People

              shulga Dmitry Shulga
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.