From: drh Date: Wed, 17 Apr 2013 12:19:48 +0000 (+0000) Subject: Update the command-line shell to give an exit code of 0 when the ".quit" X-Git-Tag: version-3.7.17~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=99b390827b9f4de28ea2095d8e26047c6041d532;p=thirdparty%2Fsqlite.git Update the command-line shell to give an exit code of 0 when the ".quit" command is run from the command-line. FossilOrigin-Name: 467e218120d63d0f34c447f7324bac1364ac0eac --- diff --git a/manifest b/manifest index 993bd65c98..74612d5403 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Omit\ssqlite3_compileoption_used()\sentries\sthat\sare\snot\sexplicitly\sstated\non\sthe\scompiler\scommand-line,\sexcept\skeep\sSQLITE_THREADSAFE\saround\sso\sthat\nthere\sis\salways\sat\sleast\sone\scompilation\soption. -D 2013-04-16T18:24:34.635 +C Update\sthe\scommand-line\sshell\sto\sgive\san\sexit\scode\sof\s0\swhen\sthe\s".quit"\ncommand\sis\srun\sfrom\sthe\scommand-line. +D 2013-04-17T12:19:48.061 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 3dd3fcb87b70c78d99b2c8a03e44ec86d6ca9ce2 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -181,7 +181,7 @@ F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50 F src/resolve.c 10a1b332e3eb36e5d561085e18c58a8578cd7d73 F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0 F src/select.c 01540bcd3df3c8f1187158e77986028b1c667258 -F src/shell.c 06bca04044b312ccadc43bf72385e7440cf60d1b +F src/shell.c a303eb4529ee78a68ee54e8ba6941f76ee5601d2 F src/sqlite.h.in d897fd15b9c74d4e78e4c42319484ceb1649c5d7 F src/sqlite3.rc fea433eb0a59f4c9393c8e6d76a6e2596b1fe0c0 F src/sqlite3ext.h 7183ab832e23db0f934494f16928da127a571d75 @@ -1051,7 +1051,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 16f7ba4afaa69f6150b4defd4ddf5800f5d23084 -R 28c9578f8f913595ef0f108427330fb4 +P 109d6767d2626741db1d15ed55e699ac3184a536 +R 11f575757c220b40832c775a36cd7f16 U drh -Z e5270d047eef465302b7108533238f0a +Z 387afe95e75dc05ba67ce426c2ff6b48 diff --git a/manifest.uuid b/manifest.uuid index dd03c38f4f..fd6a44aeb7 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -109d6767d2626741db1d15ed55e699ac3184a536 \ No newline at end of file +467e218120d63d0f34c447f7324bac1364ac0eac \ No newline at end of file diff --git a/src/shell.c b/src/shell.c index 7dde2203ec..1bb1b377b3 100644 --- a/src/shell.c +++ b/src/shell.c @@ -3166,7 +3166,7 @@ int main(int argc, char **argv){ z = cmdline_option_value(argc,argv,++i); if( z[0]=='.' ){ rc = do_meta_command(z, &data); - if( rc && bail_on_error ) return rc; + if( rc && bail_on_error ) return rc==2 ? 0 : rc; }else{ open_db(&data); rc = shell_exec(data.db, z, shell_callback, &data, &zErrMsg); @@ -3190,6 +3190,7 @@ int main(int argc, char **argv){ */ if( zFirstCmd[0]=='.' ){ rc = do_meta_command(zFirstCmd, &data); + if( rc==2 ) rc = 0; }else{ open_db(&data); rc = shell_exec(data.db, zFirstCmd, shell_callback, &data, &zErrMsg);