1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

In shared-cache mode, lock all required tables before beginning to execute the body of the statement program. (CVS 2881)

FossilOrigin-Name: 23b587b05b89727248805e6d9e5141e018cf2152
This commit is contained in:
danielk1977
2006-01-07 13:21:04 +00:00
parent 8c0ca7d27c
commit c00da10565
16 changed files with 310 additions and 96 deletions

View File

@@ -16,7 +16,7 @@
** so is applicable. Because this module is responsible for selecting
** indices, you might also think of this module as the "query optimizer".
**
** $Id: where.c,v 1.190 2006/01/05 11:34:34 danielk1977 Exp $
** $Id: where.c,v 1.191 2006/01/07 13:21:04 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -1580,7 +1580,9 @@ WhereInfo *sqlite3WhereBegin(
iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
if( pTab->isTransient || pTab->pSelect ) continue;
if( (pLevel->flags & WHERE_IDX_ONLY)==0 ){
sqlite3OpenTableForReading(v, pTabItem->iCursor, iDb, pTab);
sqlite3OpenTable(pParse, pTabItem->iCursor, iDb, pTab, OP_OpenRead);
}else{
sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
}
pLevel->iTabCur = pTabItem->iCursor;
if( (pIx = pLevel->pIdx)!=0 ){