1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Enhance the new xIntegrity method of the sqlite3_module object with new

parameters that provide the name of the table being checked and
a flag to indicate a "quick_check".  Based on feedback in
[forum:/forumpost/965c0d02ea|forum post 965c0d02ea].

FossilOrigin-Name: bc8afa3f15954bb35f65dbf940bf069de5e14d333036676c24430cf17b658d05
This commit is contained in:
drh
2023-10-25 10:37:11 +00:00
parent f4154879eb
commit 9f20bde65a
8 changed files with 61 additions and 31 deletions

View File

@ -3332,7 +3332,7 @@ static int rtreeShadowName(const char *zName){
}
/* Forward declaration */
static int rtreeIntegrity(sqlite3_vtab*, char**);
static int rtreeIntegrity(sqlite3_vtab*, const char*, const char*, int, char**);
static sqlite3_module rtreeModule = {
4, /* iVersion */
@ -4187,9 +4187,19 @@ static int rtreeCheckTable(
/*
** Implementation of the xIntegrity method for Rtree.
*/
static int rtreeIntegrity(sqlite3_vtab *pVtab, char **pzErr){
static int rtreeIntegrity(
sqlite3_vtab *pVtab, /* The virtual table to check */
const char *zSchema, /* Schema in which the virtual table lives */
const char *zName, /* Name of the virtual table */
int isQuick, /* True for a quick_check */
char **pzErr /* Write results here */
){
Rtree *pRtree = (Rtree*)pVtab;
int rc;
assert( pzErr!=0 && *pzErr==0 );
UNUSED_PARAMETER(zSchema);
UNUSED_PARAMETER(zName);
UNUSED_PARAMETER(isQuick);
rc = rtreeCheckTable(pRtree->db, pRtree->zDb, pRtree->zName, pzErr);
if( rc==SQLITE_OK && *pzErr ){
*pzErr = sqlite3_mprintf("In RTree %s.%s:\n%z",