ccgus / fmdb

A Cocoa / Objective-C wrapper around SQLite
Other
13.84k stars 2.77k forks source link

database locks after sqlite3_step #43

Open ghost opened 12 years ago

ghost commented 12 years ago

this is related to my old question about insert, i think i know where things are going wrong..

so i tried a simple insert, and stepped through the execution, and realize that the database locks right after line 704 of FMDatabase.m, which is

/* Call sqlite3_step() to run the virtual machine. Since the SQL being
 ** executed is not a SELECT statement, we assume no data will be returned.
 */
numberOfRetries = 0;
do {
    rc      = sqlite3_step(pStmt); <--- this one
    retry   = NO;

this is after the binding happens successfully, i can provide you with a video capture of the stepping if needed.

I close the database and then open it right before i open it again to run the update statement..

i looked around the web, and people suggest that it is a sqlite issue with NFS drives file locking mechanism, i have a mac os 10.6.8, and drive is autofs, which is a type of nfs i believe.

i am not expecting a fix from you, but some comments if you have any off the top of your head, i will to try this on a different machine as soon as i get the chance to.

thanks!

isaac

ccgus commented 12 years ago

Does the problem happen on hfs drives?