You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ty...@apache.org on 2014/07/25 01:02:15 UTC
[4/4] git commit: Add cqlsh completion for IF [NOT] EXISTS in
CREATE/DROP USER
Add cqlsh completion for IF [NOT] EXISTS in CREATE/DROP USER
Patch by MichaĆ Michalski; review by Tyler Hobbs for CASSANDRA-7611
Conflicts:
CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bc1f53aa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bc1f53aa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bc1f53aa
Branch: refs/heads/cassandra-2.1
Commit: bc1f53aaf7c90a2b1ea645b25ec576117c6b0bd9
Parents: 8081c54
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Thu Jul 24 17:56:29 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Thu Jul 24 18:01:45 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
pylib/cqlshlib/cql3handling.py | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc1f53aa/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f9f8ca1..3d5f798 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,7 @@
* Configurable client timeout for cqlsh (CASSANDRA-7516)
* Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
Merged from 2.0:
+ * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611)
* Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc1f53aa/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index a676319..72461db 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -1089,7 +1089,7 @@ syntax_rules += r'''
<username> ::= name=( <identifier> | <stringLiteral> )
;
-<createUserStatement> ::= "CREATE" "USER" <username>
+<createUserStatement> ::= "CREATE" "USER" ( "IF" "NOT" "EXISTS" )? <username>
( "WITH" "PASSWORD" <stringLiteral> )?
( "SUPERUSER" | "NOSUPERUSER" )?
;
@@ -1099,7 +1099,7 @@ syntax_rules += r'''
( "SUPERUSER" | "NOSUPERUSER" )?
;
-<dropUserStatement> ::= "DROP" "USER" <username>
+<dropUserStatement> ::= "DROP" "USER" ( "IF" "EXISTS" )? <username>
;
<listUsersStatement> ::= "LIST" "USERS"