Re: [sqlite] Is msync necessary for SQLite?

2016-11-03 Thread sanhua.zh
So, if I am already using an old version before 3.11 and enable the mmap, the data may lost after os crash. It’s that right? 原始邮件 发件人:Richard hipp...@sqlite.org 收件人:SQLite mailing listsqlite-us...@mailinglists.sqlite.org 发送时间:2016年11月3日(周四) 21:21 主题:Re: [sqlite] Is msync necessary for SQLite

Re: [sqlite] Is msync necessary for SQLite?

2016-11-03 Thread Richard Hipp
nCopy; >offset += nCopy; > } > } > #endif > > > > > 原始邮件 > 发件人:Richard hipp...@sqlite.org > 收件人:SQLite mailing listsqlite-us...@mailinglists.sqlite.org > 发送时间:2016年11月3日(周四) 17:49 > 主题:Re: [sqlite] Is msync necessary for SQLite? > > > On 11/3/16,

Re: [sqlite] Is msync necessary for SQLite?

2016-11-03 Thread sanhua.zh
So, it means that this is a bug in old version of SQLite ? 原始邮件 发件人:Dan kennedydanielk1...@gmail.com 收件人:sqlite-userssqlite-us...@mailinglists.sqlite.org 发送时间:2016年11月3日(周四) 18:38 主题:Re: [sqlite] Is msync necessary for SQLite? On 11/03/2016 04:53 PM, sanhua.zh wrote: Here is a part of code

Re: [sqlite] Is msync necessary for SQLite?

2016-11-03 Thread Dan Kennedy
-pMapRegion))[offset], pBuf, nCopy); pBuf = ((u8 *)pBuf)[nCopy]; amt -= nCopy; offset += nCopy; } } #endif 原始邮件 发件人:Richard hipp...@sqlite.org 收件人:SQLite mailing listsqlite-us...@mailinglists.sqlite.org 发送时间:2016年11月3日(周四) 17:49 主题:Re: [sqlite] Is msync necessary for SQLite? On 11/3/16

Re: [sqlite] Is msync necessary for SQLite?

2016-11-03 Thread sanhua.zh
(((u8 *)(pFile-pMapRegion))[offset], pBuf, nCopy); pBuf = ((u8 *)pBuf)[nCopy]; amt -= nCopy; offset += nCopy; } } #endif 原始邮件 发件人:Richard hipp...@sqlite.org 收件人:SQLite mailing listsqlite-us...@mailinglists.sqlite.org 发送时间:2016年11月3日(周四) 17:49 主题:Re: [sqlite] Is msync necessary

Re: [sqlite] Is msync necessary for SQLite?

2016-11-03 Thread Richard Hipp
On 11/3/16, sanhua.zh wrote: > I run in iOS. The mmap is enable in recent version. > So, once a mmap enable, data may lost after os crash unless msync. But I > can’t find anywhere in the source of SQLite call the msync. Is it a bug? No. Mmap() is only used for reading,

Re: [sqlite] Is msync necessary for SQLite?

2016-11-03 Thread sanhua.zh
时间:2016年11月3日(周四) 17:38 主题:Re: [sqlite] Is msync necessary for SQLite? On 11/03/2016 02:13 PM, sanhua.zh wrote: I notice that SQLite may not call msync for mmap. Instead, it calls the fsync. As my search, fsync does not imply the msync. See this,https://groups.google.com/forum/#!topic

Re: [sqlite] Is msync necessary for SQLite?

2016-11-03 Thread Dan Kennedy
On 11/03/2016 02:13 PM, sanhua.zh wrote: I notice that SQLite may not call msync for mmap. Instead, it calls the fsync. As my search, fsync does not imply the msync. See this,https://groups.google.com/forum/#!topic/comp.unix.programmer/pIiaQ6CUKjU So, is it necessary call a msync for SQLite

[sqlite] Is msync necessary for SQLite?

2016-11-03 Thread sanhua.zh
I notice that SQLite may not call msync for mmap. Instead, it calls the fsync. As my search, fsync does not imply the msync. See this,https://groups.google.com/forum/#!topic/comp.unix.programmer/pIiaQ6CUKjU So, is it necessary call a msync for SQLite