[
https://issues.apache.org/jira/browse/CASSANDRA-7300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008327#comment-14008327
]
Jonathan Ellis commented on CASSANDRA-7300:
-------------------------------------------
committed
> BatchlogManager#countAllBatches doesn't swap strings for the count query.
> -------------------------------------------------------------------------
>
> Key: CASSANDRA-7300
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7300
> Project: Cassandra
> Issue Type: Bug
> Reporter: Lyuben Todorov
> Assignee: Lyuben Todorov
> Priority: Trivial
> Fix For: 2.1 rc1
>
> Attachments: trunk-batchlog-counting.txt
>
>
> {{BatchlogManager#countAllBatches}} doesn't actually swap strings for the
> query and so yields an Error in the {{BatchLogManager}} unit test:
> {noformat}
> [junit] Testcase:
> testReplay(org.apache.cassandra.db.BatchlogManagerTest): Caused an
> ERROR
> [junit] Error validating SELECT count(*) FROM %s.%s
> [junit] java.lang.RuntimeException: Error validating SELECT count(*) FROM
> %s.%s
> [junit] at
> org.apache.cassandra.cql3.QueryProcessor.executeInternal(QueryProcessor.java:274)
> [junit] at
> org.apache.cassandra.db.BatchlogManager.countAllBatches(BatchlogManager.java:102)
> [junit] at
> org.apache.cassandra.db.BatchlogManagerTest.testReplay(BatchlogManagerTest.java:60)
> [junit] Caused by: org.apache.cassandra.exceptions.SyntaxException: line
> 1:24 no viable alternative at character '%'
> {noformat}
> Attaching patch that uses a formatted string to replace the %s with the
> actual ks.cf pair.
--
This message was sent by Atlassian JIRA
(v6.2#6252)