aboutsummaryrefslogtreecommitdiff
path: root/tool/sqldiff.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-05-12 12:24:50 +0000
committerdrh <drh@noemail.net>2015-05-12 12:24:50 +0000
commit6582ae520f37af35ae434f06e25167218946dddd (patch)
tree39d752bb585449832c6bf588dad00bd92ab522a6 /tool/sqldiff.c
parentaa62e48cab38d976ab1288f2be18b3ef40bfc09c (diff)
downloadsqlite-6582ae520f37af35ae434f06e25167218946dddd.tar.gz
sqlite-6582ae520f37af35ae434f06e25167218946dddd.zip
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. FossilOrigin-Name: 07c7d3925cbcf44c2f606c7f016ec56304e0ca24
Diffstat (limited to 'tool/sqldiff.c')
-rw-r--r--tool/sqldiff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tool/sqldiff.c b/tool/sqldiff.c
index 3aae46a1f..6d7230354 100644
--- a/tool/sqldiff.c
+++ b/tool/sqldiff.c
@@ -1159,12 +1159,14 @@ int main(int argc, char **argv){
showHelp();
return 0;
}else
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
if( strcmp(z,"lib")==0 || strcmp(z,"L")==0 ){
if( i==argc-1 ) cmdlineError("missing argument to %s", argv[i]);
azExt = realloc(azExt, sizeof(azExt[0])*(nExt+1));
if( azExt==0 ) cmdlineError("out of memory");
azExt[nExt++] = argv[++i];
}else
+#endif
if( strcmp(z,"primarykey")==0 ){
g.bSchemaPK = 1;
}else
@@ -1200,6 +1202,7 @@ int main(int argc, char **argv){
if( rc || zErrMsg ){
cmdlineError("\"%s\" does not appear to be a valid SQLite database", zDb1);
}
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
sqlite3_enable_load_extension(g.db, 1);
for(i=0; i<nExt; i++){
rc = sqlite3_load_extension(g.db, azExt[i], 0, &zErrMsg);
@@ -1207,6 +1210,7 @@ int main(int argc, char **argv){
cmdlineError("error loading %s: %s", azExt[i], zErrMsg);
}
}
+#endif
free(azExt);
zSql = sqlite3_mprintf("ATTACH %Q as aux;", zDb2);
rc = sqlite3_exec(g.db, zSql, 0, 0, &zErrMsg);