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

Make it possible to prefetch the cursor before the first user fetch request appears

This commit is contained in:
Dmitry Yemanov 2021-12-21 11:11:15 +03:00
parent 94e1b8b7a3
commit 8fbf0be848
2 changed files with 5 additions and 9 deletions

View File

@ -246,7 +246,10 @@ void DsqlDmlRequest::setDelayedFormat(thread_db* tdbb, IMessageMetadata* metadat
}
needDelayedFormat = false;
delayedFormat = metadata;
const auto message = (dsql_msg*) getStatement()->getReceiveMsg();
if (metadata && message)
parseMetadata(metadata, message->msg_parameters);
}
@ -276,13 +279,7 @@ bool DsqlDmlRequest::fetch(thread_db* tdbb, UCHAR* msgBuffer)
Arg::Gds(isc_unprepared_stmt));
}
dsql_msg* message = (dsql_msg*) statement->getReceiveMsg();
if (delayedFormat && message)
{
parseMetadata(delayedFormat, message->msg_parameters);
delayedFormat = NULL;
}
const auto message = (dsql_msg*) statement->getReceiveMsg();
// Set up things for tracing this call
Jrd::Attachment* att = req_dbb->dbb_attachment;

View File

@ -688,7 +688,6 @@ private:
bool singleton, bool exec, bool fetch);
NestConst<StmtNode> node;
Firebird::RefPtr<Firebird::IMessageMetadata> delayedFormat;
bool needDelayedFormat;
bool firstRowFetched;
};