mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-23 08:12:08 +00:00
cql3/statements: Keep local keyspace variable in alter_keyspace_statement::validate
For convenience of next patching Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -49,7 +49,8 @@ void cql3::statements::alter_keyspace_statement::validate(query_processor& qp, c
|
||||
throw exceptions::configuration_exception("Missing replication strategy class");
|
||||
}
|
||||
try {
|
||||
data_dictionary::storage_options current_options = qp.db().find_keyspace(_name).metadata()->get_storage_options();
|
||||
auto ks = qp.db().find_keyspace(_name);
|
||||
data_dictionary::storage_options current_options = ks.metadata()->get_storage_options();
|
||||
data_dictionary::storage_options new_options = _attrs->get_storage_options();
|
||||
if (!current_options.can_update_to(new_options)) {
|
||||
throw exceptions::invalid_request_exception(format("Cannot alter storage options: {} to {} is not supported",
|
||||
|
||||
Reference in New Issue
Block a user