Hi all, we have a little problem with the locking of sqlite connections in combination with the shared cache model.
We are using sqlite 3.6.10 (on Ubuntu 9.04) or later. Same problem occurs on the latest ubuntu version with sqlite 3.7.4. Problem: We have a multi threaded application that connects from different threads to a common sqlite database that contains just one large table (kind of log). We have enabled shared cache globaly and open the database connections for read/write from the main thread and read only / multi threading enabled (SQLITE_OPEN_READONLY | SQLITE_OPEN_NOMUTEX) from the other threads. After opening the database connection "Read-Uncommitted Isolation Mode" is directly enabled using if (sqlite3_exec(log_database_local, "PRAGMA read_uncommitted=True;", NULL, 0, &err) != SQLITE_OK) {... If the log table is well filled (~ 5.000.000 entries) we do different requests on this table from different threads. They are read-only right now. One request takes very long time to complete (select distinct xyz from ... where ...). While this request is processed, opening the same database from another thread blocks until the sqlite3_prepare for the first thread is completed, even if shared cache model is enabled. Is there any chance to open the same database from different threads to do read-only requests _without_ blocking the requests at any place? We need to be able to read the contents from the table in parallel from different threads even if one single database requests takes very long time. Any help or short hint would be very appreciated! Thanks in advance, Ole Reinhardt -- Thermotemp GmbH, Embedded-IT Embedded Hard-/ Software and Open Source Development, Integration and Consulting http://www.embedded-it.de Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97 Hauptsitz - Hademarscher Weg 7 - 13503 Berlin Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002 Geschäftsführer: Jörg Friedrichs, Ole Reinhardt Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users