mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-23 18:20:50 +00:00
fixed setting comparison
This commit is contained in:
parent
7364467d5c
commit
524507b9b8
@ -1,7 +1,7 @@
|
||||
#include <Parsers/ASTSetQuery.h>
|
||||
#include <Interpreters/Context.h>
|
||||
#include <Interpreters/InterpreterSetQuery.h>
|
||||
|
||||
#include <Core/FieldVisitors.h>
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user