Hi I wasted another entire day on this without really being able to grasp what the problem is.
The call sequence is for the sqlite3OsClose() function Working Windows version pager_unlock() pPager->jfpd where pMethods =0 releaseAllSavepoints() pPager->sjfpd where pMethods =0 above 2 lines repeat 3 times then sqlite3PagerClose() pPager->fd where pMethods <> 0 hence a real file close of the test.db file occurs MQX faulty version pager_unlock() pPager->jfpd where pMethods = 0 pager_unlock() pPager->jfpd where pMethods = 0 releaseAllSavepoints() pPager->sjfpd where pMethods <> 0 This call to releaseAllSavepoints has the pMethods pointer pointing at the sqlite3_io_methods mqxIoMethod structure, so a call to mqxClose() occurs and a the db file is erroneously closed. Any ideas on this would be greatly appreciated. Thanks Geoff GeoffW wrote: > > hello Dan > > Thanks for the very speedy reply. I have just been experimenting with the > working Windows version. > > I only get one hit of the winOpen() function and that is with a filename > parameter of the full path to my test.db file > > So maybe it is not a temporary journal file or maybe I am misunderstanding > what you a saying ? > > > The only other thing I have noticed since my initial post is that even for > the working Windows version I am getting 7 calls to the sqlite3OsClose() > function. The actual close of the file is prevented by the line if( > pId->pMethods ). As that is NULL, it doesnt close the file except for the > very last 7th time it is called where pMethods is not NULL. I didnt > expect it to do this on the windows version, seems odd to me. > > On MQX the 2nd call to sqlite3OsClose() has pId->pMethods != NULL so an > actual close occurs. > > Geoff > > > > > > Dan Kennedy-4 wrote: >> >>> >>> http://old.nabble.com/file/p27792715/stack.jpg >>> >>> I know its a long shot but does Dr Hipp or anyone have any possible >>> ideas >>> what could give rise to a premature file close ? Sorry my message >>> was so >>> long. Thanks for any ideas >> >> SQLite thinks it is closing the statement journal here, not >> the db file. This file should have been opened with the pathname >> argument to the xOpen call set to NULL. >> >> Dan. >> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> >> > > -- View this message in context: http://old.nabble.com/Porting-Sqlite-to-MQX-Operating-system-tp27792715p27823835.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users