OLD | NEW |
1 /* | 1 /* |
2 ** 2008 June 13 | 2 ** 2008 June 13 |
3 ** | 3 ** |
4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
6 ** | 6 ** |
7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
10 ** | 10 ** |
(...skipping 28 matching lines...) Expand all Loading... |
39 234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251, | 39 234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251, |
40 252,253,254,255 | 40 252,253,254,255 |
41 #endif | 41 #endif |
42 #ifdef SQLITE_EBCDIC | 42 #ifdef SQLITE_EBCDIC |
43 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 0x */ | 43 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 0x */ |
44 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 1x */ | 44 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 1x */ |
45 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 2x */ | 45 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 2x */ |
46 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 3x */ | 46 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 3x */ |
47 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, /* 4x */ | 47 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, /* 4x */ |
48 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, /* 5x */ | 48 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, /* 5x */ |
49 96, 97, 66, 67, 68, 69, 70, 71, 72, 73,106,107,108,109,110,111, /* 6x */ | 49 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, /* 6x */ |
50 112, 81, 82, 83, 84, 85, 86, 87, 88, 89,122,123,124,125,126,127, /* 7x */ | 50 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, /* 7x */ |
51 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, /* 8x */ | 51 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, /* 8x */ |
52 144,145,146,147,148,149,150,151,152,153,154,155,156,157,156,159, /* 9x */ | 52 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, /* 9x */ |
53 160,161,162,163,164,165,166,167,168,169,170,171,140,141,142,175, /* Ax */ | 53 160,161,162,163,164,165,166,167,168,169,170,171,140,141,142,175, /* Ax */ |
54 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, /* Bx */ | 54 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, /* Bx */ |
55 192,129,130,131,132,133,134,135,136,137,202,203,204,205,206,207, /* Cx */ | 55 192,129,130,131,132,133,134,135,136,137,202,203,204,205,206,207, /* Cx */ |
56 208,145,146,147,148,149,150,151,152,153,218,219,220,221,222,223, /* Dx */ | 56 208,145,146,147,148,149,150,151,152,153,218,219,220,221,222,223, /* Dx */ |
57 224,225,162,163,164,165,166,167,168,169,232,203,204,205,206,207, /* Ex */ | 57 224,225,162,163,164,165,166,167,168,169,234,235,236,237,238,239, /* Ex */ |
58 239,240,241,242,243,244,245,246,247,248,249,219,220,221,222,255, /* Fx */ | 58 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255, /* Fx */ |
59 #endif | 59 #endif |
60 }; | 60 }; |
61 | 61 |
62 /* | 62 /* |
63 ** The following 256 byte lookup table is used to support SQLites built-in | 63 ** The following 256 byte lookup table is used to support SQLites built-in |
64 ** equivalents to the following standard library functions: | 64 ** equivalents to the following standard library functions: |
65 ** | 65 ** |
66 ** isspace() 0x01 | 66 ** isspace() 0x01 |
67 ** isalpha() 0x02 | 67 ** isalpha() 0x02 |
68 ** isdigit() 0x04 | 68 ** isdigit() 0x04 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 /* f8..ff ........ */ | 128 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 /* f8..ff ........ */ |
129 }; | 129 }; |
130 #endif | 130 #endif |
131 | 131 |
132 /* EVIDENCE-OF: R-02982-34736 In order to maintain full backwards | 132 /* EVIDENCE-OF: R-02982-34736 In order to maintain full backwards |
133 ** compatibility for legacy applications, the URI filename capability is | 133 ** compatibility for legacy applications, the URI filename capability is |
134 ** disabled by default. | 134 ** disabled by default. |
135 ** | 135 ** |
136 ** EVIDENCE-OF: R-38799-08373 URI filenames can be enabled or disabled | 136 ** EVIDENCE-OF: R-38799-08373 URI filenames can be enabled or disabled |
137 ** using the SQLITE_USE_URI=1 or SQLITE_USE_URI=0 compile-time options. | 137 ** using the SQLITE_USE_URI=1 or SQLITE_USE_URI=0 compile-time options. |
| 138 ** |
| 139 ** EVIDENCE-OF: R-43642-56306 By default, URI handling is globally |
| 140 ** disabled. The default value may be changed by compiling with the |
| 141 ** SQLITE_USE_URI symbol defined. |
138 */ | 142 */ |
139 #ifndef SQLITE_USE_URI | 143 #ifndef SQLITE_USE_URI |
140 # define SQLITE_USE_URI 0 | 144 # define SQLITE_USE_URI 0 |
141 #endif | 145 #endif |
142 | 146 |
| 147 /* EVIDENCE-OF: R-38720-18127 The default setting is determined by the |
| 148 ** SQLITE_ALLOW_COVERING_INDEX_SCAN compile-time option, or is "on" if |
| 149 ** that compile-time option is omitted. |
| 150 */ |
143 #ifndef SQLITE_ALLOW_COVERING_INDEX_SCAN | 151 #ifndef SQLITE_ALLOW_COVERING_INDEX_SCAN |
144 # define SQLITE_ALLOW_COVERING_INDEX_SCAN 1 | 152 # define SQLITE_ALLOW_COVERING_INDEX_SCAN 1 |
145 #endif | 153 #endif |
146 | 154 |
| 155 /* The minimum PMA size is set to this value multiplied by the database |
| 156 ** page size in bytes. |
| 157 */ |
| 158 #ifndef SQLITE_SORTER_PMASZ |
| 159 # define SQLITE_SORTER_PMASZ 250 |
| 160 #endif |
| 161 |
147 /* | 162 /* |
148 ** The following singleton contains the global configuration for | 163 ** The following singleton contains the global configuration for |
149 ** the SQLite library. | 164 ** the SQLite library. |
150 */ | 165 */ |
151 SQLITE_WSD struct Sqlite3Config sqlite3Config = { | 166 SQLITE_WSD struct Sqlite3Config sqlite3Config = { |
152 SQLITE_DEFAULT_MEMSTATUS, /* bMemstat */ | 167 SQLITE_DEFAULT_MEMSTATUS, /* bMemstat */ |
153 1, /* bCoreMutex */ | 168 1, /* bCoreMutex */ |
154 SQLITE_THREADSAFE==1, /* bFullMutex */ | 169 SQLITE_THREADSAFE==1, /* bFullMutex */ |
155 SQLITE_USE_URI, /* bOpenUri */ | 170 SQLITE_USE_URI, /* bOpenUri */ |
156 SQLITE_ALLOW_COVERING_INDEX_SCAN, /* bUseCis */ | 171 SQLITE_ALLOW_COVERING_INDEX_SCAN, /* bUseCis */ |
157 0x7ffffffe, /* mxStrlen */ | 172 0x7ffffffe, /* mxStrlen */ |
158 0, /* neverCorrupt */ | 173 0, /* neverCorrupt */ |
159 128, /* szLookaside */ | 174 128, /* szLookaside */ |
160 500, /* nLookaside */ | 175 500, /* nLookaside */ |
161 {0,0,0,0,0,0,0,0}, /* m */ | 176 {0,0,0,0,0,0,0,0}, /* m */ |
162 {0,0,0,0,0,0,0,0,0}, /* mutex */ | 177 {0,0,0,0,0,0,0,0,0}, /* mutex */ |
163 {0,0,0,0,0,0,0,0,0,0,0,0,0},/* pcache2 */ | 178 {0,0,0,0,0,0,0,0,0,0,0,0,0},/* pcache2 */ |
164 (void*)0, /* pHeap */ | 179 (void*)0, /* pHeap */ |
165 0, /* nHeap */ | 180 0, /* nHeap */ |
166 0, 0, /* mnHeap, mxHeap */ | 181 0, 0, /* mnHeap, mxHeap */ |
167 SQLITE_DEFAULT_MMAP_SIZE, /* szMmap */ | 182 SQLITE_DEFAULT_MMAP_SIZE, /* szMmap */ |
168 SQLITE_MAX_MMAP_SIZE, /* mxMmap */ | 183 SQLITE_MAX_MMAP_SIZE, /* mxMmap */ |
169 (void*)0, /* pScratch */ | 184 (void*)0, /* pScratch */ |
170 0, /* szScratch */ | 185 0, /* szScratch */ |
171 0, /* nScratch */ | 186 0, /* nScratch */ |
172 (void*)0, /* pPage */ | 187 (void*)0, /* pPage */ |
173 0, /* szPage */ | 188 0, /* szPage */ |
174 0, /* nPage */ | 189 SQLITE_DEFAULT_PCACHE_INITSZ, /* nPage */ |
175 0, /* mxParserStack */ | 190 0, /* mxParserStack */ |
176 0, /* sharedCacheEnabled */ | 191 0, /* sharedCacheEnabled */ |
| 192 SQLITE_SORTER_PMASZ, /* szPma */ |
177 /* All the rest should always be initialized to zero */ | 193 /* All the rest should always be initialized to zero */ |
178 0, /* isInit */ | 194 0, /* isInit */ |
179 0, /* inProgress */ | 195 0, /* inProgress */ |
180 0, /* isMutexInit */ | 196 0, /* isMutexInit */ |
181 0, /* isMallocInit */ | 197 0, /* isMallocInit */ |
182 0, /* isPCacheInit */ | 198 0, /* isPCacheInit */ |
183 0, /* nRefInitMutex */ | 199 0, /* nRefInitMutex */ |
184 0, /* pInitMutex */ | 200 0, /* pInitMutex */ |
185 0, /* xLog */ | 201 0, /* xLog */ |
186 0, /* pLogArg */ | 202 0, /* pLogArg */ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 ** for use by the VFS layers as space for managing file locks. | 238 ** for use by the VFS layers as space for managing file locks. |
223 ** | 239 ** |
224 ** During testing, it is often desirable to move the pending byte to | 240 ** During testing, it is often desirable to move the pending byte to |
225 ** a different position in the file. This allows code that has to | 241 ** a different position in the file. This allows code that has to |
226 ** deal with the pending byte to run on files that are much smaller | 242 ** deal with the pending byte to run on files that are much smaller |
227 ** than 1 GiB. The sqlite3_test_control() interface can be used to | 243 ** than 1 GiB. The sqlite3_test_control() interface can be used to |
228 ** move the pending byte. | 244 ** move the pending byte. |
229 ** | 245 ** |
230 ** IMPORTANT: Changing the pending byte to any value other than | 246 ** IMPORTANT: Changing the pending byte to any value other than |
231 ** 0x40000000 results in an incompatible database file format! | 247 ** 0x40000000 results in an incompatible database file format! |
232 ** Changing the pending byte during operating results in undefined | 248 ** Changing the pending byte during operation will result in undefined |
233 ** and dileterious behavior. | 249 ** and incorrect behavior. |
234 */ | 250 */ |
235 #ifndef SQLITE_OMIT_WSD | 251 #ifndef SQLITE_OMIT_WSD |
236 int sqlite3PendingByte = 0x40000000; | 252 int sqlite3PendingByte = 0x40000000; |
237 #endif | 253 #endif |
238 | 254 |
239 #include "opcodes.h" | 255 #include "opcodes.h" |
240 /* | 256 /* |
241 ** Properties of opcodes. The OPFLG_INITIALIZER macro is | 257 ** Properties of opcodes. The OPFLG_INITIALIZER macro is |
242 ** created by mkopcodeh.awk during compilation. Data is obtained | 258 ** created by mkopcodeh.awk during compilation. Data is obtained |
243 ** from the comments following the "case OP_xxxx:" statements in | 259 ** from the comments following the "case OP_xxxx:" statements in |
244 ** the vdbe.c file. | 260 ** the vdbe.c file. |
245 */ | 261 */ |
246 const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER; | 262 const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER; |
| 263 |
| 264 /* |
| 265 ** Name of the default collating sequence |
| 266 */ |
| 267 const char sqlite3StrBINARY[] = "BINARY"; |
OLD | NEW |