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

sql_mode=oracle: errors "Undefined CURSOR" AND "check ... right syntax to use near '%"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.3
    • N/A
    • Parser
    • None

    Description

      set sql_mode=oracle;
      MariaDB [test]> SELECT 5%5 from dual;
      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 '%5 from dual' at line 1
      MariaDB [test]> wait_timeout:=102411111%1023;
      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 '%1023' at line 1
      MariaDB [test]> select 1 from seq_1_to_2 where seq % 5;
      ERROR 1324 (42000): Undefined CURSOR: seq
      

      Without oracle mode it works properly:

      MariaDB [test]> select 1 from seq_1_to_2 where seq % 5;
      +---+
      | 1 |
      +---+
      | 1 |
      | 1 |
      +---+
      2 rows in set (0.00 sec)
       
      MariaDB [test]> SELECT 5%5;
      +------+
      | 5%5  |
      +------+
      |    0 |
      +------+
      1 row in set (0.00 sec)
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              anikitin Andrii Nikitin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.