SQLite

Check-in [1a64295e05]
Login

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

Overview
Comment:Fix a bug in change counting that comes up when sqlite3_finalize() is called right after sqlite3_reset(). (CVS 2266)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1a64295e055d083539e05f069df6f1bea12e14b2
User & Date: drh 2005-01-23 19:04:43.000
Context
2005-01-23
22:41
Minor changes to avoid warnings on some compilers. (CVS 2267) (check-in: 4daf1d1f9d user: danielk1977 tags: trunk)
19:04
Fix a bug in change counting that comes up when sqlite3_finalize() is called right after sqlite3_reset(). (CVS 2266) (check-in: 1a64295e05 user: drh tags: trunk)
13:14
ATTACH and DETACH cause prepared statements to expire. sqlite3_finalize() can now be called right after sqlite3_reset(). (CVS 2265) (check-in: 6c631b86e5 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbeaux.c.
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
    if( pBt ){
      rc = xFunc(pBt);
      if( p->rc==SQLITE_OK ) p->rc = rc;
    }
  }

  /* If this was an INSERT, UPDATE or DELETE, set the change counter. */
  if( p->changeCntOn ){
    if( !xFunc || xFunc==sqlite3BtreeCommitStmt ){
      sqlite3VdbeSetChanges(db, p->nChange);
    }else{
      sqlite3VdbeSetChanges(db, 0);
    }
    p->nChange = 0;
  }







|







1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
    if( pBt ){
      rc = xFunc(pBt);
      if( p->rc==SQLITE_OK ) p->rc = rc;
    }
  }

  /* If this was an INSERT, UPDATE or DELETE, set the change counter. */
  if( p->changeCntOn && p->pc>=0 ){
    if( !xFunc || xFunc==sqlite3BtreeCommitStmt ){
      sqlite3VdbeSetChanges(db, p->nChange);
    }else{
      sqlite3VdbeSetChanges(db, 0);
    }
    p->nChange = 0;
  }