Merge pull request #48431 from Algunenano/system_referential_table

Don't check dependencies when renaming system tables automatically
This commit is contained in:
Vitaly Baranov 2023-04-06 15:28:37 +02:00 committed by GitHub
commit b45b662fe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -503,6 +503,9 @@ void SystemLog<LogElement>::prepareTable()
rename->elements.emplace_back(std::move(elem));
auto query_context = Context::createCopy(context);
/// As this operation is performed automatically we don't want it to fail because of user dependencies on log tables
query_context->setSetting("check_table_dependencies", Field{false});
query_context->setSetting("check_referential_table_dependencies", Field{false});
query_context->makeQueryContext();
InterpreterRenameQuery(rename, query_context).execute();