Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/jrd/recsrc/ProcedureScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ void ProcedureScan::internalOpen(thread_db* tdbb) const

const_cast<jrd_prc*>(m_procedure)->checkReload(tdbb);

// Procedure could be altered and its record format changed since current instance of
// ProcedureScan was created. Here it is not the right place to check if new format is
// compatible with caller's expectations, so we just use correct (possible new) format.

m_format = m_procedure->prc_record_format;

Request* const request = tdbb->getRequest();
Impure* const impure = request->getImpure<Impure>(m_impure);

Expand Down Expand Up @@ -229,6 +235,8 @@ bool ProcedureScan::internalGetRecord(thread_db* tdbb) const

trace.fetch(false, ITracePlugin::RESULT_SUCCESS);

fb_assert(m_format == m_procedure->prc_record_format);

for (USHORT i = 0; i < m_format->fmt_count; i++)
{
assignParams(tdbb, &msg_format->fmt_desc[2 * i], &msg_format->fmt_desc[2 * i + 1],
Expand Down
2 changes: 1 addition & 1 deletion src/jrd/recsrc/RecordSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ namespace Jrd

protected:
const StreamType m_stream;
const Format* const m_format;
mutable const Format* m_format;
};


Expand Down
Loading