From: drh Date: Thu, 15 Feb 2018 01:03:37 +0000 (+0000) Subject: Fix the --heap, --pagecache, --lookaside and other options to the command-line X-Git-Tag: version-3.23.0~126 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=501ea056309a623303e5cfdbeda6c55d5fadfe0b;p=thirdparty%2Fsqlite.git Fix the --heap, --pagecache, --lookaside and other options to the command-line shell that invoke sqlite3_config() so that they work again. FossilOrigin-Name: 00707f2f2f746a6421f3e2de995e68cc8adba7225a04db6b28db52944e7e988e --- diff --git a/manifest b/manifest index a6b76d1492..98d58723e4 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\s--readonly\soption\sto\sthe\s".open"\scommand\sin\sthe\sCLI. -D 2018-02-14T23:27:43.700 +C Fix\sthe\s--heap,\s--pagecache,\s--lookaside\sand\sother\soptions\sto\sthe\scommand-line\nshell\sthat\sinvoke\ssqlite3_config()\sso\sthat\sthey\swork\sagain. +D 2018-02-15T01:03:37.596 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F Makefile.in 7a3f714b4fcf793108042b7b0a5c720b0b310ec84314d61ba7f3f49f27e550ea @@ -489,7 +489,7 @@ F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384 F src/resolve.c bbee7e31d369a18a2f4836644769882e9c5d40ef4a3af911db06410b65cb3730 F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac F src/select.c f02352ac5cbb6fad3804add825743b924cfb6c742ba2e8666d726828a9985d73 -F src/shell.c.in 6fdccd0a2879dab2e0fc2ffedccddebc1f84bd88a806d28c2774ec5e4feca479 +F src/shell.c.in c1b14bc0bc1fe73a97dfaad55ca09f5d6e44f6019977d94e7e3d1861616035e1 F src/sqlite.h.in 51f9acf52c80113d793ddd38b3940ad6895d97b4752503b19291fb8fcbf54c5e F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 83a3c4ce93d650bedfd1aa558cb85a516bd6d094445ee989740827d0d944368d @@ -1706,7 +1706,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 70d304dcbac4c3fd5e3b96108bffea2ce6c0db19c847397d5c5e268bb90a981d -R 2fdde9b3aa61b61468b1828a4e04c2be +P 06870bb15656b50b0e14d4364bb21afac76500e313ecf67aaef3688d603fd076 +R 4e71ff1498e1cda7e0d47e08c283419f U drh -Z 881e2b520c52d585df5898197d96b448 +Z 76196b3bed6ed8589ed1fea48a14df1f diff --git a/manifest.uuid b/manifest.uuid index 10c7702d81..4756fcb048 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -06870bb15656b50b0e14d4364bb21afac76500e313ecf67aaef3688d603fd076 \ No newline at end of file +00707f2f2f746a6421f3e2de995e68cc8adba7225a04db6b28db52944e7e988e \ No newline at end of file diff --git a/src/shell.c.in b/src/shell.c.in index 1ef414f4c2..c074b5ca7b 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -8103,21 +8103,39 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ } #endif main_init(&data); - sqlite3_initialize(); + + /* On Windows, we must translate command-line arguments into UTF-8. + ** The SQLite memory allocator subsystem has to be enabled in order to + ** do this. But we want to run an sqlite3_shutdown() afterwards so that + ** subsequent sqlite3_config() calls will work. So copy all results into + ** memory that does not come from the SQLite memory allocator. + */ #if !SQLITE_SHELL_IS_UTF8 - argv = sqlite3_malloc64(sizeof(argv[0])*argc); + sqlite3_initialize(); + argv = malloc(sizeof(argv[0])*argc); if( argv==0 ){ raw_printf(stderr, "out of memory\n"); exit(1); } for(i=0; i=1 && argv && argv[0] ); Argv0 = argv[0];