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

JSON has become a reserved word in MariaDB

    XMLWordPrintable

    Details

      Description

      In MySQL, JSON is not a reserved word, but in MariaDB it is.

      MySQL 5.7

      MariaDB [test]> CREATE TABLE json (j INT);
      Query OK, 0 rows affected (0.54 sec)
       
      MariaDB [test]> CREATE TABLE j (json INT);
      Query OK, 0 rows affected (0.37 sec)
      

      MariaDB 10.2

      MariaDB [test]> CREATE TABLE json (j INT);
      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 'json (j INT)' at line 1
      MariaDB [test]> CREATE TABLE j (json INT);
      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 'json INT)' at line 1
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: