SQLite

Check-in [4b16141501]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4b16141501655faa23e7d34ad05570ea929abb7c
User & Date: drh 2012-04-03 15:10:34.981
Context
2012-04-03
17:01
Rerun autoconf to update the configure script for version 3.7.12 (check-in: 6d73eb20e8 user: drh tags: trunk)
15:10
If the SELECT that finds all root pages in the showdb fails, then report an error. (check-in: 4b16141501 user: drh tags: trunk)
14:59
Enhance the "showdb" utility program with the "pgidx" option. Now requires linkage with the amalgamation. (check-in: 4b5737014c user: drh tags: trunk)
Changes
Unified Diff 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] : "???");