| 243 | |
| 244 | |
| 245 | const Format* CMP_format(thread_db* tdbb, CompilerScratch* csb, StreamType stream) |
| 246 | { |
| 247 | /************************************** |
| 248 | * |
| 249 | * C M P _ f o r m a t |
| 250 | * |
| 251 | ************************************** |
| 252 | * |
| 253 | * Functional description |
| 254 | * Pick up a format for a stream. |
| 255 | * |
| 256 | **************************************/ |
| 257 | SET_TDBB(tdbb); |
| 258 | |
| 259 | DEV_BLKCHK(csb, type_csb); |
| 260 | |
| 261 | CompilerScratch::csb_repeat* const tail = &csb->csb_rpt[stream]; |
| 262 | |
| 263 | if (!tail->csb_format) |
| 264 | { |
| 265 | if (tail->csb_relation) |
| 266 | tail->csb_format = MET_current(tdbb, tail->csb_relation); |
| 267 | else if (tail->csb_procedure) |
| 268 | tail->csb_format = tail->csb_procedure->prc_record_format; |
| 269 | //// TODO: LocalTableSourceNode |
| 270 | else |
| 271 | IBERROR(222); // msg 222 bad blr - invalid stream |
| 272 | } |
| 273 | |
| 274 | fb_assert(tail->csb_format); |
| 275 | return tail->csb_format; |
| 276 | } |
| 277 | |
| 278 | |
| 279 | IndexLock* CMP_get_index_lock(thread_db* tdbb, jrd_rel* relation, USHORT id) |
no test coverage detected