240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
;; (dbr:dbstruct-rundb-set! dbstruct (cons db dbfile))
;; (dbr:dbstruct-inuse-set! dbstruct #t)
;; (dbr:dbstruct-olddb-set! dbstruct olddb)
;; ;;; (mutex-unlock! *rundb-mutex*) ;;; why did we need a mutex on opening db's?
;; (db:sync-tables db:sync-tests-only *megatest-db* db)
;; db))
;; This routine creates the db if not already present. It is only called if the db is not already ls opened
;;
(define (db:open-db dbstruct) ;; (conc *toppath* "/megatest.db") (car *configinfo*)))
(let ((mdb (dbr:dbstruct-tmpdb dbstruct))) ;; RA => Returns the first reference in dbstruct
(if mdb
mdb
;; (mutex-lock! *rundb-mutex*)
(let* ((dbpath (db:dbfile-path)) ;; 0))
|
|
|
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
;; (dbr:dbstruct-rundb-set! dbstruct (cons db dbfile))
;; (dbr:dbstruct-inuse-set! dbstruct #t)
;; (dbr:dbstruct-olddb-set! dbstruct olddb)
;; ;;; (mutex-unlock! *rundb-mutex*) ;;; why did we need a mutex on opening db's?
;; (db:sync-tables db:sync-tests-only *megatest-db* db)
;; db))
;; This routine creates the db if not already present. It is only called if the db is not already opened
;;
(define (db:open-db dbstruct) ;; (conc *toppath* "/megatest.db") (car *configinfo*)))
(let ((mdb (dbr:dbstruct-tmpdb dbstruct))) ;; RA => Returns the first reference in dbstruct
(if mdb
mdb
;; (mutex-lock! *rundb-mutex*)
(let* ((dbpath (db:dbfile-path)) ;; 0))
|