/ Check-in [661db19b]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:On a DETACH statement, keep all schemas intact except fo the one that is being detached, and thus avoid unnecessary schema reparsing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 661db19b34566642dd44ee4cff4ebc093cb8a552
User & Date: drh 2015-04-13 22:26:55
Context
2015-04-13
23:05
Add #ifdef magic for HAVE_GETHOSTUUID so that the build will hopefully now work on more verions of MacOS with SQLITE_ENABLE_LOCKING_STYLE turned on. check-in: 211411d0 user: drh tags: trunk
22:26
On a DETACH statement, keep all schemas intact except fo the one that is being detached, and thus avoid unnecessary schema reparsing. check-in: 661db19b user: drh tags: trunk
21:39
Omit the "pc" or "program counter" variable from the VDBE loop for 0.6% performance increase. check-in: d2f10c41 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/attach.c.

   294    294       sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName);
   295    295       goto detach_error;
   296    296     }
   297    297   
   298    298     sqlite3BtreeClose(pDb->pBt);
   299    299     pDb->pBt = 0;
   300    300     pDb->pSchema = 0;
   301         -  sqlite3ResetAllSchemasOfConnection(db);
          301  +  sqlite3CollapseDatabaseArray(db);
   302    302     return;
   303    303   
   304    304   detach_error:
   305    305     sqlite3_result_error(context, zErr, -1);
   306    306   }
   307    307   
   308    308   /*