You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by bl...@apache.org on 2020/04/09 14:53:44 UTC

[cassandra] branch trunk updated: Mark system_views/system_virtual_schema as non-alterable keyspaces in cqlsh

This is an automated email from the ASF dual-hosted git repository.

blerer pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 39a0703  Mark system_views/system_virtual_schema as non-alterable keyspaces in cqlsh
39a0703 is described below

commit 39a0703b65c985c4b99eed1c045d0f00bbbcc9db
Author: Eduard Tudenhoefner <ed...@datastax.com>
AuthorDate: Thu Apr 9 12:01:21 2020 +0200

    Mark system_views/system_virtual_schema as non-alterable keyspaces in cqlsh
    
    patch by Eduard Tudenhoefner; reviewed by Benjamin Lerer for
    CASSANDRA-15711
---
 CHANGES.txt                                  | 3 +--
 pylib/cqlshlib/cql3handling.py               | 2 +-
 pylib/cqlshlib/test/test_cqlsh_completion.py | 8 ++++++++
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index cda7585..2ad2aab 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0-alpha4
+ * Mark system_views/system_virtual_schema as non-alterable keyspaces in cqlsh (CASSANDRA-15711)
  * Fail incremental repair if an old version sstable is involved (CASSANDRA-15612)
  * Fix overflows on StreamingTombstoneHistogramBuilder produced by large deletion times (CASSANDRA-14773)
  * Mark system_views/system_virtual_schema as system keyspaces in cqlsh (CASSANDRA-15706)
@@ -56,8 +57,6 @@
 Merged from 3.11:
  * Allow sstableloader to use SSL on the native port (CASSANDRA-14904)
 Merged from 3.0:
-=======
-3.0.21
  * Memtable memory allocations may deadlock (CASSANDRA-15367)
  * Run evictFromMembership in GossipStage (CASSANDRA-15592)
 Merged from 2.2:
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 8738f10..b2403a7 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -35,7 +35,7 @@ class UnexpectedTableStructure(UserWarning):
 
 
 SYSTEM_KEYSPACES = ('system', 'system_schema', 'system_traces', 'system_auth', 'system_distributed', 'system_views', 'system_virtual_schema')
-NONALTERBALE_KEYSPACES = ('system', 'system_schema')
+NONALTERBALE_KEYSPACES = ('system', 'system_schema', 'system_views', 'system_virtual_schema')
 
 
 class Cql3ParsingRuleSet(CqlParsingRuleSet):
diff --git a/pylib/cqlshlib/test/test_cqlsh_completion.py b/pylib/cqlshlib/test/test_cqlsh_completion.py
index a8d6719..d432f22 100644
--- a/pylib/cqlshlib/test/test_cqlsh_completion.py
+++ b/pylib/cqlshlib/test/test_cqlsh_completion.py
@@ -820,3 +820,11 @@ class TestCqlshCompletion(CqlshCompletionCase):
 
     def test_complete_in_drop_index(self):
         pass
+
+    def test_complete_in_alter_keyspace(self):
+        self.trycompletions('ALTER KEY', 'SPACE ')
+        self.trycompletions('ALTER KEYSPACE ', '', choices=[self.cqlsh.keyspace, 'system_auth',
+                                                            'system_distributed', 'system_traces'])
+        self.trycompletions('ALTER KEYSPACE system_trac', "es WITH replication = {'class': '")
+        self.trycompletions("ALTER KEYSPACE system_traces WITH replication = {'class': '", '',
+                            choices=['NetworkTopologyStrategy', 'SimpleStrategy'])


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org