Alex Reynolds
Alex Reynolds

Reputation: 96947

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?

Upvotes: 2

Views: 315

Answers (2)

Britton Kerin
Britton Kerin

Reputation: 477

I just downloaded the amalgamation for the version I wanted and dropped in three files sqlite3.c, sqlite3.h and sqlite3ext.h over the existing ones that came with DBD::SQLite and it worked.

Upvotes: 0

Borodin
Borodin

Reputation: 126722

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.

Upvotes: 3

Related Questions