From 524507b9b83aaffe33ab1596bd604a3bad493a51 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Mon, 10 Jul 2017 19:59:08 +0300 Subject: [PATCH] fixed setting comparison --- dbms/src/Interpreters/InterpreterSetQuery.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dbms/src/Interpreters/InterpreterSetQuery.cpp b/dbms/src/Interpreters/InterpreterSetQuery.cpp index b98cbc2f763..b4cc2188ff8 100644 --- a/dbms/src/Interpreters/InterpreterSetQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSetQuery.cpp @@ -1,7 +1,7 @@ #include #include #include - +#include namespace DB { @@ -25,7 +25,6 @@ BlockIO InterpreterSetQuery::execute() return {}; } - void InterpreterSetQuery::checkAccess(const ASTSetQuery & ast) { /** The `readonly` value is understood as follows: @@ -41,7 +40,7 @@ void InterpreterSetQuery::checkAccess(const ASTSetQuery & ast) { String value; /// Setting isn't checked if value wasn't changed. - if (!settings.tryGet(change.name, value) || change.value != value) + if (!settings.tryGet(change.name, value) || applyVisitor(FieldVisitorToString(), change.value) != value) { if (readonly == 1) throw Exception("Cannot execute SET query in readonly mode", ErrorCodes::READONLY);