SQLite

Check-in [2aff1b0ca8]
Login

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

Overview
Comment:Add a comment to the VACUUM implementation explaining when all schemas are reset and not just the "main" schema.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | schema-parse-refactor
Files: files | file ages | folders
SHA1: 2aff1b0ca87a99b8ec80e696b9e8a48bb43db2c2
User & Date: drh 2011-04-04 23:08:14.941
Original Comment: Add a comment to the VACUUM implementation explaining when all schemas are reset and not just the "main" schema.
Context
2011-04-05
13:12
Merge the scheme-parse-refactor changes into trunk: (1) added sqlite3SchemaMutexHeld() asserts, (2) Use -1 instead of 0 to mean "all" in sqlite3ResetInternalSchema(), and other cosmetic changes. (check-in: 5db4511d8a user: drh tags: trunk)
2011-04-04
23:08
Add a comment to the VACUUM implementation explaining when all schemas are reset and not just the "main" schema. (Closed-Leaf check-in: 2aff1b0ca8 user: drh tags: schema-parse-refactor)
21:25
Additional schema mutex checks for sqlite3RootPageMoved(). Reduce the scope of sqlite3ResetInternalSchema() in a few places. (check-in: 39c0090783 user: drh tags: schema-parse-refactor)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vacuum.c.
331
332
333
334
335
336
337


338
339
340
341
342
343

  if( pDb ){
    sqlite3BtreeClose(pDb->pBt);
    pDb->pBt = 0;
    pDb->pSchema = 0;
  }



  sqlite3ResetInternalSchema(db, -1);

  return rc;
}

#endif  /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */







>
>






331
332
333
334
335
336
337
338
339
340
341
342
343
344
345

  if( pDb ){
    sqlite3BtreeClose(pDb->pBt);
    pDb->pBt = 0;
    pDb->pSchema = 0;
  }

  /* This both clears the schemas and reduces the size of the db->aDb[]
  ** array. */ 
  sqlite3ResetInternalSchema(db, -1);

  return rc;
}

#endif  /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */