D 2010-06-17T13:22:33 J comment If\s"PRAGMA\sjournal_mode"\sis\sused\sto\schange\sa\sconnection\sfrom\sTRUNCATE\sor\sPERSIST\smode\sto\sWAL,\sMEMORY,\sOFF\sor\sDELETE\smode,\sthe\sjournal\sfile\sis\sdeleted.\sEven\sif\sit\sis\scurrently\sbeing\sused\sby\sanother\sconnection\s(possibly\sin\sanother\sprocess).\r\n\r\nOn\sunix,\sif\sthat\sother\sconnection\s(possibly\sin\sanother\sprocess)\sis\sexecuting\sa\swrite\stransaction\swhen\sthis\shappens,\sand\sthe\sprocess\sexits\sunexpectedly\sfor\ssome\sreason,\sthere\swill\sbe\sno\shot-journal\sfile\sleft\sin\sthe\sfile-system.\sIf\sthe\sconnection\shad\sbegun\swriting\sto\sthe\sdatabase\sfile\sbefore\sthe\sunexpected\sexit,\sthe\sdatabase\smay\sbe\sleft\sin\sa\scorrupt\sstate.\r\n\r\n
dan\sadded\son\s2010-06-17\s09:52:50:
\r\nIntroduced\sin\scommit\s[b78e58ae15]\son\s[2010-03-19\s15:48:14].\r\n\r\n
dan\sadded\son\s2010-06-17\s10:44:33:
\r\nThe\sfix\schecked\sin\sfor\sthis\s([1ec74591a9])\sis\ssub-optimal\sin\sthe\ssense\sthat\sif\sa\swriter\schanges\sfrom\s"PRAGMA\sjournal_mode=PERSIST"\sto\s"PRAGMA\sjournal_mode=MEMORY",\sthe\sjournal\sfile\swill\snever\sbe\sremoved\sfrom\sthe\sfile-system.\sIt\sis\snot\shot\s(as\sthe\sfirst\spart\sof\sit\sis\szeroed),\sbut\sSQLite\swill\sbe\sforced\sto\sopen\sand\sclose\sthe\sfile\sat\sthe\sstart\sof\severy\sread\sor\swrite\stransaction\sto\sverify\sthis. K fc62af45239916f7605ba07401b6f975d671bbdc U drh Z 86985334a2435f0e00c726441aef362c