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

Assertion `is_invalidated()' failed in Reprepare_observer::can_retry on 2nd execute of SP after recreation

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 11.2
    • 11.2
    • Stored routines
    • None

    Description

      CREATE TABLE t1 (a INT);
      INSERT INTO t1 VALUES (1),(2);
      CREATE TABLE t2 (b INT);
      INSERT INTO t2 VALUES (3),(4);
      CREATE TABLE t3 (c INT);
      INSERT INTO t3 VALUES (5),(6);
       
      CREATE PROCEDURE sp() CREATE OR REPLACE TEMPORARY TABLE tmp (a INT);
      CALL sp;
      CALL sp;
       
      CREATE OR REPLACE PROCEDURE sp() UPDATE IGNORE t1, t2 SET t2.b = 0 WHERE t2.b = (SELECT c FROM t3);
      CALL sp;
      CALL sp;
       
      # Cleanup
      DROP PROCEDURE sp;
      DROP TABLE t1, t2, t3;
      

      11.2 00089ead

      mariadbd: /data/src/11.2/sql/sql_prepare.h:72: bool Reprepare_observer::can_retry() const: Assertion `is_invalidated()' failed.
      230807 20:07:54 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f0e0f653df2 in __GI___assert_fail (assertion=0x562b0a5ca900 "is_invalidated()", file=0x562b0a5ca8a0 "/data/src/11.2/sql/sql_prepare.h", line=72, function=0x562b0a5ca840 "bool Reprepare_observer::can_retry() const") at ./assert/assert.c:101
      #10 0x0000562b085cf2df in Reprepare_observer::can_retry (this=0x7f0e07e36830) at /data/src/11.2/sql/sql_prepare.h:72
      #11 0x0000562b08bafff6 in sp_lex_keeper::validate_lex_and_exec_core (this=0x6250001a84c8, thd=0x62c0000c0218, nextp=0x7f0e07e36be0, open_tables=false, instr=0x6250001a8490) at /data/src/11.2/sql/sp_instr.cc:498
      #12 0x0000562b08bb219e in sp_instr_stmt::execute (this=0x6250001a8490, thd=0x62c0000c0218, nextp=0x7f0e07e36be0) at /data/src/11.2/sql/sp_instr.cc:850
      #13 0x0000562b082b17a1 in sp_head::execute (this=0x6250001a19b8, thd=0x62c0000c0218, merge_da_on_success=true) at /data/src/11.2/sql/sp_head.cc:1280
      #14 0x0000562b082b7826 in sp_head::execute_procedure (this=0x6250001a19b8, thd=0x62c0000c0218, args=0x62c0000c5678) at /data/src/11.2/sql/sp_head.cc:2267
      #15 0x0000562b085133a3 in do_execute_sp (thd=0x62c0000c0218, sp=0x6250001a19b8) at /data/src/11.2/sql/sql_parse.cc:3024
      #16 0x0000562b08514f1e in Sql_cmd_call::execute (this=0x6290000e6300, thd=0x62c0000c0218) at /data/src/11.2/sql/sql_parse.cc:3269
      #17 0x0000562b0852738e in mysql_execute_command (thd=0x62c0000c0218, is_called_from_prepared_stmt=false) at /data/src/11.2/sql/sql_parse.cc:5766
      #18 0x0000562b0853422b in mysql_parse (thd=0x62c0000c0218, rawbuf=0x6290000e6238 "CALL sp", length=7, parser_state=0x7f0e07e389f0) at /data/src/11.2/sql/sql_parse.cc:7800
      #19 0x0000562b0850c77e in dispatch_command (command=COM_QUERY, thd=0x62c0000c0218, packet=0x629000258219 "CALL sp", packet_length=7, blocking=true) at /data/src/11.2/sql/sql_parse.cc:1892
      #20 0x0000562b085094bb in do_command (thd=0x62c0000c0218, blocking=true) at /data/src/11.2/sql/sql_parse.cc:1405
      #21 0x0000562b089cc2ae in do_handle_one_connection (connect=0x608000002eb8, put_in_cache=true) at /data/src/11.2/sql/sql_connect.cc:1445
      #22 0x0000562b089cbc6f in handle_one_connection (arg=0x608000002e38) at /data/src/11.2/sql/sql_connect.cc:1347
      #23 0x0000562b095eac24 in pfs_spawn_thread (arg=0x617000005b98) at /data/src/11.2/storage/perfschema/pfs.cc:2201
      #24 0x00007f0e0f6a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #25 0x00007f0e0f7285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

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

      Attachments

        Issue Links

          Activity

            People

              shulga Dmitry Shulga
              elenst Elena Stepanova
              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.