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

@ -37,6 +37,11 @@ using namespace execplan;
#include "rowgroup.h"
using namespace rowgroup;
#include "errorcodes.h"
#include "idberrorinfo.h"
#include "errorids.h"
using namespace logging;
namespace funcexp
{
@ -65,7 +70,16 @@ double Func_pow::getDoubleVal(Row& row,
// @bug3490, 4461, rule out domain error, pole error and overflow range error.
if (!isfinite(x))
{
isNull = true;
Message::Args args;
args.add("pow");
args.add(base);
args.add(exponent);
unsigned errcode = ERR_FUNC_OUT_OF_RANGE_RESULT;
throw IDBExcept(IDBErrorInfo::instance()->errorMsg(errcode, args), errcode);
}
return x;
}