/ Check-in [461b0b81]
Login

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

Overview
Comment:Improved error message output when the btreeinfo.c extension is run in a connection that lacks sqlite_dbpage support.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:461b0b81b2acedb1b9ca520657518d6778417c375aeb58c41ead840b75a6d985
User & Date: drh 2018-01-24 13:15:56
Context
2018-01-24
14:39
Adjust the fts3rank.test module so that it works on big-endian systems (hopefully - I don't have a big-endian machine to test the change on.) check-in: e4766cab user: drh tags: trunk
13:15
Improved error message output when the btreeinfo.c extension is run in a connection that lacks sqlite_dbpage support. check-in: 461b0b81 user: drh tags: trunk
12:14
Prevent a harmless unused variable warning when compiling with SQLITE_OMIT_TRACE. check-in: 61a44961 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/misc/btreeinfo.c.

335
336
337
338
339
340
341

342
343
344
345
346
347
348
349
){
  BinfoCursor *pCsr = (BinfoCursor *)pCursor;
  if( i>=BINFO_COLUMN_HASROWID && i<=BINFO_COLUMN_SZPAGE && pCsr->hasRowid<0 ){
    int pgno = sqlite3_column_int(pCsr->pStmt, BINFO_COLUMN_ROOTPAGE+1);
    sqlite3 *db = sqlite3_context_db_handle(ctx);
    int rc = binfoCompute(db, pgno, pCsr);
    if( rc ){

      return rc;
    }
  }
  switch( i ){
    case BINFO_COLUMN_NAME:
    case BINFO_COLUMN_TYPE:
    case BINFO_COLUMN_TBL_NAME:
    case BINFO_COLUMN_ROOTPAGE:







>
|







335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
){
  BinfoCursor *pCsr = (BinfoCursor *)pCursor;
  if( i>=BINFO_COLUMN_HASROWID && i<=BINFO_COLUMN_SZPAGE && pCsr->hasRowid<0 ){
    int pgno = sqlite3_column_int(pCsr->pStmt, BINFO_COLUMN_ROOTPAGE+1);
    sqlite3 *db = sqlite3_context_db_handle(ctx);
    int rc = binfoCompute(db, pgno, pCsr);
    if( rc ){
      pCursor->pVtab->zErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(db));
      return SQLITE_ERROR;
    }
  }
  switch( i ){
    case BINFO_COLUMN_NAME:
    case BINFO_COLUMN_TYPE:
    case BINFO_COLUMN_TBL_NAME:
    case BINFO_COLUMN_ROOTPAGE: