DBD::SQLite 1.39

It's been a year since DBD::SQLite team released the last stable version of DBD::SQLite (1.37). The team has added a few new features to retrieve database information, and applied a number of bug fixes thanks to the community, most notably the one to address an issue where bind_param didn't work with PADTMP scalars (RT #79576).

Also, two significant changes have been made; one by us, and the other by the upstream.

The team decided to enforce "immediate transaction" for all the transactions unless otherwise configured. You'll likely see less database deadlocks when you use DBD::SQLite in a medium-to-larger web application. However, you might also see some performance penalty, especially if your software is almost read-only. If read concurrency really matters, set "sqlite_use_immediate_transaction" database handle attribute to false explicitly, and the "deferred" transaction will be used as was previously. You can set the handle attribute when you connect to a database like this:

my $dbh = DBI->connect('dbi:SQLite::memory:', undef, undef, {
  AutoCommit => 1,
  RaiseError => 1,
  PrintError => 0,
  sqlite_use_immediate_transaction => 0, # <- to defer transactions

Another change that might possibly break something is query optimizer enhancement since SQLite 3.7.15 (i.e. since DBD::SQLite 1.38_02), which may sometimes make the result order of a SELECT statement without an ORDER BY clause different from the one of the previous versions. If your software (or, more probably, tests of your software) mistakenly depends on this arbitrary order, it will probably be broken with this change.

If you are not sure, issue "PRAGMA reverse_unordered_selects = ON" after you connect to a database. As the name suggests, this pragma reverse the result order of unordered selects to reveal wrong assumptions.

As for other fixes/changes/enhancements, see the "Changes" file in the distribution.

One last note. We have moved our repository to github.



1 Comment

Thank you to all those who contributed. DBD::SQLite is one of those solid dependable modules on CPAN.

Leave a comment

About Kenichi Ishigaki

user-pic a Japanese perl programmer/translator, aka charsbar