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

ROW_NUMBER in SIGNAL/RESIGNAL causes a syntax error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: 10.7.1
    • Component/s: Parser
    • Labels:
      None

      Description

      DROP TABLE t1;
      delimiter $
      BEGIN NOT ATOMIC
        DECLARE EXIT HANDLER FOR SQLEXCEPTION
          SIGNAL SQLSTATE '45000' SET ROW_NUMBER= 5;
        DROP TABLE t1;
      END $
      delimiter ;
      

      bb-10.7-row_number cb9002bee

      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ROW_NUMBER= 5;
        DROP TABLE t1;
      

      Same with RESIGNAL.

      An example of a working diagnostics property:

      MariaDB [test]> delimiter ;
      MariaDB [test]> DROP TABLE t1;
      ERROR 1051 (42S02): Unknown table 'test.t1'
      MariaDB [test]> delimiter $
      MariaDB [test]> BEGIN NOT ATOMIC
          ->   DECLARE EXIT HANDLER FOR SQLEXCEPTION
          ->     SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT= 'my signal here';
          ->   DROP TABLE t1;
          -> END $
      ERROR 1644 (45000): my signal here
      MariaDB [test]> delimiter ;
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rucha174 Rucha Deodhar
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration