On Feb 18, 2010, at 11:44 PM, Ian Jackson wrote:

> Marian Aldenhoevel writes ("[sqlite] File locking to harsh?"):
>> ~ # sqlite3 /test "create table A (B integer);"
>> Error: database is locked
>>
>> An strace of that command is attached. The problem surfaces here, I  
>> think:
>>
>> open("/test", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
>> ...
>> fcntl64(3, F_SETLK64, {type=F_RDLCK, whence=SEEK_SET,  
>> start=1073741824,
>> len=1}, 0xbfae5690) = -1 EACCES (Permission denied)
>
> Once again we see sqlite reporting an incorrect error message due to
> (a) not checking errno and (b) not printing errno when reporting the
> error to the user.  This time it's the sqlite3 shell so the sqlite
> developers shouldn't be able wash their hands of it saying it's the
> application's fault.

According to the linux man page, both EAGAIN and EACCES mean the lock
could not be obtained due to locks held by other processes. It may mean
other things too, but it's not clear from the man page how those cases
can be distinguished from a conflict with another lock. Any suggestions?

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

Reply via email to