Fossil

Check-in [c6187a83]
Login

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

Overview
Comment:Take care to close the separate dbConfig database connection when shutting down.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c6187a83a51779140c42d03284233e20ecc1b726
User & Date: drh 2010-08-18 16:51:40
Context
2010-08-18
17:27
Allow a checkout of the very first (empty) version of a project. check-in: 61ca4141 user: drh tags: trunk
16:51
Take care to close the separate dbConfig database connection when shutting down. check-in: c6187a83 user: drh tags: trunk
15:27
Always run a checkpoint on all database files before exiting. check-in: 8b85b21a user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/db.c.

903
904
905
906
907
908
909




910
911
912
913
914
915
916
  db_end_transaction(1);
  g.repositoryOpen = 0;
  g.localOpen = 0;
  g.configOpen = 0;
  sqlite3_wal_checkpoint(g.db, 0);
  sqlite3_close(g.db);
  g.db = 0;




}


/*
** Create a new empty repository database with the given name.
**
** Only the schema is initialized.  The required VAR tables entries







>
>
>
>







903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
  db_end_transaction(1);
  g.repositoryOpen = 0;
  g.localOpen = 0;
  g.configOpen = 0;
  sqlite3_wal_checkpoint(g.db, 0);
  sqlite3_close(g.db);
  g.db = 0;
  if( g.dbConfig ){
    sqlite3_close(g.dbConfig);
    g.dbConfig = 0;
  }
}


/*
** Create a new empty repository database with the given name.
**
** Only the schema is initialized.  The required VAR tables entries