diff options
author | danielk1977 <danielk1977@noemail.net> | 2006-01-07 13:21:04 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2006-01-07 13:21:04 +0000 |
commit | c00da105654fb2bd0712acccac3e36b539805d08 (patch) | |
tree | be8fb606d3568c09ec40310e35179152dcd56a03 /src/update.c | |
parent | 8c0ca7d27c60c5a43dbfeab3c869a45e0e3603b1 (diff) | |
download | sqlite-c00da105654fb2bd0712acccac3e36b539805d08.tar.gz sqlite-c00da105654fb2bd0712acccac3e36b539805d08.zip |
In shared-cache mode, lock all required tables before beginning to execute the body of the statement program. (CVS 2881)
FossilOrigin-Name: 23b587b05b89727248805e6d9e5141e018cf2152
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/update.c b/src/update.c index fd6edc60f..0a47d1da5 100644 --- a/src/update.c +++ b/src/update.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle UPDATE statements. ** -** $Id: update.c,v 1.115 2006/01/05 11:34:34 danielk1977 Exp $ +** $Id: update.c,v 1.116 2006/01/07 13:21:04 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -309,7 +309,7 @@ void sqlite3Update( /* Open a cursor and make it point to the record that is ** being updated. */ - sqlite3OpenTableForReading(v, iCur, iDb, pTab); + sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead); } sqlite3VdbeAddOp(v, OP_MoveGe, iCur, 0); @@ -364,9 +364,7 @@ void sqlite3Update( ** action, then we need to open all indices because we might need ** to be deleting some records. */ - sqlite3VdbeAddOp(v, OP_Integer, iDb, 0); - sqlite3VdbeAddOp(v, OP_OpenWrite, iCur, pTab->tnum); - sqlite3VdbeAddOp(v, OP_SetNumColumns, iCur, pTab->nCol); + sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenWrite); if( onError==OE_Replace ){ openAll = 1; }else{ |