Fixed build

This commit is contained in:
Maksim Kita 2021-08-24 19:13:38 +03:00
parent 82ba24cd10
commit dce3fc60ad
2 changed files with 6 additions and 6 deletions

View File

@ -22,8 +22,8 @@ namespace ErrorCodes
BlockIO InterpreterCreateFunctionQuery::execute()
{
auto context = getContext();
context->checkAccess(AccessType::CREATE_FUNCTION);
auto current_context = getContext();
current_context->checkAccess(AccessType::CREATE_FUNCTION);
FunctionNameNormalizer().visit(query_ptr.get());
auto * create_function_query = query_ptr->as<ASTCreateFunctionQuery>();
@ -40,7 +40,7 @@ BlockIO InterpreterCreateFunctionQuery::execute()
{
try
{
UserDefinedObjectsLoader::instance().storeObject(context, UserDefinedObjectType::Function, function_name, *query_ptr);
UserDefinedObjectsLoader::instance().storeObject(current_context, UserDefinedObjectType::Function, function_name, *query_ptr);
}
catch (Exception & exception)
{

View File

@ -12,14 +12,14 @@ namespace DB
BlockIO InterpreterDropFunctionQuery::execute()
{
auto context = getContext();
context->checkAccess(AccessType::DROP_FUNCTION);
auto current_context = getContext();
current_context->checkAccess(AccessType::DROP_FUNCTION);
FunctionNameNormalizer().visit(query_ptr.get());
auto & drop_function_query = query_ptr->as<ASTDropFunctionQuery &>();
UserDefinedFunctionFactory::instance().unregisterFunction(drop_function_query.function_name);
UserDefinedObjectsLoader::instance().removeObject(context, UserDefinedObjectType::Function, drop_function_query.function_name);
UserDefinedObjectsLoader::instance().removeObject(current_context, UserDefinedObjectType::Function, drop_function_query.function_name);
return {};
}