Skip to content

Commit 09b523c

Browse files
author
drh
committed
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
1 parent 60afcb8 commit 09b523c

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

ext/misc/memstat.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,11 @@ static int memstatFilter(
345345
int argc, sqlite3_value **argv
346346
){
347347
memstat_cursor *pCur = (memstat_cursor *)pVtabCursor;
348-
pCur->iRowid = 1;
348+
int rc = memstatFindSchemas(pCur);
349+
if( rc ) return rc;
350+
pCur->iRowid = 0;
349351
pCur->iDb = 0;
350-
return memstatFindSchemas(pCur);
352+
return memstatNext(pVtabCursor);
351353
}
352354

353355
/*

manifest

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
C Add\sthe\sgeopoly_regular(X,Y,R,N)\sfunction\sto\sthe\sgeopoly\sextension.
2-
D 2018-09-28T14:01:17.539
1+
C Fix\sa\sbug\sin\sthe\ssqlite_memstat\svirtual\stable\sthat\swas\scausing\sit\sto\sreport\nthe\samount\sof\smemory\sused\sas\szero\sbytes.
2+
D 2018-09-28T18:51:18.258
33
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
44
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
55
F Makefile.in 01e95208a78b57d056131382c493c963518f36da4c42b12a97eb324401b3a334
@@ -286,7 +286,7 @@ F ext/misc/fileio.c 7317d825fab6a3c48f6e3822a00a6a22e08e55af31700ac96f16a523f830
286286
F ext/misc/fuzzer.c 7c64b8197bb77b7d64eff7cac7848870235d4c25
287287
F ext/misc/ieee754.c f190d0cc5182529acb15babd177781be1ac1718c
288288
F ext/misc/json1.c 276f87dc8365b34b0fffb7ef32481dd07fac6fdb3224e2822396a48377ac8363
289-
F ext/misc/memstat.c 5bf79f86be9c6ccdcdd3529155a65f64b6fe54fa87553307580fb650125e586a
289+
F ext/misc/memstat.c 2780712e90765b810645227578438d972b76a089210901bfe9ec88f6a45b0570
290290
F ext/misc/memvfs.c ab36f49e02ebcdf85a1e08dc4d8599ea8f343e073ac9e0bca18a98b7e1ec9567
291291
F ext/misc/mmapwarm.c 70b618f2d0bde43fae288ad0b7498a629f2b6f61b50a27e06fae3cd23c83af29
292292
F ext/misc/nextchar.c 35c8b8baacb96d92abbb34a83a997b797075b342
@@ -1770,7 +1770,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
17701770
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
17711771
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
17721772
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
1773-
P 944e167a98e995c5750c1fcd44df857d6b10c1cbb91731fad2849415c42b2cfc
1774-
R 9e3d22ac82d673a7d5cc41392de57d72
1773+
P 4505bbae58357eacab262b642b2a56d6dd380de72faceb5bbfd042eb94a12c06
1774+
R a4d832eb9ce30fc99095dc863dfe84b6
17751775
U drh
1776-
Z d2b850e1c73ac3950129550f18e00569
1776+
Z fa1cdba8568610c894d1ce677cdd3927

manifest.uuid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4505bbae58357eacab262b642b2a56d6dd380de72faceb5bbfd042eb94a12c06
1+
8a758a872175b0c74e631c231240c5c733fbec708d0cff23eb9c4025e4a800ec

0 commit comments

Comments
 (0)