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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.4, 10.5
    • Fix Version/s: 10.4.16, 10.5.7
    • Component/s: OTHER
    • Labels:
      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

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

                Dates

                Created:
                Updated:
                Resolved: