Closed mattias-p closed 4 months ago
This happens when Zonemaster::Backend::DB::add_result_entries() is called with more than 143 or more entries. This function prepares a statement with seven variables per entry, and when the number of entries exceed 142, the number of variables exceed 1000.
This error occurs when value of the constant SQLITE_LIMIT_VARIABLE_NUMBER is too low.
On Rocky 8 the system gives us DBD::SQLite 1.58 which doesn't even have an API to read the value of the constant, but experiments have show it to be around 1000, as indicated in my previous comment.
In DBD::SQLite 1.62 the constant can be read (it is 999) but it cannot be increased.
In DBD::SQLite 1.66 it is 32766, which is enough for 4680 entries. This leaves us some margin above the largest test results we've observed (which was around 2000 entries IIRC).
Is it possible to install newer DBD::SQLite?
That's what I'm working on.
That reminds me of a dirty hack that was done in Backend’s migration script for 11.1.0 (https://github.com/zonemaster/zonemaster-backend/blob/master/share/patch/patch_db_zonemaster_backend_ver_11.1.0.pl#L40) to accommodate SQLite. It seems that we are faced with the same problem here.
It seems that we are faced with the same problem here.
Yeah, it's the exact same problem. I guess people don't use SQLite much, since no external users have reported the 142 entry limitation.
Fixed by #1174
I ran the unit tests on Rocky 8 and test01.t blew up when I tried to install the dist tarball using sudo and cpanm.