SQLite

Check-in [94f25fc112]
Login

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

Overview
Comment:Declare the invalidateCursorsOnModifiedBtrees function to be static. Ticket #2792. (CVS 4559)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 94f25fc1129c7fb8697a67e509ab9de54a173a58
User & Date: drh 2007-11-24 10:23:45.000
Context
2007-11-26
13:36
Additional out-of-memory testing. Fix bugs caused by malloc failures in where.c. Tickets #2794, #2795, #2796, and #2797. (CVS 4560) (check-in: 5e02dbabcf user: drh tags: trunk)
2007-11-24
10:23
Declare the invalidateCursorsOnModifiedBtrees function to be static. Ticket #2792. (CVS 4559) (check-in: 94f25fc112 user: drh tags: trunk)
00:41
The FTS3 amalgamation can now be appended to the SQLite amalgamation to generate a single source file that contains both components. (CVS 4558) (check-in: 0fc61f99b5 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbeaux.c.
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
** to the rollback.
**
** Remember that a rollback can delete tables complete and
** reorder rootpages.  So it is not sufficient just to save
** the state of the cursor.  We have to invalidate the cursor
** so that it is never used again.
*/
void invalidateCursorsOnModifiedBtrees(sqlite3 *db){
  int i;
  for(i=0; i<db->nDb; i++){
    Btree *p = db->aDb[i].pBt;
    if( p && sqlite3BtreeIsInTrans(p) ){
      sqlite3BtreeTripAllCursors(p, SQLITE_ABORT);
    }
  }







|







1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
** to the rollback.
**
** Remember that a rollback can delete tables complete and
** reorder rootpages.  So it is not sufficient just to save
** the state of the cursor.  We have to invalidate the cursor
** so that it is never used again.
*/
static void invalidateCursorsOnModifiedBtrees(sqlite3 *db){
  int i;
  for(i=0; i<db->nDb; i++){
    Btree *p = db->aDb[i].pBt;
    if( p && sqlite3BtreeIsInTrans(p) ){
      sqlite3BtreeTripAllCursors(p, SQLITE_ABORT);
    }
  }