Re: [sqlite] Make some changes to the source code

2018-01-25 Thread Nick
Thank you Simon, I totally understand you. And still hope for someone to give me some advice about my wal+mmap (Map file when opening it and do not truncate the file) . Thanks. -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mail

Re: [sqlite] Make some changes to the source code

2018-01-25 Thread Simon Slavin
On 25 Jan 2018, at 5:55am, Nick wrote: > The one thing that bothers me the most is that I have no way to check my > code, as there is a testvfs in sqlite test. So could you please review my > train of thought about my wal+mmap? (Map file when opening it and do not > truncate the file) That is wa

Re: [sqlite] Make some changes to the source code

2018-01-24 Thread Nick
Yup, I guess I understand you correctly about the mmap problem in the OS. I have seen some threads about it before. But I think wal+mmap is still a worthy consideration as db+mmap has already been supported even though it is disabled by default. At least I think I could use it in my own application

Re: [sqlite] Make some changes to the source code

2018-01-24 Thread Simon Slavin
On 25 Jan 2018, at 1:34am, Nick wrote: > Do you mean the corruption problems you mentioned will happen in db+mmap? When memory-mapping was used for all file access of SQLite, some users reported that they occasionally got corrupted databases. When memory mapping was turned off, the problem

Re: [sqlite] Make some changes to the source code

2018-01-24 Thread Nick
I ran tests in my MacOS 10.12.6. -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Make some changes to the source code

2018-01-24 Thread Nick
I use sqlite in my Android application. And I tried to run sqlite test on my MacOS PC. Some cases failed but I can not figure out it is indeed a corruption. Do you mean the corruption problems you mentioned will happen in db+mmap? I guess it should happen in both wal+mmap and db+mmap if it exists.

Re: [sqlite] Make some changes to the source code

2018-01-24 Thread Simon Slavin
On 24 Jan 2018, at 11:35am, Nick wrote: > As I found > there will be a little improvement if I support MMAP to wal file. Which OS are you using ? The developers of SQLite have previously had corruption problems with memory-mapping under some versions of Windows and macOS. Corruption occurs r

[sqlite] Make some changes to the source code

2018-01-24 Thread Nick
I am trying to make some changes to the source code of sqlite. As I found there will be a little improvement if I support MMAP to wal file. I guess the optimization is micro but it is useful in my test and this is a good way for me to study the code of sqlite :D 1.wal+mmap I could use unixMapfile(