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

ROW_NUMBER in SIGNAL/RESIGNAL causes a syntax error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 10.7.1
    • Parser
    • 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

              rucha174 Rucha Deodhar
              elenst Elena Stepanova
              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.