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

Syntax error in ond SP results in misleading message on SHOW CREATE PROCEDURE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.4(EOL), 10.5
    • 10.4.16, 10.5.7
    • OTHER
    • None

    Description

      DELIMITER $$;
       
      CREATE PROCEDURE P1 ()
      BEGIN NOT ATOMIC
        IF (SELECT 2) THEN
          SELECT 4;
        END IF ;
      END;
      $$
       
      DELIMITER ;$$
       
      select name,db,body from mysql.proc where name = "P1";
      update mysql.proc set body_utf8="BEGIN NOT ATOMIC
      IF (SELECT 2) OR foo = 3 THEN
      SELECT 4;
      END IF ;
      END", body="BEGIN NOT ATOMIC
      IF (SELECT 2) OR foo = 3 THEN
      SELECT 4;
      END IF ;
      END"where name = "P1";
       
      show create procedure P1;
       
      drop procedure P1;
      

      mysqltest: At line 25: query 'show create procedure P1' failed: 1457: Failed to load routine test.P1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              sanja Oleksandr Byelkin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.