mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 12:03:02 +01:00
Fixed CORE-5244: Wrong error message when trying to execute SELECT statement using isc_dsql_execute_immediate
This commit is contained in:
parent
88cad913d0
commit
641a2b913d
@ -211,12 +211,18 @@ InternalMessageBuffer::InternalMessageBuffer(unsigned aBlrLength, const unsigned
|
|||||||
unsigned aBufferLength, unsigned char* aBuffer)
|
unsigned aBufferLength, unsigned char* aBuffer)
|
||||||
{
|
{
|
||||||
buffer = aBuffer;
|
buffer = aBuffer;
|
||||||
|
if (aBlr)
|
||||||
|
{
|
||||||
metadata = FB_NEW MetadataFromBlr(aBlrLength, aBlr, aBufferLength);
|
metadata = FB_NEW MetadataFromBlr(aBlrLength, aBlr, aBufferLength);
|
||||||
metadata->addRef();
|
metadata->addRef();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
metadata = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
InternalMessageBuffer::~InternalMessageBuffer()
|
InternalMessageBuffer::~InternalMessageBuffer()
|
||||||
{
|
{
|
||||||
|
if (metadata)
|
||||||
metadata->release();
|
metadata->release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,8 +546,13 @@ void DSQL_execute_immediate(thread_db* tdbb, Jrd::Attachment* attachment, jrd_tr
|
|||||||
|
|
||||||
Jrd::ContextPoolHolder context(tdbb, &request->getPool());
|
Jrd::ContextPoolHolder context(tdbb, &request->getPool());
|
||||||
|
|
||||||
// A select with a non zero output length is a singleton select
|
// A select having cursor is a singleton select when executed immediate
|
||||||
const bool singleton = reqTypeWithCursor(statement->getType()) && out_msg;
|
const bool singleton = reqTypeWithCursor(statement->getType());
|
||||||
|
if (singleton && !(out_msg && out_meta))
|
||||||
|
{
|
||||||
|
ERRD_post(Arg::Gds(isc_dsql_sqlda_err) <<
|
||||||
|
Arg::Gds(isc_dsql_no_output_sqlda));
|
||||||
|
}
|
||||||
|
|
||||||
request->req_transaction = *tra_handle;
|
request->req_transaction = *tra_handle;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user