mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-19 21:43:15 +03:00
Increase the default upper bound on the number of parameters in a single
SQL statement to 32766 (from 999). FossilOrigin-Name: 2def75693a8ae002375aff80db0e6c970c75f75e8b6ba64f2c518712badb0ae8
This commit is contained in:
@@ -4199,7 +4199,7 @@ typedef struct sqlite3_context sqlite3_context;
|
||||
** [sqlite3_bind_parameter_index()] API if desired. ^The index
|
||||
** for "?NNN" parameters is the value of NNN.
|
||||
** ^The NNN value must be between 1 and the [sqlite3_limit()]
|
||||
** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999).
|
||||
** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 32766).
|
||||
**
|
||||
** ^The third argument is the value to bind to the parameter.
|
||||
** ^If the third parameter to sqlite3_bind_text() or sqlite3_bind_text16()
|
||||
|
||||
@@ -2512,10 +2512,10 @@ struct AggInfo {
|
||||
** it uses less memory in the Expr object, which is a big memory user
|
||||
** in systems with lots of prepared statements. And few applications
|
||||
** need more than about 10 or 20 variables. But some extreme users want
|
||||
** to have prepared statements with over 32767 variables, and for them
|
||||
** to have prepared statements with over 32766 variables, and for them
|
||||
** the option is available (at compile-time).
|
||||
*/
|
||||
#if SQLITE_MAX_VARIABLE_NUMBER<=32767
|
||||
#if SQLITE_MAX_VARIABLE_NUMBER<32767
|
||||
typedef i16 ynVar;
|
||||
#else
|
||||
typedef int ynVar;
|
||||
|
||||
@@ -131,9 +131,12 @@
|
||||
|
||||
/*
|
||||
** 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.
|
||||
*/
|
||||
#ifndef SQLITE_MAX_VARIABLE_NUMBER
|
||||
# define SQLITE_MAX_VARIABLE_NUMBER 999
|
||||
# define SQLITE_MAX_VARIABLE_NUMBER 32766
|
||||
#endif
|
||||
|
||||
/* Maximum page size. The upper bound on this value is 65536. This a limit
|
||||
|
||||
Reference in New Issue
Block a user