mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Have sqlite3_stmt_scanstatus_v2() return an NCYCLE value for all loops, not just virtual tables ones. The value returned is the sum of the NCYCLE counts for the various opcodes that move or read data from the table or index cursor associated with the loop.
FossilOrigin-Name: 9499b2f51e8174c6b8a67840c92ba23b7dd1dc8dc2b91fca0c5dc07b71662149
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
#include "opcodes.h"
|
||||
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
/*
|
||||
@@ -2225,10 +2226,7 @@ int sqlite3_stmt_scanstatus_v2(
|
||||
for(iOp=0; iOp<p->nOp; iOp++){
|
||||
Op *pOp = &p->aOp[iOp];
|
||||
if( pOp->p1!=iEnd ) continue;
|
||||
if( pOp->opcode!=OP_VFilter && pOp->opcode!=OP_VColumn
|
||||
&& pOp->opcode!=OP_Rowid && pOp->opcode!=OP_VOpen
|
||||
&& pOp->opcode!=OP_VNext
|
||||
){
|
||||
if( (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_NCYCLE)==0 ){
|
||||
continue;
|
||||
}
|
||||
res += p->anCycle[iOp];
|
||||
|
Reference in New Issue
Block a user