-C Add\sthe\s--fsync\sflag\sto\skvtest,\sand\sdocument\sthe\s--nosync\sflag.
-D 2017-06-02T23:32:17.964
+C Add\sthe\s--nocheckpoint\sand\s--multitrans\soptions\sto\skvtest.
+D 2017-06-03T15:17:21.324
F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 8eeb80162074004e906b53d7340a12a14c471a83743aab975947e95ce061efcc
F test/json103.test c5f6b85e69de05f6b3195f9f9d5ce9cd179099a0
F test/json104.test 877d5845f6303899b7889ea5dd1bea99076e3100574d5c536082245c5805dcaa
F test/keyword1.test 37ef6bba5d2ed5b07ecdd6810571de2956599dff
-F test/kvtest.c bf2e7ae3de92d98147e8cd49fc550ee3382599aa20b7e2b60038b409a5b2ef34
+F test/kvtest.c a9496cda31fad0998f8c135ae1b02f5a7cf42702a69885084dc2e973744bfba8
F test/lastinsert.test 42e948fd6442f07d60acbd15d33fb86473e0ef63
F test/laststmtchanges.test ae613f53819206b3222771828d024154d51db200
F test/like.test 0603f4fa0dad50987f70032c05800cbfa8985302
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P fc73e7d2f16386f96c55c42f9830193f7c178521a7ad90c3117b85ef629b5ce4
-R ac814c325af013850c7ab30877776723
+P 7fdc78a672b2ea6187dcb5fdf32f809bb8e4d501e2434f2233edc3bc2e3acc7c
+R 042e3a76ff3a30833c7d24fbea5e960d
U drh
-Z 8a788cf2631896aff995d8f1a4f42a59
+Z db3574b40a9ba9c25a835775eb0162a1
" --integrity-check Run \"PRAGMA integrity_check\" after test\n"
" --max-id N Maximum blob key to use\n"
" --mmap N Mmap as much as N bytes of DBFILE\n"
+" --multitrans Each read or write in its own transaction\n"
+" --nocheckpoint Omit the checkpoint on WAL mode writes\n"
" --nosync Set \"PRAGMA synchronous=OFF\"\n"
" --jmode MODE Set MODE journal mode prior to starting\n"
" --random Read blobs in a random order\n"
" --start N Start reading with this blob key\n"
" --stats Output operating stats before exiting\n"
-" --update To an overwrite test\n"
+" --update Do an overwrite test\n"
;
/* Reference resources used */
int doIntegrityCk = 0; /* Run PRAGMA integrity_check after the test */
int noSync = 0; /* Disable synchronous mode */
int doFsync = 0; /* Update disk files synchronously */
+ int doMultiTrans = 0; /* Each operation in its own transaction */
+ int noCheckpoint = 0; /* Omit the checkpoint in WAL mode */
sqlite3 *db = 0; /* Database connection */
sqlite3_stmt *pStmt = 0; /* Prepared statement for SQL access */
sqlite3_blob *pBlob = 0; /* Handle for incremental Blob I/O */
char *z = argv[i];
if( z[0]!='-' ) fatalError("unknown argument: \"%s\"", z);
if( z[1]=='-' ) z++;
+ if( strcmp(z, "-asc")==0 ){
+ eOrder = ORDER_ASC;
+ continue;
+ }
+ if( strcmp(z, "-blob-api")==0 ){
+ bBlobApi = 1;
+ continue;
+ }
+ if( strcmp(z, "-cache-size")==0 ){
+ if( i==argc-1 ) fatalError("missing argument on \"%s\"", argv[i]);
+ iCache = integerValue(argv[++i]);
+ continue;
+ }
if( strcmp(z, "-count")==0 ){
if( i==argc-1 ) fatalError("missing argument on \"%s\"", argv[i]);
nCount = integerValue(argv[++i]);
if( nCount<1 ) fatalError("the --count must be positive");
continue;
}
+ if( strcmp(z, "-desc")==0 ){
+ eOrder = ORDER_DESC;
+ continue;
+ }
+ if( strcmp(z, "-fsync")==0 ){
+ doFsync = 1;
+ continue;
+ }
+ if( strcmp(z, "-integrity-check")==0 ){
+ doIntegrityCk = 1;
+ continue;
+ }
+ if( strcmp(z, "-jmode")==0 ){
+ if( i==argc-1 ) fatalError("missing argument on \"%s\"", argv[i]);
+ zJMode = argv[++i];
+ continue;
+ }
if( strcmp(z, "-mmap")==0 ){
if( i==argc-1 ) fatalError("missing argument on \"%s\"", argv[i]);
mmapSize = integerValue(argv[++i]);
iMax = integerValue(argv[++i]);
continue;
}
- if( strcmp(z, "-start")==0 ){
- if( i==argc-1 ) fatalError("missing argument on \"%s\"", argv[i]);
- iKey = integerValue(argv[++i]);
- if( iKey<1 ) fatalError("the --start must be positive");
+ if( strcmp(z, "-multitrans")==0 ){
+ doMultiTrans = 1;
continue;
}
- if( strcmp(z, "-cache-size")==0 ){
- if( i==argc-1 ) fatalError("missing argument on \"%s\"", argv[i]);
- iCache = integerValue(argv[++i]);
+ if( strcmp(z, "-nocheckpoint")==0 ){
+ noCheckpoint = 1;
continue;
}
- if( strcmp(z, "-jmode")==0 ){
- if( i==argc-1 ) fatalError("missing argument on \"%s\"", argv[i]);
- zJMode = argv[++i];
+ if( strcmp(z, "-nosync")==0 ){
+ noSync = 1;
continue;
}
if( strcmp(z, "-random")==0 ){
eOrder = ORDER_RANDOM;
continue;
}
- if( strcmp(z, "-asc")==0 ){
- eOrder = ORDER_ASC;
- continue;
- }
- if( strcmp(z, "-desc")==0 ){
- eOrder = ORDER_DESC;
- continue;
- }
- if( strcmp(z, "-blob-api")==0 ){
- bBlobApi = 1;
+ if( strcmp(z, "-start")==0 ){
+ if( i==argc-1 ) fatalError("missing argument on \"%s\"", argv[i]);
+ iKey = integerValue(argv[++i]);
+ if( iKey<1 ) fatalError("the --start must be positive");
continue;
}
if( strcmp(z, "-stats")==0 ){
isUpdateTest = 1;
continue;
}
- if( strcmp(z, "-integrity-check")==0 ){
- doIntegrityCk = 1;
- continue;
- }
- if( strcmp(z, "-nosync")==0 ){
- noSync = 1;
- continue;
- }
- if( strcmp(z, "-fsync")==0 ){
- doFsync = 1;
- continue;
- }
fatalError("unknown option: \"%s\"", argv[i]);
}
if( eType==PATH_DB ){
zSql = sqlite3_mprintf("PRAGMA journal_mode=%Q", zJMode);
sqlite3_exec(db, zSql, 0, 0, 0);
sqlite3_free(zSql);
+ if( noCheckpoint ){
+ sqlite3_exec(db, "PRAGMA wal_autocheckpoint=0", 0, 0, 0);
+ }
}
sqlite3_prepare_v2(db, "PRAGMA journal_mode", -1, &pStmt, 0);
if( sqlite3_step(pStmt)==SQLITE_ROW ){
sqlite3_finalize(pStmt);
}
pStmt = 0;
- sqlite3_exec(db, "BEGIN", 0, 0, 0);
+ if( !doMultiTrans ) sqlite3_exec(db, "BEGIN", 0, 0, 0);
}
if( iMax<=0 ) iMax = 1000;
for(i=0; i<nCount; i++){
display_stats(db, 0);
}
if( db ){
- sqlite3_exec(db, "COMMIT", 0, 0, 0);
- sqlite3_close(db);
+ if( !doMultiTrans ) sqlite3_exec(db, "COMMIT", 0, 0, 0);
+ if( !noCheckpoint ){
+ sqlite3_close(db);
+ db = 0;
+ }
}
tmElapsed = timeOfDay() - tmStart;
+ if( db && noCheckpoint ){
+ sqlite3_close(db);
+ db = 0;
+ }
if( nExtra ){
printf("%d cycles due to %d misses\n", nCount, nExtra);
}