mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix RTREE so that it does not run queries against the sqlite_stat1 if that
table does not exist. FossilOrigin-Name: 48526a2fe5373e3d19e8b813cc8a342d6b7c9c3d
This commit is contained in:
@ -3012,6 +3012,11 @@ static int rtreeQueryStat1(sqlite3 *db, Rtree *pRtree){
|
||||
int rc;
|
||||
i64 nRow = 0;
|
||||
|
||||
if( sqlite3_table_column_metadata(db,pRtree->zDb,"sqlite_stat1",
|
||||
0,0,0,0,0,0)==SQLITE_ERROR ){
|
||||
pRtree->nRowEst = RTREE_DEFAULT_ROWEST;
|
||||
return SQLITE_OK;
|
||||
}
|
||||
zSql = sqlite3_mprintf(zFmt, pRtree->zDb, pRtree->zName);
|
||||
if( zSql==0 ){
|
||||
rc = SQLITE_NOMEM;
|
||||
|
Reference in New Issue
Block a user