[ https://issues.apache.org/jira/browse/CASSANDRA-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Evans reopened CASSANDRA-2475: ----------------------------------- I found a rather serious issue with the way bind markers are indexed. Basically {{QueryProcessor.discoverBoundTerms}} attempts to work through the parsed result intances in order, but the order in which terms appeared in the statement is not preserved. For example, the following are equivalent: {code:style=SQL} col = 10 AND KEY > aaa AND KEY < bbb KEY < bbb AND col = 10 AND KEY > aaa {code} However, both will be represented by a {{WhereClause}} with attributes for start and finish key, and a list of column relations, with no regard to the order the terms appeared in the original statement. The attached patches (v10-*) refactor marker indexing to occur within the parser. > Prepared statements > ------------------- > > Key: CASSANDRA-2475 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2475 > Project: Cassandra > Issue Type: New Feature > Components: API, Core > Affects Versions: 1.0.5 > Reporter: Eric Evans > Assignee: Rick Shaw > Priority: Minor > Labels: cql > Fix For: 1.1 > > Attachments: 2475-v1.patch, 2475-v2.patch, 2475-v3.1.patch, > 2475-v3.2-Thrift.patch, v1-0001-CASSANDRA-2475-prepared-statement-patch.txt, > v1-0002-regenerated-thrift-java.txt, > v10-0001-CASSANDRA-2475-properly-report-number-of-markers-in-a-.txt, > v10-0002-index-bind-markers-using-parser.txt, > v10-0003-clean-up-Term-ctors.txt, > v2-0001-CASSANDRA-2475-rickshaw-2475-v3.1.patch.txt, > v2-0002-rickshaw-2475-v3.2-Thrift.patch-w-changes.txt, > v2-0003-eevans-increment-thrift-version-by-1-not-3.txt, > v2-0004-eevans-misc-cleanups.txt, > v2-0005-eevans-refactor-for-better-encapsulation-of-prepare.txt, > v2-0006-eevans-log-queries-at-TRACE.txt, > v2-0007-use-an-LRU-map-for-storage-of-prepared-statements.txt > > -- 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