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

Fixed CORE-1094.

This commit is contained in:
dimitr 2007-01-17 14:17:47 +00:00
parent 25a69d4ded
commit 561c3816bc
3 changed files with 19 additions and 9 deletions

View File

@ -4978,10 +4978,26 @@ static UCHAR* var_info(
if (!message || !message->msg_index)
return info;
for (const dsql_par* param = message->msg_par_ordered; param;
param = param->par_ordered)
Firebird::HalfStaticArray<const dsql_par*, 16> parameters;
for (const dsql_par* param = message->msg_parameters; param;
param = param->par_next)
{
if (param->par_index && param->par_index >= first_index)
if (param->par_index)
{
if (param->par_index > parameters.getCount())
parameters.grow(param->par_index);
fb_assert(!parameters[param->par_index - 1]);
parameters[param->par_index - 1] = param;
}
}
for (int i = 0; i < parameters.getCount(); i++)
{
const dsql_par* param = parameters[i];
fb_assert(param);
if (param->par_index >= first_index)
{
sql_len = param->par_desc.dsc_length;
sql_sub_type = 0;

View File

@ -594,7 +594,6 @@ class dsql_msg : public pool_alloc<dsql_type_msg>
{
public:
dsql_par* msg_parameters; //!< Parameter list
dsql_par* msg_par_ordered; //!< Ordered parameter list
UCHAR* msg_buffer; //!< Message buffer
USHORT msg_number; //!< Message number
USHORT msg_length; //!< Message length
@ -608,7 +607,6 @@ class dsql_par : public pool_alloc<dsql_type_par>
public:
dsql_msg* par_message; //!< Parent message
dsql_par* par_next; //!< Next parameter in linked list
dsql_par* par_ordered; //!< Next parameter in order of index
dsql_par* par_null; //!< Null parameter, if used
dsql_nod* par_node; //!< Associated value node, if any
dsql_ctx* par_dbkey_ctx; //!< Context of internally requested dbkey

View File

@ -1909,10 +1909,6 @@ dsql_par* MAKE_parameter(dsql_msg* message, bool sqlda_flag, bool null_flag,
dsql_par* parameter = FB_NEW(*tdsql->getDefaultPool()) dsql_par;
parameter->par_message = message;
parameter->par_next = message->msg_parameters;
if (parameter->par_next != 0)
parameter->par_next->par_ordered = parameter;
else
message->msg_par_ordered = parameter;
message->msg_parameters = parameter;
parameter->par_parameter = message->msg_parameter++;