Overview
Comment: | Fixed dbfile:close-all and added tests |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.7001-multi-db-rb01 |
Files: | files | file ages | folders |
SHA1: |
0e9ad025c4cb6c591995f1ea976ef003 |
User & Date: | mmgraham on 2022-04-05 21:33:51 |
Other Links: | branch diff | manifest | tags |
Context
2022-04-06
| ||
07:24 | Fixed few issues in db.scm. NOTE: these might also be problems in v1.65 check-in: adfcb732f5 user: matt tags: v1.7001-multi-db-rb01 | |
2022-04-05
| ||
21:33 | Fixed dbfile:close-all and added tests check-in: 0e9ad025c4 user: mmgraham tags: v1.7001-multi-db-rb01 | |
20:29 | Lots of db adjustments made check-in: 162676ba8d user: matt tags: v1.7001-multi-db-rb01 | |
Changes
Modified dbfile.scm from [1261c08c5d] to [95ef66d677].
︙ | |||
90 91 92 93 94 95 96 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | + + + + - + | (sqlite3:interrupt! db) (db:safely-close-sqlite3-db db stmt-cache try-num: (- try-num 1))) (if (sqlite3:database? db) (let* ((stmts (and stmt-cache (hash-table-ref/default stmt-cache db #f)))) (if stmts (map sqlite3:finalize! (hash-table-values stmts))) (sqlite3:finalize! db) #t) (begin (dbfile:print-err "db:safely-close-sqlite3-db: " db " is not an sqlite3 db") #f ) |
︙ | |||
113 114 115 116 117 118 119 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | + - + - + - + + + + + | #;(rdb (dbr:dbdat-dbh (dbr:subdb-refndb subdb)))) (map (lambda (dbdat) (let* ((stmt-cache (dbr:dbdat-stmt-cache dbdat)) (dbh (dbr:dbdat-dbh dbdat))) (db:safely-close-sqlite3-db dbh stmt-cache))) tdbs) (db:safely-close-sqlite3-db mtdbdat (dbr:dbdat-stmt-cache (dbr:subdb-mtdbdat subdb))) |
︙ | |||
264 265 266 267 268 269 270 | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | - | (let* ((db (sqlite3:open-database dbpath))) (sqlite3:set-busy-handler! db (sqlite3:make-busy-timeout 10000)) (init-proc db)) #;(dbfile:lock-create-open dbpath (lambda (db) (init-proc db)))) (write-access (file-write-access? dbpath))) |
︙ |
Modified tests/simplerun/thebeginning.scm from [9beea9f91a] to [1e352e44dc].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + - - + + + + + + + | (use trace test (prefix sqlite3 sqlite3:)) (import dbfile) (trace-call-sites #t) (trace ;; dbfile:setup |