You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Thomas Boucher (JIRA)" <ji...@apache.org> on 2016/07/23 21:09:20 UTC

[jira] [Commented] (CASSANDRA-12154) "SELECT * FROM foo LIMIT ;" does not error out

    [ https://issues.apache.org/jira/browse/CASSANDRA-12154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15390847#comment-15390847 ] 

Thomas Boucher commented on CASSANDRA-12154:
--------------------------------------------

Hello,

I think this is due to a typo in Parser.g:
{code}
intValue returns [Term.Raw value]
    : 
    | t=INTEGER     { $value = Constants.Literal.integer($t.text); }
    | ':' id=noncol_ident  { $value = newBindVariables(id); }
    | QMARK         { $value = newBindVariables(null); }
    ;
{code}
should be
{code}
intValue returns [Term.Raw value]
    : t=INTEGER     { $value = Constants.Literal.integer($t.text); }
    | ':' id=noncol_ident  { $value = newBindVariables(id); }
    | QMARK         { $value = newBindVariables(null); }
    ;
{code}

With this change, I get an error with {{SELECT * FROM test LIMIT;}}, as expected.

> "SELECT * FROM foo LIMIT ;" does not error out
> ----------------------------------------------
>
>                 Key: CASSANDRA-12154
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12154
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>            Reporter: Robert Stupp
>            Assignee: Mahdi Mohammadi
>            Priority: Minor
>              Labels: lhf
>
> We found out that {{SELECT * FROM foo LIMIT ;}} is unanimously accepted and executed but it should not.
> Have not dug deeper why that is possible (it's not a big issue IMO) but it is strange. Seems it doesn't parse {{LIMIT}} as {{K_LIMIT}} because otherwise it would require an int argument.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)