Commit 4563f1c
authored
Use writeWithoutTransaction when appropriate (#53)
This pull request fixes SQLITE_BUSY errors caused by the shift to IMMEDIATE transactions.
Updating the transaction type https://sqlite.org/lang_transaction.html#deferred_immediate_and_exclusive_transactions from the default DEFERRED to IMMEDIATE exposed some issues with the way SQLite wrapped GRDB. SQLite was wrapping some writes in an unnecessary transaction. This caused issues because IMMEDIATE transactions immediately begin a write, meaning other writes will receive a SQLITE_BUSY error. Before applying the changes in this pull request, vacuuming and checkpointing tests failed when IMMEDIATE transactions were used.1 parent ed19230 commit 4563f1c
File tree
3 files changed
+42
-9
lines changed- .github/workflows
- Sources/SQLite
- Tests/SQLiteTests
3 files changed
+42
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
114 | 128 | | |
115 | 129 | | |
116 | 130 | | |
| |||
275 | 289 | | |
276 | 290 | | |
277 | 291 | | |
278 | | - | |
| 292 | + | |
279 | 293 | | |
280 | 294 | | |
281 | 295 | | |
| |||
339 | 353 | | |
340 | 354 | | |
341 | 355 | | |
342 | | - | |
| 356 | + | |
343 | 357 | | |
344 | 358 | | |
345 | 359 | | |
| |||
644 | 658 | | |
645 | 659 | | |
646 | 660 | | |
647 | | - | |
648 | | - | |
| 661 | + | |
649 | 662 | | |
650 | 663 | | |
651 | | - | |
652 | | - | |
653 | | - | |
| 664 | + | |
654 | 665 | | |
655 | 666 | | |
656 | 667 | | |
| |||
770 | 781 | | |
771 | 782 | | |
772 | 783 | | |
773 | | - | |
| 784 | + | |
774 | 785 | | |
775 | 786 | | |
776 | 787 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
256 | 277 | | |
257 | 278 | | |
258 | 279 | | |
| |||
0 commit comments