Fixed client serials not being unique on Windows (
bug 5285, r=psychonic).
4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing:
7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give.
11 *************************************************************************
13 ** This file defines various limits of what SQLite can process.
19 ** The maximum length of a TEXT or BLOB in bytes. This also
20 ** limits the size of a row in a table or index.
22 ** The hard limit is the ability of a 32-bit signed integer
23 ** to count the size: 2^31-1 or 2147483647.
25 #ifndef SQLITE_MAX_LENGTH
26 # define SQLITE_MAX_LENGTH 1000000000
30 ** This is the maximum number of
32 ** * Columns in a table
33 ** * Columns in an index
34 ** * Columns in a view
35 ** * Terms in the SET clause of an UPDATE statement
36 ** * Terms in the result set of a SELECT statement
37 ** * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement.
38 ** * Terms in the VALUES clause of an INSERT statement
40 ** The hard upper limit here is 32676. Most database people will
41 ** tell you that in a well-normalized database, you usually should
42 ** not have more than a dozen or so columns in any table. And if
43 ** that is the case, there is no point in having more than a few
44 ** dozen values in any of the other situations described above.
46 #ifndef SQLITE_MAX_COLUMN
47 # define SQLITE_MAX_COLUMN 2000
51 ** The maximum length of a single SQL statement in bytes.
52 ** The hard limit here is the same as SQLITE_MAX_LENGTH.
54 #ifndef SQLITE_MAX_SQL_LENGTH
55 # define SQLITE_MAX_SQL_LENGTH 1000000
59 ** The maximum depth of an expression tree. This is limited to
60 ** some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might
61 ** want to place more severe limits on the complexity of an
62 ** expression. A value of 0 (the default) means do not enforce
63 ** any limitation on expression tree depth.
65 #ifndef SQLITE_MAX_EXPR_DEPTH
66 # define SQLITE_MAX_EXPR_DEPTH 1000
70 ** The maximum number of terms in a compound SELECT statement.
71 ** The code generator for compound SELECT statements does one
72 ** level of recursion for each term. A stack overflow can result
73 ** if the number of terms is too large. In practice, most SQL
74 ** never has more than 3 or 4 terms. Use a value of 0 to disable
75 ** any limit on the number of terms in a compount SELECT.
77 #ifndef SQLITE_MAX_COMPOUND_SELECT
78 # define SQLITE_MAX_COMPOUND_SELECT 500
82 ** The maximum number of opcodes in a VDBE program.
83 ** Not currently enforced.
85 #ifndef SQLITE_MAX_VDBE_OP
86 # define SQLITE_MAX_VDBE_OP 25000
90 ** The maximum number of arguments to an SQL function.
92 #ifndef SQLITE_MAX_FUNCTION_ARG
93 # define SQLITE_MAX_FUNCTION_ARG 100
97 ** The maximum number of in-memory pages to use for the main database
98 ** table and for temporary tables. The SQLITE_DEFAULT_CACHE_SIZE
100 #ifndef SQLITE_DEFAULT_CACHE_SIZE
101 # define SQLITE_DEFAULT_CACHE_SIZE 2000
103 #ifndef SQLITE_DEFAULT_TEMP_CACHE_SIZE
104 # define SQLITE_DEFAULT_TEMP_CACHE_SIZE 500
108 ** The maximum number of attached databases. This must be at least 2
109 ** in order to support the main database file (0) and the file used to
110 ** hold temporary tables (1). And it must be less than 32 because
111 ** we use a bitmask of databases with a u32 in places (for example
112 ** the Parse.cookieMask field).
114 #ifndef SQLITE_MAX_ATTACHED
115 # define SQLITE_MAX_ATTACHED 10
120 ** The maximum value of a ?nnn wildcard that the parser will accept.
122 #ifndef SQLITE_MAX_VARIABLE_NUMBER
123 # define SQLITE_MAX_VARIABLE_NUMBER 999
127 ** The default size of a database page.
129 #ifndef SQLITE_DEFAULT_PAGE_SIZE
130 # define SQLITE_DEFAULT_PAGE_SIZE 1024
134 ** Ordinarily, if no value is explicitly provided, SQLite creates databases
135 ** with page size SQLITE_DEFAULT_PAGE_SIZE. However, based on certain
136 ** device characteristics (sector-size and atomic write() support),
137 ** SQLite may choose a larger value. This constant is the maximum value
138 ** SQLite will choose on it's own.
140 #ifndef SQLITE_MAX_DEFAULT_PAGE_SIZE
141 # define SQLITE_MAX_DEFAULT_PAGE_SIZE 8192
144 /* Maximum page size. The upper bound on this value is 32768. This a limit
145 ** imposed by the necessity of storing the value in a 2-byte unsigned integer
146 ** and the fact that the page size must be a power of 2.
148 #ifndef SQLITE_MAX_PAGE_SIZE
149 # define SQLITE_MAX_PAGE_SIZE 32768
153 ** Maximum number of pages in one database file.
155 ** This is really just the default value for the max_page_count pragma.
156 ** This value can be lowered (or raised) at run-time using that the
157 ** max_page_count macro.
159 #ifndef SQLITE_MAX_PAGE_COUNT
160 # define SQLITE_MAX_PAGE_COUNT 1073741823
164 ** Maximum length (in bytes) of the pattern in a LIKE or GLOB
167 #ifndef SQLITE_MAX_LIKE_PATTERN_LENGTH
168 # define SQLITE_MAX_LIKE_PATTERN_LENGTH 50000