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

Simplifications to the LockTable opcode. (CVS 4954)

FossilOrigin-Name: 66c5d715bbb732b0861a8a6f994cb4a8f259f2f8
This commit is contained in:
drh
2008-04-02 16:29:30 +00:00
parent 6cc9c28920
commit 6a9ad3da22
5 changed files with 31 additions and 33 deletions

View File

@@ -22,7 +22,7 @@
** COMMIT
** ROLLBACK
**
** $Id: build.c,v 1.478 2008/04/01 03:27:39 drh Exp $
** $Id: build.c,v 1.479 2008/04/02 16:29:31 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -111,10 +111,8 @@ static void codeTableLocks(Parse *pParse){
for(i=0; i<pParse->nTableLock; i++){
TableLock *p = &pParse->aTableLock[i];
int p1 = p->iDb;
if( p->isWriteLock ){
p1 = -1*(p1+1);
}
sqlite3VdbeAddOp4(pVdbe, OP_TableLock, p1, p->iTab, 0, p->zName, P4_STATIC);
sqlite3VdbeAddOp4(pVdbe, OP_TableLock, p1, p->iTab, p->isWriteLock,
p->zName, P4_STATIC);
}
}
#else