From 9ba28d41ca1433bc711201e958eff1de4a7137aa Mon Sep 17 00:00:00 2001 From: zhang2014 Date: Fri, 17 Jul 2020 19:00:34 +0800 Subject: [PATCH] ISSUES-4006 skip drop database query for materialize mysql engine --- src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp b/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp index 527738d143f..b0b01a24e55 100644 --- a/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp +++ b/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp @@ -298,7 +298,8 @@ ASTPtr InterpreterDropImpl::getRewrittenQuery( { const auto & database_name = context.resolveDatabase(drop_query.database); - if (database_name != filter_mysql_db) + /// Skip drop databse|view|dictionary + if (database_name != filter_mysql_db || drop_query.table.empty() || drop_query.is_view || drop_query.is_dictionary) return {}; ASTPtr rewritten_query = drop_query.clone();