Skip to content

Too many SQL variables error #129

@kevinlang

Description

@kevinlang

While cleaning up the benchmarks in ecto_sqlite3, I hit this error due to the benchmarks setup code that used insert_all hitting this limit.

Couple options I can think of:

  1. Simply list this as a limitation in the documentation
  2. Have Exqlite detect and avoid this case via intelligent batching
  3. Bump the limit via a compile time option that SQLite already exposes

FWIW you can see the code that hits this limit by looking at sqlite.c:101742

(3) seems like a reasonable choice. The trade off is mentioned in sqlite.c:

/*
** The maximum value of a ?nnn wildcard that the parser will accept.
** If the value exceeds 32767 then extra space is required for the Expr
** structure.  But otherwise, we believe that the number can be as large
** as a signed 32-bit integer can hold.
*/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions