Random Bits of Open Code

Check-in [7ed7a603cd]
Login

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

Overview
Comment:wrong db handle used in database init.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7ed7a603cd272e4d013e39366266a5c6136720ab
User & Date: matt 2018-05-06 10:11:59
Context
2018-05-06
17:59
Minor stuff. check-in: d214c91865 user: matt tags: trunk
10:11
wrong db handle used in database init. check-in: 7ed7a603cd user: matt tags: trunk
05:01
Fixed problem where using adat1 run-id where needed adat2 run-id, added ability to continue sync. check-in: 10e54d0c7e user: matt tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to mtutils/mtdb/mtdb.scm.

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
    ;; WARNING: Race condition exists here.
       (if (not fexists)
	   (dbi:with-transaction
	    dbh
	    (lambda ()
	      (for-each
	       (lambda (stmt)
		 (dbi:exec db stmt))
	       *sql-de-lite-schema*))))
       (dbi:exec dbh "PRAGMA journal_mode=WAL")
       (dbi:exec dbh "PRAGMA synchronous=0")
       dbh))

;; do NOT close the db in the following three routines.








|







305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
    ;; WARNING: Race condition exists here.
       (if (not fexists)
	   (dbi:with-transaction
	    dbh
	    (lambda ()
	      (for-each
	       (lambda (stmt)
		 (dbi:exec dbh stmt))
	       *sql-de-lite-schema*))))
       (dbi:exec dbh "PRAGMA journal_mode=WAL")
       (dbi:exec dbh "PRAGMA synchronous=0")
       dbh))

;; do NOT close the db in the following three routines.