MCPcopy Create free account
hub / github.com/MariaDB/server / Link

Method Link

storage/connect/filter.cpp:297–319  ·  view source on GitHub ↗

/ Link the fil2 filter chain to the fil1(this) filter chain. */ /

Source from the content-addressed store, hash-verified

295/* Link the fil2 filter chain to the fil1(this) filter chain. */
296/***********************************************************************/
297PFIL FILTER::Link(PGLOBAL g, PFIL fil2)
298 {
299 PFIL fil1;
300
301 if (trace(1))
302 htrc("Linking filter %p with op=%d... to filter %p with op=%d\n",
303 this, Opc, fil2, (fil2) ? fil2->Opc : 0);
304
305 for (fil1 = this; fil1->Next; fil1 = fil1->Next) ;
306
307 if (fil1->Opc == OP_SEP)
308 fil1->Next = fil2; // Separator already exists
309 else {
310 // Create a filter separator and insert it between the chains
311 PFIL filp = new(g) FILTER(g, OP_SEP);
312
313 filp->Arg(0) = fil1;
314 filp->Next = fil2;
315 fil1->Next = filp;
316 } // endelse
317
318 return (this);
319 } // end of Link
320
321/***********************************************************************/
322/* Remove eventual last separator from a filter chain. */

Callers 4

CntIndexReadFunction · 0.45
CntIndexRangeFunction · 0.45
DefineAMMethod · 0.45
InitTableListMethod · 0.45

Calls 1

htrcFunction · 0.70

Tested by

no test coverage detected