Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Save CPU cycles in sqlite3Prepare() by, among other things, shifting the EXPLAIN column label logic over to sqlite3VdbeMakeReady(). |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
1ca5ef84506aac3e2f08baa36095b3be |
User & Date: | drh 2019-10-09 01:19:07.523 |
Context
2019-10-09
| ||
15:00 | Change sqlite3SelectDup() to always return NULL if an OOM has occurred. (check-in: 01ba4641ab user: drh tags: trunk) | |
13:12 | Remove the obsolete "fastfuzztest" target from the makefiles. (check-in: 3d44f1ee0f user: drh tags: makefile-cleanup) | |
01:19 | Save CPU cycles in sqlite3Prepare() by, among other things, shifting the EXPLAIN column label logic over to sqlite3VdbeMakeReady(). (check-in: 1ca5ef8450 user: drh tags: trunk) | |
2019-10-08
| ||
13:34 | Fix problems with using the fts5 'rebuild' command inside a transaction that contains other updates of the same table. Fix for [e258f008]. (check-in: 238e083571 user: dan tags: trunk) | |
Changes
Changes to src/prepare.c.
︙ | ︙ | |||
639 640 641 642 643 644 645 | sParse.zTail = &zSql[nBytes]; } }else{ sqlite3RunParser(&sParse, zSql, &zErrMsg); } assert( 0==sParse.nQueryLoop ); | | > > < < < < < < < < < < < < < < | | < < < < < < | < < > | | < < | < < < | | 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 | sParse.zTail = &zSql[nBytes]; } }else{ sqlite3RunParser(&sParse, zSql, &zErrMsg); } assert( 0==sParse.nQueryLoop ); if( sParse.rc==SQLITE_DONE ){ sParse.rc = SQLITE_OK; } if( sParse.checkSchema ){ schemaIsValid(&sParse); } if( pzTail ){ *pzTail = sParse.zTail; } if( db->init.busy==0 ){ sqlite3VdbeSetSql(sParse.pVdbe, zSql, (int)(sParse.zTail-zSql), prepFlags); } if( db->mallocFailed ){ sParse.rc = SQLITE_NOMEM_BKPT; } rc = sParse.rc; if( rc!=SQLITE_OK ){ if( sParse.pVdbe ) sqlite3VdbeFinalize(sParse.pVdbe); assert(!(*ppStmt)); }else{ *ppStmt = (sqlite3_stmt*)sParse.pVdbe; } if( zErrMsg ){ |
︙ | ︙ |
Changes to src/vdbeaux.c.
︙ | ︙ | |||
2219 2220 2221 2222 2223 2224 2225 | assert( EIGHT_BYTE_ALIGNMENT(x.pSpace) ); x.nFree = ROUNDDOWN8(pParse->szOpAlloc - n); /* Bytes of unused memory */ assert( x.nFree>=0 ); assert( EIGHT_BYTE_ALIGNMENT(&x.pSpace[x.nFree]) ); resolveP2Values(p, &nArg); p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort); | | > > > > > | > > > > > > > > > > > > > | 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 | assert( EIGHT_BYTE_ALIGNMENT(x.pSpace) ); x.nFree = ROUNDDOWN8(pParse->szOpAlloc - n); /* Bytes of unused memory */ assert( x.nFree>=0 ); assert( EIGHT_BYTE_ALIGNMENT(&x.pSpace[x.nFree]) ); resolveP2Values(p, &nArg); p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort); if( pParse->explain ){ static const char * const azColName[] = { "addr", "opcode", "p1", "p2", "p3", "p4", "p5", "comment", "id", "parent", "notused", "detail" }; int iFirst, mx, i; if( nMem<10 ) nMem = 10; if( pParse->explain==2 ){ sqlite3VdbeSetNumCols(p, 4); iFirst = 8; mx = 12; }else{ sqlite3VdbeSetNumCols(p, 8); iFirst = 0; mx = 8; } for(i=iFirst; i<mx; i++){ sqlite3VdbeSetColName(p, i-iFirst, COLNAME_NAME, azColName[i], SQLITE_STATIC); } } p->expired = 0; /* Memory for registers, parameters, cursor, etc, is allocated in one or two ** passes. On the first pass, we try to reuse unused memory at the ** end of the opcode array. If we are unable to satisfy all memory ** requirements by reusing the opcode array tail, then the second |
︙ | ︙ |