1
0
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:
drh
2016-05-23 18:12:04 +00:00
parent daa14559d2
commit e62c2fe179
4 changed files with 47 additions and 7 deletions

View File

@ -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;