/ Check-in [4b161415]
Login

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

Overview
Comment:If the SELECT that finds all root pages in the showdb fails, then report an error.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4b16141501655faa23e7d34ad05570ea929abb7c
User & Date: drh 2012-04-03 15:10:34
Context
2012-04-03
17:01
Rerun autoconf to update the configure script for version 3.7.12 check-in: 6d73eb20 user: drh tags: trunk
15:10
If the SELECT that finds all root pages in the showdb fails, then report an error. check-in: 4b161415 user: drh tags: trunk
14:59
Enhance the "showdb" utility program with the "pgidx" option. Now requires linkage with the amalgamation. check-in: 4b573701 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tool/showdb.c.

650
651
652
653
654
655
656


657
658
659
660
661
662
663
           "SELECT type, name, rootpage FROM SQLITE_MASTER WHERE rootpage",
           -1, &pStmt, 0);
  if( rc==SQLITE_OK ){
    while( sqlite3_step(pStmt)==SQLITE_ROW ){
      int pgno = sqlite3_column_int(pStmt, 2);
      page_usage_btree(pgno, 0, 0, sqlite3_column_text(pStmt, 1));
    }


  }
  sqlite3_finalize(pStmt);
  sqlite3_close(db);

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







>
>







650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
           "SELECT type, name, rootpage FROM SQLITE_MASTER WHERE rootpage",
           -1, &pStmt, 0);
  if( rc==SQLITE_OK ){
    while( sqlite3_step(pStmt)==SQLITE_ROW ){
      int pgno = sqlite3_column_int(pStmt, 2);
      page_usage_btree(pgno, 0, 0, sqlite3_column_text(pStmt, 1));
    }
  }else{
    printf("ERROR: cannot query database: %s\n", sqlite3_errmsg(db));
  }
  sqlite3_finalize(pStmt);
  sqlite3_close(db);

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