Skip to content

Commit

Permalink
Mark system_views/system_virtual_schema as non-alterable keyspaces in…
Browse files Browse the repository at this point in the history
… cqlsh

patch by Eduard Tudenhoefner; reviewed by Benjamin Lerer for
CASSANDRA-15711
  • Loading branch information
Eduard Tudenhoefner authored and blerer committed Apr 9, 2020
1 parent 579c9ab commit 39a0703
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 1 addition & 2 deletions 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)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pylib/cqlshlib/cql3handling.py
Expand Up @@ -35,7 +35,7 @@ def __str__(self):


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):
Expand Down
8 changes: 8 additions & 0 deletions pylib/cqlshlib/test/test_cqlsh_completion.py
Expand Up @@ -820,3 +820,11 @@ def test_complete_in_create_index(self):

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'])

0 comments on commit 39a0703

Please sign in to comment.