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

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

    XMLWordPrintable

Details

    Description

      The same assert as in MDEV-22768, but looks otherwise unrelated.

      # mysqld options required for replay:  --maximum-sort_buffer_size=1M
      SET SESSION sql_mode='traditional';
      CREATE TABLE t (c CHAR(1024) PARTITION BY RANGE COLUMNs(a)(PARTITION p0 VALUES LESS THAN(),PARTITION p1 VALUES LESS THAN(),PARTITION p2 VALUES LESS THAN());
      SET STATEMENT sort_buffer_size=150000 FOR SELECT 1;
      

      Leads to:

      10.8.1 0c5d1342ae6b5ab3256848be7a83e5c3b1f21566 (Debug)

      mysqld: /test/10.8_dbg/sql/sql_error.cc:457: 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.8.1 0c5d1342ae6b5ab3256848be7a83e5c3b1f21566 (Debug)

      Core was generated by `/test/MD290122-mariadb-10.8.1-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x1477d8083700 (LWP 1536768))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x00001477e14e7859 in __GI_abort () at abort.c:79
      #2  0x00001477e14e7729 in __assert_fail_base (fmt=0x1477e167d588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55b052ea7e28 "! is_set() || m_can_overwrite_status", file=0x55b052ea7b98 "/test/10.8_dbg/sql/sql_error.cc", line=457, function=<optimized out>) at assert.c:92
      #3  0x00001477e14f8f36 in __GI___assert_fail (assertion=assertion@entry=0x55b052ea7e28 "! is_set() || m_can_overwrite_status", file=file@entry=0x55b052ea7b98 "/test/10.8_dbg/sql/sql_error.cc", line=line@entry=457, function=function@entry=0x55b052ea7da0 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at assert.c:101
      #4  0x000055b052184a3f in Diagnostics_area::set_error_status (this=this@entry=0x147758006d20, sql_errno=sql_errno@entry=1231, message=message@entry=0x1477d8081bc0 "Variable 'sort_buffer_size' can't be set to the value of '2097152'", sqlstate=sqlstate@entry=0x55b052ec88f0 "42000", ucid=@0x1477d8081960: {m_user_condition_value = 0x0}, error_condition=0x0) at /test/10.8_dbg/sql/sql_error.h:1019
      #5  0x000055b05215e02b in THD::raise_condition (this=this@entry=0x147758000db8, cond=cond@entry=0x1477d8081950) at /test/10.8_dbg/sql/sql_class.cc:1121
      #6  0x000055b0520958dc in THD::raise_condition (this=this@entry=0x147758000db8, sql_errno=sql_errno@entry=1231, sqlstate=sqlstate@entry=0x55b052e85878 "", level=<optimized out>, msg=msg@entry=0x1477d8081bc0 "Variable 'sort_buffer_size' can't be set to the value of '2097152'") at /test/10.8_dbg/sql/sql_class.h:4818
      #7  0x000055b052087a6f in my_message_sql (error=1231, str=0x1477d8081bc0 "Variable 'sort_buffer_size' can't be set to the value of '2097152'", MyFlags=0) at /test/10.8_dbg/sql/mysqld.cc:3279
      #8  0x000055b052cf7836 in my_error (nr=nr@entry=1231, MyFlags=MyFlags@entry=0) at /test/10.8_dbg/mysys/my_error.c:124
      #9  0x000055b0520da1ec in throw_bounds_warning (thd=thd@entry=0x147758000db8, name=0x55b052ee852c "sort_buffer_size", fixed=fixed@entry=true, is_unsigned=<optimized out>, v=v@entry=2097152) at /test/10.8_dbg/sql/set_var.cc:485
      #10 0x000055b052385093 in Sys_var_integer<unsigned long long, 8ul, (enum_mysql_show_type)4>::do_check (this=0x55b05383e580 <Sys_sort_buffer>, thd=0x147758000db8, var=0x14775801d268) at /test/10.8_dbg/sql/set_var.h:258
      #11 0x000055b0520d9003 in sys_var::check (this=0x55b05383e580 <Sys_sort_buffer>, thd=thd@entry=0x147758000db8, var=var@entry=0x14775801d268) at /test/10.8_dbg/sql/set_var.cc:246
      #12 0x000055b0520da056 in set_var::check (this=0x14775801d268, thd=0x147758000db8) at /test/10.8_dbg/sql/set_var.cc:810
      #13 0x000055b0520da766 in sql_set_variables (thd=0x147758000db8, var_list=var_list@entry=0x147758006110, free=free@entry=false) at /test/10.8_dbg/sql/set_var.cc:738
      #14 0x000055b0521a6c5f in LEX::restore_set_statement_var (this=0x1477580050f0) at /test/10.8_dbg/sql/sql_lex.cc:5911
      #15 0x000055b0521dbf80 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x147758000db8, packet=<optimized out>, packet@entry=0x14775800b889 "", packet_length=packet_length@entry=50, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_parse.cc:2468
      #16 0x000055b0521dce9a in do_command (thd=0x147758000db8, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_parse.cc:1402
      #17 0x000055b052358110 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55b055c15fb8, put_in_cache=put_in_cache@entry=true) at /test/10.8_dbg/sql/sql_connect.cc:1418
      #18 0x000055b052358715 in handle_one_connection (arg=arg@entry=0x55b055c15fb8) at /test/10.8_dbg/sql/sql_connect.cc:1312
      #19 0x000055b0527e1c8e in pfs_spawn_thread (arg=0x55b055b290f8) at /test/10.8_dbg/storage/perfschema/pfs.cc:2201
      #20 0x00001477e19f6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x00001477e15e4293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.42 (dbg), 10.3.33 (dbg), 10.4.23 (dbg), 10.5.14 (dbg), 10.6.6 (dbg), 10.7.2 (dbg), 10.8.1 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.42 (opt), 10.3.33 (opt), 10.4.23 (opt), 10.5.14 (opt), 10.6.6 (opt), 10.7.2 (opt), 10.8.1 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.36 (dbg), 5.7.36 (opt), 8.0.27 (dbg), 8.0.27 (opt)

      Attachments

        Activity

          People

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