On Sat, 10 Mar 2012 10:25:10 +0900, Yongil Jang <yongilj...@gmail.com>
wrote:

>Following sentences are found on sqlite source.
>And, there is a comment about database corruption.
>Could I get more detailed explanation about this?
>
>....The use of the SQLITE_SHM_DIRECTORY compile-time
>** option results in an incompatible build of SQLite;  *builds of SQLite*
>*** that with differing SQLITE_SHM_DIRECTORY settings attempt to use the*
>*** same database file at the same time, database corruption will likely*
>*** result*. 

It means that when two (or more) concurrent processes which access the
same database some using SQLITE_SHM_DIRECTORY, some without that option
will have different ideas of what memory to share.

If one process decides to use a shm file in the directory where the
database is located and an other process decides to use /dev/shm, the
processes don't "see" eachothers shared memory, and are not coordinated.

This will almost certainly cause database corruption.

> The SQLITE_SHM_DIRECTORY compile-time option is considered
>** "unsupported" and may go away in a future SQLite release.
>....

That is the usual disclaimer for features that are not chosen to be part
of the final architecture. They may not be maintained, and when the rest
of the code evolves in an incompatible way, they may not work properly
any more.


-- 
Regards,

Kees Nuyt

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to