Fossil

Check-in [41956e7000]
Login

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

Overview
Comment:Suppress "database locked" warnings on the "PRAGMA optimize" that occurs as the process is shutting down.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 41956e7000813c3c3d26292401471b266b63b2218a41bf79461ae8f76fb2dc52
User & Date: drh 2017-04-12 11:26:02.231
Context
2017-04-23
14:50
Suppress "database locked" warnings on the "PRAGMA optimize" that occurs as the process is shutting down. check-in: c7d85ffb2a user: jan.nijtmans tags: branch-2.2
2017-04-12
11:39
Minor gcc compiler warnings check-in: a9d1d46f65 user: jan.nijtmans tags: trunk
11:26
Suppress "database locked" warnings on the "PRAGMA optimize" that occurs as the process is shutting down. check-in: 41956e7000 user: drh tags: trunk
2017-04-11
21:37
Added verbiage to --ignore options of add and addremove to state that they apply to unmanaged files only. check-in: 4d2c34b0d7 user: sdr tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/db.c.
1664
1665
1666
1667
1668
1669
1670

1671

1672
1673
1674
1675
1676
1677
1678
    fprintf(stderr, "-- prepared statements    %10d\n", db.nPrepare);
  }
  while( db.pAllStmt ){
    db_finalize(db.pAllStmt);
  }
  db_end_transaction(1);
  pStmt = 0;

  sqlite3_exec(g.db, "PRAGMA optimize", 0, 0, 0);

  db_close_config();

  /* If the localdb has a lot of unused free space,
  ** then VACUUM it as we shut down.
  */
  if( db_database_slot("localdb")>=0 ){
    int nFree = db_int(0, "PRAGMA localdb.freelist_count");







>

>







1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
    fprintf(stderr, "-- prepared statements    %10d\n", db.nPrepare);
  }
  while( db.pAllStmt ){
    db_finalize(db.pAllStmt);
  }
  db_end_transaction(1);
  pStmt = 0;
  g.dbIgnoreErrors++;  /* Stop "database locked" warnings from PRAGMA optimize */
  sqlite3_exec(g.db, "PRAGMA optimize", 0, 0, 0);
  g.dbIgnoreErrors--;
  db_close_config();

  /* If the localdb has a lot of unused free space,
  ** then VACUUM it as we shut down.
  */
  if( db_database_slot("localdb")>=0 ){
    int nFree = db_int(0, "PRAGMA localdb.freelist_count");