Make sure the journal file is closed when transitioning into MEMORY journal

mode, to avoid an assertion fault in the new sqlite3_randomness() avoidance
code added by [c84e4483cb44f827].

FossilOrigin-Name: 29937081a986d88f495ad48748c35ff5829f0ac31dd4ad3e48d180ae2fcb9a0c
This commit is contained in:
drh 2023-10-12 17:41:18 +00:00
parent 35d6c24fd5
commit 5d9a6c6734
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C CLI\sto\scheck\sfor\srare\sprepare\sfailures.\s[forum:/forumpost/5be6395182|See\sforum\spost\s5be6395182.]
D 2023-10-12T15:12:38.967
C Make\ssure\sthe\sjournal\sfile\sis\sclosed\swhen\stransitioning\sinto\sMEMORY\sjournal\nmode,\sto\savoid\san\sassertion\sfault\sin\sthe\snew\ssqlite3_randomness()\savoidance\ncode\sadded\sby\s[c84e4483cb44f827].
D 2023-10-12T17:41:18.510
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -701,7 +701,7 @@ F src/os_setup.h 6011ad7af5db4e05155f385eb3a9b4470688de6f65d6166b8956e58a3d87210
F src/os_unix.c 2e8b12107f75d1bd16412f312b4c5d5103191807a37836d3b81beb26436ad81b
F src/os_win.c 4a50a154aeebc66a1f8fb79c1ff6dd5fe3d005556533361e0d460d41cb6a45a8
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
F src/pager.c bbd9b93c014679d8148235cc42b73bebda3f598d4f63a63cf7723ddf3087fd58
F src/pager.c 4aa388e47138551c83ae265e2efd4e01f0aa5afb6a958f45579658847b3430ff
F src/pager.h f4d33fec8052603758792045493423b8871a996da2d0973927b7d36cd6070473
F src/parse.y aeb7760d41cfa86465e3adba506500c021597049fd55f82a30e5b7045862c28c
F src/pcache.c 040b165f30622a21b7a9a77c6f2e4877a32fb7f22d4c7f0d2a6fa6833a156a75
@ -2128,8 +2128,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P c11394b50d0687b6d6abad9c80d5cd3cdce77e9b9c278f40601c460f463744a1
R 5ae72ce81eda772829c7d27c1ea987e3
U larrybr
Z 19dab31d5c5256d717b8a79b7d715525
P 286d1e8012a5f5d9e1fe6dce1a732f725b8a1837f66daf6aefb792e19e96f2d4
R 63c272f1ac84380bbc1d2409b6f281ca
U drh
Z 6db7b813ea2dc81e78e187c7332821c2
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
286d1e8012a5f5d9e1fe6dce1a732f725b8a1837f66daf6aefb792e19e96f2d4
29937081a986d88f495ad48748c35ff5829f0ac31dd4ad3e48d180ae2fcb9a0c

View File

@ -7369,7 +7369,7 @@ int sqlite3PagerSetJournalMode(Pager *pPager, int eMode){
}
assert( state==pPager->eState );
}
}else if( eMode==PAGER_JOURNALMODE_OFF ){
}else if( eMode==PAGER_JOURNALMODE_OFF || eMode==PAGER_JOURNALMODE_MEMORY ){
sqlite3OsClose(pPager->jfd);
}
}