diff options
author | drh <drh@noemail.net> | 2018-09-28 18:51:18 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-09-28 18:51:18 +0000 |
commit | 09b523c99b760adf05422fc8d805313a2271cd3a (patch) | |
tree | 79626fb801fb470a2666d1862840ca830042f209 /ext/misc/memstat.c | |
parent | 60afcb80eec642e7d18cd12b37c3afa5fb594ffb (diff) | |
download | sqlite-09b523c99b760adf05422fc8d805313a2271cd3a.tar.gz sqlite-09b523c99b760adf05422fc8d805313a2271cd3a.zip |
Fix a bug in the sqlite_memstat virtual table that was causing it to report
the amount of memory used as zero bytes.
FossilOrigin-Name: 8a758a872175b0c74e631c231240c5c733fbec708d0cff23eb9c4025e4a800ec
Diffstat (limited to 'ext/misc/memstat.c')
-rw-r--r-- | ext/misc/memstat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/misc/memstat.c b/ext/misc/memstat.c index 59a5547ce..27cb404df 100644 --- a/ext/misc/memstat.c +++ b/ext/misc/memstat.c @@ -345,9 +345,11 @@ static int memstatFilter( int argc, sqlite3_value **argv ){ memstat_cursor *pCur = (memstat_cursor *)pVtabCursor; - pCur->iRowid = 1; + int rc = memstatFindSchemas(pCur); + if( rc ) return rc; + pCur->iRowid = 0; pCur->iDb = 0; - return memstatFindSchemas(pCur); + return memstatNext(pVtabCursor); } /* |