aboutsummaryrefslogtreecommitdiff
path: root/ext/rtree/rtree.c
diff options
context:
space:
mode:
authordrh <>2023-10-25 10:37:11 +0000
committerdrh <>2023-10-25 10:37:11 +0000
commit9f20bde65a26e13b512ec521421c7b892ad6eadd (patch)
tree7bbba72db4a48670fa3eb5d40537bb8161717bda /ext/rtree/rtree.c
parentf4154879ebb84fc0875d553e2de60d8ed4864da9 (diff)
downloadsqlite-9f20bde65a26e13b512ec521421c7b892ad6eadd.tar.gz
sqlite-9f20bde65a26e13b512ec521421c7b892ad6eadd.zip
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
Diffstat (limited to 'ext/rtree/rtree.c')
-rw-r--r--ext/rtree/rtree.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c
index 682c052c5..1705abd51 100644
--- a/ext/rtree/rtree.c
+++ b/ext/rtree/rtree.c
@@ -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",