8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 17:23:03 +01:00

Fixed bug #8221 : Crash when MAKE_DBKEY() is called with 0 or 1 arguments

This commit is contained in:
Vlad Khorsun 2024-08-20 13:25:59 +03:00
parent c647af5a45
commit d9f9b289ba

View File

@ -861,11 +861,14 @@ void setParamsMakeDbkey(DataTypeUtilBase*, const SysFunction*, int argsCount, ds
{
// MAKE_DBKEY ( REL_NAME | REL_ID, RECNUM [, DPNUM [, PPNUM] ] )
if (args[0]->isUnknown())
args[0]->makeLong(0);
if (argsCount > 1)
{
if (args[0]->isUnknown())
args[0]->makeLong(0);
if (args[1]->isUnknown())
args[1]->makeInt64(0);
if (args[1]->isUnknown())
args[1]->makeInt64(0);
}
if (argsCount > 2 && args[2]->isUnknown())
args[2]->makeInt64(0);