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

Fixed bug CORE-2995 : Same error in status vector reported twice

This commit is contained in:
hvlad 2010-05-07 13:02:21 +00:00
parent 7d6d1fd336
commit cd5fcdd279

View File

@ -1936,7 +1936,6 @@ ISC_STATUS GDS_DSQL_FETCH(ISC_STATUS* user_status,
if (statement->rsr_flags.test(Rsr::STREAM_ERR)) if (statement->rsr_flags.test(Rsr::STREAM_ERR))
{ {
// The previous batch of receives ended with an error status. // The previous batch of receives ended with an error status.
// We're all done returning data in the local queue. // We're all done returning data in the local queue.
// Return that error status vector to the user. // Return that error status vector to the user.
@ -1947,14 +1946,7 @@ ISC_STATUS GDS_DSQL_FETCH(ISC_STATUS* user_status,
// hvlad: prevent subsequent fetches // hvlad: prevent subsequent fetches
statement->rsr_flags.set(Rsr::EOF_SET | Rsr::PAST_EOF); statement->rsr_flags.set(Rsr::EOF_SET | Rsr::PAST_EOF);
statement->raiseException();
if (statement->rsr_status)
{
memcpy(user_status, statement->rsr_status->value(), sizeof(ISC_STATUS_ARRAY));
// don't clear rsr_status as it hold strings
}
return user_status[1];
} }
} }
statement->rsr_msgs_waiting--; statement->rsr_msgs_waiting--;
@ -2022,6 +2014,9 @@ ISC_STATUS GDS_DSQL_FREE(ISC_STATUS* user_status, Rsr** stmt_handle, USHORT opti
return unsupported(user_status); return unsupported(user_status);
} }
fb_assert(statement->haveException() == 0);
statement->clearException();
if (statement->rsr_flags.test(Rsr::LAZY)) if (statement->rsr_flags.test(Rsr::LAZY))
{ {
if (option == DSQL_drop) if (option == DSQL_drop)