Fossil

Check-in [9d0bfcb3]
Login

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

Overview
Comment:Issue a panic if there is an attempt to invoke backoffice_run() more than once.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9d0bfcb3d8b75144dfe05a2f08341a7401fab2e30442dc72b77498120a167540
User & Date: drh 2018-07-21 14:29:31
Context
2018-07-21
15:31
Extra effort to close all prepared statements prior to exiting, in order to avoid dangling journal files. check-in: 76800769 user: drh tags: trunk
14:29
Issue a panic if there is an attempt to invoke backoffice_run() more than once. check-in: 9d0bfcb3 user: drh tags: trunk
2018-07-19
18:54
Fix minor comment typo. No code changes. check-in: ac6657e2 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/backoffice.c.

183
184
185
186
187
188
189

190




191
192
193
194
195
196
197
*/
void backoffice_run(void){
  Lease x;
  sqlite3_uint64 tmNow;
  sqlite3_uint64 idSelf;
  int lastWarning = 0;
  int warningDelay = 30;






  if( g.db==0 ){
    fossil_panic("database not open for backoffice processing");
  }
  if( db_transaction_nesting_depth()!=0 ){
    fossil_panic("transaction %s not closed prior to backoffice processing",
                 db_transaction_start_point());
  }







>

>
>
>
>







183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
*/
void backoffice_run(void){
  Lease x;
  sqlite3_uint64 tmNow;
  sqlite3_uint64 idSelf;
  int lastWarning = 0;
  int warningDelay = 30;
  static int once = 0;

  if( once ){
    fossil_panic("multiple calls to backoffice_run()");
  }
  once = 1;
  if( g.db==0 ){
    fossil_panic("database not open for backoffice processing");
  }
  if( db_transaction_nesting_depth()!=0 ){
    fossil_panic("transaction %s not closed prior to backoffice processing",
                 db_transaction_start_point());
  }