1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-24 08:21:29 +03:00

Omit unnecessary calls to table locking routines in the common case when

there is no shared cache.

FossilOrigin-Name: f94f3021cde1d46373ee8fc8e5028d7507a937240c59cf0d0d19ab22acbd3c41
This commit is contained in:
drh
2023-06-20 17:45:19 +00:00
parent c439b9e0c6
commit 40ee72947e
4 changed files with 17 additions and 13 deletions

View File

@@ -234,15 +234,17 @@ void sqlite3FinishCoding(Parse *pParse){
pParse->nVtabLock = 0;
#endif
#ifndef SQLITE_OMIT_SHARED_CACHE
/* Once all the cookies have been verified and transactions opened,
** obtain the required table-locks. This is a no-op unless the
** shared-cache feature is enabled.
*/
codeTableLocks(pParse);
if( pParse->nTableLock ) codeTableLocks(pParse);
#endif
/* Initialize any AUTOINCREMENT data structures required.
*/
sqlite3AutoincrementBegin(pParse);
if( pParse->pAinc ) sqlite3AutoincrementBegin(pParse);
/* Code constant expressions that where factored out of inner loops.
**