/ 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 Unified Diffs Ignore Whitespace Patch

Changes to src/attach.c.

294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
    sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName);
    goto detach_error;
  }

  sqlite3BtreeClose(pDb->pBt);
  pDb->pBt = 0;
  pDb->pSchema = 0;
  sqlite3ResetAllSchemasOfConnection(db);
  return;

detach_error:
  sqlite3_result_error(context, zErr, -1);
}

/*







|







294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
    sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName);
    goto detach_error;
  }

  sqlite3BtreeClose(pDb->pBt);
  pDb->pBt = 0;
  pDb->pSchema = 0;
  sqlite3CollapseDatabaseArray(db);
  return;

detach_error:
  sqlite3_result_error(context, zErr, -1);
}

/*