#include #include #include #include #include namespace DB { BlockIO InterpreterUseQuery::execute() { const String & new_database = query_ptr->as().database; getContext()->checkAccess(AccessType::SHOW_DATABASES, new_database); getContext()->getSessionContext()->setCurrentDatabase(new_database); return {}; } }