-C Remove\sa\stest\sfrom\ssqlite3VdbeMemFromBtree()\swhich\swas\sunnecessary,\sand\nafter\sthe\srecent\sOP_Column\srefactoring,\sunreachable.
-D 2013-11-21T19:05:04.606
+C Add\sthe\s--timer\soption\sto\sthe\swordcount\stest\sprogram.
+D 2013-11-21T19:27:45.727
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 8a07bebafbfda0eb67728f4bd15a36201662d1a1
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F test/without_rowid2.test af260339f79d13cb220288b67cd287fbcf81ad99
F test/without_rowid3.test eac3d5c8a1924725b58503a368f2cbd24fd6c8a0
F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a
-F test/wordcount.c c80f378f26fbf6ada602c4313ae88fc47439263e
+F test/wordcount.c a42341b7a01229782b9bd97ff2eeebae830adbea
F test/zeroblob.test caaecfb4f908f7bc086ed238668049f96774d688
F test/zerodamage.test 209d7ed441f44cc5299e4ebffbef06fd5aabfefd
F tool/build-all-msvc.bat 1bac6adc3fdb4d9204f21d17b14be25778370e48 x
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P d4ccf0f5c656c8f0e1c32d5f7971b131f42c3cbd
-R 66dccb4d546e53b7ddedb9ff6684fbe4
+P 23667f3ba09b7e839d76c42669dc9247a91262c8
+R 6f7d4c37e1e4a4d7b173a8698f60d4e6
U drh
-Z 06ed94041404ba9e41a5bfcb0e125483
+Z be6cc4796ccce786831080c9b4f10bd9
** --commit NNN Commit after every NNN operations
** --nosync Use PRAGMA synchronous=OFF
** --journal MMMM Use PRAGMA journal_mode=MMMM
+** --timer Time the operation of this program
**
** Modes:
**
#include <stdarg.h>
#include "sqlite3.h"
+/* Return the current wall-clock time */
+static sqlite3_int64 realTime(void){
+ static sqlite3_vfs *clockVfs = 0;
+ sqlite3_int64 t;
+ if( clockVfs==0 ) clockVfs = sqlite3_vfs_find(0);
+ if( clockVfs->iVersion>=1 && clockVfs->xCurrentTimeInt64!=0 ){
+ clockVfs->xCurrentTimeInt64(clockVfs, &t);
+ }else{
+ double r;
+ clockVfs->xCurrentTime(clockVfs, &r);
+ t = (sqlite3_int64)(r*86400000.0);
+ }
+ return t;
+}
+
/* Print an error message and exit */
static void fatal_error(const char *zMsg, ...){
va_list ap;
int doTrace = 0; /* True for --trace */
int showStats = 0; /* True for --stats */
int showSummary = 0; /* True for --summary */
+ int showTimer = 0; /* True for --timer */
int cacheSize = 0; /* Desired cache size. 0 means default */
int pageSize = 0; /* Desired page size. 0 means default */
int commitInterval = 0; /* How often to commit. 0 means never */
int rc; /* Return code from an SQLite interface */
int iCur, iHiwtr; /* Statistics values, current and "highwater" */
sqlite3_int64 sumCnt = 0; /* Sum in QUERY mode */
+ sqlite3_int64 startTime;
char zInput[2000]; /* A single line of input */
/* Process command-line arguments */
showStats = 1;
}else if( strcmp(z,"summary")==0 ){
showSummary = 1;
+ }else if( strcmp(z,"timer")==0 ){
+ showTimer = i;
}else if( strcmp(z,"cachesize")==0 && i<argc-1 ){
i++;
cacheSize = atoi(argv[i]);
if( zDbName==0 ){
fatal_error("Usage: %s [--options] DATABASE [INPUTFILE]\n", argv[0]);
}
+ startTime = realTime();
/* Open the database and the input file */
if( sqlite3_open(zDbName, &db) ){
sqlite3_finalize(pSelect);
}
+
+ if( showTimer ){
+ sqlite3_int64 elapseTime = realTime() - startTime;
+ printf("/* %3d.%03d", (int)(elapseTime/1000), (int)(elapseTime%1000));
+ for(i=0; i<argc; i++) if( i!=showTimer ) printf(" %s", argv[i]);
+ printf(" */\n");
+ }
+
if( showSummary ){
sqlite3_create_function(db, "checksum", -1, SQLITE_UTF8, 0,
0, checksumStep, checksumFinalize);