MCPcopy Create free account
hub / github.com/audacity/audacity / eqp_append

Function eqp_append

lib-src/sqlite/shell.c:11997–12015  ·  view source on GitHub ↗

** Add a new entry to the EXPLAIN QUERY PLAN data */

Source from the content-addressed store, hash-verified

11995** Add a new entry to the EXPLAIN QUERY PLAN data
11996*/
11997static void eqp_append(ShellState *p, int iEqpId, int p2, const char *zText){
11998 EQPGraphRow *pNew;
11999 int nText = strlen30(zText);
12000 if( p->autoEQPtest ){
12001 utf8_printf(p->out, "%d,%d,%s\n", iEqpId, p2, zText);
12002 }
12003 pNew = sqlite3_malloc64( sizeof(*pNew) + nText );
12004 if( pNew==0 ) shell_out_of_memory();
12005 pNew->iEqpId = iEqpId;
12006 pNew->iParentId = p2;
12007 memcpy(pNew->zText, zText, nText+1);
12008 pNew->pNext = 0;
12009 if( p->sGraph.pLast ){
12010 p->sGraph.pLast->pNext = pNew;
12011 }else{
12012 p->sGraph.pRow = pNew;
12013 }
12014 p->sGraph.pLast = pNew;
12015}
12016
12017/*
12018** Free and reset the EXPLAIN QUERY PLAN data that has been collected

Callers 2

shell_callbackFunction · 0.85
shell_execFunction · 0.85

Calls 3

strlen30Function · 0.85
utf8_printfFunction · 0.85
shell_out_of_memoryFunction · 0.85

Tested by

no test coverage detected