Skip to content

Commit

Permalink
Fixed bug #8221 : Crash when MAKE_DBKEY() is called with 0 or 1 argum…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
hvlad committed Aug 20, 2024
1 parent c647af5 commit d9f9b28
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/jrd/SysFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d9f9b28

Please sign in to comment.