SQLite

Check-in [e3188a86]
Login

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

Overview
Comment:Try to avoid a double-free in the showdb utility program when running pgidx on a corrupt database. See forum post a60ea5a4d4 for context
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e3188a866362894d98521b3006fb5b9a63fe4a3bb2ff4f1b58acb6eb4e52da8f
User & Date: drh 2021-06-08 17:56:16
Context
2021-06-08
23:46
Remove two assert()s in FTS5 that checks for database corruption right before actual code does the same check. dbsqlfuzz 9680db8f5338cb9b6060eb3a02d984555d4472e3. (check-in: f3f82967 user: drh tags: trunk)
17:56
Try to avoid a double-free in the showdb utility program when running pgidx on a corrupt database. See forum post a60ea5a4d4 for context (check-in: e3188a86 user: drh tags: trunk)
12:22
Add an assert() to prevent the value of the SQLITE_VTABRISK macros from being changed in a way that would break logic. (check-in: 33babdb5 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tool/showdb.c.

1037
1038
1039
1040
1041
1042
1043


1044
1045
1046
1047
1048
1049
1050
  }
  sqlite3_close(db);

  /* Print the report and free memory used */
  for(i=1; i<=g.mxPage; i++){
    if( zPageUse[i]==0 ) page_usage_btree(i, -1, 0, 0);
    printf("%5u: %s\n", i, zPageUse[i] ? zPageUse[i] : "???");


    sqlite3_free(zPageUse[i]);
  }
  sqlite3_free(zPageUse);
  zPageUse = 0;
}

/*







>
>







1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
  }
  sqlite3_close(db);

  /* Print the report and free memory used */
  for(i=1; i<=g.mxPage; i++){
    if( zPageUse[i]==0 ) page_usage_btree(i, -1, 0, 0);
    printf("%5u: %s\n", i, zPageUse[i] ? zPageUse[i] : "???");
  }
  for(i=1; i<=g.mxPage; i++){
    sqlite3_free(zPageUse[i]);
  }
  sqlite3_free(zPageUse);
  zPageUse = 0;
}

/*