/ Check-in [8a758a87]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a bug in the sqlite_memstat virtual table that was causing it to report the amount of memory used as zero bytes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8a758a872175b0c74e631c231240c5c733fbec708d0cff23eb9c4025e4a800ec
User & Date: drh 2018-09-28 18:51:18
Context
2018-09-28
20:46
Have sqlite3changegroup_output_strm() call its output function more regularly. check-in: 8467c31a user: dan tags: trunk
18:51
Fix a bug in the sqlite_memstat virtual table that was causing it to report the amount of memory used as zero bytes. check-in: 8a758a87 user: drh tags: trunk
14:01
Add the geopoly_regular(X,Y,R,N) function to the geopoly extension. check-in: 4505bbae user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/memstat.c.

   341    341   */
   342    342   static int memstatFilter(
   343    343     sqlite3_vtab_cursor *pVtabCursor, 
   344    344     int idxNum, const char *idxStr,
   345    345     int argc, sqlite3_value **argv
   346    346   ){
   347    347     memstat_cursor *pCur = (memstat_cursor *)pVtabCursor;
   348         -  pCur->iRowid = 1;
          348  +  int rc = memstatFindSchemas(pCur);
          349  +  if( rc ) return rc;
          350  +  pCur->iRowid = 0;
   349    351     pCur->iDb = 0;
   350         -  return memstatFindSchemas(pCur);
          352  +  return memstatNext(pVtabCursor);
   351    353   }
   352    354   
   353    355   /*
   354    356   ** SQLite will invoke this method one or more times while planning a query
   355    357   ** that uses the memstat virtual table.  This routine needs to create
   356    358   ** a query plan for each invocation and compute an estimated cost for that
   357    359   ** plan.