mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Performance optimization and slight size reduction in the OP_Transaction
opcode. FossilOrigin-Name: 7bee8c195f3fc27aaab13e493ad446a4f19201de3ac064ed6d8a3cbda7c69ee1
This commit is contained in:
@@ -3754,6 +3754,7 @@ case OP_AutoCommit: {
|
||||
*/
|
||||
case OP_Transaction: {
|
||||
Btree *pBt;
|
||||
Db *pDb;
|
||||
int iMeta = 0;
|
||||
|
||||
assert( p->bIsReader );
|
||||
@@ -3773,7 +3774,8 @@ case OP_Transaction: {
|
||||
}
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
pBt = db->aDb[pOp->p1].pBt;
|
||||
pDb = &db->aDb[pOp->p1];
|
||||
pBt = pDb->pBt;
|
||||
|
||||
if( pBt ){
|
||||
rc = sqlite3BtreeBeginTrans(pBt, pOp->p2, &iMeta);
|
||||
@@ -3814,8 +3816,7 @@ case OP_Transaction: {
|
||||
assert( pOp->p5==0 || pOp->p4type==P4_INT32 );
|
||||
if( rc==SQLITE_OK
|
||||
&& pOp->p5
|
||||
&& (iMeta!=pOp->p3
|
||||
|| db->aDb[pOp->p1].pSchema->iGeneration!=pOp->p4.i)
|
||||
&& (iMeta!=pOp->p3 || pDb->pSchema->iGeneration!=pOp->p4.i)
|
||||
){
|
||||
/*
|
||||
** IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema
|
||||
|
Reference in New Issue
Block a user