On Nov 18, 2009, at 1:53 PM, priimak wrote: > Hi. > > I have a strange problem. I have a database a.db.1 and symlink a.db > which points to a.db.1 > When I use command line sqlite3 command I get following. > > % echo "select max(id) from t;" | sqlite3 a.db.1 > SQL error near line 1: disk I/O error > > but > > % echo "select max(id) from t;" | sqlite3 a.db > 4461066 > > Could that be explained? I use sqlite3 version 3.6.7 >
Having multiple names for the same database file (either symbolic links or hard links) can lead to database corruption following an application crash if a different application reopens the same database via a different name. See paragraph 9.5 in http://www.sqlite.org/atomiccommit to understand why. Please do not create aliases of any kind for your database files. SQLite uses O_NOFOLLOW, not for this reason, but to prevent an attack using symbolic links that could allow an unprivileged user to trick SQLite into deleting a file that the unprivileged user does not have access rights for. D. Richard Hipp d...@hwaci.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users