You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Max Penet (Created) (JIRA)" <ji...@apache.org> on 2011/10/28 00:06:32 UTC
[jira] [Created] (CASSANDRA-3413) Off by one on column index
retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn
Off by one on column index retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn
------------------------------------------------------------------------------------------
Key: CASSANDRA-3413
URL: https://issues.apache.org/jira/browse/CASSANDRA-3413
Project: Cassandra
Issue Type: Bug
Components: Drivers
Affects Versions: 1.0.0
Reporter: Max Penet
Hello,
Right now when using org.apache.cassandra.cql.jdbc.CResultSet getColumn to retrieve col data you will always be missing the first one.
ex: SELECT name, pwd from user;
returns only pwd.
The issue is at http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/org/apache/cassandra/cql/jdbc/CResultSet.java#348
The call to checkIndex passes, but the values.get(index) call causes the lookup to go over the ArrayList size.
This needs to be changed to:
values.get(index - 1)
patch file: http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/issues/attachmentText?id=4&aid=40000000&name=patchfile&token=b3a8df347e76a90ca4837a3771bf2406
--
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-3413) Off by one on column index
retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn
Posted by "Max Penet (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Max Penet updated CASSANDRA-3413:
---------------------------------
Description:
When using org.apache.cassandra.cql.jdbc.CResultSet getColumn to retrieve col data you will always be missing the first one.
ex: SELECT name, pwd from user;
returns only pwd.
The issue is at http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/org/apache/cassandra/cql/jdbc/CResultSet.java#348
The call to checkIndex passes, but the values.get(index) call causes the lookup to go over the ArrayList size.
This needs to be changed to:
values.get(index - 1)
patch file: http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/issues/attachmentText?id=4&aid=40000000&name=patchfile&token=b3a8df347e76a90ca4837a3771bf2406
was:
Hello,
Right now when using org.apache.cassandra.cql.jdbc.CResultSet getColumn to retrieve col data you will always be missing the first one.
ex: SELECT name, pwd from user;
returns only pwd.
The issue is at http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/org/apache/cassandra/cql/jdbc/CResultSet.java#348
The call to checkIndex passes, but the values.get(index) call causes the lookup to go over the ArrayList size.
This needs to be changed to:
values.get(index - 1)
patch file: http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/issues/attachmentText?id=4&aid=40000000&name=patchfile&token=b3a8df347e76a90ca4837a3771bf2406
> Off by one on column index retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-3413
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3413
> Project: Cassandra
> Issue Type: Bug
> Components: Drivers
> Affects Versions: 1.0.0
> Reporter: Max Penet
> Labels: cassandra-jdbc
>
> When using org.apache.cassandra.cql.jdbc.CResultSet getColumn to retrieve col data you will always be missing the first one.
> ex: SELECT name, pwd from user;
> returns only pwd.
> The issue is at http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/org/apache/cassandra/cql/jdbc/CResultSet.java#348
> The call to checkIndex passes, but the values.get(index) call causes the lookup to go over the ArrayList size.
> This needs to be changed to:
> values.get(index - 1)
> patch file: http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/issues/attachmentText?id=4&aid=40000000&name=patchfile&token=b3a8df347e76a90ca4837a3771bf2406
--
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] [Issue Comment Edited] (CASSANDRA-3413) Off by one on column
index retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn
Posted by "Max Penet (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137650#comment-13137650 ]
Max Penet edited comment on CASSANDRA-3413 at 10/27/11 10:28 PM:
-----------------------------------------------------------------
Hi,
I did start and issue there as well, thanks.
was (Author: mpenet):
Hi,
I did too, thanks.
> Off by one on column index retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-3413
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3413
> Project: Cassandra
> Issue Type: Bug
> Components: Drivers
> Affects Versions: 1.0.0
> Reporter: Max Penet
> Labels: cassandra-jdbc
>
> When using org.apache.cassandra.cql.jdbc.CResultSet getColumn to retrieve col data you will always be missing the first one.
> ex: SELECT name, pwd from user;
> returns only pwd.
> The issue is at http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/org/apache/cassandra/cql/jdbc/CResultSet.java#348
> The call to checkIndex passes, but the values.get(index) call causes the lookup to go over the ArrayList size.
> This needs to be changed to:
> values.get(index - 1)
> patch file: http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/issues/attachmentText?id=4&aid=40000000&name=patchfile&token=b3a8df347e76a90ca4837a3771bf2406
--
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-3413) Off by one on column index
retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn
Posted by "Max Penet (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137650#comment-13137650 ]
Max Penet commented on CASSANDRA-3413:
--------------------------------------
Hi,
I did too, thanks.
> Off by one on column index retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-3413
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3413
> Project: Cassandra
> Issue Type: Bug
> Components: Drivers
> Affects Versions: 1.0.0
> Reporter: Max Penet
> Labels: cassandra-jdbc
>
> When using org.apache.cassandra.cql.jdbc.CResultSet getColumn to retrieve col data you will always be missing the first one.
> ex: SELECT name, pwd from user;
> returns only pwd.
> The issue is at http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/org/apache/cassandra/cql/jdbc/CResultSet.java#348
> The call to checkIndex passes, but the values.get(index) call causes the lookup to go over the ArrayList size.
> This needs to be changed to:
> values.get(index - 1)
> patch file: http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/issues/attachmentText?id=4&aid=40000000&name=patchfile&token=b3a8df347e76a90ca4837a3771bf2406
--
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-3413) Off by one on column index
retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn
Posted by "Jonathan Ellis (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-3413.
---------------------------------------
Resolution: Invalid
Hi Max,
please report JDBC bugs to http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/.
> Off by one on column index retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-3413
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3413
> Project: Cassandra
> Issue Type: Bug
> Components: Drivers
> Affects Versions: 1.0.0
> Reporter: Max Penet
> Labels: cassandra-jdbc
>
> When using org.apache.cassandra.cql.jdbc.CResultSet getColumn to retrieve col data you will always be missing the first one.
> ex: SELECT name, pwd from user;
> returns only pwd.
> The issue is at http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/org/apache/cassandra/cql/jdbc/CResultSet.java#348
> The call to checkIndex passes, but the values.get(index) call causes the lookup to go over the ArrayList size.
> This needs to be changed to:
> values.get(index - 1)
> patch file: http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/issues/attachmentText?id=4&aid=40000000&name=patchfile&token=b3a8df347e76a90ca4837a3771bf2406
--
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