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

Assertion `! is_set() || m_can_overwrite_status' failed in Diagnostics_area::set_error_status

    XMLWordPrintable

    Details

      Description

      --source include/have_log_bin.inc
      --source include/have_innodb.inc
       
      USE test;
      SET SQL_MODE='';
      SET AUTOCOMMIT=0;
      CREATE TABLE t(c CHAR (0)) ENGINE=InnoDB;
      SET STATEMENT gtid_domain_id=0 FOR INSERT INTO t VALUES(0),(0);
      SET GLOBAL init_connect="SET @a=0";
      

      Leads to:

      10.5.4 8569dac1ec9f6853a0b2f3ea9bcbda67644ead24

      mysqld: /test/10.5_dbg/sql/sql_error.cc:445: 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.
      

      10.5.4 8569dac1ec9f6853a0b2f3ea9bcbda67644ead24

      Core was generated by `/test/MD260520-mariadb-10.5.4-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x1489f44f0700 (LWP 114766))]
      (gdb) bt
      (gdb) (gdb) #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000559d77034d7a in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x0000559d767da385 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00001489f2c34801 in __GI_abort () at abort.c:79
      #6  0x00001489f2c2439a in __assert_fail_base (fmt=0x1489f2dab7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x559d771aa1d0 "! is_set() || m_can_overwrite_status", file=file@entry=0x559d771aa140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=445, function=function@entry=0x559d771aabe0 <Diagnostics_area::set_error_status(unsigned int, char const*, char const*, Sql_user_condition_identity const&, Sql_condition const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at assert.c:92
      #7  0x00001489f2c24412 in __GI___assert_fail (assertion=assertion@entry=0x559d771aa1d0 "! is_set() || m_can_overwrite_status", file=file@entry=0x559d771aa140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=445, function=function@entry=0x559d771aabe0 <Diagnostics_area::set_error_status(unsigned int, char const*, char const*, Sql_user_condition_identity const&, Sql_condition const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at assert.c:101
      #8  0x0000559d764e65ee in Diagnostics_area::set_error_status (this=this@entry=0x1489d201ab90, sql_errno=sql_errno@entry=1953, message=message@entry=0x1489f44eeab0 "Cannot modify @@session.gtid_domain_id or @@session.gtid_seq_no inside a transaction", sqlstate=sqlstate@entry=0x559d771cb8c8 "HY000", ucid=@0x1489f44eea08: {m_user_condition_value = 0x0}, error_condition=0x0) at /test/10.5_dbg/sql/sql_error.cc:445
      #9  0x0000559d764c84e0 in THD::raise_condition (this=this@entry=0x1489d2015088, sql_errno=sql_errno@entry=1953, sqlstate=0x559d771cb8c8 "HY000", sqlstate@entry=0x0, level=<optimized out>, ucid=@0x1489f44eea08: {m_user_condition_value = 0x0}, msg=msg@entry=0x1489f44eeab0 "Cannot modify @@session.gtid_domain_id or @@session.gtid_seq_no inside a transaction") at /test/10.5_dbg/sql/sql_class.cc:1135
      #10 0x0000559d7642c102 in THD::raise_condition (msg=0x1489f44eeab0 "Cannot modify @@session.gtid_domain_id or @@session.gtid_seq_no inside a transaction", level=<optimized out>, sqlstate=0x0, sql_errno=1953, this=0x1489d2015088) at /test/10.5_dbg/sql/sql_class.h:4504
      #11 my_message_sql (error=1953, str=0x1489f44eeab0 "Cannot modify @@session.gtid_domain_id or @@session.gtid_seq_no inside a transaction", MyFlags=0) at /test/10.5_dbg/sql/mysqld.cc:3110
      #12 0x0000559d7702975e in my_error (nr=nr@entry=1953, MyFlags=MyFlags@entry=0) at /test/10.5_dbg/mysys/my_error.c:125
      #13 0x0000559d76698fac in error_if_in_trans_or_substatement (thd=<optimized out>, in_substatement_error=in_substatement_error@entry=1954, in_transaction_error=in_transaction_error@entry=1953) at /test/10.5_dbg/sql/sys_vars.cc:582
      #14 0x0000559d7669901c in check_gtid_domain_id (self=<optimized out>, thd=<optimized out>, var=<optimized out>) at /test/10.5_dbg/sql/sys_vars.cc:1777
      #15 0x0000559d76448e4a in sys_var::check (this=0x559d77dac760 <Sys_gtid_domain_id>, thd=thd@entry=0x1489d2015088, var=var@entry=0x1489d2051258) at /test/10.5_dbg/sql/set_var.cc:246
      #16 0x0000559d76449eda in set_var::check (this=0x1489d2051258, thd=0x1489d2015088) at /test/10.5_dbg/sql/set_var.cc:811
      #17 0x0000559d7644a606 in sql_set_variables (thd=0x1489d2015088, var_list=var_list@entry=0x1489d2019fe0, free=free@entry=false) at /test/10.5_dbg/sql/set_var.cc:739
      #18 0x0000559d765075cd in LEX::restore_set_statement_var (this=0x1489d2018fd8) at /test/10.5_dbg/sql/sql_lex.cc:5720
      #19 0x0000559d7652c365 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1489d2015088, packet=<optimized out>, packet@entry=0x1489d2067089 "", packet_length=<optimized out>, packet_length@entry=62, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:2525
      #20 0x0000559d7652831c in do_command (thd=0x1489d2015088) at /test/10.5_dbg/sql/sql_parse.cc:1355
      #21 0x0000559d7668273f in do_handle_one_connection (connect=<optimized out>, connect@entry=0x1489d34453a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
      #22 0x0000559d76682e5b in handle_one_connection (arg=arg@entry=0x1489d34453a8) at /test/10.5_dbg/sql/sql_connect.cc:1313
      #23 0x0000559d76ae214e in pfs_spawn_thread (arg=0x1489f2045888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #24 0x00001489f39176db in start_thread (arg=0x1489f44f0700) at pthread_create.c:463
      #25 0x00001489f2d1588f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.1.46 (dbg), 10.2.33 (dbg), 10.3.24 (dbg), 10.4.14 (dbg), 10.5.4 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.46 (opt), 10.2.33 (opt), 10.3.24 (opt), 10.4.14 (opt), 10.5.4 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rucha174 Rucha Deodhar
              Reporter:
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.