mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Cache and reuse virtual table cursors in the bytecode engine.
FossilOrigin-Name: 2d187d4232d750cb1840f1d89c8aed65962cb0883c1d7f91c554b451e475c514
This commit is contained in:
@@ -8269,7 +8269,14 @@ case OP_VOpen: { /* ncycle */
|
||||
const sqlite3_module *pModule;
|
||||
|
||||
assert( p->bIsReader );
|
||||
pCur = 0;
|
||||
pCur = p->apCsr[pOp->p1];
|
||||
if( pCur!=0
|
||||
&& ALWAYS( pCur->eCurType==CURTYPE_VTAB )
|
||||
&& ALWAYS( pCur->uc.pVCur->pVtab==pOp->p4.pVtab->pVtab )
|
||||
){
|
||||
/* This opcode is a no-op if the cursor is already open */
|
||||
break;
|
||||
}
|
||||
pVCur = 0;
|
||||
pVtab = pOp->p4.pVtab->pVtab;
|
||||
if( pVtab==0 || NEVER(pVtab->pModule==0) ){
|
||||
|
Reference in New Issue
Block a user