2017-04-01 09:19:00 +00:00
|
|
|
#include <Parsers/ASTSetQuery.h>
|
2017-05-23 18:24:43 +00:00
|
|
|
#include <Interpreters/Context.h>
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Interpreters/InterpreterSetQuery.h>
|
2016-12-12 07:24:56 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
BlockIO InterpreterSetQuery::execute()
|
|
|
|
{
|
2019-03-15 16:14:13 +00:00
|
|
|
const auto & ast = query_ptr->as<ASTSetQuery &>();
|
2019-04-18 23:29:32 +00:00
|
|
|
context.checkSettingsConstraints(ast.changes);
|
2019-08-07 16:13:28 +00:00
|
|
|
context.getSessionContext().updateSettingsChanges(ast.changes);
|
2017-06-07 12:54:35 +00:00
|
|
|
return {};
|
2016-12-12 07:24:56 +00:00
|
|
|
}
|
|
|
|
|
2017-06-07 12:54:35 +00:00
|
|
|
|
|
|
|
void InterpreterSetQuery::executeForCurrentContext()
|
|
|
|
{
|
2019-03-15 16:14:13 +00:00
|
|
|
const auto & ast = query_ptr->as<ASTSetQuery &>();
|
2019-04-18 23:29:32 +00:00
|
|
|
context.checkSettingsConstraints(ast.changes);
|
2019-08-07 16:13:28 +00:00
|
|
|
context.updateSettingsChanges(ast.changes);
|
2016-12-12 07:24:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|