mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 07:23:04 +01:00
Fixed problem with subfunction parameters related to CORE-4572.
This commit is contained in:
parent
5106986dbf
commit
93b35c7cc7
@ -1471,17 +1471,23 @@ DeclareSubFuncNode* DeclareSubFuncNode::dsqlPass(DsqlCompilerScratch* dsqlScratc
|
|||||||
dsqlFunction->udf_length = returnType->length;
|
dsqlFunction->udf_length = returnType->length;
|
||||||
dsqlFunction->udf_character_set_id = returnType->charSetId;
|
dsqlFunction->udf_character_set_id = returnType->charSetId;
|
||||||
|
|
||||||
// ASF: It seems not required to set dsqlFunction->udf_arguments for now.
|
|
||||||
|
|
||||||
const Array<NestConst<ParameterClause> >& paramArray = dsqlBlock->parameters;
|
const Array<NestConst<ParameterClause> >& paramArray = dsqlBlock->parameters;
|
||||||
bool defaultFound = false;
|
bool defaultFound = false;
|
||||||
|
|
||||||
for (const NestConst<ParameterClause>* i = paramArray.begin(); i != paramArray.end(); ++i)
|
for (const NestConst<ParameterClause>* i = paramArray.begin(); i != paramArray.end(); ++i)
|
||||||
{
|
{
|
||||||
|
// ASF: dsqlFunction->udf_arguments is only checked for its count for now.
|
||||||
|
dsqlFunction->udf_arguments.add(dsc());
|
||||||
|
|
||||||
const ParameterClause* param = *i;
|
const ParameterClause* param = *i;
|
||||||
|
|
||||||
if (param->defaultClause)
|
if (param->defaultClause)
|
||||||
|
{
|
||||||
defaultFound = true;
|
defaultFound = true;
|
||||||
|
|
||||||
|
if (dsqlFunction->udf_def_count == 0)
|
||||||
|
dsqlFunction->udf_def_count = paramArray.end() - i;
|
||||||
|
}
|
||||||
else if (defaultFound)
|
else if (defaultFound)
|
||||||
{
|
{
|
||||||
// Parameter without default value after parameters with default.
|
// Parameter without default value after parameters with default.
|
||||||
|
Loading…
Reference in New Issue
Block a user