You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Dave Brosius (Created) (JIRA)" <ji...@apache.org> on 2012/01/26 03:47:40 UTC
[jira] [Created] (CASSANDRA-3787) [patch] fix bad comparison of
column name against * or 1
[patch] fix bad comparison of column name against * or 1
--------------------------------------------------------
Key: CASSANDRA-3787
URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
Project: Cassandra
Issue Type: Bug
Components: Core
Affects Versions: 1.0.7
Reporter: Dave Brosius
Priority: Trivial
Attachments: bad_column_compare.diff
code does
(!selectClause.get(0).equals("*") && !selectClause.get(0).equals("1")))
which is a ColumnDefinition against a string
changed to
String columnName = selectClause.get(0).toString();
if (!columnName.equals("*") && !columnName.equals("1"))
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3787) [patch] fix bad comparison of
column name against * or 1
Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13193608#comment-13193608 ]
Jonathan Ellis commented on CASSANDRA-3787:
-------------------------------------------
This doesn't quite preserve the intent which is to throw on *either* more than 1 clause, or the count body mismatch. Updated to this on commit:
{code}
. if (selectClause.size() != 1)
throw new InvalidRequestException("Only COUNT(*) and COUNT(1) operations are currently supported.");
String columnName = selectClause.get(0).toString();
if (!columnName.equals("*") && !columnName.equals("1"))
throw new InvalidRequestException("Only COUNT(*) and COUNT(1) operations are currently supported.");
{code}
> [patch] fix bad comparison of column name against * or 1
> --------------------------------------------------------
>
> Key: CASSANDRA-3787
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1
> Reporter: Dave Brosius
> Priority: Trivial
> Labels: cql
> Fix For: 1.1
>
> Attachments: bad_column_compare.diff
>
>
> code does
> (!selectClause.get(0).equals("*") && !selectClause.get(0).equals("1")))
> which is a ColumnDefinition against a string
> changed to
> String columnName = selectClause.get(0).toString();
> if (!columnName.equals("*") && !columnName.equals("1"))
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-3787) [patch] fix bad comparison of
column name against * or 1
Posted by "Dave Brosius (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius updated CASSANDRA-3787:
------------------------------------
Attachment: bad_column_compare.diff
> [patch] fix bad comparison of column name against * or 1
> --------------------------------------------------------
>
> Key: CASSANDRA-3787
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.7
> Reporter: Dave Brosius
> Priority: Trivial
> Attachments: bad_column_compare.diff
>
>
> code does
> (!selectClause.get(0).equals("*") && !selectClause.get(0).equals("1")))
> which is a ColumnDefinition against a string
> changed to
> String columnName = selectClause.get(0).toString();
> if (!columnName.equals("*") && !columnName.equals("1"))
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-3787) [patch] fix bad comparison of
column name against * or 1
Posted by "Jonathan Ellis (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-3787:
--------------------------------------
Reviewer: jbellis
Affects Version/s: (was: 1.0.7)
1.1
Fix Version/s: 1.1
Assignee: Dave Brosius
Labels: cql (was: )
> [patch] fix bad comparison of column name against * or 1
> --------------------------------------------------------
>
> Key: CASSANDRA-3787
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1
> Reporter: Dave Brosius
> Assignee: Dave Brosius
> Priority: Trivial
> Labels: cql
> Fix For: 1.1
>
> Attachments: bad_column_compare.diff
>
>
> code does
> (!selectClause.get(0).equals("*") && !selectClause.get(0).equals("1")))
> which is a ColumnDefinition against a string
> changed to
> String columnName = selectClause.get(0).toString();
> if (!columnName.equals("*") && !columnName.equals("1"))
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CASSANDRA-3787) [patch] fix bad comparison of
column name against * or 1
Posted by "Dave Brosius (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius resolved CASSANDRA-3787.
-------------------------------------
Resolution: Fixed
> [patch] fix bad comparison of column name against * or 1
> --------------------------------------------------------
>
> Key: CASSANDRA-3787
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1
> Reporter: Dave Brosius
> Assignee: Dave Brosius
> Priority: Trivial
> Labels: cql
> Fix For: 1.1
>
> Attachments: bad_column_compare.diff
>
>
> code does
> (!selectClause.get(0).equals("*") && !selectClause.get(0).equals("1")))
> which is a ColumnDefinition against a string
> changed to
> String columnName = selectClause.get(0).toString();
> if (!columnName.equals("*") && !columnName.equals("1"))
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3787) [patch] fix bad comparison of
column name against * or 1
Posted by "Dave Brosius (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13193806#comment-13193806 ]
Dave Brosius commented on CASSANDRA-3787:
-----------------------------------------
dang it.. thanks, good catch.
> [patch] fix bad comparison of column name against * or 1
> --------------------------------------------------------
>
> Key: CASSANDRA-3787
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1
> Reporter: Dave Brosius
> Assignee: Dave Brosius
> Priority: Trivial
> Labels: cql
> Fix For: 1.1
>
> Attachments: bad_column_compare.diff
>
>
> code does
> (!selectClause.get(0).equals("*") && !selectClause.get(0).equals("1")))
> which is a ColumnDefinition against a string
> changed to
> String columnName = selectClause.get(0).toString();
> if (!columnName.equals("*") && !columnName.equals("1"))
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira