Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Correctness - API / Semantic Implementation
-
Normal
-
Normal
-
Adhoc Test
-
All
-
None
-
Description
Let's have:
authenticator: class_name : org.apache.cassandra.auth.PasswordAuthenticator authorizer: CassandraAuthorizer role_manager: CassandraRoleManager
and do this:
cassandra@cqlsh> select * from system_auth.roles;
role | can_login | is_superuser | member_of | salted_hash
-----------+-----------+--------------+-----------+--------------------------------------------------------------
cassandra | True | True | null | $2a$10$sFCKeluid5MlW/Z0CU1ygO1U5qpLW4Rgivmu8rZNmNNQ8WeC2y92S
Then
cassandra@cqlsh> ALTER USER IF EXISTS this_does_not_exist SUPERUSER ; cassandra@cqlsh> select * from system_auth.roles where role = 'this_does_not_exist'; role | can_login | is_superuser | member_of | salted_hash ---------------------+-----------+--------------+-----------+------------- this_does_not_exist | null | True | null | null
It seems to be same behaviour for ALTER ROLE too.
cassandra@cqlsh> ALTER ROLE IF EXISTS this_role_is_not_there WITH SUPERUSER = true ; cassandra@cqlsh> select * from system_auth.roles where role = 'this_role_is_not_there'; role | can_login | is_superuser | member_of | salted_hash ------------------------+-----------+--------------+-----------+------------- this_role_is_not_there | null | True | null | null
Attachments
Issue Links
- is caused by
-
CASSANDRA-16916 Add support for IF EXISTS and IF NOT EXISTS in ALTER statements
- Resolved
- links to