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

Some reserved keywords (like OPTION) are not enforced

    XMLWordPrintable

Details

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

    Description

      Hi,

      some reserved keywords from https://mariadb.com/kb/en/mariadb/reserved-words/ don't seem to be enforced.

      Following query works in MariaDB:

      MariaDB [test]> CREATE table OPTION (OPTION int);
      Query OK, 0 rows affected (0.01 sec)
      

      ... and fails in MySQL (5.6 tested):

      mysql> CREATE table OPTION (OPTION int);
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION (OPTION int)' at line 1
      

      This can cause compatibility problems (ex: I develop on MariaDB, and production is on MySQL)
      Is this intended ?

      List of reserved keywords that are not enforced:

      • GENERAL
      • IGNORE_SERVER_IDS
      • MASTER_HEARTBEAT_PERIOD
      • OPTION
      • SLOW

      Thanks in advance,
      Joffrey

      Attachments

        Activity

          People

            serg Sergei Golubchik
            joffrey Joffrey MICHAIE (Inactive)
            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.