Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 960249F6B for ; Thu, 27 Oct 2011 22:30:55 +0000 (UTC) Received: (qmail 64852 invoked by uid 500); 27 Oct 2011 22:30:55 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 64809 invoked by uid 500); 27 Oct 2011 22:30:55 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 64801 invoked by uid 99); 27 Oct 2011 22:30:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 22:30:55 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 22:30:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A6C523230CA for ; Thu, 27 Oct 2011 22:28:32 +0000 (UTC) Date: Thu, 27 Oct 2011 22:28:32 +0000 (UTC) From: "Max Penet (Commented) (JIRA)" To: commits@cassandra.apache.org Message-ID: <73870130.27617.1319754512687.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1965953667.27371.1319753192728.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CASSANDRA-3413) Off by one on column index retrieval in org.apache.cassandra.cql.jdbc.CResultSet getColumn MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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