Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » sqlite busy/lock timeout patch
sqlite busy/lock timeout patch [message #25936] Sat, 20 March 2010 22:34 Go to previous message
zsolt is currently offline  zsolt
Messages: 696
Registered: December 2005
Location: Budapest, Hungary
Contributor
I had a lot of problems with sqlite in a multi threaded and multi process environment.

It is possible to set a busy handler on a db handle using sqlite3 API, but it is able to handle SQLITE_BUSY only. The problem is, that sometimes I got SQLITE_LOCKED, but in this case, I had to reset the statement be able to successfully retry.

So I modified U++ sqlite classes, to handle a timeout.

You can set negative value as timeout if you need infinite wait. Infinite is dangerous for more than one thread, as you can get infinite deadlock that way.

I don't know if this workaround fits into U++, but I attached the patch.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: sqlite and Execute
Next Topic: Questions about sqlite schema
Goto Forum:
  


Current Time: Sat Apr 20 14:04:52 CEST 2024

Total time taken to generate the page: 0.05999 seconds