mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:03:04 +01:00
Fixed bug CORE-1218 : isc_dsql_info (isc_info_sql_stmt_type) not set isc_info_end at the end of the passed user's buffer
This commit is contained in:
parent
21f357eaa1
commit
dd6aa67920
@ -3610,11 +3610,20 @@ ISC_STATUS API_ROUTINE GDS_DSQL_SQL_INFO(ISC_STATUS* user_status,
|
|||||||
(items[1] == isc_info_end || items[1] == 0) ) &&
|
(items[1] == isc_info_end || items[1] == 0) ) &&
|
||||||
(statement->flags & HANDLE_STATEMENT_prepared) &&
|
(statement->flags & HANDLE_STATEMENT_prepared) &&
|
||||||
statement->das.dasup_stmt_type)
|
statement->das.dasup_stmt_type)
|
||||||
|
{
|
||||||
|
if (buffer_length >= 8)
|
||||||
{
|
{
|
||||||
*buffer++ = isc_info_sql_stmt_type;
|
*buffer++ = isc_info_sql_stmt_type;
|
||||||
put_short((UCHAR*) buffer, 4);
|
put_short((UCHAR*) buffer, 4);
|
||||||
buffer += 2;
|
buffer += 2;
|
||||||
put_long((UCHAR*) buffer, statement->das.dasup_stmt_type);
|
put_long((UCHAR*) buffer, statement->das.dasup_stmt_type);
|
||||||
|
buffer += 4;
|
||||||
|
*buffer = isc_info_end;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*buffer = isc_info_truncated;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user