diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pragma.c | 2 | ||||
-rw-r--r-- | src/sqlite.h.in | 2 | ||||
-rw-r--r-- | src/vdbe.c | 17 |
3 files changed, 12 insertions, 9 deletions
diff --git a/src/pragma.c b/src/pragma.c index d310b83a3..90076b0c2 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -1778,7 +1778,7 @@ void sqlite3Pragma( if( NEVER(pVTab->pModule==0) ) continue; if( pVTab->pModule->iVersion<4 ) continue; if( pVTab->pModule->xIntegrity==0 ) continue; - sqlite3VdbeAddOp2(v, OP_VCheck, 0, 3); + sqlite3VdbeAddOp3(v, OP_VCheck, i, 3, isQuick); sqlite3VdbeAppendP4(v, pTab, P4_TABLE); a1 = sqlite3VdbeAddOp1(v, OP_IsNull, 3); VdbeCoverage(v); integrityCheckResultRow(v); diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 43a1d524d..f3db71dea 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -7277,7 +7277,7 @@ struct sqlite3_module { int (*xShadowName)(const char*); /* The methods above are in versions 1 through 3 of the sqlite_module object. ** Those below are for version 4 and greater. */ - int (*xIntegrity)(sqlite3_vtab *pVTab, char**); + int (*xIntegrity)(sqlite3_vtab *pVTab, const char*, const char*, int, char**); }; /* diff --git a/src/vdbe.c b/src/vdbe.c index 3a5c70d69..221e8847d 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -8162,13 +8162,14 @@ case OP_VOpen: { /* ncycle */ #endif /* SQLITE_OMIT_VIRTUALTABLE */ #ifndef SQLITE_OMIT_VIRTUALTABLE -/* Opcode: VCheck * P2 * P4 * +/* Opcode: VCheck P1 P2 P3 P4 * ** -** P4 is a pointer to a Table object that is a virtual table that -** supports the xIntegrity() method. This opcode runs the xIntegrity() -** method for that virtual table. If an error is reported back, the error -** message is stored in register P2. If no errors are seen, register P2 -** is set to NULL. +** P4 is a pointer to a Table object that is a virtual table in schema P1 +** that supports the xIntegrity() method. This opcode runs the xIntegrity() +** method for that virtual table, using P3 as the integer argument. If +** an error is reported back, the table name is prepended to the error +** message and that message is stored in P2. If no errors are seen, +** register P2 is set to NULL. */ case OP_VCheck: { /* out2 */ Table *pTab; @@ -8191,7 +8192,9 @@ case OP_VCheck: { /* out2 */ assert( pModule->xIntegrity!=0 ); pTab->nTabRef++; sqlite3VtabLock(pTab->u.vtab.p); - rc = pModule->xIntegrity(pVtab, &zErr); + assert( pOp->p1>=0 && pOp->p1<db->nDb ); + rc = pModule->xIntegrity(pVtab, db->aDb[pOp->p1].zDbSName, pTab->zName, + pOp->p3, &zErr); sqlite3VtabUnlock(pTab->u.vtab.p); sqlite3DeleteTable(db, pTab); if( rc ){ |