Updated Branches: refs/heads/trunk 7edd0e0c7 -> ee0f495f5
Clarify pk-only CQL3 INSERT exception for COMPACT STORAGE tables Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/df063449 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/df063449 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/df063449 Branch: refs/heads/trunk Commit: df063449a88655018a94aabf494b3e604f1e4cd9 Parents: 2397bc8 Author: Aleksey Yeschenko <alek...@apache.org> Authored: Tue Jun 18 17:53:44 2013 +0300 Committer: Aleksey Yeschenko <alek...@apache.org> Committed: Tue Jun 18 17:53:44 2013 +0300 ---------------------------------------------------------------------- .../org/apache/cassandra/cql3/statements/UpdateStatement.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/df063449/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java b/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java index 8a5595a..5f37e15 100644 --- a/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java @@ -244,10 +244,9 @@ public class UpdateStatement extends ModificationStatement } else { - // compact means we don't have a row marker, so don't accept to set only the PK (Note: we - // could accept it and use an empty value!?) + // compact means we don't have a row marker, so don't accept to set only the PK. See CASSANDRA-5648. if (processedColumns.isEmpty()) - throw new InvalidRequestException(String.format("Missing mandatory column %s", cfDef.value)); + throw new InvalidRequestException(String.format("Column %s is mandatory for this COMPACT STORAGE table", cfDef.value)); for (Operation op : processedColumns) op.execute(key, cf, builder.copy(), params);