]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
In the "transaction" command of the TCL interface, if a COMMIT fails finish
authordrh <drh@noemail.net>
Tue, 12 Jun 2007 18:50:13 +0000 (18:50 +0000)
committerdrh <drh@noemail.net>
Tue, 12 Jun 2007 18:50:13 +0000 (18:50 +0000)
it with a rollback. (CVS 4059)

FossilOrigin-Name: 6da39fa4429400e21924074f5f219f4cb32415ff

manifest
manifest.uuid
src/tclsqlite.c

index 20f1d59b6a53603fe29df54b14b9aa574fbe0fb4..d67b073617daf409f608c3e67f818bbc343cad94 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Minor\scomment\sedits\sfrom\smy\sprefix\sdevelopment\sclient.\s\sNo\scode\schanges.\s(CVS\s4058)
-D 2007-06-12T18:20:05
+C In\sthe\s"transaction"\scommand\sof\sthe\sTCL\sinterface,\sif\sa\sCOMMIT\sfails\sfinish\nit\swith\sa\srollback.\s(CVS\s4059)
+D 2007-06-12T18:50:14
 F Makefile.in 31d9f7cd42c3d73ae117fcdb4b0ecd029fa8f50b
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -108,7 +108,7 @@ F src/sqlite.h.in b174b5508467deec4034c6c8a21f0354b498b46b
 F src/sqlite3ext.h 7d0d363ea7327e817ef0dfe1b7eee1f171b72890
 F src/sqliteInt.h 208c40b6e11925a321ec159d889e0ec06b618359
 F src/table.c a8de75bcedf84d4060d804264b067ab3b1a3561d
-F src/tclsqlite.c f425c7583665ef78dd8397b2de0b8e0028e80ce2
+F src/tclsqlite.c 1f3357fdf41fbab9bf82e18b6068b12a8112841e
 F src/test1.c 0ec120a4652ee95268a5a45e1e1adee13be9ae28
 F src/test2.c 24458b17ab2f3c90cbc1c8446bd7ffe69be62f88
 F src/test3.c a280931fb40222b7c90da45eea926459beee8904
@@ -503,7 +503,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P d3fe186c330d74209ac291972b09883b06e0e143
-R 3f86e35e54e70ab08298fee77d1b9c0c
-U shess
-Z 530393baedc348af152d95395c2180b5
+P 6953cd0935b5526756ab745545420e40adc3c56d
+R 5d27d3b997120cea0304bcfe42f3f02a
+U drh
+Z a17081a7409ebb25284cf9a87a711cc7
index 7a1d850b36b6fca7ff6331c2bd6b5cf007e60150..d1d03af57a05b3b8580cac270024d6f4f9db0930 100644 (file)
@@ -1 +1 @@
-6953cd0935b5526756ab745545420e40adc3c56d
\ No newline at end of file
+6da39fa4429400e21924074f5f219f4cb32415ff
\ No newline at end of file
index bca6ed398363dbbf37a1e7d7c0705cbaf8314584..0c91302d30ced7b19ea954e1f4ba6dd39faf0c40 100644 (file)
@@ -12,7 +12,7 @@
 ** A TCL Interface to SQLite.  Append this file to sqlite3.c and
 ** compile the whole thing to build a TCL-enabled version of SQLite.
 **
-** $Id: tclsqlite.c,v 1.187 2007/05/08 01:08:49 drh Exp $
+** $Id: tclsqlite.c,v 1.188 2007/06/12 18:50:14 drh Exp $
 */
 #include "tcl.h"
 #include <errno.h>
@@ -2193,7 +2193,9 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
       } else {
         zEnd = "COMMIT";
       }
-      (void)sqlite3_exec(pDb->db, zEnd, 0, 0, 0);
+      if( sqlite3_exec(pDb->db, zEnd, 0, 0, 0) ){
+        sqlite3_exec(pDb->db, "ROLLBACK", 0, 0, 0);
+      }
     }
     break;
   }