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

parse keywords followed by a dot as keywords

    XMLWordPrintable

Details

    Description

      Keywords immediately followed by a dot character are parsed as identifiers. So, e.g., this generates a syntax error:

      MariaDB [test]> SELECT.1;
      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 'SELECT.1' at line 1
      

      This does not conform to the SQL standard. It should be normally parsed as equivalent to:

      SELECT .1;
      

      Note, other databases do understand this syntax:

      Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
       
      SQL> SELECT.1 FROM DUAL;
       
      	.1
      ----------
      	.1
      SQL> 
      

      psql (9.4.9)
      Type "help" for help.
       
      bar=> SELECT.1;
       ?column? 
      ----------
            0.1
      (1 row)
      

      More test cases:

      MariaDB [test]> select select.1a from test.select;
      +------+
      | 1a   |
      +------+
      |   10 |
      +------+
      1 row in set (0.001 sec)
       
      MariaDB [test]> select .1a;
      +-----+
      | a   |
      +-----+
      | 0.1 |
      +-----+
      1 row in set (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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