cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: Clarify pk-only CQL3 INSERT exception for COMPACT STORAGE tables
Date Tue, 18 Jun 2013 14:54:49 GMT
Updated Branches:
  refs/heads/cassandra-1.2 2397bc8c3 -> df063449a


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/cassandra-1.2
Commit: df063449a88655018a94aabf494b3e604f1e4cd9
Parents: 2397bc8
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Tue Jun 18 17:53:44 2013 +0300
Committer: Aleksey Yeschenko <aleksey@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);


Mime
View raw message