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

FUNCTION declaration fails with ERROR 1064 (error in SQL) when using oracle sql_mode and OUT parameter

    XMLWordPrintable

Details

    Description

      10.8.0 aff084d139a9fca9d569fedd9ec80bd9576614b1 preview-10.8-MDEV-10654-inout-params

      10.8.0>SET sql_mode='';  # Optional, here to show the clear difference oracle mode makes
      Query OK, 0 rows affected (0.000 sec)
       
      10.8.0>DELIMITER #
      10.8.0>CREATE FUNCTION f(OUT c INT) RETURNS INT BEGIN SET c=1; RETURN c; END; #
      Query OK, 0 rows affected (0.010 sec)
       
      10.8.0>DELIMITER ;
      

      Yet

      10.8.0 aff084d139a9fca9d569fedd9ec80bd9576614b1 preview-10.8-MDEV-10654-inout-params

      10.8.0>SET sql_mode='oracle';
      Query OK, 0 rows affected (0.000 sec)
       
      10.8.0>DELIMITER #
      10.8.0>CREATE FUNCTION f(OUT c INT) RETURNS INT BEGIN SET c=1; RETURN c; END; #
      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 'OUT c INT) RETURNS INT BEGIN SET c=1; RETURN c; END' at line 1
      10.8.0>DELIMITER ;
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 35m
                  35m

                  Git Integration

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