From bfdb77b586bea7e530b4dcfa7412ab42cc300a1d Mon Sep 17 00:00:00 2001 From: Vyacheslav Alipov Date: Wed, 5 Jun 2013 13:54:05 +0000 Subject: [PATCH] regionToName function arguments check fix [#CONV-7735] --- dbms/include/DB/Functions/FunctionsDictionaries.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/include/DB/Functions/FunctionsDictionaries.h b/dbms/include/DB/Functions/FunctionsDictionaries.h index 6c8de36a5f9..ff19c8b0e94 100644 --- a/dbms/include/DB/Functions/FunctionsDictionaries.h +++ b/dbms/include/DB/Functions/FunctionsDictionaries.h @@ -438,7 +438,7 @@ public: /// Получить тип результата по типам аргументов. Если функция неприменима для данных аргументов - кинуть исключение. DataTypePtr getReturnType(const DataTypes & arguments) const { - if (arguments.size() != 1 || arguments.size() != 2) + if (arguments.size() != 1 && arguments.size() != 2) throw Exception("Number of arguments for function " + getName() + " doesn't match: passed " + Poco::NumberFormatter::format(arguments.size()) + ", should be 1 or 2.", ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);