]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Ensure that test tool "tserver" finalizes all statements before attempting to
authordan <dan@noemail.net>
Tue, 20 Jun 2017 19:20:07 +0000 (19:20 +0000)
committerdan <dan@noemail.net>
Tue, 20 Jun 2017 19:20:07 +0000 (19:20 +0000)
close a database handle.

FossilOrigin-Name: d8568aacf083b63cdcf68d744ddb07a7615d14f169be6c632813a266a1e8a1cf

manifest
manifest.uuid
tool/tserver.c

index a9ab99982ad70f8fb5f25448debb14069948235a..e6d8b502def6e80b0dc2858bd0d4c24531b0384d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\stoo/tserver.c\s-\sthe\simplementation\sof\sa\ssimple\smulti-threaded\sserver\ndesigned\sfor\sinteractive\stesting\sof\sconcurrency\sbetween\sconnections\sused\sby\ndifferent\sthreads\sof\sthe\ssame\sprocess.
-D 2017-06-07T15:55:59.971
+C Ensure\sthat\stest\stool\s"tserver"\sfinalizes\sall\sstatements\sbefore\sattempting\sto\nclose\sa\sdatabase\shandle.
+D 2017-06-20T19:20:07.502
 F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc 6a8c838220f7c00820e1fc0ac1bccaaa8e5676067e1dbfa1bafa7a4ffecf8ae6
@@ -1557,7 +1557,7 @@ F tool/stack_usage.tcl f8e71b92cdb099a147dad572375595eae55eca43
 F tool/symbols-mingw.sh 4dbcea7e74768305384c9fd2ed2b41bbf9f0414d
 F tool/symbols.sh c5a617b8c61a0926747a56c65f5671ef8ac0e148
 F tool/tostr.tcl 96022f35ada2194f6f8ccf6fd95809e90ed277c4
-F tool/tserver.c 3b2dc1be6ba6d942d2988a86983a9142d2a95a105ce17ef4e32871cbb213b0ca
+F tool/tserver.c 4596a21376c7632b430510b184911b60dfa2cd2167c4a2252371dcbafbdf752e
 F tool/varint.c 5d94cb5003db9dbbcbcc5df08d66f16071aee003
 F tool/vdbe-compress.tcl 5926c71f9c12d2ab73ef35c29376e756eb68361c
 F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
@@ -1585,7 +1585,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 a726d98122704e1e702cfa7ae61d680497df6a826d98082161e0823e115d40a5
-R d51fab1f343a3ef16d87bb149082f9d8
+P 05b4fc4340011847c8585bb822d339dd7b8351266a12b26fdc85edce38fc9dd3
+R 5abfa2b3bda91a8770a53a2957396fde
 U dan
-Z d72926023206a1ab0336fd84f20b8227
+Z b4624fe82f09b9b3eec8967be30284e2
index 735223e66798b22dbacb28285b0b3e3a3f1ea0dd..719bb96e65db8f609c07f749b3b64d90396ef941 100644 (file)
@@ -1 +1 @@
-05b4fc4340011847c8585bb822d339dd7b8351266a12b26fdc85edce38fc9dd3
\ No newline at end of file
+d8568aacf083b63cdcf68d744ddb07a7615d14f169be6c632813a266a1e8a1cf
\ No newline at end of file
index 8c2e26c4128c515dcb18a2ebf8f7d04ac91aad82..c4dde9fd6592234b79acc1789afac1b574044687 100644 (file)
@@ -268,6 +268,7 @@ static void *handle_client(void *pArg){
   int nCmd = 0;                   /* Valid bytes in zCmd[] */
   int res;                        /* Result of read() call */
   int rc = SQLITE_OK;
+  int j;
 
   ClientCtx ctx;
   memset(&ctx, 0, sizeof(ClientCtx));
@@ -346,6 +347,10 @@ static void *handle_client(void *pArg){
 
   fprintf(stdout, "Client %d disconnects\n", ctx.fd);
   close(ctx.fd);
+  for(j=0; j<ctx.nPrepare; j++){
+    sqlite3_finalize(ctx.apPrepare[j]);
+  }
+  sqlite3_free(ctx.apPrepare);
   sqlite3_close(ctx.db);
   return 0;
 }