That’s right! Last night I landed the latest version of SQLite to trunk. While generally updating SQLite is not so new-worthy, this time it is. You see, SQLite 3.5.x brings about some really awesome changes that consumers can take advantage of. The most important one for Mozilla (as I see it so far) is the ability to have the shared cache accessible on multiple threads. That means we can use database connections on multiple threads now while using the same cache. We can also use them at the same time (before, you could use them on different threads, but they would not have the same shared cache, nor could you use them at the same time). To see all the neat changes that we can now use, please read the SQLite docs.
Categories
4 replies on “New SQLite”
#4 on that list also looks interesting. BYOM (Bring Your Own
malloc()
)I cannot see any changes. Did I misunderstood something or do MXR lag behind?
http://mxr.mozilla.org/mozilla/source/storage/public/mozIStorageService.idl#87
87 * Opening connections from more than one thread to the same database will
88 * also CORRUPT YOUR DATABASE. All connections share the same sqlite cache,
89 * and the cache is not threadsafe.
90 *
91 * The connection object returned by this function is not threadsafe. You must
92 * use it only from the thread you created it from.
@Jesper
Er, no – that’s just me missing updating that :/
I filed Bug 411976 about that.
I added a note for mozIStorageService::openDatabase() on DevMo re: the thread safe cache being on trunk. Feel free to change the wording if you feel it’s unclear in some way.