-C Return\sa\smeaningful\serror\smessage\sif\sa\skeyword\sis\sused\sas\san\srtree\stable\scolumn\sname.\sTicket\s#3970.\s(CVS\s6902)
-D 2009-07-17T16:54:48
+C Fix\sa\ssubtle\sproblem\sthat\scan\soccur\swhen\sa\stransaction\sis\sautomatically\srolled\sback,\sand\safterwards\sa\sVM\sthat\shad\sopened\sa\sstatement\stransaction\swithin\sthe\sabandoned\stransaction\sis\sfinalized.\sFixes\san\sassert()\sthat\swas\sfailing\sin\srtree3.test.\s(CVS\s6903)
+D 2009-07-17T17:25:43
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a
F src/vdbeInt.h 831c254a6eef237ef4664c8381a0137586567007
F src/vdbeapi.c 0ab8ada7260b32031ca97f338caecf0812460624
-F src/vdbeaux.c 5c2ad56759d606f7fcdca7ced0390c9ea8bb5f7f
+F src/vdbeaux.c 017bd2774528220c0c7b85342ad6b114011dfb53
F src/vdbeblob.c a3f3e0e877fc64ea50165eec2855f5ada4477611
F src/vdbemem.c 1618f685d19b4bcc96e40b3c478487bafd2ae246
F src/vtab.c 00902f289521041712fb0293d0bf8688c7af8e48
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P 0219a543367638013ccd06295eeb9efc822e2dd1
-R 644e39d982aefb64851bf1bd3db73970
+P 046efe46b50fbe928f39a0cda1b1006d486ce9f5
+R 2588d6865f8cccb869a8209132f8a3f3
U danielk1977
-Z f3240366dc68a67dbf0f884ca2a0a471
+Z 916dca7de1282056a17c7f9207c4274c
** to version 2.8.7, all this code was combined into the vdbe.c source file.
** But that file was getting too big so this subroutines were split out.
**
-** $Id: vdbeaux.c,v 1.475 2009/07/15 16:30:50 drh Exp $
+** $Id: vdbeaux.c,v 1.476 2009/07/17 17:25:43 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
sqlite3 *const db = p->db;
int rc = SQLITE_OK;
- if( p->iStatement ){
+ /* If p->iStatement is greater than zero, then this Vdbe opened a
+ ** statement transaction that should be closed here. The only exception
+ ** is that an IO error may have occured, causing an emergency rollback.
+ ** In this case (db->nStatement==0), and there is nothing to do.
+ */
+ if( db->nStatement && p->iStatement ){
int i;
const int iSavepoint = p->iStatement-1;