1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-98: Added error message for functions returning out of range values.

This commit is contained in:
Ben Thompson
2016-10-10 16:52:47 -05:00
parent 9606375939
commit d0e9cde782
5 changed files with 38 additions and 5 deletions

View File

@ -33,6 +33,11 @@ using namespace execplan;
#include "rowgroup.h"
using namespace rowgroup;
#include "errorcodes.h"
#include "idberrorinfo.h"
#include "errorids.h"
using namespace logging;
namespace funcexp
{
@ -58,7 +63,14 @@ double Func_exp::getDoubleVal(Row& row,
if (errno == ERANGE) // display NULL for out range value
{
if (x > 0)
{
isNull = true;
Message::Args args;
args.add("exp");
args.add(x);
unsigned errcode = ERR_FUNC_OUT_OF_RANGE_RESULT;
throw IDBExcept(IDBErrorInfo::instance()->errorMsg(errcode, args), errcode);
}
else
ret = 0.0;
}