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

Spider: Assertion `! is_set() || m_can_overwrite_status' failed in Diagnostics_area::set_error_status from Reprepare_observer::report_error on PS EXECUTE

    XMLWordPrintable

    Details

      Description

      INSTALL PLUGIN spider SONAME 'ha_spider.so';
      CREATE TABLE t (b INT) ENGINE=InnoDB;
      PREPARE s FROM 'SELECT * FROM t LIMIT 2';
      DROP TABLE t;
      CREATE TABLE t (a INT) ENGINE=Spider PARTITION BY LIST (a) PARTITIONS 2 (PARTITION p1 VALUES IN (0,1),PARTITION p2 VALUES IN (2,3));
      EXECUTE s;
      

      Leads to:

      10.9.0 5be92887c2caacb45af87b1131db952ce627e83a (Debug)

      mysqld: /test/10.9_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.9.0 5be92887c2caacb45af87b1131db952ce627e83a (Debug)

      Core was generated by `/test/MD160322-mariadb-10.9.0-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 0x147304165700 (LWP 3357771))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x00001473193fe859 in __GI_abort () at abort.c:79
      #2  0x00001473193fe729 in __assert_fail_base (fmt=0x147319594588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x558f9038efa8 "! is_set() || m_can_overwrite_status", file=0x558f9038ed18 "/test/10.9_dbg/sql/sql_error.cc", line=457, function=<optimized out>) at assert.c:92
      #3  0x0000147319410006 in __GI___assert_fail (assertion=assertion@entry=0x558f9038efa8 "! is_set() || m_can_overwrite_status", file=file@entry=0x558f9038ed18 "/test/10.9_dbg/sql/sql_error.cc", line=line@entry=457, function=function@entry=0x558f9038ef20 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at assert.c:101
      #4  0x0000558f8f665f9f in Diagnostics_area::set_error_status (this=this@entry=0x1472c4006d20, sql_errno=sql_errno@entry=1615, message=0x558f90513620 "Prepared statement needs to be re-prepared", sqlstate=sqlstate@entry=0x558f903afa28 "HY000", ucid=@0x147304162fe8: {m_user_condition_value = 0x0}, error_condition=error_condition@entry=0x0) at /test/10.9_dbg/sql/sql_error.h:1019
      #5  0x0000558f8f666137 in Diagnostics_area::set_error_status (this=0x1472c4006d20, sql_errno=sql_errno@entry=1615) at /test/10.9_dbg/sql/sql_error.h:217
      #6  0x0000558f8f6e9517 in Reprepare_observer::report_error (this=0x147304163d4f, thd=thd@entry=0x1472c4000db8) at /test/10.9_dbg/sql/sql_class.h:4344
      #7  0x0000558f8f61dbc1 in check_and_update_table_version (thd=thd@entry=0x1472c4000db8, tables=tables@entry=0x1472c405d880, table_share=0x1472c40d0540) at /test/10.9_dbg/sql/sql_base.cc:2828
      #8  0x0000558f8f628a89 in open_and_process_table (ot_ctx=0x147304163140, has_prelocking_list=false, prelocking_strategy=0x147304163260, flags=0, counter=0x1473041631dc, tables=0x1472c405d880, thd=0x1472c4000db8) at /test/10.9_dbg/sql/sql_base.cc:3871
      #9  open_tables (thd=thd@entry=0x1472c4000db8, options=@0x1472c405cc00: {m_options = DDL_options_st::OPT_NONE}, start=start@entry=0x1473041631c8, counter=counter@entry=0x1473041631dc, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x147304163260) at /test/10.9_dbg/sql/sql_base.cc:4292
      #10 0x0000558f8f629a49 in open_and_lock_tables (thd=thd@entry=0x1472c4000db8, options=@0x1472c405cc00: {m_options = DDL_options_st::OPT_NONE}, tables=<optimized out>, tables@entry=0x1472c405d880, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x147304163260) at /test/10.9_dbg/sql/sql_base.cc:5265
      #11 0x0000558f8f6b2de4 in open_and_lock_tables (flags=0, derived=true, tables=0x1472c405d880, thd=0x1472c4000db8) at /test/10.9_dbg/sql/sql_base.h:509
      #12 execute_sqlcom_select (thd=thd@entry=0x1472c4000db8, all_tables=0x1472c405d880) at /test/10.9_dbg/sql/sql_parse.cc:6173
      #13 0x0000558f8f6c01ad in mysql_execute_command (thd=0x1472c4000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:3943
      #14 0x0000558f8f6ed7a6 in Prepared_statement::execute (this=this@entry=0x1472c4056b08, expanded_query=expanded_query@entry=0x147304163db0, open_cursor=open_cursor@entry=false) at /test/10.9_dbg/sql/sql_prepare.cc:5211
      #15 0x0000558f8f6edb27 in Prepared_statement::execute_loop (this=this@entry=0x1472c4056b08, expanded_query=expanded_query@entry=0x147304163db0, open_cursor=open_cursor@entry=false, packet=packet@entry=0x0, packet_end=packet_end@entry=0x0) at /test/10.9_dbg/sql/sql_prepare.cc:4634
      #16 0x0000558f8f6ee057 in mysql_sql_stmt_execute (thd=thd@entry=0x1472c4000db8) at /test/10.9_dbg/sql/sql_prepare.cc:3684
      #17 0x0000558f8f6c020a in mysql_execute_command (thd=thd@entry=0x1472c4000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_parse.cc:3959
      #18 0x0000558f8f6ac437 in mysql_parse (thd=thd@entry=0x1472c4000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x147304164400) at /test/10.9_dbg/sql/sql_parse.cc:8027
      #19 0x0000558f8f6bb0d3 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1472c4000db8, packet=packet@entry=0x1472c400b889 "EXECUTE s", packet_length=packet_length@entry=9, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1362
      #20 0x0000558f8f6be51a in do_command (thd=0x1472c4000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1402
      #21 0x0000558f8f839228 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x558f92ea4428, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
      #22 0x0000558f8f83982d in handle_one_connection (arg=arg@entry=0x558f92ea4428) at /test/10.9_dbg/sql/sql_connect.cc:1312
      #23 0x0000558f8fcbff23 in pfs_spawn_thread (arg=0x558f92db79b8) at /test/10.9_dbg/storage/perfschema/pfs.cc:2201
      #24 0x000014731990f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x00001473194fb163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.25 (dbg), 10.5.16 (dbg), 10.6.8 (dbg), 10.7.4 (dbg), 10.8.3 (dbg), 10.9.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.25 (opt), 10.5.16 (opt), 10.6.8 (opt), 10.7.4 (opt), 10.8.3 (opt), 10.9.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.37 (dbg), 5.7.37 (opt), 8.0.28 (dbg), 8.0.28 (opt)

      Possibly also present in 10.2-10.3. Alternatively, may be a regression.

        Attachments

          Activity

            People

            Assignee:
            nayuta-yanagisawa Nayuta Yanagisawa
            Reporter:
            Roel Roel Van de Paar
            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.