From fa4d185a338b1cefa561f8675dee7e47174c0bf0 Mon Sep 17 00:00:00 2001 From: asfernandes Date: Mon, 1 Oct 2007 15:49:42 +0000 Subject: [PATCH] Fixed CORE-1489 - DATEADD wrong work with NULL arguments --- src/jrd/SysFunction.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jrd/SysFunction.cpp b/src/jrd/SysFunction.cpp index 811335603b..5f9af35261 100644 --- a/src/jrd/SysFunction.cpp +++ b/src/jrd/SysFunction.cpp @@ -549,7 +549,12 @@ static void makeDateAdd(DataTypeUtilBase* dataTypeUtil, SysFunction* function, d { fb_assert(argsCount >= 3); + bool isNullable; + if (initResult(result, argsCount, args, &isNullable)) + return; + *result = *args[2]; + result->setNullable(isNullable); }