SQLite

Check-in [661db19b34]
Login

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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 661db19b34566642dd44ee4cff4ebc093cb8a552
User & Date: drh 2015-04-13 22:26:55.617
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: 211411d02c 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: 661db19b34 user: drh tags: trunk)
21:39
Omit the "pc" or "program counter" variable from the VDBE loop for 0.6% performance increase. (check-in: d2f10c41a8 user: drh tags: trunk)
Changes
Unified Diff 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);
}

/*