Backport CASSANDRA-7454 to 2.1.0

This commit is contained in:
Tyler Hobbs 2014-06-27 09:35:53 -05:00
parent e4b40c75c0
commit 9c1782d397
2 changed files with 4 additions and 3 deletions

View File

@ -9,6 +9,7 @@
* Support conditional updates, tuple type, and the v3 protocol in cqlsh (CASSANDRA-7509)
* Handle queries on multiple secondary index types (CASSANDRA-7525)
* Fix cqlsh authentication with v3 native protocol (CASSANDRA-7564)
* Fix NPE when unknown prepared statement ID is used (CASSANDRA-7454)
Merged from 2.0:
* (Windows) force range-based repair to non-sequential mode (CASSANDRA-7541)
* Fix range merging when DES scores are zero (CASSANDRA-7535)

View File

@ -102,12 +102,12 @@ public class ExecuteMessage extends Message.Request
{
QueryHandler handler = state.getClientState().getCQLQueryHandler();
ParsedStatement.Prepared prepared = handler.getPrepared(statementId);
if (prepared == null)
throw new PreparedQueryNotFoundException(statementId);
options.prepare(prepared.boundNames);
CQLStatement statement = prepared.statement;
if (statement == null)
throw new PreparedQueryNotFoundException(statementId);
if (options.getPageSize() == 0)
throw new ProtocolException("The page size cannot be 0");