perlsqlitedbidbd

Setting up DBD::SQLite to support a custom version of sqlite3


I get a too many SQL variables error using a package-default version of sqlite3, when I pass in more than 998 variables into a SQL query.

The sqlite3 binary packaged with yum for my OS and version was compiled with support for default variable names (indeed, 999 of them).

I have compiled a version of sqlite3 from source, using a modified header to bump this default up to a value that is more realistic (e.g., 99999).

In order to integrate this custom version of sqlite3 with Perl and its DBI interface to the DBD::SQLite plugin — to be able to use this new limit — what modifications do I make to the Perl DBD::SQLite plugin, such that it will use this modified version of sqlite3 and not the packaged binary (or its libraries) that it currently seems to use?


Solution

  • Please examine the documentation for DBD::SQLite under the heading SQLITE VERSION

    It has this about the SQLite library that it uses

    DBD::SQLite is usually compiled with a bundled SQLite library (SQLite version 3.22.0 as of this release) for consistency. However, a different version of SQLite may sometimes be used for some reasons like security, or some new experimental features.

    See also DBD::SQLite::compile_options() in the same document.