sqlite-android icon indicating copy to clipboard operation
sqlite-android copied to clipboard

Increase Maximum Number Of Host Parameters In A Single SQL Statement

Open C2H6O opened this issue 6 years ago • 2 comments

This PR is a follow-up to https://github.com/requery/sqlite-android/issues/124. Is this something that can be merged into this repo, instead of us having to fork it?

C2H6O avatar Jan 13 '20 18:01 C2H6O

If this change doesn't negatively effect memory usage in a typical use case then should be able to merge it. May also be possible to configure it this way and then lower the limit at runtime and have it be configurable somehow. Will look into this!

npurushe avatar Jan 14 '20 06:01 npurushe

https://www.sqlite.org/limits.html

To prevent excessive memory allocations, the maximum value of a host parameter number is SQLITE_MAX_VARIABLE_NUMBER, which defaults to 999 for SQLite versions prior to 3.32.0 (2020-05-22) or 32766 for SQLite versions after 3.32.0.

Since SQLite v3.35.5 got merged in last week does this mean it will use the new defaults (i.e. 32766 for SQLITE_MAX_VARIABLE_NUMBER)?

falcon4ever avatar May 03 '21 11:05 falcon4ever