/ Check-in [07c7d3925c]
Login

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

Overview
Comment:Try to get recent sqlite3_analyzer and sqldiff tests working for all tested combinations of compile-time options, especially SQLITE_OMIT_VIRTUALTABLE and SQLITE_OMIT_LOAD_EXTENSION.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 07c7d3925cbcf44c2f606c7f016ec56304e0ca24
User & Date: drh 2015-05-12 12:24:50
Context
2015-05-12
13:32
Improvements to documentation of the sqlite3_column_xxxxx() interfaces. No code changes. check-in: f1aa951a33 user: drh tags: trunk
12:24
Try to get recent sqlite3_analyzer and sqldiff tests working for all tested combinations of compile-time options, especially SQLITE_OMIT_VIRTUALTABLE and SQLITE_OMIT_LOAD_EXTENSION. check-in: 07c7d3925c user: drh tags: trunk
00:46
Fix sqldiff.exe so that it always runs in single-thread mode. check-in: c223910e72 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/dbstat.c.

   642    642       0,                            /* xCommit */
   643    643       0,                            /* xRollback */
   644    644       0,                            /* xFindMethod */
   645    645       0,                            /* xRename */
   646    646     };
   647    647     return sqlite3_create_module(db, "dbstat", &dbstat_module, 0);
   648    648   }
          649  +#else  /* Without the proper defines, sqlite3DbstatRegister is a no-op */
          650  +int sqlite3DbstatRegister(sqlite3 *db){ return SQLITE_OK; }
   649    651   #endif /* SQLITE_ENABLE_DBSTAT_VTAB */

Changes to test/analyzer1.test.

     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   # Quick tests for the sqlite3_analyzer tool
    13     13   #
    14     14   set testdir [file dirname $argv0]
    15     15   source $testdir/tester.tcl
           16  +
           17  +ifcapable !vtab {
           18  +  finish_test
           19  +  return
           20  +}
           21  +
    16     22   if {$tcl_platform(platform)=="windows"} {
    17     23     set PROG "sqlite3_analyzer.exe"
    18     24   } else {
    19     25     set PROG "./sqlite3_analyzer"
    20     26   }
    21     27   db close
    22     28   forcedelete test.db test.db-journal test.db-wal

Changes to test/sqldiff1.test.

     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   # Quick tests for the sqldiff tool
    13     13   #
    14     14   set testdir [file dirname $argv0]
    15     15   source $testdir/tester.tcl
           16  +
    16     17   if {$tcl_platform(platform)=="windows"} {
    17     18     set PROG "sqldiff.exe"
    18     19   } else {
    19     20     set PROG "./sqldiff"
    20     21   }
    21     22   db close
    22     23   forcedelete test.db test2.db

Changes to tool/sqldiff.c.

  1155   1155           if( i==argc-1 ) cmdlineError("missing argument to %s", argv[i]);
  1156   1156           g.fDebug = strtol(argv[++i], 0, 0);
  1157   1157         }else
  1158   1158         if( strcmp(z,"help")==0 ){
  1159   1159           showHelp();
  1160   1160           return 0;
  1161   1161         }else
         1162  +#ifndef SQLITE_OMIT_LOAD_EXTENSION
  1162   1163         if( strcmp(z,"lib")==0 || strcmp(z,"L")==0 ){
  1163   1164           if( i==argc-1 ) cmdlineError("missing argument to %s", argv[i]);
  1164   1165           azExt = realloc(azExt, sizeof(azExt[0])*(nExt+1));
  1165   1166           if( azExt==0 ) cmdlineError("out of memory");
  1166   1167           azExt[nExt++] = argv[++i];
  1167   1168         }else
         1169  +#endif
  1168   1170         if( strcmp(z,"primarykey")==0 ){
  1169   1171           g.bSchemaPK = 1;
  1170   1172         }else
  1171   1173         if( strcmp(z,"schema")==0 ){
  1172   1174           g.bSchemaOnly = 1;
  1173   1175         }else
  1174   1176         if( strcmp(z,"summary")==0 ){
................................................................................
  1196   1198     if( rc ){
  1197   1199       cmdlineError("cannot open database file \"%s\"", zDb1);
  1198   1200     }
  1199   1201     rc = sqlite3_exec(g.db, "SELECT * FROM sqlite_master", 0, 0, &zErrMsg);
  1200   1202     if( rc || zErrMsg ){
  1201   1203       cmdlineError("\"%s\" does not appear to be a valid SQLite database", zDb1);
  1202   1204     }
         1205  +#ifndef SQLITE_OMIT_LOAD_EXTENSION
  1203   1206     sqlite3_enable_load_extension(g.db, 1);
  1204   1207     for(i=0; i<nExt; i++){
  1205   1208       rc = sqlite3_load_extension(g.db, azExt[i], 0, &zErrMsg);
  1206   1209       if( rc || zErrMsg ){
  1207   1210         cmdlineError("error loading %s: %s", azExt[i], zErrMsg);
  1208   1211       }
  1209   1212     }
         1213  +#endif
  1210   1214     free(azExt);
  1211   1215     zSql = sqlite3_mprintf("ATTACH %Q as aux;", zDb2);
  1212   1216     rc = sqlite3_exec(g.db, zSql, 0, 0, &zErrMsg);
  1213   1217     if( rc || zErrMsg ){
  1214   1218       cmdlineError("cannot attach database \"%s\"", zDb2);
  1215   1219     }
  1216   1220     rc = sqlite3_exec(g.db, "SELECT * FROM aux.sqlite_master", 0, 0, &zErrMsg);