[1/8] git commit: Slightly improved message when parsing properties for DDL queries

2013-12-17 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.2 54a1955d2 - 829047af5
  refs/heads/cassandra-2.0 bdff106aa - 359027549
  refs/heads/trunk 2ee6b8fd9 - c821d8b08


Slightly improved message when parsing properties for DDL queries

patch by boneill42; reviewed by slebresne for CASSANDRA-6453


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/54a1955d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/54a1955d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/54a1955d

Branch: refs/heads/cassandra-2.0
Commit: 54a1955d254bfc89e48389d5d0d94c79d027d470
Parents: 4be9e67
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Dec 16 10:53:22 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Dec 16 10:53:22 2013 +0100

--
 CHANGES.txt  |  3 +++
 src/java/org/apache/cassandra/cql3/Cql.g | 10 --
 2 files changed, 11 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/54a1955d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b55393b..4816d70 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+1.2.14
+ * Improved error message on bad properties in DDL queries (CASSANDRA-6453)
+
 1.2.13
  * Randomize batchlog candidates selection (CASSANDRA-6481)
  * Fix thundering herd on endpoint cache invalidation (CASSANDRA-6345, 6485)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/54a1955d/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g 
b/src/java/org/apache/cassandra/cql3/Cql.g
index 7101c71..ea6844f 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -93,12 +93,18 @@ options {
 
 if (!(entry.left instanceof Constants.Literal))
 {
-addRecognitionError(Invalid property name:  + entry.left);
+String msg = Invalid property name:  + entry.left;
+if (entry.left instanceof AbstractMarker.Raw)
+msg +=  (bind variables are not supported in DDL 
queries);
+addRecognitionError(msg);
 break;
 }
 if (!(entry.right instanceof Constants.Literal))
 {
-addRecognitionError(Invalid property value:  + entry.right);
+String msg = Invalid property value:  + entry.right +  for 
property:  + entry.left;
+if (entry.right instanceof AbstractMarker.Raw)
+msg +=  (bind variables are not supported in DDL 
queries);
+addRecognitionError(msg);
 break;
 }
 



[2/8] git commit: Slightly improved message when parsing properties for DDL queries

2013-12-17 Thread jbellis
Slightly improved message when parsing properties for DDL queries

patch by boneill42; reviewed by slebresne for CASSANDRA-6453


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/54a1955d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/54a1955d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/54a1955d

Branch: refs/heads/trunk
Commit: 54a1955d254bfc89e48389d5d0d94c79d027d470
Parents: 4be9e67
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Dec 16 10:53:22 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Dec 16 10:53:22 2013 +0100

--
 CHANGES.txt  |  3 +++
 src/java/org/apache/cassandra/cql3/Cql.g | 10 --
 2 files changed, 11 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/54a1955d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b55393b..4816d70 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+1.2.14
+ * Improved error message on bad properties in DDL queries (CASSANDRA-6453)
+
 1.2.13
  * Randomize batchlog candidates selection (CASSANDRA-6481)
  * Fix thundering herd on endpoint cache invalidation (CASSANDRA-6345, 6485)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/54a1955d/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g 
b/src/java/org/apache/cassandra/cql3/Cql.g
index 7101c71..ea6844f 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -93,12 +93,18 @@ options {
 
 if (!(entry.left instanceof Constants.Literal))
 {
-addRecognitionError(Invalid property name:  + entry.left);
+String msg = Invalid property name:  + entry.left;
+if (entry.left instanceof AbstractMarker.Raw)
+msg +=  (bind variables are not supported in DDL 
queries);
+addRecognitionError(msg);
 break;
 }
 if (!(entry.right instanceof Constants.Literal))
 {
-addRecognitionError(Invalid property value:  + entry.right);
+String msg = Invalid property value:  + entry.right +  for 
property:  + entry.left;
+if (entry.right instanceof AbstractMarker.Raw)
+msg +=  (bind variables are not supported in DDL 
queries);
+addRecognitionError(msg);
 break;
 }
 



git commit: Slightly improved message when parsing properties for DDL queries

2013-12-16 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 4be9e6720 - 54a1955d2


Slightly improved message when parsing properties for DDL queries

patch by boneill42; reviewed by slebresne for CASSANDRA-6453


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/54a1955d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/54a1955d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/54a1955d

Branch: refs/heads/cassandra-1.2
Commit: 54a1955d254bfc89e48389d5d0d94c79d027d470
Parents: 4be9e67
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Dec 16 10:53:22 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Dec 16 10:53:22 2013 +0100

--
 CHANGES.txt  |  3 +++
 src/java/org/apache/cassandra/cql3/Cql.g | 10 --
 2 files changed, 11 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/54a1955d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b55393b..4816d70 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+1.2.14
+ * Improved error message on bad properties in DDL queries (CASSANDRA-6453)
+
 1.2.13
  * Randomize batchlog candidates selection (CASSANDRA-6481)
  * Fix thundering herd on endpoint cache invalidation (CASSANDRA-6345, 6485)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/54a1955d/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g 
b/src/java/org/apache/cassandra/cql3/Cql.g
index 7101c71..ea6844f 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -93,12 +93,18 @@ options {
 
 if (!(entry.left instanceof Constants.Literal))
 {
-addRecognitionError(Invalid property name:  + entry.left);
+String msg = Invalid property name:  + entry.left;
+if (entry.left instanceof AbstractMarker.Raw)
+msg +=  (bind variables are not supported in DDL 
queries);
+addRecognitionError(msg);
 break;
 }
 if (!(entry.right instanceof Constants.Literal))
 {
-addRecognitionError(Invalid property value:  + entry.right);
+String msg = Invalid property value:  + entry.right +  for 
property:  + entry.left;
+if (entry.right instanceof AbstractMarker.Raw)
+msg +=  (bind variables are not supported in DDL 
queries);
+addRecognitionError(msg);
 break;
 }