/ Check-in [a08324d1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix an assert failure introduced by (6355). (CVS 6365)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a08324d16d1e9a4e7c1b294bc71fc939d173f826
User & Date: danielk1977 2009-03-20 14:42:11
Context
2009-03-20
15:16
Add a test to try to hit the race-condition fixed by (6363). (CVS 6366) check-in: 4310411f user: danielk1977 tags: trunk
14:42
Fix an assert failure introduced by (6355). (CVS 6365) check-in: a08324d1 user: danielk1977 tags: trunk
14:18
Make sure struct WhereClause is aligned on an 8-byte boundary. Fix for #3613, #3736. (CVS 6364) check-in: 093a0cf4 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code used for creating, destroying, and populating
    13     13   ** a VDBE (or an "sqlite3_stmt" as it is known to the outside world.)  Prior
    14     14   ** to version 2.8.7, all this code was combined into the vdbe.c source file.
    15     15   ** But that file was getting too big so this subroutines were split out.
    16     16   **
    17         -** $Id: vdbeaux.c,v 1.443 2009/03/18 10:33:02 danielk1977 Exp $
           17  +** $Id: vdbeaux.c,v 1.444 2009/03/20 14:42:11 danielk1977 Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include "vdbeInt.h"
    21     21   
    22     22   
    23     23   
    24     24   /*
................................................................................
  1571   1571   ** transaction is rolled back. If eOp is SAVEPOINT_RELEASE, then the 
  1572   1572   ** statement transaction is commtted.
  1573   1573   **
  1574   1574   ** If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. 
  1575   1575   ** Otherwise SQLITE_OK.
  1576   1576   */
  1577   1577   int sqlite3VdbeCloseStatement(Vdbe *p, int eOp){
         1578  +  sqlite3 *const db = p->db;
  1578   1579     int rc = SQLITE_OK;
  1579         -  if( p->iStatement ){
         1580  +  if( p->iStatement && db->nStatement ){
  1580   1581       int i;
  1581   1582       const int iSavepoint = p->iStatement-1;
  1582         -    sqlite3 *const db = p->db;
  1583   1583   
  1584   1584       assert( eOp==SAVEPOINT_ROLLBACK || eOp==SAVEPOINT_RELEASE);
  1585   1585       assert( db->nStatement>0 );
  1586   1586       assert( p->iStatement==(db->nStatement+db->nSavepoint) );
  1587   1587   
  1588   1588       for(i=0; i<db->nDb; i++){ 
  1589   1589         int rc2 = SQLITE_OK;