Hi All, I am trying to integrate SQLite in a multithreaded C++ application which runs on Linux. I have gone through the SQLIte documentation, but it's not clear whether the sqlite3_exec() will retry the query when the busy handler callback is implemented and returns a non-zero value.
From the sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*) definition it says "This routine identifies a callback function that might be invoked whenever an attempt is made to open a database table that another thread or process has locked. If the busy callback is NULL, then SQLITE_BUSY is returned immediately upon encountering the lock. If the busy callback is not NULL, then the callback will be invoked with two arguments. The second argument is the number of prior calls to the busy callback for the same lock. If the busy callback returns 0, then no additional attempts are made to access the database and SQLITE_BUSY is returned. If the callback returns non-zero, then another attempt is made to open the database for reading and the cycle repeats. Does it mean the sqlite3_exec() internally takes care of invoking the query multiple times until the callback returns 0? Can someone provide sample implementation for busy_handler callback and how the query is retried? thanks, Vadivel *********************** FSS- Confidential *********************** *********************** FSS- Confidential *********************** "DISCLAIMER: This message is proprietary to Flextronics Software Systems (FSS) and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. FSS accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."