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

LP:1010351 - New "via" keyword in 5.2+ can't be used as identifier anymore

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      The new VIA keyword used for "... IDENTIFIED VIA <plugin> ..." can't be used as table or column name anymore although there should be no ambiguities about whether it is meant as a keyword or as an identifier in any context.

      Looks as it was simply overlooked to add it to the "keyword:" list in sql_yacc.cc?

      Adding it there does not procude any additional bison conflicts:

      === modified file 'sql/sql_yacc.yy'
      — sql/sql_yacc.yy 2012-03-27 23:04:46 +0000
      +++ sql/sql_yacc.yy 2012-06-07 21:28:39 +0000
      @@ -12950,6 +12950,7 @@

      TRUNCATE_SYM {}
      UNICODE_SYM {}
      UNINSTALL_SYM {}
      +
      VIA_SYM {}
      WRAPPER_SYM {}
      XA_SYM {}
      UPGRADE_SYM {}

      Adding it to the keyword_sp: list, too (for keywords that may be used as stored procedure labels) makes bison unhappy though

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            hholzgra Hartmut Holzgraefe added a comment -

            unmangled patch
            LPexportBug1010351_via-patch

            Show
            hholzgra Hartmut Holzgraefe added a comment - unmangled patch LPexportBug1010351_via-patch
            Hide
            hholzgra Hartmut Holzgraefe added a comment -

            Re: New "via" keyword in 5.2+ can't be used as identifier anymore

            Show
            hholzgra Hartmut Holzgraefe added a comment - Re: New "via" keyword in 5.2+ can't be used as identifier anymore
            Hide
            psergey Sergei Petrunia added a comment -

            Re: New "via" keyword in 5.2+ can't be used as identifier anymore
            > Adding it to the keyword_sp: list, too (for keywords that may be used as stored procedure labels) makes bison unhappy though

            The problem is that keyword includes keyword_sp:

            keyword:
            keyword_sp {}

            if one adds the same token to both keyword and keyword_sp, they will get reduce/reduce conflicts because bison will not know whether to reduce the token to 'keyword' directly or go through 'keyword_sp'.

            I've tried adding VIA_SYM just to keyword_sp, and it worked.

            Show
            psergey Sergei Petrunia added a comment - Re: New "via" keyword in 5.2+ can't be used as identifier anymore > Adding it to the keyword_sp: list, too (for keywords that may be used as stored procedure labels) makes bison unhappy though The problem is that keyword includes keyword_sp: keyword: keyword_sp {} if one adds the same token to both keyword and keyword_sp, they will get reduce/reduce conflicts because bison will not know whether to reduce the token to 'keyword' directly or go through 'keyword_sp'. I've tried adding VIA_SYM just to keyword_sp, and it worked.
            Hide
            psergey Sergei Petrunia added a comment -

            Re: New "via" keyword in 5.2+ can't be used as identifier anymore
            http://lists.askmonty.org/pipermail/commits/2012-June/003400.html

            Show
            psergey Sergei Petrunia added a comment - Re: New "via" keyword in 5.2+ can't be used as identifier anymore http://lists.askmonty.org/pipermail/commits/2012-June/003400.html
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 1010351

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 1010351

              People

              • Assignee:
                psergey Sergei Petrunia
                Reporter:
                hholzgra Hartmut Holzgraefe
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: