mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-1.0' into cassandra-1.1.0
Conflicts: src/java/org/apache/cassandra/cql/DeleteStatement.java
This commit is contained in:
commit
e05a327e2c
|
|
@ -47,6 +47,7 @@ Merged from 1.0:
|
|||
* fix race leading to super columns assertion failure (CASSANDRA-3957)
|
||||
* ensure that directory is selected for compaction for user-defined
|
||||
tasks and upgradesstables (CASSANDRA-3985)
|
||||
* fix NPE on invalid CQL delete command (CASSANDRA-3755)
|
||||
|
||||
|
||||
1.1-beta1
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ public class DeleteStatement extends AbstractModification
|
|||
|
||||
public List<IMutation> prepareRowMutations(String keyspace, ClientState clientState, Long timestamp, List<ByteBuffer> variables) throws InvalidRequestException
|
||||
{
|
||||
CFMetaData metadata = validateColumnFamily(keyspace, columnFamily);
|
||||
|
||||
clientState.hasColumnFamilyAccess(columnFamily, Permission.WRITE);
|
||||
AbstractType<?> keyType = Schema.instance.getCFMetaData(keyspace, columnFamily).getKeyValidator();
|
||||
|
||||
|
|
@ -78,18 +80,17 @@ public class DeleteStatement extends AbstractModification
|
|||
|
||||
for (Term key : keys)
|
||||
{
|
||||
rowMutations.add(mutationForKey(key.getByteBuffer(keyType, variables), keyspace, timestamp, clientState,variables));
|
||||
rowMutations.add(mutationForKey(key.getByteBuffer(keyType, variables), keyspace, timestamp, clientState, variables, metadata));
|
||||
}
|
||||
|
||||
return rowMutations;
|
||||
}
|
||||
|
||||
public RowMutation mutationForKey(ByteBuffer key, String keyspace, Long timestamp, ClientState clientState, List<ByteBuffer> variables)
|
||||
public RowMutation mutationForKey(ByteBuffer key, String keyspace, Long timestamp, ClientState clientState, List<ByteBuffer> variables, CFMetaData metadata)
|
||||
throws InvalidRequestException
|
||||
{
|
||||
RowMutation rm = new RowMutation(keyspace, key);
|
||||
|
||||
CFMetaData metadata = validateColumnFamily(keyspace, columnFamily);
|
||||
QueryProcessor.validateKeyAlias(metadata, keyName);
|
||||
|
||||
AbstractType<?> comparator = metadata.getComparatorFor(null);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ public class DeleteStatement extends ModificationStatement
|
|||
|
||||
public List<IMutation> getMutations(ClientState clientState, List<ByteBuffer> variables) throws InvalidRequestException
|
||||
{
|
||||
|
||||
// Check key
|
||||
List<Term> keys = processedKeys.get(cfDef.key.name);
|
||||
if (keys == null || keys.isEmpty())
|
||||
|
|
|
|||
Loading…
Reference in New Issue