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

Abnormal server termination on second execution of stored routine that runs a cursor after table metadata in the query was changed

Details

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

    Description

      The following test case breaks the server.
      The test is borrowed from comments to the task MDEV-36114

      CREATE TABLE t (a INT);
       
      --delimiter $
      CREATE PROCEDURE p() 
      BEGIN 
      	DECLARE cur CURSOR FOR SELECT * FROM t;
      	BEGIN 
      		DECLARE rec ROW(a INT,b INT) DEFAULT ROW(0,0);
      		DECLARE rec2 ROW TYPE OF cur DEFAULT rec;
      	END;
      END
      $
       
      --delimiter ;
      --ERROR ER_OPERAND_COLUMNS
      CALL p();
      CREATE OR REPLACE TABLE t (a INT);
      CALL p();
      
      

      Attachments

        Activity

          There are no comments yet on this issue.

          People

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