From: drh Date: Thu, 7 Nov 2013 19:43:21 +0000 (+0000) Subject: Add the --stats and --summary options to the wordcount.c test program. X-Git-Tag: version-3.8.2~134 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0afa99e3e7a4483ea0105050be29c5d3c45a1fce;p=thirdparty%2Fsqlite.git Add the --stats and --summary options to the wordcount.c test program. FossilOrigin-Name: 8aa21e6791d408c8f018bd779e09cb7e7179f884 --- diff --git a/manifest b/manifest index 963c610298..ed50f198f9 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Increase\sthe\sversion\snumber\sto\s3.8.2. -D 2013-11-07T18:40:39.882 +C Add\sthe\s--stats\sand\s--summary\soptions\sto\sthe\swordcount.c\stest\sprogram. +D 2013-11-07T19:43:21.798 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in d12e4455cf7a36e42d3949876c1c3b88ff70867a F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -1083,7 +1083,7 @@ F test/without_rowid1.test aaa26da19d543cd8d3d2d0e686dfa255556c15c8 F test/without_rowid2.test af260339f79d13cb220288b67cd287fbcf81ad99 F test/without_rowid3.test eac3d5c8a1924725b58503a368f2cbd24fd6c8a0 F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a -F test/wordcount.c 77aaf31e8107bc8aa22adea9f7ed9a4525157d8b +F test/wordcount.c c1ed122d6d8c288c7f21922ad64bba206ac51646 F test/zeroblob.test caaecfb4f908f7bc086ed238668049f96774d688 F test/zerodamage.test 209d7ed441f44cc5299e4ebffbef06fd5aabfefd F tool/build-all-msvc.bat 1bac6adc3fdb4d9204f21d17b14be25778370e48 x @@ -1135,7 +1135,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff -P f02ee5463084cef45ae412c51211b66de7e86baf -R c1238a589294d1c15421f0bf326b2f50 +P 9ad5b74c26c5a18068a2418a2092a05c226912c2 +R 7eb08ca6a9c5e8c1ab9bbee56e904b5c U drh -Z 818626e2278c5a358e5fcb9ad988230a +Z ae0666d0d2115aaaa9008a758df6593e diff --git a/manifest.uuid b/manifest.uuid index ca27b5f91f..fbffe55460 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9ad5b74c26c5a18068a2418a2092a05c226912c2 \ No newline at end of file +8aa21e6791d408c8f018bd779e09cb7e7179f884 \ No newline at end of file diff --git a/test/wordcount.c b/test/wordcount.c index b9f71091b2..a90d989aff 100644 --- a/test/wordcount.c +++ b/test/wordcount.c @@ -20,6 +20,8 @@ ** --update Use UPDATE mode ** --nocase Add the NOCASE collating sequence to the words. ** --trace Enable sqlite3_trace() output. +** --summary Show summary information on the collected data. +** --stats Show sqlite3_status() results at the end. ** ** Modes: ** @@ -72,6 +74,20 @@ static void traceCallback(void *NotUsed, const char *zSql){ printf("%s;\n", zSql); } +/* An sqlite3_exec() callback that prints results on standard output, +** each column separated by a single space. */ +static int printResult(void *NotUsed, int nArg, char **azArg, char **azNm){ + int i; + const char *zFormat = "%s"; + for(i=0; i