2

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?

Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
  • You want to pass *a hundred thousand* parameters to your SQL query? Maybe I'm just short of imagination, but I can't think of a situation where that could be a requirement; can you please explain what you're doing? I would also choose something more heavyweight than SQLite to handle such a query. – Borodin Mar 15 '18 at 02:48
  • `DBD::SQLite` doesn't use `sqlite3`, which is a command-line tool. I think you'll find that the module comes with a prebuilt library. What do you mean by *"using a modified header"* in this context? – Borodin Mar 15 '18 at 02:53
  • 1
    Modified header means a header containing constants, which gets modified to adjust the limits up to some value I'll never need to worry about hitting. Thanks for your help, it pointed me to modify the same constant in the DBD::SQLite plugin source. – Alex Reynolds Mar 15 '18 at 07:19

1 Answers1

3

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.

Borodin
  • 126,100
  • 9
  • 70
  • 144