MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / parseBlr

Method parseBlr

src/jrd/Routine.cpp:152–183  ·  view source on GitHub ↗

Parse routine BLR and debug info.

Source from the content-addressed store, hash-verified

150
151// Parse routine BLR and debug info.
152void Routine::parseBlr(thread_db* tdbb, CompilerScratch* csb, bid* blob_id, bid* blobDbg)
153{
154 Jrd::Attachment* attachment = tdbb->getAttachment();
155
156 if (blobDbg)
157 DBG_parse_debug_info(tdbb, blobDbg, *csb->csb_dbg_info);
158
159 UCharBuffer tmp;
160
161 if (blob_id)
162 {
163 blb* blob = blb::open(tdbb, attachment->getSysTransaction(), blob_id);
164 ULONG length = blob->blb_length + 10;
165 UCHAR* temp = tmp.getBuffer(length);
166 length = blob->BLB_get_data(tdbb, temp, length);
167 tmp.resize(length);
168 }
169
170 parseMessages(tdbb, csb, BlrReader(tmp.begin(), (unsigned) tmp.getCount()));
171
172 flags &= ~Routine::FLAG_RELOAD;
173
174 Statement* statement = getStatement();
175 PAR_blr(tdbb, NULL, tmp.begin(), (ULONG) tmp.getCount(), NULL, &csb, &statement, false, 0);
176 setStatement(statement);
177
178 if (csb->csb_g_flags & csb_reload)
179 flags |= FLAG_RELOAD;
180
181 if (!blob_id)
182 setImplemented(false);
183}
184
185// Parse the messages of a blr request. For specified message, allocate a format (Format) block.
186void Routine::parseMessages(thread_db* tdbb, CompilerScratch* csb, BlrReader blrReader)

Callers

nothing calls this directly

Calls 12

DBG_parse_debug_infoFunction · 0.85
BlrReaderClass · 0.85
getStatementFunction · 0.85
PAR_blrFunction · 0.85
getSysTransactionMethod · 0.80
BLB_get_dataMethod · 0.80
openFunction · 0.50
getAttachmentMethod · 0.45
getBufferMethod · 0.45
resizeMethod · 0.45
beginMethod · 0.45
getCountMethod · 0.45

Tested by

no test coverage detected