1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

In the "transaction" command of the TCL interface, if a COMMIT fails finish

it with a rollback. (CVS 4059)

FossilOrigin-Name: 6da39fa4429400e21924074f5f219f4cb32415ff
This commit is contained in:
drh
2007-06-12 18:50:13 +00:00
parent 401b80656d
commit 109b43507d
3 changed files with 12 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
C Minor\scomment\sedits\sfrom\smy\sprefix\sdevelopment\sclient.\s\sNo\scode\schanges.\s(CVS\s4058) 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:20:05 D 2007-06-12T18:50:14
F Makefile.in 31d9f7cd42c3d73ae117fcdb4b0ecd029fa8f50b F Makefile.in 31d9f7cd42c3d73ae117fcdb4b0ecd029fa8f50b
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -108,7 +108,7 @@ F src/sqlite.h.in b174b5508467deec4034c6c8a21f0354b498b46b
F src/sqlite3ext.h 7d0d363ea7327e817ef0dfe1b7eee1f171b72890 F src/sqlite3ext.h 7d0d363ea7327e817ef0dfe1b7eee1f171b72890
F src/sqliteInt.h 208c40b6e11925a321ec159d889e0ec06b618359 F src/sqliteInt.h 208c40b6e11925a321ec159d889e0ec06b618359
F src/table.c a8de75bcedf84d4060d804264b067ab3b1a3561d F src/table.c a8de75bcedf84d4060d804264b067ab3b1a3561d
F src/tclsqlite.c f425c7583665ef78dd8397b2de0b8e0028e80ce2 F src/tclsqlite.c 1f3357fdf41fbab9bf82e18b6068b12a8112841e
F src/test1.c 0ec120a4652ee95268a5a45e1e1adee13be9ae28 F src/test1.c 0ec120a4652ee95268a5a45e1e1adee13be9ae28
F src/test2.c 24458b17ab2f3c90cbc1c8446bd7ffe69be62f88 F src/test2.c 24458b17ab2f3c90cbc1c8446bd7ffe69be62f88
F src/test3.c a280931fb40222b7c90da45eea926459beee8904 F src/test3.c a280931fb40222b7c90da45eea926459beee8904
@@ -503,7 +503,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P d3fe186c330d74209ac291972b09883b06e0e143 P 6953cd0935b5526756ab745545420e40adc3c56d
R 3f86e35e54e70ab08298fee77d1b9c0c R 5d27d3b997120cea0304bcfe42f3f02a
U shess U drh
Z 530393baedc348af152d95395c2180b5 Z a17081a7409ebb25284cf9a87a711cc7

View File

@@ -1 +1 @@
6953cd0935b5526756ab745545420e40adc3c56d 6da39fa4429400e21924074f5f219f4cb32415ff

View File

@@ -12,7 +12,7 @@
** A TCL Interface to SQLite. Append this file to sqlite3.c and ** A TCL Interface to SQLite. Append this file to sqlite3.c and
** compile the whole thing to build a TCL-enabled version of SQLite. ** 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 "tcl.h"
#include <errno.h> #include <errno.h>
@@ -2193,7 +2193,9 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
} else { } else {
zEnd = "COMMIT"; 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; break;
} }