Fossil SCM

Merge trunk.

vor0nwe 2018-12-07 12:20 vor0nwe-wiki-wysiwyg merge
Commit ee780530ae4bf6b07c079ad6ebcd18949182cf4dbc13e15426bc7cdcb96efa38
--- skins/default/css.txt
+++ skins/default/css.txt
@@ -145,11 +145,11 @@
145145
border-radius: 5px;
146146
}
147147
.content blockquote {
148148
padding: 0 15px;
149149
}
150
-div.forumHierRoot blockquote, div.forumHier blockquote {
150
+div.forumHierRoot blockquote, div.forumHier blockquote, div.forumEdit blockquote {
151151
background-color: rgba(65, 131, 196, 0.1);
152152
border-left: 3px solid #254769;
153153
padding: .1em 1em;
154154
}
155155
156156
--- skins/default/css.txt
+++ skins/default/css.txt
@@ -145,11 +145,11 @@
145 border-radius: 5px;
146 }
147 .content blockquote {
148 padding: 0 15px;
149 }
150 div.forumHierRoot blockquote, div.forumHier blockquote {
151 background-color: rgba(65, 131, 196, 0.1);
152 border-left: 3px solid #254769;
153 padding: .1em 1em;
154 }
155
156
--- skins/default/css.txt
+++ skins/default/css.txt
@@ -145,11 +145,11 @@
145 border-radius: 5px;
146 }
147 .content blockquote {
148 padding: 0 15px;
149 }
150 div.forumHierRoot blockquote, div.forumHier blockquote, div.forumEdit blockquote {
151 background-color: rgba(65, 131, 196, 0.1);
152 border-left: 3px solid #254769;
153 padding: .1em 1em;
154 }
155
156
+3 -3
--- src/alerts.c
+++ src/alerts.c
@@ -846,11 +846,11 @@
846846
}
847847
}else if( p->zCmd ){
848848
FILE *out = popen(p->zCmd, "w");
849849
if( out ){
850850
fwrite(blob_buffer(&all), 1, blob_size(&all), out);
851
- fclose(out);
851
+ pclose(out);
852852
}else{
853853
emailerError(p, "Could not open output pipe \"%s\"", p->zCmd);
854854
}
855855
}else if( p->zDir ){
856856
char *zFile = file_time_tempname(p->zDir, ".email");
@@ -2035,12 +2035,12 @@
20352035
p->zFromName = 0;
20362036
p->pNext = 0;
20372037
switch( p->type ){
20382038
case 'c': zType = "Check-In"; break;
20392039
case 'f': zType = "Forum post"; break;
2040
- case 't': zType = "Wiki Edit"; break;
2041
- case 'w': zType = "Ticket Change"; break;
2040
+ case 't': zType = "Ticket Change"; break;
2041
+ case 'w': zType = "Wiki Edit"; break;
20422042
}
20432043
blob_init(&p->hdr, 0, 0);
20442044
blob_init(&p->txt, 0, 0);
20452045
blob_appendf(&p->txt,"== %s %s ==\n%s\n%s/info/%.20s\n",
20462046
db_column_text(&q,1),
20472047
--- src/alerts.c
+++ src/alerts.c
@@ -846,11 +846,11 @@
846 }
847 }else if( p->zCmd ){
848 FILE *out = popen(p->zCmd, "w");
849 if( out ){
850 fwrite(blob_buffer(&all), 1, blob_size(&all), out);
851 fclose(out);
852 }else{
853 emailerError(p, "Could not open output pipe \"%s\"", p->zCmd);
854 }
855 }else if( p->zDir ){
856 char *zFile = file_time_tempname(p->zDir, ".email");
@@ -2035,12 +2035,12 @@
2035 p->zFromName = 0;
2036 p->pNext = 0;
2037 switch( p->type ){
2038 case 'c': zType = "Check-In"; break;
2039 case 'f': zType = "Forum post"; break;
2040 case 't': zType = "Wiki Edit"; break;
2041 case 'w': zType = "Ticket Change"; break;
2042 }
2043 blob_init(&p->hdr, 0, 0);
2044 blob_init(&p->txt, 0, 0);
2045 blob_appendf(&p->txt,"== %s %s ==\n%s\n%s/info/%.20s\n",
2046 db_column_text(&q,1),
2047
--- src/alerts.c
+++ src/alerts.c
@@ -846,11 +846,11 @@
846 }
847 }else if( p->zCmd ){
848 FILE *out = popen(p->zCmd, "w");
849 if( out ){
850 fwrite(blob_buffer(&all), 1, blob_size(&all), out);
851 pclose(out);
852 }else{
853 emailerError(p, "Could not open output pipe \"%s\"", p->zCmd);
854 }
855 }else if( p->zDir ){
856 char *zFile = file_time_tempname(p->zDir, ".email");
@@ -2035,12 +2035,12 @@
2035 p->zFromName = 0;
2036 p->pNext = 0;
2037 switch( p->type ){
2038 case 'c': zType = "Check-In"; break;
2039 case 'f': zType = "Forum post"; break;
2040 case 't': zType = "Ticket Change"; break;
2041 case 'w': zType = "Wiki Edit"; break;
2042 }
2043 blob_init(&p->hdr, 0, 0);
2044 blob_init(&p->txt, 0, 0);
2045 blob_appendf(&p->txt,"== %s %s ==\n%s\n%s/info/%.20s\n",
2046 db_column_text(&q,1),
2047
--- src/backoffice.c
+++ src/backoffice.c
@@ -382,10 +382,11 @@
382382
383383
if( backofficeDb ) return;
384384
if( g.zRepositoryName==0 ) return;
385385
if( g.db==0 ) return;
386386
if( !db_table_exists("repository","config") ) return;
387
+ if( db_get_boolean("backoffice-disable",0) ) return;
387388
tmNow = time(0);
388389
backofficeReadLease(&x);
389390
if( x.tmNext>=tmNow && backofficeProcessExists(x.idNext) ){
390391
/* Another backoffice process is already queued up to run. This
391392
** process does not need to do any backoffice work. */
392393
--- src/backoffice.c
+++ src/backoffice.c
@@ -382,10 +382,11 @@
382
383 if( backofficeDb ) return;
384 if( g.zRepositoryName==0 ) return;
385 if( g.db==0 ) return;
386 if( !db_table_exists("repository","config") ) return;
 
387 tmNow = time(0);
388 backofficeReadLease(&x);
389 if( x.tmNext>=tmNow && backofficeProcessExists(x.idNext) ){
390 /* Another backoffice process is already queued up to run. This
391 ** process does not need to do any backoffice work. */
392
--- src/backoffice.c
+++ src/backoffice.c
@@ -382,10 +382,11 @@
382
383 if( backofficeDb ) return;
384 if( g.zRepositoryName==0 ) return;
385 if( g.db==0 ) return;
386 if( !db_table_exists("repository","config") ) return;
387 if( db_get_boolean("backoffice-disable",0) ) return;
388 tmNow = time(0);
389 backofficeReadLease(&x);
390 if( x.tmNext>=tmNow && backofficeProcessExists(x.idNext) ){
391 /* Another backoffice process is already queued up to run. This
392 ** process does not need to do any backoffice work. */
393
+1 -1
--- src/cache.c
+++ src/cache.c
@@ -344,11 +344,11 @@
344344
}
345345
346346
/*
347347
** WEBPAGE: cachestat
348348
**
349
-** Show information about the webpage cache. Requires Admin privilege.
349
+** Show information about the webpage cache. Requires Setup privilege.
350350
*/
351351
void cache_page(void){
352352
sqlite3 *db;
353353
sqlite3_stmt *pStmt;
354354
char zBuf[100];
355355
--- src/cache.c
+++ src/cache.c
@@ -344,11 +344,11 @@
344 }
345
346 /*
347 ** WEBPAGE: cachestat
348 **
349 ** Show information about the webpage cache. Requires Admin privilege.
350 */
351 void cache_page(void){
352 sqlite3 *db;
353 sqlite3_stmt *pStmt;
354 char zBuf[100];
355
--- src/cache.c
+++ src/cache.c
@@ -344,11 +344,11 @@
344 }
345
346 /*
347 ** WEBPAGE: cachestat
348 **
349 ** Show information about the webpage cache. Requires Setup privilege.
350 */
351 void cache_page(void){
352 sqlite3 *db;
353 sqlite3_stmt *pStmt;
354 char zBuf[100];
355
+132 -28
--- src/comformat.c
+++ src/comformat.c
@@ -2,11 +2,11 @@
22
** Copyright (c) 2007 D. Richard Hipp
33
**
44
** This program is free software; you can redistribute it and/or
55
** modify it under the terms of the Simplified BSD License (also
66
** known as the "2-Clause License" or "FreeBSD License".)
7
-
7
+**
88
** This program is distributed in the hope that it will be useful,
99
** but without any warranty; without even the implied warranty of
1010
** merchantability or fitness for a particular purpose.
1111
**
1212
** Author contact information:
@@ -95,21 +95,20 @@
9595
#endif
9696
}
9797
9898
/*
9999
** This function checks the current line being printed against the original
100
-** comment text. Upon matching, it emits a new line and updates the provided
101
-** character and line counts, if applicable.
100
+** comment text. Upon matching, it updates the provided character and line
101
+** counts, if applicable. The caller needs to emit a new line, if desired.
102102
*/
103103
static int comment_check_orig(
104104
const char *zOrigText, /* [in] Original comment text ONLY, may be NULL. */
105105
const char *zLine, /* [in] The comment line to print. */
106106
int *pCharCnt, /* [in/out] Pointer to the line character count. */
107107
int *pLineCnt /* [in/out] Pointer to the total line count. */
108108
){
109109
if( zOrigText && fossil_strcmp(zLine, zOrigText)==0 ){
110
- fossil_print("\n");
111110
if( pCharCnt ) *pCharCnt = 0;
112111
if( pLineCnt ) (*pLineCnt)++;
113112
return 1;
114113
}
115114
return 0;
@@ -121,37 +120,76 @@
121120
** zero if such a character cannot be found. For the purposes of this
122121
** algorithm, the NUL character is treated the same as a spacing character.
123122
*/
124123
static int comment_next_space(
125124
const char *zLine, /* [in] The comment line being printed. */
126
- int index /* [in] The current character index being handled. */
125
+ int index, /* [in] The current character index being handled. */
126
+ int *distUTF8 /* [out] Distance to next space in UTF-8 sequences. */
127127
){
128128
int nextIndex = index + 1;
129
+ int fNonASCII=0;
129130
for(;;){
130131
char c = zLine[nextIndex];
132
+ if( (c&0x80)==0x80 ) fNonASCII=1;
131133
if( c==0 || fossil_isspace(c) ){
134
+ if( distUTF8 ){
135
+ if( fNonASCII!=0 ){
136
+ *distUTF8 = strlen_utf8(&zLine[index], nextIndex-index);
137
+ }else{
138
+ *distUTF8 = nextIndex-index;
139
+ }
140
+ }
132141
return nextIndex;
133142
}
134143
nextIndex++;
135144
}
136145
return 0; /* NOT REACHED */
137146
}
138147
139148
/*
140
-** This function is called when printing a logical comment line to perform
141
-** the necessary indenting.
149
+** Count the number of UTF-8 sequences in a string. Incomplete, ill-formed and
150
+** overlong sequences are counted as one sequence. The invalid lead bytes 0xC0
151
+** to 0xC1 and 0xF5 to 0xF7 are allowed to initiate (ill-formed) 2- and 4-byte
152
+** sequences, respectively, the other invalid lead bytes 0xF8 to 0xFF are
153
+** treated as invalid 1-byte sequences (as lone trail bytes).
154
+** Combining characters and East Asian Wide and Fullwidth characters are counted
155
+** as one, so this function does not calculate the effective "display width".
156
+*/
157
+int strlen_utf8(const char *zString, int lengthBytes){
158
+ int i; /* Counted bytes. */
159
+ int lengthUTF8; /* Counted UTF-8 sequences. */
160
+#if 0
161
+ assert( lengthBytes>=0 );
162
+#endif
163
+ for(i=0, lengthUTF8=0; i<lengthBytes; i++, lengthUTF8++){
164
+ char c = zString[i];
165
+ int cchUTF8=1; /* Code units consumed. */
166
+ int maxUTF8=1; /* Expected sequence length. */
167
+ if( (c&0xe0)==0xc0 )maxUTF8=2; /* UTF-8 lead byte 110vvvvv */
168
+ else if( (c&0xf0)==0xe0 )maxUTF8=3; /* UTF-8 lead byte 1110vvvv */
169
+ else if( (c&0xf8)==0xf0 )maxUTF8=4; /* UTF-8 lead byte 11110vvv */
170
+ while( cchUTF8<maxUTF8 &&
171
+ i<lengthBytes-1 &&
172
+ (zString[i+1]&0xc0)==0x80 ){ /* UTF-8 trail byte 10vvvvvv */
173
+ cchUTF8++;
174
+ i++;
175
+ }
176
+ }
177
+ return lengthUTF8;
178
+}
179
+
180
+/*
181
+** This function is called when printing a logical comment line to calculate
182
+** the necessary indenting. The caller needs to emit the indenting spaces.
142183
*/
143
-static void comment_print_indent(
184
+static void comment_calc_indent(
144185
const char *zLine, /* [in] The comment line being printed. */
145186
int indent, /* [in] Number of spaces to indent, zero for none. */
146187
int trimCrLf, /* [in] Non-zero to trim leading/trailing CR/LF. */
147188
int trimSpace, /* [in] Non-zero to trim leading/trailing spaces. */
148189
int *piIndex /* [in/out] Pointer to first non-space character. */
149190
){
150
- if( indent>0 ){
151
- fossil_print("%*s", indent, "");
152
- }
153191
if( zLine && piIndex ){
154192
int index = *piIndex;
155193
if( trimCrLf ){
156194
while( zLine[index]=='\r' || zLine[index]=='\n' ){ index++; }
157195
}
@@ -179,26 +217,56 @@
179217
int wordBreak, /* [in] Non-zero to try breaking on word boundaries. */
180218
int origBreak, /* [in] Non-zero to break before original comment. */
181219
int *pLineCnt, /* [in/out] Pointer to the total line count. */
182220
const char **pzLine /* [out] Pointer to the end of the logical line. */
183221
){
184
- int index = 0, charCnt = 0, lineCnt = 0, maxChars;
222
+ int index = 0, charCnt = 0, lineCnt = 0, maxChars, i;
223
+ char zBuf[400]; int iBuf=0; /* Output buffer and counter. */
224
+ int cchUTF8, maxUTF8; /* Helper variables to count UTF-8 sequences. */
185225
if( !zLine ) return;
186226
if( lineChars<=0 ) return;
187
- comment_print_indent(zLine, indent, trimCrLf, trimSpace, &index);
227
+#if 0
228
+ assert( indent<sizeof(zBuf)-5 ); /* See following comments to explain */
229
+ assert( origIndent<sizeof(zBuf)-5 ); /* these limits. */
230
+#endif
231
+ if( indent>sizeof(zBuf)-6 ){
232
+ /* Limit initial indent to fit output buffer. */
233
+ indent = sizeof(zBuf)-6;
234
+ }
235
+ comment_calc_indent(zLine, indent, trimCrLf, trimSpace, &index);
236
+ if( indent>0 ){
237
+ for(i=0; i<indent; i++){
238
+ zBuf[iBuf++] = ' ';
239
+ }
240
+ }
241
+ if( origIndent>sizeof(zBuf)-6 ){
242
+ /* Limit line indent to fit output buffer. */
243
+ origIndent = sizeof(zBuf)-6;
244
+ }
188245
maxChars = lineChars;
189246
for(;;){
190247
int useChars = 1;
191248
char c = zLine[index];
249
+ /* Flush the output buffer if there's no space left for at least one more
250
+ ** (potentially 4-byte) UTF-8 sequence, one level of indentation spaces,
251
+ ** a new line, and a terminating NULL. */
252
+ if( iBuf>sizeof(zBuf)-origIndent-6 ){
253
+ zBuf[iBuf]=0;
254
+ iBuf=0;
255
+ fossil_print("%s", zBuf);
256
+ }
192257
if( c==0 ){
193258
break;
194259
}else{
195260
if( origBreak && index>0 ){
196261
const char *zCurrent = &zLine[index];
197262
if( comment_check_orig(zOrigText, zCurrent, &charCnt, &lineCnt) ){
198
- comment_print_indent(zCurrent, origIndent, trimCrLf, trimSpace,
199
- &index);
263
+ zBuf[iBuf++] = '\n';
264
+ comment_calc_indent(zLine, origIndent, trimCrLf, trimSpace, &index);
265
+ for( i=0; i<origIndent; i++ ){
266
+ zBuf[iBuf++] = ' ';
267
+ }
200268
maxChars = lineChars;
201269
}
202270
}
203271
index++;
204272
}
@@ -205,38 +273,57 @@
205273
if( c=='\n' ){
206274
lineCnt++;
207275
charCnt = 0;
208276
useChars = 0;
209277
}else if( c=='\t' ){
210
- int nextIndex = comment_next_space(zLine, index);
211
- if( nextIndex<=0 || (nextIndex-index)>maxChars ){
278
+ int distUTF8;
279
+ int nextIndex = comment_next_space(zLine, index, &distUTF8);
280
+ if( nextIndex<=0 || distUTF8>maxChars ){
212281
break;
213282
}
214283
charCnt++;
215284
useChars = COMMENT_TAB_WIDTH;
216285
if( maxChars<useChars ){
217
- fossil_print(" ");
286
+ zBuf[iBuf++] = ' ';
218287
break;
219288
}
220289
}else if( wordBreak && fossil_isspace(c) ){
221
- int nextIndex = comment_next_space(zLine, index);
222
- if( nextIndex<=0 || (nextIndex-index)>maxChars ){
290
+ int distUTF8;
291
+ int nextIndex = comment_next_space(zLine, index, &distUTF8);
292
+ if( nextIndex<=0 || distUTF8>maxChars ){
223293
break;
224294
}
225295
charCnt++;
226296
}else{
227297
charCnt++;
228298
}
229299
assert( c!='\n' || charCnt==0 );
230
- fossil_print("%c", c);
231
- if( (c&0x80)==0 || (zLine[index+1]&0xc0)!=0xc0 ) maxChars -= useChars;
300
+ zBuf[iBuf++] = c;
301
+ /* Skip over UTF-8 sequences, see comment on strlen_utf8() for details. */
302
+ cchUTF8=1; /* Code units consumed. */
303
+ maxUTF8=1; /* Expected sequence length. */
304
+ if( (c&0xe0)==0xc0 )maxUTF8=2; /* UTF-8 lead byte 110vvvvv */
305
+ else if( (c&0xf0)==0xe0 )maxUTF8=3; /* UTF-8 lead byte 1110vvvv */
306
+ else if( (c&0xf8)==0xf0 )maxUTF8=4; /* UTF-8 lead byte 11110vvv */
307
+ while( cchUTF8<maxUTF8 &&
308
+ (zLine[index]&0xc0)==0x80 ){ /* UTF-8 trail byte 10vvvvvv */
309
+ cchUTF8++;
310
+ zBuf[iBuf++] = zLine[index++];
311
+ }
312
+ maxChars -= useChars;
232313
if( maxChars<=0 ) break;
233314
if( c=='\n' ) break;
234315
}
235316
if( charCnt>0 ){
236
- fossil_print("\n");
317
+ zBuf[iBuf++] = '\n';
237318
lineCnt++;
319
+ }
320
+ /* Flush the remaining output buffer. */
321
+ if( iBuf>0 ){
322
+ zBuf[iBuf]=0;
323
+ iBuf=0;
324
+ fossil_print("%s", zBuf);
238325
}
239326
if( pLineCnt ){
240327
*pLineCnt += lineCnt;
241328
}
242329
if( pzLine ){
@@ -259,25 +346,27 @@
259346
const char *zText, /* The comment text to be printed. */
260347
int indent, /* Number of spaces to indent each non-initial line. */
261348
int width /* Maximum number of characters per line. */
262349
){
263350
int maxChars = width - indent;
264
- int si, sk, i, k;
351
+ int si, sk, i, k, kc;
265352
int doIndent = 0;
266353
char *zBuf;
267354
char zBuffer[400];
268355
int lineCnt = 0;
356
+ int cchUTF8, maxUTF8; /* Helper variables to count UTF-8 sequences. */
269357
270358
if( width<0 ){
271359
comment_set_maxchars(indent, &maxChars);
272360
}
273361
if( zText==0 ) zText = "(NULL)";
274362
if( maxChars<=0 ){
275363
maxChars = strlen(zText);
276364
}
277
- if( maxChars >= (sizeof(zBuffer)) ){
278
- zBuf = fossil_malloc(maxChars+1);
365
+ /* Ensure the buffer can hold the longest-possible UTF-8 sequences. */
366
+ if( maxChars >= (sizeof(zBuffer)/4-1) ){
367
+ zBuf = fossil_malloc(maxChars*4+1);
279368
}else{
280369
zBuf = zBuffer;
281370
}
282371
for(;;){
283372
while( fossil_isspace(zText[0]) ){ zText++; }
@@ -287,13 +376,28 @@
287376
lineCnt = 1;
288377
}
289378
if( zBuf!=zBuffer) fossil_free(zBuf);
290379
return lineCnt;
291380
}
292
- for(sk=si=i=k=0; zText[i] && k<maxChars; i++){
381
+ for(sk=si=i=k=kc=0; zText[i] && kc<maxChars; i++){
293382
char c = zText[i];
294
- if( fossil_isspace(c) ){
383
+ kc++; /* Count complete UTF-8 sequences. */
384
+ /* Skip over UTF-8 sequences, see comment on strlen_utf8() for details. */
385
+ cchUTF8=1; /* Code units consumed. */
386
+ maxUTF8=1; /* Expected sequence length. */
387
+ if( (c&0xe0)==0xc0 )maxUTF8=2; /* UTF-8 lead byte 110vvvvv */
388
+ else if( (c&0xf0)==0xe0 )maxUTF8=3; /* UTF-8 lead byte 1110vvvv */
389
+ else if( (c&0xf8)==0xf0 )maxUTF8=4; /* UTF-8 lead byte 11110vvv */
390
+ if( maxUTF8>1 ){
391
+ zBuf[k++] = c;
392
+ while( cchUTF8<maxUTF8 &&
393
+ (zText[i+1]&0xc0)==0x80 ){ /* UTF-8 trail byte 10vvvvvv */
394
+ cchUTF8++;
395
+ zBuf[k++] = zText[++i];
396
+ }
397
+ }
398
+ else if( fossil_isspace(c) ){
295399
si = i;
296400
sk = k;
297401
if( k==0 || zBuf[k-1]!=' ' ){
298402
zBuf[k++] = ' ';
299403
}
300404
--- src/comformat.c
+++ src/comformat.c
@@ -2,11 +2,11 @@
2 ** Copyright (c) 2007 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
@@ -95,21 +95,20 @@
95 #endif
96 }
97
98 /*
99 ** This function checks the current line being printed against the original
100 ** comment text. Upon matching, it emits a new line and updates the provided
101 ** character and line counts, if applicable.
102 */
103 static int comment_check_orig(
104 const char *zOrigText, /* [in] Original comment text ONLY, may be NULL. */
105 const char *zLine, /* [in] The comment line to print. */
106 int *pCharCnt, /* [in/out] Pointer to the line character count. */
107 int *pLineCnt /* [in/out] Pointer to the total line count. */
108 ){
109 if( zOrigText && fossil_strcmp(zLine, zOrigText)==0 ){
110 fossil_print("\n");
111 if( pCharCnt ) *pCharCnt = 0;
112 if( pLineCnt ) (*pLineCnt)++;
113 return 1;
114 }
115 return 0;
@@ -121,37 +120,76 @@
121 ** zero if such a character cannot be found. For the purposes of this
122 ** algorithm, the NUL character is treated the same as a spacing character.
123 */
124 static int comment_next_space(
125 const char *zLine, /* [in] The comment line being printed. */
126 int index /* [in] The current character index being handled. */
 
127 ){
128 int nextIndex = index + 1;
 
129 for(;;){
130 char c = zLine[nextIndex];
 
131 if( c==0 || fossil_isspace(c) ){
 
 
 
 
 
 
 
132 return nextIndex;
133 }
134 nextIndex++;
135 }
136 return 0; /* NOT REACHED */
137 }
138
139 /*
140 ** This function is called when printing a logical comment line to perform
141 ** the necessary indenting.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142 */
143 static void comment_print_indent(
144 const char *zLine, /* [in] The comment line being printed. */
145 int indent, /* [in] Number of spaces to indent, zero for none. */
146 int trimCrLf, /* [in] Non-zero to trim leading/trailing CR/LF. */
147 int trimSpace, /* [in] Non-zero to trim leading/trailing spaces. */
148 int *piIndex /* [in/out] Pointer to first non-space character. */
149 ){
150 if( indent>0 ){
151 fossil_print("%*s", indent, "");
152 }
153 if( zLine && piIndex ){
154 int index = *piIndex;
155 if( trimCrLf ){
156 while( zLine[index]=='\r' || zLine[index]=='\n' ){ index++; }
157 }
@@ -179,26 +217,56 @@
179 int wordBreak, /* [in] Non-zero to try breaking on word boundaries. */
180 int origBreak, /* [in] Non-zero to break before original comment. */
181 int *pLineCnt, /* [in/out] Pointer to the total line count. */
182 const char **pzLine /* [out] Pointer to the end of the logical line. */
183 ){
184 int index = 0, charCnt = 0, lineCnt = 0, maxChars;
 
 
185 if( !zLine ) return;
186 if( lineChars<=0 ) return;
187 comment_print_indent(zLine, indent, trimCrLf, trimSpace, &index);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188 maxChars = lineChars;
189 for(;;){
190 int useChars = 1;
191 char c = zLine[index];
 
 
 
 
 
 
 
 
192 if( c==0 ){
193 break;
194 }else{
195 if( origBreak && index>0 ){
196 const char *zCurrent = &zLine[index];
197 if( comment_check_orig(zOrigText, zCurrent, &charCnt, &lineCnt) ){
198 comment_print_indent(zCurrent, origIndent, trimCrLf, trimSpace,
199 &index);
 
 
 
200 maxChars = lineChars;
201 }
202 }
203 index++;
204 }
@@ -205,38 +273,57 @@
205 if( c=='\n' ){
206 lineCnt++;
207 charCnt = 0;
208 useChars = 0;
209 }else if( c=='\t' ){
210 int nextIndex = comment_next_space(zLine, index);
211 if( nextIndex<=0 || (nextIndex-index)>maxChars ){
 
212 break;
213 }
214 charCnt++;
215 useChars = COMMENT_TAB_WIDTH;
216 if( maxChars<useChars ){
217 fossil_print(" ");
218 break;
219 }
220 }else if( wordBreak && fossil_isspace(c) ){
221 int nextIndex = comment_next_space(zLine, index);
222 if( nextIndex<=0 || (nextIndex-index)>maxChars ){
 
223 break;
224 }
225 charCnt++;
226 }else{
227 charCnt++;
228 }
229 assert( c!='\n' || charCnt==0 );
230 fossil_print("%c", c);
231 if( (c&0x80)==0 || (zLine[index+1]&0xc0)!=0xc0 ) maxChars -= useChars;
 
 
 
 
 
 
 
 
 
 
 
232 if( maxChars<=0 ) break;
233 if( c=='\n' ) break;
234 }
235 if( charCnt>0 ){
236 fossil_print("\n");
237 lineCnt++;
 
 
 
 
 
 
238 }
239 if( pLineCnt ){
240 *pLineCnt += lineCnt;
241 }
242 if( pzLine ){
@@ -259,25 +346,27 @@
259 const char *zText, /* The comment text to be printed. */
260 int indent, /* Number of spaces to indent each non-initial line. */
261 int width /* Maximum number of characters per line. */
262 ){
263 int maxChars = width - indent;
264 int si, sk, i, k;
265 int doIndent = 0;
266 char *zBuf;
267 char zBuffer[400];
268 int lineCnt = 0;
 
269
270 if( width<0 ){
271 comment_set_maxchars(indent, &maxChars);
272 }
273 if( zText==0 ) zText = "(NULL)";
274 if( maxChars<=0 ){
275 maxChars = strlen(zText);
276 }
277 if( maxChars >= (sizeof(zBuffer)) ){
278 zBuf = fossil_malloc(maxChars+1);
 
279 }else{
280 zBuf = zBuffer;
281 }
282 for(;;){
283 while( fossil_isspace(zText[0]) ){ zText++; }
@@ -287,13 +376,28 @@
287 lineCnt = 1;
288 }
289 if( zBuf!=zBuffer) fossil_free(zBuf);
290 return lineCnt;
291 }
292 for(sk=si=i=k=0; zText[i] && k<maxChars; i++){
293 char c = zText[i];
294 if( fossil_isspace(c) ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295 si = i;
296 sk = k;
297 if( k==0 || zBuf[k-1]!=' ' ){
298 zBuf[k++] = ' ';
299 }
300
--- src/comformat.c
+++ src/comformat.c
@@ -2,11 +2,11 @@
2 ** Copyright (c) 2007 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7 **
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
@@ -95,21 +95,20 @@
95 #endif
96 }
97
98 /*
99 ** This function checks the current line being printed against the original
100 ** comment text. Upon matching, it updates the provided character and line
101 ** counts, if applicable. The caller needs to emit a new line, if desired.
102 */
103 static int comment_check_orig(
104 const char *zOrigText, /* [in] Original comment text ONLY, may be NULL. */
105 const char *zLine, /* [in] The comment line to print. */
106 int *pCharCnt, /* [in/out] Pointer to the line character count. */
107 int *pLineCnt /* [in/out] Pointer to the total line count. */
108 ){
109 if( zOrigText && fossil_strcmp(zLine, zOrigText)==0 ){
 
110 if( pCharCnt ) *pCharCnt = 0;
111 if( pLineCnt ) (*pLineCnt)++;
112 return 1;
113 }
114 return 0;
@@ -121,37 +120,76 @@
120 ** zero if such a character cannot be found. For the purposes of this
121 ** algorithm, the NUL character is treated the same as a spacing character.
122 */
123 static int comment_next_space(
124 const char *zLine, /* [in] The comment line being printed. */
125 int index, /* [in] The current character index being handled. */
126 int *distUTF8 /* [out] Distance to next space in UTF-8 sequences. */
127 ){
128 int nextIndex = index + 1;
129 int fNonASCII=0;
130 for(;;){
131 char c = zLine[nextIndex];
132 if( (c&0x80)==0x80 ) fNonASCII=1;
133 if( c==0 || fossil_isspace(c) ){
134 if( distUTF8 ){
135 if( fNonASCII!=0 ){
136 *distUTF8 = strlen_utf8(&zLine[index], nextIndex-index);
137 }else{
138 *distUTF8 = nextIndex-index;
139 }
140 }
141 return nextIndex;
142 }
143 nextIndex++;
144 }
145 return 0; /* NOT REACHED */
146 }
147
148 /*
149 ** Count the number of UTF-8 sequences in a string. Incomplete, ill-formed and
150 ** overlong sequences are counted as one sequence. The invalid lead bytes 0xC0
151 ** to 0xC1 and 0xF5 to 0xF7 are allowed to initiate (ill-formed) 2- and 4-byte
152 ** sequences, respectively, the other invalid lead bytes 0xF8 to 0xFF are
153 ** treated as invalid 1-byte sequences (as lone trail bytes).
154 ** Combining characters and East Asian Wide and Fullwidth characters are counted
155 ** as one, so this function does not calculate the effective "display width".
156 */
157 int strlen_utf8(const char *zString, int lengthBytes){
158 int i; /* Counted bytes. */
159 int lengthUTF8; /* Counted UTF-8 sequences. */
160 #if 0
161 assert( lengthBytes>=0 );
162 #endif
163 for(i=0, lengthUTF8=0; i<lengthBytes; i++, lengthUTF8++){
164 char c = zString[i];
165 int cchUTF8=1; /* Code units consumed. */
166 int maxUTF8=1; /* Expected sequence length. */
167 if( (c&0xe0)==0xc0 )maxUTF8=2; /* UTF-8 lead byte 110vvvvv */
168 else if( (c&0xf0)==0xe0 )maxUTF8=3; /* UTF-8 lead byte 1110vvvv */
169 else if( (c&0xf8)==0xf0 )maxUTF8=4; /* UTF-8 lead byte 11110vvv */
170 while( cchUTF8<maxUTF8 &&
171 i<lengthBytes-1 &&
172 (zString[i+1]&0xc0)==0x80 ){ /* UTF-8 trail byte 10vvvvvv */
173 cchUTF8++;
174 i++;
175 }
176 }
177 return lengthUTF8;
178 }
179
180 /*
181 ** This function is called when printing a logical comment line to calculate
182 ** the necessary indenting. The caller needs to emit the indenting spaces.
183 */
184 static void comment_calc_indent(
185 const char *zLine, /* [in] The comment line being printed. */
186 int indent, /* [in] Number of spaces to indent, zero for none. */
187 int trimCrLf, /* [in] Non-zero to trim leading/trailing CR/LF. */
188 int trimSpace, /* [in] Non-zero to trim leading/trailing spaces. */
189 int *piIndex /* [in/out] Pointer to first non-space character. */
190 ){
 
 
 
191 if( zLine && piIndex ){
192 int index = *piIndex;
193 if( trimCrLf ){
194 while( zLine[index]=='\r' || zLine[index]=='\n' ){ index++; }
195 }
@@ -179,26 +217,56 @@
217 int wordBreak, /* [in] Non-zero to try breaking on word boundaries. */
218 int origBreak, /* [in] Non-zero to break before original comment. */
219 int *pLineCnt, /* [in/out] Pointer to the total line count. */
220 const char **pzLine /* [out] Pointer to the end of the logical line. */
221 ){
222 int index = 0, charCnt = 0, lineCnt = 0, maxChars, i;
223 char zBuf[400]; int iBuf=0; /* Output buffer and counter. */
224 int cchUTF8, maxUTF8; /* Helper variables to count UTF-8 sequences. */
225 if( !zLine ) return;
226 if( lineChars<=0 ) return;
227 #if 0
228 assert( indent<sizeof(zBuf)-5 ); /* See following comments to explain */
229 assert( origIndent<sizeof(zBuf)-5 ); /* these limits. */
230 #endif
231 if( indent>sizeof(zBuf)-6 ){
232 /* Limit initial indent to fit output buffer. */
233 indent = sizeof(zBuf)-6;
234 }
235 comment_calc_indent(zLine, indent, trimCrLf, trimSpace, &index);
236 if( indent>0 ){
237 for(i=0; i<indent; i++){
238 zBuf[iBuf++] = ' ';
239 }
240 }
241 if( origIndent>sizeof(zBuf)-6 ){
242 /* Limit line indent to fit output buffer. */
243 origIndent = sizeof(zBuf)-6;
244 }
245 maxChars = lineChars;
246 for(;;){
247 int useChars = 1;
248 char c = zLine[index];
249 /* Flush the output buffer if there's no space left for at least one more
250 ** (potentially 4-byte) UTF-8 sequence, one level of indentation spaces,
251 ** a new line, and a terminating NULL. */
252 if( iBuf>sizeof(zBuf)-origIndent-6 ){
253 zBuf[iBuf]=0;
254 iBuf=0;
255 fossil_print("%s", zBuf);
256 }
257 if( c==0 ){
258 break;
259 }else{
260 if( origBreak && index>0 ){
261 const char *zCurrent = &zLine[index];
262 if( comment_check_orig(zOrigText, zCurrent, &charCnt, &lineCnt) ){
263 zBuf[iBuf++] = '\n';
264 comment_calc_indent(zLine, origIndent, trimCrLf, trimSpace, &index);
265 for( i=0; i<origIndent; i++ ){
266 zBuf[iBuf++] = ' ';
267 }
268 maxChars = lineChars;
269 }
270 }
271 index++;
272 }
@@ -205,38 +273,57 @@
273 if( c=='\n' ){
274 lineCnt++;
275 charCnt = 0;
276 useChars = 0;
277 }else if( c=='\t' ){
278 int distUTF8;
279 int nextIndex = comment_next_space(zLine, index, &distUTF8);
280 if( nextIndex<=0 || distUTF8>maxChars ){
281 break;
282 }
283 charCnt++;
284 useChars = COMMENT_TAB_WIDTH;
285 if( maxChars<useChars ){
286 zBuf[iBuf++] = ' ';
287 break;
288 }
289 }else if( wordBreak && fossil_isspace(c) ){
290 int distUTF8;
291 int nextIndex = comment_next_space(zLine, index, &distUTF8);
292 if( nextIndex<=0 || distUTF8>maxChars ){
293 break;
294 }
295 charCnt++;
296 }else{
297 charCnt++;
298 }
299 assert( c!='\n' || charCnt==0 );
300 zBuf[iBuf++] = c;
301 /* Skip over UTF-8 sequences, see comment on strlen_utf8() for details. */
302 cchUTF8=1; /* Code units consumed. */
303 maxUTF8=1; /* Expected sequence length. */
304 if( (c&0xe0)==0xc0 )maxUTF8=2; /* UTF-8 lead byte 110vvvvv */
305 else if( (c&0xf0)==0xe0 )maxUTF8=3; /* UTF-8 lead byte 1110vvvv */
306 else if( (c&0xf8)==0xf0 )maxUTF8=4; /* UTF-8 lead byte 11110vvv */
307 while( cchUTF8<maxUTF8 &&
308 (zLine[index]&0xc0)==0x80 ){ /* UTF-8 trail byte 10vvvvvv */
309 cchUTF8++;
310 zBuf[iBuf++] = zLine[index++];
311 }
312 maxChars -= useChars;
313 if( maxChars<=0 ) break;
314 if( c=='\n' ) break;
315 }
316 if( charCnt>0 ){
317 zBuf[iBuf++] = '\n';
318 lineCnt++;
319 }
320 /* Flush the remaining output buffer. */
321 if( iBuf>0 ){
322 zBuf[iBuf]=0;
323 iBuf=0;
324 fossil_print("%s", zBuf);
325 }
326 if( pLineCnt ){
327 *pLineCnt += lineCnt;
328 }
329 if( pzLine ){
@@ -259,25 +346,27 @@
346 const char *zText, /* The comment text to be printed. */
347 int indent, /* Number of spaces to indent each non-initial line. */
348 int width /* Maximum number of characters per line. */
349 ){
350 int maxChars = width - indent;
351 int si, sk, i, k, kc;
352 int doIndent = 0;
353 char *zBuf;
354 char zBuffer[400];
355 int lineCnt = 0;
356 int cchUTF8, maxUTF8; /* Helper variables to count UTF-8 sequences. */
357
358 if( width<0 ){
359 comment_set_maxchars(indent, &maxChars);
360 }
361 if( zText==0 ) zText = "(NULL)";
362 if( maxChars<=0 ){
363 maxChars = strlen(zText);
364 }
365 /* Ensure the buffer can hold the longest-possible UTF-8 sequences. */
366 if( maxChars >= (sizeof(zBuffer)/4-1) ){
367 zBuf = fossil_malloc(maxChars*4+1);
368 }else{
369 zBuf = zBuffer;
370 }
371 for(;;){
372 while( fossil_isspace(zText[0]) ){ zText++; }
@@ -287,13 +376,28 @@
376 lineCnt = 1;
377 }
378 if( zBuf!=zBuffer) fossil_free(zBuf);
379 return lineCnt;
380 }
381 for(sk=si=i=k=kc=0; zText[i] && kc<maxChars; i++){
382 char c = zText[i];
383 kc++; /* Count complete UTF-8 sequences. */
384 /* Skip over UTF-8 sequences, see comment on strlen_utf8() for details. */
385 cchUTF8=1; /* Code units consumed. */
386 maxUTF8=1; /* Expected sequence length. */
387 if( (c&0xe0)==0xc0 )maxUTF8=2; /* UTF-8 lead byte 110vvvvv */
388 else if( (c&0xf0)==0xe0 )maxUTF8=3; /* UTF-8 lead byte 1110vvvv */
389 else if( (c&0xf8)==0xf0 )maxUTF8=4; /* UTF-8 lead byte 11110vvv */
390 if( maxUTF8>1 ){
391 zBuf[k++] = c;
392 while( cchUTF8<maxUTF8 &&
393 (zText[i+1]&0xc0)==0x80 ){ /* UTF-8 trail byte 10vvvvvv */
394 cchUTF8++;
395 zBuf[k++] = zText[++i];
396 }
397 }
398 else if( fossil_isspace(c) ){
399 si = i;
400 sk = k;
401 if( k==0 || zBuf[k-1]!=' ' ){
402 zBuf[k++] = ' ';
403 }
404
+45 -4
--- src/db.c
+++ src/db.c
@@ -3030,10 +3030,24 @@
30303030
** SETTING: backoffice-nodelay boolean default=off
30313031
** If backoffice-nodelay is true, then the backoffice processing
30323032
** will never invoke sleep(). If it has nothing useful to do,
30333033
** it simply exits.
30343034
*/
3035
+/*
3036
+** SETTING: backoffice-disable boolean default=off
3037
+** If backoffice-disable is true, then the automatic backoffice
3038
+** processing is disabled. Automatic backoffice processing is the
3039
+** backoffice work that normally runs after each web page is
3040
+** rendered. Backoffice processing that is triggered by the
3041
+** "fossil backoffice" command is unaffected by this setting.
3042
+**
3043
+** Backoffice processing does things such as delivering
3044
+** email notifications. So if this setting is true, and if
3045
+** there is no cron job periodically running "fossil backoffice",
3046
+** email notifications and other work normally done by the
3047
+** backoffice will not occur.
3048
+*/
30353049
/*
30363050
** SETTING: backoffice-logfile width=40
30373051
** If backoffice-logfile is not an empty string and is a valid
30383052
** filename, then a one-line message is appended to that file
30393053
** every time the backoffice runs. This can be used for debugging,
@@ -3188,14 +3202,41 @@
31883202
** The value is a comma or newline-separated list of GLOB
31893203
** patterns specifying files that the "clean" command will keep.
31903204
*/
31913205
/*
31923206
** SETTING: localauth boolean default=off
3193
-** If enabled, require that HTTP connections from
3194
-** 127.0.0.1 be authenticated by password. If
3195
-** false, all HTTP requests from localhost have
3196
-** unrestricted access to the repository.
3207
+** If enabled, require that HTTP connections from the loopback
3208
+** address (127.0.0.1) be authenticated by password. If false,
3209
+** some HTTP requests might be granted full "Setup" user
3210
+** privileges without having to present login credentials.
3211
+** This mechanism allows the "fossil ui" command to provide
3212
+** full access to the repository without requiring the user to
3213
+** log in first.
3214
+**
3215
+** In order for full "Setup" privilege to be granted without a
3216
+** login, the following conditions must be met:
3217
+**
3218
+** (1) This setting ("localauth") must be off
3219
+** (2) The HTTP request arrive over the loopback TCP/IP
3220
+** address (127.0.01) or else via SSH.
3221
+** (3) The request must be HTTP, not HTTPS. (This
3222
+** restriction is designed to help prevent accidentally
3223
+** providing "Setup" privileges to requests arriving
3224
+** over a reverse proxy.)
3225
+** (4) The command that launched the fossil server must be
3226
+** one of the following:
3227
+** (a) "fossil ui"
3228
+** (b) "fossil server" with the --localauth option
3229
+** (c) "fossil http" with the --localauth option
3230
+** (d) CGI with the "localauth" setting in the cgi script.
3231
+**
3232
+** For maximum security, set "localauth" to 1. However, because
3233
+** of the other restrictions (2) through (4), it should be safe
3234
+** to leave "localauth" set to 0 in most installations, and
3235
+** especially on cloned repositories on workstations. Leaving
3236
+** "localauth" at 0 makes the "fossil ui" command more convenient
3237
+** to use.
31973238
*/
31983239
/*
31993240
** SETTING: main-branch width=40 default=trunk
32003241
** The value is the primary branch for the project.
32013242
*/
32023243
--- src/db.c
+++ src/db.c
@@ -3030,10 +3030,24 @@
3030 ** SETTING: backoffice-nodelay boolean default=off
3031 ** If backoffice-nodelay is true, then the backoffice processing
3032 ** will never invoke sleep(). If it has nothing useful to do,
3033 ** it simply exits.
3034 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3035 /*
3036 ** SETTING: backoffice-logfile width=40
3037 ** If backoffice-logfile is not an empty string and is a valid
3038 ** filename, then a one-line message is appended to that file
3039 ** every time the backoffice runs. This can be used for debugging,
@@ -3188,14 +3202,41 @@
3188 ** The value is a comma or newline-separated list of GLOB
3189 ** patterns specifying files that the "clean" command will keep.
3190 */
3191 /*
3192 ** SETTING: localauth boolean default=off
3193 ** If enabled, require that HTTP connections from
3194 ** 127.0.0.1 be authenticated by password. If
3195 ** false, all HTTP requests from localhost have
3196 ** unrestricted access to the repository.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3197 */
3198 /*
3199 ** SETTING: main-branch width=40 default=trunk
3200 ** The value is the primary branch for the project.
3201 */
3202
--- src/db.c
+++ src/db.c
@@ -3030,10 +3030,24 @@
3030 ** SETTING: backoffice-nodelay boolean default=off
3031 ** If backoffice-nodelay is true, then the backoffice processing
3032 ** will never invoke sleep(). If it has nothing useful to do,
3033 ** it simply exits.
3034 */
3035 /*
3036 ** SETTING: backoffice-disable boolean default=off
3037 ** If backoffice-disable is true, then the automatic backoffice
3038 ** processing is disabled. Automatic backoffice processing is the
3039 ** backoffice work that normally runs after each web page is
3040 ** rendered. Backoffice processing that is triggered by the
3041 ** "fossil backoffice" command is unaffected by this setting.
3042 **
3043 ** Backoffice processing does things such as delivering
3044 ** email notifications. So if this setting is true, and if
3045 ** there is no cron job periodically running "fossil backoffice",
3046 ** email notifications and other work normally done by the
3047 ** backoffice will not occur.
3048 */
3049 /*
3050 ** SETTING: backoffice-logfile width=40
3051 ** If backoffice-logfile is not an empty string and is a valid
3052 ** filename, then a one-line message is appended to that file
3053 ** every time the backoffice runs. This can be used for debugging,
@@ -3188,14 +3202,41 @@
3202 ** The value is a comma or newline-separated list of GLOB
3203 ** patterns specifying files that the "clean" command will keep.
3204 */
3205 /*
3206 ** SETTING: localauth boolean default=off
3207 ** If enabled, require that HTTP connections from the loopback
3208 ** address (127.0.0.1) be authenticated by password. If false,
3209 ** some HTTP requests might be granted full "Setup" user
3210 ** privileges without having to present login credentials.
3211 ** This mechanism allows the "fossil ui" command to provide
3212 ** full access to the repository without requiring the user to
3213 ** log in first.
3214 **
3215 ** In order for full "Setup" privilege to be granted without a
3216 ** login, the following conditions must be met:
3217 **
3218 ** (1) This setting ("localauth") must be off
3219 ** (2) The HTTP request arrive over the loopback TCP/IP
3220 ** address (127.0.01) or else via SSH.
3221 ** (3) The request must be HTTP, not HTTPS. (This
3222 ** restriction is designed to help prevent accidentally
3223 ** providing "Setup" privileges to requests arriving
3224 ** over a reverse proxy.)
3225 ** (4) The command that launched the fossil server must be
3226 ** one of the following:
3227 ** (a) "fossil ui"
3228 ** (b) "fossil server" with the --localauth option
3229 ** (c) "fossil http" with the --localauth option
3230 ** (d) CGI with the "localauth" setting in the cgi script.
3231 **
3232 ** For maximum security, set "localauth" to 1. However, because
3233 ** of the other restrictions (2) through (4), it should be safe
3234 ** to leave "localauth" set to 0 in most installations, and
3235 ** especially on cloned repositories on workstations. Leaving
3236 ** "localauth" at 0 makes the "fossil ui" command more convenient
3237 ** to use.
3238 */
3239 /*
3240 ** SETTING: main-branch width=40 default=trunk
3241 ** The value is the primary branch for the project.
3242 */
3243
+8 -2
--- src/info.c
+++ src/info.c
@@ -2129,13 +2129,19 @@
21292129
if( renderAsWiki ){
21302130
wiki_render_by_mimetype(&content, zMime);
21312131
}else if( renderAsHtml ){
21322132
@ <iframe src="%R/raw/%T(blob_str(&downloadName))?name=%s(zUuid)"
21332133
@ width="100%%" frameborder="0" marginwidth="0" marginheight="0"
2134
- @ sandbox="allow-same-origin"
2135
- @ onload="this.height=this.contentDocument.documentElement.scrollHeight;">
2134
+ @ sandbox="allow-same-origin" id="ifm1">
21362135
@ </iframe>
2136
+ @ <script nonce="%h(style_nonce())">
2137
+ @ document.getElementById("ifm1").addEventListener("load",
2138
+ @ function(){
2139
+ @ this.height=this.contentDocument.documentElement.scrollHeight + 75;
2140
+ @ }
2141
+ @ );
2142
+ @ </script>
21372143
}else{
21382144
style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
21392145
blob_to_utf8_no_bom(&content, 0);
21402146
zMime = mimetype_from_content(&content);
21412147
@ <blockquote>
21422148
--- src/info.c
+++ src/info.c
@@ -2129,13 +2129,19 @@
2129 if( renderAsWiki ){
2130 wiki_render_by_mimetype(&content, zMime);
2131 }else if( renderAsHtml ){
2132 @ <iframe src="%R/raw/%T(blob_str(&downloadName))?name=%s(zUuid)"
2133 @ width="100%%" frameborder="0" marginwidth="0" marginheight="0"
2134 @ sandbox="allow-same-origin"
2135 @ onload="this.height=this.contentDocument.documentElement.scrollHeight;">
2136 @ </iframe>
 
 
 
 
 
 
 
2137 }else{
2138 style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
2139 blob_to_utf8_no_bom(&content, 0);
2140 zMime = mimetype_from_content(&content);
2141 @ <blockquote>
2142
--- src/info.c
+++ src/info.c
@@ -2129,13 +2129,19 @@
2129 if( renderAsWiki ){
2130 wiki_render_by_mimetype(&content, zMime);
2131 }else if( renderAsHtml ){
2132 @ <iframe src="%R/raw/%T(blob_str(&downloadName))?name=%s(zUuid)"
2133 @ width="100%%" frameborder="0" marginwidth="0" marginheight="0"
2134 @ sandbox="allow-same-origin" id="ifm1">
 
2135 @ </iframe>
2136 @ <script nonce="%h(style_nonce())">
2137 @ document.getElementById("ifm1").addEventListener("load",
2138 @ function(){
2139 @ this.height=this.contentDocument.documentElement.scrollHeight + 75;
2140 @ }
2141 @ );
2142 @ </script>
2143 }else{
2144 style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
2145 blob_to_utf8_no_bom(&content, 0);
2146 zMime = mimetype_from_content(&content);
2147 @ <blockquote>
2148
+1 -1
--- src/main.c
+++ src/main.c
@@ -2698,11 +2698,11 @@
26982698
*/
26992699
void test_warning_page(void){
27002700
int iCase = atoi(PD("case","0"));
27012701
int i;
27022702
login_check_credentials();
2703
- if( !g.perm.Setup && !g.perm.Admin ){
2703
+ if( !g.perm.Admin ){
27042704
login_needed(0);
27052705
return;
27062706
}
27072707
style_header("Warning Test Page");
27082708
style_submenu_element("Error Log","%R/errorlog");
27092709
--- src/main.c
+++ src/main.c
@@ -2698,11 +2698,11 @@
2698 */
2699 void test_warning_page(void){
2700 int iCase = atoi(PD("case","0"));
2701 int i;
2702 login_check_credentials();
2703 if( !g.perm.Setup && !g.perm.Admin ){
2704 login_needed(0);
2705 return;
2706 }
2707 style_header("Warning Test Page");
2708 style_submenu_element("Error Log","%R/errorlog");
2709
--- src/main.c
+++ src/main.c
@@ -2698,11 +2698,11 @@
2698 */
2699 void test_warning_page(void){
2700 int iCase = atoi(PD("case","0"));
2701 int i;
2702 login_check_credentials();
2703 if( !g.perm.Admin ){
2704 login_needed(0);
2705 return;
2706 }
2707 style_header("Warning Test Page");
2708 style_submenu_element("Error Log","%R/errorlog");
2709
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -710,11 +710,11 @@
710710
#### The directories where the OpenSSL include and library files are located.
711711
# The recommended usage here is to use the Sysinternals junction tool
712712
# to create a hard link between an "openssl-1.x" sub-directory of the
713713
# Fossil source code directory and the target OpenSSL source directory.
714714
#
715
-OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2p
715
+OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2q
716716
OPENSSLINCDIR = $(OPENSSLDIR)/include
717717
OPENSSLLIBDIR = $(OPENSSLDIR)
718718
719719
#### Either the directory where the Tcl library is installed or the Tcl
720720
# source code directory resides (depending on the value of the macro
@@ -1566,11 +1566,11 @@
15661566
!ifndef USE_SEE
15671567
USE_SEE = 0
15681568
!endif
15691569
15701570
!if $(FOSSIL_ENABLE_SSL)!=0
1571
-SSLDIR = $(B)\compat\openssl-1.0.2p
1571
+SSLDIR = $(B)\compat\openssl-1.0.2q
15721572
SSLINCDIR = $(SSLDIR)\inc32
15731573
!if $(FOSSIL_DYNAMIC_BUILD)!=0
15741574
SSLLIBDIR = $(SSLDIR)\out32dll
15751575
!else
15761576
SSLLIBDIR = $(SSLDIR)\out32
15771577
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -710,11 +710,11 @@
710 #### The directories where the OpenSSL include and library files are located.
711 # The recommended usage here is to use the Sysinternals junction tool
712 # to create a hard link between an "openssl-1.x" sub-directory of the
713 # Fossil source code directory and the target OpenSSL source directory.
714 #
715 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2p
716 OPENSSLINCDIR = $(OPENSSLDIR)/include
717 OPENSSLLIBDIR = $(OPENSSLDIR)
718
719 #### Either the directory where the Tcl library is installed or the Tcl
720 # source code directory resides (depending on the value of the macro
@@ -1566,11 +1566,11 @@
1566 !ifndef USE_SEE
1567 USE_SEE = 0
1568 !endif
1569
1570 !if $(FOSSIL_ENABLE_SSL)!=0
1571 SSLDIR = $(B)\compat\openssl-1.0.2p
1572 SSLINCDIR = $(SSLDIR)\inc32
1573 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1574 SSLLIBDIR = $(SSLDIR)\out32dll
1575 !else
1576 SSLLIBDIR = $(SSLDIR)\out32
1577
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -710,11 +710,11 @@
710 #### The directories where the OpenSSL include and library files are located.
711 # The recommended usage here is to use the Sysinternals junction tool
712 # to create a hard link between an "openssl-1.x" sub-directory of the
713 # Fossil source code directory and the target OpenSSL source directory.
714 #
715 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2q
716 OPENSSLINCDIR = $(OPENSSLDIR)/include
717 OPENSSLLIBDIR = $(OPENSSLDIR)
718
719 #### Either the directory where the Tcl library is installed or the Tcl
720 # source code directory resides (depending on the value of the macro
@@ -1566,11 +1566,11 @@
1566 !ifndef USE_SEE
1567 USE_SEE = 0
1568 !endif
1569
1570 !if $(FOSSIL_ENABLE_SSL)!=0
1571 SSLDIR = $(B)\compat\openssl-1.0.2q
1572 SSLINCDIR = $(SSLDIR)\inc32
1573 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1574 SSLLIBDIR = $(SSLDIR)\out32dll
1575 !else
1576 SSLLIBDIR = $(SSLDIR)\out32
1577
--- src/security_audit.c
+++ src/security_audit.c
@@ -47,11 +47,11 @@
4747
const char *zSelfCap; /* Capabilities of self-registered users */
4848
char *z;
4949
int n;
5050
5151
login_check_credentials();
52
- if( !g.perm.Setup && !g.perm.Admin ){
52
+ if( !g.perm.Admin ){
5353
login_needed(0);
5454
return;
5555
}
5656
style_header("Security Audit");
5757
@ <ol>
@@ -439,11 +439,11 @@
439439
**
440440
** Disable anonymous access to this website
441441
*/
442442
void takeitprivate_page(void){
443443
login_check_credentials();
444
- if( !g.perm.Setup && !g.perm.Admin ){
444
+ if( !g.perm.Admin ){
445445
login_needed(0);
446446
return;
447447
}
448448
if( P("cancel") ){
449449
/* User pressed the cancel button. Go back */
@@ -488,11 +488,11 @@
488488
void errorlog_page(void){
489489
i64 szFile;
490490
FILE *in;
491491
char z[10000];
492492
login_check_credentials();
493
- if( !g.perm.Setup && !g.perm.Admin ){
493
+ if( !g.perm.Admin ){
494494
login_needed(0);
495495
return;
496496
}
497497
style_header("Server Error Log");
498498
style_submenu_element("Test", "%R/test-warning");
499499
--- src/security_audit.c
+++ src/security_audit.c
@@ -47,11 +47,11 @@
47 const char *zSelfCap; /* Capabilities of self-registered users */
48 char *z;
49 int n;
50
51 login_check_credentials();
52 if( !g.perm.Setup && !g.perm.Admin ){
53 login_needed(0);
54 return;
55 }
56 style_header("Security Audit");
57 @ <ol>
@@ -439,11 +439,11 @@
439 **
440 ** Disable anonymous access to this website
441 */
442 void takeitprivate_page(void){
443 login_check_credentials();
444 if( !g.perm.Setup && !g.perm.Admin ){
445 login_needed(0);
446 return;
447 }
448 if( P("cancel") ){
449 /* User pressed the cancel button. Go back */
@@ -488,11 +488,11 @@
488 void errorlog_page(void){
489 i64 szFile;
490 FILE *in;
491 char z[10000];
492 login_check_credentials();
493 if( !g.perm.Setup && !g.perm.Admin ){
494 login_needed(0);
495 return;
496 }
497 style_header("Server Error Log");
498 style_submenu_element("Test", "%R/test-warning");
499
--- src/security_audit.c
+++ src/security_audit.c
@@ -47,11 +47,11 @@
47 const char *zSelfCap; /* Capabilities of self-registered users */
48 char *z;
49 int n;
50
51 login_check_credentials();
52 if( !g.perm.Admin ){
53 login_needed(0);
54 return;
55 }
56 style_header("Security Audit");
57 @ <ol>
@@ -439,11 +439,11 @@
439 **
440 ** Disable anonymous access to this website
441 */
442 void takeitprivate_page(void){
443 login_check_credentials();
444 if( !g.perm.Admin ){
445 login_needed(0);
446 return;
447 }
448 if( P("cancel") ){
449 /* User pressed the cancel button. Go back */
@@ -488,11 +488,11 @@
488 void errorlog_page(void){
489 i64 szFile;
490 FILE *in;
491 char z[10000];
492 login_check_credentials();
493 if( !g.perm.Admin ){
494 login_needed(0);
495 return;
496 }
497 style_header("Server Error Log");
498 style_submenu_element("Test", "%R/test-warning");
499
+52 -36
--- src/setup.c
+++ src/setup.c
@@ -59,17 +59,21 @@
5959
6060
6161
/*
6262
** WEBPAGE: setup
6363
**
64
-** Main menu for the administrative pages. Requires Admin privileges.
64
+** Main menu for the administrative pages. Requires Admin or Setup
65
+** privileges. Links to sub-pages only usable by Setup users are
66
+** shown only to Setup users.
6567
*/
6668
void setup_page(void){
69
+ int setup_user = 0;
6770
login_check_credentials();
68
- if( !g.perm.Setup ){
71
+ if( !g.perm.Admin ){
6972
login_needed(0);
7073
}
74
+ setup_user = g.perm.Setup;
7175
7276
style_header("Server Administration");
7377
7478
/* Make sure the header contains <base href="...">. Issue a warning
7579
** if it does not. */
@@ -95,46 +99,56 @@
9599
#endif
96100
97101
@ <table border="0" cellspacing="3">
98102
setup_menu_entry("Users", "setup_ulist",
99103
"Grant privileges to individual users.");
100
- setup_menu_entry("Access", "setup_access",
101
- "Control access settings.");
102
- setup_menu_entry("Configuration", "setup_config",
103
- "Configure the WWW components of the repository");
104
+ if( setup_user ){
105
+ setup_menu_entry("Access", "setup_access",
106
+ "Control access settings.");
107
+ setup_menu_entry("Configuration", "setup_config",
108
+ "Configure the WWW components of the repository");
109
+ }
104110
setup_menu_entry("Security-Audit", "secaudit0",
105111
"Analyze the current configuration for security problems");
106
- setup_menu_entry("Settings", "setup_settings",
107
- "Web interface to the \"fossil settings\" command");
112
+ if( setup_user ){
113
+ setup_menu_entry("Settings", "setup_settings",
114
+ "Web interface to the \"fossil settings\" command");
115
+ }
108116
setup_menu_entry("Timeline", "setup_timeline",
109117
"Timeline display preferences");
110
- setup_menu_entry("Login-Group", "setup_login_group",
111
- "Manage single sign-on between this repository and others"
112
- " on the same server");
113
- setup_menu_entry("Tickets", "tktsetup",
114
- "Configure the trouble-ticketing system for this repository");
118
+ if( setup_user ){
119
+ setup_menu_entry("Login-Group", "setup_login_group",
120
+ "Manage single sign-on between this repository and others"
121
+ " on the same server");
122
+ setup_menu_entry("Tickets", "tktsetup",
123
+ "Configure the trouble-ticketing system for this repository");
124
+ }
115125
setup_menu_entry("Search","srchsetup",
116126
"Configure the built-in search engine");
117127
setup_menu_entry("URL Aliases", "waliassetup",
118128
"Configure URL aliases");
119
- setup_menu_entry("Notification", "setup_notification",
120
- "Automatic notifications of changes via outbound email");
121
- setup_menu_entry("Email-Server", "setup_smtp",
122
- "Activate and configure the built-in email server");
123
- setup_menu_entry("Transfers", "xfersetup",
124
- "Configure the transfer system for this repository");
129
+ if( setup_user ){
130
+ setup_menu_entry("Notification", "setup_notification",
131
+ "Automatic notifications of changes via outbound email");
132
+ setup_menu_entry("Email-Server", "setup_smtp",
133
+ "Activate and configure the built-in email server");
134
+ setup_menu_entry("Transfers", "xfersetup",
135
+ "Configure the transfer system for this repository");
136
+ }
125137
setup_menu_entry("Skins", "setup_skin",
126138
"Select and/or modify the web interface \"skins\"");
127139
setup_menu_entry("Moderation", "setup_modreq",
128140
"Enable/Disable requiring moderator approval of Wiki and/or Ticket"
129141
" changes and attachments.");
130142
setup_menu_entry("Ad-Unit", "setup_adunit",
131143
"Edit HTML text for an ad unit inserted after the menu bar");
132144
setup_menu_entry("URLs & Checkouts", "urllist",
133145
"Show URLs used to access this repo and known check-outs");
134
- setup_menu_entry("Web-Cache", "cachestat",
135
- "View the status of the expensive-page cache");
146
+ if( setup_user ){
147
+ setup_menu_entry("Web-Cache", "cachestat",
148
+ "View the status of the expensive-page cache");
149
+ }
136150
setup_menu_entry("Logo", "setup_logo",
137151
"Change the logo and background images for the server");
138152
setup_menu_entry("Shunned", "shun",
139153
"Show artifacts that are shunned by this repository");
140154
setup_menu_entry("Artifact Receipts Log", "rcvfromlist",
@@ -149,14 +163,16 @@
149163
"Show all unversioned files held");
150164
setup_menu_entry("Stats", "stat",
151165
"Repository Status Reports");
152166
setup_menu_entry("Sitemap", "sitemap",
153167
"Links to miscellaneous pages");
154
- setup_menu_entry("SQL", "admin_sql",
155
- "Enter raw SQL commands");
156
- setup_menu_entry("TH1", "admin_th1",
157
- "Enter raw TH1 commands");
168
+ if( setup_user ){
169
+ setup_menu_entry("SQL", "admin_sql",
170
+ "Enter raw SQL commands");
171
+ setup_menu_entry("TH1", "admin_th1",
172
+ "Enter raw TH1 commands");
173
+ }
158174
@ </table>
159175
160176
style_footer();
161177
}
162178
@@ -291,11 +307,11 @@
291307
292308
293309
/*
294310
** WEBPAGE: setup_access
295311
**
296
-** The access-control settings page. Requires Admin privileges.
312
+** The access-control settings page. Requires Setup privileges.
297313
*/
298314
void setup_access(void){
299315
login_check_credentials();
300316
if( !g.perm.Setup ){
301317
login_needed(0);
@@ -647,11 +663,11 @@
647663
"2", "YYYY-MM-DD HH:MM",
648664
"3", "YYMMDD HH:MM",
649665
"4", "(off)"
650666
};
651667
login_check_credentials();
652
- if( !g.perm.Setup ){
668
+ if( !g.perm.Admin ){
653669
login_needed(0);
654670
return;
655671
}
656672
657673
style_header("Timeline Display Preferences");
@@ -726,11 +742,11 @@
726742
727743
/*
728744
** WEBPAGE: setup_settings
729745
**
730746
** Change or view miscellaneous settings. Part of the
731
-** Admin pages requiring Admin privileges.
747
+** /setup pages requiring Setup privileges.
732748
*/
733749
void setup_settings(void){
734750
int nSetting;
735751
int i;
736752
Setting const *pSet;
@@ -813,11 +829,11 @@
813829
}
814830
815831
/*
816832
** WEBPAGE: setup_config
817833
**
818
-** The "Admin/Configuration" page. Requires Admin privilege.
834
+** The "Admin/Configuration" page. Requires Setup privilege.
819835
*/
820836
void setup_config(void){
821837
login_check_credentials();
822838
if( !g.perm.Setup ){
823839
login_needed(0);
@@ -935,11 +951,11 @@
935951
**
936952
** Admin page for setting up moderation of tickets and wiki.
937953
*/
938954
void setup_modreq(void){
939955
login_check_credentials();
940
- if( !g.perm.Setup ){
956
+ if( !g.perm.Admin ){
941957
login_needed(0);
942958
return;
943959
}
944960
945961
style_header("Moderator For Wiki And Tickets");
@@ -983,11 +999,11 @@
983999
** Administrative page for configuring and controlling ad units
9841000
** and how they are displayed.
9851001
*/
9861002
void setup_adunit(void){
9871003
login_check_credentials();
988
- if( !g.perm.Setup ){
1004
+ if( !g.perm.Admin ){
9891005
login_needed(0);
9901006
return;
9911007
}
9921008
db_begin_transaction();
9931009
if( P("clear")!=0 && cgi_csrf_safe(1) ){
@@ -1073,11 +1089,11 @@
10731089
}
10741090
if( szBgImg>0 ){
10751091
zBgMime = PD("bgim:mimetype","image/gif");
10761092
}
10771093
login_check_credentials();
1078
- if( !g.perm.Setup ){
1094
+ if( !g.perm.Admin ){
10791095
login_needed(0);
10801096
return;
10811097
}
10821098
db_begin_transaction();
10831099
if( !cgi_csrf_safe(1) ){
@@ -1214,11 +1230,11 @@
12141230
12151231
/*
12161232
** WEBPAGE: admin_sql
12171233
**
12181234
** Run raw SQL commands against the database file using the web interface.
1219
-** Requires Admin privileges.
1235
+** Requires Setup privileges.
12201236
*/
12211237
void sql_page(void){
12221238
const char *zQ;
12231239
int go = P("go")!=0;
12241240
login_check_credentials();
@@ -1405,11 +1421,11 @@
14051421
int limit; /* How many entries to show */
14061422
int ofst; /* Offset to the first entry */
14071423
int fLogEnabled;
14081424
int counter = 0;
14091425
login_check_credentials();
1410
- if( !g.perm.Setup && !g.perm.Admin ){
1426
+ if( !g.perm.Admin ){
14111427
login_needed(0);
14121428
return;
14131429
}
14141430
style_header("Admin Log");
14151431
create_admin_log_table();
@@ -1465,11 +1481,11 @@
14651481
**
14661482
** Configure the search engine. Requires Admin privilege.
14671483
*/
14681484
void page_srchsetup(){
14691485
login_check_credentials();
1470
- if( !g.perm.Setup && !g.perm.Admin ){
1486
+ if( !g.perm.Admin ){
14711487
login_needed(0);
14721488
return;
14731489
}
14741490
style_header("Search Configuration");
14751491
@ <form action="%s(g.zTop)/srchsetup" method="post"><div>
@@ -1589,11 +1605,11 @@
15891605
void page_waliassetup(){
15901606
Stmt q;
15911607
int cnt = 0;
15921608
Blob namelist;
15931609
login_check_credentials();
1594
- if( !g.perm.Setup && !g.perm.Admin ){
1610
+ if( !g.perm.Admin ){
15951611
login_needed(0);
15961612
return;
15971613
}
15981614
style_header("URL Alias Configuration");
15991615
if( P("submit")!=0 ){
16001616
--- src/setup.c
+++ src/setup.c
@@ -59,17 +59,21 @@
59
60
61 /*
62 ** WEBPAGE: setup
63 **
64 ** Main menu for the administrative pages. Requires Admin privileges.
 
 
65 */
66 void setup_page(void){
 
67 login_check_credentials();
68 if( !g.perm.Setup ){
69 login_needed(0);
70 }
 
71
72 style_header("Server Administration");
73
74 /* Make sure the header contains <base href="...">. Issue a warning
75 ** if it does not. */
@@ -95,46 +99,56 @@
95 #endif
96
97 @ <table border="0" cellspacing="3">
98 setup_menu_entry("Users", "setup_ulist",
99 "Grant privileges to individual users.");
100 setup_menu_entry("Access", "setup_access",
101 "Control access settings.");
102 setup_menu_entry("Configuration", "setup_config",
103 "Configure the WWW components of the repository");
 
 
104 setup_menu_entry("Security-Audit", "secaudit0",
105 "Analyze the current configuration for security problems");
106 setup_menu_entry("Settings", "setup_settings",
107 "Web interface to the \"fossil settings\" command");
 
 
108 setup_menu_entry("Timeline", "setup_timeline",
109 "Timeline display preferences");
110 setup_menu_entry("Login-Group", "setup_login_group",
111 "Manage single sign-on between this repository and others"
112 " on the same server");
113 setup_menu_entry("Tickets", "tktsetup",
114 "Configure the trouble-ticketing system for this repository");
 
 
115 setup_menu_entry("Search","srchsetup",
116 "Configure the built-in search engine");
117 setup_menu_entry("URL Aliases", "waliassetup",
118 "Configure URL aliases");
119 setup_menu_entry("Notification", "setup_notification",
120 "Automatic notifications of changes via outbound email");
121 setup_menu_entry("Email-Server", "setup_smtp",
122 "Activate and configure the built-in email server");
123 setup_menu_entry("Transfers", "xfersetup",
124 "Configure the transfer system for this repository");
 
 
125 setup_menu_entry("Skins", "setup_skin",
126 "Select and/or modify the web interface \"skins\"");
127 setup_menu_entry("Moderation", "setup_modreq",
128 "Enable/Disable requiring moderator approval of Wiki and/or Ticket"
129 " changes and attachments.");
130 setup_menu_entry("Ad-Unit", "setup_adunit",
131 "Edit HTML text for an ad unit inserted after the menu bar");
132 setup_menu_entry("URLs & Checkouts", "urllist",
133 "Show URLs used to access this repo and known check-outs");
134 setup_menu_entry("Web-Cache", "cachestat",
135 "View the status of the expensive-page cache");
 
 
136 setup_menu_entry("Logo", "setup_logo",
137 "Change the logo and background images for the server");
138 setup_menu_entry("Shunned", "shun",
139 "Show artifacts that are shunned by this repository");
140 setup_menu_entry("Artifact Receipts Log", "rcvfromlist",
@@ -149,14 +163,16 @@
149 "Show all unversioned files held");
150 setup_menu_entry("Stats", "stat",
151 "Repository Status Reports");
152 setup_menu_entry("Sitemap", "sitemap",
153 "Links to miscellaneous pages");
154 setup_menu_entry("SQL", "admin_sql",
155 "Enter raw SQL commands");
156 setup_menu_entry("TH1", "admin_th1",
157 "Enter raw TH1 commands");
 
 
158 @ </table>
159
160 style_footer();
161 }
162
@@ -291,11 +307,11 @@
291
292
293 /*
294 ** WEBPAGE: setup_access
295 **
296 ** The access-control settings page. Requires Admin privileges.
297 */
298 void setup_access(void){
299 login_check_credentials();
300 if( !g.perm.Setup ){
301 login_needed(0);
@@ -647,11 +663,11 @@
647 "2", "YYYY-MM-DD HH:MM",
648 "3", "YYMMDD HH:MM",
649 "4", "(off)"
650 };
651 login_check_credentials();
652 if( !g.perm.Setup ){
653 login_needed(0);
654 return;
655 }
656
657 style_header("Timeline Display Preferences");
@@ -726,11 +742,11 @@
726
727 /*
728 ** WEBPAGE: setup_settings
729 **
730 ** Change or view miscellaneous settings. Part of the
731 ** Admin pages requiring Admin privileges.
732 */
733 void setup_settings(void){
734 int nSetting;
735 int i;
736 Setting const *pSet;
@@ -813,11 +829,11 @@
813 }
814
815 /*
816 ** WEBPAGE: setup_config
817 **
818 ** The "Admin/Configuration" page. Requires Admin privilege.
819 */
820 void setup_config(void){
821 login_check_credentials();
822 if( !g.perm.Setup ){
823 login_needed(0);
@@ -935,11 +951,11 @@
935 **
936 ** Admin page for setting up moderation of tickets and wiki.
937 */
938 void setup_modreq(void){
939 login_check_credentials();
940 if( !g.perm.Setup ){
941 login_needed(0);
942 return;
943 }
944
945 style_header("Moderator For Wiki And Tickets");
@@ -983,11 +999,11 @@
983 ** Administrative page for configuring and controlling ad units
984 ** and how they are displayed.
985 */
986 void setup_adunit(void){
987 login_check_credentials();
988 if( !g.perm.Setup ){
989 login_needed(0);
990 return;
991 }
992 db_begin_transaction();
993 if( P("clear")!=0 && cgi_csrf_safe(1) ){
@@ -1073,11 +1089,11 @@
1073 }
1074 if( szBgImg>0 ){
1075 zBgMime = PD("bgim:mimetype","image/gif");
1076 }
1077 login_check_credentials();
1078 if( !g.perm.Setup ){
1079 login_needed(0);
1080 return;
1081 }
1082 db_begin_transaction();
1083 if( !cgi_csrf_safe(1) ){
@@ -1214,11 +1230,11 @@
1214
1215 /*
1216 ** WEBPAGE: admin_sql
1217 **
1218 ** Run raw SQL commands against the database file using the web interface.
1219 ** Requires Admin privileges.
1220 */
1221 void sql_page(void){
1222 const char *zQ;
1223 int go = P("go")!=0;
1224 login_check_credentials();
@@ -1405,11 +1421,11 @@
1405 int limit; /* How many entries to show */
1406 int ofst; /* Offset to the first entry */
1407 int fLogEnabled;
1408 int counter = 0;
1409 login_check_credentials();
1410 if( !g.perm.Setup && !g.perm.Admin ){
1411 login_needed(0);
1412 return;
1413 }
1414 style_header("Admin Log");
1415 create_admin_log_table();
@@ -1465,11 +1481,11 @@
1465 **
1466 ** Configure the search engine. Requires Admin privilege.
1467 */
1468 void page_srchsetup(){
1469 login_check_credentials();
1470 if( !g.perm.Setup && !g.perm.Admin ){
1471 login_needed(0);
1472 return;
1473 }
1474 style_header("Search Configuration");
1475 @ <form action="%s(g.zTop)/srchsetup" method="post"><div>
@@ -1589,11 +1605,11 @@
1589 void page_waliassetup(){
1590 Stmt q;
1591 int cnt = 0;
1592 Blob namelist;
1593 login_check_credentials();
1594 if( !g.perm.Setup && !g.perm.Admin ){
1595 login_needed(0);
1596 return;
1597 }
1598 style_header("URL Alias Configuration");
1599 if( P("submit")!=0 ){
1600
--- src/setup.c
+++ src/setup.c
@@ -59,17 +59,21 @@
59
60
61 /*
62 ** WEBPAGE: setup
63 **
64 ** Main menu for the administrative pages. Requires Admin or Setup
65 ** privileges. Links to sub-pages only usable by Setup users are
66 ** shown only to Setup users.
67 */
68 void setup_page(void){
69 int setup_user = 0;
70 login_check_credentials();
71 if( !g.perm.Admin ){
72 login_needed(0);
73 }
74 setup_user = g.perm.Setup;
75
76 style_header("Server Administration");
77
78 /* Make sure the header contains <base href="...">. Issue a warning
79 ** if it does not. */
@@ -95,46 +99,56 @@
99 #endif
100
101 @ <table border="0" cellspacing="3">
102 setup_menu_entry("Users", "setup_ulist",
103 "Grant privileges to individual users.");
104 if( setup_user ){
105 setup_menu_entry("Access", "setup_access",
106 "Control access settings.");
107 setup_menu_entry("Configuration", "setup_config",
108 "Configure the WWW components of the repository");
109 }
110 setup_menu_entry("Security-Audit", "secaudit0",
111 "Analyze the current configuration for security problems");
112 if( setup_user ){
113 setup_menu_entry("Settings", "setup_settings",
114 "Web interface to the \"fossil settings\" command");
115 }
116 setup_menu_entry("Timeline", "setup_timeline",
117 "Timeline display preferences");
118 if( setup_user ){
119 setup_menu_entry("Login-Group", "setup_login_group",
120 "Manage single sign-on between this repository and others"
121 " on the same server");
122 setup_menu_entry("Tickets", "tktsetup",
123 "Configure the trouble-ticketing system for this repository");
124 }
125 setup_menu_entry("Search","srchsetup",
126 "Configure the built-in search engine");
127 setup_menu_entry("URL Aliases", "waliassetup",
128 "Configure URL aliases");
129 if( setup_user ){
130 setup_menu_entry("Notification", "setup_notification",
131 "Automatic notifications of changes via outbound email");
132 setup_menu_entry("Email-Server", "setup_smtp",
133 "Activate and configure the built-in email server");
134 setup_menu_entry("Transfers", "xfersetup",
135 "Configure the transfer system for this repository");
136 }
137 setup_menu_entry("Skins", "setup_skin",
138 "Select and/or modify the web interface \"skins\"");
139 setup_menu_entry("Moderation", "setup_modreq",
140 "Enable/Disable requiring moderator approval of Wiki and/or Ticket"
141 " changes and attachments.");
142 setup_menu_entry("Ad-Unit", "setup_adunit",
143 "Edit HTML text for an ad unit inserted after the menu bar");
144 setup_menu_entry("URLs & Checkouts", "urllist",
145 "Show URLs used to access this repo and known check-outs");
146 if( setup_user ){
147 setup_menu_entry("Web-Cache", "cachestat",
148 "View the status of the expensive-page cache");
149 }
150 setup_menu_entry("Logo", "setup_logo",
151 "Change the logo and background images for the server");
152 setup_menu_entry("Shunned", "shun",
153 "Show artifacts that are shunned by this repository");
154 setup_menu_entry("Artifact Receipts Log", "rcvfromlist",
@@ -149,14 +163,16 @@
163 "Show all unversioned files held");
164 setup_menu_entry("Stats", "stat",
165 "Repository Status Reports");
166 setup_menu_entry("Sitemap", "sitemap",
167 "Links to miscellaneous pages");
168 if( setup_user ){
169 setup_menu_entry("SQL", "admin_sql",
170 "Enter raw SQL commands");
171 setup_menu_entry("TH1", "admin_th1",
172 "Enter raw TH1 commands");
173 }
174 @ </table>
175
176 style_footer();
177 }
178
@@ -291,11 +307,11 @@
307
308
309 /*
310 ** WEBPAGE: setup_access
311 **
312 ** The access-control settings page. Requires Setup privileges.
313 */
314 void setup_access(void){
315 login_check_credentials();
316 if( !g.perm.Setup ){
317 login_needed(0);
@@ -647,11 +663,11 @@
663 "2", "YYYY-MM-DD HH:MM",
664 "3", "YYMMDD HH:MM",
665 "4", "(off)"
666 };
667 login_check_credentials();
668 if( !g.perm.Admin ){
669 login_needed(0);
670 return;
671 }
672
673 style_header("Timeline Display Preferences");
@@ -726,11 +742,11 @@
742
743 /*
744 ** WEBPAGE: setup_settings
745 **
746 ** Change or view miscellaneous settings. Part of the
747 ** /setup pages requiring Setup privileges.
748 */
749 void setup_settings(void){
750 int nSetting;
751 int i;
752 Setting const *pSet;
@@ -813,11 +829,11 @@
829 }
830
831 /*
832 ** WEBPAGE: setup_config
833 **
834 ** The "Admin/Configuration" page. Requires Setup privilege.
835 */
836 void setup_config(void){
837 login_check_credentials();
838 if( !g.perm.Setup ){
839 login_needed(0);
@@ -935,11 +951,11 @@
951 **
952 ** Admin page for setting up moderation of tickets and wiki.
953 */
954 void setup_modreq(void){
955 login_check_credentials();
956 if( !g.perm.Admin ){
957 login_needed(0);
958 return;
959 }
960
961 style_header("Moderator For Wiki And Tickets");
@@ -983,11 +999,11 @@
999 ** Administrative page for configuring and controlling ad units
1000 ** and how they are displayed.
1001 */
1002 void setup_adunit(void){
1003 login_check_credentials();
1004 if( !g.perm.Admin ){
1005 login_needed(0);
1006 return;
1007 }
1008 db_begin_transaction();
1009 if( P("clear")!=0 && cgi_csrf_safe(1) ){
@@ -1073,11 +1089,11 @@
1089 }
1090 if( szBgImg>0 ){
1091 zBgMime = PD("bgim:mimetype","image/gif");
1092 }
1093 login_check_credentials();
1094 if( !g.perm.Admin ){
1095 login_needed(0);
1096 return;
1097 }
1098 db_begin_transaction();
1099 if( !cgi_csrf_safe(1) ){
@@ -1214,11 +1230,11 @@
1230
1231 /*
1232 ** WEBPAGE: admin_sql
1233 **
1234 ** Run raw SQL commands against the database file using the web interface.
1235 ** Requires Setup privileges.
1236 */
1237 void sql_page(void){
1238 const char *zQ;
1239 int go = P("go")!=0;
1240 login_check_credentials();
@@ -1405,11 +1421,11 @@
1421 int limit; /* How many entries to show */
1422 int ofst; /* Offset to the first entry */
1423 int fLogEnabled;
1424 int counter = 0;
1425 login_check_credentials();
1426 if( !g.perm.Admin ){
1427 login_needed(0);
1428 return;
1429 }
1430 style_header("Admin Log");
1431 create_admin_log_table();
@@ -1465,11 +1481,11 @@
1481 **
1482 ** Configure the search engine. Requires Admin privilege.
1483 */
1484 void page_srchsetup(){
1485 login_check_credentials();
1486 if( !g.perm.Admin ){
1487 login_needed(0);
1488 return;
1489 }
1490 style_header("Search Configuration");
1491 @ <form action="%s(g.zTop)/srchsetup" method="post"><div>
@@ -1589,11 +1605,11 @@
1605 void page_waliassetup(){
1606 Stmt q;
1607 int cnt = 0;
1608 Blob namelist;
1609 login_check_credentials();
1610 if( !g.perm.Admin ){
1611 login_needed(0);
1612 return;
1613 }
1614 style_header("URL Alias Configuration");
1615 if( P("submit")!=0 ){
1616
+79 -33
--- src/shell.c
+++ src/shell.c
@@ -2126,11 +2126,22 @@
21262126
#endif
21272127
#include <time.h>
21282128
#include <errno.h>
21292129
21302130
2131
+/*
2132
+** Structure of the fsdir() table-valued function
2133
+*/
2134
+ /* 0 1 2 3 4 5 */
21312135
#define FSDIR_SCHEMA "(name,mode,mtime,data,path HIDDEN,dir HIDDEN)"
2136
+#define FSDIR_COLUMN_NAME 0 /* Name of the file */
2137
+#define FSDIR_COLUMN_MODE 1 /* Access mode */
2138
+#define FSDIR_COLUMN_MTIME 2 /* Last modification time */
2139
+#define FSDIR_COLUMN_DATA 3 /* File content */
2140
+#define FSDIR_COLUMN_PATH 4 /* Path to top of search */
2141
+#define FSDIR_COLUMN_DIR 5 /* Path is relative to this directory */
2142
+
21322143
21332144
/*
21342145
** Set the result stored by context ctx to a blob containing the
21352146
** contents of file zName.
21362147
*/
@@ -2715,24 +2726,24 @@
27152726
sqlite3_context *ctx, /* First argument to sqlite3_result_...() */
27162727
int i /* Which column to return */
27172728
){
27182729
fsdir_cursor *pCur = (fsdir_cursor*)cur;
27192730
switch( i ){
2720
- case 0: { /* name */
2731
+ case FSDIR_COLUMN_NAME: {
27212732
sqlite3_result_text(ctx, &pCur->zPath[pCur->nBase], -1, SQLITE_TRANSIENT);
27222733
break;
27232734
}
27242735
2725
- case 1: /* mode */
2736
+ case FSDIR_COLUMN_MODE:
27262737
sqlite3_result_int64(ctx, pCur->sStat.st_mode);
27272738
break;
27282739
2729
- case 2: /* mtime */
2740
+ case FSDIR_COLUMN_MTIME:
27302741
sqlite3_result_int64(ctx, pCur->sStat.st_mtime);
27312742
break;
27322743
2733
- case 3: { /* data */
2744
+ case FSDIR_COLUMN_DATA: {
27342745
mode_t m = pCur->sStat.st_mode;
27352746
if( S_ISDIR(m) ){
27362747
sqlite3_result_null(ctx);
27372748
#if !defined(_WIN32) && !defined(WIN32)
27382749
}else if( S_ISLNK(m) ){
@@ -2758,10 +2769,16 @@
27582769
#endif
27592770
}else{
27602771
readFileContents(ctx, pCur->zPath);
27612772
}
27622773
}
2774
+ case FSDIR_COLUMN_PATH:
2775
+ default: {
2776
+ /* The FSDIR_COLUMN_PATH and FSDIR_COLUMN_DIR are input parameters.
2777
+ ** always return their values as NULL */
2778
+ break;
2779
+ }
27632780
}
27642781
return SQLITE_OK;
27652782
}
27662783
27672784
/*
@@ -2784,10 +2801,13 @@
27842801
return (pCur->zPath==0);
27852802
}
27862803
27872804
/*
27882805
** xFilter callback.
2806
+**
2807
+** idxNum==1 PATH parameter only
2808
+** idxNum==2 Both PATH and DIR supplied
27892809
*/
27902810
static int fsdirFilter(
27912811
sqlite3_vtab_cursor *cur,
27922812
int idxNum, const char *idxStr,
27932813
int argc, sqlite3_value **argv
@@ -2836,44 +2856,67 @@
28362856
** plan.
28372857
**
28382858
** In this implementation idxNum is used to represent the
28392859
** query plan. idxStr is unused.
28402860
**
2841
-** The query plan is represented by bits in idxNum:
2861
+** The query plan is represented by values of idxNum:
28422862
**
2843
-** (1) start = $value -- constraint exists
2844
-** (2) stop = $value -- constraint exists
2845
-** (4) step = $value -- constraint exists
2846
-** (8) output in descending order
2863
+** (1) The path value is supplied by argv[0]
2864
+** (2) Path is in argv[0] and dir is in argv[1]
28472865
*/
28482866
static int fsdirBestIndex(
28492867
sqlite3_vtab *tab,
28502868
sqlite3_index_info *pIdxInfo
28512869
){
28522870
int i; /* Loop over constraints */
2853
- int idx4 = -1;
2854
- int idx5 = -1;
2871
+ int idxPath = -1; /* Index in pIdxInfo->aConstraint of PATH= */
2872
+ int idxDir = -1; /* Index in pIdxInfo->aConstraint of DIR= */
2873
+ int seenPath = 0; /* True if an unusable PATH= constraint is seen */
2874
+ int seenDir = 0; /* True if an unusable DIR= constraint is seen */
28552875
const struct sqlite3_index_constraint *pConstraint;
28562876
28572877
(void)tab;
28582878
pConstraint = pIdxInfo->aConstraint;
28592879
for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
2860
- if( pConstraint->usable==0 ) continue;
28612880
if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
2862
- if( pConstraint->iColumn==4 ) idx4 = i;
2863
- if( pConstraint->iColumn==5 ) idx5 = i;
2881
+ switch( pConstraint->iColumn ){
2882
+ case FSDIR_COLUMN_PATH: {
2883
+ if( pConstraint->usable ){
2884
+ idxPath = i;
2885
+ seenPath = 0;
2886
+ }else if( idxPath<0 ){
2887
+ seenPath = 1;
2888
+ }
2889
+ break;
2890
+ }
2891
+ case FSDIR_COLUMN_DIR: {
2892
+ if( pConstraint->usable ){
2893
+ idxDir = i;
2894
+ seenDir = 0;
2895
+ }else if( idxDir<0 ){
2896
+ seenDir = 1;
2897
+ }
2898
+ break;
2899
+ }
2900
+ }
2901
+ }
2902
+ if( seenPath || seenDir ){
2903
+ /* If input parameters are unusable, disallow this plan */
2904
+ return SQLITE_CONSTRAINT;
28642905
}
28652906
2866
- if( idx4<0 ){
2907
+ if( idxPath<0 ){
28672908
pIdxInfo->idxNum = 0;
2868
- pIdxInfo->estimatedCost = (double)(((sqlite3_int64)1) << 50);
2909
+ /* The pIdxInfo->estimatedCost should have been initialized to a huge
2910
+ ** number. Leave it unchanged. */
2911
+ pIdxInfo->estimatedRows = 0x7fffffff;
28692912
}else{
2870
- pIdxInfo->aConstraintUsage[idx4].omit = 1;
2871
- pIdxInfo->aConstraintUsage[idx4].argvIndex = 1;
2872
- if( idx5>=0 ){
2873
- pIdxInfo->aConstraintUsage[idx5].omit = 1;
2874
- pIdxInfo->aConstraintUsage[idx5].argvIndex = 2;
2913
+ pIdxInfo->aConstraintUsage[idxPath].omit = 1;
2914
+ pIdxInfo->aConstraintUsage[idxPath].argvIndex = 1;
2915
+ if( idxDir>=0 ){
2916
+ pIdxInfo->aConstraintUsage[idxDir].omit = 1;
2917
+ pIdxInfo->aConstraintUsage[idxDir].argvIndex = 2;
28752918
pIdxInfo->idxNum = 2;
28762919
pIdxInfo->estimatedCost = 10.0;
28772920
}else{
28782921
pIdxInfo->idxNum = 1;
28792922
pIdxInfo->estimatedCost = 100.0;
@@ -5315,29 +5358,30 @@
53155358
static int zipfileBestIndex(
53165359
sqlite3_vtab *tab,
53175360
sqlite3_index_info *pIdxInfo
53185361
){
53195362
int i;
5363
+ int idx = -1;
5364
+ int unusable = 0;
53205365
53215366
for(i=0; i<pIdxInfo->nConstraint; i++){
53225367
const struct sqlite3_index_constraint *pCons = &pIdxInfo->aConstraint[i];
5323
- if( pCons->usable==0 ) continue;
5324
- if( pCons->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
53255368
if( pCons->iColumn!=ZIPFILE_F_COLUMN_IDX ) continue;
5326
- break;
5369
+ if( pCons->usable==0 ){
5370
+ unusable = 1;
5371
+ }else if( pCons->op==SQLITE_INDEX_CONSTRAINT_EQ ){
5372
+ idx = i;
5373
+ }
53275374
}
5328
-
5329
- if( i<pIdxInfo->nConstraint ){
5330
- pIdxInfo->aConstraintUsage[i].argvIndex = 1;
5331
- pIdxInfo->aConstraintUsage[i].omit = 1;
5375
+ if( idx>=0 ){
5376
+ pIdxInfo->aConstraintUsage[idx].argvIndex = 1;
5377
+ pIdxInfo->aConstraintUsage[idx].omit = 1;
53325378
pIdxInfo->estimatedCost = 1000.0;
53335379
pIdxInfo->idxNum = 1;
5334
- }else{
5335
- pIdxInfo->estimatedCost = (double)(((sqlite3_int64)1) << 50);
5336
- pIdxInfo->idxNum = 0;
5380
+ }else if( unusable ){
5381
+ return SQLITE_CONSTRAINT;
53375382
}
5338
-
53395383
return SQLITE_OK;
53405384
}
53415385
53425386
static ZipfileEntry *zipfileNewEntry(const char *zPath){
53435387
ZipfileEntry *pNew;
@@ -15179,10 +15223,11 @@
1517915223
/*{ "benign_malloc_hooks",SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS, "" },*/
1518015224
/*{ "bitvec_test", SQLITE_TESTCTRL_BITVEC_TEST, "" },*/
1518115225
{ "byteorder", SQLITE_TESTCTRL_BYTEORDER, "" },
1518215226
/*{ "fault_install", SQLITE_TESTCTRL_FAULT_INSTALL, "" }, */
1518315227
{ "imposter", SQLITE_TESTCTRL_IMPOSTER, "SCHEMA ON/OFF ROOTPAGE"},
15228
+ { "internal_functions", SQLITE_TESTCTRL_INTERNAL_FUNCTIONS, "BOOLEAN" },
1518415229
{ "localtime_fault", SQLITE_TESTCTRL_LOCALTIME_FAULT,"BOOLEAN" },
1518515230
{ "never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT, "BOOLEAN" },
1518615231
{ "optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS, "DISABLE-MASK" },
1518715232
#ifdef YYCOVERAGE
1518815233
{ "parser_coverage", SQLITE_TESTCTRL_PARSER_COVERAGE, "" },
@@ -15273,10 +15318,11 @@
1527315318
break;
1527415319
1527515320
/* sqlite3_test_control(int, int) */
1527615321
case SQLITE_TESTCTRL_ASSERT:
1527715322
case SQLITE_TESTCTRL_ALWAYS:
15323
+ case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS:
1527815324
if( nArg==3 ){
1527915325
int opt = booleanValue(azArg[2]);
1528015326
rc2 = sqlite3_test_control(testctrl, opt);
1528115327
isOk = 1;
1528215328
}
@@ -15567,11 +15613,11 @@
1556715613
** the shell is compiled with SQLITE_OMIT_COMPLETE. The default assumes
1556815614
** any arbitrary text is a complete SQL statement. This is not very
1556915615
** user-friendly, but it does seem to work.
1557015616
*/
1557115617
#ifdef SQLITE_OMIT_COMPLETE
15572
-int sqlite3_complete(const char *zSql){ return 1; }
15618
+#define sqlite3_complete(x) 1
1557315619
#endif
1557415620
1557515621
/*
1557615622
** Return true if zSql is a complete SQL statement. Return false if it
1557715623
** ends in the middle of a string literal or C-style comment.
1557815624
--- src/shell.c
+++ src/shell.c
@@ -2126,11 +2126,22 @@
2126 #endif
2127 #include <time.h>
2128 #include <errno.h>
2129
2130
 
 
 
 
2131 #define FSDIR_SCHEMA "(name,mode,mtime,data,path HIDDEN,dir HIDDEN)"
 
 
 
 
 
 
 
2132
2133 /*
2134 ** Set the result stored by context ctx to a blob containing the
2135 ** contents of file zName.
2136 */
@@ -2715,24 +2726,24 @@
2715 sqlite3_context *ctx, /* First argument to sqlite3_result_...() */
2716 int i /* Which column to return */
2717 ){
2718 fsdir_cursor *pCur = (fsdir_cursor*)cur;
2719 switch( i ){
2720 case 0: { /* name */
2721 sqlite3_result_text(ctx, &pCur->zPath[pCur->nBase], -1, SQLITE_TRANSIENT);
2722 break;
2723 }
2724
2725 case 1: /* mode */
2726 sqlite3_result_int64(ctx, pCur->sStat.st_mode);
2727 break;
2728
2729 case 2: /* mtime */
2730 sqlite3_result_int64(ctx, pCur->sStat.st_mtime);
2731 break;
2732
2733 case 3: { /* data */
2734 mode_t m = pCur->sStat.st_mode;
2735 if( S_ISDIR(m) ){
2736 sqlite3_result_null(ctx);
2737 #if !defined(_WIN32) && !defined(WIN32)
2738 }else if( S_ISLNK(m) ){
@@ -2758,10 +2769,16 @@
2758 #endif
2759 }else{
2760 readFileContents(ctx, pCur->zPath);
2761 }
2762 }
 
 
 
 
 
 
2763 }
2764 return SQLITE_OK;
2765 }
2766
2767 /*
@@ -2784,10 +2801,13 @@
2784 return (pCur->zPath==0);
2785 }
2786
2787 /*
2788 ** xFilter callback.
 
 
 
2789 */
2790 static int fsdirFilter(
2791 sqlite3_vtab_cursor *cur,
2792 int idxNum, const char *idxStr,
2793 int argc, sqlite3_value **argv
@@ -2836,44 +2856,67 @@
2836 ** plan.
2837 **
2838 ** In this implementation idxNum is used to represent the
2839 ** query plan. idxStr is unused.
2840 **
2841 ** The query plan is represented by bits in idxNum:
2842 **
2843 ** (1) start = $value -- constraint exists
2844 ** (2) stop = $value -- constraint exists
2845 ** (4) step = $value -- constraint exists
2846 ** (8) output in descending order
2847 */
2848 static int fsdirBestIndex(
2849 sqlite3_vtab *tab,
2850 sqlite3_index_info *pIdxInfo
2851 ){
2852 int i; /* Loop over constraints */
2853 int idx4 = -1;
2854 int idx5 = -1;
 
 
2855 const struct sqlite3_index_constraint *pConstraint;
2856
2857 (void)tab;
2858 pConstraint = pIdxInfo->aConstraint;
2859 for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
2860 if( pConstraint->usable==0 ) continue;
2861 if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
2862 if( pConstraint->iColumn==4 ) idx4 = i;
2863 if( pConstraint->iColumn==5 ) idx5 = i;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2864 }
2865
2866 if( idx4<0 ){
2867 pIdxInfo->idxNum = 0;
2868 pIdxInfo->estimatedCost = (double)(((sqlite3_int64)1) << 50);
 
 
2869 }else{
2870 pIdxInfo->aConstraintUsage[idx4].omit = 1;
2871 pIdxInfo->aConstraintUsage[idx4].argvIndex = 1;
2872 if( idx5>=0 ){
2873 pIdxInfo->aConstraintUsage[idx5].omit = 1;
2874 pIdxInfo->aConstraintUsage[idx5].argvIndex = 2;
2875 pIdxInfo->idxNum = 2;
2876 pIdxInfo->estimatedCost = 10.0;
2877 }else{
2878 pIdxInfo->idxNum = 1;
2879 pIdxInfo->estimatedCost = 100.0;
@@ -5315,29 +5358,30 @@
5315 static int zipfileBestIndex(
5316 sqlite3_vtab *tab,
5317 sqlite3_index_info *pIdxInfo
5318 ){
5319 int i;
 
 
5320
5321 for(i=0; i<pIdxInfo->nConstraint; i++){
5322 const struct sqlite3_index_constraint *pCons = &pIdxInfo->aConstraint[i];
5323 if( pCons->usable==0 ) continue;
5324 if( pCons->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
5325 if( pCons->iColumn!=ZIPFILE_F_COLUMN_IDX ) continue;
5326 break;
 
 
 
 
5327 }
5328
5329 if( i<pIdxInfo->nConstraint ){
5330 pIdxInfo->aConstraintUsage[i].argvIndex = 1;
5331 pIdxInfo->aConstraintUsage[i].omit = 1;
5332 pIdxInfo->estimatedCost = 1000.0;
5333 pIdxInfo->idxNum = 1;
5334 }else{
5335 pIdxInfo->estimatedCost = (double)(((sqlite3_int64)1) << 50);
5336 pIdxInfo->idxNum = 0;
5337 }
5338
5339 return SQLITE_OK;
5340 }
5341
5342 static ZipfileEntry *zipfileNewEntry(const char *zPath){
5343 ZipfileEntry *pNew;
@@ -15179,10 +15223,11 @@
15179 /*{ "benign_malloc_hooks",SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS, "" },*/
15180 /*{ "bitvec_test", SQLITE_TESTCTRL_BITVEC_TEST, "" },*/
15181 { "byteorder", SQLITE_TESTCTRL_BYTEORDER, "" },
15182 /*{ "fault_install", SQLITE_TESTCTRL_FAULT_INSTALL, "" }, */
15183 { "imposter", SQLITE_TESTCTRL_IMPOSTER, "SCHEMA ON/OFF ROOTPAGE"},
 
15184 { "localtime_fault", SQLITE_TESTCTRL_LOCALTIME_FAULT,"BOOLEAN" },
15185 { "never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT, "BOOLEAN" },
15186 { "optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS, "DISABLE-MASK" },
15187 #ifdef YYCOVERAGE
15188 { "parser_coverage", SQLITE_TESTCTRL_PARSER_COVERAGE, "" },
@@ -15273,10 +15318,11 @@
15273 break;
15274
15275 /* sqlite3_test_control(int, int) */
15276 case SQLITE_TESTCTRL_ASSERT:
15277 case SQLITE_TESTCTRL_ALWAYS:
 
15278 if( nArg==3 ){
15279 int opt = booleanValue(azArg[2]);
15280 rc2 = sqlite3_test_control(testctrl, opt);
15281 isOk = 1;
15282 }
@@ -15567,11 +15613,11 @@
15567 ** the shell is compiled with SQLITE_OMIT_COMPLETE. The default assumes
15568 ** any arbitrary text is a complete SQL statement. This is not very
15569 ** user-friendly, but it does seem to work.
15570 */
15571 #ifdef SQLITE_OMIT_COMPLETE
15572 int sqlite3_complete(const char *zSql){ return 1; }
15573 #endif
15574
15575 /*
15576 ** Return true if zSql is a complete SQL statement. Return false if it
15577 ** ends in the middle of a string literal or C-style comment.
15578
--- src/shell.c
+++ src/shell.c
@@ -2126,11 +2126,22 @@
2126 #endif
2127 #include <time.h>
2128 #include <errno.h>
2129
2130
2131 /*
2132 ** Structure of the fsdir() table-valued function
2133 */
2134 /* 0 1 2 3 4 5 */
2135 #define FSDIR_SCHEMA "(name,mode,mtime,data,path HIDDEN,dir HIDDEN)"
2136 #define FSDIR_COLUMN_NAME 0 /* Name of the file */
2137 #define FSDIR_COLUMN_MODE 1 /* Access mode */
2138 #define FSDIR_COLUMN_MTIME 2 /* Last modification time */
2139 #define FSDIR_COLUMN_DATA 3 /* File content */
2140 #define FSDIR_COLUMN_PATH 4 /* Path to top of search */
2141 #define FSDIR_COLUMN_DIR 5 /* Path is relative to this directory */
2142
2143
2144 /*
2145 ** Set the result stored by context ctx to a blob containing the
2146 ** contents of file zName.
2147 */
@@ -2715,24 +2726,24 @@
2726 sqlite3_context *ctx, /* First argument to sqlite3_result_...() */
2727 int i /* Which column to return */
2728 ){
2729 fsdir_cursor *pCur = (fsdir_cursor*)cur;
2730 switch( i ){
2731 case FSDIR_COLUMN_NAME: {
2732 sqlite3_result_text(ctx, &pCur->zPath[pCur->nBase], -1, SQLITE_TRANSIENT);
2733 break;
2734 }
2735
2736 case FSDIR_COLUMN_MODE:
2737 sqlite3_result_int64(ctx, pCur->sStat.st_mode);
2738 break;
2739
2740 case FSDIR_COLUMN_MTIME:
2741 sqlite3_result_int64(ctx, pCur->sStat.st_mtime);
2742 break;
2743
2744 case FSDIR_COLUMN_DATA: {
2745 mode_t m = pCur->sStat.st_mode;
2746 if( S_ISDIR(m) ){
2747 sqlite3_result_null(ctx);
2748 #if !defined(_WIN32) && !defined(WIN32)
2749 }else if( S_ISLNK(m) ){
@@ -2758,10 +2769,16 @@
2769 #endif
2770 }else{
2771 readFileContents(ctx, pCur->zPath);
2772 }
2773 }
2774 case FSDIR_COLUMN_PATH:
2775 default: {
2776 /* The FSDIR_COLUMN_PATH and FSDIR_COLUMN_DIR are input parameters.
2777 ** always return their values as NULL */
2778 break;
2779 }
2780 }
2781 return SQLITE_OK;
2782 }
2783
2784 /*
@@ -2784,10 +2801,13 @@
2801 return (pCur->zPath==0);
2802 }
2803
2804 /*
2805 ** xFilter callback.
2806 **
2807 ** idxNum==1 PATH parameter only
2808 ** idxNum==2 Both PATH and DIR supplied
2809 */
2810 static int fsdirFilter(
2811 sqlite3_vtab_cursor *cur,
2812 int idxNum, const char *idxStr,
2813 int argc, sqlite3_value **argv
@@ -2836,44 +2856,67 @@
2856 ** plan.
2857 **
2858 ** In this implementation idxNum is used to represent the
2859 ** query plan. idxStr is unused.
2860 **
2861 ** The query plan is represented by values of idxNum:
2862 **
2863 ** (1) The path value is supplied by argv[0]
2864 ** (2) Path is in argv[0] and dir is in argv[1]
 
 
2865 */
2866 static int fsdirBestIndex(
2867 sqlite3_vtab *tab,
2868 sqlite3_index_info *pIdxInfo
2869 ){
2870 int i; /* Loop over constraints */
2871 int idxPath = -1; /* Index in pIdxInfo->aConstraint of PATH= */
2872 int idxDir = -1; /* Index in pIdxInfo->aConstraint of DIR= */
2873 int seenPath = 0; /* True if an unusable PATH= constraint is seen */
2874 int seenDir = 0; /* True if an unusable DIR= constraint is seen */
2875 const struct sqlite3_index_constraint *pConstraint;
2876
2877 (void)tab;
2878 pConstraint = pIdxInfo->aConstraint;
2879 for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
 
2880 if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
2881 switch( pConstraint->iColumn ){
2882 case FSDIR_COLUMN_PATH: {
2883 if( pConstraint->usable ){
2884 idxPath = i;
2885 seenPath = 0;
2886 }else if( idxPath<0 ){
2887 seenPath = 1;
2888 }
2889 break;
2890 }
2891 case FSDIR_COLUMN_DIR: {
2892 if( pConstraint->usable ){
2893 idxDir = i;
2894 seenDir = 0;
2895 }else if( idxDir<0 ){
2896 seenDir = 1;
2897 }
2898 break;
2899 }
2900 }
2901 }
2902 if( seenPath || seenDir ){
2903 /* If input parameters are unusable, disallow this plan */
2904 return SQLITE_CONSTRAINT;
2905 }
2906
2907 if( idxPath<0 ){
2908 pIdxInfo->idxNum = 0;
2909 /* The pIdxInfo->estimatedCost should have been initialized to a huge
2910 ** number. Leave it unchanged. */
2911 pIdxInfo->estimatedRows = 0x7fffffff;
2912 }else{
2913 pIdxInfo->aConstraintUsage[idxPath].omit = 1;
2914 pIdxInfo->aConstraintUsage[idxPath].argvIndex = 1;
2915 if( idxDir>=0 ){
2916 pIdxInfo->aConstraintUsage[idxDir].omit = 1;
2917 pIdxInfo->aConstraintUsage[idxDir].argvIndex = 2;
2918 pIdxInfo->idxNum = 2;
2919 pIdxInfo->estimatedCost = 10.0;
2920 }else{
2921 pIdxInfo->idxNum = 1;
2922 pIdxInfo->estimatedCost = 100.0;
@@ -5315,29 +5358,30 @@
5358 static int zipfileBestIndex(
5359 sqlite3_vtab *tab,
5360 sqlite3_index_info *pIdxInfo
5361 ){
5362 int i;
5363 int idx = -1;
5364 int unusable = 0;
5365
5366 for(i=0; i<pIdxInfo->nConstraint; i++){
5367 const struct sqlite3_index_constraint *pCons = &pIdxInfo->aConstraint[i];
 
 
5368 if( pCons->iColumn!=ZIPFILE_F_COLUMN_IDX ) continue;
5369 if( pCons->usable==0 ){
5370 unusable = 1;
5371 }else if( pCons->op==SQLITE_INDEX_CONSTRAINT_EQ ){
5372 idx = i;
5373 }
5374 }
5375 if( idx>=0 ){
5376 pIdxInfo->aConstraintUsage[idx].argvIndex = 1;
5377 pIdxInfo->aConstraintUsage[idx].omit = 1;
 
5378 pIdxInfo->estimatedCost = 1000.0;
5379 pIdxInfo->idxNum = 1;
5380 }else if( unusable ){
5381 return SQLITE_CONSTRAINT;
 
5382 }
 
5383 return SQLITE_OK;
5384 }
5385
5386 static ZipfileEntry *zipfileNewEntry(const char *zPath){
5387 ZipfileEntry *pNew;
@@ -15179,10 +15223,11 @@
15223 /*{ "benign_malloc_hooks",SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS, "" },*/
15224 /*{ "bitvec_test", SQLITE_TESTCTRL_BITVEC_TEST, "" },*/
15225 { "byteorder", SQLITE_TESTCTRL_BYTEORDER, "" },
15226 /*{ "fault_install", SQLITE_TESTCTRL_FAULT_INSTALL, "" }, */
15227 { "imposter", SQLITE_TESTCTRL_IMPOSTER, "SCHEMA ON/OFF ROOTPAGE"},
15228 { "internal_functions", SQLITE_TESTCTRL_INTERNAL_FUNCTIONS, "BOOLEAN" },
15229 { "localtime_fault", SQLITE_TESTCTRL_LOCALTIME_FAULT,"BOOLEAN" },
15230 { "never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT, "BOOLEAN" },
15231 { "optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS, "DISABLE-MASK" },
15232 #ifdef YYCOVERAGE
15233 { "parser_coverage", SQLITE_TESTCTRL_PARSER_COVERAGE, "" },
@@ -15273,10 +15318,11 @@
15318 break;
15319
15320 /* sqlite3_test_control(int, int) */
15321 case SQLITE_TESTCTRL_ASSERT:
15322 case SQLITE_TESTCTRL_ALWAYS:
15323 case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS:
15324 if( nArg==3 ){
15325 int opt = booleanValue(azArg[2]);
15326 rc2 = sqlite3_test_control(testctrl, opt);
15327 isOk = 1;
15328 }
@@ -15567,11 +15613,11 @@
15613 ** the shell is compiled with SQLITE_OMIT_COMPLETE. The default assumes
15614 ** any arbitrary text is a complete SQL statement. This is not very
15615 ** user-friendly, but it does seem to work.
15616 */
15617 #ifdef SQLITE_OMIT_COMPLETE
15618 #define sqlite3_complete(x) 1
15619 #endif
15620
15621 /*
15622 ** Return true if zSql is a complete SQL statement. Return false if it
15623 ** ends in the middle of a string literal or C-style comment.
15624
+6 -6
--- src/skins.c
+++ src/skins.c
@@ -459,11 +459,11 @@
459459
Stmt q;
460460
int seenCurrent = 0;
461461
int once;
462462
463463
login_check_credentials();
464
- if( !g.perm.Setup ){
464
+ if( !g.perm.Admin ){
465465
login_needed(0);
466466
return;
467467
}
468468
db_begin_transaction();
469469
zCurrent = getSkin(0);
@@ -693,11 +693,11 @@
693693
694694
/*
695695
** WEBPAGE: setup_skinedit
696696
**
697697
** Edit aspects of a skin determined by the w= query parameter.
698
-** Requires Setup privileges.
698
+** Requires Admin or Setup privileges.
699699
**
700700
** w=NUM -- 0=CSS, 1=footer, 2=header, 3=details, 4=js
701701
** sk=NUM -- the draft skin number
702702
*/
703703
void setup_skinedit(void){
@@ -730,11 +730,11 @@
730730
/* Figure out which skin we are editing */
731731
iSkin = atoi(PD("sk","1"));
732732
if( iSkin<1 || iSkin>9 ) iSkin = 1;
733733
734734
/* Check that the user is authorized to edit this skin. */
735
- if( !g.perm.Setup ){
735
+ if( !g.perm.Admin ){
736736
char *zAllowedEditors = "";
737737
Glob *pAllowedEditors;
738738
int isMatch = 0;
739739
if( login_is_individual() ){
740740
zAllowedEditors = db_get_mprintf("", "draft%d-users", iSkin);
@@ -903,11 +903,11 @@
903903
if( !login_is_individual() ){
904904
login_needed(0);
905905
return;
906906
}
907907
zAllowedEditors = db_get_mprintf("", "draft%d-users", iSkin);
908
- if( g.perm.Setup ){
908
+ if( g.perm.Admin ){
909909
isSetup = isEditor = 1;
910910
}else{
911911
Glob *pAllowedEditors;
912912
isSetup = isEditor = 0;
913913
if( zAllowedEditors[0] ){
@@ -1057,11 +1057,11 @@
10571057
@ a production-ready skin.
10581058
@
10591059
@ <a name='step7'></a>
10601060
@ <h1>Step 7: Publish</h1>
10611061
@
1062
- if( !g.perm.Setup ){
1062
+ if( !g.perm.Admin ){
10631063
@ <p>Only administrators are allowed to publish draft skins. Contact
10641064
@ an administrator to get this "draft%d(iSkin)" skin published.</p>
10651065
}else{
10661066
@ <p>When the draft%d(iSkin) skin is ready for production use,
10671067
@ make it the default scan by clicking the acknowledgements and
@@ -1082,15 +1082,15 @@
10821082
}
10831083
@
10841084
@ <a name='step8'></a>
10851085
@ <h1>Step 8: Cleanup and Undo Actions</h1>
10861086
@
1087
- if( !g.perm.Setup ){
1087
+ if( !g.perm.Admin ){
10881088
@ <p>Administrators can optionally save or restore legacy skins, and/or
10891089
@ undo a prior publish.
10901090
}else{
10911091
@ <p>Visit the <a href='%R/setup_skin_admin'>Skin Admin</a> page
10921092
@ for cleanup and recovery actions.
10931093
}
10941094
style_load_one_js_file("skin.js");
10951095
style_footer();
10961096
}
10971097
--- src/skins.c
+++ src/skins.c
@@ -459,11 +459,11 @@
459 Stmt q;
460 int seenCurrent = 0;
461 int once;
462
463 login_check_credentials();
464 if( !g.perm.Setup ){
465 login_needed(0);
466 return;
467 }
468 db_begin_transaction();
469 zCurrent = getSkin(0);
@@ -693,11 +693,11 @@
693
694 /*
695 ** WEBPAGE: setup_skinedit
696 **
697 ** Edit aspects of a skin determined by the w= query parameter.
698 ** Requires Setup privileges.
699 **
700 ** w=NUM -- 0=CSS, 1=footer, 2=header, 3=details, 4=js
701 ** sk=NUM -- the draft skin number
702 */
703 void setup_skinedit(void){
@@ -730,11 +730,11 @@
730 /* Figure out which skin we are editing */
731 iSkin = atoi(PD("sk","1"));
732 if( iSkin<1 || iSkin>9 ) iSkin = 1;
733
734 /* Check that the user is authorized to edit this skin. */
735 if( !g.perm.Setup ){
736 char *zAllowedEditors = "";
737 Glob *pAllowedEditors;
738 int isMatch = 0;
739 if( login_is_individual() ){
740 zAllowedEditors = db_get_mprintf("", "draft%d-users", iSkin);
@@ -903,11 +903,11 @@
903 if( !login_is_individual() ){
904 login_needed(0);
905 return;
906 }
907 zAllowedEditors = db_get_mprintf("", "draft%d-users", iSkin);
908 if( g.perm.Setup ){
909 isSetup = isEditor = 1;
910 }else{
911 Glob *pAllowedEditors;
912 isSetup = isEditor = 0;
913 if( zAllowedEditors[0] ){
@@ -1057,11 +1057,11 @@
1057 @ a production-ready skin.
1058 @
1059 @ <a name='step7'></a>
1060 @ <h1>Step 7: Publish</h1>
1061 @
1062 if( !g.perm.Setup ){
1063 @ <p>Only administrators are allowed to publish draft skins. Contact
1064 @ an administrator to get this "draft%d(iSkin)" skin published.</p>
1065 }else{
1066 @ <p>When the draft%d(iSkin) skin is ready for production use,
1067 @ make it the default scan by clicking the acknowledgements and
@@ -1082,15 +1082,15 @@
1082 }
1083 @
1084 @ <a name='step8'></a>
1085 @ <h1>Step 8: Cleanup and Undo Actions</h1>
1086 @
1087 if( !g.perm.Setup ){
1088 @ <p>Administrators can optionally save or restore legacy skins, and/or
1089 @ undo a prior publish.
1090 }else{
1091 @ <p>Visit the <a href='%R/setup_skin_admin'>Skin Admin</a> page
1092 @ for cleanup and recovery actions.
1093 }
1094 style_load_one_js_file("skin.js");
1095 style_footer();
1096 }
1097
--- src/skins.c
+++ src/skins.c
@@ -459,11 +459,11 @@
459 Stmt q;
460 int seenCurrent = 0;
461 int once;
462
463 login_check_credentials();
464 if( !g.perm.Admin ){
465 login_needed(0);
466 return;
467 }
468 db_begin_transaction();
469 zCurrent = getSkin(0);
@@ -693,11 +693,11 @@
693
694 /*
695 ** WEBPAGE: setup_skinedit
696 **
697 ** Edit aspects of a skin determined by the w= query parameter.
698 ** Requires Admin or Setup privileges.
699 **
700 ** w=NUM -- 0=CSS, 1=footer, 2=header, 3=details, 4=js
701 ** sk=NUM -- the draft skin number
702 */
703 void setup_skinedit(void){
@@ -730,11 +730,11 @@
730 /* Figure out which skin we are editing */
731 iSkin = atoi(PD("sk","1"));
732 if( iSkin<1 || iSkin>9 ) iSkin = 1;
733
734 /* Check that the user is authorized to edit this skin. */
735 if( !g.perm.Admin ){
736 char *zAllowedEditors = "";
737 Glob *pAllowedEditors;
738 int isMatch = 0;
739 if( login_is_individual() ){
740 zAllowedEditors = db_get_mprintf("", "draft%d-users", iSkin);
@@ -903,11 +903,11 @@
903 if( !login_is_individual() ){
904 login_needed(0);
905 return;
906 }
907 zAllowedEditors = db_get_mprintf("", "draft%d-users", iSkin);
908 if( g.perm.Admin ){
909 isSetup = isEditor = 1;
910 }else{
911 Glob *pAllowedEditors;
912 isSetup = isEditor = 0;
913 if( zAllowedEditors[0] ){
@@ -1057,11 +1057,11 @@
1057 @ a production-ready skin.
1058 @
1059 @ <a name='step7'></a>
1060 @ <h1>Step 7: Publish</h1>
1061 @
1062 if( !g.perm.Admin ){
1063 @ <p>Only administrators are allowed to publish draft skins. Contact
1064 @ an administrator to get this "draft%d(iSkin)" skin published.</p>
1065 }else{
1066 @ <p>When the draft%d(iSkin) skin is ready for production use,
1067 @ make it the default scan by clicking the acknowledgements and
@@ -1082,15 +1082,15 @@
1082 }
1083 @
1084 @ <a name='step8'></a>
1085 @ <h1>Step 8: Cleanup and Undo Actions</h1>
1086 @
1087 if( !g.perm.Admin ){
1088 @ <p>Administrators can optionally save or restore legacy skins, and/or
1089 @ undo a prior publish.
1090 }else{
1091 @ <p>Visit the <a href='%R/setup_skin_admin'>Skin Admin</a> page
1092 @ for cleanup and recovery actions.
1093 }
1094 style_load_one_js_file("skin.js");
1095 style_footer();
1096 }
1097
+583 -474
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
11621162
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
11631163
** [sqlite_version()] and [sqlite_source_id()].
11641164
*/
11651165
#define SQLITE_VERSION "3.26.0"
11661166
#define SQLITE_VERSION_NUMBER 3026000
1167
-#define SQLITE_SOURCE_ID "2018-11-12 15:20:44 f9755f81b1c0fd29f242dce78a2fba570fa2714d76e93b8563f426a040352513"
1167
+#define SQLITE_SOURCE_ID "2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9"
11681168
11691169
/*
11701170
** CAPI3REF: Run-Time Library Version Numbers
11711171
** KEYWORDS: sqlite3_version sqlite3_sourceid
11721172
**
@@ -4670,11 +4670,11 @@
46704670
**
46714671
** [[SQLITE_PREPARE_NORMALIZE]] ^(<dt>SQLITE_PREPARE_NORMALIZE</dt>
46724672
** <dd>The SQLITE_PREPARE_NORMALIZE flag indicates that a normalized
46734673
** representation of the SQL statement should be calculated and then
46744674
** associated with the prepared statement, which can be obtained via
4675
-** the [sqlite3_normalized_sql()] interface. The semantics used to
4675
+** the [sqlite3_normalized_sql()] interface.)^ The semantics used to
46764676
** normalize a SQL statement are unspecified and subject to change.
46774677
** At a minimum, literal values will be replaced with suitable
46784678
** placeholders.
46794679
** </dl>
46804680
*/
@@ -8279,10 +8279,11 @@
82798279
#define SQLITE_TESTCTRL_ALWAYS 13
82808280
#define SQLITE_TESTCTRL_RESERVE 14
82818281
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
82828282
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
82838283
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
8284
+#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
82848285
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
82858286
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
82868287
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
82878288
#define SQLITE_TESTCTRL_NEVER_CORRUPT 20
82888289
#define SQLITE_TESTCTRL_VDBE_COVERAGE 21
@@ -10461,11 +10462,11 @@
1046110462
int iLevel; /* Level of current node or entry */
1046210463
int mxLevel; /* The largest iLevel value in the tree */
1046310464
sqlite3_int64 iRowid; /* Rowid for current entry */
1046410465
sqlite3_rtree_dbl rParentScore; /* Score of parent node */
1046510466
int eParentWithin; /* Visibility of parent node */
10466
- int eWithin; /* OUT: Visiblity */
10467
+ int eWithin; /* OUT: Visibility */
1046710468
sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
1046810469
/* The following fields are only available in 3.8.11 and later */
1046910470
sqlite3_value **apSqlParam; /* Original SQL values of parameters */
1047010471
};
1047110472
@@ -15398,22 +15399,21 @@
1539815399
SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, sqlite3*, int, int*, int*);
1539915400
SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager);
1540015401
SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager);
1540115402
SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);
1540215403
SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager, sqlite3*);
15403
-# ifdef SQLITE_DIRECT_OVERFLOW_READ
15404
-SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager, Pgno);
15405
-# endif
1540615404
# ifdef SQLITE_ENABLE_SNAPSHOT
1540715405
SQLITE_PRIVATE int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot);
1540815406
SQLITE_PRIVATE int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot);
1540915407
SQLITE_PRIVATE int sqlite3PagerSnapshotRecover(Pager *pPager);
1541015408
SQLITE_PRIVATE int sqlite3PagerSnapshotCheck(Pager *pPager, sqlite3_snapshot *pSnapshot);
1541115409
SQLITE_PRIVATE void sqlite3PagerSnapshotUnlock(Pager *pPager);
1541215410
# endif
15413
-#else
15414
-# define sqlite3PagerUseWal(x,y) 0
15411
+#endif
15412
+
15413
+#ifdef SQLITE_DIRECT_OVERFLOW_READ
15414
+SQLITE_PRIVATE int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno);
1541515415
#endif
1541615416
1541715417
#ifdef SQLITE_ENABLE_ZIPVFS
1541815418
SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager);
1541915419
#endif
@@ -15653,10 +15653,14 @@
1565315653
SQLITE_PRIVATE int sqlite3HeaderSizePcache(void);
1565415654
SQLITE_PRIVATE int sqlite3HeaderSizePcache1(void);
1565515655
1565615656
/* Number of dirty pages as a percentage of the configured cache size */
1565715657
SQLITE_PRIVATE int sqlite3PCachePercentDirty(PCache*);
15658
+
15659
+#ifdef SQLITE_DIRECT_OVERFLOW_READ
15660
+SQLITE_PRIVATE int sqlite3PCacheIsDirty(PCache *pCache);
15661
+#endif
1565815662
1565915663
#endif /* _PCACHE_H_ */
1566015664
1566115665
/************** End of pcache.h **********************************************/
1566215666
/************** Continuing where we left off in sqliteInt.h ******************/
@@ -16537,12 +16541,13 @@
1653716541
#define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */
1653816542
#define SQLITE_FUNC_SLOCHNG 0x2000 /* "Slow Change". Value constant during a
1653916543
** single query - might change over time */
1654016544
#define SQLITE_FUNC_AFFINITY 0x4000 /* Built-in affinity() function */
1654116545
#define SQLITE_FUNC_OFFSET 0x8000 /* Built-in sqlite_offset() function */
16542
-#define SQLITE_FUNC_WINDOW 0x10000 /* Built-in window-only function */
16543
-#define SQLITE_FUNC_WINDOW_SIZE 0x20000 /* Requires partition size as arg. */
16546
+#define SQLITE_FUNC_WINDOW 0x00010000 /* Built-in window-only function */
16547
+#define SQLITE_FUNC_WINDOW_SIZE 0x20000 /* Requires partition size as arg. */
16548
+#define SQLITE_FUNC_INTERNAL 0x00040000 /* For use by NestedParse() only */
1654416549
1654516550
/*
1654616551
** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
1654716552
** used to create the initializers for the FuncDef structures.
1654816553
**
@@ -16614,14 +16619,17 @@
1661416619
{nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL), \
1661516620
SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,xValue,0,#zName, {0}}
1661616621
#define AGGREGATE2(zName, nArg, arg, nc, xStep, xFinal, extraFlags) \
1661716622
{nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL)|extraFlags, \
1661816623
SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,xFinal,0,#zName, {0}}
16619
-
1662016624
#define WAGGREGATE(zName, nArg, arg, nc, xStep, xFinal, xValue, xInverse, f) \
1662116625
{nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL)|f, \
1662216626
SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,xValue,xInverse,#zName, {0}}
16627
+#define INTERNAL_FUNCTION(zName, nArg, xFunc) \
16628
+ {nArg, SQLITE_FUNC_INTERNAL|SQLITE_UTF8|SQLITE_FUNC_CONSTANT, \
16629
+ 0, 0, xFunc, 0, 0, 0, #zName, {0} }
16630
+
1662316631
1662416632
/*
1662516633
** All current savepoints are stored in a linked list starting at
1662616634
** sqlite3.pSavepoint. The first element in the list is the most recently
1662716635
** opened savepoint. Savepoints are added to the list by the vdbe
@@ -18268,10 +18276,11 @@
1826818276
#endif
1826918277
#ifndef SQLITE_UNTESTABLE
1827018278
int (*xTestCallback)(int); /* Invoked by sqlite3FaultSim() */
1827118279
#endif
1827218280
int bLocaltimeFault; /* True to fail localtime() calls */
18281
+ int bInternalFunctions; /* Internal SQL functions are visible */
1827318282
int iOnceResetThreshold; /* When to reset OP_Once counters */
1827418283
u32 szSorterRef; /* Min size in bytes to use sorter-refs */
1827518284
};
1827618285
1827718286
/*
@@ -19731,10 +19740,11 @@
1973119740
#endif
1973219741
#ifndef SQLITE_UNTESTABLE
1973319742
0, /* xTestCallback */
1973419743
#endif
1973519744
0, /* bLocaltimeFault */
19745
+ 0, /* bInternalFunctions */
1973619746
0x7ffffffe, /* iOnceResetThreshold */
1973719747
SQLITE_DEFAULT_SORTERREF_SIZE /* szSorterRef */
1973819748
};
1973919749
1974019750
/*
@@ -20287,11 +20297,13 @@
2028720297
2028820298
int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);
2028920299
SQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(sqlite3*,VdbeCursor*,UnpackedRecord*,int*);
2029020300
SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3*, BtCursor*, i64*);
2029120301
SQLITE_PRIVATE int sqlite3VdbeExec(Vdbe*);
20302
+#ifndef SQLITE_OMIT_EXPLAIN
2029220303
SQLITE_PRIVATE int sqlite3VdbeList(Vdbe*);
20304
+#endif
2029320305
SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe*);
2029420306
SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *, int);
2029520307
SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem*);
2029620308
SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem*, const Mem*);
2029720309
SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int);
@@ -20326,11 +20338,13 @@
2032620338
SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p);
2032720339
SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem*, FuncDef*);
2032820340
#ifndef SQLITE_OMIT_WINDOWFUNC
2032920341
SQLITE_PRIVATE int sqlite3VdbeMemAggValue(Mem*, Mem*, FuncDef*);
2033020342
#endif
20343
+#ifndef SQLITE_OMIT_EXPLAIN
2033120344
SQLITE_PRIVATE const char *sqlite3OpcodeName(int);
20345
+#endif
2033220346
SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve);
2033320347
SQLITE_PRIVATE int sqlite3VdbeMemClearAndResize(Mem *pMem, int n);
2033420348
SQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *, int);
2033520349
#ifdef SQLITE_DEBUG
2033620350
SQLITE_PRIVATE int sqlite3VdbeFrameIsValid(VdbeFrame*);
@@ -40675,12 +40689,11 @@
4067540689
#endif
4067640690
#if SQLITE_MAX_MMAP_SIZE>0
4067740691
int nFetchOut; /* Number of outstanding xFetch references */
4067840692
HANDLE hMap; /* Handle for accessing memory mapping */
4067940693
void *pMapRegion; /* Area memory mapped */
40680
- sqlite3_int64 mmapSize; /* Usable size of mapped region */
40681
- sqlite3_int64 mmapSizeActual; /* Actual size of mapped region */
40694
+ sqlite3_int64 mmapSize; /* Size of mapped region */
4068240695
sqlite3_int64 mmapSizeMax; /* Configured FCNTL_MMAP_SIZE value */
4068340696
#endif
4068440697
};
4068540698
4068640699
/*
@@ -43297,10 +43310,30 @@
4329743310
winFile *pFile = (winFile*)id; /* File handle object */
4329843311
int rc = SQLITE_OK; /* Return code for this function */
4329943312
DWORD lastErrno;
4330043313
#if SQLITE_MAX_MMAP_SIZE>0
4330143314
sqlite3_int64 oldMmapSize;
43315
+ if( pFile->nFetchOut>0 ){
43316
+ /* File truncation is a no-op if there are outstanding memory mapped
43317
+ ** pages. This is because truncating the file means temporarily unmapping
43318
+ ** the file, and that might delete memory out from under existing cursors.
43319
+ **
43320
+ ** This can result in incremental vacuum not truncating the file,
43321
+ ** if there is an active read cursor when the incremental vacuum occurs.
43322
+ ** No real harm comes of this - the database file is not corrupted,
43323
+ ** though some folks might complain that the file is bigger than it
43324
+ ** needs to be.
43325
+ **
43326
+ ** The only feasible work-around is to defer the truncation until after
43327
+ ** all references to memory-mapped content are closed. That is doable,
43328
+ ** but involves adding a few branches in the common write code path which
43329
+ ** could slow down normal operations slightly. Hence, we have decided for
43330
+ ** now to simply make trancations a no-op if there are pending reads. We
43331
+ ** can maybe revisit this decision in the future.
43332
+ */
43333
+ return SQLITE_OK;
43334
+ }
4330243335
#endif
4330343336
4330443337
assert( pFile );
4330543338
SimulateIOError(return SQLITE_IOERR_TRUNCATE);
4330643339
OSTRACE(("TRUNCATE pid=%lu, pFile=%p, file=%p, size=%lld, lock=%d\n",
@@ -44725,13 +44758,13 @@
4472544758
*/
4472644759
#if SQLITE_MAX_MMAP_SIZE>0
4472744760
static int winUnmapfile(winFile *pFile){
4472844761
assert( pFile!=0 );
4472944762
OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, hMap=%p, pMapRegion=%p, "
44730
- "mmapSize=%lld, mmapSizeActual=%lld, mmapSizeMax=%lld\n",
44763
+ "mmapSize=%lld, mmapSizeMax=%lld\n",
4473144764
osGetCurrentProcessId(), pFile, pFile->hMap, pFile->pMapRegion,
44732
- pFile->mmapSize, pFile->mmapSizeActual, pFile->mmapSizeMax));
44765
+ pFile->mmapSize, pFile->mmapSizeMax));
4473344766
if( pFile->pMapRegion ){
4473444767
if( !osUnmapViewOfFile(pFile->pMapRegion) ){
4473544768
pFile->lastErrno = osGetLastError();
4473644769
OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, pMapRegion=%p, "
4473744770
"rc=SQLITE_IOERR_MMAP\n", osGetCurrentProcessId(), pFile,
@@ -44739,11 +44772,10 @@
4473944772
return winLogError(SQLITE_IOERR_MMAP, pFile->lastErrno,
4474044773
"winUnmapfile1", pFile->zPath);
4474144774
}
4474244775
pFile->pMapRegion = 0;
4474344776
pFile->mmapSize = 0;
44744
- pFile->mmapSizeActual = 0;
4474544777
}
4474644778
if( pFile->hMap!=NULL ){
4474744779
if( !osCloseHandle(pFile->hMap) ){
4474844780
pFile->lastErrno = osGetLastError();
4474944781
OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, hMap=%p, rc=SQLITE_IOERR_MMAP\n",
@@ -44850,11 +44882,10 @@
4485044882
osGetCurrentProcessId(), pFd, sqlite3ErrName(rc)));
4485144883
return SQLITE_OK;
4485244884
}
4485344885
pFd->pMapRegion = pNew;
4485444886
pFd->mmapSize = nMap;
44855
- pFd->mmapSizeActual = nMap;
4485644887
}
4485744888
4485844889
OSTRACE(("MAP-FILE pid=%lu, pFile=%p, rc=SQLITE_OK\n",
4485944890
osGetCurrentProcessId(), pFd));
4486044891
return SQLITE_OK;
@@ -45652,11 +45683,10 @@
4565245683
pFile->zPath = zName;
4565345684
#if SQLITE_MAX_MMAP_SIZE>0
4565445685
pFile->hMap = NULL;
4565545686
pFile->pMapRegion = 0;
4565645687
pFile->mmapSize = 0;
45657
- pFile->mmapSizeActual = 0;
4565845688
pFile->mmapSizeMax = sqlite3GlobalConfig.szMmap;
4565945689
#endif
4566045690
4566145691
OpenCounter(+1);
4566245692
return rc;
@@ -48372,10 +48402,19 @@
4837248402
int nDirty = 0;
4837348403
int nCache = numberOfCachePages(pCache);
4837448404
for(pDirty=pCache->pDirty; pDirty; pDirty=pDirty->pDirtyNext) nDirty++;
4837548405
return nCache ? (int)(((i64)nDirty * 100) / nCache) : 0;
4837648406
}
48407
+
48408
+#ifdef SQLITE_DIRECT_OVERFLOW_READ
48409
+/*
48410
+** Return true if there are one or more dirty pages in the cache. Else false.
48411
+*/
48412
+SQLITE_PRIVATE int sqlite3PCacheIsDirty(PCache *pCache){
48413
+ return (pCache->pDirty!=0);
48414
+}
48415
+#endif
4837748416
4837848417
#if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)
4837948418
/*
4838048419
** For all dirty pages currently in the cache, invoke the specified
4838148420
** callback. This is only used if the SQLITE_CHECK_PAGES macro is
@@ -48496,11 +48535,12 @@
4849648535
PgHdr1 *pLruNext; /* Next in LRU list of unpinned pages */
4849748536
PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */
4849848537
};
4849948538
4850048539
/*
48501
-** A page is pinned if it is no on the LRU list
48540
+** A page is pinned if it is not on the LRU list. To be "pinned" means
48541
+** that the page is in active use and must not be deallocated.
4850248542
*/
4850348543
#define PAGE_IS_PINNED(p) ((p)->pLruNext==0)
4850448544
#define PAGE_IS_UNPINNED(p) ((p)->pLruNext!=0)
4850548545
4850648546
/* Each page cache (or PCache) belongs to a PGroup. A PGroup is a set
@@ -51136,23 +51176,34 @@
5113651176
**
5113751177
** if( pPager->jfd->pMethods ){ ...
5113851178
*/
5113951179
#define isOpen(pFd) ((pFd)->pMethods!=0)
5114051180
51181
+#ifdef SQLITE_DIRECT_OVERFLOW_READ
5114151182
/*
51142
-** Return true if this pager uses a write-ahead log to read page pgno.
51143
-** Return false if the pager reads pgno directly from the database.
51183
+** Return true if page pgno can be read directly from the database file
51184
+** by the b-tree layer. This is the case if:
51185
+**
51186
+** * the database file is open,
51187
+** * there are no dirty pages in the cache, and
51188
+** * the desired page is not currently in the wal file.
5114451189
*/
51145
-#if !defined(SQLITE_OMIT_WAL) && defined(SQLITE_DIRECT_OVERFLOW_READ)
51146
-SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager, Pgno pgno){
51147
- u32 iRead = 0;
51148
- int rc;
51149
- if( pPager->pWal==0 ) return 0;
51150
- rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iRead);
51151
- return rc || iRead;
51190
+SQLITE_PRIVATE int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno){
51191
+ if( pPager->fd->pMethods==0 ) return 0;
51192
+ if( sqlite3PCacheIsDirty(pPager->pPCache) ) return 0;
51193
+#ifndef SQLITE_OMIT_WAL
51194
+ if( pPager->pWal ){
51195
+ u32 iRead = 0;
51196
+ int rc;
51197
+ rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iRead);
51198
+ return (rc==SQLITE_OK && iRead==0);
51199
+ }
51200
+#endif
51201
+ return 1;
5115251202
}
5115351203
#endif
51204
+
5115451205
#ifndef SQLITE_OMIT_WAL
5115551206
# define pagerUseWal(x) ((x)->pWal!=0)
5115651207
#else
5115751208
# define pagerUseWal(x) 0
5115851209
# define pagerRollbackWal(x) 0
@@ -57332,12 +57383,15 @@
5733257383
void *(*xCodec)(void*,void*,Pgno,int),
5733357384
void (*xCodecSizeChng)(void*,int,int),
5733457385
void (*xCodecFree)(void*),
5733557386
void *pCodec
5733657387
){
57337
- pager_reset(pPager);
57338
- if( pPager->xCodecFree ) pPager->xCodecFree(pPager->pCodec);
57388
+ if( pPager->xCodecFree ){
57389
+ pPager->xCodecFree(pPager->pCodec);
57390
+ }else{
57391
+ pager_reset(pPager);
57392
+ }
5733957393
pPager->xCodec = pPager->memDb ? 0 : xCodec;
5734057394
pPager->xCodecSizeChng = xCodecSizeChng;
5734157395
pPager->xCodecFree = xCodecFree;
5734257396
pPager->pCodec = pCodec;
5734357397
setGetterMethod(pPager);
@@ -67639,13 +67693,10 @@
6763967693
offset -= ovflSize;
6764067694
}else{
6764167695
/* Need to read this page properly. It contains some of the
6764267696
** range of data that is being read (eOp==0) or written (eOp!=0).
6764367697
*/
67644
-#ifdef SQLITE_DIRECT_OVERFLOW_READ
67645
- sqlite3_file *fd; /* File from which to do direct overflow read */
67646
-#endif
6764767698
int a = amt;
6764867699
if( a + offset > ovflSize ){
6764967700
a = ovflSize - offset;
6765067701
}
6765167702
@@ -67652,11 +67703,11 @@
6765267703
#ifdef SQLITE_DIRECT_OVERFLOW_READ
6765367704
/* If all the following are true:
6765467705
**
6765567706
** 1) this is a read operation, and
6765667707
** 2) data is required from the start of this overflow page, and
67657
- ** 3) there is no open write-transaction, and
67708
+ ** 3) there are no dirty pages in the page-cache
6765867709
** 4) the database is file-backed, and
6765967710
** 5) the page is not in the WAL file
6766067711
** 6) at least 4 bytes have already been read into the output buffer
6766167712
**
6766267713
** then data can be read directly from the database file into the
@@ -67663,15 +67714,14 @@
6766367714
** output buffer, bypassing the page-cache altogether. This speeds
6766467715
** up loading large records that span many overflow pages.
6766567716
*/
6766667717
if( eOp==0 /* (1) */
6766767718
&& offset==0 /* (2) */
67668
- && pBt->inTransaction==TRANS_READ /* (3) */
67669
- && (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (4) */
67670
- && 0==sqlite3PagerUseWal(pBt->pPager, nextPage) /* (5) */
67719
+ && sqlite3PagerDirectReadOk(pBt->pPager, nextPage) /* (3,4,5) */
6767167720
&& &pBuf[-4]>=pBufStart /* (6) */
6767267721
){
67722
+ sqlite3_file *fd = sqlite3PagerFile(pBt->pPager);
6767367723
u8 aSave[4];
6767467724
u8 *aWrite = &pBuf[-4];
6767567725
assert( aWrite>=pBufStart ); /* due to (6) */
6767667726
memcpy(aSave, aWrite, 4);
6767767727
rc = sqlite3OsRead(fd, aWrite, a+4, (i64)pBt->pageSize*(nextPage-1));
@@ -95152,10 +95202,19 @@
9515295202
** sqlite_version() that might change over time cannot be used
9515395203
** in an index. */
9515495204
notValid(pParse, pNC, "non-deterministic functions",
9515595205
NC_IdxExpr|NC_PartIdx);
9515695206
}
95207
+ if( (pDef->funcFlags & SQLITE_FUNC_INTERNAL)!=0
95208
+ && pParse->nested==0
95209
+ && sqlite3Config.bInternalFunctions==0
95210
+ ){
95211
+ /* Internal-use-only functions are disallowed unless the
95212
+ ** SQL is being compiled using sqlite3NestedParse() */
95213
+ no_such_func = 1;
95214
+ pDef = 0;
95215
+ }
9515795216
}
9515895217
9515995218
if( 0==IN_RENAME_OBJECT ){
9516095219
#ifndef SQLITE_OMIT_WINDOWFUNC
9516195220
assert( is_agg==0 || (pDef->funcFlags & SQLITE_FUNC_MINMAX)
@@ -102076,14 +102135,20 @@
102076102135
#else
102077102136
# define renameTokenCheckAll(x,y)
102078102137
#endif
102079102138
102080102139
/*
102081
-** Add a new RenameToken object mapping parse tree element pPtr into
102082
-** token *pToken to the Parse object currently under construction.
102140
+** Remember that the parser tree element pPtr was created using
102141
+** the token pToken.
102083102142
**
102084
-** Return a copy of pPtr.
102143
+** In other words, construct a new RenameToken object and add it
102144
+** to the list of RenameToken objects currently being built up
102145
+** in pParse->pRename.
102146
+**
102147
+** The pPtr argument is returned so that this routine can be used
102148
+** with tail recursion in tokenExpr() routine, for a small performance
102149
+** improvement.
102085102150
*/
102086102151
SQLITE_PRIVATE void *sqlite3RenameTokenMap(Parse *pParse, void *pPtr, Token *pToken){
102087102152
RenameToken *pNew;
102088102153
assert( pPtr || pParse->db->mallocFailed );
102089102154
renameTokenCheckAll(pParse, pPtr);
@@ -102591,19 +102656,12 @@
102591102656
** Do a column rename operation on the CREATE statement given in zSql.
102592102657
** The iCol-th column (left-most is 0) of table zTable is renamed from zCol
102593102658
** into zNew. The name should be quoted if bQuote is true.
102594102659
**
102595102660
** This function is used internally by the ALTER TABLE RENAME COLUMN command.
102596
-** Though accessible to application code, it is not intended for use by
102597
-** applications. The existance of this function, and the way it works,
102598
-** is subject to change without notice.
102599
-**
102600
-** If any of the parameters are out-of-bounds, then simply return NULL.
102601
-** An out-of-bounds parameter can only occur when the application calls
102602
-** this function directly. The parameters will always be well-formed when
102603
-** this routine is invoked by the bytecode for a legitimate ALTER TABLE
102604
-** statement.
102661
+** It is only accessible to SQL created using sqlite3NestedParse(). It is
102662
+** not reachable from ordinary SQL passed into sqlite3_prepare().
102605102663
*/
102606102664
static void renameColumnFunc(
102607102665
sqlite3_context *context,
102608102666
int NotUsed,
102609102667
sqlite3_value **argv
@@ -103007,13 +103065,13 @@
103007103065
/*
103008103066
** Register built-in functions used to help implement ALTER TABLE
103009103067
*/
103010103068
SQLITE_PRIVATE void sqlite3AlterFunctions(void){
103011103069
static FuncDef aAlterTableFuncs[] = {
103012
- FUNCTION(sqlite_rename_column, 9, 0, 0, renameColumnFunc),
103013
- FUNCTION(sqlite_rename_table, 7, 0, 0, renameTableFunc),
103014
- FUNCTION(sqlite_rename_test, 5, 0, 0, renameTableTest),
103070
+ INTERNAL_FUNCTION(sqlite_rename_column, 9, renameColumnFunc),
103071
+ INTERNAL_FUNCTION(sqlite_rename_table, 7, renameTableFunc),
103072
+ INTERNAL_FUNCTION(sqlite_rename_test, 5, renameTableTest),
103015103073
};
103016103074
sqlite3InsertBuiltinFuncs(aAlterTableFuncs, ArraySize(aAlterTableFuncs));
103017103075
}
103018103076
#endif /* SQLITE_ALTER_TABLE */
103019103077
@@ -105058,11 +105116,11 @@
105058105116
if( pVfs==0 ) return;
105059105117
pNew = &db->aDb[db->init.iDb];
105060105118
if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt);
105061105119
pNew->pBt = 0;
105062105120
pNew->pSchema = 0;
105063
- rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, SQLITE_OPEN_MAIN_DB);
105121
+ rc = sqlite3BtreeOpen(pVfs, "x\0", db, &pNew->pBt, 0, SQLITE_OPEN_MAIN_DB);
105064105122
}else{
105065105123
/* This is a real ATTACH
105066105124
**
105067105125
** Check for the following errors:
105068105126
**
@@ -106407,21 +106465,26 @@
106407106465
** "main" and "temp") for a single database connection.
106408106466
*/
106409106467
SQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3 *db){
106410106468
int i;
106411106469
sqlite3BtreeEnterAll(db);
106412
- assert( db->nSchemaLock==0 );
106413106470
for(i=0; i<db->nDb; i++){
106414106471
Db *pDb = &db->aDb[i];
106415106472
if( pDb->pSchema ){
106416
- sqlite3SchemaClear(pDb->pSchema);
106473
+ if( db->nSchemaLock==0 ){
106474
+ sqlite3SchemaClear(pDb->pSchema);
106475
+ }else{
106476
+ DbSetProperty(db, i, DB_ResetWanted);
106477
+ }
106417106478
}
106418106479
}
106419106480
db->mDbFlags &= ~(DBFLAG_SchemaChange|DBFLAG_SchemaKnownOk);
106420106481
sqlite3VtabUnlockList(db);
106421106482
sqlite3BtreeLeaveAll(db);
106422
- sqlite3CollapseDatabaseArray(db);
106483
+ if( db->nSchemaLock==0 ){
106484
+ sqlite3CollapseDatabaseArray(db);
106485
+ }
106423106486
}
106424106487
106425106488
/*
106426106489
** This routine is called when a commit occurs.
106427106490
*/
@@ -107757,10 +107820,11 @@
107757107820
pPk->nColumn = pTab->nCol;
107758107821
}
107759107822
recomputeColumnsNotIndexed(pPk);
107760107823
}
107761107824
107825
+#ifndef SQLITE_OMIT_VIRTUALTABLE
107762107826
/*
107763107827
** Return true if zName is a shadow table name in the current database
107764107828
** connection.
107765107829
**
107766107830
** zName is temporarily modified while this routine is running, but is
@@ -107782,10 +107846,13 @@
107782107846
if( pMod==0 ) return 0;
107783107847
if( pMod->pModule->iVersion<3 ) return 0;
107784107848
if( pMod->pModule->xShadowName==0 ) return 0;
107785107849
return pMod->pModule->xShadowName(zTail+1);
107786107850
}
107851
+#else
107852
+# define isShadowTableName(x,y) 0
107853
+#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */
107787107854
107788107855
/*
107789107856
** This routine is called to report the final ")" that terminates
107790107857
** a CREATE TABLE statement.
107791107858
**
@@ -111069,13 +111136,15 @@
111069111136
db = pParse->db;
111070111137
if( (pTab->tabFlags & TF_Readonly)!=0 ){
111071111138
return sqlite3WritableSchema(db)==0 && pParse->nested==0;
111072111139
}
111073111140
assert( pTab->tabFlags & TF_Shadow );
111074
- return (db->flags & SQLITE_Defensive)!=0
111075
- && db->nVdbeExec==0
111076
- && db->pVtabCtx==0;
111141
+ return (db->flags & SQLITE_Defensive)!=0
111142
+#ifndef SQLITE_OMIT_VIRTUALTABLE
111143
+ && db->pVtabCtx==0
111144
+#endif
111145
+ && db->nVdbeExec==0;
111077111146
}
111078111147
111079111148
/*
111080111149
** Check to make sure the given table is writable. If it is not
111081111150
** writable, generate an error message and return 1. If it is
@@ -118702,10 +118771,11 @@
118702118771
# define sqlite3_create_module 0
118703118772
# define sqlite3_create_module_v2 0
118704118773
# define sqlite3_declare_vtab 0
118705118774
# define sqlite3_vtab_config 0
118706118775
# define sqlite3_vtab_on_conflict 0
118776
+# define sqlite3_vtab_collation 0
118707118777
#endif
118708118778
118709118779
#ifdef SQLITE_OMIT_SHARED_CACHE
118710118780
# define sqlite3_enable_shared_cache 0
118711118781
#endif
@@ -121204,16 +121274,17 @@
121204121274
*/
121205121275
case PragTyp_TABLE_INFO: if( zRight ){
121206121276
Table *pTab;
121207121277
pTab = sqlite3LocateTable(pParse, LOCATE_NOERR, zRight, zDb);
121208121278
if( pTab ){
121279
+ int iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
121209121280
int i, k;
121210121281
int nHidden = 0;
121211121282
Column *pCol;
121212121283
Index *pPk = sqlite3PrimaryKeyIndex(pTab);
121213121284
pParse->nMem = 7;
121214
- sqlite3CodeVerifySchema(pParse, iDb);
121285
+ sqlite3CodeVerifySchema(pParse, iTabDb);
121215121286
sqlite3ViewGetColumnNames(pParse, pTab);
121216121287
for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
121217121288
int isHidden = IsHiddenColumn(pCol);
121218121289
if( isHidden && pPragma->iArg==0 ){
121219121290
nHidden++;
@@ -121270,10 +121341,11 @@
121270121341
case PragTyp_INDEX_INFO: if( zRight ){
121271121342
Index *pIdx;
121272121343
Table *pTab;
121273121344
pIdx = sqlite3FindIndex(db, zRight, zDb);
121274121345
if( pIdx ){
121346
+ int iIdxDb = sqlite3SchemaToIndex(db, pIdx->pSchema);
121275121347
int i;
121276121348
int mx;
121277121349
if( pPragma->iArg ){
121278121350
/* PRAGMA index_xinfo (newer version with more rows and columns) */
121279121351
mx = pIdx->nColumn;
@@ -121282,11 +121354,11 @@
121282121354
/* PRAGMA index_info (legacy version) */
121283121355
mx = pIdx->nKeyCol;
121284121356
pParse->nMem = 3;
121285121357
}
121286121358
pTab = pIdx->pTable;
121287
- sqlite3CodeVerifySchema(pParse, iDb);
121359
+ sqlite3CodeVerifySchema(pParse, iIdxDb);
121288121360
assert( pParse->nMem<=pPragma->nPragCName );
121289121361
for(i=0; i<mx; i++){
121290121362
i16 cnum = pIdx->aiColumn[i];
121291121363
sqlite3VdbeMultiLoad(v, 1, "iisX", i, cnum,
121292121364
cnum<0 ? 0 : pTab->aCol[cnum].zName);
@@ -121306,12 +121378,13 @@
121306121378
Index *pIdx;
121307121379
Table *pTab;
121308121380
int i;
121309121381
pTab = sqlite3FindTable(db, zRight, zDb);
121310121382
if( pTab ){
121383
+ int iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
121311121384
pParse->nMem = 5;
121312
- sqlite3CodeVerifySchema(pParse, iDb);
121385
+ sqlite3CodeVerifySchema(pParse, iTabDb);
121313121386
for(pIdx=pTab->pIndex, i=0; pIdx; pIdx=pIdx->pNext, i++){
121314121387
const char *azOrigin[] = { "c", "u", "pk" };
121315121388
sqlite3VdbeMultiLoad(v, 1, "isisi",
121316121389
i,
121317121390
pIdx->zName,
@@ -121354,10 +121427,11 @@
121354121427
HashElem *j;
121355121428
FuncDef *p;
121356121429
pParse->nMem = 2;
121357121430
for(i=0; i<SQLITE_FUNC_HASH_SZ; i++){
121358121431
for(p=sqlite3BuiltinFunctions.a[i]; p; p=p->u.pHash ){
121432
+ if( p->funcFlags & SQLITE_FUNC_INTERNAL ) continue;
121359121433
sqlite3VdbeMultiLoad(v, 1, "si", p->zName, 1);
121360121434
}
121361121435
}
121362121436
for(j=sqliteHashFirst(&db->aFunc); j; j=sqliteHashNext(j)){
121363121437
p = (FuncDef*)sqliteHashData(j);
@@ -121395,13 +121469,14 @@
121395121469
Table *pTab;
121396121470
pTab = sqlite3FindTable(db, zRight, zDb);
121397121471
if( pTab ){
121398121472
pFK = pTab->pFKey;
121399121473
if( pFK ){
121474
+ int iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
121400121475
int i = 0;
121401121476
pParse->nMem = 8;
121402
- sqlite3CodeVerifySchema(pParse, iDb);
121477
+ sqlite3CodeVerifySchema(pParse, iTabDb);
121403121478
while(pFK){
121404121479
int j;
121405121480
for(j=0; j<pFK->nCol; j++){
121406121481
sqlite3VdbeMultiLoad(v, 1, "iissssss",
121407121482
i,
@@ -121442,36 +121517,38 @@
121442121517
121443121518
regResult = pParse->nMem+1;
121444121519
pParse->nMem += 4;
121445121520
regKey = ++pParse->nMem;
121446121521
regRow = ++pParse->nMem;
121447
- sqlite3CodeVerifySchema(pParse, iDb);
121448121522
k = sqliteHashFirst(&db->aDb[iDb].pSchema->tblHash);
121449121523
while( k ){
121524
+ int iTabDb;
121450121525
if( zRight ){
121451121526
pTab = sqlite3LocateTable(pParse, 0, zRight, zDb);
121452121527
k = 0;
121453121528
}else{
121454121529
pTab = (Table*)sqliteHashData(k);
121455121530
k = sqliteHashNext(k);
121456121531
}
121457121532
if( pTab==0 || pTab->pFKey==0 ) continue;
121458
- sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
121533
+ iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
121534
+ sqlite3CodeVerifySchema(pParse, iTabDb);
121535
+ sqlite3TableLock(pParse, iTabDb, pTab->tnum, 0, pTab->zName);
121459121536
if( pTab->nCol+regRow>pParse->nMem ) pParse->nMem = pTab->nCol + regRow;
121460
- sqlite3OpenTable(pParse, 0, iDb, pTab, OP_OpenRead);
121537
+ sqlite3OpenTable(pParse, 0, iTabDb, pTab, OP_OpenRead);
121461121538
sqlite3VdbeLoadString(v, regResult, pTab->zName);
121462121539
for(i=1, pFK=pTab->pFKey; pFK; i++, pFK=pFK->pNextFrom){
121463121540
pParent = sqlite3FindTable(db, pFK->zTo, zDb);
121464121541
if( pParent==0 ) continue;
121465121542
pIdx = 0;
121466
- sqlite3TableLock(pParse, iDb, pParent->tnum, 0, pParent->zName);
121543
+ sqlite3TableLock(pParse, iTabDb, pParent->tnum, 0, pParent->zName);
121467121544
x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, 0);
121468121545
if( x==0 ){
121469121546
if( pIdx==0 ){
121470
- sqlite3OpenTable(pParse, i, iDb, pParent, OP_OpenRead);
121547
+ sqlite3OpenTable(pParse, i, iTabDb, pParent, OP_OpenRead);
121471121548
}else{
121472
- sqlite3VdbeAddOp3(v, OP_OpenRead, i, pIdx->tnum, iDb);
121549
+ sqlite3VdbeAddOp3(v, OP_OpenRead, i, pIdx->tnum, iTabDb);
121473121550
sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
121474121551
}
121475121552
}else{
121476121553
k = 0;
121477121554
break;
@@ -140166,13 +140243,15 @@
140166140243
** The table object reference passed as the second argument to this function
140167140244
** must represent a virtual table. This function invokes the xBestIndex()
140168140245
** method of the virtual table with the sqlite3_index_info object that
140169140246
** comes in as the 3rd argument to this function.
140170140247
**
140171
-** If an error occurs, pParse is populated with an error message and a
140172
-** non-zero value is returned. Otherwise, 0 is returned and the output
140173
-** part of the sqlite3_index_info structure is left populated.
140248
+** If an error occurs, pParse is populated with an error message and an
140249
+** appropriate error code is returned. A return of SQLITE_CONSTRAINT from
140250
+** xBestIndex is not considered an error. SQLITE_CONSTRAINT indicates that
140251
+** the current configuration of "unusable" flags in sqlite3_index_info can
140252
+** not result in a valid plan.
140174140253
**
140175140254
** Whether or not an error is returned, it is the responsibility of the
140176140255
** caller to eventually free p->idxStr if p->needToFreeIdxStr indicates
140177140256
** that this is required.
140178140257
*/
@@ -140182,11 +140261,11 @@
140182140261
140183140262
TRACE_IDX_INPUTS(p);
140184140263
rc = pVtab->pModule->xBestIndex(pVtab, p);
140185140264
TRACE_IDX_OUTPUTS(p);
140186140265
140187
- if( rc!=SQLITE_OK ){
140266
+ if( rc!=SQLITE_OK && rc!=SQLITE_CONSTRAINT ){
140188140267
if( rc==SQLITE_NOMEM ){
140189140268
sqlite3OomFault(pParse->db);
140190140269
}else if( !pVtab->zErrMsg ){
140191140270
sqlite3ErrorMsg(pParse, "%s", sqlite3ErrStr(rc));
140192140271
}else{
@@ -140193,23 +140272,11 @@
140193140272
sqlite3ErrorMsg(pParse, "%s", pVtab->zErrMsg);
140194140273
}
140195140274
}
140196140275
sqlite3_free(pVtab->zErrMsg);
140197140276
pVtab->zErrMsg = 0;
140198
-
140199
-#if 0
140200
- /* This error is now caught by the caller.
140201
- ** Search for "xBestIndex malfunction" below */
140202
- for(i=0; i<p->nConstraint; i++){
140203
- if( !p->aConstraint[i].usable && p->aConstraintUsage[i].argvIndex>0 ){
140204
- sqlite3ErrorMsg(pParse,
140205
- "table %s: xBestIndex returned an invalid plan", pTab->zName);
140206
- }
140207
- }
140208
-#endif
140209
-
140210
- return pParse->nErr;
140277
+ return rc;
140211140278
}
140212140279
#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
140213140280
140214140281
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
140215140282
/*
@@ -142278,11 +142345,21 @@
142278142345
pIdxInfo->idxFlags = 0;
142279142346
pIdxInfo->colUsed = (sqlite3_int64)pSrc->colUsed;
142280142347
142281142348
/* Invoke the virtual table xBestIndex() method */
142282142349
rc = vtabBestIndex(pParse, pSrc->pTab, pIdxInfo);
142283
- if( rc ) return rc;
142350
+ if( rc ){
142351
+ if( rc==SQLITE_CONSTRAINT ){
142352
+ /* If the xBestIndex method returns SQLITE_CONSTRAINT, that means
142353
+ ** that the particular combination of parameters provided is unusable.
142354
+ ** Make no entries in the loop table.
142355
+ */
142356
+ WHERETRACE(0xffff, (" ^^^^--- non-viable plan rejected!\n"));
142357
+ return SQLITE_OK;
142358
+ }
142359
+ return rc;
142360
+ }
142284142361
142285142362
mxTerm = -1;
142286142363
assert( pNew->nLSlot>=nConstraint );
142287142364
for(i=0; i<nConstraint; i++) pNew->aLTerm[i] = 0;
142288142365
pNew->u.vtab.omitMask = 0;
@@ -146750,10 +146827,11 @@
146750146827
**
146751146828
** The following is the concatenation of all %include directives from the
146752146829
** input grammar file:
146753146830
*/
146754146831
/* #include <stdio.h> */
146832
+/* #include <assert.h> */
146755146833
/************ Begin %include sections from the grammar ************************/
146756146834
146757146835
/* #include "sqliteInt.h" */
146758146836
146759146837
/*
@@ -147005,21 +147083,21 @@
147005147083
#define sqlite3ParserCTX_PDECL ,Parse *pParse
147006147084
#define sqlite3ParserCTX_PARAM ,pParse
147007147085
#define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
147008147086
#define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
147009147087
#define YYFALLBACK 1
147010
-#define YYNSTATE 525
147088
+#define YYNSTATE 521
147011147089
#define YYNRULE 367
147012147090
#define YYNTOKEN 155
147013
-#define YY_MAX_SHIFT 524
147014
-#define YY_MIN_SHIFTREDUCE 760
147015
-#define YY_MAX_SHIFTREDUCE 1126
147016
-#define YY_ERROR_ACTION 1127
147017
-#define YY_ACCEPT_ACTION 1128
147018
-#define YY_NO_ACTION 1129
147019
-#define YY_MIN_REDUCE 1130
147020
-#define YY_MAX_REDUCE 1496
147091
+#define YY_MAX_SHIFT 520
147092
+#define YY_MIN_SHIFTREDUCE 756
147093
+#define YY_MAX_SHIFTREDUCE 1122
147094
+#define YY_ERROR_ACTION 1123
147095
+#define YY_ACCEPT_ACTION 1124
147096
+#define YY_NO_ACTION 1125
147097
+#define YY_MIN_REDUCE 1126
147098
+#define YY_MAX_REDUCE 1492
147021147099
/************* End control #defines *******************************************/
147022147100
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
147023147101
147024147102
/* Define the yytestcase() macro to be a no-op if is not already defined
147025147103
** otherwise.
@@ -147084,211 +147162,211 @@
147084147162
** yy_default[] Default action for each state.
147085147163
**
147086147164
*********** Begin parsing tables **********************************************/
147087147165
#define YY_ACTTAB_COUNT (2009)
147088147166
static const YYACTIONTYPE yy_action[] = {
147089
- /* 0 */ 372, 105, 102, 197, 105, 102, 197, 519, 1128, 1,
147090
- /* 10 */ 1, 524, 2, 1132, 519, 1196, 1175, 1460, 275, 374,
147091
- /* 20 */ 127, 1393, 1201, 1201, 1196, 1170, 178, 1209, 64, 64,
147092
- /* 30 */ 481, 891, 326, 432, 352, 37, 37, 812, 366, 892,
147093
- /* 40 */ 513, 513, 513, 112, 113, 103, 1104, 1104, 957, 960,
147094
- /* 50 */ 950, 950, 110, 110, 111, 111, 111, 111, 369, 252,
147095
- /* 60 */ 252, 519, 252, 252, 501, 519, 313, 519, 463, 519,
147096
- /* 70 */ 1083, 495, 516, 482, 6, 516, 813, 134, 502, 228,
147097
- /* 80 */ 194, 432, 37, 37, 519, 208, 64, 64, 64, 64,
147167
+ /* 0 */ 368, 105, 102, 197, 105, 102, 197, 515, 1124, 1,
147168
+ /* 10 */ 1, 520, 2, 1128, 515, 1192, 1171, 1456, 275, 370,
147169
+ /* 20 */ 127, 1389, 1197, 1197, 1192, 1166, 178, 1205, 64, 64,
147170
+ /* 30 */ 477, 887, 322, 428, 348, 37, 37, 808, 362, 888,
147171
+ /* 40 */ 509, 509, 509, 112, 113, 103, 1100, 1100, 953, 956,
147172
+ /* 50 */ 946, 946, 110, 110, 111, 111, 111, 111, 365, 252,
147173
+ /* 60 */ 252, 515, 252, 252, 497, 515, 309, 515, 459, 515,
147174
+ /* 70 */ 1079, 491, 512, 478, 6, 512, 809, 134, 498, 228,
147175
+ /* 80 */ 194, 428, 37, 37, 515, 208, 64, 64, 64, 64,
147098147176
/* 90 */ 13, 13, 109, 109, 109, 109, 108, 108, 107, 107,
147099
- /* 100 */ 107, 106, 405, 258, 385, 13, 13, 402, 401, 432,
147100
- /* 110 */ 252, 252, 374, 480, 409, 1108, 1083, 1084, 1085, 390,
147101
- /* 120 */ 1110, 394, 501, 516, 501, 1427, 1423, 308, 1109, 311,
147102
- /* 130 */ 1260, 500, 374, 503, 16, 16, 112, 113, 103, 1104,
147103
- /* 140 */ 1104, 957, 960, 950, 950, 110, 110, 111, 111, 111,
147104
- /* 150 */ 111, 262, 1111, 499, 1111, 405, 112, 113, 103, 1104,
147105
- /* 160 */ 1104, 957, 960, 950, 950, 110, 110, 111, 111, 111,
147106
- /* 170 */ 111, 129, 1429, 347, 1424, 343, 1063, 496, 1061, 263,
147107
- /* 180 */ 73, 105, 102, 197, 998, 109, 109, 109, 109, 108,
147108
- /* 190 */ 108, 107, 107, 107, 106, 405, 374, 111, 111, 111,
147109
- /* 200 */ 111, 104, 496, 89, 1436, 109, 109, 109, 109, 108,
147110
- /* 210 */ 108, 107, 107, 107, 106, 405, 111, 111, 111, 111,
147111
- /* 220 */ 112, 113, 103, 1104, 1104, 957, 960, 950, 950, 110,
147177
+ /* 100 */ 107, 106, 401, 258, 381, 13, 13, 398, 397, 428,
147178
+ /* 110 */ 252, 252, 370, 476, 405, 1104, 1079, 1080, 1081, 386,
147179
+ /* 120 */ 1106, 390, 497, 512, 497, 1423, 1419, 304, 1105, 307,
147180
+ /* 130 */ 1256, 496, 370, 499, 16, 16, 112, 113, 103, 1100,
147181
+ /* 140 */ 1100, 953, 956, 946, 946, 110, 110, 111, 111, 111,
147182
+ /* 150 */ 111, 262, 1107, 495, 1107, 401, 112, 113, 103, 1100,
147183
+ /* 160 */ 1100, 953, 956, 946, 946, 110, 110, 111, 111, 111,
147184
+ /* 170 */ 111, 129, 1425, 343, 1420, 339, 1059, 492, 1057, 263,
147185
+ /* 180 */ 73, 105, 102, 197, 994, 109, 109, 109, 109, 108,
147186
+ /* 190 */ 108, 107, 107, 107, 106, 401, 370, 111, 111, 111,
147187
+ /* 200 */ 111, 104, 492, 89, 1432, 109, 109, 109, 109, 108,
147188
+ /* 210 */ 108, 107, 107, 107, 106, 401, 111, 111, 111, 111,
147189
+ /* 220 */ 112, 113, 103, 1100, 1100, 953, 956, 946, 946, 110,
147112147190
/* 230 */ 110, 111, 111, 111, 111, 109, 109, 109, 109, 108,
147113
- /* 240 */ 108, 107, 107, 107, 106, 405, 114, 108, 108, 107,
147114
- /* 250 */ 107, 107, 106, 405, 109, 109, 109, 109, 108, 108,
147115
- /* 260 */ 107, 107, 107, 106, 405, 152, 403, 403, 403, 109,
147116
- /* 270 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 405,
147117
- /* 280 */ 178, 497, 1416, 438, 1041, 1490, 1083, 519, 1490, 374,
147118
- /* 290 */ 425, 301, 361, 416, 74, 1083, 109, 109, 109, 109,
147119
- /* 300 */ 108, 108, 107, 107, 107, 106, 405, 1417, 37, 37,
147120
- /* 310 */ 1435, 274, 510, 112, 113, 103, 1104, 1104, 957, 960,
147121
- /* 320 */ 950, 950, 110, 110, 111, 111, 111, 111, 1440, 524,
147122
- /* 330 */ 2, 1132, 1083, 1084, 1085, 434, 275, 1083, 127, 370,
147123
- /* 340 */ 937, 1083, 1084, 1085, 220, 1209, 917, 462, 459, 458,
147124
- /* 350 */ 396, 167, 519, 1039, 152, 449, 928, 457, 152, 878,
147125
- /* 360 */ 927, 293, 109, 109, 109, 109, 108, 108, 107, 107,
147126
- /* 370 */ 107, 106, 405, 13, 13, 261, 857, 252, 252, 227,
147127
- /* 380 */ 106, 405, 374, 1083, 1084, 1085, 315, 392, 1083, 300,
147128
- /* 390 */ 516, 927, 927, 929, 231, 327, 1259, 1392, 1427, 494,
147129
- /* 400 */ 274, 510, 12, 208, 274, 510, 112, 113, 103, 1104,
147130
- /* 410 */ 1104, 957, 960, 950, 950, 110, 110, 111, 111, 111,
147131
- /* 420 */ 111, 1444, 290, 1132, 292, 1083, 1101, 247, 275, 1102,
147132
- /* 430 */ 127, 391, 409, 393, 1083, 1084, 1085, 1209, 159, 238,
147133
- /* 440 */ 255, 325, 465, 320, 464, 225, 794, 105, 102, 197,
147134
- /* 450 */ 517, 318, 846, 846, 449, 109, 109, 109, 109, 108,
147135
- /* 460 */ 108, 107, 107, 107, 106, 405, 519, 518, 519, 252,
147136
- /* 470 */ 252, 1083, 1084, 1085, 439, 374, 1102, 937, 1464, 798,
147137
- /* 480 */ 274, 510, 516, 105, 102, 197, 340, 63, 63, 64,
147138
- /* 490 */ 64, 27, 794, 928, 291, 208, 1358, 927, 519, 112,
147139
- /* 500 */ 113, 103, 1104, 1104, 957, 960, 950, 950, 110, 110,
147140
- /* 510 */ 111, 111, 111, 111, 107, 107, 107, 106, 405, 49,
147141
- /* 520 */ 49, 519, 28, 1083, 409, 501, 425, 301, 927, 927,
147142
- /* 530 */ 929, 186, 472, 1083, 471, 1003, 1003, 446, 519, 1083,
147143
- /* 540 */ 338, 519, 45, 45, 1087, 346, 173, 168, 109, 109,
147144
- /* 550 */ 109, 109, 108, 108, 107, 107, 107, 106, 405, 13,
147145
- /* 560 */ 13, 205, 13, 13, 252, 252, 1199, 1199, 374, 1083,
147146
- /* 570 */ 1084, 1085, 791, 265, 5, 363, 498, 516, 473, 1083,
147147
- /* 580 */ 1084, 1085, 402, 401, 1083, 1083, 1084, 1085, 3, 282,
147148
- /* 590 */ 1083, 1087, 112, 113, 103, 1104, 1104, 957, 960, 950,
147149
- /* 600 */ 950, 110, 110, 111, 111, 111, 111, 252, 252, 1019,
147150
- /* 610 */ 220, 1083, 877, 462, 459, 458, 947, 947, 958, 961,
147151
- /* 620 */ 516, 252, 252, 457, 1020, 1083, 449, 1111, 1213, 1111,
147152
- /* 630 */ 1083, 1084, 1085, 519, 516, 430, 1083, 1084, 1085, 1021,
147153
- /* 640 */ 516, 109, 109, 109, 109, 108, 108, 107, 107, 107,
147154
- /* 650 */ 106, 405, 1056, 519, 50, 50, 519, 1083, 1084, 1085,
147155
- /* 660 */ 832, 374, 1055, 383, 415, 1068, 1362, 207, 412, 777,
147156
- /* 670 */ 833, 1083, 1084, 1085, 64, 64, 326, 64, 64, 1306,
147157
- /* 680 */ 951, 415, 414, 1362, 1364, 112, 113, 103, 1104, 1104,
147158
- /* 690 */ 957, 960, 950, 950, 110, 110, 111, 111, 111, 111,
147159
- /* 700 */ 298, 486, 519, 1041, 1491, 519, 438, 1491, 358, 1124,
147160
- /* 710 */ 487, 1000, 917, 489, 470, 1000, 132, 178, 33, 454,
147161
- /* 720 */ 1207, 136, 410, 64, 64, 483, 64, 64, 423, 373,
147162
- /* 730 */ 283, 1150, 252, 252, 109, 109, 109, 109, 108, 108,
147163
- /* 740 */ 107, 107, 107, 106, 405, 516, 224, 444, 415, 266,
147164
- /* 750 */ 1362, 266, 252, 252, 374, 300, 420, 286, 938, 400,
147165
- /* 760 */ 980, 474, 404, 252, 252, 516, 9, 477, 231, 504,
147166
- /* 770 */ 358, 1040, 1039, 1492, 359, 378, 516, 1125, 112, 113,
147167
- /* 780 */ 103, 1104, 1104, 957, 960, 950, 950, 110, 110, 111,
147168
- /* 790 */ 111, 111, 111, 252, 252, 1019, 519, 1351, 299, 252,
147169
- /* 800 */ 252, 252, 252, 1102, 379, 249, 516, 449, 876, 326,
147170
- /* 810 */ 1020, 484, 516, 195, 516, 438, 273, 15, 15, 519,
147171
- /* 820 */ 318, 519, 95, 519, 93, 1021, 371, 109, 109, 109,
147172
- /* 830 */ 109, 108, 108, 107, 107, 107, 106, 405, 519, 1125,
147173
- /* 840 */ 39, 39, 51, 51, 52, 52, 507, 374, 519, 1208,
147174
- /* 850 */ 1102, 922, 443, 345, 133, 440, 223, 222, 221, 53,
147175
- /* 860 */ 53, 326, 1404, 765, 766, 767, 519, 374, 88, 54,
147176
- /* 870 */ 54, 112, 113, 103, 1104, 1104, 957, 960, 950, 950,
147177
- /* 880 */ 110, 110, 111, 111, 111, 111, 411, 55, 55, 196,
147178
- /* 890 */ 519, 112, 113, 103, 1104, 1104, 957, 960, 950, 950,
147179
- /* 900 */ 110, 110, 111, 111, 111, 111, 135, 264, 1153, 380,
147180
- /* 910 */ 519, 40, 40, 519, 876, 519, 997, 519, 997, 116,
147191
+ /* 240 */ 108, 107, 107, 107, 106, 401, 114, 108, 108, 107,
147192
+ /* 250 */ 107, 107, 106, 401, 109, 109, 109, 109, 108, 108,
147193
+ /* 260 */ 107, 107, 107, 106, 401, 152, 399, 399, 399, 109,
147194
+ /* 270 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 401,
147195
+ /* 280 */ 178, 493, 1412, 434, 1037, 1486, 1079, 515, 1486, 370,
147196
+ /* 290 */ 421, 297, 357, 412, 74, 1079, 109, 109, 109, 109,
147197
+ /* 300 */ 108, 108, 107, 107, 107, 106, 401, 1413, 37, 37,
147198
+ /* 310 */ 1431, 274, 506, 112, 113, 103, 1100, 1100, 953, 956,
147199
+ /* 320 */ 946, 946, 110, 110, 111, 111, 111, 111, 1436, 520,
147200
+ /* 330 */ 2, 1128, 1079, 1080, 1081, 430, 275, 1079, 127, 366,
147201
+ /* 340 */ 933, 1079, 1080, 1081, 220, 1205, 913, 458, 455, 454,
147202
+ /* 350 */ 392, 167, 515, 1035, 152, 445, 924, 453, 152, 874,
147203
+ /* 360 */ 923, 289, 109, 109, 109, 109, 108, 108, 107, 107,
147204
+ /* 370 */ 107, 106, 401, 13, 13, 261, 853, 252, 252, 227,
147205
+ /* 380 */ 106, 401, 370, 1079, 1080, 1081, 311, 388, 1079, 296,
147206
+ /* 390 */ 512, 923, 923, 925, 231, 323, 1255, 1388, 1423, 490,
147207
+ /* 400 */ 274, 506, 12, 208, 274, 506, 112, 113, 103, 1100,
147208
+ /* 410 */ 1100, 953, 956, 946, 946, 110, 110, 111, 111, 111,
147209
+ /* 420 */ 111, 1440, 286, 1128, 288, 1079, 1097, 247, 275, 1098,
147210
+ /* 430 */ 127, 387, 405, 389, 1079, 1080, 1081, 1205, 159, 238,
147211
+ /* 440 */ 255, 321, 461, 316, 460, 225, 790, 105, 102, 197,
147212
+ /* 450 */ 513, 314, 842, 842, 445, 109, 109, 109, 109, 108,
147213
+ /* 460 */ 108, 107, 107, 107, 106, 401, 515, 514, 515, 252,
147214
+ /* 470 */ 252, 1079, 1080, 1081, 435, 370, 1098, 933, 1460, 794,
147215
+ /* 480 */ 274, 506, 512, 105, 102, 197, 336, 63, 63, 64,
147216
+ /* 490 */ 64, 27, 790, 924, 287, 208, 1354, 923, 515, 112,
147217
+ /* 500 */ 113, 103, 1100, 1100, 953, 956, 946, 946, 110, 110,
147218
+ /* 510 */ 111, 111, 111, 111, 107, 107, 107, 106, 401, 49,
147219
+ /* 520 */ 49, 515, 28, 1079, 405, 497, 421, 297, 923, 923,
147220
+ /* 530 */ 925, 186, 468, 1079, 467, 999, 999, 442, 515, 1079,
147221
+ /* 540 */ 334, 515, 45, 45, 1083, 342, 173, 168, 109, 109,
147222
+ /* 550 */ 109, 109, 108, 108, 107, 107, 107, 106, 401, 13,
147223
+ /* 560 */ 13, 205, 13, 13, 252, 252, 1195, 1195, 370, 1079,
147224
+ /* 570 */ 1080, 1081, 787, 265, 5, 359, 494, 512, 469, 1079,
147225
+ /* 580 */ 1080, 1081, 398, 397, 1079, 1079, 1080, 1081, 3, 282,
147226
+ /* 590 */ 1079, 1083, 112, 113, 103, 1100, 1100, 953, 956, 946,
147227
+ /* 600 */ 946, 110, 110, 111, 111, 111, 111, 252, 252, 1015,
147228
+ /* 610 */ 220, 1079, 873, 458, 455, 454, 943, 943, 954, 957,
147229
+ /* 620 */ 512, 252, 252, 453, 1016, 1079, 445, 1107, 1209, 1107,
147230
+ /* 630 */ 1079, 1080, 1081, 515, 512, 426, 1079, 1080, 1081, 1017,
147231
+ /* 640 */ 512, 109, 109, 109, 109, 108, 108, 107, 107, 107,
147232
+ /* 650 */ 106, 401, 1052, 515, 50, 50, 515, 1079, 1080, 1081,
147233
+ /* 660 */ 828, 370, 1051, 379, 411, 1064, 1358, 207, 408, 773,
147234
+ /* 670 */ 829, 1079, 1080, 1081, 64, 64, 322, 64, 64, 1302,
147235
+ /* 680 */ 947, 411, 410, 1358, 1360, 112, 113, 103, 1100, 1100,
147236
+ /* 690 */ 953, 956, 946, 946, 110, 110, 111, 111, 111, 111,
147237
+ /* 700 */ 294, 482, 515, 1037, 1487, 515, 434, 1487, 354, 1120,
147238
+ /* 710 */ 483, 996, 913, 485, 466, 996, 132, 178, 33, 450,
147239
+ /* 720 */ 1203, 136, 406, 64, 64, 479, 64, 64, 419, 369,
147240
+ /* 730 */ 283, 1146, 252, 252, 109, 109, 109, 109, 108, 108,
147241
+ /* 740 */ 107, 107, 107, 106, 401, 512, 224, 440, 411, 266,
147242
+ /* 750 */ 1358, 266, 252, 252, 370, 296, 416, 284, 934, 396,
147243
+ /* 760 */ 976, 470, 400, 252, 252, 512, 9, 473, 231, 500,
147244
+ /* 770 */ 354, 1036, 1035, 1488, 355, 374, 512, 1121, 112, 113,
147245
+ /* 780 */ 103, 1100, 1100, 953, 956, 946, 946, 110, 110, 111,
147246
+ /* 790 */ 111, 111, 111, 252, 252, 1015, 515, 1347, 295, 252,
147247
+ /* 800 */ 252, 252, 252, 1098, 375, 249, 512, 445, 872, 322,
147248
+ /* 810 */ 1016, 480, 512, 195, 512, 434, 273, 15, 15, 515,
147249
+ /* 820 */ 314, 515, 95, 515, 93, 1017, 367, 109, 109, 109,
147250
+ /* 830 */ 109, 108, 108, 107, 107, 107, 106, 401, 515, 1121,
147251
+ /* 840 */ 39, 39, 51, 51, 52, 52, 503, 370, 515, 1204,
147252
+ /* 850 */ 1098, 918, 439, 341, 133, 436, 223, 222, 221, 53,
147253
+ /* 860 */ 53, 322, 1400, 761, 762, 763, 515, 370, 88, 54,
147254
+ /* 870 */ 54, 112, 113, 103, 1100, 1100, 953, 956, 946, 946,
147255
+ /* 880 */ 110, 110, 111, 111, 111, 111, 407, 55, 55, 196,
147256
+ /* 890 */ 515, 112, 113, 103, 1100, 1100, 953, 956, 946, 946,
147257
+ /* 900 */ 110, 110, 111, 111, 111, 111, 135, 264, 1149, 376,
147258
+ /* 910 */ 515, 40, 40, 515, 872, 515, 993, 515, 993, 116,
147181147259
/* 920 */ 109, 109, 109, 109, 108, 108, 107, 107, 107, 106,
147182
- /* 930 */ 405, 41, 41, 519, 43, 43, 44, 44, 56, 56,
147260
+ /* 930 */ 401, 41, 41, 515, 43, 43, 44, 44, 56, 56,
147183147261
/* 940 */ 109, 109, 109, 109, 108, 108, 107, 107, 107, 106,
147184
- /* 950 */ 405, 519, 383, 519, 57, 57, 519, 803, 519, 383,
147185
- /* 960 */ 519, 449, 200, 519, 327, 519, 1401, 519, 1463, 519,
147186
- /* 970 */ 1291, 821, 58, 58, 14, 14, 519, 59, 59, 118,
147187
- /* 980 */ 118, 60, 60, 519, 46, 46, 61, 61, 62, 62,
147188
- /* 990 */ 47, 47, 519, 190, 189, 91, 519, 140, 140, 519,
147189
- /* 1000 */ 398, 519, 277, 1204, 141, 141, 519, 1119, 519, 996,
147190
- /* 1010 */ 519, 996, 519, 69, 69, 374, 278, 48, 48, 259,
147262
+ /* 950 */ 401, 515, 379, 515, 57, 57, 515, 799, 515, 379,
147263
+ /* 960 */ 515, 445, 200, 515, 323, 515, 1397, 515, 1459, 515,
147264
+ /* 970 */ 1287, 817, 58, 58, 14, 14, 515, 59, 59, 118,
147265
+ /* 980 */ 118, 60, 60, 515, 46, 46, 61, 61, 62, 62,
147266
+ /* 990 */ 47, 47, 515, 190, 189, 91, 515, 140, 140, 515,
147267
+ /* 1000 */ 394, 515, 277, 1200, 141, 141, 515, 1115, 515, 992,
147268
+ /* 1010 */ 515, 992, 515, 69, 69, 370, 278, 48, 48, 259,
147191147269
/* 1020 */ 65, 65, 119, 119, 246, 246, 260, 66, 66, 120,
147192
- /* 1030 */ 120, 121, 121, 117, 117, 374, 519, 516, 387, 112,
147193
- /* 1040 */ 113, 103, 1104, 1104, 957, 960, 950, 950, 110, 110,
147194
- /* 1050 */ 111, 111, 111, 111, 519, 876, 519, 139, 139, 112,
147195
- /* 1060 */ 113, 103, 1104, 1104, 957, 960, 950, 950, 110, 110,
147196
- /* 1070 */ 111, 111, 111, 111, 1291, 138, 138, 125, 125, 519,
147197
- /* 1080 */ 12, 519, 281, 1291, 519, 449, 131, 1291, 109, 109,
147198
- /* 1090 */ 109, 109, 108, 108, 107, 107, 107, 106, 405, 519,
147199
- /* 1100 */ 124, 124, 122, 122, 519, 123, 123, 519, 109, 109,
147200
- /* 1110 */ 109, 109, 108, 108, 107, 107, 107, 106, 405, 519,
147201
- /* 1120 */ 68, 68, 467, 787, 519, 70, 70, 306, 67, 67,
147202
- /* 1130 */ 1036, 253, 253, 360, 1291, 191, 196, 1437, 469, 1305,
147203
- /* 1140 */ 38, 38, 388, 94, 516, 42, 42, 177, 852, 274,
147204
- /* 1150 */ 510, 389, 424, 851, 1360, 445, 512, 380, 381, 153,
147205
- /* 1160 */ 427, 876, 436, 374, 224, 251, 194, 891, 182, 297,
147206
- /* 1170 */ 787, 852, 88, 254, 470, 892, 851, 919, 811, 810,
147207
- /* 1180 */ 230, 1245, 914, 374, 17, 417, 801, 112, 113, 103,
147208
- /* 1190 */ 1104, 1104, 957, 960, 950, 950, 110, 110, 111, 111,
147209
- /* 1200 */ 111, 111, 399, 818, 819, 1179, 987, 112, 101, 103,
147210
- /* 1210 */ 1104, 1104, 957, 960, 950, 950, 110, 110, 111, 111,
147211
- /* 1220 */ 111, 111, 379, 426, 431, 433, 302, 230, 230, 88,
147212
- /* 1230 */ 1244, 455, 316, 801, 226, 88, 109, 109, 109, 109,
147213
- /* 1240 */ 108, 108, 107, 107, 107, 106, 405, 86, 437, 983,
147214
- /* 1250 */ 931, 885, 226, 987, 230, 419, 109, 109, 109, 109,
147215
- /* 1260 */ 108, 108, 107, 107, 107, 106, 405, 324, 849, 785,
147216
- /* 1270 */ 850, 100, 130, 100, 1407, 294, 374, 323, 1381, 1380,
147217
- /* 1280 */ 441, 1453, 303, 1241, 307, 310, 312, 314, 1192, 1178,
147218
- /* 1290 */ 1177, 1176, 319, 328, 329, 1232, 374, 931, 1253, 271,
147219
- /* 1300 */ 1290, 113, 103, 1104, 1104, 957, 960, 950, 950, 110,
147220
- /* 1310 */ 110, 111, 111, 111, 111, 1228, 1239, 506, 505, 1296,
147221
- /* 1320 */ 1225, 1159, 103, 1104, 1104, 957, 960, 950, 950, 110,
147222
- /* 1330 */ 110, 111, 111, 111, 111, 1152, 1141, 1140, 1142, 1447,
147223
- /* 1340 */ 450, 244, 184, 98, 511, 188, 4, 357, 331, 109,
147224
- /* 1350 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 405,
147225
- /* 1360 */ 514, 333, 335, 199, 418, 460, 296, 289, 322, 109,
147226
- /* 1370 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 405,
147227
- /* 1380 */ 11, 285, 1283, 406, 365, 192, 1175, 1355, 435, 509,
147228
- /* 1390 */ 350, 1354, 337, 98, 511, 508, 4, 187, 1450, 1119,
147229
- /* 1400 */ 233, 1400, 155, 1398, 1116, 152, 72, 75, 382, 429,
147230
- /* 1410 */ 514, 165, 115, 499, 937, 1280, 1275, 30, 149, 157,
147231
- /* 1420 */ 96, 96, 8, 284, 86, 288, 287, 97, 1272, 406,
147232
- /* 1430 */ 521, 520, 421, 406, 927, 422, 453, 210, 160, 161,
147233
- /* 1440 */ 162, 163, 362, 428, 1286, 508, 442, 214, 80, 364,
147234
- /* 1450 */ 31, 274, 510, 169, 1349, 448, 492, 245, 1369, 216,
147235
- /* 1460 */ 174, 491, 451, 309, 937, 927, 927, 929, 930, 24,
147236
- /* 1470 */ 96, 96, 305, 217, 367, 466, 1143, 97, 218, 406,
147237
- /* 1480 */ 521, 520, 1195, 1194, 927, 1193, 395, 803, 98, 511,
147238
- /* 1490 */ 368, 4, 1186, 1167, 1185, 269, 1166, 321, 1165, 1462,
147239
- /* 1500 */ 397, 270, 485, 476, 479, 514, 85, 232, 1236, 98,
147240
- /* 1510 */ 511, 330, 4, 490, 340, 927, 927, 929, 930, 24,
147241
- /* 1520 */ 1439, 1072, 408, 1237, 339, 256, 514, 1418, 406, 10,
147242
- /* 1530 */ 356, 356, 355, 241, 353, 181, 92, 774, 1235, 1218,
147243
- /* 1540 */ 508, 342, 87, 332, 334, 1217, 1234, 336, 344, 406,
147244
- /* 1550 */ 201, 492, 280, 183, 488, 348, 493, 349, 239, 937,
147245
- /* 1560 */ 279, 508, 1335, 29, 1149, 96, 96, 522, 1078, 272,
147246
- /* 1570 */ 243, 240, 97, 242, 406, 521, 520, 523, 1138, 927,
147247
- /* 1580 */ 937, 142, 1133, 1385, 143, 1386, 96, 96, 856, 376,
147248
- /* 1590 */ 203, 761, 154, 97, 1384, 406, 521, 520, 204, 377,
147249
- /* 1600 */ 927, 146, 144, 1383, 407, 1163, 1162, 128, 202, 71,
147250
- /* 1610 */ 927, 927, 929, 930, 24, 267, 1160, 185, 276, 198,
147251
- /* 1620 */ 257, 98, 511, 126, 4, 911, 995, 156, 993, 145,
147252
- /* 1630 */ 206, 927, 927, 929, 930, 24, 158, 835, 514, 209,
147253
- /* 1640 */ 295, 1009, 375, 164, 915, 147, 384, 274, 510, 386,
147254
- /* 1650 */ 166, 76, 77, 78, 148, 1012, 211, 212, 1008, 137,
147255
- /* 1660 */ 18, 406, 79, 213, 304, 1001, 1113, 230, 447, 215,
147256
- /* 1670 */ 413, 171, 32, 508, 323, 776, 170, 452, 172, 219,
147257
- /* 1680 */ 456, 81, 19, 20, 492, 317, 461, 82, 268, 491,
147258
- /* 1690 */ 150, 814, 937, 179, 83, 468, 151, 180, 96, 96,
147259
- /* 1700 */ 963, 84, 1044, 34, 475, 97, 1045, 406, 521, 520,
147260
- /* 1710 */ 1072, 408, 927, 35, 256, 884, 478, 248, 193, 356,
147261
- /* 1720 */ 356, 355, 241, 353, 250, 175, 774, 229, 879, 21,
147262
- /* 1730 */ 100, 98, 511, 22, 4, 1058, 1049, 176, 341, 201,
147263
- /* 1740 */ 7, 280, 1062, 927, 927, 929, 930, 24, 514, 279,
147264
- /* 1750 */ 88, 1060, 23, 978, 964, 962, 966, 1018, 1017, 967,
147265
- /* 1760 */ 235, 90, 511, 234, 4, 25, 36, 515, 932, 786,
147266
- /* 1770 */ 845, 406, 99, 26, 236, 237, 351, 1455, 514, 203,
147267
- /* 1780 */ 354, 1454, 1073, 508, 1129, 1129, 1129, 204, 1129, 1129,
147268
- /* 1790 */ 146, 1129, 1129, 1129, 1129, 1129, 1129, 202, 1129, 1129,
147269
- /* 1800 */ 1129, 406, 937, 1129, 1129, 1129, 1129, 1129, 96, 96,
147270
- /* 1810 */ 1129, 1129, 1129, 508, 1129, 97, 1129, 406, 521, 520,
147271
- /* 1820 */ 1129, 1129, 927, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147272
- /* 1830 */ 1129, 375, 937, 1129, 1129, 1129, 274, 510, 96, 96,
147273
- /* 1840 */ 1129, 1129, 1129, 1129, 1129, 97, 1129, 406, 521, 520,
147274
- /* 1850 */ 1129, 1129, 927, 927, 927, 929, 930, 24, 1129, 413,
147275
- /* 1860 */ 1129, 1129, 1129, 256, 1129, 1129, 1129, 1129, 356, 356,
147276
- /* 1870 */ 355, 241, 353, 1129, 1129, 774, 1129, 1129, 1129, 1129,
147277
- /* 1880 */ 1129, 1129, 1129, 927, 927, 929, 930, 24, 201, 1129,
147278
- /* 1890 */ 280, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 279, 1129,
147279
- /* 1900 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147280
- /* 1910 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147281
- /* 1920 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 203, 1129,
147282
- /* 1930 */ 1129, 1129, 1129, 1129, 1129, 1129, 204, 1129, 1129, 146,
147283
- /* 1940 */ 1129, 1129, 1129, 1129, 1129, 1129, 202, 1129, 1129, 1129,
147284
- /* 1950 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147285
- /* 1960 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147286
- /* 1970 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147287
- /* 1980 */ 375, 1129, 1129, 1129, 1129, 274, 510, 1129, 1129, 1129,
147288
- /* 1990 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147289
- /* 2000 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 413,
147270
+ /* 1030 */ 120, 121, 121, 117, 117, 370, 515, 512, 383, 112,
147271
+ /* 1040 */ 113, 103, 1100, 1100, 953, 956, 946, 946, 110, 110,
147272
+ /* 1050 */ 111, 111, 111, 111, 515, 872, 515, 139, 139, 112,
147273
+ /* 1060 */ 113, 103, 1100, 1100, 953, 956, 946, 946, 110, 110,
147274
+ /* 1070 */ 111, 111, 111, 111, 1287, 138, 138, 125, 125, 515,
147275
+ /* 1080 */ 12, 515, 281, 1287, 515, 445, 131, 1287, 109, 109,
147276
+ /* 1090 */ 109, 109, 108, 108, 107, 107, 107, 106, 401, 515,
147277
+ /* 1100 */ 124, 124, 122, 122, 515, 123, 123, 515, 109, 109,
147278
+ /* 1110 */ 109, 109, 108, 108, 107, 107, 107, 106, 401, 515,
147279
+ /* 1120 */ 68, 68, 463, 783, 515, 70, 70, 302, 67, 67,
147280
+ /* 1130 */ 1032, 253, 253, 356, 1287, 191, 196, 1433, 465, 1301,
147281
+ /* 1140 */ 38, 38, 384, 94, 512, 42, 42, 177, 848, 274,
147282
+ /* 1150 */ 506, 385, 420, 847, 1356, 441, 508, 376, 377, 153,
147283
+ /* 1160 */ 423, 872, 432, 370, 224, 251, 194, 887, 182, 293,
147284
+ /* 1170 */ 783, 848, 88, 254, 466, 888, 847, 915, 807, 806,
147285
+ /* 1180 */ 230, 1241, 910, 370, 17, 413, 797, 112, 113, 103,
147286
+ /* 1190 */ 1100, 1100, 953, 956, 946, 946, 110, 110, 111, 111,
147287
+ /* 1200 */ 111, 111, 395, 814, 815, 1175, 983, 112, 101, 103,
147288
+ /* 1210 */ 1100, 1100, 953, 956, 946, 946, 110, 110, 111, 111,
147289
+ /* 1220 */ 111, 111, 375, 422, 427, 429, 298, 230, 230, 88,
147290
+ /* 1230 */ 1240, 451, 312, 797, 226, 88, 109, 109, 109, 109,
147291
+ /* 1240 */ 108, 108, 107, 107, 107, 106, 401, 86, 433, 979,
147292
+ /* 1250 */ 927, 881, 226, 983, 230, 415, 109, 109, 109, 109,
147293
+ /* 1260 */ 108, 108, 107, 107, 107, 106, 401, 320, 845, 781,
147294
+ /* 1270 */ 846, 100, 130, 100, 1403, 290, 370, 319, 1377, 1376,
147295
+ /* 1280 */ 437, 1449, 299, 1237, 303, 306, 308, 310, 1188, 1174,
147296
+ /* 1290 */ 1173, 1172, 315, 324, 325, 1228, 370, 927, 1249, 271,
147297
+ /* 1300 */ 1286, 113, 103, 1100, 1100, 953, 956, 946, 946, 110,
147298
+ /* 1310 */ 110, 111, 111, 111, 111, 1224, 1235, 502, 501, 1292,
147299
+ /* 1320 */ 1221, 1155, 103, 1100, 1100, 953, 956, 946, 946, 110,
147300
+ /* 1330 */ 110, 111, 111, 111, 111, 1148, 1137, 1136, 1138, 1443,
147301
+ /* 1340 */ 446, 244, 184, 98, 507, 188, 4, 353, 327, 109,
147302
+ /* 1350 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 401,
147303
+ /* 1360 */ 510, 329, 331, 199, 414, 456, 292, 285, 318, 109,
147304
+ /* 1370 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 401,
147305
+ /* 1380 */ 11, 1271, 1279, 402, 361, 192, 1171, 1351, 431, 505,
147306
+ /* 1390 */ 346, 1350, 333, 98, 507, 504, 4, 187, 1446, 1115,
147307
+ /* 1400 */ 233, 1396, 155, 1394, 1112, 152, 72, 75, 378, 425,
147308
+ /* 1410 */ 510, 165, 149, 157, 933, 1276, 86, 30, 1268, 417,
147309
+ /* 1420 */ 96, 96, 8, 160, 161, 162, 163, 97, 418, 402,
147310
+ /* 1430 */ 517, 516, 449, 402, 923, 210, 358, 424, 1282, 438,
147311
+ /* 1440 */ 169, 214, 360, 1345, 80, 504, 31, 444, 1365, 301,
147312
+ /* 1450 */ 245, 274, 506, 216, 174, 305, 488, 447, 217, 462,
147313
+ /* 1460 */ 1139, 487, 218, 363, 933, 923, 923, 925, 926, 24,
147314
+ /* 1470 */ 96, 96, 1191, 1190, 1189, 391, 1182, 97, 1163, 402,
147315
+ /* 1480 */ 517, 516, 799, 364, 923, 1162, 317, 1161, 98, 507,
147316
+ /* 1490 */ 1181, 4, 1458, 472, 393, 269, 270, 475, 481, 1232,
147317
+ /* 1500 */ 85, 1233, 326, 328, 232, 510, 495, 1231, 330, 98,
147318
+ /* 1510 */ 507, 1230, 4, 486, 335, 923, 923, 925, 926, 24,
147319
+ /* 1520 */ 1435, 1068, 404, 181, 336, 256, 510, 115, 402, 332,
147320
+ /* 1530 */ 352, 352, 351, 241, 349, 1214, 1414, 770, 338, 10,
147321
+ /* 1540 */ 504, 340, 272, 92, 1331, 1213, 87, 183, 484, 402,
147322
+ /* 1550 */ 201, 488, 280, 239, 344, 345, 489, 1145, 29, 933,
147323
+ /* 1560 */ 279, 504, 1074, 518, 240, 96, 96, 242, 243, 519,
147324
+ /* 1570 */ 1134, 1129, 97, 154, 402, 517, 516, 372, 373, 923,
147325
+ /* 1580 */ 933, 142, 143, 128, 1381, 267, 96, 96, 852, 757,
147326
+ /* 1590 */ 203, 144, 403, 97, 1382, 402, 517, 516, 204, 1380,
147327
+ /* 1600 */ 923, 146, 1379, 1159, 1158, 71, 1156, 276, 202, 185,
147328
+ /* 1610 */ 923, 923, 925, 926, 24, 198, 257, 126, 991, 989,
147329
+ /* 1620 */ 907, 98, 507, 156, 4, 145, 158, 206, 831, 209,
147330
+ /* 1630 */ 291, 923, 923, 925, 926, 24, 1005, 911, 510, 164,
147331
+ /* 1640 */ 147, 380, 371, 382, 166, 76, 77, 274, 506, 148,
147332
+ /* 1650 */ 78, 79, 1008, 211, 212, 1004, 137, 213, 18, 300,
147333
+ /* 1660 */ 230, 402, 997, 1109, 443, 215, 32, 170, 171, 772,
147334
+ /* 1670 */ 409, 448, 319, 504, 219, 172, 452, 81, 19, 457,
147335
+ /* 1680 */ 313, 20, 82, 268, 488, 150, 810, 179, 83, 487,
147336
+ /* 1690 */ 464, 151, 933, 180, 959, 84, 1040, 34, 96, 96,
147337
+ /* 1700 */ 471, 1041, 35, 474, 193, 97, 248, 402, 517, 516,
147338
+ /* 1710 */ 1068, 404, 923, 250, 256, 880, 229, 175, 875, 352,
147339
+ /* 1720 */ 352, 351, 241, 349, 100, 21, 770, 22, 1054, 1056,
147340
+ /* 1730 */ 7, 98, 507, 1045, 4, 337, 1058, 23, 974, 201,
147341
+ /* 1740 */ 176, 280, 88, 923, 923, 925, 926, 24, 510, 279,
147342
+ /* 1750 */ 960, 958, 962, 1014, 963, 1013, 235, 234, 25, 36,
147343
+ /* 1760 */ 99, 90, 507, 928, 4, 511, 350, 782, 26, 841,
147344
+ /* 1770 */ 236, 402, 347, 1069, 237, 1125, 1125, 1451, 510, 203,
147345
+ /* 1780 */ 1450, 1125, 1125, 504, 1125, 1125, 1125, 204, 1125, 1125,
147346
+ /* 1790 */ 146, 1125, 1125, 1125, 1125, 1125, 1125, 202, 1125, 1125,
147347
+ /* 1800 */ 1125, 402, 933, 1125, 1125, 1125, 1125, 1125, 96, 96,
147348
+ /* 1810 */ 1125, 1125, 1125, 504, 1125, 97, 1125, 402, 517, 516,
147349
+ /* 1820 */ 1125, 1125, 923, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147350
+ /* 1830 */ 1125, 371, 933, 1125, 1125, 1125, 274, 506, 96, 96,
147351
+ /* 1840 */ 1125, 1125, 1125, 1125, 1125, 97, 1125, 402, 517, 516,
147352
+ /* 1850 */ 1125, 1125, 923, 923, 923, 925, 926, 24, 1125, 409,
147353
+ /* 1860 */ 1125, 1125, 1125, 256, 1125, 1125, 1125, 1125, 352, 352,
147354
+ /* 1870 */ 351, 241, 349, 1125, 1125, 770, 1125, 1125, 1125, 1125,
147355
+ /* 1880 */ 1125, 1125, 1125, 923, 923, 925, 926, 24, 201, 1125,
147356
+ /* 1890 */ 280, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 279, 1125,
147357
+ /* 1900 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147358
+ /* 1910 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147359
+ /* 1920 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 203, 1125,
147360
+ /* 1930 */ 1125, 1125, 1125, 1125, 1125, 1125, 204, 1125, 1125, 146,
147361
+ /* 1940 */ 1125, 1125, 1125, 1125, 1125, 1125, 202, 1125, 1125, 1125,
147362
+ /* 1950 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147363
+ /* 1960 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147364
+ /* 1970 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147365
+ /* 1980 */ 371, 1125, 1125, 1125, 1125, 274, 506, 1125, 1125, 1125,
147366
+ /* 1990 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147367
+ /* 2000 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 409,
147290147368
};
147291147369
static const YYCODETYPE yy_lookahead[] = {
147292147370
/* 0 */ 184, 238, 239, 240, 238, 239, 240, 163, 155, 156,
147293147371
/* 10 */ 157, 158, 159, 160, 163, 191, 192, 183, 165, 19,
147294147372
/* 20 */ 167, 258, 202, 203, 200, 191, 163, 174, 184, 185,
@@ -147428,48 +147506,48 @@
147428147506
/* 1360 */ 36, 222, 222, 260, 226, 188, 256, 226, 187, 92,
147429147507
/* 1370 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
147430147508
/* 1380 */ 210, 213, 213, 59, 213, 196, 192, 187, 256, 244,
147431147509
/* 1390 */ 212, 187, 226, 19, 20, 71, 22, 210, 166, 60,
147432147510
/* 1400 */ 130, 170, 260, 170, 38, 81, 257, 257, 170, 104,
147433
- /* 1410 */ 36, 22, 137, 134, 90, 236, 217, 235, 43, 201,
147434
- /* 1420 */ 96, 97, 48, 216, 138, 213, 216, 103, 217, 105,
147435
- /* 1430 */ 106, 107, 18, 59, 110, 170, 18, 169, 204, 204,
147436
- /* 1440 */ 204, 204, 213, 213, 201, 71, 170, 169, 146, 236,
147437
- /* 1450 */ 235, 127, 128, 201, 213, 62, 82, 170, 253, 169,
147438
- /* 1460 */ 22, 87, 189, 170, 90, 141, 142, 143, 144, 145,
147439
- /* 1470 */ 96, 97, 252, 169, 189, 104, 170, 103, 169, 105,
147440
- /* 1480 */ 106, 107, 186, 186, 110, 186, 64, 115, 19, 20,
147441
- /* 1490 */ 189, 22, 194, 186, 194, 246, 188, 186, 186, 186,
147442
- /* 1500 */ 102, 246, 133, 189, 189, 36, 104, 170, 228, 19,
147443
- /* 1510 */ 20, 227, 22, 84, 22, 141, 142, 143, 144, 145,
147444
- /* 1520 */ 0, 1, 2, 228, 271, 5, 36, 269, 59, 22,
147445
- /* 1530 */ 10, 11, 12, 13, 14, 216, 146, 17, 228, 217,
147446
- /* 1540 */ 71, 216, 136, 227, 227, 217, 228, 227, 170, 59,
147447
- /* 1550 */ 30, 82, 32, 215, 135, 214, 87, 213, 25, 90,
147448
- /* 1560 */ 40, 71, 241, 26, 173, 96, 97, 172, 13, 243,
147449
- /* 1570 */ 6, 164, 103, 164, 105, 106, 107, 162, 162, 110,
147450
- /* 1580 */ 90, 176, 162, 182, 176, 182, 96, 97, 98, 266,
147451
- /* 1590 */ 70, 4, 263, 103, 182, 105, 106, 107, 78, 266,
147452
- /* 1600 */ 110, 81, 176, 182, 3, 182, 182, 190, 88, 182,
147453
- /* 1610 */ 141, 142, 143, 144, 145, 190, 182, 22, 151, 15,
147454
- /* 1620 */ 89, 19, 20, 16, 22, 128, 23, 139, 23, 119,
147455
- /* 1630 */ 24, 141, 142, 143, 144, 145, 131, 20, 36, 133,
147456
- /* 1640 */ 16, 1, 122, 131, 140, 119, 61, 127, 128, 37,
147457
- /* 1650 */ 139, 53, 53, 53, 119, 105, 34, 130, 1, 5,
147458
- /* 1660 */ 22, 59, 53, 104, 149, 68, 75, 26, 41, 130,
147459
- /* 1670 */ 150, 104, 24, 71, 120, 20, 68, 19, 22, 114,
147460
- /* 1680 */ 67, 22, 22, 22, 82, 23, 67, 22, 67, 87,
147461
- /* 1690 */ 37, 28, 90, 23, 138, 22, 153, 23, 96, 97,
147462
- /* 1700 */ 23, 26, 23, 22, 24, 103, 23, 105, 106, 107,
147463
- /* 1710 */ 1, 2, 110, 22, 5, 105, 24, 23, 130, 10,
147464
- /* 1720 */ 11, 12, 13, 14, 23, 22, 17, 34, 132, 34,
147465
- /* 1730 */ 26, 19, 20, 34, 22, 85, 23, 26, 24, 30,
147466
- /* 1740 */ 44, 32, 75, 141, 142, 143, 144, 145, 36, 40,
147467
- /* 1750 */ 26, 83, 34, 23, 23, 23, 23, 23, 23, 11,
147468
- /* 1760 */ 22, 19, 20, 26, 22, 22, 22, 26, 23, 23,
147469
- /* 1770 */ 124, 59, 22, 22, 130, 130, 23, 130, 36, 70,
147470
- /* 1780 */ 15, 130, 1, 71, 277, 277, 277, 78, 277, 277,
147511
+ /* 1410 */ 36, 22, 43, 201, 90, 236, 138, 235, 213, 18,
147512
+ /* 1420 */ 96, 97, 48, 204, 204, 204, 204, 103, 170, 105,
147513
+ /* 1430 */ 106, 107, 18, 59, 110, 169, 213, 213, 201, 170,
147514
+ /* 1440 */ 201, 169, 236, 213, 146, 71, 235, 62, 253, 252,
147515
+ /* 1450 */ 170, 127, 128, 169, 22, 170, 82, 189, 169, 104,
147516
+ /* 1460 */ 170, 87, 169, 189, 90, 141, 142, 143, 144, 145,
147517
+ /* 1470 */ 96, 97, 186, 186, 186, 64, 194, 103, 186, 105,
147518
+ /* 1480 */ 106, 107, 115, 189, 110, 188, 186, 186, 19, 20,
147519
+ /* 1490 */ 194, 22, 186, 189, 102, 246, 246, 189, 133, 228,
147520
+ /* 1500 */ 104, 228, 227, 227, 170, 36, 134, 228, 227, 19,
147521
+ /* 1510 */ 20, 228, 22, 84, 271, 141, 142, 143, 144, 145,
147522
+ /* 1520 */ 0, 1, 2, 216, 22, 5, 36, 137, 59, 227,
147523
+ /* 1530 */ 10, 11, 12, 13, 14, 217, 269, 17, 216, 22,
147524
+ /* 1540 */ 71, 170, 243, 146, 241, 217, 136, 215, 135, 59,
147525
+ /* 1550 */ 30, 82, 32, 25, 214, 213, 87, 173, 26, 90,
147526
+ /* 1560 */ 40, 71, 13, 172, 164, 96, 97, 164, 6, 162,
147527
+ /* 1570 */ 162, 162, 103, 263, 105, 106, 107, 266, 266, 110,
147528
+ /* 1580 */ 90, 176, 176, 190, 182, 190, 96, 97, 98, 4,
147529
+ /* 1590 */ 70, 176, 3, 103, 182, 105, 106, 107, 78, 182,
147530
+ /* 1600 */ 110, 81, 182, 182, 182, 182, 182, 151, 88, 22,
147531
+ /* 1610 */ 141, 142, 143, 144, 145, 15, 89, 16, 23, 23,
147532
+ /* 1620 */ 128, 19, 20, 139, 22, 119, 131, 24, 20, 133,
147533
+ /* 1630 */ 16, 141, 142, 143, 144, 145, 1, 140, 36, 131,
147534
+ /* 1640 */ 119, 61, 122, 37, 139, 53, 53, 127, 128, 119,
147535
+ /* 1650 */ 53, 53, 105, 34, 130, 1, 5, 104, 22, 149,
147536
+ /* 1660 */ 26, 59, 68, 75, 41, 130, 24, 68, 104, 20,
147537
+ /* 1670 */ 150, 19, 120, 71, 114, 22, 67, 22, 22, 67,
147538
+ /* 1680 */ 23, 22, 22, 67, 82, 37, 28, 23, 138, 87,
147539
+ /* 1690 */ 22, 153, 90, 23, 23, 26, 23, 22, 96, 97,
147540
+ /* 1700 */ 24, 23, 22, 24, 130, 103, 23, 105, 106, 107,
147541
+ /* 1710 */ 1, 2, 110, 23, 5, 105, 34, 22, 132, 10,
147542
+ /* 1720 */ 11, 12, 13, 14, 26, 34, 17, 34, 85, 83,
147543
+ /* 1730 */ 44, 19, 20, 23, 22, 24, 75, 34, 23, 30,
147544
+ /* 1740 */ 26, 32, 26, 141, 142, 143, 144, 145, 36, 40,
147545
+ /* 1750 */ 23, 23, 23, 23, 11, 23, 22, 26, 22, 22,
147546
+ /* 1760 */ 22, 19, 20, 23, 22, 26, 15, 23, 22, 124,
147547
+ /* 1770 */ 130, 59, 23, 1, 130, 277, 277, 130, 36, 70,
147548
+ /* 1780 */ 130, 277, 277, 71, 277, 277, 277, 78, 277, 277,
147471147549
/* 1790 */ 81, 277, 277, 277, 277, 277, 277, 88, 277, 277,
147472147550
/* 1800 */ 277, 59, 90, 277, 277, 277, 277, 277, 96, 97,
147473147551
/* 1810 */ 277, 277, 277, 71, 277, 103, 277, 105, 106, 107,
147474147552
/* 1820 */ 277, 277, 110, 277, 277, 277, 277, 277, 277, 277,
147475147553
/* 1830 */ 277, 122, 90, 277, 277, 277, 127, 128, 96, 97,
@@ -147490,11 +147568,11 @@
147490147568
/* 1980 */ 122, 277, 277, 277, 277, 127, 128, 277, 277, 277,
147491147569
/* 1990 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
147492147570
/* 2000 */ 277, 277, 277, 277, 277, 277, 277, 277, 150, 277,
147493147571
/* 2010 */ 277, 277, 277, 277, 277, 277, 277, 277, 277,
147494147572
};
147495
-#define YY_SHIFT_COUNT (524)
147573
+#define YY_SHIFT_COUNT (520)
147496147574
#define YY_SHIFT_MIN (0)
147497147575
#define YY_SHIFT_MAX (1858)
147498147576
static const unsigned short int yy_shift_ofst[] = {
147499147577
/* 0 */ 1709, 1520, 1858, 1324, 1324, 277, 1374, 1469, 1602, 1712,
147500147578
/* 10 */ 1712, 1712, 273, 0, 0, 113, 1016, 1712, 1712, 1712,
@@ -147522,39 +147600,39 @@
147522147600
/* 230 */ 531, 531, 744, 531, 531, 783, 531, 531, 531, 531,
147523147601
/* 240 */ 531, 531, 531, 531, 419, 682, 327, 370, 370, 370,
147524147602
/* 250 */ 370, 1029, 327, 327, 1024, 897, 856, 947, 1109, 706,
147525147603
/* 260 */ 706, 1143, 1109, 1109, 1143, 842, 945, 1118, 1136, 1136,
147526147604
/* 270 */ 1136, 706, 676, 400, 1047, 694, 1339, 1270, 1270, 1366,
147527
- /* 280 */ 1366, 1270, 1305, 1389, 1275, 1279, 1375, 1275, 1279, 1286,
147528
- /* 290 */ 1414, 1414, 1414, 1414, 1270, 1418, 1286, 1286, 1305, 1389,
147529
- /* 300 */ 1375, 1375, 1286, 1270, 1418, 1302, 1393, 1270, 1418, 1438,
147530
- /* 310 */ 1270, 1418, 1270, 1418, 1438, 1371, 1371, 1371, 1422, 1438,
147531
- /* 320 */ 1371, 1372, 1371, 1422, 1371, 1371, 1438, 1398, 1398, 1438,
147532
- /* 330 */ 1369, 1402, 1369, 1402, 1369, 1402, 1369, 1402, 1270, 1279,
147533
- /* 340 */ 1429, 1492, 1275, 1279, 1507, 1270, 1390, 1275, 1406, 1419,
147534
- /* 350 */ 1286, 1533, 1537, 1555, 1555, 1564, 1564, 1564, 2009, 2009,
147605
+ /* 280 */ 1366, 1270, 1305, 1389, 1369, 1278, 1401, 1401, 1401, 1401,
147606
+ /* 290 */ 1270, 1414, 1278, 1278, 1305, 1389, 1369, 1369, 1278, 1270,
147607
+ /* 300 */ 1414, 1298, 1385, 1270, 1414, 1432, 1270, 1414, 1270, 1414,
147608
+ /* 310 */ 1432, 1355, 1355, 1355, 1411, 1432, 1355, 1367, 1355, 1411,
147609
+ /* 320 */ 1355, 1355, 1432, 1392, 1392, 1432, 1365, 1396, 1365, 1396,
147610
+ /* 330 */ 1365, 1396, 1365, 1396, 1270, 1372, 1429, 1502, 1390, 1372,
147611
+ /* 340 */ 1517, 1270, 1397, 1390, 1410, 1413, 1278, 1528, 1532, 1549,
147612
+ /* 350 */ 1549, 1562, 1562, 1562, 2009, 2009, 2009, 2009, 2009, 2009,
147535147613
/* 360 */ 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009,
147536
- /* 370 */ 2009, 2009, 2009, 2009, 570, 345, 686, 748, 50, 740,
147537
- /* 380 */ 1064, 1107, 469, 537, 1042, 1146, 1162, 1154, 1201, 1202,
147538
- /* 390 */ 1203, 1208, 1209, 1127, 1069, 1196, 1157, 1147, 1226, 1228,
147539
- /* 400 */ 1245, 775, 868, 1246, 1247, 1191, 1151, 1587, 1601, 1595,
147540
- /* 410 */ 1467, 1604, 1531, 1607, 1603, 1605, 1497, 1488, 1510, 1606,
147541
- /* 420 */ 1505, 1617, 1506, 1624, 1640, 1512, 1504, 1526, 1585, 1612,
147542
- /* 430 */ 1511, 1598, 1599, 1600, 1609, 1535, 1550, 1622, 1527, 1657,
147543
- /* 440 */ 1654, 1638, 1559, 1515, 1597, 1641, 1608, 1591, 1627, 1539,
147544
- /* 450 */ 1567, 1648, 1655, 1658, 1554, 1565, 1656, 1613, 1659, 1660,
147545
- /* 460 */ 1662, 1661, 1619, 1663, 1665, 1621, 1653, 1670, 1556, 1673,
147546
- /* 470 */ 1543, 1674, 1677, 1675, 1679, 1681, 1680, 1683, 1691, 1692,
147547
- /* 480 */ 1588, 1694, 1701, 1610, 1693, 1703, 1596, 1704, 1695, 1704,
147548
- /* 490 */ 1699, 1650, 1667, 1668, 1696, 1713, 1714, 1711, 1724, 1718,
147549
- /* 500 */ 1730, 1704, 1731, 1732, 1733, 1734, 1737, 1735, 1738, 1748,
147550
- /* 510 */ 1743, 1744, 1745, 1746, 1750, 1751, 1741, 1646, 1644, 1645,
147551
- /* 520 */ 1647, 1651, 1753, 1765, 1781,
147614
+ /* 370 */ 570, 345, 686, 748, 50, 740, 1064, 1107, 469, 537,
147615
+ /* 380 */ 1042, 1146, 1162, 1154, 1201, 1202, 1203, 1208, 1209, 1127,
147616
+ /* 390 */ 1069, 1196, 1157, 1147, 1226, 1228, 1245, 775, 868, 1246,
147617
+ /* 400 */ 1247, 1191, 1151, 1585, 1589, 1587, 1456, 1600, 1527, 1601,
147618
+ /* 410 */ 1595, 1596, 1492, 1484, 1506, 1603, 1495, 1608, 1496, 1614,
147619
+ /* 420 */ 1635, 1508, 1497, 1521, 1580, 1606, 1505, 1592, 1593, 1597,
147620
+ /* 430 */ 1598, 1530, 1547, 1619, 1524, 1654, 1651, 1636, 1553, 1510,
147621
+ /* 440 */ 1594, 1634, 1599, 1588, 1623, 1535, 1564, 1642, 1649, 1652,
147622
+ /* 450 */ 1552, 1560, 1653, 1609, 1655, 1656, 1657, 1659, 1612, 1658,
147623
+ /* 460 */ 1660, 1616, 1648, 1664, 1550, 1668, 1538, 1670, 1671, 1669,
147624
+ /* 470 */ 1673, 1675, 1676, 1678, 1680, 1679, 1574, 1683, 1690, 1610,
147625
+ /* 480 */ 1682, 1695, 1586, 1698, 1691, 1698, 1693, 1643, 1661, 1646,
147626
+ /* 490 */ 1686, 1710, 1711, 1714, 1716, 1703, 1715, 1698, 1727, 1728,
147627
+ /* 500 */ 1729, 1730, 1731, 1732, 1734, 1743, 1736, 1737, 1740, 1744,
147628
+ /* 510 */ 1738, 1746, 1739, 1645, 1640, 1644, 1647, 1650, 1749, 1751,
147629
+ /* 520 */ 1772,
147552147630
};
147553
-#define YY_REDUCE_COUNT (373)
147631
+#define YY_REDUCE_COUNT (369)
147554147632
#define YY_REDUCE_MIN (-237)
147555
-#define YY_REDUCE_MAX (1434)
147633
+#define YY_REDUCE_MAX (1424)
147556147634
static const short yy_reduce_ofst[] = {
147557147635
/* 0 */ -147, 171, 263, -96, 358, -144, -149, -102, 124, -156,
147558147636
/* 10 */ -98, 305, 401, -57, 209, -237, 245, -94, -79, 189,
147559147637
/* 20 */ 375, 490, 493, 378, 303, 539, 542, 501, 503, 554,
147560147638
/* 30 */ 415, 526, 546, 557, 587, 593, 595, -234, -234, -234,
@@ -147580,75 +147658,74 @@
147580147658
/* 230 */ 1137, 1152, 1077, 1153, 1155, 1114, 1156, 304, 1158, 1172,
147581147659
/* 240 */ 1173, 1174, 1175, 1176, 1089, 1091, 1133, 1098, 1126, 1139,
147582147660
/* 250 */ 1140, 1070, 1133, 1133, 1170, 1163, 1186, 1103, 1168, 1138,
147583147661
/* 260 */ 1141, 1110, 1169, 1171, 1132, 1177, 1189, 1194, 1181, 1200,
147584147662
/* 270 */ 1204, 1166, 1145, 1178, 1187, 1232, 1142, 1231, 1233, 1149,
147585
- /* 280 */ 1150, 1238, 1179, 1182, 1199, 1207, 1218, 1211, 1210, 1212,
147586
- /* 290 */ 1234, 1235, 1236, 1237, 1265, 1268, 1229, 1230, 1213, 1215,
147587
- /* 300 */ 1243, 1252, 1241, 1276, 1278, 1205, 1220, 1287, 1290, 1273,
147588
- /* 310 */ 1293, 1304, 1306, 1309, 1285, 1296, 1297, 1299, 1298, 1301,
147589
- /* 320 */ 1307, 1308, 1311, 1300, 1312, 1313, 1314, 1249, 1255, 1315,
147590
- /* 330 */ 1280, 1284, 1295, 1316, 1310, 1317, 1318, 1320, 1337, 1319,
147591
- /* 340 */ 1253, 1258, 1322, 1325, 1321, 1378, 1326, 1328, 1338, 1341,
147592
- /* 350 */ 1344, 1391, 1395, 1407, 1409, 1415, 1416, 1420, 1323, 1333,
147593
- /* 360 */ 1329, 1405, 1401, 1403, 1412, 1421, 1408, 1417, 1425, 1423,
147594
- /* 370 */ 1424, 1427, 1434, 1426,
147663
+ /* 280 */ 1150, 1238, 1179, 1182, 1212, 1205, 1219, 1220, 1221, 1222,
147664
+ /* 290 */ 1258, 1266, 1223, 1224, 1206, 1211, 1237, 1239, 1230, 1269,
147665
+ /* 300 */ 1272, 1195, 1197, 1280, 1284, 1268, 1285, 1289, 1290, 1293,
147666
+ /* 310 */ 1274, 1286, 1287, 1288, 1282, 1294, 1292, 1297, 1300, 1296,
147667
+ /* 320 */ 1301, 1306, 1304, 1249, 1250, 1308, 1271, 1275, 1273, 1276,
147668
+ /* 330 */ 1279, 1281, 1283, 1302, 1334, 1307, 1243, 1267, 1318, 1322,
147669
+ /* 340 */ 1303, 1371, 1299, 1328, 1332, 1340, 1342, 1384, 1391, 1400,
147670
+ /* 350 */ 1403, 1407, 1408, 1409, 1311, 1312, 1310, 1405, 1402, 1412,
147671
+ /* 360 */ 1417, 1420, 1406, 1393, 1395, 1421, 1422, 1423, 1424, 1415,
147595147672
};
147596147673
static const YYACTIONTYPE yy_default[] = {
147597
- /* 0 */ 1496, 1496, 1496, 1344, 1127, 1233, 1127, 1127, 1127, 1344,
147598
- /* 10 */ 1344, 1344, 1127, 1263, 1263, 1395, 1158, 1127, 1127, 1127,
147599
- /* 20 */ 1127, 1127, 1127, 1127, 1343, 1127, 1127, 1127, 1127, 1127,
147600
- /* 30 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1269, 1127,
147601
- /* 40 */ 1127, 1127, 1127, 1127, 1345, 1346, 1127, 1127, 1127, 1394,
147602
- /* 50 */ 1396, 1279, 1278, 1277, 1276, 1377, 1250, 1274, 1267, 1271,
147603
- /* 60 */ 1339, 1340, 1338, 1342, 1346, 1345, 1127, 1270, 1310, 1324,
147604
- /* 70 */ 1309, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147605
- /* 80 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147606
- /* 90 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147607
- /* 100 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147608
- /* 110 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1318, 1323, 1329,
147609
- /* 120 */ 1322, 1319, 1312, 1311, 1313, 1314, 1127, 1148, 1197, 1127,
147610
- /* 130 */ 1127, 1127, 1127, 1413, 1412, 1127, 1127, 1158, 1315, 1316,
147611
- /* 140 */ 1326, 1325, 1402, 1452, 1451, 1127, 1127, 1127, 1127, 1127,
147612
- /* 150 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147613
- /* 160 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147614
- /* 170 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1158, 1154, 1304,
147615
- /* 180 */ 1303, 1422, 1154, 1257, 1127, 1408, 1233, 1224, 1127, 1127,
147616
- /* 190 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147617
- /* 200 */ 1127, 1399, 1397, 1127, 1359, 1127, 1127, 1127, 1127, 1127,
147618
- /* 210 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147619
- /* 220 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147620
- /* 230 */ 1127, 1127, 1229, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147621
- /* 240 */ 1127, 1127, 1127, 1446, 1127, 1372, 1211, 1229, 1229, 1229,
147622
- /* 250 */ 1229, 1231, 1212, 1210, 1223, 1158, 1134, 1488, 1273, 1252,
147623
- /* 260 */ 1252, 1485, 1273, 1273, 1485, 1172, 1466, 1169, 1263, 1263,
147624
- /* 270 */ 1263, 1252, 1341, 1230, 1223, 1127, 1488, 1238, 1238, 1487,
147625
- /* 280 */ 1487, 1238, 1282, 1288, 1268, 1257, 1200, 1268, 1257, 1273,
147626
- /* 290 */ 1206, 1206, 1206, 1206, 1238, 1145, 1273, 1273, 1282, 1288,
147627
- /* 300 */ 1200, 1200, 1273, 1238, 1145, 1376, 1482, 1238, 1145, 1352,
147628
- /* 310 */ 1238, 1145, 1238, 1145, 1352, 1198, 1198, 1198, 1187, 1352,
147629
- /* 320 */ 1198, 1172, 1198, 1187, 1198, 1198, 1352, 1356, 1356, 1352,
147630
- /* 330 */ 1256, 1251, 1256, 1251, 1256, 1251, 1256, 1251, 1238, 1257,
147631
- /* 340 */ 1421, 1127, 1268, 1257, 1347, 1238, 1127, 1268, 1266, 1264,
147632
- /* 350 */ 1273, 1151, 1190, 1449, 1449, 1445, 1445, 1445, 1493, 1493,
147633
- /* 360 */ 1408, 1461, 1158, 1158, 1158, 1158, 1461, 1174, 1174, 1158,
147634
- /* 370 */ 1158, 1158, 1158, 1461, 1127, 1127, 1127, 1127, 1127, 1127,
147635
- /* 380 */ 1456, 1127, 1361, 1242, 1127, 1127, 1127, 1127, 1127, 1127,
147636
- /* 390 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147637
- /* 400 */ 1127, 1127, 1127, 1127, 1127, 1127, 1293, 1127, 1130, 1405,
147638
- /* 410 */ 1127, 1127, 1403, 1127, 1127, 1127, 1127, 1127, 1127, 1243,
147639
- /* 420 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147640
- /* 430 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1484, 1127,
147641
- /* 440 */ 1127, 1127, 1127, 1127, 1127, 1375, 1374, 1127, 1127, 1240,
147642
- /* 450 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147643
- /* 460 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147644
- /* 470 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147645
- /* 480 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1265, 1127, 1420,
147646
- /* 490 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1434, 1258, 1127,
147647
- /* 500 */ 1127, 1475, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147648
- /* 510 */ 1127, 1127, 1127, 1127, 1127, 1127, 1470, 1214, 1295, 1127,
147649
- /* 520 */ 1294, 1298, 1127, 1139, 1127,
147674
+ /* 0 */ 1492, 1492, 1492, 1340, 1123, 1229, 1123, 1123, 1123, 1340,
147675
+ /* 10 */ 1340, 1340, 1123, 1259, 1259, 1391, 1154, 1123, 1123, 1123,
147676
+ /* 20 */ 1123, 1123, 1123, 1123, 1339, 1123, 1123, 1123, 1123, 1123,
147677
+ /* 30 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1265, 1123,
147678
+ /* 40 */ 1123, 1123, 1123, 1123, 1341, 1342, 1123, 1123, 1123, 1390,
147679
+ /* 50 */ 1392, 1275, 1274, 1273, 1272, 1373, 1246, 1270, 1263, 1267,
147680
+ /* 60 */ 1335, 1336, 1334, 1338, 1342, 1341, 1123, 1266, 1306, 1320,
147681
+ /* 70 */ 1305, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147682
+ /* 80 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147683
+ /* 90 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147684
+ /* 100 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147685
+ /* 110 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1314, 1319, 1325,
147686
+ /* 120 */ 1318, 1315, 1308, 1307, 1309, 1310, 1123, 1144, 1193, 1123,
147687
+ /* 130 */ 1123, 1123, 1123, 1409, 1408, 1123, 1123, 1154, 1311, 1312,
147688
+ /* 140 */ 1322, 1321, 1398, 1448, 1447, 1123, 1123, 1123, 1123, 1123,
147689
+ /* 150 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147690
+ /* 160 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147691
+ /* 170 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1154, 1150, 1300,
147692
+ /* 180 */ 1299, 1418, 1150, 1253, 1123, 1404, 1229, 1220, 1123, 1123,
147693
+ /* 190 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147694
+ /* 200 */ 1123, 1395, 1393, 1123, 1355, 1123, 1123, 1123, 1123, 1123,
147695
+ /* 210 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147696
+ /* 220 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147697
+ /* 230 */ 1123, 1123, 1225, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147698
+ /* 240 */ 1123, 1123, 1123, 1442, 1123, 1368, 1207, 1225, 1225, 1225,
147699
+ /* 250 */ 1225, 1227, 1208, 1206, 1219, 1154, 1130, 1484, 1269, 1248,
147700
+ /* 260 */ 1248, 1481, 1269, 1269, 1481, 1168, 1462, 1165, 1259, 1259,
147701
+ /* 270 */ 1259, 1248, 1337, 1226, 1219, 1123, 1484, 1234, 1234, 1483,
147702
+ /* 280 */ 1483, 1234, 1278, 1284, 1196, 1269, 1202, 1202, 1202, 1202,
147703
+ /* 290 */ 1234, 1141, 1269, 1269, 1278, 1284, 1196, 1196, 1269, 1234,
147704
+ /* 300 */ 1141, 1372, 1478, 1234, 1141, 1348, 1234, 1141, 1234, 1141,
147705
+ /* 310 */ 1348, 1194, 1194, 1194, 1183, 1348, 1194, 1168, 1194, 1183,
147706
+ /* 320 */ 1194, 1194, 1348, 1352, 1352, 1348, 1252, 1247, 1252, 1247,
147707
+ /* 330 */ 1252, 1247, 1252, 1247, 1234, 1253, 1417, 1123, 1264, 1253,
147708
+ /* 340 */ 1343, 1234, 1123, 1264, 1262, 1260, 1269, 1147, 1186, 1445,
147709
+ /* 350 */ 1445, 1441, 1441, 1441, 1489, 1489, 1404, 1457, 1154, 1154,
147710
+ /* 360 */ 1154, 1154, 1457, 1170, 1170, 1154, 1154, 1154, 1154, 1457,
147711
+ /* 370 */ 1123, 1123, 1123, 1123, 1123, 1123, 1452, 1123, 1357, 1238,
147712
+ /* 380 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147713
+ /* 390 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147714
+ /* 400 */ 1123, 1123, 1289, 1123, 1126, 1401, 1123, 1123, 1399, 1123,
147715
+ /* 410 */ 1123, 1123, 1123, 1123, 1123, 1239, 1123, 1123, 1123, 1123,
147716
+ /* 420 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147717
+ /* 430 */ 1123, 1123, 1123, 1123, 1480, 1123, 1123, 1123, 1123, 1123,
147718
+ /* 440 */ 1123, 1371, 1370, 1123, 1123, 1236, 1123, 1123, 1123, 1123,
147719
+ /* 450 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147720
+ /* 460 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147721
+ /* 470 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147722
+ /* 480 */ 1123, 1123, 1123, 1261, 1123, 1416, 1123, 1123, 1123, 1123,
147723
+ /* 490 */ 1123, 1123, 1123, 1430, 1254, 1123, 1123, 1471, 1123, 1123,
147724
+ /* 500 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147725
+ /* 510 */ 1123, 1123, 1466, 1210, 1291, 1123, 1290, 1294, 1123, 1135,
147726
+ /* 520 */ 1123,
147650147727
};
147651147728
/********** End of lemon-generated parsing tables *****************************/
147652147729
147653147730
/* The next table maps tokens (terminal symbols) into fallback tokens.
147654147731
** If a construct like the following:
@@ -148268,14 +148345,14 @@
148268148345
/* 137 */ "having_opt ::= HAVING expr",
148269148346
/* 138 */ "limit_opt ::=",
148270148347
/* 139 */ "limit_opt ::= LIMIT expr",
148271148348
/* 140 */ "limit_opt ::= LIMIT expr OFFSET expr",
148272148349
/* 141 */ "limit_opt ::= LIMIT expr COMMA expr",
148273
- /* 142 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt orderby_opt limit_opt",
148350
+ /* 142 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt",
148274148351
/* 143 */ "where_opt ::=",
148275148352
/* 144 */ "where_opt ::= WHERE expr",
148276
- /* 145 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt orderby_opt limit_opt",
148353
+ /* 145 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt",
148277148354
/* 146 */ "setlist ::= setlist COMMA nm EQ expr",
148278148355
/* 147 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
148279148356
/* 148 */ "setlist ::= nm EQ expr",
148280148357
/* 149 */ "setlist ::= LP idlist RP EQ expr",
148281148358
/* 150 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
@@ -149148,14 +149225,14 @@
149148149225
{ 215, -2 }, /* (137) having_opt ::= HAVING expr */
149149149226
{ 217, 0 }, /* (138) limit_opt ::= */
149150149227
{ 217, -2 }, /* (139) limit_opt ::= LIMIT expr */
149151149228
{ 217, -4 }, /* (140) limit_opt ::= LIMIT expr OFFSET expr */
149152149229
{ 217, -4 }, /* (141) limit_opt ::= LIMIT expr COMMA expr */
149153
- { 160, -8 }, /* (142) cmd ::= with DELETE FROM xfullname indexed_opt where_opt orderby_opt limit_opt */
149230
+ { 160, -6 }, /* (142) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
149154149231
{ 213, 0 }, /* (143) where_opt ::= */
149155149232
{ 213, -2 }, /* (144) where_opt ::= WHERE expr */
149156
- { 160, -10 }, /* (145) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt orderby_opt limit_opt */
149233
+ { 160, -8 }, /* (145) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
149157149234
{ 233, -5 }, /* (146) setlist ::= setlist COMMA nm EQ expr */
149158149235
{ 233, -7 }, /* (147) setlist ::= setlist COMMA LP idlist RP EQ expr */
149159149236
{ 233, -3 }, /* (148) setlist ::= nm EQ expr */
149160149237
{ 233, -5 }, /* (149) setlist ::= LP idlist RP EQ expr */
149161149238
{ 160, -7 }, /* (150) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
@@ -150035,21 +150112,21 @@
150035150112
{yymsp[-3].minor.yy18 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy18,yymsp[0].minor.yy18);}
150036150113
break;
150037150114
case 141: /* limit_opt ::= LIMIT expr COMMA expr */
150038150115
{yymsp[-3].minor.yy18 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy18,yymsp[-2].minor.yy18);}
150039150116
break;
150040
- case 142: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt orderby_opt limit_opt */
150117
+ case 142: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
150118
+{
150119
+ sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy135, &yymsp[-1].minor.yy0);
150120
+ sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy135,yymsp[0].minor.yy18,0,0);
150121
+}
150122
+ break;
150123
+ case 145: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
150041150124
{
150042150125
sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy135, &yymsp[-3].minor.yy0);
150043
- sqlite3DeleteFrom(pParse,yymsp[-4].minor.yy135,yymsp[-2].minor.yy18,yymsp[-1].minor.yy420,yymsp[0].minor.yy18);
150044
-}
150045
- break;
150046
- case 145: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt orderby_opt limit_opt */
150047
-{
150048
- sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy135, &yymsp[-5].minor.yy0);
150049
- sqlite3ExprListCheckLength(pParse,yymsp[-3].minor.yy420,"set list");
150050
- sqlite3Update(pParse,yymsp[-6].minor.yy135,yymsp[-3].minor.yy420,yymsp[-2].minor.yy18,yymsp[-7].minor.yy70,yymsp[-1].minor.yy420,yymsp[0].minor.yy18,0);
150126
+ sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy420,"set list");
150127
+ sqlite3Update(pParse,yymsp[-4].minor.yy135,yymsp[-1].minor.yy420,yymsp[0].minor.yy18,yymsp[-5].minor.yy70,0,0,0);
150051150128
}
150052150129
break;
150053150130
case 146: /* setlist ::= setlist COMMA nm EQ expr */
150054150131
{
150055150132
yymsp[-4].minor.yy420 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy420, yymsp[0].minor.yy18);
@@ -151047,14 +151124,13 @@
151047151124
#endif
151048151125
yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
151049151126
yymajor = YYNOCODE;
151050151127
}else{
151051151128
while( yypParser->yytos >= yypParser->yystack
151052
- && yymx != YYERRORSYMBOL
151053151129
&& (yyact = yy_find_reduce_action(
151054151130
yypParser->yytos->stateno,
151055
- YYERRORSYMBOL)) >= YY_MIN_REDUCE
151131
+ YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
151056151132
){
151057151133
yy_pop_parser_stack(yypParser);
151058151134
}
151059151135
if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
151060151136
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
@@ -156599,18 +156675,29 @@
156599156675
break;
156600156676
}
156601156677
156602156678
/* sqlite3_test_control(SQLITE_TESTCTRL_LOCALTIME_FAULT, int onoff);
156603156679
**
156604
- ** If parameter onoff is non-zero, configure the wrappers so that all
156605
- ** subsequent calls to localtime() and variants fail. If onoff is zero,
156606
- ** undo this setting.
156680
+ ** If parameter onoff is non-zero, subsequent calls to localtime()
156681
+ ** and its variants fail. If onoff is zero, undo this setting.
156607156682
*/
156608156683
case SQLITE_TESTCTRL_LOCALTIME_FAULT: {
156609156684
sqlite3GlobalConfig.bLocaltimeFault = va_arg(ap, int);
156610156685
break;
156611156686
}
156687
+
156688
+ /* sqlite3_test_control(SQLITE_TESTCTRL_INTERNAL_FUNCS, int onoff);
156689
+ **
156690
+ ** If parameter onoff is non-zero, internal-use-only SQL functions
156691
+ ** are visible to ordinary SQL. This is useful for testing but is
156692
+ ** unsafe because invalid parameters to those internal-use-only functions
156693
+ ** can result in crashes or segfaults.
156694
+ */
156695
+ case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: {
156696
+ sqlite3GlobalConfig.bInternalFunctions = va_arg(ap, int);
156697
+ break;
156698
+ }
156612156699
156613156700
/* sqlite3_test_control(SQLITE_TESTCTRL_NEVER_CORRUPT, int);
156614156701
**
156615156702
** Set or clear a flag that indicates that the database file is always well-
156616156703
** formed and never corrupt. This flag is clear by default, indicating that
@@ -162395,10 +162482,11 @@
162395162482
}
162396162483
162397162484
return rc;
162398162485
}
162399162486
162487
+#ifndef SQLITE_DISABLE_FTS4_DEFERRED
162400162488
/*
162401162489
** This function is called on each phrase after the position lists for
162402162490
** any deferred tokens have been loaded into memory. It updates the phrases
162403162491
** current position list to include only those positions that are really
162404162492
** instances of the phrase (after considering deferred tokens). If this
@@ -162498,10 +162586,11 @@
162498162586
}
162499162587
}
162500162588
162501162589
return SQLITE_OK;
162502162590
}
162591
+#endif /* SQLITE_DISABLE_FTS4_DEFERRED */
162503162592
162504162593
/*
162505162594
** Maximum number of tokens a phrase may have to be considered for the
162506162595
** incremental doclists strategy.
162507162596
*/
@@ -178484,10 +178573,13 @@
178484178573
#define JEACH_ATOM 3
178485178574
#define JEACH_ID 4
178486178575
#define JEACH_PARENT 5
178487178576
#define JEACH_FULLKEY 6
178488178577
#define JEACH_PATH 7
178578
+/* The xBestIndex method assumes that the JSON and ROOT columns are
178579
+** the last two columns in the table. Should this ever changes, be
178580
+** sure to update the xBestIndex method. */
178489178581
#define JEACH_JSON 8
178490178582
#define JEACH_ROOT 9
178491178583
178492178584
UNUSED_PARAM(pzErr);
178493178585
UNUSED_PARAM(argv);
@@ -178741,39 +178833,58 @@
178741178833
*/
178742178834
static int jsonEachBestIndex(
178743178835
sqlite3_vtab *tab,
178744178836
sqlite3_index_info *pIdxInfo
178745178837
){
178746
- int i;
178747
- int jsonIdx = -1;
178748
- int rootIdx = -1;
178838
+ int i; /* Loop counter or computed array index */
178839
+ int aIdx[2]; /* Index of constraints for JSON and ROOT */
178840
+ int unusableMask = 0; /* Mask of unusable JSON and ROOT constraints */
178841
+ int idxMask = 0; /* Mask of usable == constraints JSON and ROOT */
178749178842
const struct sqlite3_index_constraint *pConstraint;
178750178843
178844
+ /* This implementation assumes that JSON and ROOT are the last two
178845
+ ** columns in the table */
178846
+ assert( JEACH_ROOT == JEACH_JSON+1 );
178751178847
UNUSED_PARAM(tab);
178848
+ aIdx[0] = aIdx[1] = -1;
178752178849
pConstraint = pIdxInfo->aConstraint;
178753178850
for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
178754
- if( pConstraint->usable==0 ) continue;
178755
- if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
178756
- switch( pConstraint->iColumn ){
178757
- case JEACH_JSON: jsonIdx = i; break;
178758
- case JEACH_ROOT: rootIdx = i; break;
178759
- default: /* no-op */ break;
178851
+ int iCol;
178852
+ int iMask;
178853
+ if( pConstraint->iColumn < JEACH_JSON ) continue;
178854
+ iCol = pConstraint->iColumn - JEACH_JSON;
178855
+ assert( iCol==0 || iCol==1 );
178856
+ iMask = 1 << iCol;
178857
+ if( pConstraint->usable==0 ){
178858
+ unusableMask |= iMask;
178859
+ }else if( pConstraint->op==SQLITE_INDEX_CONSTRAINT_EQ ){
178860
+ aIdx[iCol] = i;
178861
+ idxMask |= iMask;
178760178862
}
178761178863
}
178762
- if( jsonIdx<0 ){
178864
+ if( (unusableMask & ~idxMask)!=0 ){
178865
+ /* If there are any unusable constraints on JSON or ROOT, then reject
178866
+ ** this entire plan */
178867
+ return SQLITE_CONSTRAINT;
178868
+ }
178869
+ if( aIdx[0]<0 ){
178870
+ /* No JSON input. Leave estimatedCost at the huge value that it was
178871
+ ** initialized to to discourage the query planner from selecting this
178872
+ ** plan. */
178763178873
pIdxInfo->idxNum = 0;
178764
- pIdxInfo->estimatedCost = 1e99;
178765178874
}else{
178766178875
pIdxInfo->estimatedCost = 1.0;
178767
- pIdxInfo->aConstraintUsage[jsonIdx].argvIndex = 1;
178768
- pIdxInfo->aConstraintUsage[jsonIdx].omit = 1;
178769
- if( rootIdx<0 ){
178770
- pIdxInfo->idxNum = 1;
178876
+ i = aIdx[0];
178877
+ pIdxInfo->aConstraintUsage[i].argvIndex = 1;
178878
+ pIdxInfo->aConstraintUsage[i].omit = 1;
178879
+ if( aIdx[1]<0 ){
178880
+ pIdxInfo->idxNum = 1; /* Only JSON supplied. Plan 1 */
178771178881
}else{
178772
- pIdxInfo->aConstraintUsage[rootIdx].argvIndex = 2;
178773
- pIdxInfo->aConstraintUsage[rootIdx].omit = 1;
178774
- pIdxInfo->idxNum = 3;
178882
+ i = aIdx[1];
178883
+ pIdxInfo->aConstraintUsage[i].argvIndex = 2;
178884
+ pIdxInfo->aConstraintUsage[i].omit = 1;
178885
+ pIdxInfo->idxNum = 3; /* Both JSON and ROOT are supplied. Plan 3 */
178775178886
}
178776178887
}
178777178888
return SQLITE_OK;
178778178889
}
178779178890
@@ -183789,11 +183900,11 @@
183789183900
){
183790183901
GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
183791183902
if( p ){
183792183903
if( geopolyArea(p)<0.0 ){
183793183904
int ii, jj;
183794
- for(ii=2, jj=p->nVertex*2 - 4; ii<jj; ii+=2, jj-=2){
183905
+ for(ii=2, jj=p->nVertex*2 - 2; ii<jj; ii+=2, jj-=2){
183795183906
GeoCoord t = p->a[ii];
183796183907
p->a[ii] = p->a[jj];
183797183908
p->a[jj] = t;
183798183909
t = p->a[ii+1];
183799183910
p->a[ii+1] = p->a[jj+1];
@@ -183806,19 +183917,19 @@
183806183917
}
183807183918
}
183808183919
183809183920
#define GEOPOLY_PI 3.1415926535897932385
183810183921
183811
-/* Fast approximation for cosine(X) for X between -0.5*pi and 2*pi
183922
+/* Fast approximation for sine(X) for X between -0.5*pi and 2*pi
183812183923
*/
183813
-static double geopolyCosine(double r){
183924
+static double geopolySine(double r){
183814183925
assert( r>=-0.5*GEOPOLY_PI && r<=2.0*GEOPOLY_PI );
183815183926
if( r>=1.5*GEOPOLY_PI ){
183816183927
r -= 2.0*GEOPOLY_PI;
183817183928
}
183818183929
if( r>=0.5*GEOPOLY_PI ){
183819
- return -geopolyCosine(r-GEOPOLY_PI);
183930
+ return -geopolySine(r-GEOPOLY_PI);
183820183931
}else{
183821183932
double r2 = r*r;
183822183933
double r3 = r2*r;
183823183934
double r5 = r3*r2;
183824183935
return 0.9996949*r - 0.1656700*r3 + 0.0075134*r5;
@@ -183855,12 +183966,12 @@
183855183966
p->hdr[1] = 0;
183856183967
p->hdr[2] = (n>>8)&0xff;
183857183968
p->hdr[3] = n&0xff;
183858183969
for(i=0; i<n; i++){
183859183970
double rAngle = 2.0*GEOPOLY_PI*i/n;
183860
- p->a[i*2] = x - r*geopolyCosine(rAngle-0.5*GEOPOLY_PI);
183861
- p->a[i*2+1] = y + r*geopolyCosine(rAngle);
183971
+ p->a[i*2] = x - r*geopolySine(rAngle-0.5*GEOPOLY_PI);
183972
+ p->a[i*2+1] = y + r*geopolySine(rAngle);
183862183973
}
183863183974
sqlite3_result_blob(context, p->hdr, 4+8*n, SQLITE_TRANSIENT);
183864183975
sqlite3_free(p);
183865183976
}
183866183977
@@ -191800,21 +191911,19 @@
191800191911
** idxNum is normally 0, but will be 1 if a schema=? constraint exists.
191801191912
*/
191802191913
static int statBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
191803191914
int i;
191804191915
191805
- pIdxInfo->estimatedCost = 1.0e6; /* Initial cost estimate */
191806
-
191807191916
/* Look for a valid schema=? constraint. If found, change the idxNum to
191808191917
** 1 and request the value of that constraint be sent to xFilter. And
191809191918
** lower the cost estimate to encourage the constrained version to be
191810191919
** used.
191811191920
*/
191812191921
for(i=0; i<pIdxInfo->nConstraint; i++){
191813
- if( pIdxInfo->aConstraint[i].usable==0 ) continue;
191814
- if( pIdxInfo->aConstraint[i].op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
191815191922
if( pIdxInfo->aConstraint[i].iColumn!=10 ) continue;
191923
+ if( pIdxInfo->aConstraint[i].usable==0 ) return SQLITE_CONSTRAINT;
191924
+ if( pIdxInfo->aConstraint[i].op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
191816191925
pIdxInfo->idxNum = 1;
191817191926
pIdxInfo->estimatedCost = 1.0;
191818191927
pIdxInfo->aConstraintUsage[i].argvIndex = 1;
191819191928
pIdxInfo->aConstraintUsage[i].omit = 1;
191820191929
break;
@@ -192003,10 +192112,11 @@
192003192112
assert( nPayload>=(u32)nLocal );
192004192113
assert( nLocal<=(nUsable-35) );
192005192114
if( nPayload>(u32)nLocal ){
192006192115
int j;
192007192116
int nOvfl = ((nPayload - nLocal) + nUsable-4 - 1) / (nUsable - 4);
192117
+ if( iOff+nLocal>nUsable ) goto statPageIsCorrupt;
192008192118
pCell->nLastOvfl = (nPayload-nLocal) - (nOvfl-1) * (nUsable-4);
192009192119
pCell->nOvfl = nOvfl;
192010192120
pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl);
192011192121
if( pCell->aOvfl==0 ) return SQLITE_NOMEM_BKPT;
192012192122
pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
@@ -192457,13 +192567,12 @@
192457192567
for(i=0; i<pIdxInfo->nConstraint; i++){
192458192568
struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i];
192459192569
if( p->iColumn!=DBPAGE_COLUMN_SCHEMA ) continue;
192460192570
if( p->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
192461192571
if( !p->usable ){
192462
- /* No solution. Use the default SQLITE_BIG_DBL cost */
192463
- pIdxInfo->estimatedRows = 0x7fffffff;
192464
- return SQLITE_OK;
192572
+ /* No solution. */
192573
+ return SQLITE_CONSTRAINT;
192465192574
}
192466192575
iPlan = 2;
192467192576
pIdxInfo->aConstraintUsage[i].argvIndex = 1;
192468192577
pIdxInfo->aConstraintUsage[i].omit = 1;
192469192578
break;
@@ -199656,10 +199765,11 @@
199656199765
**
199657199766
** The following is the concatenation of all %include directives from the
199658199767
** input grammar file:
199659199768
*/
199660199769
/* #include <stdio.h> */
199770
+/* #include <assert.h> */
199661199771
/************ Begin %include sections from the grammar ************************/
199662199772
199663199773
/* #include "fts5Int.h" */
199664199774
/* #include "fts5parse.h" */
199665199775
@@ -200983,14 +201093,13 @@
200983201093
#endif
200984201094
fts5yy_destructor(fts5yypParser, (fts5YYCODETYPE)fts5yymajor, &fts5yyminorunion);
200985201095
fts5yymajor = fts5YYNOCODE;
200986201096
}else{
200987201097
while( fts5yypParser->fts5yytos >= fts5yypParser->fts5yystack
200988
- && fts5yymx != fts5YYERRORSYMBOL
200989201098
&& (fts5yyact = fts5yy_find_reduce_action(
200990201099
fts5yypParser->fts5yytos->stateno,
200991
- fts5YYERRORSYMBOL)) >= fts5YY_MIN_REDUCE
201100
+ fts5YYERRORSYMBOL)) > fts5YY_MAX_SHIFTREDUCE
200992201101
){
200993201102
fts5yy_pop_parser_stack(fts5yypParser);
200994201103
}
200995201104
if( fts5yypParser->fts5yytos < fts5yypParser->fts5yystack || fts5yymajor==0 ){
200996201105
fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);
@@ -215685,11 +215794,11 @@
215685215794
int nArg, /* Number of args */
215686215795
sqlite3_value **apUnused /* Function arguments */
215687215796
){
215688215797
assert( nArg==0 );
215689215798
UNUSED_PARAM2(nArg, apUnused);
215690
- sqlite3_result_text(pCtx, "fts5: 2018-11-12 15:20:44 f9755f81b1c0fd29f242dce78a2fba570fa2714d76e93b8563f426a040352513", -1, SQLITE_TRANSIENT);
215799
+ sqlite3_result_text(pCtx, "fts5: 2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9", -1, SQLITE_TRANSIENT);
215691215800
}
215692215801
215693215802
/*
215694215803
** Return true if zName is the extension on one of the shadow tables used
215695215804
** by this module.
@@ -220413,12 +220522,12 @@
220413220522
}
220414220523
#endif /* SQLITE_CORE */
220415220524
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
220416220525
220417220526
/************** End of stmt.c ************************************************/
220418
-#if __LINE__!=220418
220527
+#if __LINE__!=220527
220419220528
#undef SQLITE_SOURCE_ID
220420
-#define SQLITE_SOURCE_ID "2018-11-12 15:20:44 f9755f81b1c0fd29f242dce78a2fba570fa2714d76e93b8563f426a04035alt2"
220529
+#define SQLITE_SOURCE_ID "2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238alt2"
220421220530
#endif
220422220531
/* Return the source-id for this library */
220423220532
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
220424220533
/************************** End of sqlite3.c ******************************/
220425220534
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
1162 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1163 ** [sqlite_version()] and [sqlite_source_id()].
1164 */
1165 #define SQLITE_VERSION "3.26.0"
1166 #define SQLITE_VERSION_NUMBER 3026000
1167 #define SQLITE_SOURCE_ID "2018-11-12 15:20:44 f9755f81b1c0fd29f242dce78a2fba570fa2714d76e93b8563f426a040352513"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -4670,11 +4670,11 @@
4670 **
4671 ** [[SQLITE_PREPARE_NORMALIZE]] ^(<dt>SQLITE_PREPARE_NORMALIZE</dt>
4672 ** <dd>The SQLITE_PREPARE_NORMALIZE flag indicates that a normalized
4673 ** representation of the SQL statement should be calculated and then
4674 ** associated with the prepared statement, which can be obtained via
4675 ** the [sqlite3_normalized_sql()] interface. The semantics used to
4676 ** normalize a SQL statement are unspecified and subject to change.
4677 ** At a minimum, literal values will be replaced with suitable
4678 ** placeholders.
4679 ** </dl>
4680 */
@@ -8279,10 +8279,11 @@
8279 #define SQLITE_TESTCTRL_ALWAYS 13
8280 #define SQLITE_TESTCTRL_RESERVE 14
8281 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
8282 #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
8283 #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
 
8284 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
8285 #define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
8286 #define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
8287 #define SQLITE_TESTCTRL_NEVER_CORRUPT 20
8288 #define SQLITE_TESTCTRL_VDBE_COVERAGE 21
@@ -10461,11 +10462,11 @@
10461 int iLevel; /* Level of current node or entry */
10462 int mxLevel; /* The largest iLevel value in the tree */
10463 sqlite3_int64 iRowid; /* Rowid for current entry */
10464 sqlite3_rtree_dbl rParentScore; /* Score of parent node */
10465 int eParentWithin; /* Visibility of parent node */
10466 int eWithin; /* OUT: Visiblity */
10467 sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
10468 /* The following fields are only available in 3.8.11 and later */
10469 sqlite3_value **apSqlParam; /* Original SQL values of parameters */
10470 };
10471
@@ -15398,22 +15399,21 @@
15398 SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, sqlite3*, int, int*, int*);
15399 SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager);
15400 SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager);
15401 SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);
15402 SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager, sqlite3*);
15403 # ifdef SQLITE_DIRECT_OVERFLOW_READ
15404 SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager, Pgno);
15405 # endif
15406 # ifdef SQLITE_ENABLE_SNAPSHOT
15407 SQLITE_PRIVATE int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot);
15408 SQLITE_PRIVATE int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot);
15409 SQLITE_PRIVATE int sqlite3PagerSnapshotRecover(Pager *pPager);
15410 SQLITE_PRIVATE int sqlite3PagerSnapshotCheck(Pager *pPager, sqlite3_snapshot *pSnapshot);
15411 SQLITE_PRIVATE void sqlite3PagerSnapshotUnlock(Pager *pPager);
15412 # endif
15413 #else
15414 # define sqlite3PagerUseWal(x,y) 0
 
 
15415 #endif
15416
15417 #ifdef SQLITE_ENABLE_ZIPVFS
15418 SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager);
15419 #endif
@@ -15653,10 +15653,14 @@
15653 SQLITE_PRIVATE int sqlite3HeaderSizePcache(void);
15654 SQLITE_PRIVATE int sqlite3HeaderSizePcache1(void);
15655
15656 /* Number of dirty pages as a percentage of the configured cache size */
15657 SQLITE_PRIVATE int sqlite3PCachePercentDirty(PCache*);
 
 
 
 
15658
15659 #endif /* _PCACHE_H_ */
15660
15661 /************** End of pcache.h **********************************************/
15662 /************** Continuing where we left off in sqliteInt.h ******************/
@@ -16537,12 +16541,13 @@
16537 #define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */
16538 #define SQLITE_FUNC_SLOCHNG 0x2000 /* "Slow Change". Value constant during a
16539 ** single query - might change over time */
16540 #define SQLITE_FUNC_AFFINITY 0x4000 /* Built-in affinity() function */
16541 #define SQLITE_FUNC_OFFSET 0x8000 /* Built-in sqlite_offset() function */
16542 #define SQLITE_FUNC_WINDOW 0x10000 /* Built-in window-only function */
16543 #define SQLITE_FUNC_WINDOW_SIZE 0x20000 /* Requires partition size as arg. */
 
16544
16545 /*
16546 ** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
16547 ** used to create the initializers for the FuncDef structures.
16548 **
@@ -16614,14 +16619,17 @@
16614 {nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL), \
16615 SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,xValue,0,#zName, {0}}
16616 #define AGGREGATE2(zName, nArg, arg, nc, xStep, xFinal, extraFlags) \
16617 {nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL)|extraFlags, \
16618 SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,xFinal,0,#zName, {0}}
16619
16620 #define WAGGREGATE(zName, nArg, arg, nc, xStep, xFinal, xValue, xInverse, f) \
16621 {nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL)|f, \
16622 SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,xValue,xInverse,#zName, {0}}
 
 
 
 
16623
16624 /*
16625 ** All current savepoints are stored in a linked list starting at
16626 ** sqlite3.pSavepoint. The first element in the list is the most recently
16627 ** opened savepoint. Savepoints are added to the list by the vdbe
@@ -18268,10 +18276,11 @@
18268 #endif
18269 #ifndef SQLITE_UNTESTABLE
18270 int (*xTestCallback)(int); /* Invoked by sqlite3FaultSim() */
18271 #endif
18272 int bLocaltimeFault; /* True to fail localtime() calls */
 
18273 int iOnceResetThreshold; /* When to reset OP_Once counters */
18274 u32 szSorterRef; /* Min size in bytes to use sorter-refs */
18275 };
18276
18277 /*
@@ -19731,10 +19740,11 @@
19731 #endif
19732 #ifndef SQLITE_UNTESTABLE
19733 0, /* xTestCallback */
19734 #endif
19735 0, /* bLocaltimeFault */
 
19736 0x7ffffffe, /* iOnceResetThreshold */
19737 SQLITE_DEFAULT_SORTERREF_SIZE /* szSorterRef */
19738 };
19739
19740 /*
@@ -20287,11 +20297,13 @@
20287
20288 int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);
20289 SQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(sqlite3*,VdbeCursor*,UnpackedRecord*,int*);
20290 SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3*, BtCursor*, i64*);
20291 SQLITE_PRIVATE int sqlite3VdbeExec(Vdbe*);
 
20292 SQLITE_PRIVATE int sqlite3VdbeList(Vdbe*);
 
20293 SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe*);
20294 SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *, int);
20295 SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem*);
20296 SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem*, const Mem*);
20297 SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int);
@@ -20326,11 +20338,13 @@
20326 SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p);
20327 SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem*, FuncDef*);
20328 #ifndef SQLITE_OMIT_WINDOWFUNC
20329 SQLITE_PRIVATE int sqlite3VdbeMemAggValue(Mem*, Mem*, FuncDef*);
20330 #endif
 
20331 SQLITE_PRIVATE const char *sqlite3OpcodeName(int);
 
20332 SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve);
20333 SQLITE_PRIVATE int sqlite3VdbeMemClearAndResize(Mem *pMem, int n);
20334 SQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *, int);
20335 #ifdef SQLITE_DEBUG
20336 SQLITE_PRIVATE int sqlite3VdbeFrameIsValid(VdbeFrame*);
@@ -40675,12 +40689,11 @@
40675 #endif
40676 #if SQLITE_MAX_MMAP_SIZE>0
40677 int nFetchOut; /* Number of outstanding xFetch references */
40678 HANDLE hMap; /* Handle for accessing memory mapping */
40679 void *pMapRegion; /* Area memory mapped */
40680 sqlite3_int64 mmapSize; /* Usable size of mapped region */
40681 sqlite3_int64 mmapSizeActual; /* Actual size of mapped region */
40682 sqlite3_int64 mmapSizeMax; /* Configured FCNTL_MMAP_SIZE value */
40683 #endif
40684 };
40685
40686 /*
@@ -43297,10 +43310,30 @@
43297 winFile *pFile = (winFile*)id; /* File handle object */
43298 int rc = SQLITE_OK; /* Return code for this function */
43299 DWORD lastErrno;
43300 #if SQLITE_MAX_MMAP_SIZE>0
43301 sqlite3_int64 oldMmapSize;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43302 #endif
43303
43304 assert( pFile );
43305 SimulateIOError(return SQLITE_IOERR_TRUNCATE);
43306 OSTRACE(("TRUNCATE pid=%lu, pFile=%p, file=%p, size=%lld, lock=%d\n",
@@ -44725,13 +44758,13 @@
44725 */
44726 #if SQLITE_MAX_MMAP_SIZE>0
44727 static int winUnmapfile(winFile *pFile){
44728 assert( pFile!=0 );
44729 OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, hMap=%p, pMapRegion=%p, "
44730 "mmapSize=%lld, mmapSizeActual=%lld, mmapSizeMax=%lld\n",
44731 osGetCurrentProcessId(), pFile, pFile->hMap, pFile->pMapRegion,
44732 pFile->mmapSize, pFile->mmapSizeActual, pFile->mmapSizeMax));
44733 if( pFile->pMapRegion ){
44734 if( !osUnmapViewOfFile(pFile->pMapRegion) ){
44735 pFile->lastErrno = osGetLastError();
44736 OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, pMapRegion=%p, "
44737 "rc=SQLITE_IOERR_MMAP\n", osGetCurrentProcessId(), pFile,
@@ -44739,11 +44772,10 @@
44739 return winLogError(SQLITE_IOERR_MMAP, pFile->lastErrno,
44740 "winUnmapfile1", pFile->zPath);
44741 }
44742 pFile->pMapRegion = 0;
44743 pFile->mmapSize = 0;
44744 pFile->mmapSizeActual = 0;
44745 }
44746 if( pFile->hMap!=NULL ){
44747 if( !osCloseHandle(pFile->hMap) ){
44748 pFile->lastErrno = osGetLastError();
44749 OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, hMap=%p, rc=SQLITE_IOERR_MMAP\n",
@@ -44850,11 +44882,10 @@
44850 osGetCurrentProcessId(), pFd, sqlite3ErrName(rc)));
44851 return SQLITE_OK;
44852 }
44853 pFd->pMapRegion = pNew;
44854 pFd->mmapSize = nMap;
44855 pFd->mmapSizeActual = nMap;
44856 }
44857
44858 OSTRACE(("MAP-FILE pid=%lu, pFile=%p, rc=SQLITE_OK\n",
44859 osGetCurrentProcessId(), pFd));
44860 return SQLITE_OK;
@@ -45652,11 +45683,10 @@
45652 pFile->zPath = zName;
45653 #if SQLITE_MAX_MMAP_SIZE>0
45654 pFile->hMap = NULL;
45655 pFile->pMapRegion = 0;
45656 pFile->mmapSize = 0;
45657 pFile->mmapSizeActual = 0;
45658 pFile->mmapSizeMax = sqlite3GlobalConfig.szMmap;
45659 #endif
45660
45661 OpenCounter(+1);
45662 return rc;
@@ -48372,10 +48402,19 @@
48372 int nDirty = 0;
48373 int nCache = numberOfCachePages(pCache);
48374 for(pDirty=pCache->pDirty; pDirty; pDirty=pDirty->pDirtyNext) nDirty++;
48375 return nCache ? (int)(((i64)nDirty * 100) / nCache) : 0;
48376 }
 
 
 
 
 
 
 
 
 
48377
48378 #if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)
48379 /*
48380 ** For all dirty pages currently in the cache, invoke the specified
48381 ** callback. This is only used if the SQLITE_CHECK_PAGES macro is
@@ -48496,11 +48535,12 @@
48496 PgHdr1 *pLruNext; /* Next in LRU list of unpinned pages */
48497 PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */
48498 };
48499
48500 /*
48501 ** A page is pinned if it is no on the LRU list
 
48502 */
48503 #define PAGE_IS_PINNED(p) ((p)->pLruNext==0)
48504 #define PAGE_IS_UNPINNED(p) ((p)->pLruNext!=0)
48505
48506 /* Each page cache (or PCache) belongs to a PGroup. A PGroup is a set
@@ -51136,23 +51176,34 @@
51136 **
51137 ** if( pPager->jfd->pMethods ){ ...
51138 */
51139 #define isOpen(pFd) ((pFd)->pMethods!=0)
51140
 
51141 /*
51142 ** Return true if this pager uses a write-ahead log to read page pgno.
51143 ** Return false if the pager reads pgno directly from the database.
 
 
 
 
51144 */
51145 #if !defined(SQLITE_OMIT_WAL) && defined(SQLITE_DIRECT_OVERFLOW_READ)
51146 SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager, Pgno pgno){
51147 u32 iRead = 0;
51148 int rc;
51149 if( pPager->pWal==0 ) return 0;
51150 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iRead);
51151 return rc || iRead;
 
 
 
 
 
51152 }
51153 #endif
 
51154 #ifndef SQLITE_OMIT_WAL
51155 # define pagerUseWal(x) ((x)->pWal!=0)
51156 #else
51157 # define pagerUseWal(x) 0
51158 # define pagerRollbackWal(x) 0
@@ -57332,12 +57383,15 @@
57332 void *(*xCodec)(void*,void*,Pgno,int),
57333 void (*xCodecSizeChng)(void*,int,int),
57334 void (*xCodecFree)(void*),
57335 void *pCodec
57336 ){
57337 pager_reset(pPager);
57338 if( pPager->xCodecFree ) pPager->xCodecFree(pPager->pCodec);
 
 
 
57339 pPager->xCodec = pPager->memDb ? 0 : xCodec;
57340 pPager->xCodecSizeChng = xCodecSizeChng;
57341 pPager->xCodecFree = xCodecFree;
57342 pPager->pCodec = pCodec;
57343 setGetterMethod(pPager);
@@ -67639,13 +67693,10 @@
67639 offset -= ovflSize;
67640 }else{
67641 /* Need to read this page properly. It contains some of the
67642 ** range of data that is being read (eOp==0) or written (eOp!=0).
67643 */
67644 #ifdef SQLITE_DIRECT_OVERFLOW_READ
67645 sqlite3_file *fd; /* File from which to do direct overflow read */
67646 #endif
67647 int a = amt;
67648 if( a + offset > ovflSize ){
67649 a = ovflSize - offset;
67650 }
67651
@@ -67652,11 +67703,11 @@
67652 #ifdef SQLITE_DIRECT_OVERFLOW_READ
67653 /* If all the following are true:
67654 **
67655 ** 1) this is a read operation, and
67656 ** 2) data is required from the start of this overflow page, and
67657 ** 3) there is no open write-transaction, and
67658 ** 4) the database is file-backed, and
67659 ** 5) the page is not in the WAL file
67660 ** 6) at least 4 bytes have already been read into the output buffer
67661 **
67662 ** then data can be read directly from the database file into the
@@ -67663,15 +67714,14 @@
67663 ** output buffer, bypassing the page-cache altogether. This speeds
67664 ** up loading large records that span many overflow pages.
67665 */
67666 if( eOp==0 /* (1) */
67667 && offset==0 /* (2) */
67668 && pBt->inTransaction==TRANS_READ /* (3) */
67669 && (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (4) */
67670 && 0==sqlite3PagerUseWal(pBt->pPager, nextPage) /* (5) */
67671 && &pBuf[-4]>=pBufStart /* (6) */
67672 ){
 
67673 u8 aSave[4];
67674 u8 *aWrite = &pBuf[-4];
67675 assert( aWrite>=pBufStart ); /* due to (6) */
67676 memcpy(aSave, aWrite, 4);
67677 rc = sqlite3OsRead(fd, aWrite, a+4, (i64)pBt->pageSize*(nextPage-1));
@@ -95152,10 +95202,19 @@
95152 ** sqlite_version() that might change over time cannot be used
95153 ** in an index. */
95154 notValid(pParse, pNC, "non-deterministic functions",
95155 NC_IdxExpr|NC_PartIdx);
95156 }
 
 
 
 
 
 
 
 
 
95157 }
95158
95159 if( 0==IN_RENAME_OBJECT ){
95160 #ifndef SQLITE_OMIT_WINDOWFUNC
95161 assert( is_agg==0 || (pDef->funcFlags & SQLITE_FUNC_MINMAX)
@@ -102076,14 +102135,20 @@
102076 #else
102077 # define renameTokenCheckAll(x,y)
102078 #endif
102079
102080 /*
102081 ** Add a new RenameToken object mapping parse tree element pPtr into
102082 ** token *pToken to the Parse object currently under construction.
102083 **
102084 ** Return a copy of pPtr.
 
 
 
 
 
 
102085 */
102086 SQLITE_PRIVATE void *sqlite3RenameTokenMap(Parse *pParse, void *pPtr, Token *pToken){
102087 RenameToken *pNew;
102088 assert( pPtr || pParse->db->mallocFailed );
102089 renameTokenCheckAll(pParse, pPtr);
@@ -102591,19 +102656,12 @@
102591 ** Do a column rename operation on the CREATE statement given in zSql.
102592 ** The iCol-th column (left-most is 0) of table zTable is renamed from zCol
102593 ** into zNew. The name should be quoted if bQuote is true.
102594 **
102595 ** This function is used internally by the ALTER TABLE RENAME COLUMN command.
102596 ** Though accessible to application code, it is not intended for use by
102597 ** applications. The existance of this function, and the way it works,
102598 ** is subject to change without notice.
102599 **
102600 ** If any of the parameters are out-of-bounds, then simply return NULL.
102601 ** An out-of-bounds parameter can only occur when the application calls
102602 ** this function directly. The parameters will always be well-formed when
102603 ** this routine is invoked by the bytecode for a legitimate ALTER TABLE
102604 ** statement.
102605 */
102606 static void renameColumnFunc(
102607 sqlite3_context *context,
102608 int NotUsed,
102609 sqlite3_value **argv
@@ -103007,13 +103065,13 @@
103007 /*
103008 ** Register built-in functions used to help implement ALTER TABLE
103009 */
103010 SQLITE_PRIVATE void sqlite3AlterFunctions(void){
103011 static FuncDef aAlterTableFuncs[] = {
103012 FUNCTION(sqlite_rename_column, 9, 0, 0, renameColumnFunc),
103013 FUNCTION(sqlite_rename_table, 7, 0, 0, renameTableFunc),
103014 FUNCTION(sqlite_rename_test, 5, 0, 0, renameTableTest),
103015 };
103016 sqlite3InsertBuiltinFuncs(aAlterTableFuncs, ArraySize(aAlterTableFuncs));
103017 }
103018 #endif /* SQLITE_ALTER_TABLE */
103019
@@ -105058,11 +105116,11 @@
105058 if( pVfs==0 ) return;
105059 pNew = &db->aDb[db->init.iDb];
105060 if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt);
105061 pNew->pBt = 0;
105062 pNew->pSchema = 0;
105063 rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, SQLITE_OPEN_MAIN_DB);
105064 }else{
105065 /* This is a real ATTACH
105066 **
105067 ** Check for the following errors:
105068 **
@@ -106407,21 +106465,26 @@
106407 ** "main" and "temp") for a single database connection.
106408 */
106409 SQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3 *db){
106410 int i;
106411 sqlite3BtreeEnterAll(db);
106412 assert( db->nSchemaLock==0 );
106413 for(i=0; i<db->nDb; i++){
106414 Db *pDb = &db->aDb[i];
106415 if( pDb->pSchema ){
106416 sqlite3SchemaClear(pDb->pSchema);
 
 
 
 
106417 }
106418 }
106419 db->mDbFlags &= ~(DBFLAG_SchemaChange|DBFLAG_SchemaKnownOk);
106420 sqlite3VtabUnlockList(db);
106421 sqlite3BtreeLeaveAll(db);
106422 sqlite3CollapseDatabaseArray(db);
 
 
106423 }
106424
106425 /*
106426 ** This routine is called when a commit occurs.
106427 */
@@ -107757,10 +107820,11 @@
107757 pPk->nColumn = pTab->nCol;
107758 }
107759 recomputeColumnsNotIndexed(pPk);
107760 }
107761
 
107762 /*
107763 ** Return true if zName is a shadow table name in the current database
107764 ** connection.
107765 **
107766 ** zName is temporarily modified while this routine is running, but is
@@ -107782,10 +107846,13 @@
107782 if( pMod==0 ) return 0;
107783 if( pMod->pModule->iVersion<3 ) return 0;
107784 if( pMod->pModule->xShadowName==0 ) return 0;
107785 return pMod->pModule->xShadowName(zTail+1);
107786 }
 
 
 
107787
107788 /*
107789 ** This routine is called to report the final ")" that terminates
107790 ** a CREATE TABLE statement.
107791 **
@@ -111069,13 +111136,15 @@
111069 db = pParse->db;
111070 if( (pTab->tabFlags & TF_Readonly)!=0 ){
111071 return sqlite3WritableSchema(db)==0 && pParse->nested==0;
111072 }
111073 assert( pTab->tabFlags & TF_Shadow );
111074 return (db->flags & SQLITE_Defensive)!=0
111075 && db->nVdbeExec==0
111076 && db->pVtabCtx==0;
 
 
111077 }
111078
111079 /*
111080 ** Check to make sure the given table is writable. If it is not
111081 ** writable, generate an error message and return 1. If it is
@@ -118702,10 +118771,11 @@
118702 # define sqlite3_create_module 0
118703 # define sqlite3_create_module_v2 0
118704 # define sqlite3_declare_vtab 0
118705 # define sqlite3_vtab_config 0
118706 # define sqlite3_vtab_on_conflict 0
 
118707 #endif
118708
118709 #ifdef SQLITE_OMIT_SHARED_CACHE
118710 # define sqlite3_enable_shared_cache 0
118711 #endif
@@ -121204,16 +121274,17 @@
121204 */
121205 case PragTyp_TABLE_INFO: if( zRight ){
121206 Table *pTab;
121207 pTab = sqlite3LocateTable(pParse, LOCATE_NOERR, zRight, zDb);
121208 if( pTab ){
 
121209 int i, k;
121210 int nHidden = 0;
121211 Column *pCol;
121212 Index *pPk = sqlite3PrimaryKeyIndex(pTab);
121213 pParse->nMem = 7;
121214 sqlite3CodeVerifySchema(pParse, iDb);
121215 sqlite3ViewGetColumnNames(pParse, pTab);
121216 for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
121217 int isHidden = IsHiddenColumn(pCol);
121218 if( isHidden && pPragma->iArg==0 ){
121219 nHidden++;
@@ -121270,10 +121341,11 @@
121270 case PragTyp_INDEX_INFO: if( zRight ){
121271 Index *pIdx;
121272 Table *pTab;
121273 pIdx = sqlite3FindIndex(db, zRight, zDb);
121274 if( pIdx ){
 
121275 int i;
121276 int mx;
121277 if( pPragma->iArg ){
121278 /* PRAGMA index_xinfo (newer version with more rows and columns) */
121279 mx = pIdx->nColumn;
@@ -121282,11 +121354,11 @@
121282 /* PRAGMA index_info (legacy version) */
121283 mx = pIdx->nKeyCol;
121284 pParse->nMem = 3;
121285 }
121286 pTab = pIdx->pTable;
121287 sqlite3CodeVerifySchema(pParse, iDb);
121288 assert( pParse->nMem<=pPragma->nPragCName );
121289 for(i=0; i<mx; i++){
121290 i16 cnum = pIdx->aiColumn[i];
121291 sqlite3VdbeMultiLoad(v, 1, "iisX", i, cnum,
121292 cnum<0 ? 0 : pTab->aCol[cnum].zName);
@@ -121306,12 +121378,13 @@
121306 Index *pIdx;
121307 Table *pTab;
121308 int i;
121309 pTab = sqlite3FindTable(db, zRight, zDb);
121310 if( pTab ){
 
121311 pParse->nMem = 5;
121312 sqlite3CodeVerifySchema(pParse, iDb);
121313 for(pIdx=pTab->pIndex, i=0; pIdx; pIdx=pIdx->pNext, i++){
121314 const char *azOrigin[] = { "c", "u", "pk" };
121315 sqlite3VdbeMultiLoad(v, 1, "isisi",
121316 i,
121317 pIdx->zName,
@@ -121354,10 +121427,11 @@
121354 HashElem *j;
121355 FuncDef *p;
121356 pParse->nMem = 2;
121357 for(i=0; i<SQLITE_FUNC_HASH_SZ; i++){
121358 for(p=sqlite3BuiltinFunctions.a[i]; p; p=p->u.pHash ){
 
121359 sqlite3VdbeMultiLoad(v, 1, "si", p->zName, 1);
121360 }
121361 }
121362 for(j=sqliteHashFirst(&db->aFunc); j; j=sqliteHashNext(j)){
121363 p = (FuncDef*)sqliteHashData(j);
@@ -121395,13 +121469,14 @@
121395 Table *pTab;
121396 pTab = sqlite3FindTable(db, zRight, zDb);
121397 if( pTab ){
121398 pFK = pTab->pFKey;
121399 if( pFK ){
 
121400 int i = 0;
121401 pParse->nMem = 8;
121402 sqlite3CodeVerifySchema(pParse, iDb);
121403 while(pFK){
121404 int j;
121405 for(j=0; j<pFK->nCol; j++){
121406 sqlite3VdbeMultiLoad(v, 1, "iissssss",
121407 i,
@@ -121442,36 +121517,38 @@
121442
121443 regResult = pParse->nMem+1;
121444 pParse->nMem += 4;
121445 regKey = ++pParse->nMem;
121446 regRow = ++pParse->nMem;
121447 sqlite3CodeVerifySchema(pParse, iDb);
121448 k = sqliteHashFirst(&db->aDb[iDb].pSchema->tblHash);
121449 while( k ){
 
121450 if( zRight ){
121451 pTab = sqlite3LocateTable(pParse, 0, zRight, zDb);
121452 k = 0;
121453 }else{
121454 pTab = (Table*)sqliteHashData(k);
121455 k = sqliteHashNext(k);
121456 }
121457 if( pTab==0 || pTab->pFKey==0 ) continue;
121458 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
 
 
121459 if( pTab->nCol+regRow>pParse->nMem ) pParse->nMem = pTab->nCol + regRow;
121460 sqlite3OpenTable(pParse, 0, iDb, pTab, OP_OpenRead);
121461 sqlite3VdbeLoadString(v, regResult, pTab->zName);
121462 for(i=1, pFK=pTab->pFKey; pFK; i++, pFK=pFK->pNextFrom){
121463 pParent = sqlite3FindTable(db, pFK->zTo, zDb);
121464 if( pParent==0 ) continue;
121465 pIdx = 0;
121466 sqlite3TableLock(pParse, iDb, pParent->tnum, 0, pParent->zName);
121467 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, 0);
121468 if( x==0 ){
121469 if( pIdx==0 ){
121470 sqlite3OpenTable(pParse, i, iDb, pParent, OP_OpenRead);
121471 }else{
121472 sqlite3VdbeAddOp3(v, OP_OpenRead, i, pIdx->tnum, iDb);
121473 sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
121474 }
121475 }else{
121476 k = 0;
121477 break;
@@ -140166,13 +140243,15 @@
140166 ** The table object reference passed as the second argument to this function
140167 ** must represent a virtual table. This function invokes the xBestIndex()
140168 ** method of the virtual table with the sqlite3_index_info object that
140169 ** comes in as the 3rd argument to this function.
140170 **
140171 ** If an error occurs, pParse is populated with an error message and a
140172 ** non-zero value is returned. Otherwise, 0 is returned and the output
140173 ** part of the sqlite3_index_info structure is left populated.
 
 
140174 **
140175 ** Whether or not an error is returned, it is the responsibility of the
140176 ** caller to eventually free p->idxStr if p->needToFreeIdxStr indicates
140177 ** that this is required.
140178 */
@@ -140182,11 +140261,11 @@
140182
140183 TRACE_IDX_INPUTS(p);
140184 rc = pVtab->pModule->xBestIndex(pVtab, p);
140185 TRACE_IDX_OUTPUTS(p);
140186
140187 if( rc!=SQLITE_OK ){
140188 if( rc==SQLITE_NOMEM ){
140189 sqlite3OomFault(pParse->db);
140190 }else if( !pVtab->zErrMsg ){
140191 sqlite3ErrorMsg(pParse, "%s", sqlite3ErrStr(rc));
140192 }else{
@@ -140193,23 +140272,11 @@
140193 sqlite3ErrorMsg(pParse, "%s", pVtab->zErrMsg);
140194 }
140195 }
140196 sqlite3_free(pVtab->zErrMsg);
140197 pVtab->zErrMsg = 0;
140198
140199 #if 0
140200 /* This error is now caught by the caller.
140201 ** Search for "xBestIndex malfunction" below */
140202 for(i=0; i<p->nConstraint; i++){
140203 if( !p->aConstraint[i].usable && p->aConstraintUsage[i].argvIndex>0 ){
140204 sqlite3ErrorMsg(pParse,
140205 "table %s: xBestIndex returned an invalid plan", pTab->zName);
140206 }
140207 }
140208 #endif
140209
140210 return pParse->nErr;
140211 }
140212 #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
140213
140214 #ifdef SQLITE_ENABLE_STAT3_OR_STAT4
140215 /*
@@ -142278,11 +142345,21 @@
142278 pIdxInfo->idxFlags = 0;
142279 pIdxInfo->colUsed = (sqlite3_int64)pSrc->colUsed;
142280
142281 /* Invoke the virtual table xBestIndex() method */
142282 rc = vtabBestIndex(pParse, pSrc->pTab, pIdxInfo);
142283 if( rc ) return rc;
 
 
 
 
 
 
 
 
 
 
142284
142285 mxTerm = -1;
142286 assert( pNew->nLSlot>=nConstraint );
142287 for(i=0; i<nConstraint; i++) pNew->aLTerm[i] = 0;
142288 pNew->u.vtab.omitMask = 0;
@@ -146750,10 +146827,11 @@
146750 **
146751 ** The following is the concatenation of all %include directives from the
146752 ** input grammar file:
146753 */
146754 /* #include <stdio.h> */
 
146755 /************ Begin %include sections from the grammar ************************/
146756
146757 /* #include "sqliteInt.h" */
146758
146759 /*
@@ -147005,21 +147083,21 @@
147005 #define sqlite3ParserCTX_PDECL ,Parse *pParse
147006 #define sqlite3ParserCTX_PARAM ,pParse
147007 #define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
147008 #define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
147009 #define YYFALLBACK 1
147010 #define YYNSTATE 525
147011 #define YYNRULE 367
147012 #define YYNTOKEN 155
147013 #define YY_MAX_SHIFT 524
147014 #define YY_MIN_SHIFTREDUCE 760
147015 #define YY_MAX_SHIFTREDUCE 1126
147016 #define YY_ERROR_ACTION 1127
147017 #define YY_ACCEPT_ACTION 1128
147018 #define YY_NO_ACTION 1129
147019 #define YY_MIN_REDUCE 1130
147020 #define YY_MAX_REDUCE 1496
147021 /************* End control #defines *******************************************/
147022 #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
147023
147024 /* Define the yytestcase() macro to be a no-op if is not already defined
147025 ** otherwise.
@@ -147084,211 +147162,211 @@
147084 ** yy_default[] Default action for each state.
147085 **
147086 *********** Begin parsing tables **********************************************/
147087 #define YY_ACTTAB_COUNT (2009)
147088 static const YYACTIONTYPE yy_action[] = {
147089 /* 0 */ 372, 105, 102, 197, 105, 102, 197, 519, 1128, 1,
147090 /* 10 */ 1, 524, 2, 1132, 519, 1196, 1175, 1460, 275, 374,
147091 /* 20 */ 127, 1393, 1201, 1201, 1196, 1170, 178, 1209, 64, 64,
147092 /* 30 */ 481, 891, 326, 432, 352, 37, 37, 812, 366, 892,
147093 /* 40 */ 513, 513, 513, 112, 113, 103, 1104, 1104, 957, 960,
147094 /* 50 */ 950, 950, 110, 110, 111, 111, 111, 111, 369, 252,
147095 /* 60 */ 252, 519, 252, 252, 501, 519, 313, 519, 463, 519,
147096 /* 70 */ 1083, 495, 516, 482, 6, 516, 813, 134, 502, 228,
147097 /* 80 */ 194, 432, 37, 37, 519, 208, 64, 64, 64, 64,
147098 /* 90 */ 13, 13, 109, 109, 109, 109, 108, 108, 107, 107,
147099 /* 100 */ 107, 106, 405, 258, 385, 13, 13, 402, 401, 432,
147100 /* 110 */ 252, 252, 374, 480, 409, 1108, 1083, 1084, 1085, 390,
147101 /* 120 */ 1110, 394, 501, 516, 501, 1427, 1423, 308, 1109, 311,
147102 /* 130 */ 1260, 500, 374, 503, 16, 16, 112, 113, 103, 1104,
147103 /* 140 */ 1104, 957, 960, 950, 950, 110, 110, 111, 111, 111,
147104 /* 150 */ 111, 262, 1111, 499, 1111, 405, 112, 113, 103, 1104,
147105 /* 160 */ 1104, 957, 960, 950, 950, 110, 110, 111, 111, 111,
147106 /* 170 */ 111, 129, 1429, 347, 1424, 343, 1063, 496, 1061, 263,
147107 /* 180 */ 73, 105, 102, 197, 998, 109, 109, 109, 109, 108,
147108 /* 190 */ 108, 107, 107, 107, 106, 405, 374, 111, 111, 111,
147109 /* 200 */ 111, 104, 496, 89, 1436, 109, 109, 109, 109, 108,
147110 /* 210 */ 108, 107, 107, 107, 106, 405, 111, 111, 111, 111,
147111 /* 220 */ 112, 113, 103, 1104, 1104, 957, 960, 950, 950, 110,
147112 /* 230 */ 110, 111, 111, 111, 111, 109, 109, 109, 109, 108,
147113 /* 240 */ 108, 107, 107, 107, 106, 405, 114, 108, 108, 107,
147114 /* 250 */ 107, 107, 106, 405, 109, 109, 109, 109, 108, 108,
147115 /* 260 */ 107, 107, 107, 106, 405, 152, 403, 403, 403, 109,
147116 /* 270 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 405,
147117 /* 280 */ 178, 497, 1416, 438, 1041, 1490, 1083, 519, 1490, 374,
147118 /* 290 */ 425, 301, 361, 416, 74, 1083, 109, 109, 109, 109,
147119 /* 300 */ 108, 108, 107, 107, 107, 106, 405, 1417, 37, 37,
147120 /* 310 */ 1435, 274, 510, 112, 113, 103, 1104, 1104, 957, 960,
147121 /* 320 */ 950, 950, 110, 110, 111, 111, 111, 111, 1440, 524,
147122 /* 330 */ 2, 1132, 1083, 1084, 1085, 434, 275, 1083, 127, 370,
147123 /* 340 */ 937, 1083, 1084, 1085, 220, 1209, 917, 462, 459, 458,
147124 /* 350 */ 396, 167, 519, 1039, 152, 449, 928, 457, 152, 878,
147125 /* 360 */ 927, 293, 109, 109, 109, 109, 108, 108, 107, 107,
147126 /* 370 */ 107, 106, 405, 13, 13, 261, 857, 252, 252, 227,
147127 /* 380 */ 106, 405, 374, 1083, 1084, 1085, 315, 392, 1083, 300,
147128 /* 390 */ 516, 927, 927, 929, 231, 327, 1259, 1392, 1427, 494,
147129 /* 400 */ 274, 510, 12, 208, 274, 510, 112, 113, 103, 1104,
147130 /* 410 */ 1104, 957, 960, 950, 950, 110, 110, 111, 111, 111,
147131 /* 420 */ 111, 1444, 290, 1132, 292, 1083, 1101, 247, 275, 1102,
147132 /* 430 */ 127, 391, 409, 393, 1083, 1084, 1085, 1209, 159, 238,
147133 /* 440 */ 255, 325, 465, 320, 464, 225, 794, 105, 102, 197,
147134 /* 450 */ 517, 318, 846, 846, 449, 109, 109, 109, 109, 108,
147135 /* 460 */ 108, 107, 107, 107, 106, 405, 519, 518, 519, 252,
147136 /* 470 */ 252, 1083, 1084, 1085, 439, 374, 1102, 937, 1464, 798,
147137 /* 480 */ 274, 510, 516, 105, 102, 197, 340, 63, 63, 64,
147138 /* 490 */ 64, 27, 794, 928, 291, 208, 1358, 927, 519, 112,
147139 /* 500 */ 113, 103, 1104, 1104, 957, 960, 950, 950, 110, 110,
147140 /* 510 */ 111, 111, 111, 111, 107, 107, 107, 106, 405, 49,
147141 /* 520 */ 49, 519, 28, 1083, 409, 501, 425, 301, 927, 927,
147142 /* 530 */ 929, 186, 472, 1083, 471, 1003, 1003, 446, 519, 1083,
147143 /* 540 */ 338, 519, 45, 45, 1087, 346, 173, 168, 109, 109,
147144 /* 550 */ 109, 109, 108, 108, 107, 107, 107, 106, 405, 13,
147145 /* 560 */ 13, 205, 13, 13, 252, 252, 1199, 1199, 374, 1083,
147146 /* 570 */ 1084, 1085, 791, 265, 5, 363, 498, 516, 473, 1083,
147147 /* 580 */ 1084, 1085, 402, 401, 1083, 1083, 1084, 1085, 3, 282,
147148 /* 590 */ 1083, 1087, 112, 113, 103, 1104, 1104, 957, 960, 950,
147149 /* 600 */ 950, 110, 110, 111, 111, 111, 111, 252, 252, 1019,
147150 /* 610 */ 220, 1083, 877, 462, 459, 458, 947, 947, 958, 961,
147151 /* 620 */ 516, 252, 252, 457, 1020, 1083, 449, 1111, 1213, 1111,
147152 /* 630 */ 1083, 1084, 1085, 519, 516, 430, 1083, 1084, 1085, 1021,
147153 /* 640 */ 516, 109, 109, 109, 109, 108, 108, 107, 107, 107,
147154 /* 650 */ 106, 405, 1056, 519, 50, 50, 519, 1083, 1084, 1085,
147155 /* 660 */ 832, 374, 1055, 383, 415, 1068, 1362, 207, 412, 777,
147156 /* 670 */ 833, 1083, 1084, 1085, 64, 64, 326, 64, 64, 1306,
147157 /* 680 */ 951, 415, 414, 1362, 1364, 112, 113, 103, 1104, 1104,
147158 /* 690 */ 957, 960, 950, 950, 110, 110, 111, 111, 111, 111,
147159 /* 700 */ 298, 486, 519, 1041, 1491, 519, 438, 1491, 358, 1124,
147160 /* 710 */ 487, 1000, 917, 489, 470, 1000, 132, 178, 33, 454,
147161 /* 720 */ 1207, 136, 410, 64, 64, 483, 64, 64, 423, 373,
147162 /* 730 */ 283, 1150, 252, 252, 109, 109, 109, 109, 108, 108,
147163 /* 740 */ 107, 107, 107, 106, 405, 516, 224, 444, 415, 266,
147164 /* 750 */ 1362, 266, 252, 252, 374, 300, 420, 286, 938, 400,
147165 /* 760 */ 980, 474, 404, 252, 252, 516, 9, 477, 231, 504,
147166 /* 770 */ 358, 1040, 1039, 1492, 359, 378, 516, 1125, 112, 113,
147167 /* 780 */ 103, 1104, 1104, 957, 960, 950, 950, 110, 110, 111,
147168 /* 790 */ 111, 111, 111, 252, 252, 1019, 519, 1351, 299, 252,
147169 /* 800 */ 252, 252, 252, 1102, 379, 249, 516, 449, 876, 326,
147170 /* 810 */ 1020, 484, 516, 195, 516, 438, 273, 15, 15, 519,
147171 /* 820 */ 318, 519, 95, 519, 93, 1021, 371, 109, 109, 109,
147172 /* 830 */ 109, 108, 108, 107, 107, 107, 106, 405, 519, 1125,
147173 /* 840 */ 39, 39, 51, 51, 52, 52, 507, 374, 519, 1208,
147174 /* 850 */ 1102, 922, 443, 345, 133, 440, 223, 222, 221, 53,
147175 /* 860 */ 53, 326, 1404, 765, 766, 767, 519, 374, 88, 54,
147176 /* 870 */ 54, 112, 113, 103, 1104, 1104, 957, 960, 950, 950,
147177 /* 880 */ 110, 110, 111, 111, 111, 111, 411, 55, 55, 196,
147178 /* 890 */ 519, 112, 113, 103, 1104, 1104, 957, 960, 950, 950,
147179 /* 900 */ 110, 110, 111, 111, 111, 111, 135, 264, 1153, 380,
147180 /* 910 */ 519, 40, 40, 519, 876, 519, 997, 519, 997, 116,
147181 /* 920 */ 109, 109, 109, 109, 108, 108, 107, 107, 107, 106,
147182 /* 930 */ 405, 41, 41, 519, 43, 43, 44, 44, 56, 56,
147183 /* 940 */ 109, 109, 109, 109, 108, 108, 107, 107, 107, 106,
147184 /* 950 */ 405, 519, 383, 519, 57, 57, 519, 803, 519, 383,
147185 /* 960 */ 519, 449, 200, 519, 327, 519, 1401, 519, 1463, 519,
147186 /* 970 */ 1291, 821, 58, 58, 14, 14, 519, 59, 59, 118,
147187 /* 980 */ 118, 60, 60, 519, 46, 46, 61, 61, 62, 62,
147188 /* 990 */ 47, 47, 519, 190, 189, 91, 519, 140, 140, 519,
147189 /* 1000 */ 398, 519, 277, 1204, 141, 141, 519, 1119, 519, 996,
147190 /* 1010 */ 519, 996, 519, 69, 69, 374, 278, 48, 48, 259,
147191 /* 1020 */ 65, 65, 119, 119, 246, 246, 260, 66, 66, 120,
147192 /* 1030 */ 120, 121, 121, 117, 117, 374, 519, 516, 387, 112,
147193 /* 1040 */ 113, 103, 1104, 1104, 957, 960, 950, 950, 110, 110,
147194 /* 1050 */ 111, 111, 111, 111, 519, 876, 519, 139, 139, 112,
147195 /* 1060 */ 113, 103, 1104, 1104, 957, 960, 950, 950, 110, 110,
147196 /* 1070 */ 111, 111, 111, 111, 1291, 138, 138, 125, 125, 519,
147197 /* 1080 */ 12, 519, 281, 1291, 519, 449, 131, 1291, 109, 109,
147198 /* 1090 */ 109, 109, 108, 108, 107, 107, 107, 106, 405, 519,
147199 /* 1100 */ 124, 124, 122, 122, 519, 123, 123, 519, 109, 109,
147200 /* 1110 */ 109, 109, 108, 108, 107, 107, 107, 106, 405, 519,
147201 /* 1120 */ 68, 68, 467, 787, 519, 70, 70, 306, 67, 67,
147202 /* 1130 */ 1036, 253, 253, 360, 1291, 191, 196, 1437, 469, 1305,
147203 /* 1140 */ 38, 38, 388, 94, 516, 42, 42, 177, 852, 274,
147204 /* 1150 */ 510, 389, 424, 851, 1360, 445, 512, 380, 381, 153,
147205 /* 1160 */ 427, 876, 436, 374, 224, 251, 194, 891, 182, 297,
147206 /* 1170 */ 787, 852, 88, 254, 470, 892, 851, 919, 811, 810,
147207 /* 1180 */ 230, 1245, 914, 374, 17, 417, 801, 112, 113, 103,
147208 /* 1190 */ 1104, 1104, 957, 960, 950, 950, 110, 110, 111, 111,
147209 /* 1200 */ 111, 111, 399, 818, 819, 1179, 987, 112, 101, 103,
147210 /* 1210 */ 1104, 1104, 957, 960, 950, 950, 110, 110, 111, 111,
147211 /* 1220 */ 111, 111, 379, 426, 431, 433, 302, 230, 230, 88,
147212 /* 1230 */ 1244, 455, 316, 801, 226, 88, 109, 109, 109, 109,
147213 /* 1240 */ 108, 108, 107, 107, 107, 106, 405, 86, 437, 983,
147214 /* 1250 */ 931, 885, 226, 987, 230, 419, 109, 109, 109, 109,
147215 /* 1260 */ 108, 108, 107, 107, 107, 106, 405, 324, 849, 785,
147216 /* 1270 */ 850, 100, 130, 100, 1407, 294, 374, 323, 1381, 1380,
147217 /* 1280 */ 441, 1453, 303, 1241, 307, 310, 312, 314, 1192, 1178,
147218 /* 1290 */ 1177, 1176, 319, 328, 329, 1232, 374, 931, 1253, 271,
147219 /* 1300 */ 1290, 113, 103, 1104, 1104, 957, 960, 950, 950, 110,
147220 /* 1310 */ 110, 111, 111, 111, 111, 1228, 1239, 506, 505, 1296,
147221 /* 1320 */ 1225, 1159, 103, 1104, 1104, 957, 960, 950, 950, 110,
147222 /* 1330 */ 110, 111, 111, 111, 111, 1152, 1141, 1140, 1142, 1447,
147223 /* 1340 */ 450, 244, 184, 98, 511, 188, 4, 357, 331, 109,
147224 /* 1350 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 405,
147225 /* 1360 */ 514, 333, 335, 199, 418, 460, 296, 289, 322, 109,
147226 /* 1370 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 405,
147227 /* 1380 */ 11, 285, 1283, 406, 365, 192, 1175, 1355, 435, 509,
147228 /* 1390 */ 350, 1354, 337, 98, 511, 508, 4, 187, 1450, 1119,
147229 /* 1400 */ 233, 1400, 155, 1398, 1116, 152, 72, 75, 382, 429,
147230 /* 1410 */ 514, 165, 115, 499, 937, 1280, 1275, 30, 149, 157,
147231 /* 1420 */ 96, 96, 8, 284, 86, 288, 287, 97, 1272, 406,
147232 /* 1430 */ 521, 520, 421, 406, 927, 422, 453, 210, 160, 161,
147233 /* 1440 */ 162, 163, 362, 428, 1286, 508, 442, 214, 80, 364,
147234 /* 1450 */ 31, 274, 510, 169, 1349, 448, 492, 245, 1369, 216,
147235 /* 1460 */ 174, 491, 451, 309, 937, 927, 927, 929, 930, 24,
147236 /* 1470 */ 96, 96, 305, 217, 367, 466, 1143, 97, 218, 406,
147237 /* 1480 */ 521, 520, 1195, 1194, 927, 1193, 395, 803, 98, 511,
147238 /* 1490 */ 368, 4, 1186, 1167, 1185, 269, 1166, 321, 1165, 1462,
147239 /* 1500 */ 397, 270, 485, 476, 479, 514, 85, 232, 1236, 98,
147240 /* 1510 */ 511, 330, 4, 490, 340, 927, 927, 929, 930, 24,
147241 /* 1520 */ 1439, 1072, 408, 1237, 339, 256, 514, 1418, 406, 10,
147242 /* 1530 */ 356, 356, 355, 241, 353, 181, 92, 774, 1235, 1218,
147243 /* 1540 */ 508, 342, 87, 332, 334, 1217, 1234, 336, 344, 406,
147244 /* 1550 */ 201, 492, 280, 183, 488, 348, 493, 349, 239, 937,
147245 /* 1560 */ 279, 508, 1335, 29, 1149, 96, 96, 522, 1078, 272,
147246 /* 1570 */ 243, 240, 97, 242, 406, 521, 520, 523, 1138, 927,
147247 /* 1580 */ 937, 142, 1133, 1385, 143, 1386, 96, 96, 856, 376,
147248 /* 1590 */ 203, 761, 154, 97, 1384, 406, 521, 520, 204, 377,
147249 /* 1600 */ 927, 146, 144, 1383, 407, 1163, 1162, 128, 202, 71,
147250 /* 1610 */ 927, 927, 929, 930, 24, 267, 1160, 185, 276, 198,
147251 /* 1620 */ 257, 98, 511, 126, 4, 911, 995, 156, 993, 145,
147252 /* 1630 */ 206, 927, 927, 929, 930, 24, 158, 835, 514, 209,
147253 /* 1640 */ 295, 1009, 375, 164, 915, 147, 384, 274, 510, 386,
147254 /* 1650 */ 166, 76, 77, 78, 148, 1012, 211, 212, 1008, 137,
147255 /* 1660 */ 18, 406, 79, 213, 304, 1001, 1113, 230, 447, 215,
147256 /* 1670 */ 413, 171, 32, 508, 323, 776, 170, 452, 172, 219,
147257 /* 1680 */ 456, 81, 19, 20, 492, 317, 461, 82, 268, 491,
147258 /* 1690 */ 150, 814, 937, 179, 83, 468, 151, 180, 96, 96,
147259 /* 1700 */ 963, 84, 1044, 34, 475, 97, 1045, 406, 521, 520,
147260 /* 1710 */ 1072, 408, 927, 35, 256, 884, 478, 248, 193, 356,
147261 /* 1720 */ 356, 355, 241, 353, 250, 175, 774, 229, 879, 21,
147262 /* 1730 */ 100, 98, 511, 22, 4, 1058, 1049, 176, 341, 201,
147263 /* 1740 */ 7, 280, 1062, 927, 927, 929, 930, 24, 514, 279,
147264 /* 1750 */ 88, 1060, 23, 978, 964, 962, 966, 1018, 1017, 967,
147265 /* 1760 */ 235, 90, 511, 234, 4, 25, 36, 515, 932, 786,
147266 /* 1770 */ 845, 406, 99, 26, 236, 237, 351, 1455, 514, 203,
147267 /* 1780 */ 354, 1454, 1073, 508, 1129, 1129, 1129, 204, 1129, 1129,
147268 /* 1790 */ 146, 1129, 1129, 1129, 1129, 1129, 1129, 202, 1129, 1129,
147269 /* 1800 */ 1129, 406, 937, 1129, 1129, 1129, 1129, 1129, 96, 96,
147270 /* 1810 */ 1129, 1129, 1129, 508, 1129, 97, 1129, 406, 521, 520,
147271 /* 1820 */ 1129, 1129, 927, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147272 /* 1830 */ 1129, 375, 937, 1129, 1129, 1129, 274, 510, 96, 96,
147273 /* 1840 */ 1129, 1129, 1129, 1129, 1129, 97, 1129, 406, 521, 520,
147274 /* 1850 */ 1129, 1129, 927, 927, 927, 929, 930, 24, 1129, 413,
147275 /* 1860 */ 1129, 1129, 1129, 256, 1129, 1129, 1129, 1129, 356, 356,
147276 /* 1870 */ 355, 241, 353, 1129, 1129, 774, 1129, 1129, 1129, 1129,
147277 /* 1880 */ 1129, 1129, 1129, 927, 927, 929, 930, 24, 201, 1129,
147278 /* 1890 */ 280, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 279, 1129,
147279 /* 1900 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147280 /* 1910 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147281 /* 1920 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 203, 1129,
147282 /* 1930 */ 1129, 1129, 1129, 1129, 1129, 1129, 204, 1129, 1129, 146,
147283 /* 1940 */ 1129, 1129, 1129, 1129, 1129, 1129, 202, 1129, 1129, 1129,
147284 /* 1950 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147285 /* 1960 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147286 /* 1970 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147287 /* 1980 */ 375, 1129, 1129, 1129, 1129, 274, 510, 1129, 1129, 1129,
147288 /* 1990 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129,
147289 /* 2000 */ 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 413,
147290 };
147291 static const YYCODETYPE yy_lookahead[] = {
147292 /* 0 */ 184, 238, 239, 240, 238, 239, 240, 163, 155, 156,
147293 /* 10 */ 157, 158, 159, 160, 163, 191, 192, 183, 165, 19,
147294 /* 20 */ 167, 258, 202, 203, 200, 191, 163, 174, 184, 185,
@@ -147428,48 +147506,48 @@
147428 /* 1360 */ 36, 222, 222, 260, 226, 188, 256, 226, 187, 92,
147429 /* 1370 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
147430 /* 1380 */ 210, 213, 213, 59, 213, 196, 192, 187, 256, 244,
147431 /* 1390 */ 212, 187, 226, 19, 20, 71, 22, 210, 166, 60,
147432 /* 1400 */ 130, 170, 260, 170, 38, 81, 257, 257, 170, 104,
147433 /* 1410 */ 36, 22, 137, 134, 90, 236, 217, 235, 43, 201,
147434 /* 1420 */ 96, 97, 48, 216, 138, 213, 216, 103, 217, 105,
147435 /* 1430 */ 106, 107, 18, 59, 110, 170, 18, 169, 204, 204,
147436 /* 1440 */ 204, 204, 213, 213, 201, 71, 170, 169, 146, 236,
147437 /* 1450 */ 235, 127, 128, 201, 213, 62, 82, 170, 253, 169,
147438 /* 1460 */ 22, 87, 189, 170, 90, 141, 142, 143, 144, 145,
147439 /* 1470 */ 96, 97, 252, 169, 189, 104, 170, 103, 169, 105,
147440 /* 1480 */ 106, 107, 186, 186, 110, 186, 64, 115, 19, 20,
147441 /* 1490 */ 189, 22, 194, 186, 194, 246, 188, 186, 186, 186,
147442 /* 1500 */ 102, 246, 133, 189, 189, 36, 104, 170, 228, 19,
147443 /* 1510 */ 20, 227, 22, 84, 22, 141, 142, 143, 144, 145,
147444 /* 1520 */ 0, 1, 2, 228, 271, 5, 36, 269, 59, 22,
147445 /* 1530 */ 10, 11, 12, 13, 14, 216, 146, 17, 228, 217,
147446 /* 1540 */ 71, 216, 136, 227, 227, 217, 228, 227, 170, 59,
147447 /* 1550 */ 30, 82, 32, 215, 135, 214, 87, 213, 25, 90,
147448 /* 1560 */ 40, 71, 241, 26, 173, 96, 97, 172, 13, 243,
147449 /* 1570 */ 6, 164, 103, 164, 105, 106, 107, 162, 162, 110,
147450 /* 1580 */ 90, 176, 162, 182, 176, 182, 96, 97, 98, 266,
147451 /* 1590 */ 70, 4, 263, 103, 182, 105, 106, 107, 78, 266,
147452 /* 1600 */ 110, 81, 176, 182, 3, 182, 182, 190, 88, 182,
147453 /* 1610 */ 141, 142, 143, 144, 145, 190, 182, 22, 151, 15,
147454 /* 1620 */ 89, 19, 20, 16, 22, 128, 23, 139, 23, 119,
147455 /* 1630 */ 24, 141, 142, 143, 144, 145, 131, 20, 36, 133,
147456 /* 1640 */ 16, 1, 122, 131, 140, 119, 61, 127, 128, 37,
147457 /* 1650 */ 139, 53, 53, 53, 119, 105, 34, 130, 1, 5,
147458 /* 1660 */ 22, 59, 53, 104, 149, 68, 75, 26, 41, 130,
147459 /* 1670 */ 150, 104, 24, 71, 120, 20, 68, 19, 22, 114,
147460 /* 1680 */ 67, 22, 22, 22, 82, 23, 67, 22, 67, 87,
147461 /* 1690 */ 37, 28, 90, 23, 138, 22, 153, 23, 96, 97,
147462 /* 1700 */ 23, 26, 23, 22, 24, 103, 23, 105, 106, 107,
147463 /* 1710 */ 1, 2, 110, 22, 5, 105, 24, 23, 130, 10,
147464 /* 1720 */ 11, 12, 13, 14, 23, 22, 17, 34, 132, 34,
147465 /* 1730 */ 26, 19, 20, 34, 22, 85, 23, 26, 24, 30,
147466 /* 1740 */ 44, 32, 75, 141, 142, 143, 144, 145, 36, 40,
147467 /* 1750 */ 26, 83, 34, 23, 23, 23, 23, 23, 23, 11,
147468 /* 1760 */ 22, 19, 20, 26, 22, 22, 22, 26, 23, 23,
147469 /* 1770 */ 124, 59, 22, 22, 130, 130, 23, 130, 36, 70,
147470 /* 1780 */ 15, 130, 1, 71, 277, 277, 277, 78, 277, 277,
147471 /* 1790 */ 81, 277, 277, 277, 277, 277, 277, 88, 277, 277,
147472 /* 1800 */ 277, 59, 90, 277, 277, 277, 277, 277, 96, 97,
147473 /* 1810 */ 277, 277, 277, 71, 277, 103, 277, 105, 106, 107,
147474 /* 1820 */ 277, 277, 110, 277, 277, 277, 277, 277, 277, 277,
147475 /* 1830 */ 277, 122, 90, 277, 277, 277, 127, 128, 96, 97,
@@ -147490,11 +147568,11 @@
147490 /* 1980 */ 122, 277, 277, 277, 277, 127, 128, 277, 277, 277,
147491 /* 1990 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
147492 /* 2000 */ 277, 277, 277, 277, 277, 277, 277, 277, 150, 277,
147493 /* 2010 */ 277, 277, 277, 277, 277, 277, 277, 277, 277,
147494 };
147495 #define YY_SHIFT_COUNT (524)
147496 #define YY_SHIFT_MIN (0)
147497 #define YY_SHIFT_MAX (1858)
147498 static const unsigned short int yy_shift_ofst[] = {
147499 /* 0 */ 1709, 1520, 1858, 1324, 1324, 277, 1374, 1469, 1602, 1712,
147500 /* 10 */ 1712, 1712, 273, 0, 0, 113, 1016, 1712, 1712, 1712,
@@ -147522,39 +147600,39 @@
147522 /* 230 */ 531, 531, 744, 531, 531, 783, 531, 531, 531, 531,
147523 /* 240 */ 531, 531, 531, 531, 419, 682, 327, 370, 370, 370,
147524 /* 250 */ 370, 1029, 327, 327, 1024, 897, 856, 947, 1109, 706,
147525 /* 260 */ 706, 1143, 1109, 1109, 1143, 842, 945, 1118, 1136, 1136,
147526 /* 270 */ 1136, 706, 676, 400, 1047, 694, 1339, 1270, 1270, 1366,
147527 /* 280 */ 1366, 1270, 1305, 1389, 1275, 1279, 1375, 1275, 1279, 1286,
147528 /* 290 */ 1414, 1414, 1414, 1414, 1270, 1418, 1286, 1286, 1305, 1389,
147529 /* 300 */ 1375, 1375, 1286, 1270, 1418, 1302, 1393, 1270, 1418, 1438,
147530 /* 310 */ 1270, 1418, 1270, 1418, 1438, 1371, 1371, 1371, 1422, 1438,
147531 /* 320 */ 1371, 1372, 1371, 1422, 1371, 1371, 1438, 1398, 1398, 1438,
147532 /* 330 */ 1369, 1402, 1369, 1402, 1369, 1402, 1369, 1402, 1270, 1279,
147533 /* 340 */ 1429, 1492, 1275, 1279, 1507, 1270, 1390, 1275, 1406, 1419,
147534 /* 350 */ 1286, 1533, 1537, 1555, 1555, 1564, 1564, 1564, 2009, 2009,
147535 /* 360 */ 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009,
147536 /* 370 */ 2009, 2009, 2009, 2009, 570, 345, 686, 748, 50, 740,
147537 /* 380 */ 1064, 1107, 469, 537, 1042, 1146, 1162, 1154, 1201, 1202,
147538 /* 390 */ 1203, 1208, 1209, 1127, 1069, 1196, 1157, 1147, 1226, 1228,
147539 /* 400 */ 1245, 775, 868, 1246, 1247, 1191, 1151, 1587, 1601, 1595,
147540 /* 410 */ 1467, 1604, 1531, 1607, 1603, 1605, 1497, 1488, 1510, 1606,
147541 /* 420 */ 1505, 1617, 1506, 1624, 1640, 1512, 1504, 1526, 1585, 1612,
147542 /* 430 */ 1511, 1598, 1599, 1600, 1609, 1535, 1550, 1622, 1527, 1657,
147543 /* 440 */ 1654, 1638, 1559, 1515, 1597, 1641, 1608, 1591, 1627, 1539,
147544 /* 450 */ 1567, 1648, 1655, 1658, 1554, 1565, 1656, 1613, 1659, 1660,
147545 /* 460 */ 1662, 1661, 1619, 1663, 1665, 1621, 1653, 1670, 1556, 1673,
147546 /* 470 */ 1543, 1674, 1677, 1675, 1679, 1681, 1680, 1683, 1691, 1692,
147547 /* 480 */ 1588, 1694, 1701, 1610, 1693, 1703, 1596, 1704, 1695, 1704,
147548 /* 490 */ 1699, 1650, 1667, 1668, 1696, 1713, 1714, 1711, 1724, 1718,
147549 /* 500 */ 1730, 1704, 1731, 1732, 1733, 1734, 1737, 1735, 1738, 1748,
147550 /* 510 */ 1743, 1744, 1745, 1746, 1750, 1751, 1741, 1646, 1644, 1645,
147551 /* 520 */ 1647, 1651, 1753, 1765, 1781,
147552 };
147553 #define YY_REDUCE_COUNT (373)
147554 #define YY_REDUCE_MIN (-237)
147555 #define YY_REDUCE_MAX (1434)
147556 static const short yy_reduce_ofst[] = {
147557 /* 0 */ -147, 171, 263, -96, 358, -144, -149, -102, 124, -156,
147558 /* 10 */ -98, 305, 401, -57, 209, -237, 245, -94, -79, 189,
147559 /* 20 */ 375, 490, 493, 378, 303, 539, 542, 501, 503, 554,
147560 /* 30 */ 415, 526, 546, 557, 587, 593, 595, -234, -234, -234,
@@ -147580,75 +147658,74 @@
147580 /* 230 */ 1137, 1152, 1077, 1153, 1155, 1114, 1156, 304, 1158, 1172,
147581 /* 240 */ 1173, 1174, 1175, 1176, 1089, 1091, 1133, 1098, 1126, 1139,
147582 /* 250 */ 1140, 1070, 1133, 1133, 1170, 1163, 1186, 1103, 1168, 1138,
147583 /* 260 */ 1141, 1110, 1169, 1171, 1132, 1177, 1189, 1194, 1181, 1200,
147584 /* 270 */ 1204, 1166, 1145, 1178, 1187, 1232, 1142, 1231, 1233, 1149,
147585 /* 280 */ 1150, 1238, 1179, 1182, 1199, 1207, 1218, 1211, 1210, 1212,
147586 /* 290 */ 1234, 1235, 1236, 1237, 1265, 1268, 1229, 1230, 1213, 1215,
147587 /* 300 */ 1243, 1252, 1241, 1276, 1278, 1205, 1220, 1287, 1290, 1273,
147588 /* 310 */ 1293, 1304, 1306, 1309, 1285, 1296, 1297, 1299, 1298, 1301,
147589 /* 320 */ 1307, 1308, 1311, 1300, 1312, 1313, 1314, 1249, 1255, 1315,
147590 /* 330 */ 1280, 1284, 1295, 1316, 1310, 1317, 1318, 1320, 1337, 1319,
147591 /* 340 */ 1253, 1258, 1322, 1325, 1321, 1378, 1326, 1328, 1338, 1341,
147592 /* 350 */ 1344, 1391, 1395, 1407, 1409, 1415, 1416, 1420, 1323, 1333,
147593 /* 360 */ 1329, 1405, 1401, 1403, 1412, 1421, 1408, 1417, 1425, 1423,
147594 /* 370 */ 1424, 1427, 1434, 1426,
147595 };
147596 static const YYACTIONTYPE yy_default[] = {
147597 /* 0 */ 1496, 1496, 1496, 1344, 1127, 1233, 1127, 1127, 1127, 1344,
147598 /* 10 */ 1344, 1344, 1127, 1263, 1263, 1395, 1158, 1127, 1127, 1127,
147599 /* 20 */ 1127, 1127, 1127, 1127, 1343, 1127, 1127, 1127, 1127, 1127,
147600 /* 30 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1269, 1127,
147601 /* 40 */ 1127, 1127, 1127, 1127, 1345, 1346, 1127, 1127, 1127, 1394,
147602 /* 50 */ 1396, 1279, 1278, 1277, 1276, 1377, 1250, 1274, 1267, 1271,
147603 /* 60 */ 1339, 1340, 1338, 1342, 1346, 1345, 1127, 1270, 1310, 1324,
147604 /* 70 */ 1309, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147605 /* 80 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147606 /* 90 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147607 /* 100 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147608 /* 110 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1318, 1323, 1329,
147609 /* 120 */ 1322, 1319, 1312, 1311, 1313, 1314, 1127, 1148, 1197, 1127,
147610 /* 130 */ 1127, 1127, 1127, 1413, 1412, 1127, 1127, 1158, 1315, 1316,
147611 /* 140 */ 1326, 1325, 1402, 1452, 1451, 1127, 1127, 1127, 1127, 1127,
147612 /* 150 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147613 /* 160 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147614 /* 170 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1158, 1154, 1304,
147615 /* 180 */ 1303, 1422, 1154, 1257, 1127, 1408, 1233, 1224, 1127, 1127,
147616 /* 190 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147617 /* 200 */ 1127, 1399, 1397, 1127, 1359, 1127, 1127, 1127, 1127, 1127,
147618 /* 210 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147619 /* 220 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147620 /* 230 */ 1127, 1127, 1229, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147621 /* 240 */ 1127, 1127, 1127, 1446, 1127, 1372, 1211, 1229, 1229, 1229,
147622 /* 250 */ 1229, 1231, 1212, 1210, 1223, 1158, 1134, 1488, 1273, 1252,
147623 /* 260 */ 1252, 1485, 1273, 1273, 1485, 1172, 1466, 1169, 1263, 1263,
147624 /* 270 */ 1263, 1252, 1341, 1230, 1223, 1127, 1488, 1238, 1238, 1487,
147625 /* 280 */ 1487, 1238, 1282, 1288, 1268, 1257, 1200, 1268, 1257, 1273,
147626 /* 290 */ 1206, 1206, 1206, 1206, 1238, 1145, 1273, 1273, 1282, 1288,
147627 /* 300 */ 1200, 1200, 1273, 1238, 1145, 1376, 1482, 1238, 1145, 1352,
147628 /* 310 */ 1238, 1145, 1238, 1145, 1352, 1198, 1198, 1198, 1187, 1352,
147629 /* 320 */ 1198, 1172, 1198, 1187, 1198, 1198, 1352, 1356, 1356, 1352,
147630 /* 330 */ 1256, 1251, 1256, 1251, 1256, 1251, 1256, 1251, 1238, 1257,
147631 /* 340 */ 1421, 1127, 1268, 1257, 1347, 1238, 1127, 1268, 1266, 1264,
147632 /* 350 */ 1273, 1151, 1190, 1449, 1449, 1445, 1445, 1445, 1493, 1493,
147633 /* 360 */ 1408, 1461, 1158, 1158, 1158, 1158, 1461, 1174, 1174, 1158,
147634 /* 370 */ 1158, 1158, 1158, 1461, 1127, 1127, 1127, 1127, 1127, 1127,
147635 /* 380 */ 1456, 1127, 1361, 1242, 1127, 1127, 1127, 1127, 1127, 1127,
147636 /* 390 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147637 /* 400 */ 1127, 1127, 1127, 1127, 1127, 1127, 1293, 1127, 1130, 1405,
147638 /* 410 */ 1127, 1127, 1403, 1127, 1127, 1127, 1127, 1127, 1127, 1243,
147639 /* 420 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147640 /* 430 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1484, 1127,
147641 /* 440 */ 1127, 1127, 1127, 1127, 1127, 1375, 1374, 1127, 1127, 1240,
147642 /* 450 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147643 /* 460 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147644 /* 470 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147645 /* 480 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1265, 1127, 1420,
147646 /* 490 */ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1434, 1258, 1127,
147647 /* 500 */ 1127, 1475, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
147648 /* 510 */ 1127, 1127, 1127, 1127, 1127, 1127, 1470, 1214, 1295, 1127,
147649 /* 520 */ 1294, 1298, 1127, 1139, 1127,
147650 };
147651 /********** End of lemon-generated parsing tables *****************************/
147652
147653 /* The next table maps tokens (terminal symbols) into fallback tokens.
147654 ** If a construct like the following:
@@ -148268,14 +148345,14 @@
148268 /* 137 */ "having_opt ::= HAVING expr",
148269 /* 138 */ "limit_opt ::=",
148270 /* 139 */ "limit_opt ::= LIMIT expr",
148271 /* 140 */ "limit_opt ::= LIMIT expr OFFSET expr",
148272 /* 141 */ "limit_opt ::= LIMIT expr COMMA expr",
148273 /* 142 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt orderby_opt limit_opt",
148274 /* 143 */ "where_opt ::=",
148275 /* 144 */ "where_opt ::= WHERE expr",
148276 /* 145 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt orderby_opt limit_opt",
148277 /* 146 */ "setlist ::= setlist COMMA nm EQ expr",
148278 /* 147 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
148279 /* 148 */ "setlist ::= nm EQ expr",
148280 /* 149 */ "setlist ::= LP idlist RP EQ expr",
148281 /* 150 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
@@ -149148,14 +149225,14 @@
149148 { 215, -2 }, /* (137) having_opt ::= HAVING expr */
149149 { 217, 0 }, /* (138) limit_opt ::= */
149150 { 217, -2 }, /* (139) limit_opt ::= LIMIT expr */
149151 { 217, -4 }, /* (140) limit_opt ::= LIMIT expr OFFSET expr */
149152 { 217, -4 }, /* (141) limit_opt ::= LIMIT expr COMMA expr */
149153 { 160, -8 }, /* (142) cmd ::= with DELETE FROM xfullname indexed_opt where_opt orderby_opt limit_opt */
149154 { 213, 0 }, /* (143) where_opt ::= */
149155 { 213, -2 }, /* (144) where_opt ::= WHERE expr */
149156 { 160, -10 }, /* (145) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt orderby_opt limit_opt */
149157 { 233, -5 }, /* (146) setlist ::= setlist COMMA nm EQ expr */
149158 { 233, -7 }, /* (147) setlist ::= setlist COMMA LP idlist RP EQ expr */
149159 { 233, -3 }, /* (148) setlist ::= nm EQ expr */
149160 { 233, -5 }, /* (149) setlist ::= LP idlist RP EQ expr */
149161 { 160, -7 }, /* (150) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
@@ -150035,21 +150112,21 @@
150035 {yymsp[-3].minor.yy18 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy18,yymsp[0].minor.yy18);}
150036 break;
150037 case 141: /* limit_opt ::= LIMIT expr COMMA expr */
150038 {yymsp[-3].minor.yy18 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy18,yymsp[-2].minor.yy18);}
150039 break;
150040 case 142: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt orderby_opt limit_opt */
 
 
 
 
 
 
150041 {
150042 sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy135, &yymsp[-3].minor.yy0);
150043 sqlite3DeleteFrom(pParse,yymsp[-4].minor.yy135,yymsp[-2].minor.yy18,yymsp[-1].minor.yy420,yymsp[0].minor.yy18);
150044 }
150045 break;
150046 case 145: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt orderby_opt limit_opt */
150047 {
150048 sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy135, &yymsp[-5].minor.yy0);
150049 sqlite3ExprListCheckLength(pParse,yymsp[-3].minor.yy420,"set list");
150050 sqlite3Update(pParse,yymsp[-6].minor.yy135,yymsp[-3].minor.yy420,yymsp[-2].minor.yy18,yymsp[-7].minor.yy70,yymsp[-1].minor.yy420,yymsp[0].minor.yy18,0);
150051 }
150052 break;
150053 case 146: /* setlist ::= setlist COMMA nm EQ expr */
150054 {
150055 yymsp[-4].minor.yy420 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy420, yymsp[0].minor.yy18);
@@ -151047,14 +151124,13 @@
151047 #endif
151048 yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
151049 yymajor = YYNOCODE;
151050 }else{
151051 while( yypParser->yytos >= yypParser->yystack
151052 && yymx != YYERRORSYMBOL
151053 && (yyact = yy_find_reduce_action(
151054 yypParser->yytos->stateno,
151055 YYERRORSYMBOL)) >= YY_MIN_REDUCE
151056 ){
151057 yy_pop_parser_stack(yypParser);
151058 }
151059 if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
151060 yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
@@ -156599,18 +156675,29 @@
156599 break;
156600 }
156601
156602 /* sqlite3_test_control(SQLITE_TESTCTRL_LOCALTIME_FAULT, int onoff);
156603 **
156604 ** If parameter onoff is non-zero, configure the wrappers so that all
156605 ** subsequent calls to localtime() and variants fail. If onoff is zero,
156606 ** undo this setting.
156607 */
156608 case SQLITE_TESTCTRL_LOCALTIME_FAULT: {
156609 sqlite3GlobalConfig.bLocaltimeFault = va_arg(ap, int);
156610 break;
156611 }
 
 
 
 
 
 
 
 
 
 
 
 
156612
156613 /* sqlite3_test_control(SQLITE_TESTCTRL_NEVER_CORRUPT, int);
156614 **
156615 ** Set or clear a flag that indicates that the database file is always well-
156616 ** formed and never corrupt. This flag is clear by default, indicating that
@@ -162395,10 +162482,11 @@
162395 }
162396
162397 return rc;
162398 }
162399
 
162400 /*
162401 ** This function is called on each phrase after the position lists for
162402 ** any deferred tokens have been loaded into memory. It updates the phrases
162403 ** current position list to include only those positions that are really
162404 ** instances of the phrase (after considering deferred tokens). If this
@@ -162498,10 +162586,11 @@
162498 }
162499 }
162500
162501 return SQLITE_OK;
162502 }
 
162503
162504 /*
162505 ** Maximum number of tokens a phrase may have to be considered for the
162506 ** incremental doclists strategy.
162507 */
@@ -178484,10 +178573,13 @@
178484 #define JEACH_ATOM 3
178485 #define JEACH_ID 4
178486 #define JEACH_PARENT 5
178487 #define JEACH_FULLKEY 6
178488 #define JEACH_PATH 7
 
 
 
178489 #define JEACH_JSON 8
178490 #define JEACH_ROOT 9
178491
178492 UNUSED_PARAM(pzErr);
178493 UNUSED_PARAM(argv);
@@ -178741,39 +178833,58 @@
178741 */
178742 static int jsonEachBestIndex(
178743 sqlite3_vtab *tab,
178744 sqlite3_index_info *pIdxInfo
178745 ){
178746 int i;
178747 int jsonIdx = -1;
178748 int rootIdx = -1;
 
178749 const struct sqlite3_index_constraint *pConstraint;
178750
 
 
 
178751 UNUSED_PARAM(tab);
 
178752 pConstraint = pIdxInfo->aConstraint;
178753 for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
178754 if( pConstraint->usable==0 ) continue;
178755 if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
178756 switch( pConstraint->iColumn ){
178757 case JEACH_JSON: jsonIdx = i; break;
178758 case JEACH_ROOT: rootIdx = i; break;
178759 default: /* no-op */ break;
 
 
 
 
 
178760 }
178761 }
178762 if( jsonIdx<0 ){
 
 
 
 
 
 
 
 
178763 pIdxInfo->idxNum = 0;
178764 pIdxInfo->estimatedCost = 1e99;
178765 }else{
178766 pIdxInfo->estimatedCost = 1.0;
178767 pIdxInfo->aConstraintUsage[jsonIdx].argvIndex = 1;
178768 pIdxInfo->aConstraintUsage[jsonIdx].omit = 1;
178769 if( rootIdx<0 ){
178770 pIdxInfo->idxNum = 1;
 
178771 }else{
178772 pIdxInfo->aConstraintUsage[rootIdx].argvIndex = 2;
178773 pIdxInfo->aConstraintUsage[rootIdx].omit = 1;
178774 pIdxInfo->idxNum = 3;
 
178775 }
178776 }
178777 return SQLITE_OK;
178778 }
178779
@@ -183789,11 +183900,11 @@
183789 ){
183790 GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
183791 if( p ){
183792 if( geopolyArea(p)<0.0 ){
183793 int ii, jj;
183794 for(ii=2, jj=p->nVertex*2 - 4; ii<jj; ii+=2, jj-=2){
183795 GeoCoord t = p->a[ii];
183796 p->a[ii] = p->a[jj];
183797 p->a[jj] = t;
183798 t = p->a[ii+1];
183799 p->a[ii+1] = p->a[jj+1];
@@ -183806,19 +183917,19 @@
183806 }
183807 }
183808
183809 #define GEOPOLY_PI 3.1415926535897932385
183810
183811 /* Fast approximation for cosine(X) for X between -0.5*pi and 2*pi
183812 */
183813 static double geopolyCosine(double r){
183814 assert( r>=-0.5*GEOPOLY_PI && r<=2.0*GEOPOLY_PI );
183815 if( r>=1.5*GEOPOLY_PI ){
183816 r -= 2.0*GEOPOLY_PI;
183817 }
183818 if( r>=0.5*GEOPOLY_PI ){
183819 return -geopolyCosine(r-GEOPOLY_PI);
183820 }else{
183821 double r2 = r*r;
183822 double r3 = r2*r;
183823 double r5 = r3*r2;
183824 return 0.9996949*r - 0.1656700*r3 + 0.0075134*r5;
@@ -183855,12 +183966,12 @@
183855 p->hdr[1] = 0;
183856 p->hdr[2] = (n>>8)&0xff;
183857 p->hdr[3] = n&0xff;
183858 for(i=0; i<n; i++){
183859 double rAngle = 2.0*GEOPOLY_PI*i/n;
183860 p->a[i*2] = x - r*geopolyCosine(rAngle-0.5*GEOPOLY_PI);
183861 p->a[i*2+1] = y + r*geopolyCosine(rAngle);
183862 }
183863 sqlite3_result_blob(context, p->hdr, 4+8*n, SQLITE_TRANSIENT);
183864 sqlite3_free(p);
183865 }
183866
@@ -191800,21 +191911,19 @@
191800 ** idxNum is normally 0, but will be 1 if a schema=? constraint exists.
191801 */
191802 static int statBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
191803 int i;
191804
191805 pIdxInfo->estimatedCost = 1.0e6; /* Initial cost estimate */
191806
191807 /* Look for a valid schema=? constraint. If found, change the idxNum to
191808 ** 1 and request the value of that constraint be sent to xFilter. And
191809 ** lower the cost estimate to encourage the constrained version to be
191810 ** used.
191811 */
191812 for(i=0; i<pIdxInfo->nConstraint; i++){
191813 if( pIdxInfo->aConstraint[i].usable==0 ) continue;
191814 if( pIdxInfo->aConstraint[i].op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
191815 if( pIdxInfo->aConstraint[i].iColumn!=10 ) continue;
 
 
191816 pIdxInfo->idxNum = 1;
191817 pIdxInfo->estimatedCost = 1.0;
191818 pIdxInfo->aConstraintUsage[i].argvIndex = 1;
191819 pIdxInfo->aConstraintUsage[i].omit = 1;
191820 break;
@@ -192003,10 +192112,11 @@
192003 assert( nPayload>=(u32)nLocal );
192004 assert( nLocal<=(nUsable-35) );
192005 if( nPayload>(u32)nLocal ){
192006 int j;
192007 int nOvfl = ((nPayload - nLocal) + nUsable-4 - 1) / (nUsable - 4);
 
192008 pCell->nLastOvfl = (nPayload-nLocal) - (nOvfl-1) * (nUsable-4);
192009 pCell->nOvfl = nOvfl;
192010 pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl);
192011 if( pCell->aOvfl==0 ) return SQLITE_NOMEM_BKPT;
192012 pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
@@ -192457,13 +192567,12 @@
192457 for(i=0; i<pIdxInfo->nConstraint; i++){
192458 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i];
192459 if( p->iColumn!=DBPAGE_COLUMN_SCHEMA ) continue;
192460 if( p->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
192461 if( !p->usable ){
192462 /* No solution. Use the default SQLITE_BIG_DBL cost */
192463 pIdxInfo->estimatedRows = 0x7fffffff;
192464 return SQLITE_OK;
192465 }
192466 iPlan = 2;
192467 pIdxInfo->aConstraintUsage[i].argvIndex = 1;
192468 pIdxInfo->aConstraintUsage[i].omit = 1;
192469 break;
@@ -199656,10 +199765,11 @@
199656 **
199657 ** The following is the concatenation of all %include directives from the
199658 ** input grammar file:
199659 */
199660 /* #include <stdio.h> */
 
199661 /************ Begin %include sections from the grammar ************************/
199662
199663 /* #include "fts5Int.h" */
199664 /* #include "fts5parse.h" */
199665
@@ -200983,14 +201093,13 @@
200983 #endif
200984 fts5yy_destructor(fts5yypParser, (fts5YYCODETYPE)fts5yymajor, &fts5yyminorunion);
200985 fts5yymajor = fts5YYNOCODE;
200986 }else{
200987 while( fts5yypParser->fts5yytos >= fts5yypParser->fts5yystack
200988 && fts5yymx != fts5YYERRORSYMBOL
200989 && (fts5yyact = fts5yy_find_reduce_action(
200990 fts5yypParser->fts5yytos->stateno,
200991 fts5YYERRORSYMBOL)) >= fts5YY_MIN_REDUCE
200992 ){
200993 fts5yy_pop_parser_stack(fts5yypParser);
200994 }
200995 if( fts5yypParser->fts5yytos < fts5yypParser->fts5yystack || fts5yymajor==0 ){
200996 fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);
@@ -215685,11 +215794,11 @@
215685 int nArg, /* Number of args */
215686 sqlite3_value **apUnused /* Function arguments */
215687 ){
215688 assert( nArg==0 );
215689 UNUSED_PARAM2(nArg, apUnused);
215690 sqlite3_result_text(pCtx, "fts5: 2018-11-12 15:20:44 f9755f81b1c0fd29f242dce78a2fba570fa2714d76e93b8563f426a040352513", -1, SQLITE_TRANSIENT);
215691 }
215692
215693 /*
215694 ** Return true if zName is the extension on one of the shadow tables used
215695 ** by this module.
@@ -220413,12 +220522,12 @@
220413 }
220414 #endif /* SQLITE_CORE */
220415 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
220416
220417 /************** End of stmt.c ************************************************/
220418 #if __LINE__!=220418
220419 #undef SQLITE_SOURCE_ID
220420 #define SQLITE_SOURCE_ID "2018-11-12 15:20:44 f9755f81b1c0fd29f242dce78a2fba570fa2714d76e93b8563f426a04035alt2"
220421 #endif
220422 /* Return the source-id for this library */
220423 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
220424 /************************** End of sqlite3.c ******************************/
220425
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
1162 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1163 ** [sqlite_version()] and [sqlite_source_id()].
1164 */
1165 #define SQLITE_VERSION "3.26.0"
1166 #define SQLITE_VERSION_NUMBER 3026000
1167 #define SQLITE_SOURCE_ID "2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -4670,11 +4670,11 @@
4670 **
4671 ** [[SQLITE_PREPARE_NORMALIZE]] ^(<dt>SQLITE_PREPARE_NORMALIZE</dt>
4672 ** <dd>The SQLITE_PREPARE_NORMALIZE flag indicates that a normalized
4673 ** representation of the SQL statement should be calculated and then
4674 ** associated with the prepared statement, which can be obtained via
4675 ** the [sqlite3_normalized_sql()] interface.)^ The semantics used to
4676 ** normalize a SQL statement are unspecified and subject to change.
4677 ** At a minimum, literal values will be replaced with suitable
4678 ** placeholders.
4679 ** </dl>
4680 */
@@ -8279,10 +8279,11 @@
8279 #define SQLITE_TESTCTRL_ALWAYS 13
8280 #define SQLITE_TESTCTRL_RESERVE 14
8281 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
8282 #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
8283 #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
8284 #define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
8285 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
8286 #define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
8287 #define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
8288 #define SQLITE_TESTCTRL_NEVER_CORRUPT 20
8289 #define SQLITE_TESTCTRL_VDBE_COVERAGE 21
@@ -10461,11 +10462,11 @@
10462 int iLevel; /* Level of current node or entry */
10463 int mxLevel; /* The largest iLevel value in the tree */
10464 sqlite3_int64 iRowid; /* Rowid for current entry */
10465 sqlite3_rtree_dbl rParentScore; /* Score of parent node */
10466 int eParentWithin; /* Visibility of parent node */
10467 int eWithin; /* OUT: Visibility */
10468 sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
10469 /* The following fields are only available in 3.8.11 and later */
10470 sqlite3_value **apSqlParam; /* Original SQL values of parameters */
10471 };
10472
@@ -15398,22 +15399,21 @@
15399 SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, sqlite3*, int, int*, int*);
15400 SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager);
15401 SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager);
15402 SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);
15403 SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager, sqlite3*);
 
 
 
15404 # ifdef SQLITE_ENABLE_SNAPSHOT
15405 SQLITE_PRIVATE int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot);
15406 SQLITE_PRIVATE int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot);
15407 SQLITE_PRIVATE int sqlite3PagerSnapshotRecover(Pager *pPager);
15408 SQLITE_PRIVATE int sqlite3PagerSnapshotCheck(Pager *pPager, sqlite3_snapshot *pSnapshot);
15409 SQLITE_PRIVATE void sqlite3PagerSnapshotUnlock(Pager *pPager);
15410 # endif
15411 #endif
15412
15413 #ifdef SQLITE_DIRECT_OVERFLOW_READ
15414 SQLITE_PRIVATE int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno);
15415 #endif
15416
15417 #ifdef SQLITE_ENABLE_ZIPVFS
15418 SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager);
15419 #endif
@@ -15653,10 +15653,14 @@
15653 SQLITE_PRIVATE int sqlite3HeaderSizePcache(void);
15654 SQLITE_PRIVATE int sqlite3HeaderSizePcache1(void);
15655
15656 /* Number of dirty pages as a percentage of the configured cache size */
15657 SQLITE_PRIVATE int sqlite3PCachePercentDirty(PCache*);
15658
15659 #ifdef SQLITE_DIRECT_OVERFLOW_READ
15660 SQLITE_PRIVATE int sqlite3PCacheIsDirty(PCache *pCache);
15661 #endif
15662
15663 #endif /* _PCACHE_H_ */
15664
15665 /************** End of pcache.h **********************************************/
15666 /************** Continuing where we left off in sqliteInt.h ******************/
@@ -16537,12 +16541,13 @@
16541 #define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */
16542 #define SQLITE_FUNC_SLOCHNG 0x2000 /* "Slow Change". Value constant during a
16543 ** single query - might change over time */
16544 #define SQLITE_FUNC_AFFINITY 0x4000 /* Built-in affinity() function */
16545 #define SQLITE_FUNC_OFFSET 0x8000 /* Built-in sqlite_offset() function */
16546 #define SQLITE_FUNC_WINDOW 0x00010000 /* Built-in window-only function */
16547 #define SQLITE_FUNC_WINDOW_SIZE 0x20000 /* Requires partition size as arg. */
16548 #define SQLITE_FUNC_INTERNAL 0x00040000 /* For use by NestedParse() only */
16549
16550 /*
16551 ** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
16552 ** used to create the initializers for the FuncDef structures.
16553 **
@@ -16614,14 +16619,17 @@
16619 {nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL), \
16620 SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,xValue,0,#zName, {0}}
16621 #define AGGREGATE2(zName, nArg, arg, nc, xStep, xFinal, extraFlags) \
16622 {nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL)|extraFlags, \
16623 SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,xFinal,0,#zName, {0}}
 
16624 #define WAGGREGATE(zName, nArg, arg, nc, xStep, xFinal, xValue, xInverse, f) \
16625 {nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL)|f, \
16626 SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,xValue,xInverse,#zName, {0}}
16627 #define INTERNAL_FUNCTION(zName, nArg, xFunc) \
16628 {nArg, SQLITE_FUNC_INTERNAL|SQLITE_UTF8|SQLITE_FUNC_CONSTANT, \
16629 0, 0, xFunc, 0, 0, 0, #zName, {0} }
16630
16631
16632 /*
16633 ** All current savepoints are stored in a linked list starting at
16634 ** sqlite3.pSavepoint. The first element in the list is the most recently
16635 ** opened savepoint. Savepoints are added to the list by the vdbe
@@ -18268,10 +18276,11 @@
18276 #endif
18277 #ifndef SQLITE_UNTESTABLE
18278 int (*xTestCallback)(int); /* Invoked by sqlite3FaultSim() */
18279 #endif
18280 int bLocaltimeFault; /* True to fail localtime() calls */
18281 int bInternalFunctions; /* Internal SQL functions are visible */
18282 int iOnceResetThreshold; /* When to reset OP_Once counters */
18283 u32 szSorterRef; /* Min size in bytes to use sorter-refs */
18284 };
18285
18286 /*
@@ -19731,10 +19740,11 @@
19740 #endif
19741 #ifndef SQLITE_UNTESTABLE
19742 0, /* xTestCallback */
19743 #endif
19744 0, /* bLocaltimeFault */
19745 0, /* bInternalFunctions */
19746 0x7ffffffe, /* iOnceResetThreshold */
19747 SQLITE_DEFAULT_SORTERREF_SIZE /* szSorterRef */
19748 };
19749
19750 /*
@@ -20287,11 +20297,13 @@
20297
20298 int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);
20299 SQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(sqlite3*,VdbeCursor*,UnpackedRecord*,int*);
20300 SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3*, BtCursor*, i64*);
20301 SQLITE_PRIVATE int sqlite3VdbeExec(Vdbe*);
20302 #ifndef SQLITE_OMIT_EXPLAIN
20303 SQLITE_PRIVATE int sqlite3VdbeList(Vdbe*);
20304 #endif
20305 SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe*);
20306 SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *, int);
20307 SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem*);
20308 SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem*, const Mem*);
20309 SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int);
@@ -20326,11 +20338,13 @@
20338 SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p);
20339 SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem*, FuncDef*);
20340 #ifndef SQLITE_OMIT_WINDOWFUNC
20341 SQLITE_PRIVATE int sqlite3VdbeMemAggValue(Mem*, Mem*, FuncDef*);
20342 #endif
20343 #ifndef SQLITE_OMIT_EXPLAIN
20344 SQLITE_PRIVATE const char *sqlite3OpcodeName(int);
20345 #endif
20346 SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve);
20347 SQLITE_PRIVATE int sqlite3VdbeMemClearAndResize(Mem *pMem, int n);
20348 SQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *, int);
20349 #ifdef SQLITE_DEBUG
20350 SQLITE_PRIVATE int sqlite3VdbeFrameIsValid(VdbeFrame*);
@@ -40675,12 +40689,11 @@
40689 #endif
40690 #if SQLITE_MAX_MMAP_SIZE>0
40691 int nFetchOut; /* Number of outstanding xFetch references */
40692 HANDLE hMap; /* Handle for accessing memory mapping */
40693 void *pMapRegion; /* Area memory mapped */
40694 sqlite3_int64 mmapSize; /* Size of mapped region */
 
40695 sqlite3_int64 mmapSizeMax; /* Configured FCNTL_MMAP_SIZE value */
40696 #endif
40697 };
40698
40699 /*
@@ -43297,10 +43310,30 @@
43310 winFile *pFile = (winFile*)id; /* File handle object */
43311 int rc = SQLITE_OK; /* Return code for this function */
43312 DWORD lastErrno;
43313 #if SQLITE_MAX_MMAP_SIZE>0
43314 sqlite3_int64 oldMmapSize;
43315 if( pFile->nFetchOut>0 ){
43316 /* File truncation is a no-op if there are outstanding memory mapped
43317 ** pages. This is because truncating the file means temporarily unmapping
43318 ** the file, and that might delete memory out from under existing cursors.
43319 **
43320 ** This can result in incremental vacuum not truncating the file,
43321 ** if there is an active read cursor when the incremental vacuum occurs.
43322 ** No real harm comes of this - the database file is not corrupted,
43323 ** though some folks might complain that the file is bigger than it
43324 ** needs to be.
43325 **
43326 ** The only feasible work-around is to defer the truncation until after
43327 ** all references to memory-mapped content are closed. That is doable,
43328 ** but involves adding a few branches in the common write code path which
43329 ** could slow down normal operations slightly. Hence, we have decided for
43330 ** now to simply make trancations a no-op if there are pending reads. We
43331 ** can maybe revisit this decision in the future.
43332 */
43333 return SQLITE_OK;
43334 }
43335 #endif
43336
43337 assert( pFile );
43338 SimulateIOError(return SQLITE_IOERR_TRUNCATE);
43339 OSTRACE(("TRUNCATE pid=%lu, pFile=%p, file=%p, size=%lld, lock=%d\n",
@@ -44725,13 +44758,13 @@
44758 */
44759 #if SQLITE_MAX_MMAP_SIZE>0
44760 static int winUnmapfile(winFile *pFile){
44761 assert( pFile!=0 );
44762 OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, hMap=%p, pMapRegion=%p, "
44763 "mmapSize=%lld, mmapSizeMax=%lld\n",
44764 osGetCurrentProcessId(), pFile, pFile->hMap, pFile->pMapRegion,
44765 pFile->mmapSize, pFile->mmapSizeMax));
44766 if( pFile->pMapRegion ){
44767 if( !osUnmapViewOfFile(pFile->pMapRegion) ){
44768 pFile->lastErrno = osGetLastError();
44769 OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, pMapRegion=%p, "
44770 "rc=SQLITE_IOERR_MMAP\n", osGetCurrentProcessId(), pFile,
@@ -44739,11 +44772,10 @@
44772 return winLogError(SQLITE_IOERR_MMAP, pFile->lastErrno,
44773 "winUnmapfile1", pFile->zPath);
44774 }
44775 pFile->pMapRegion = 0;
44776 pFile->mmapSize = 0;
 
44777 }
44778 if( pFile->hMap!=NULL ){
44779 if( !osCloseHandle(pFile->hMap) ){
44780 pFile->lastErrno = osGetLastError();
44781 OSTRACE(("UNMAP-FILE pid=%lu, pFile=%p, hMap=%p, rc=SQLITE_IOERR_MMAP\n",
@@ -44850,11 +44882,10 @@
44882 osGetCurrentProcessId(), pFd, sqlite3ErrName(rc)));
44883 return SQLITE_OK;
44884 }
44885 pFd->pMapRegion = pNew;
44886 pFd->mmapSize = nMap;
 
44887 }
44888
44889 OSTRACE(("MAP-FILE pid=%lu, pFile=%p, rc=SQLITE_OK\n",
44890 osGetCurrentProcessId(), pFd));
44891 return SQLITE_OK;
@@ -45652,11 +45683,10 @@
45683 pFile->zPath = zName;
45684 #if SQLITE_MAX_MMAP_SIZE>0
45685 pFile->hMap = NULL;
45686 pFile->pMapRegion = 0;
45687 pFile->mmapSize = 0;
 
45688 pFile->mmapSizeMax = sqlite3GlobalConfig.szMmap;
45689 #endif
45690
45691 OpenCounter(+1);
45692 return rc;
@@ -48372,10 +48402,19 @@
48402 int nDirty = 0;
48403 int nCache = numberOfCachePages(pCache);
48404 for(pDirty=pCache->pDirty; pDirty; pDirty=pDirty->pDirtyNext) nDirty++;
48405 return nCache ? (int)(((i64)nDirty * 100) / nCache) : 0;
48406 }
48407
48408 #ifdef SQLITE_DIRECT_OVERFLOW_READ
48409 /*
48410 ** Return true if there are one or more dirty pages in the cache. Else false.
48411 */
48412 SQLITE_PRIVATE int sqlite3PCacheIsDirty(PCache *pCache){
48413 return (pCache->pDirty!=0);
48414 }
48415 #endif
48416
48417 #if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)
48418 /*
48419 ** For all dirty pages currently in the cache, invoke the specified
48420 ** callback. This is only used if the SQLITE_CHECK_PAGES macro is
@@ -48496,11 +48535,12 @@
48535 PgHdr1 *pLruNext; /* Next in LRU list of unpinned pages */
48536 PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */
48537 };
48538
48539 /*
48540 ** A page is pinned if it is not on the LRU list. To be "pinned" means
48541 ** that the page is in active use and must not be deallocated.
48542 */
48543 #define PAGE_IS_PINNED(p) ((p)->pLruNext==0)
48544 #define PAGE_IS_UNPINNED(p) ((p)->pLruNext!=0)
48545
48546 /* Each page cache (or PCache) belongs to a PGroup. A PGroup is a set
@@ -51136,23 +51176,34 @@
51176 **
51177 ** if( pPager->jfd->pMethods ){ ...
51178 */
51179 #define isOpen(pFd) ((pFd)->pMethods!=0)
51180
51181 #ifdef SQLITE_DIRECT_OVERFLOW_READ
51182 /*
51183 ** Return true if page pgno can be read directly from the database file
51184 ** by the b-tree layer. This is the case if:
51185 **
51186 ** * the database file is open,
51187 ** * there are no dirty pages in the cache, and
51188 ** * the desired page is not currently in the wal file.
51189 */
51190 SQLITE_PRIVATE int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno){
51191 if( pPager->fd->pMethods==0 ) return 0;
51192 if( sqlite3PCacheIsDirty(pPager->pPCache) ) return 0;
51193 #ifndef SQLITE_OMIT_WAL
51194 if( pPager->pWal ){
51195 u32 iRead = 0;
51196 int rc;
51197 rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iRead);
51198 return (rc==SQLITE_OK && iRead==0);
51199 }
51200 #endif
51201 return 1;
51202 }
51203 #endif
51204
51205 #ifndef SQLITE_OMIT_WAL
51206 # define pagerUseWal(x) ((x)->pWal!=0)
51207 #else
51208 # define pagerUseWal(x) 0
51209 # define pagerRollbackWal(x) 0
@@ -57332,12 +57383,15 @@
57383 void *(*xCodec)(void*,void*,Pgno,int),
57384 void (*xCodecSizeChng)(void*,int,int),
57385 void (*xCodecFree)(void*),
57386 void *pCodec
57387 ){
57388 if( pPager->xCodecFree ){
57389 pPager->xCodecFree(pPager->pCodec);
57390 }else{
57391 pager_reset(pPager);
57392 }
57393 pPager->xCodec = pPager->memDb ? 0 : xCodec;
57394 pPager->xCodecSizeChng = xCodecSizeChng;
57395 pPager->xCodecFree = xCodecFree;
57396 pPager->pCodec = pCodec;
57397 setGetterMethod(pPager);
@@ -67639,13 +67693,10 @@
67693 offset -= ovflSize;
67694 }else{
67695 /* Need to read this page properly. It contains some of the
67696 ** range of data that is being read (eOp==0) or written (eOp!=0).
67697 */
 
 
 
67698 int a = amt;
67699 if( a + offset > ovflSize ){
67700 a = ovflSize - offset;
67701 }
67702
@@ -67652,11 +67703,11 @@
67703 #ifdef SQLITE_DIRECT_OVERFLOW_READ
67704 /* If all the following are true:
67705 **
67706 ** 1) this is a read operation, and
67707 ** 2) data is required from the start of this overflow page, and
67708 ** 3) there are no dirty pages in the page-cache
67709 ** 4) the database is file-backed, and
67710 ** 5) the page is not in the WAL file
67711 ** 6) at least 4 bytes have already been read into the output buffer
67712 **
67713 ** then data can be read directly from the database file into the
@@ -67663,15 +67714,14 @@
67714 ** output buffer, bypassing the page-cache altogether. This speeds
67715 ** up loading large records that span many overflow pages.
67716 */
67717 if( eOp==0 /* (1) */
67718 && offset==0 /* (2) */
67719 && sqlite3PagerDirectReadOk(pBt->pPager, nextPage) /* (3,4,5) */
 
 
67720 && &pBuf[-4]>=pBufStart /* (6) */
67721 ){
67722 sqlite3_file *fd = sqlite3PagerFile(pBt->pPager);
67723 u8 aSave[4];
67724 u8 *aWrite = &pBuf[-4];
67725 assert( aWrite>=pBufStart ); /* due to (6) */
67726 memcpy(aSave, aWrite, 4);
67727 rc = sqlite3OsRead(fd, aWrite, a+4, (i64)pBt->pageSize*(nextPage-1));
@@ -95152,10 +95202,19 @@
95202 ** sqlite_version() that might change over time cannot be used
95203 ** in an index. */
95204 notValid(pParse, pNC, "non-deterministic functions",
95205 NC_IdxExpr|NC_PartIdx);
95206 }
95207 if( (pDef->funcFlags & SQLITE_FUNC_INTERNAL)!=0
95208 && pParse->nested==0
95209 && sqlite3Config.bInternalFunctions==0
95210 ){
95211 /* Internal-use-only functions are disallowed unless the
95212 ** SQL is being compiled using sqlite3NestedParse() */
95213 no_such_func = 1;
95214 pDef = 0;
95215 }
95216 }
95217
95218 if( 0==IN_RENAME_OBJECT ){
95219 #ifndef SQLITE_OMIT_WINDOWFUNC
95220 assert( is_agg==0 || (pDef->funcFlags & SQLITE_FUNC_MINMAX)
@@ -102076,14 +102135,20 @@
102135 #else
102136 # define renameTokenCheckAll(x,y)
102137 #endif
102138
102139 /*
102140 ** Remember that the parser tree element pPtr was created using
102141 ** the token pToken.
102142 **
102143 ** In other words, construct a new RenameToken object and add it
102144 ** to the list of RenameToken objects currently being built up
102145 ** in pParse->pRename.
102146 **
102147 ** The pPtr argument is returned so that this routine can be used
102148 ** with tail recursion in tokenExpr() routine, for a small performance
102149 ** improvement.
102150 */
102151 SQLITE_PRIVATE void *sqlite3RenameTokenMap(Parse *pParse, void *pPtr, Token *pToken){
102152 RenameToken *pNew;
102153 assert( pPtr || pParse->db->mallocFailed );
102154 renameTokenCheckAll(pParse, pPtr);
@@ -102591,19 +102656,12 @@
102656 ** Do a column rename operation on the CREATE statement given in zSql.
102657 ** The iCol-th column (left-most is 0) of table zTable is renamed from zCol
102658 ** into zNew. The name should be quoted if bQuote is true.
102659 **
102660 ** This function is used internally by the ALTER TABLE RENAME COLUMN command.
102661 ** It is only accessible to SQL created using sqlite3NestedParse(). It is
102662 ** not reachable from ordinary SQL passed into sqlite3_prepare().
 
 
 
 
 
 
 
102663 */
102664 static void renameColumnFunc(
102665 sqlite3_context *context,
102666 int NotUsed,
102667 sqlite3_value **argv
@@ -103007,13 +103065,13 @@
103065 /*
103066 ** Register built-in functions used to help implement ALTER TABLE
103067 */
103068 SQLITE_PRIVATE void sqlite3AlterFunctions(void){
103069 static FuncDef aAlterTableFuncs[] = {
103070 INTERNAL_FUNCTION(sqlite_rename_column, 9, renameColumnFunc),
103071 INTERNAL_FUNCTION(sqlite_rename_table, 7, renameTableFunc),
103072 INTERNAL_FUNCTION(sqlite_rename_test, 5, renameTableTest),
103073 };
103074 sqlite3InsertBuiltinFuncs(aAlterTableFuncs, ArraySize(aAlterTableFuncs));
103075 }
103076 #endif /* SQLITE_ALTER_TABLE */
103077
@@ -105058,11 +105116,11 @@
105116 if( pVfs==0 ) return;
105117 pNew = &db->aDb[db->init.iDb];
105118 if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt);
105119 pNew->pBt = 0;
105120 pNew->pSchema = 0;
105121 rc = sqlite3BtreeOpen(pVfs, "x\0", db, &pNew->pBt, 0, SQLITE_OPEN_MAIN_DB);
105122 }else{
105123 /* This is a real ATTACH
105124 **
105125 ** Check for the following errors:
105126 **
@@ -106407,21 +106465,26 @@
106465 ** "main" and "temp") for a single database connection.
106466 */
106467 SQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3 *db){
106468 int i;
106469 sqlite3BtreeEnterAll(db);
 
106470 for(i=0; i<db->nDb; i++){
106471 Db *pDb = &db->aDb[i];
106472 if( pDb->pSchema ){
106473 if( db->nSchemaLock==0 ){
106474 sqlite3SchemaClear(pDb->pSchema);
106475 }else{
106476 DbSetProperty(db, i, DB_ResetWanted);
106477 }
106478 }
106479 }
106480 db->mDbFlags &= ~(DBFLAG_SchemaChange|DBFLAG_SchemaKnownOk);
106481 sqlite3VtabUnlockList(db);
106482 sqlite3BtreeLeaveAll(db);
106483 if( db->nSchemaLock==0 ){
106484 sqlite3CollapseDatabaseArray(db);
106485 }
106486 }
106487
106488 /*
106489 ** This routine is called when a commit occurs.
106490 */
@@ -107757,10 +107820,11 @@
107820 pPk->nColumn = pTab->nCol;
107821 }
107822 recomputeColumnsNotIndexed(pPk);
107823 }
107824
107825 #ifndef SQLITE_OMIT_VIRTUALTABLE
107826 /*
107827 ** Return true if zName is a shadow table name in the current database
107828 ** connection.
107829 **
107830 ** zName is temporarily modified while this routine is running, but is
@@ -107782,10 +107846,13 @@
107846 if( pMod==0 ) return 0;
107847 if( pMod->pModule->iVersion<3 ) return 0;
107848 if( pMod->pModule->xShadowName==0 ) return 0;
107849 return pMod->pModule->xShadowName(zTail+1);
107850 }
107851 #else
107852 # define isShadowTableName(x,y) 0
107853 #endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */
107854
107855 /*
107856 ** This routine is called to report the final ")" that terminates
107857 ** a CREATE TABLE statement.
107858 **
@@ -111069,13 +111136,15 @@
111136 db = pParse->db;
111137 if( (pTab->tabFlags & TF_Readonly)!=0 ){
111138 return sqlite3WritableSchema(db)==0 && pParse->nested==0;
111139 }
111140 assert( pTab->tabFlags & TF_Shadow );
111141 return (db->flags & SQLITE_Defensive)!=0
111142 #ifndef SQLITE_OMIT_VIRTUALTABLE
111143 && db->pVtabCtx==0
111144 #endif
111145 && db->nVdbeExec==0;
111146 }
111147
111148 /*
111149 ** Check to make sure the given table is writable. If it is not
111150 ** writable, generate an error message and return 1. If it is
@@ -118702,10 +118771,11 @@
118771 # define sqlite3_create_module 0
118772 # define sqlite3_create_module_v2 0
118773 # define sqlite3_declare_vtab 0
118774 # define sqlite3_vtab_config 0
118775 # define sqlite3_vtab_on_conflict 0
118776 # define sqlite3_vtab_collation 0
118777 #endif
118778
118779 #ifdef SQLITE_OMIT_SHARED_CACHE
118780 # define sqlite3_enable_shared_cache 0
118781 #endif
@@ -121204,16 +121274,17 @@
121274 */
121275 case PragTyp_TABLE_INFO: if( zRight ){
121276 Table *pTab;
121277 pTab = sqlite3LocateTable(pParse, LOCATE_NOERR, zRight, zDb);
121278 if( pTab ){
121279 int iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
121280 int i, k;
121281 int nHidden = 0;
121282 Column *pCol;
121283 Index *pPk = sqlite3PrimaryKeyIndex(pTab);
121284 pParse->nMem = 7;
121285 sqlite3CodeVerifySchema(pParse, iTabDb);
121286 sqlite3ViewGetColumnNames(pParse, pTab);
121287 for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
121288 int isHidden = IsHiddenColumn(pCol);
121289 if( isHidden && pPragma->iArg==0 ){
121290 nHidden++;
@@ -121270,10 +121341,11 @@
121341 case PragTyp_INDEX_INFO: if( zRight ){
121342 Index *pIdx;
121343 Table *pTab;
121344 pIdx = sqlite3FindIndex(db, zRight, zDb);
121345 if( pIdx ){
121346 int iIdxDb = sqlite3SchemaToIndex(db, pIdx->pSchema);
121347 int i;
121348 int mx;
121349 if( pPragma->iArg ){
121350 /* PRAGMA index_xinfo (newer version with more rows and columns) */
121351 mx = pIdx->nColumn;
@@ -121282,11 +121354,11 @@
121354 /* PRAGMA index_info (legacy version) */
121355 mx = pIdx->nKeyCol;
121356 pParse->nMem = 3;
121357 }
121358 pTab = pIdx->pTable;
121359 sqlite3CodeVerifySchema(pParse, iIdxDb);
121360 assert( pParse->nMem<=pPragma->nPragCName );
121361 for(i=0; i<mx; i++){
121362 i16 cnum = pIdx->aiColumn[i];
121363 sqlite3VdbeMultiLoad(v, 1, "iisX", i, cnum,
121364 cnum<0 ? 0 : pTab->aCol[cnum].zName);
@@ -121306,12 +121378,13 @@
121378 Index *pIdx;
121379 Table *pTab;
121380 int i;
121381 pTab = sqlite3FindTable(db, zRight, zDb);
121382 if( pTab ){
121383 int iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
121384 pParse->nMem = 5;
121385 sqlite3CodeVerifySchema(pParse, iTabDb);
121386 for(pIdx=pTab->pIndex, i=0; pIdx; pIdx=pIdx->pNext, i++){
121387 const char *azOrigin[] = { "c", "u", "pk" };
121388 sqlite3VdbeMultiLoad(v, 1, "isisi",
121389 i,
121390 pIdx->zName,
@@ -121354,10 +121427,11 @@
121427 HashElem *j;
121428 FuncDef *p;
121429 pParse->nMem = 2;
121430 for(i=0; i<SQLITE_FUNC_HASH_SZ; i++){
121431 for(p=sqlite3BuiltinFunctions.a[i]; p; p=p->u.pHash ){
121432 if( p->funcFlags & SQLITE_FUNC_INTERNAL ) continue;
121433 sqlite3VdbeMultiLoad(v, 1, "si", p->zName, 1);
121434 }
121435 }
121436 for(j=sqliteHashFirst(&db->aFunc); j; j=sqliteHashNext(j)){
121437 p = (FuncDef*)sqliteHashData(j);
@@ -121395,13 +121469,14 @@
121469 Table *pTab;
121470 pTab = sqlite3FindTable(db, zRight, zDb);
121471 if( pTab ){
121472 pFK = pTab->pFKey;
121473 if( pFK ){
121474 int iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
121475 int i = 0;
121476 pParse->nMem = 8;
121477 sqlite3CodeVerifySchema(pParse, iTabDb);
121478 while(pFK){
121479 int j;
121480 for(j=0; j<pFK->nCol; j++){
121481 sqlite3VdbeMultiLoad(v, 1, "iissssss",
121482 i,
@@ -121442,36 +121517,38 @@
121517
121518 regResult = pParse->nMem+1;
121519 pParse->nMem += 4;
121520 regKey = ++pParse->nMem;
121521 regRow = ++pParse->nMem;
 
121522 k = sqliteHashFirst(&db->aDb[iDb].pSchema->tblHash);
121523 while( k ){
121524 int iTabDb;
121525 if( zRight ){
121526 pTab = sqlite3LocateTable(pParse, 0, zRight, zDb);
121527 k = 0;
121528 }else{
121529 pTab = (Table*)sqliteHashData(k);
121530 k = sqliteHashNext(k);
121531 }
121532 if( pTab==0 || pTab->pFKey==0 ) continue;
121533 iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
121534 sqlite3CodeVerifySchema(pParse, iTabDb);
121535 sqlite3TableLock(pParse, iTabDb, pTab->tnum, 0, pTab->zName);
121536 if( pTab->nCol+regRow>pParse->nMem ) pParse->nMem = pTab->nCol + regRow;
121537 sqlite3OpenTable(pParse, 0, iTabDb, pTab, OP_OpenRead);
121538 sqlite3VdbeLoadString(v, regResult, pTab->zName);
121539 for(i=1, pFK=pTab->pFKey; pFK; i++, pFK=pFK->pNextFrom){
121540 pParent = sqlite3FindTable(db, pFK->zTo, zDb);
121541 if( pParent==0 ) continue;
121542 pIdx = 0;
121543 sqlite3TableLock(pParse, iTabDb, pParent->tnum, 0, pParent->zName);
121544 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, 0);
121545 if( x==0 ){
121546 if( pIdx==0 ){
121547 sqlite3OpenTable(pParse, i, iTabDb, pParent, OP_OpenRead);
121548 }else{
121549 sqlite3VdbeAddOp3(v, OP_OpenRead, i, pIdx->tnum, iTabDb);
121550 sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
121551 }
121552 }else{
121553 k = 0;
121554 break;
@@ -140166,13 +140243,15 @@
140243 ** The table object reference passed as the second argument to this function
140244 ** must represent a virtual table. This function invokes the xBestIndex()
140245 ** method of the virtual table with the sqlite3_index_info object that
140246 ** comes in as the 3rd argument to this function.
140247 **
140248 ** If an error occurs, pParse is populated with an error message and an
140249 ** appropriate error code is returned. A return of SQLITE_CONSTRAINT from
140250 ** xBestIndex is not considered an error. SQLITE_CONSTRAINT indicates that
140251 ** the current configuration of "unusable" flags in sqlite3_index_info can
140252 ** not result in a valid plan.
140253 **
140254 ** Whether or not an error is returned, it is the responsibility of the
140255 ** caller to eventually free p->idxStr if p->needToFreeIdxStr indicates
140256 ** that this is required.
140257 */
@@ -140182,11 +140261,11 @@
140261
140262 TRACE_IDX_INPUTS(p);
140263 rc = pVtab->pModule->xBestIndex(pVtab, p);
140264 TRACE_IDX_OUTPUTS(p);
140265
140266 if( rc!=SQLITE_OK && rc!=SQLITE_CONSTRAINT ){
140267 if( rc==SQLITE_NOMEM ){
140268 sqlite3OomFault(pParse->db);
140269 }else if( !pVtab->zErrMsg ){
140270 sqlite3ErrorMsg(pParse, "%s", sqlite3ErrStr(rc));
140271 }else{
@@ -140193,23 +140272,11 @@
140272 sqlite3ErrorMsg(pParse, "%s", pVtab->zErrMsg);
140273 }
140274 }
140275 sqlite3_free(pVtab->zErrMsg);
140276 pVtab->zErrMsg = 0;
140277 return rc;
 
 
 
 
 
 
 
 
 
 
 
 
140278 }
140279 #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
140280
140281 #ifdef SQLITE_ENABLE_STAT3_OR_STAT4
140282 /*
@@ -142278,11 +142345,21 @@
142345 pIdxInfo->idxFlags = 0;
142346 pIdxInfo->colUsed = (sqlite3_int64)pSrc->colUsed;
142347
142348 /* Invoke the virtual table xBestIndex() method */
142349 rc = vtabBestIndex(pParse, pSrc->pTab, pIdxInfo);
142350 if( rc ){
142351 if( rc==SQLITE_CONSTRAINT ){
142352 /* If the xBestIndex method returns SQLITE_CONSTRAINT, that means
142353 ** that the particular combination of parameters provided is unusable.
142354 ** Make no entries in the loop table.
142355 */
142356 WHERETRACE(0xffff, (" ^^^^--- non-viable plan rejected!\n"));
142357 return SQLITE_OK;
142358 }
142359 return rc;
142360 }
142361
142362 mxTerm = -1;
142363 assert( pNew->nLSlot>=nConstraint );
142364 for(i=0; i<nConstraint; i++) pNew->aLTerm[i] = 0;
142365 pNew->u.vtab.omitMask = 0;
@@ -146750,10 +146827,11 @@
146827 **
146828 ** The following is the concatenation of all %include directives from the
146829 ** input grammar file:
146830 */
146831 /* #include <stdio.h> */
146832 /* #include <assert.h> */
146833 /************ Begin %include sections from the grammar ************************/
146834
146835 /* #include "sqliteInt.h" */
146836
146837 /*
@@ -147005,21 +147083,21 @@
147083 #define sqlite3ParserCTX_PDECL ,Parse *pParse
147084 #define sqlite3ParserCTX_PARAM ,pParse
147085 #define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
147086 #define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
147087 #define YYFALLBACK 1
147088 #define YYNSTATE 521
147089 #define YYNRULE 367
147090 #define YYNTOKEN 155
147091 #define YY_MAX_SHIFT 520
147092 #define YY_MIN_SHIFTREDUCE 756
147093 #define YY_MAX_SHIFTREDUCE 1122
147094 #define YY_ERROR_ACTION 1123
147095 #define YY_ACCEPT_ACTION 1124
147096 #define YY_NO_ACTION 1125
147097 #define YY_MIN_REDUCE 1126
147098 #define YY_MAX_REDUCE 1492
147099 /************* End control #defines *******************************************/
147100 #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
147101
147102 /* Define the yytestcase() macro to be a no-op if is not already defined
147103 ** otherwise.
@@ -147084,211 +147162,211 @@
147162 ** yy_default[] Default action for each state.
147163 **
147164 *********** Begin parsing tables **********************************************/
147165 #define YY_ACTTAB_COUNT (2009)
147166 static const YYACTIONTYPE yy_action[] = {
147167 /* 0 */ 368, 105, 102, 197, 105, 102, 197, 515, 1124, 1,
147168 /* 10 */ 1, 520, 2, 1128, 515, 1192, 1171, 1456, 275, 370,
147169 /* 20 */ 127, 1389, 1197, 1197, 1192, 1166, 178, 1205, 64, 64,
147170 /* 30 */ 477, 887, 322, 428, 348, 37, 37, 808, 362, 888,
147171 /* 40 */ 509, 509, 509, 112, 113, 103, 1100, 1100, 953, 956,
147172 /* 50 */ 946, 946, 110, 110, 111, 111, 111, 111, 365, 252,
147173 /* 60 */ 252, 515, 252, 252, 497, 515, 309, 515, 459, 515,
147174 /* 70 */ 1079, 491, 512, 478, 6, 512, 809, 134, 498, 228,
147175 /* 80 */ 194, 428, 37, 37, 515, 208, 64, 64, 64, 64,
147176 /* 90 */ 13, 13, 109, 109, 109, 109, 108, 108, 107, 107,
147177 /* 100 */ 107, 106, 401, 258, 381, 13, 13, 398, 397, 428,
147178 /* 110 */ 252, 252, 370, 476, 405, 1104, 1079, 1080, 1081, 386,
147179 /* 120 */ 1106, 390, 497, 512, 497, 1423, 1419, 304, 1105, 307,
147180 /* 130 */ 1256, 496, 370, 499, 16, 16, 112, 113, 103, 1100,
147181 /* 140 */ 1100, 953, 956, 946, 946, 110, 110, 111, 111, 111,
147182 /* 150 */ 111, 262, 1107, 495, 1107, 401, 112, 113, 103, 1100,
147183 /* 160 */ 1100, 953, 956, 946, 946, 110, 110, 111, 111, 111,
147184 /* 170 */ 111, 129, 1425, 343, 1420, 339, 1059, 492, 1057, 263,
147185 /* 180 */ 73, 105, 102, 197, 994, 109, 109, 109, 109, 108,
147186 /* 190 */ 108, 107, 107, 107, 106, 401, 370, 111, 111, 111,
147187 /* 200 */ 111, 104, 492, 89, 1432, 109, 109, 109, 109, 108,
147188 /* 210 */ 108, 107, 107, 107, 106, 401, 111, 111, 111, 111,
147189 /* 220 */ 112, 113, 103, 1100, 1100, 953, 956, 946, 946, 110,
147190 /* 230 */ 110, 111, 111, 111, 111, 109, 109, 109, 109, 108,
147191 /* 240 */ 108, 107, 107, 107, 106, 401, 114, 108, 108, 107,
147192 /* 250 */ 107, 107, 106, 401, 109, 109, 109, 109, 108, 108,
147193 /* 260 */ 107, 107, 107, 106, 401, 152, 399, 399, 399, 109,
147194 /* 270 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 401,
147195 /* 280 */ 178, 493, 1412, 434, 1037, 1486, 1079, 515, 1486, 370,
147196 /* 290 */ 421, 297, 357, 412, 74, 1079, 109, 109, 109, 109,
147197 /* 300 */ 108, 108, 107, 107, 107, 106, 401, 1413, 37, 37,
147198 /* 310 */ 1431, 274, 506, 112, 113, 103, 1100, 1100, 953, 956,
147199 /* 320 */ 946, 946, 110, 110, 111, 111, 111, 111, 1436, 520,
147200 /* 330 */ 2, 1128, 1079, 1080, 1081, 430, 275, 1079, 127, 366,
147201 /* 340 */ 933, 1079, 1080, 1081, 220, 1205, 913, 458, 455, 454,
147202 /* 350 */ 392, 167, 515, 1035, 152, 445, 924, 453, 152, 874,
147203 /* 360 */ 923, 289, 109, 109, 109, 109, 108, 108, 107, 107,
147204 /* 370 */ 107, 106, 401, 13, 13, 261, 853, 252, 252, 227,
147205 /* 380 */ 106, 401, 370, 1079, 1080, 1081, 311, 388, 1079, 296,
147206 /* 390 */ 512, 923, 923, 925, 231, 323, 1255, 1388, 1423, 490,
147207 /* 400 */ 274, 506, 12, 208, 274, 506, 112, 113, 103, 1100,
147208 /* 410 */ 1100, 953, 956, 946, 946, 110, 110, 111, 111, 111,
147209 /* 420 */ 111, 1440, 286, 1128, 288, 1079, 1097, 247, 275, 1098,
147210 /* 430 */ 127, 387, 405, 389, 1079, 1080, 1081, 1205, 159, 238,
147211 /* 440 */ 255, 321, 461, 316, 460, 225, 790, 105, 102, 197,
147212 /* 450 */ 513, 314, 842, 842, 445, 109, 109, 109, 109, 108,
147213 /* 460 */ 108, 107, 107, 107, 106, 401, 515, 514, 515, 252,
147214 /* 470 */ 252, 1079, 1080, 1081, 435, 370, 1098, 933, 1460, 794,
147215 /* 480 */ 274, 506, 512, 105, 102, 197, 336, 63, 63, 64,
147216 /* 490 */ 64, 27, 790, 924, 287, 208, 1354, 923, 515, 112,
147217 /* 500 */ 113, 103, 1100, 1100, 953, 956, 946, 946, 110, 110,
147218 /* 510 */ 111, 111, 111, 111, 107, 107, 107, 106, 401, 49,
147219 /* 520 */ 49, 515, 28, 1079, 405, 497, 421, 297, 923, 923,
147220 /* 530 */ 925, 186, 468, 1079, 467, 999, 999, 442, 515, 1079,
147221 /* 540 */ 334, 515, 45, 45, 1083, 342, 173, 168, 109, 109,
147222 /* 550 */ 109, 109, 108, 108, 107, 107, 107, 106, 401, 13,
147223 /* 560 */ 13, 205, 13, 13, 252, 252, 1195, 1195, 370, 1079,
147224 /* 570 */ 1080, 1081, 787, 265, 5, 359, 494, 512, 469, 1079,
147225 /* 580 */ 1080, 1081, 398, 397, 1079, 1079, 1080, 1081, 3, 282,
147226 /* 590 */ 1079, 1083, 112, 113, 103, 1100, 1100, 953, 956, 946,
147227 /* 600 */ 946, 110, 110, 111, 111, 111, 111, 252, 252, 1015,
147228 /* 610 */ 220, 1079, 873, 458, 455, 454, 943, 943, 954, 957,
147229 /* 620 */ 512, 252, 252, 453, 1016, 1079, 445, 1107, 1209, 1107,
147230 /* 630 */ 1079, 1080, 1081, 515, 512, 426, 1079, 1080, 1081, 1017,
147231 /* 640 */ 512, 109, 109, 109, 109, 108, 108, 107, 107, 107,
147232 /* 650 */ 106, 401, 1052, 515, 50, 50, 515, 1079, 1080, 1081,
147233 /* 660 */ 828, 370, 1051, 379, 411, 1064, 1358, 207, 408, 773,
147234 /* 670 */ 829, 1079, 1080, 1081, 64, 64, 322, 64, 64, 1302,
147235 /* 680 */ 947, 411, 410, 1358, 1360, 112, 113, 103, 1100, 1100,
147236 /* 690 */ 953, 956, 946, 946, 110, 110, 111, 111, 111, 111,
147237 /* 700 */ 294, 482, 515, 1037, 1487, 515, 434, 1487, 354, 1120,
147238 /* 710 */ 483, 996, 913, 485, 466, 996, 132, 178, 33, 450,
147239 /* 720 */ 1203, 136, 406, 64, 64, 479, 64, 64, 419, 369,
147240 /* 730 */ 283, 1146, 252, 252, 109, 109, 109, 109, 108, 108,
147241 /* 740 */ 107, 107, 107, 106, 401, 512, 224, 440, 411, 266,
147242 /* 750 */ 1358, 266, 252, 252, 370, 296, 416, 284, 934, 396,
147243 /* 760 */ 976, 470, 400, 252, 252, 512, 9, 473, 231, 500,
147244 /* 770 */ 354, 1036, 1035, 1488, 355, 374, 512, 1121, 112, 113,
147245 /* 780 */ 103, 1100, 1100, 953, 956, 946, 946, 110, 110, 111,
147246 /* 790 */ 111, 111, 111, 252, 252, 1015, 515, 1347, 295, 252,
147247 /* 800 */ 252, 252, 252, 1098, 375, 249, 512, 445, 872, 322,
147248 /* 810 */ 1016, 480, 512, 195, 512, 434, 273, 15, 15, 515,
147249 /* 820 */ 314, 515, 95, 515, 93, 1017, 367, 109, 109, 109,
147250 /* 830 */ 109, 108, 108, 107, 107, 107, 106, 401, 515, 1121,
147251 /* 840 */ 39, 39, 51, 51, 52, 52, 503, 370, 515, 1204,
147252 /* 850 */ 1098, 918, 439, 341, 133, 436, 223, 222, 221, 53,
147253 /* 860 */ 53, 322, 1400, 761, 762, 763, 515, 370, 88, 54,
147254 /* 870 */ 54, 112, 113, 103, 1100, 1100, 953, 956, 946, 946,
147255 /* 880 */ 110, 110, 111, 111, 111, 111, 407, 55, 55, 196,
147256 /* 890 */ 515, 112, 113, 103, 1100, 1100, 953, 956, 946, 946,
147257 /* 900 */ 110, 110, 111, 111, 111, 111, 135, 264, 1149, 376,
147258 /* 910 */ 515, 40, 40, 515, 872, 515, 993, 515, 993, 116,
147259 /* 920 */ 109, 109, 109, 109, 108, 108, 107, 107, 107, 106,
147260 /* 930 */ 401, 41, 41, 515, 43, 43, 44, 44, 56, 56,
147261 /* 940 */ 109, 109, 109, 109, 108, 108, 107, 107, 107, 106,
147262 /* 950 */ 401, 515, 379, 515, 57, 57, 515, 799, 515, 379,
147263 /* 960 */ 515, 445, 200, 515, 323, 515, 1397, 515, 1459, 515,
147264 /* 970 */ 1287, 817, 58, 58, 14, 14, 515, 59, 59, 118,
147265 /* 980 */ 118, 60, 60, 515, 46, 46, 61, 61, 62, 62,
147266 /* 990 */ 47, 47, 515, 190, 189, 91, 515, 140, 140, 515,
147267 /* 1000 */ 394, 515, 277, 1200, 141, 141, 515, 1115, 515, 992,
147268 /* 1010 */ 515, 992, 515, 69, 69, 370, 278, 48, 48, 259,
147269 /* 1020 */ 65, 65, 119, 119, 246, 246, 260, 66, 66, 120,
147270 /* 1030 */ 120, 121, 121, 117, 117, 370, 515, 512, 383, 112,
147271 /* 1040 */ 113, 103, 1100, 1100, 953, 956, 946, 946, 110, 110,
147272 /* 1050 */ 111, 111, 111, 111, 515, 872, 515, 139, 139, 112,
147273 /* 1060 */ 113, 103, 1100, 1100, 953, 956, 946, 946, 110, 110,
147274 /* 1070 */ 111, 111, 111, 111, 1287, 138, 138, 125, 125, 515,
147275 /* 1080 */ 12, 515, 281, 1287, 515, 445, 131, 1287, 109, 109,
147276 /* 1090 */ 109, 109, 108, 108, 107, 107, 107, 106, 401, 515,
147277 /* 1100 */ 124, 124, 122, 122, 515, 123, 123, 515, 109, 109,
147278 /* 1110 */ 109, 109, 108, 108, 107, 107, 107, 106, 401, 515,
147279 /* 1120 */ 68, 68, 463, 783, 515, 70, 70, 302, 67, 67,
147280 /* 1130 */ 1032, 253, 253, 356, 1287, 191, 196, 1433, 465, 1301,
147281 /* 1140 */ 38, 38, 384, 94, 512, 42, 42, 177, 848, 274,
147282 /* 1150 */ 506, 385, 420, 847, 1356, 441, 508, 376, 377, 153,
147283 /* 1160 */ 423, 872, 432, 370, 224, 251, 194, 887, 182, 293,
147284 /* 1170 */ 783, 848, 88, 254, 466, 888, 847, 915, 807, 806,
147285 /* 1180 */ 230, 1241, 910, 370, 17, 413, 797, 112, 113, 103,
147286 /* 1190 */ 1100, 1100, 953, 956, 946, 946, 110, 110, 111, 111,
147287 /* 1200 */ 111, 111, 395, 814, 815, 1175, 983, 112, 101, 103,
147288 /* 1210 */ 1100, 1100, 953, 956, 946, 946, 110, 110, 111, 111,
147289 /* 1220 */ 111, 111, 375, 422, 427, 429, 298, 230, 230, 88,
147290 /* 1230 */ 1240, 451, 312, 797, 226, 88, 109, 109, 109, 109,
147291 /* 1240 */ 108, 108, 107, 107, 107, 106, 401, 86, 433, 979,
147292 /* 1250 */ 927, 881, 226, 983, 230, 415, 109, 109, 109, 109,
147293 /* 1260 */ 108, 108, 107, 107, 107, 106, 401, 320, 845, 781,
147294 /* 1270 */ 846, 100, 130, 100, 1403, 290, 370, 319, 1377, 1376,
147295 /* 1280 */ 437, 1449, 299, 1237, 303, 306, 308, 310, 1188, 1174,
147296 /* 1290 */ 1173, 1172, 315, 324, 325, 1228, 370, 927, 1249, 271,
147297 /* 1300 */ 1286, 113, 103, 1100, 1100, 953, 956, 946, 946, 110,
147298 /* 1310 */ 110, 111, 111, 111, 111, 1224, 1235, 502, 501, 1292,
147299 /* 1320 */ 1221, 1155, 103, 1100, 1100, 953, 956, 946, 946, 110,
147300 /* 1330 */ 110, 111, 111, 111, 111, 1148, 1137, 1136, 1138, 1443,
147301 /* 1340 */ 446, 244, 184, 98, 507, 188, 4, 353, 327, 109,
147302 /* 1350 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 401,
147303 /* 1360 */ 510, 329, 331, 199, 414, 456, 292, 285, 318, 109,
147304 /* 1370 */ 109, 109, 109, 108, 108, 107, 107, 107, 106, 401,
147305 /* 1380 */ 11, 1271, 1279, 402, 361, 192, 1171, 1351, 431, 505,
147306 /* 1390 */ 346, 1350, 333, 98, 507, 504, 4, 187, 1446, 1115,
147307 /* 1400 */ 233, 1396, 155, 1394, 1112, 152, 72, 75, 378, 425,
147308 /* 1410 */ 510, 165, 149, 157, 933, 1276, 86, 30, 1268, 417,
147309 /* 1420 */ 96, 96, 8, 160, 161, 162, 163, 97, 418, 402,
147310 /* 1430 */ 517, 516, 449, 402, 923, 210, 358, 424, 1282, 438,
147311 /* 1440 */ 169, 214, 360, 1345, 80, 504, 31, 444, 1365, 301,
147312 /* 1450 */ 245, 274, 506, 216, 174, 305, 488, 447, 217, 462,
147313 /* 1460 */ 1139, 487, 218, 363, 933, 923, 923, 925, 926, 24,
147314 /* 1470 */ 96, 96, 1191, 1190, 1189, 391, 1182, 97, 1163, 402,
147315 /* 1480 */ 517, 516, 799, 364, 923, 1162, 317, 1161, 98, 507,
147316 /* 1490 */ 1181, 4, 1458, 472, 393, 269, 270, 475, 481, 1232,
147317 /* 1500 */ 85, 1233, 326, 328, 232, 510, 495, 1231, 330, 98,
147318 /* 1510 */ 507, 1230, 4, 486, 335, 923, 923, 925, 926, 24,
147319 /* 1520 */ 1435, 1068, 404, 181, 336, 256, 510, 115, 402, 332,
147320 /* 1530 */ 352, 352, 351, 241, 349, 1214, 1414, 770, 338, 10,
147321 /* 1540 */ 504, 340, 272, 92, 1331, 1213, 87, 183, 484, 402,
147322 /* 1550 */ 201, 488, 280, 239, 344, 345, 489, 1145, 29, 933,
147323 /* 1560 */ 279, 504, 1074, 518, 240, 96, 96, 242, 243, 519,
147324 /* 1570 */ 1134, 1129, 97, 154, 402, 517, 516, 372, 373, 923,
147325 /* 1580 */ 933, 142, 143, 128, 1381, 267, 96, 96, 852, 757,
147326 /* 1590 */ 203, 144, 403, 97, 1382, 402, 517, 516, 204, 1380,
147327 /* 1600 */ 923, 146, 1379, 1159, 1158, 71, 1156, 276, 202, 185,
147328 /* 1610 */ 923, 923, 925, 926, 24, 198, 257, 126, 991, 989,
147329 /* 1620 */ 907, 98, 507, 156, 4, 145, 158, 206, 831, 209,
147330 /* 1630 */ 291, 923, 923, 925, 926, 24, 1005, 911, 510, 164,
147331 /* 1640 */ 147, 380, 371, 382, 166, 76, 77, 274, 506, 148,
147332 /* 1650 */ 78, 79, 1008, 211, 212, 1004, 137, 213, 18, 300,
147333 /* 1660 */ 230, 402, 997, 1109, 443, 215, 32, 170, 171, 772,
147334 /* 1670 */ 409, 448, 319, 504, 219, 172, 452, 81, 19, 457,
147335 /* 1680 */ 313, 20, 82, 268, 488, 150, 810, 179, 83, 487,
147336 /* 1690 */ 464, 151, 933, 180, 959, 84, 1040, 34, 96, 96,
147337 /* 1700 */ 471, 1041, 35, 474, 193, 97, 248, 402, 517, 516,
147338 /* 1710 */ 1068, 404, 923, 250, 256, 880, 229, 175, 875, 352,
147339 /* 1720 */ 352, 351, 241, 349, 100, 21, 770, 22, 1054, 1056,
147340 /* 1730 */ 7, 98, 507, 1045, 4, 337, 1058, 23, 974, 201,
147341 /* 1740 */ 176, 280, 88, 923, 923, 925, 926, 24, 510, 279,
147342 /* 1750 */ 960, 958, 962, 1014, 963, 1013, 235, 234, 25, 36,
147343 /* 1760 */ 99, 90, 507, 928, 4, 511, 350, 782, 26, 841,
147344 /* 1770 */ 236, 402, 347, 1069, 237, 1125, 1125, 1451, 510, 203,
147345 /* 1780 */ 1450, 1125, 1125, 504, 1125, 1125, 1125, 204, 1125, 1125,
147346 /* 1790 */ 146, 1125, 1125, 1125, 1125, 1125, 1125, 202, 1125, 1125,
147347 /* 1800 */ 1125, 402, 933, 1125, 1125, 1125, 1125, 1125, 96, 96,
147348 /* 1810 */ 1125, 1125, 1125, 504, 1125, 97, 1125, 402, 517, 516,
147349 /* 1820 */ 1125, 1125, 923, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147350 /* 1830 */ 1125, 371, 933, 1125, 1125, 1125, 274, 506, 96, 96,
147351 /* 1840 */ 1125, 1125, 1125, 1125, 1125, 97, 1125, 402, 517, 516,
147352 /* 1850 */ 1125, 1125, 923, 923, 923, 925, 926, 24, 1125, 409,
147353 /* 1860 */ 1125, 1125, 1125, 256, 1125, 1125, 1125, 1125, 352, 352,
147354 /* 1870 */ 351, 241, 349, 1125, 1125, 770, 1125, 1125, 1125, 1125,
147355 /* 1880 */ 1125, 1125, 1125, 923, 923, 925, 926, 24, 201, 1125,
147356 /* 1890 */ 280, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 279, 1125,
147357 /* 1900 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147358 /* 1910 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147359 /* 1920 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 203, 1125,
147360 /* 1930 */ 1125, 1125, 1125, 1125, 1125, 1125, 204, 1125, 1125, 146,
147361 /* 1940 */ 1125, 1125, 1125, 1125, 1125, 1125, 202, 1125, 1125, 1125,
147362 /* 1950 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147363 /* 1960 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147364 /* 1970 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147365 /* 1980 */ 371, 1125, 1125, 1125, 1125, 274, 506, 1125, 1125, 1125,
147366 /* 1990 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125,
147367 /* 2000 */ 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 409,
147368 };
147369 static const YYCODETYPE yy_lookahead[] = {
147370 /* 0 */ 184, 238, 239, 240, 238, 239, 240, 163, 155, 156,
147371 /* 10 */ 157, 158, 159, 160, 163, 191, 192, 183, 165, 19,
147372 /* 20 */ 167, 258, 202, 203, 200, 191, 163, 174, 184, 185,
@@ -147428,48 +147506,48 @@
147506 /* 1360 */ 36, 222, 222, 260, 226, 188, 256, 226, 187, 92,
147507 /* 1370 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
147508 /* 1380 */ 210, 213, 213, 59, 213, 196, 192, 187, 256, 244,
147509 /* 1390 */ 212, 187, 226, 19, 20, 71, 22, 210, 166, 60,
147510 /* 1400 */ 130, 170, 260, 170, 38, 81, 257, 257, 170, 104,
147511 /* 1410 */ 36, 22, 43, 201, 90, 236, 138, 235, 213, 18,
147512 /* 1420 */ 96, 97, 48, 204, 204, 204, 204, 103, 170, 105,
147513 /* 1430 */ 106, 107, 18, 59, 110, 169, 213, 213, 201, 170,
147514 /* 1440 */ 201, 169, 236, 213, 146, 71, 235, 62, 253, 252,
147515 /* 1450 */ 170, 127, 128, 169, 22, 170, 82, 189, 169, 104,
147516 /* 1460 */ 170, 87, 169, 189, 90, 141, 142, 143, 144, 145,
147517 /* 1470 */ 96, 97, 186, 186, 186, 64, 194, 103, 186, 105,
147518 /* 1480 */ 106, 107, 115, 189, 110, 188, 186, 186, 19, 20,
147519 /* 1490 */ 194, 22, 186, 189, 102, 246, 246, 189, 133, 228,
147520 /* 1500 */ 104, 228, 227, 227, 170, 36, 134, 228, 227, 19,
147521 /* 1510 */ 20, 228, 22, 84, 271, 141, 142, 143, 144, 145,
147522 /* 1520 */ 0, 1, 2, 216, 22, 5, 36, 137, 59, 227,
147523 /* 1530 */ 10, 11, 12, 13, 14, 217, 269, 17, 216, 22,
147524 /* 1540 */ 71, 170, 243, 146, 241, 217, 136, 215, 135, 59,
147525 /* 1550 */ 30, 82, 32, 25, 214, 213, 87, 173, 26, 90,
147526 /* 1560 */ 40, 71, 13, 172, 164, 96, 97, 164, 6, 162,
147527 /* 1570 */ 162, 162, 103, 263, 105, 106, 107, 266, 266, 110,
147528 /* 1580 */ 90, 176, 176, 190, 182, 190, 96, 97, 98, 4,
147529 /* 1590 */ 70, 176, 3, 103, 182, 105, 106, 107, 78, 182,
147530 /* 1600 */ 110, 81, 182, 182, 182, 182, 182, 151, 88, 22,
147531 /* 1610 */ 141, 142, 143, 144, 145, 15, 89, 16, 23, 23,
147532 /* 1620 */ 128, 19, 20, 139, 22, 119, 131, 24, 20, 133,
147533 /* 1630 */ 16, 141, 142, 143, 144, 145, 1, 140, 36, 131,
147534 /* 1640 */ 119, 61, 122, 37, 139, 53, 53, 127, 128, 119,
147535 /* 1650 */ 53, 53, 105, 34, 130, 1, 5, 104, 22, 149,
147536 /* 1660 */ 26, 59, 68, 75, 41, 130, 24, 68, 104, 20,
147537 /* 1670 */ 150, 19, 120, 71, 114, 22, 67, 22, 22, 67,
147538 /* 1680 */ 23, 22, 22, 67, 82, 37, 28, 23, 138, 87,
147539 /* 1690 */ 22, 153, 90, 23, 23, 26, 23, 22, 96, 97,
147540 /* 1700 */ 24, 23, 22, 24, 130, 103, 23, 105, 106, 107,
147541 /* 1710 */ 1, 2, 110, 23, 5, 105, 34, 22, 132, 10,
147542 /* 1720 */ 11, 12, 13, 14, 26, 34, 17, 34, 85, 83,
147543 /* 1730 */ 44, 19, 20, 23, 22, 24, 75, 34, 23, 30,
147544 /* 1740 */ 26, 32, 26, 141, 142, 143, 144, 145, 36, 40,
147545 /* 1750 */ 23, 23, 23, 23, 11, 23, 22, 26, 22, 22,
147546 /* 1760 */ 22, 19, 20, 23, 22, 26, 15, 23, 22, 124,
147547 /* 1770 */ 130, 59, 23, 1, 130, 277, 277, 130, 36, 70,
147548 /* 1780 */ 130, 277, 277, 71, 277, 277, 277, 78, 277, 277,
147549 /* 1790 */ 81, 277, 277, 277, 277, 277, 277, 88, 277, 277,
147550 /* 1800 */ 277, 59, 90, 277, 277, 277, 277, 277, 96, 97,
147551 /* 1810 */ 277, 277, 277, 71, 277, 103, 277, 105, 106, 107,
147552 /* 1820 */ 277, 277, 110, 277, 277, 277, 277, 277, 277, 277,
147553 /* 1830 */ 277, 122, 90, 277, 277, 277, 127, 128, 96, 97,
@@ -147490,11 +147568,11 @@
147568 /* 1980 */ 122, 277, 277, 277, 277, 127, 128, 277, 277, 277,
147569 /* 1990 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
147570 /* 2000 */ 277, 277, 277, 277, 277, 277, 277, 277, 150, 277,
147571 /* 2010 */ 277, 277, 277, 277, 277, 277, 277, 277, 277,
147572 };
147573 #define YY_SHIFT_COUNT (520)
147574 #define YY_SHIFT_MIN (0)
147575 #define YY_SHIFT_MAX (1858)
147576 static const unsigned short int yy_shift_ofst[] = {
147577 /* 0 */ 1709, 1520, 1858, 1324, 1324, 277, 1374, 1469, 1602, 1712,
147578 /* 10 */ 1712, 1712, 273, 0, 0, 113, 1016, 1712, 1712, 1712,
@@ -147522,39 +147600,39 @@
147600 /* 230 */ 531, 531, 744, 531, 531, 783, 531, 531, 531, 531,
147601 /* 240 */ 531, 531, 531, 531, 419, 682, 327, 370, 370, 370,
147602 /* 250 */ 370, 1029, 327, 327, 1024, 897, 856, 947, 1109, 706,
147603 /* 260 */ 706, 1143, 1109, 1109, 1143, 842, 945, 1118, 1136, 1136,
147604 /* 270 */ 1136, 706, 676, 400, 1047, 694, 1339, 1270, 1270, 1366,
147605 /* 280 */ 1366, 1270, 1305, 1389, 1369, 1278, 1401, 1401, 1401, 1401,
147606 /* 290 */ 1270, 1414, 1278, 1278, 1305, 1389, 1369, 1369, 1278, 1270,
147607 /* 300 */ 1414, 1298, 1385, 1270, 1414, 1432, 1270, 1414, 1270, 1414,
147608 /* 310 */ 1432, 1355, 1355, 1355, 1411, 1432, 1355, 1367, 1355, 1411,
147609 /* 320 */ 1355, 1355, 1432, 1392, 1392, 1432, 1365, 1396, 1365, 1396,
147610 /* 330 */ 1365, 1396, 1365, 1396, 1270, 1372, 1429, 1502, 1390, 1372,
147611 /* 340 */ 1517, 1270, 1397, 1390, 1410, 1413, 1278, 1528, 1532, 1549,
147612 /* 350 */ 1549, 1562, 1562, 1562, 2009, 2009, 2009, 2009, 2009, 2009,
147613 /* 360 */ 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009,
147614 /* 370 */ 570, 345, 686, 748, 50, 740, 1064, 1107, 469, 537,
147615 /* 380 */ 1042, 1146, 1162, 1154, 1201, 1202, 1203, 1208, 1209, 1127,
147616 /* 390 */ 1069, 1196, 1157, 1147, 1226, 1228, 1245, 775, 868, 1246,
147617 /* 400 */ 1247, 1191, 1151, 1585, 1589, 1587, 1456, 1600, 1527, 1601,
147618 /* 410 */ 1595, 1596, 1492, 1484, 1506, 1603, 1495, 1608, 1496, 1614,
147619 /* 420 */ 1635, 1508, 1497, 1521, 1580, 1606, 1505, 1592, 1593, 1597,
147620 /* 430 */ 1598, 1530, 1547, 1619, 1524, 1654, 1651, 1636, 1553, 1510,
147621 /* 440 */ 1594, 1634, 1599, 1588, 1623, 1535, 1564, 1642, 1649, 1652,
147622 /* 450 */ 1552, 1560, 1653, 1609, 1655, 1656, 1657, 1659, 1612, 1658,
147623 /* 460 */ 1660, 1616, 1648, 1664, 1550, 1668, 1538, 1670, 1671, 1669,
147624 /* 470 */ 1673, 1675, 1676, 1678, 1680, 1679, 1574, 1683, 1690, 1610,
147625 /* 480 */ 1682, 1695, 1586, 1698, 1691, 1698, 1693, 1643, 1661, 1646,
147626 /* 490 */ 1686, 1710, 1711, 1714, 1716, 1703, 1715, 1698, 1727, 1728,
147627 /* 500 */ 1729, 1730, 1731, 1732, 1734, 1743, 1736, 1737, 1740, 1744,
147628 /* 510 */ 1738, 1746, 1739, 1645, 1640, 1644, 1647, 1650, 1749, 1751,
147629 /* 520 */ 1772,
147630 };
147631 #define YY_REDUCE_COUNT (369)
147632 #define YY_REDUCE_MIN (-237)
147633 #define YY_REDUCE_MAX (1424)
147634 static const short yy_reduce_ofst[] = {
147635 /* 0 */ -147, 171, 263, -96, 358, -144, -149, -102, 124, -156,
147636 /* 10 */ -98, 305, 401, -57, 209, -237, 245, -94, -79, 189,
147637 /* 20 */ 375, 490, 493, 378, 303, 539, 542, 501, 503, 554,
147638 /* 30 */ 415, 526, 546, 557, 587, 593, 595, -234, -234, -234,
@@ -147580,75 +147658,74 @@
147658 /* 230 */ 1137, 1152, 1077, 1153, 1155, 1114, 1156, 304, 1158, 1172,
147659 /* 240 */ 1173, 1174, 1175, 1176, 1089, 1091, 1133, 1098, 1126, 1139,
147660 /* 250 */ 1140, 1070, 1133, 1133, 1170, 1163, 1186, 1103, 1168, 1138,
147661 /* 260 */ 1141, 1110, 1169, 1171, 1132, 1177, 1189, 1194, 1181, 1200,
147662 /* 270 */ 1204, 1166, 1145, 1178, 1187, 1232, 1142, 1231, 1233, 1149,
147663 /* 280 */ 1150, 1238, 1179, 1182, 1212, 1205, 1219, 1220, 1221, 1222,
147664 /* 290 */ 1258, 1266, 1223, 1224, 1206, 1211, 1237, 1239, 1230, 1269,
147665 /* 300 */ 1272, 1195, 1197, 1280, 1284, 1268, 1285, 1289, 1290, 1293,
147666 /* 310 */ 1274, 1286, 1287, 1288, 1282, 1294, 1292, 1297, 1300, 1296,
147667 /* 320 */ 1301, 1306, 1304, 1249, 1250, 1308, 1271, 1275, 1273, 1276,
147668 /* 330 */ 1279, 1281, 1283, 1302, 1334, 1307, 1243, 1267, 1318, 1322,
147669 /* 340 */ 1303, 1371, 1299, 1328, 1332, 1340, 1342, 1384, 1391, 1400,
147670 /* 350 */ 1403, 1407, 1408, 1409, 1311, 1312, 1310, 1405, 1402, 1412,
147671 /* 360 */ 1417, 1420, 1406, 1393, 1395, 1421, 1422, 1423, 1424, 1415,
 
147672 };
147673 static const YYACTIONTYPE yy_default[] = {
147674 /* 0 */ 1492, 1492, 1492, 1340, 1123, 1229, 1123, 1123, 1123, 1340,
147675 /* 10 */ 1340, 1340, 1123, 1259, 1259, 1391, 1154, 1123, 1123, 1123,
147676 /* 20 */ 1123, 1123, 1123, 1123, 1339, 1123, 1123, 1123, 1123, 1123,
147677 /* 30 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1265, 1123,
147678 /* 40 */ 1123, 1123, 1123, 1123, 1341, 1342, 1123, 1123, 1123, 1390,
147679 /* 50 */ 1392, 1275, 1274, 1273, 1272, 1373, 1246, 1270, 1263, 1267,
147680 /* 60 */ 1335, 1336, 1334, 1338, 1342, 1341, 1123, 1266, 1306, 1320,
147681 /* 70 */ 1305, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147682 /* 80 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147683 /* 90 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147684 /* 100 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147685 /* 110 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1314, 1319, 1325,
147686 /* 120 */ 1318, 1315, 1308, 1307, 1309, 1310, 1123, 1144, 1193, 1123,
147687 /* 130 */ 1123, 1123, 1123, 1409, 1408, 1123, 1123, 1154, 1311, 1312,
147688 /* 140 */ 1322, 1321, 1398, 1448, 1447, 1123, 1123, 1123, 1123, 1123,
147689 /* 150 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147690 /* 160 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147691 /* 170 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1154, 1150, 1300,
147692 /* 180 */ 1299, 1418, 1150, 1253, 1123, 1404, 1229, 1220, 1123, 1123,
147693 /* 190 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147694 /* 200 */ 1123, 1395, 1393, 1123, 1355, 1123, 1123, 1123, 1123, 1123,
147695 /* 210 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147696 /* 220 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147697 /* 230 */ 1123, 1123, 1225, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147698 /* 240 */ 1123, 1123, 1123, 1442, 1123, 1368, 1207, 1225, 1225, 1225,
147699 /* 250 */ 1225, 1227, 1208, 1206, 1219, 1154, 1130, 1484, 1269, 1248,
147700 /* 260 */ 1248, 1481, 1269, 1269, 1481, 1168, 1462, 1165, 1259, 1259,
147701 /* 270 */ 1259, 1248, 1337, 1226, 1219, 1123, 1484, 1234, 1234, 1483,
147702 /* 280 */ 1483, 1234, 1278, 1284, 1196, 1269, 1202, 1202, 1202, 1202,
147703 /* 290 */ 1234, 1141, 1269, 1269, 1278, 1284, 1196, 1196, 1269, 1234,
147704 /* 300 */ 1141, 1372, 1478, 1234, 1141, 1348, 1234, 1141, 1234, 1141,
147705 /* 310 */ 1348, 1194, 1194, 1194, 1183, 1348, 1194, 1168, 1194, 1183,
147706 /* 320 */ 1194, 1194, 1348, 1352, 1352, 1348, 1252, 1247, 1252, 1247,
147707 /* 330 */ 1252, 1247, 1252, 1247, 1234, 1253, 1417, 1123, 1264, 1253,
147708 /* 340 */ 1343, 1234, 1123, 1264, 1262, 1260, 1269, 1147, 1186, 1445,
147709 /* 350 */ 1445, 1441, 1441, 1441, 1489, 1489, 1404, 1457, 1154, 1154,
147710 /* 360 */ 1154, 1154, 1457, 1170, 1170, 1154, 1154, 1154, 1154, 1457,
147711 /* 370 */ 1123, 1123, 1123, 1123, 1123, 1123, 1452, 1123, 1357, 1238,
147712 /* 380 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147713 /* 390 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147714 /* 400 */ 1123, 1123, 1289, 1123, 1126, 1401, 1123, 1123, 1399, 1123,
147715 /* 410 */ 1123, 1123, 1123, 1123, 1123, 1239, 1123, 1123, 1123, 1123,
147716 /* 420 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147717 /* 430 */ 1123, 1123, 1123, 1123, 1480, 1123, 1123, 1123, 1123, 1123,
147718 /* 440 */ 1123, 1371, 1370, 1123, 1123, 1236, 1123, 1123, 1123, 1123,
147719 /* 450 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147720 /* 460 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147721 /* 470 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147722 /* 480 */ 1123, 1123, 1123, 1261, 1123, 1416, 1123, 1123, 1123, 1123,
147723 /* 490 */ 1123, 1123, 1123, 1430, 1254, 1123, 1123, 1471, 1123, 1123,
147724 /* 500 */ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123,
147725 /* 510 */ 1123, 1123, 1466, 1210, 1291, 1123, 1290, 1294, 1123, 1135,
147726 /* 520 */ 1123,
147727 };
147728 /********** End of lemon-generated parsing tables *****************************/
147729
147730 /* The next table maps tokens (terminal symbols) into fallback tokens.
147731 ** If a construct like the following:
@@ -148268,14 +148345,14 @@
148345 /* 137 */ "having_opt ::= HAVING expr",
148346 /* 138 */ "limit_opt ::=",
148347 /* 139 */ "limit_opt ::= LIMIT expr",
148348 /* 140 */ "limit_opt ::= LIMIT expr OFFSET expr",
148349 /* 141 */ "limit_opt ::= LIMIT expr COMMA expr",
148350 /* 142 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt",
148351 /* 143 */ "where_opt ::=",
148352 /* 144 */ "where_opt ::= WHERE expr",
148353 /* 145 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt",
148354 /* 146 */ "setlist ::= setlist COMMA nm EQ expr",
148355 /* 147 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
148356 /* 148 */ "setlist ::= nm EQ expr",
148357 /* 149 */ "setlist ::= LP idlist RP EQ expr",
148358 /* 150 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
@@ -149148,14 +149225,14 @@
149225 { 215, -2 }, /* (137) having_opt ::= HAVING expr */
149226 { 217, 0 }, /* (138) limit_opt ::= */
149227 { 217, -2 }, /* (139) limit_opt ::= LIMIT expr */
149228 { 217, -4 }, /* (140) limit_opt ::= LIMIT expr OFFSET expr */
149229 { 217, -4 }, /* (141) limit_opt ::= LIMIT expr COMMA expr */
149230 { 160, -6 }, /* (142) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
149231 { 213, 0 }, /* (143) where_opt ::= */
149232 { 213, -2 }, /* (144) where_opt ::= WHERE expr */
149233 { 160, -8 }, /* (145) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
149234 { 233, -5 }, /* (146) setlist ::= setlist COMMA nm EQ expr */
149235 { 233, -7 }, /* (147) setlist ::= setlist COMMA LP idlist RP EQ expr */
149236 { 233, -3 }, /* (148) setlist ::= nm EQ expr */
149237 { 233, -5 }, /* (149) setlist ::= LP idlist RP EQ expr */
149238 { 160, -7 }, /* (150) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
@@ -150035,21 +150112,21 @@
150112 {yymsp[-3].minor.yy18 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy18,yymsp[0].minor.yy18);}
150113 break;
150114 case 141: /* limit_opt ::= LIMIT expr COMMA expr */
150115 {yymsp[-3].minor.yy18 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy18,yymsp[-2].minor.yy18);}
150116 break;
150117 case 142: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
150118 {
150119 sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy135, &yymsp[-1].minor.yy0);
150120 sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy135,yymsp[0].minor.yy18,0,0);
150121 }
150122 break;
150123 case 145: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
150124 {
150125 sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy135, &yymsp[-3].minor.yy0);
150126 sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy420,"set list");
150127 sqlite3Update(pParse,yymsp[-4].minor.yy135,yymsp[-1].minor.yy420,yymsp[0].minor.yy18,yymsp[-5].minor.yy70,0,0,0);
 
 
 
 
 
 
150128 }
150129 break;
150130 case 146: /* setlist ::= setlist COMMA nm EQ expr */
150131 {
150132 yymsp[-4].minor.yy420 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy420, yymsp[0].minor.yy18);
@@ -151047,14 +151124,13 @@
151124 #endif
151125 yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
151126 yymajor = YYNOCODE;
151127 }else{
151128 while( yypParser->yytos >= yypParser->yystack
 
151129 && (yyact = yy_find_reduce_action(
151130 yypParser->yytos->stateno,
151131 YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
151132 ){
151133 yy_pop_parser_stack(yypParser);
151134 }
151135 if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
151136 yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
@@ -156599,18 +156675,29 @@
156675 break;
156676 }
156677
156678 /* sqlite3_test_control(SQLITE_TESTCTRL_LOCALTIME_FAULT, int onoff);
156679 **
156680 ** If parameter onoff is non-zero, subsequent calls to localtime()
156681 ** and its variants fail. If onoff is zero, undo this setting.
 
156682 */
156683 case SQLITE_TESTCTRL_LOCALTIME_FAULT: {
156684 sqlite3GlobalConfig.bLocaltimeFault = va_arg(ap, int);
156685 break;
156686 }
156687
156688 /* sqlite3_test_control(SQLITE_TESTCTRL_INTERNAL_FUNCS, int onoff);
156689 **
156690 ** If parameter onoff is non-zero, internal-use-only SQL functions
156691 ** are visible to ordinary SQL. This is useful for testing but is
156692 ** unsafe because invalid parameters to those internal-use-only functions
156693 ** can result in crashes or segfaults.
156694 */
156695 case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: {
156696 sqlite3GlobalConfig.bInternalFunctions = va_arg(ap, int);
156697 break;
156698 }
156699
156700 /* sqlite3_test_control(SQLITE_TESTCTRL_NEVER_CORRUPT, int);
156701 **
156702 ** Set or clear a flag that indicates that the database file is always well-
156703 ** formed and never corrupt. This flag is clear by default, indicating that
@@ -162395,10 +162482,11 @@
162482 }
162483
162484 return rc;
162485 }
162486
162487 #ifndef SQLITE_DISABLE_FTS4_DEFERRED
162488 /*
162489 ** This function is called on each phrase after the position lists for
162490 ** any deferred tokens have been loaded into memory. It updates the phrases
162491 ** current position list to include only those positions that are really
162492 ** instances of the phrase (after considering deferred tokens). If this
@@ -162498,10 +162586,11 @@
162586 }
162587 }
162588
162589 return SQLITE_OK;
162590 }
162591 #endif /* SQLITE_DISABLE_FTS4_DEFERRED */
162592
162593 /*
162594 ** Maximum number of tokens a phrase may have to be considered for the
162595 ** incremental doclists strategy.
162596 */
@@ -178484,10 +178573,13 @@
178573 #define JEACH_ATOM 3
178574 #define JEACH_ID 4
178575 #define JEACH_PARENT 5
178576 #define JEACH_FULLKEY 6
178577 #define JEACH_PATH 7
178578 /* The xBestIndex method assumes that the JSON and ROOT columns are
178579 ** the last two columns in the table. Should this ever changes, be
178580 ** sure to update the xBestIndex method. */
178581 #define JEACH_JSON 8
178582 #define JEACH_ROOT 9
178583
178584 UNUSED_PARAM(pzErr);
178585 UNUSED_PARAM(argv);
@@ -178741,39 +178833,58 @@
178833 */
178834 static int jsonEachBestIndex(
178835 sqlite3_vtab *tab,
178836 sqlite3_index_info *pIdxInfo
178837 ){
178838 int i; /* Loop counter or computed array index */
178839 int aIdx[2]; /* Index of constraints for JSON and ROOT */
178840 int unusableMask = 0; /* Mask of unusable JSON and ROOT constraints */
178841 int idxMask = 0; /* Mask of usable == constraints JSON and ROOT */
178842 const struct sqlite3_index_constraint *pConstraint;
178843
178844 /* This implementation assumes that JSON and ROOT are the last two
178845 ** columns in the table */
178846 assert( JEACH_ROOT == JEACH_JSON+1 );
178847 UNUSED_PARAM(tab);
178848 aIdx[0] = aIdx[1] = -1;
178849 pConstraint = pIdxInfo->aConstraint;
178850 for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
178851 int iCol;
178852 int iMask;
178853 if( pConstraint->iColumn < JEACH_JSON ) continue;
178854 iCol = pConstraint->iColumn - JEACH_JSON;
178855 assert( iCol==0 || iCol==1 );
178856 iMask = 1 << iCol;
178857 if( pConstraint->usable==0 ){
178858 unusableMask |= iMask;
178859 }else if( pConstraint->op==SQLITE_INDEX_CONSTRAINT_EQ ){
178860 aIdx[iCol] = i;
178861 idxMask |= iMask;
178862 }
178863 }
178864 if( (unusableMask & ~idxMask)!=0 ){
178865 /* If there are any unusable constraints on JSON or ROOT, then reject
178866 ** this entire plan */
178867 return SQLITE_CONSTRAINT;
178868 }
178869 if( aIdx[0]<0 ){
178870 /* No JSON input. Leave estimatedCost at the huge value that it was
178871 ** initialized to to discourage the query planner from selecting this
178872 ** plan. */
178873 pIdxInfo->idxNum = 0;
 
178874 }else{
178875 pIdxInfo->estimatedCost = 1.0;
178876 i = aIdx[0];
178877 pIdxInfo->aConstraintUsage[i].argvIndex = 1;
178878 pIdxInfo->aConstraintUsage[i].omit = 1;
178879 if( aIdx[1]<0 ){
178880 pIdxInfo->idxNum = 1; /* Only JSON supplied. Plan 1 */
178881 }else{
178882 i = aIdx[1];
178883 pIdxInfo->aConstraintUsage[i].argvIndex = 2;
178884 pIdxInfo->aConstraintUsage[i].omit = 1;
178885 pIdxInfo->idxNum = 3; /* Both JSON and ROOT are supplied. Plan 3 */
178886 }
178887 }
178888 return SQLITE_OK;
178889 }
178890
@@ -183789,11 +183900,11 @@
183900 ){
183901 GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
183902 if( p ){
183903 if( geopolyArea(p)<0.0 ){
183904 int ii, jj;
183905 for(ii=2, jj=p->nVertex*2 - 2; ii<jj; ii+=2, jj-=2){
183906 GeoCoord t = p->a[ii];
183907 p->a[ii] = p->a[jj];
183908 p->a[jj] = t;
183909 t = p->a[ii+1];
183910 p->a[ii+1] = p->a[jj+1];
@@ -183806,19 +183917,19 @@
183917 }
183918 }
183919
183920 #define GEOPOLY_PI 3.1415926535897932385
183921
183922 /* Fast approximation for sine(X) for X between -0.5*pi and 2*pi
183923 */
183924 static double geopolySine(double r){
183925 assert( r>=-0.5*GEOPOLY_PI && r<=2.0*GEOPOLY_PI );
183926 if( r>=1.5*GEOPOLY_PI ){
183927 r -= 2.0*GEOPOLY_PI;
183928 }
183929 if( r>=0.5*GEOPOLY_PI ){
183930 return -geopolySine(r-GEOPOLY_PI);
183931 }else{
183932 double r2 = r*r;
183933 double r3 = r2*r;
183934 double r5 = r3*r2;
183935 return 0.9996949*r - 0.1656700*r3 + 0.0075134*r5;
@@ -183855,12 +183966,12 @@
183966 p->hdr[1] = 0;
183967 p->hdr[2] = (n>>8)&0xff;
183968 p->hdr[3] = n&0xff;
183969 for(i=0; i<n; i++){
183970 double rAngle = 2.0*GEOPOLY_PI*i/n;
183971 p->a[i*2] = x - r*geopolySine(rAngle-0.5*GEOPOLY_PI);
183972 p->a[i*2+1] = y + r*geopolySine(rAngle);
183973 }
183974 sqlite3_result_blob(context, p->hdr, 4+8*n, SQLITE_TRANSIENT);
183975 sqlite3_free(p);
183976 }
183977
@@ -191800,21 +191911,19 @@
191911 ** idxNum is normally 0, but will be 1 if a schema=? constraint exists.
191912 */
191913 static int statBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
191914 int i;
191915
 
 
191916 /* Look for a valid schema=? constraint. If found, change the idxNum to
191917 ** 1 and request the value of that constraint be sent to xFilter. And
191918 ** lower the cost estimate to encourage the constrained version to be
191919 ** used.
191920 */
191921 for(i=0; i<pIdxInfo->nConstraint; i++){
 
 
191922 if( pIdxInfo->aConstraint[i].iColumn!=10 ) continue;
191923 if( pIdxInfo->aConstraint[i].usable==0 ) return SQLITE_CONSTRAINT;
191924 if( pIdxInfo->aConstraint[i].op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
191925 pIdxInfo->idxNum = 1;
191926 pIdxInfo->estimatedCost = 1.0;
191927 pIdxInfo->aConstraintUsage[i].argvIndex = 1;
191928 pIdxInfo->aConstraintUsage[i].omit = 1;
191929 break;
@@ -192003,10 +192112,11 @@
192112 assert( nPayload>=(u32)nLocal );
192113 assert( nLocal<=(nUsable-35) );
192114 if( nPayload>(u32)nLocal ){
192115 int j;
192116 int nOvfl = ((nPayload - nLocal) + nUsable-4 - 1) / (nUsable - 4);
192117 if( iOff+nLocal>nUsable ) goto statPageIsCorrupt;
192118 pCell->nLastOvfl = (nPayload-nLocal) - (nOvfl-1) * (nUsable-4);
192119 pCell->nOvfl = nOvfl;
192120 pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl);
192121 if( pCell->aOvfl==0 ) return SQLITE_NOMEM_BKPT;
192122 pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
@@ -192457,13 +192567,12 @@
192567 for(i=0; i<pIdxInfo->nConstraint; i++){
192568 struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i];
192569 if( p->iColumn!=DBPAGE_COLUMN_SCHEMA ) continue;
192570 if( p->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
192571 if( !p->usable ){
192572 /* No solution. */
192573 return SQLITE_CONSTRAINT;
 
192574 }
192575 iPlan = 2;
192576 pIdxInfo->aConstraintUsage[i].argvIndex = 1;
192577 pIdxInfo->aConstraintUsage[i].omit = 1;
192578 break;
@@ -199656,10 +199765,11 @@
199765 **
199766 ** The following is the concatenation of all %include directives from the
199767 ** input grammar file:
199768 */
199769 /* #include <stdio.h> */
199770 /* #include <assert.h> */
199771 /************ Begin %include sections from the grammar ************************/
199772
199773 /* #include "fts5Int.h" */
199774 /* #include "fts5parse.h" */
199775
@@ -200983,14 +201093,13 @@
201093 #endif
201094 fts5yy_destructor(fts5yypParser, (fts5YYCODETYPE)fts5yymajor, &fts5yyminorunion);
201095 fts5yymajor = fts5YYNOCODE;
201096 }else{
201097 while( fts5yypParser->fts5yytos >= fts5yypParser->fts5yystack
 
201098 && (fts5yyact = fts5yy_find_reduce_action(
201099 fts5yypParser->fts5yytos->stateno,
201100 fts5YYERRORSYMBOL)) > fts5YY_MAX_SHIFTREDUCE
201101 ){
201102 fts5yy_pop_parser_stack(fts5yypParser);
201103 }
201104 if( fts5yypParser->fts5yytos < fts5yypParser->fts5yystack || fts5yymajor==0 ){
201105 fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);
@@ -215685,11 +215794,11 @@
215794 int nArg, /* Number of args */
215795 sqlite3_value **apUnused /* Function arguments */
215796 ){
215797 assert( nArg==0 );
215798 UNUSED_PARAM2(nArg, apUnused);
215799 sqlite3_result_text(pCtx, "fts5: 2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9", -1, SQLITE_TRANSIENT);
215800 }
215801
215802 /*
215803 ** Return true if zName is the extension on one of the shadow tables used
215804 ** by this module.
@@ -220413,12 +220522,12 @@
220522 }
220523 #endif /* SQLITE_CORE */
220524 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
220525
220526 /************** End of stmt.c ************************************************/
220527 #if __LINE__!=220527
220528 #undef SQLITE_SOURCE_ID
220529 #define SQLITE_SOURCE_ID "2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238alt2"
220530 #endif
220531 /* Return the source-id for this library */
220532 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
220533 /************************** End of sqlite3.c ******************************/
220534
+4 -3
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123123
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124124
** [sqlite_version()] and [sqlite_source_id()].
125125
*/
126126
#define SQLITE_VERSION "3.26.0"
127127
#define SQLITE_VERSION_NUMBER 3026000
128
-#define SQLITE_SOURCE_ID "2018-11-12 15:20:44 f9755f81b1c0fd29f242dce78a2fba570fa2714d76e93b8563f426a040352513"
128
+#define SQLITE_SOURCE_ID "2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9"
129129
130130
/*
131131
** CAPI3REF: Run-Time Library Version Numbers
132132
** KEYWORDS: sqlite3_version sqlite3_sourceid
133133
**
@@ -3631,11 +3631,11 @@
36313631
**
36323632
** [[SQLITE_PREPARE_NORMALIZE]] ^(<dt>SQLITE_PREPARE_NORMALIZE</dt>
36333633
** <dd>The SQLITE_PREPARE_NORMALIZE flag indicates that a normalized
36343634
** representation of the SQL statement should be calculated and then
36353635
** associated with the prepared statement, which can be obtained via
3636
-** the [sqlite3_normalized_sql()] interface. The semantics used to
3636
+** the [sqlite3_normalized_sql()] interface.)^ The semantics used to
36373637
** normalize a SQL statement are unspecified and subject to change.
36383638
** At a minimum, literal values will be replaced with suitable
36393639
** placeholders.
36403640
** </dl>
36413641
*/
@@ -7240,10 +7240,11 @@
72407240
#define SQLITE_TESTCTRL_ALWAYS 13
72417241
#define SQLITE_TESTCTRL_RESERVE 14
72427242
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
72437243
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
72447244
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
7245
+#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
72457246
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
72467247
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
72477248
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
72487249
#define SQLITE_TESTCTRL_NEVER_CORRUPT 20
72497250
#define SQLITE_TESTCTRL_VDBE_COVERAGE 21
@@ -9422,11 +9423,11 @@
94229423
int iLevel; /* Level of current node or entry */
94239424
int mxLevel; /* The largest iLevel value in the tree */
94249425
sqlite3_int64 iRowid; /* Rowid for current entry */
94259426
sqlite3_rtree_dbl rParentScore; /* Score of parent node */
94269427
int eParentWithin; /* Visibility of parent node */
9427
- int eWithin; /* OUT: Visiblity */
9428
+ int eWithin; /* OUT: Visibility */
94289429
sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
94299430
/* The following fields are only available in 3.8.11 and later */
94309431
sqlite3_value **apSqlParam; /* Original SQL values of parameters */
94319432
};
94329433
94339434
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124 ** [sqlite_version()] and [sqlite_source_id()].
125 */
126 #define SQLITE_VERSION "3.26.0"
127 #define SQLITE_VERSION_NUMBER 3026000
128 #define SQLITE_SOURCE_ID "2018-11-12 15:20:44 f9755f81b1c0fd29f242dce78a2fba570fa2714d76e93b8563f426a040352513"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -3631,11 +3631,11 @@
3631 **
3632 ** [[SQLITE_PREPARE_NORMALIZE]] ^(<dt>SQLITE_PREPARE_NORMALIZE</dt>
3633 ** <dd>The SQLITE_PREPARE_NORMALIZE flag indicates that a normalized
3634 ** representation of the SQL statement should be calculated and then
3635 ** associated with the prepared statement, which can be obtained via
3636 ** the [sqlite3_normalized_sql()] interface. The semantics used to
3637 ** normalize a SQL statement are unspecified and subject to change.
3638 ** At a minimum, literal values will be replaced with suitable
3639 ** placeholders.
3640 ** </dl>
3641 */
@@ -7240,10 +7240,11 @@
7240 #define SQLITE_TESTCTRL_ALWAYS 13
7241 #define SQLITE_TESTCTRL_RESERVE 14
7242 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
7243 #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
7244 #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
 
7245 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
7246 #define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
7247 #define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
7248 #define SQLITE_TESTCTRL_NEVER_CORRUPT 20
7249 #define SQLITE_TESTCTRL_VDBE_COVERAGE 21
@@ -9422,11 +9423,11 @@
9422 int iLevel; /* Level of current node or entry */
9423 int mxLevel; /* The largest iLevel value in the tree */
9424 sqlite3_int64 iRowid; /* Rowid for current entry */
9425 sqlite3_rtree_dbl rParentScore; /* Score of parent node */
9426 int eParentWithin; /* Visibility of parent node */
9427 int eWithin; /* OUT: Visiblity */
9428 sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
9429 /* The following fields are only available in 3.8.11 and later */
9430 sqlite3_value **apSqlParam; /* Original SQL values of parameters */
9431 };
9432
9433
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124 ** [sqlite_version()] and [sqlite_source_id()].
125 */
126 #define SQLITE_VERSION "3.26.0"
127 #define SQLITE_VERSION_NUMBER 3026000
128 #define SQLITE_SOURCE_ID "2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -3631,11 +3631,11 @@
3631 **
3632 ** [[SQLITE_PREPARE_NORMALIZE]] ^(<dt>SQLITE_PREPARE_NORMALIZE</dt>
3633 ** <dd>The SQLITE_PREPARE_NORMALIZE flag indicates that a normalized
3634 ** representation of the SQL statement should be calculated and then
3635 ** associated with the prepared statement, which can be obtained via
3636 ** the [sqlite3_normalized_sql()] interface.)^ The semantics used to
3637 ** normalize a SQL statement are unspecified and subject to change.
3638 ** At a minimum, literal values will be replaced with suitable
3639 ** placeholders.
3640 ** </dl>
3641 */
@@ -7240,10 +7240,11 @@
7240 #define SQLITE_TESTCTRL_ALWAYS 13
7241 #define SQLITE_TESTCTRL_RESERVE 14
7242 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
7243 #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
7244 #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
7245 #define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
7246 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
7247 #define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
7248 #define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
7249 #define SQLITE_TESTCTRL_NEVER_CORRUPT 20
7250 #define SQLITE_TESTCTRL_VDBE_COVERAGE 21
@@ -9422,11 +9423,11 @@
9423 int iLevel; /* Level of current node or entry */
9424 int mxLevel; /* The largest iLevel value in the tree */
9425 sqlite3_int64 iRowid; /* Rowid for current entry */
9426 sqlite3_rtree_dbl rParentScore; /* Score of parent node */
9427 int eParentWithin; /* Visibility of parent node */
9428 int eWithin; /* OUT: Visibility */
9429 sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
9430 /* The following fields are only available in 3.8.11 and later */
9431 sqlite3_value **apSqlParam; /* Original SQL values of parameters */
9432 };
9433
9434
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -174,11 +174,11 @@
174174
#### The directories where the OpenSSL include and library files are located.
175175
# The recommended usage here is to use the Sysinternals junction tool
176176
# to create a hard link between an "openssl-1.x" sub-directory of the
177177
# Fossil source code directory and the target OpenSSL source directory.
178178
#
179
-OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2p
179
+OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2q
180180
OPENSSLINCDIR = $(OPENSSLDIR)/include
181181
OPENSSLLIBDIR = $(OPENSSLDIR)
182182
183183
#### Either the directory where the Tcl library is installed or the Tcl
184184
# source code directory resides (depending on the value of the macro
185185
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -174,11 +174,11 @@
174 #### The directories where the OpenSSL include and library files are located.
175 # The recommended usage here is to use the Sysinternals junction tool
176 # to create a hard link between an "openssl-1.x" sub-directory of the
177 # Fossil source code directory and the target OpenSSL source directory.
178 #
179 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2p
180 OPENSSLINCDIR = $(OPENSSLDIR)/include
181 OPENSSLLIBDIR = $(OPENSSLDIR)
182
183 #### Either the directory where the Tcl library is installed or the Tcl
184 # source code directory resides (depending on the value of the macro
185
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -174,11 +174,11 @@
174 #### The directories where the OpenSSL include and library files are located.
175 # The recommended usage here is to use the Sysinternals junction tool
176 # to create a hard link between an "openssl-1.x" sub-directory of the
177 # Fossil source code directory and the target OpenSSL source directory.
178 #
179 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2q
180 OPENSSLINCDIR = $(OPENSSLDIR)/include
181 OPENSSLLIBDIR = $(OPENSSLDIR)
182
183 #### Either the directory where the Tcl library is installed or the Tcl
184 # source code directory resides (depending on the value of the macro
185
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -174,11 +174,11 @@
174174
#### The directories where the OpenSSL include and library files are located.
175175
# The recommended usage here is to use the Sysinternals junction tool
176176
# to create a hard link between an "openssl-1.x" sub-directory of the
177177
# Fossil source code directory and the target OpenSSL source directory.
178178
#
179
-OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2p
179
+OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2q
180180
OPENSSLINCDIR = $(OPENSSLDIR)/include
181181
OPENSSLLIBDIR = $(OPENSSLDIR)
182182
183183
#### Either the directory where the Tcl library is installed or the Tcl
184184
# source code directory resides (depending on the value of the macro
@@ -526,10 +526,11 @@
526526
$(SRCDIR)/printf.c \
527527
$(SRCDIR)/publish.c \
528528
$(SRCDIR)/purge.c \
529529
$(SRCDIR)/rebuild.c \
530530
$(SRCDIR)/regexp.c \
531
+ $(SRCDIR)/repolist.c \
531532
$(SRCDIR)/report.c \
532533
$(SRCDIR)/rss.c \
533534
$(SRCDIR)/schema.c \
534535
$(SRCDIR)/search.c \
535536
$(SRCDIR)/security_audit.c \
@@ -736,10 +737,11 @@
736737
$(OBJDIR)/printf_.c \
737738
$(OBJDIR)/publish_.c \
738739
$(OBJDIR)/purge_.c \
739740
$(OBJDIR)/rebuild_.c \
740741
$(OBJDIR)/regexp_.c \
742
+ $(OBJDIR)/repolist_.c \
741743
$(OBJDIR)/report_.c \
742744
$(OBJDIR)/rss_.c \
743745
$(OBJDIR)/schema_.c \
744746
$(OBJDIR)/search_.c \
745747
$(OBJDIR)/security_audit_.c \
@@ -873,10 +875,11 @@
873875
$(OBJDIR)/printf.o \
874876
$(OBJDIR)/publish.o \
875877
$(OBJDIR)/purge.o \
876878
$(OBJDIR)/rebuild.o \
877879
$(OBJDIR)/regexp.o \
880
+ $(OBJDIR)/repolist.o \
878881
$(OBJDIR)/report.o \
879882
$(OBJDIR)/rss.o \
880883
$(OBJDIR)/schema.o \
881884
$(OBJDIR)/search.o \
882885
$(OBJDIR)/security_audit.o \
@@ -1229,10 +1232,11 @@
12291232
$(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \
12301233
$(OBJDIR)/publish_.c:$(OBJDIR)/publish.h \
12311234
$(OBJDIR)/purge_.c:$(OBJDIR)/purge.h \
12321235
$(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \
12331236
$(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h \
1237
+ $(OBJDIR)/repolist_.c:$(OBJDIR)/repolist.h \
12341238
$(OBJDIR)/report_.c:$(OBJDIR)/report.h \
12351239
$(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \
12361240
$(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \
12371241
$(OBJDIR)/search_.c:$(OBJDIR)/search.h \
12381242
$(OBJDIR)/security_audit_.c:$(OBJDIR)/security_audit.h \
@@ -2002,10 +2006,18 @@
20022006
20032007
$(OBJDIR)/regexp.o: $(OBJDIR)/regexp_.c $(OBJDIR)/regexp.h $(SRCDIR)/config.h
20042008
$(XTCC) -o $(OBJDIR)/regexp.o -c $(OBJDIR)/regexp_.c
20052009
20062010
$(OBJDIR)/regexp.h: $(OBJDIR)/headers
2011
+
2012
+$(OBJDIR)/repolist_.c: $(SRCDIR)/repolist.c $(TRANSLATE)
2013
+ $(TRANSLATE) $(SRCDIR)/repolist.c >$@
2014
+
2015
+$(OBJDIR)/repolist.o: $(OBJDIR)/repolist_.c $(OBJDIR)/repolist.h $(SRCDIR)/config.h
2016
+ $(XTCC) -o $(OBJDIR)/repolist.o -c $(OBJDIR)/repolist_.c
2017
+
2018
+$(OBJDIR)/repolist.h: $(OBJDIR)/headers
20072019
20082020
$(OBJDIR)/report_.c: $(SRCDIR)/report.c $(TRANSLATE)
20092021
$(TRANSLATE) $(SRCDIR)/report.c >$@
20102022
20112023
$(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
20122024
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -174,11 +174,11 @@
174 #### The directories where the OpenSSL include and library files are located.
175 # The recommended usage here is to use the Sysinternals junction tool
176 # to create a hard link between an "openssl-1.x" sub-directory of the
177 # Fossil source code directory and the target OpenSSL source directory.
178 #
179 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2p
180 OPENSSLINCDIR = $(OPENSSLDIR)/include
181 OPENSSLLIBDIR = $(OPENSSLDIR)
182
183 #### Either the directory where the Tcl library is installed or the Tcl
184 # source code directory resides (depending on the value of the macro
@@ -526,10 +526,11 @@
526 $(SRCDIR)/printf.c \
527 $(SRCDIR)/publish.c \
528 $(SRCDIR)/purge.c \
529 $(SRCDIR)/rebuild.c \
530 $(SRCDIR)/regexp.c \
 
531 $(SRCDIR)/report.c \
532 $(SRCDIR)/rss.c \
533 $(SRCDIR)/schema.c \
534 $(SRCDIR)/search.c \
535 $(SRCDIR)/security_audit.c \
@@ -736,10 +737,11 @@
736 $(OBJDIR)/printf_.c \
737 $(OBJDIR)/publish_.c \
738 $(OBJDIR)/purge_.c \
739 $(OBJDIR)/rebuild_.c \
740 $(OBJDIR)/regexp_.c \
 
741 $(OBJDIR)/report_.c \
742 $(OBJDIR)/rss_.c \
743 $(OBJDIR)/schema_.c \
744 $(OBJDIR)/search_.c \
745 $(OBJDIR)/security_audit_.c \
@@ -873,10 +875,11 @@
873 $(OBJDIR)/printf.o \
874 $(OBJDIR)/publish.o \
875 $(OBJDIR)/purge.o \
876 $(OBJDIR)/rebuild.o \
877 $(OBJDIR)/regexp.o \
 
878 $(OBJDIR)/report.o \
879 $(OBJDIR)/rss.o \
880 $(OBJDIR)/schema.o \
881 $(OBJDIR)/search.o \
882 $(OBJDIR)/security_audit.o \
@@ -1229,10 +1232,11 @@
1229 $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \
1230 $(OBJDIR)/publish_.c:$(OBJDIR)/publish.h \
1231 $(OBJDIR)/purge_.c:$(OBJDIR)/purge.h \
1232 $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \
1233 $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h \
 
1234 $(OBJDIR)/report_.c:$(OBJDIR)/report.h \
1235 $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \
1236 $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \
1237 $(OBJDIR)/search_.c:$(OBJDIR)/search.h \
1238 $(OBJDIR)/security_audit_.c:$(OBJDIR)/security_audit.h \
@@ -2002,10 +2006,18 @@
2002
2003 $(OBJDIR)/regexp.o: $(OBJDIR)/regexp_.c $(OBJDIR)/regexp.h $(SRCDIR)/config.h
2004 $(XTCC) -o $(OBJDIR)/regexp.o -c $(OBJDIR)/regexp_.c
2005
2006 $(OBJDIR)/regexp.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
2007
2008 $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(TRANSLATE)
2009 $(TRANSLATE) $(SRCDIR)/report.c >$@
2010
2011 $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
2012
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -174,11 +174,11 @@
174 #### The directories where the OpenSSL include and library files are located.
175 # The recommended usage here is to use the Sysinternals junction tool
176 # to create a hard link between an "openssl-1.x" sub-directory of the
177 # Fossil source code directory and the target OpenSSL source directory.
178 #
179 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2q
180 OPENSSLINCDIR = $(OPENSSLDIR)/include
181 OPENSSLLIBDIR = $(OPENSSLDIR)
182
183 #### Either the directory where the Tcl library is installed or the Tcl
184 # source code directory resides (depending on the value of the macro
@@ -526,10 +526,11 @@
526 $(SRCDIR)/printf.c \
527 $(SRCDIR)/publish.c \
528 $(SRCDIR)/purge.c \
529 $(SRCDIR)/rebuild.c \
530 $(SRCDIR)/regexp.c \
531 $(SRCDIR)/repolist.c \
532 $(SRCDIR)/report.c \
533 $(SRCDIR)/rss.c \
534 $(SRCDIR)/schema.c \
535 $(SRCDIR)/search.c \
536 $(SRCDIR)/security_audit.c \
@@ -736,10 +737,11 @@
737 $(OBJDIR)/printf_.c \
738 $(OBJDIR)/publish_.c \
739 $(OBJDIR)/purge_.c \
740 $(OBJDIR)/rebuild_.c \
741 $(OBJDIR)/regexp_.c \
742 $(OBJDIR)/repolist_.c \
743 $(OBJDIR)/report_.c \
744 $(OBJDIR)/rss_.c \
745 $(OBJDIR)/schema_.c \
746 $(OBJDIR)/search_.c \
747 $(OBJDIR)/security_audit_.c \
@@ -873,10 +875,11 @@
875 $(OBJDIR)/printf.o \
876 $(OBJDIR)/publish.o \
877 $(OBJDIR)/purge.o \
878 $(OBJDIR)/rebuild.o \
879 $(OBJDIR)/regexp.o \
880 $(OBJDIR)/repolist.o \
881 $(OBJDIR)/report.o \
882 $(OBJDIR)/rss.o \
883 $(OBJDIR)/schema.o \
884 $(OBJDIR)/search.o \
885 $(OBJDIR)/security_audit.o \
@@ -1229,10 +1232,11 @@
1232 $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \
1233 $(OBJDIR)/publish_.c:$(OBJDIR)/publish.h \
1234 $(OBJDIR)/purge_.c:$(OBJDIR)/purge.h \
1235 $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \
1236 $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h \
1237 $(OBJDIR)/repolist_.c:$(OBJDIR)/repolist.h \
1238 $(OBJDIR)/report_.c:$(OBJDIR)/report.h \
1239 $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \
1240 $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \
1241 $(OBJDIR)/search_.c:$(OBJDIR)/search.h \
1242 $(OBJDIR)/security_audit_.c:$(OBJDIR)/security_audit.h \
@@ -2002,10 +2006,18 @@
2006
2007 $(OBJDIR)/regexp.o: $(OBJDIR)/regexp_.c $(OBJDIR)/regexp.h $(SRCDIR)/config.h
2008 $(XTCC) -o $(OBJDIR)/regexp.o -c $(OBJDIR)/regexp_.c
2009
2010 $(OBJDIR)/regexp.h: $(OBJDIR)/headers
2011
2012 $(OBJDIR)/repolist_.c: $(SRCDIR)/repolist.c $(TRANSLATE)
2013 $(TRANSLATE) $(SRCDIR)/repolist.c >$@
2014
2015 $(OBJDIR)/repolist.o: $(OBJDIR)/repolist_.c $(OBJDIR)/repolist.h $(SRCDIR)/config.h
2016 $(XTCC) -o $(OBJDIR)/repolist.o -c $(OBJDIR)/repolist_.c
2017
2018 $(OBJDIR)/repolist.h: $(OBJDIR)/headers
2019
2020 $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(TRANSLATE)
2021 $(TRANSLATE) $(SRCDIR)/report.c >$@
2022
2023 $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
2024
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -98,11 +98,11 @@
9898
!ifndef USE_SEE
9999
USE_SEE = 0
100100
!endif
101101
102102
!if $(FOSSIL_ENABLE_SSL)!=0
103
-SSLDIR = $(B)\compat\openssl-1.0.2p
103
+SSLDIR = $(B)\compat\openssl-1.0.2q
104104
SSLINCDIR = $(SSLDIR)\inc32
105105
!if $(FOSSIL_DYNAMIC_BUILD)!=0
106106
SSLLIBDIR = $(SSLDIR)\out32dll
107107
!else
108108
SSLLIBDIR = $(SSLDIR)\out32
109109
110110
ADDED www/admin-v-setup.md
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -98,11 +98,11 @@
98 !ifndef USE_SEE
99 USE_SEE = 0
100 !endif
101
102 !if $(FOSSIL_ENABLE_SSL)!=0
103 SSLDIR = $(B)\compat\openssl-1.0.2p
104 SSLINCDIR = $(SSLDIR)\inc32
105 !if $(FOSSIL_DYNAMIC_BUILD)!=0
106 SSLLIBDIR = $(SSLDIR)\out32dll
107 !else
108 SSLLIBDIR = $(SSLDIR)\out32
109
110 DDED www/admin-v-setup.md
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -98,11 +98,11 @@
98 !ifndef USE_SEE
99 USE_SEE = 0
100 !endif
101
102 !if $(FOSSIL_ENABLE_SSL)!=0
103 SSLDIR = $(B)\compat\openssl-1.0.2q
104 SSLINCDIR = $(SSLDIR)\inc32
105 !if $(FOSSIL_DYNAMIC_BUILD)!=0
106 SSLLIBDIR = $(SSLDIR)\out32dll
107 !else
108 SSLLIBDIR = $(SSLDIR)\out32
109
110 DDED www/admin-v-setup.md
--- a/www/admin-v-setup.md
+++ b/www/admin-v-setup.md
@@ -0,0 +1,4 @@
1
+# The Differences Between theilitiestween Sthe power hierarcKeep Several of the Fossil user capabilities form a clear power hierarchy.
2
+Mathematically speaking:
3
+
4
+> *Setup > Admin > Moderator > User > Subsc# The Differe
--- a/www/admin-v-setup.md
+++ b/www/admin-v-setup.md
@@ -0,0 +1,4 @@
 
 
 
 
--- a/www/admin-v-setup.md
+++ b/www/admin-v-setup.md
@@ -0,0 +1,4 @@
1 # The Differences Between theilitiestween Sthe power hierarcKeep Several of the Fossil user capabilities form a clear power hierarchy.
2 Mathematically speaking:
3
4 > *Setup > Admin > Moderator > User > Subsc# The Differe
+1 -1
--- www/alerts.md
+++ www/alerts.md
@@ -474,11 +474,11 @@
474474
<a id="uvs"></a>
475475
## Users vs Subscribers
476476
477477
Fossil makes a distinction between "users" and "subscribers". A user is
478478
someone with a username and password: that is, someone who can log into
479
-the Fossi repository. A subscriber is someone who receives email
479
+the Fossil repository. A subscriber is someone who receives email
480480
alerts. Users can also be subscribers and subscribers can be users, but
481481
that does not have to be the case. It is possible to be a user without
482482
being a subscriber and to be a subscriber without being a user.
483483
484484
In the repository database file, users are tracked with the `user` table
485485
--- www/alerts.md
+++ www/alerts.md
@@ -474,11 +474,11 @@
474 <a id="uvs"></a>
475 ## Users vs Subscribers
476
477 Fossil makes a distinction between "users" and "subscribers". A user is
478 someone with a username and password: that is, someone who can log into
479 the Fossi repository. A subscriber is someone who receives email
480 alerts. Users can also be subscribers and subscribers can be users, but
481 that does not have to be the case. It is possible to be a user without
482 being a subscriber and to be a subscriber without being a user.
483
484 In the repository database file, users are tracked with the `user` table
485
--- www/alerts.md
+++ www/alerts.md
@@ -474,11 +474,11 @@
474 <a id="uvs"></a>
475 ## Users vs Subscribers
476
477 Fossil makes a distinction between "users" and "subscribers". A user is
478 someone with a username and password: that is, someone who can log into
479 the Fossil repository. A subscriber is someone who receives email
480 alerts. Users can also be subscribers and subscribers can be users, but
481 that does not have to be the case. It is possible to be a user without
482 being a subscriber and to be a subscriber without being a user.
483
484 In the repository database file, users are tracked with the `user` table
485
--- www/backoffice.md
+++ www/backoffice.md
@@ -166,11 +166,11 @@
166166
> fossil test-backoffice-lease -R _REPOSITORY_
167167
168168
Running that command every few seconds should show what is going on with
169169
backoffice processing in a particular repository.
170170
171
-There are also two settings that control backoffice behavior. The
171
+There are also settings that control backoffice behavior. The
172172
"backoffice-nodelay" setting prevents the "next" process from taking a
173173
lease and sleeping. If "backoffice-nodelay" is set, that causes all
174174
backoffice processes to exit either immediately or after doing whatever
175175
backoffice works needs to be done. If something is going wrong and
176176
backoffice leases are causing delays in webpage processing, then setting
@@ -177,7 +177,13 @@
177177
"backoffice-nodelay" to true can work around the problem until the bug
178178
can be fixed. The "backoffice-logfile" setting is the name of a log
179179
file onto which is appended a short message everything a backoffice
180180
process actually starts to do the backoffice work. This log file can
181181
be used to verify that backoffice really is running, if there is any
182
-doubt. Most installations should leave "backoffice-nodelay" off and
182
+doubt. The "backoffice-disable" setting prevents automatic backoffice
183
+processing, if true. Use this to completely disable backoffice processing
184
+that occurs automatically after each HTTP request. The "backoffice-disable"
185
+setting does not affect the operation of the manual
186
+"fossil backoffice" command.
187
+Most installations should leave "backoffice-nodelay" and "backoffice-disable"
188
+set to their default values of off and
183189
leave "backoffice-logfile" unset or set to an empty string.
184190
--- www/backoffice.md
+++ www/backoffice.md
@@ -166,11 +166,11 @@
166 > fossil test-backoffice-lease -R _REPOSITORY_
167
168 Running that command every few seconds should show what is going on with
169 backoffice processing in a particular repository.
170
171 There are also two settings that control backoffice behavior. The
172 "backoffice-nodelay" setting prevents the "next" process from taking a
173 lease and sleeping. If "backoffice-nodelay" is set, that causes all
174 backoffice processes to exit either immediately or after doing whatever
175 backoffice works needs to be done. If something is going wrong and
176 backoffice leases are causing delays in webpage processing, then setting
@@ -177,7 +177,13 @@
177 "backoffice-nodelay" to true can work around the problem until the bug
178 can be fixed. The "backoffice-logfile" setting is the name of a log
179 file onto which is appended a short message everything a backoffice
180 process actually starts to do the backoffice work. This log file can
181 be used to verify that backoffice really is running, if there is any
182 doubt. Most installations should leave "backoffice-nodelay" off and
 
 
 
 
 
 
183 leave "backoffice-logfile" unset or set to an empty string.
184
--- www/backoffice.md
+++ www/backoffice.md
@@ -166,11 +166,11 @@
166 > fossil test-backoffice-lease -R _REPOSITORY_
167
168 Running that command every few seconds should show what is going on with
169 backoffice processing in a particular repository.
170
171 There are also settings that control backoffice behavior. The
172 "backoffice-nodelay" setting prevents the "next" process from taking a
173 lease and sleeping. If "backoffice-nodelay" is set, that causes all
174 backoffice processes to exit either immediately or after doing whatever
175 backoffice works needs to be done. If something is going wrong and
176 backoffice leases are causing delays in webpage processing, then setting
@@ -177,7 +177,13 @@
177 "backoffice-nodelay" to true can work around the problem until the bug
178 can be fixed. The "backoffice-logfile" setting is the name of a log
179 file onto which is appended a short message everything a backoffice
180 process actually starts to do the backoffice work. This log file can
181 be used to verify that backoffice really is running, if there is any
182 doubt. The "backoffice-disable" setting prevents automatic backoffice
183 processing, if true. Use this to completely disable backoffice processing
184 that occurs automatically after each HTTP request. The "backoffice-disable"
185 setting does not affect the operation of the manual
186 "fossil backoffice" command.
187 Most installations should leave "backoffice-nodelay" and "backoffice-disable"
188 set to their default values of off and
189 leave "backoffice-logfile" unset or set to an empty string.
190
+1 -1
--- www/build.wiki
+++ www/build.wiki
@@ -136,11 +136,11 @@
136136
the optional <a href="https://www.openssl.org/">OpenSSL</a> support,
137137
first <a href="https://www.openssl.org/source/">download the official
138138
source code for OpenSSL</a> and extract it to an appropriately named
139139
"<b>openssl-X.Y.ZA</b>" subdirectory within the local
140140
[/tree?ci=trunk&name=compat | compat] directory (e.g.
141
-"<b>compat/openssl-1.0.2p</b>"), then make sure that some recent
141
+"<b>compat/openssl-1.0.2q</b>"), then make sure that some recent
142142
<a href="http://www.perl.org/">Perl</a> binaries are installed locally,
143143
and finally run one of the following commands:
144144
<blockquote><pre>
145145
nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin
146146
</pre></blockquote>
147147
--- www/build.wiki
+++ www/build.wiki
@@ -136,11 +136,11 @@
136 the optional <a href="https://www.openssl.org/">OpenSSL</a> support,
137 first <a href="https://www.openssl.org/source/">download the official
138 source code for OpenSSL</a> and extract it to an appropriately named
139 "<b>openssl-X.Y.ZA</b>" subdirectory within the local
140 [/tree?ci=trunk&name=compat | compat] directory (e.g.
141 "<b>compat/openssl-1.0.2p</b>"), then make sure that some recent
142 <a href="http://www.perl.org/">Perl</a> binaries are installed locally,
143 and finally run one of the following commands:
144 <blockquote><pre>
145 nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin
146 </pre></blockquote>
147
--- www/build.wiki
+++ www/build.wiki
@@ -136,11 +136,11 @@
136 the optional <a href="https://www.openssl.org/">OpenSSL</a> support,
137 first <a href="https://www.openssl.org/source/">download the official
138 source code for OpenSSL</a> and extract it to an appropriately named
139 "<b>openssl-X.Y.ZA</b>" subdirectory within the local
140 [/tree?ci=trunk&name=compat | compat] directory (e.g.
141 "<b>compat/openssl-1.0.2q</b>"), then make sure that some recent
142 <a href="http://www.perl.org/">Perl</a> binaries are installed locally,
143 and finally run one of the following commands:
144 <blockquote><pre>
145 nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin
146 </pre></blockquote>
147
--- www/mkindex.tcl
+++ www/mkindex.tcl
@@ -9,10 +9,11 @@
99
set doclist {
1010
aboutcgi.wiki {How CGI Works In Fossil}
1111
aboutdownload.wiki {How The Download Page Works}
1212
adding_code.wiki {Adding New Features To Fossil}
1313
adding_code.wiki {Hacking Fossil}
14
+ admin-v-setup.md {The Differences Between the Setup and Admin User Capabilities}
1415
alerts.md {Email Alerts And Notifications}
1516
antibot.wiki {Defense against Spiders and Bots}
1617
backoffice.md {The "Backoffice" mechanism of Fossil}
1718
blame.wiki {The Annotate/Blame Algorithm Of Fossil}
1819
blockchain.md {Fossil As Blockchain}
1920
--- www/mkindex.tcl
+++ www/mkindex.tcl
@@ -9,10 +9,11 @@
9 set doclist {
10 aboutcgi.wiki {How CGI Works In Fossil}
11 aboutdownload.wiki {How The Download Page Works}
12 adding_code.wiki {Adding New Features To Fossil}
13 adding_code.wiki {Hacking Fossil}
 
14 alerts.md {Email Alerts And Notifications}
15 antibot.wiki {Defense against Spiders and Bots}
16 backoffice.md {The "Backoffice" mechanism of Fossil}
17 blame.wiki {The Annotate/Blame Algorithm Of Fossil}
18 blockchain.md {Fossil As Blockchain}
19
--- www/mkindex.tcl
+++ www/mkindex.tcl
@@ -9,10 +9,11 @@
9 set doclist {
10 aboutcgi.wiki {How CGI Works In Fossil}
11 aboutdownload.wiki {How The Download Page Works}
12 adding_code.wiki {Adding New Features To Fossil}
13 adding_code.wiki {Hacking Fossil}
14 admin-v-setup.md {The Differences Between the Setup and Admin User Capabilities}
15 alerts.md {Email Alerts And Notifications}
16 antibot.wiki {Defense against Spiders and Bots}
17 backoffice.md {The "Backoffice" mechanism of Fossil}
18 blame.wiki {The Annotate/Blame Algorithm Of Fossil}
19 blockchain.md {Fossil As Blockchain}
20
--- www/permutedindex.html
+++ www/permutedindex.html
@@ -22,10 +22,11 @@
2222
<ul>
2323
<li><a href="fiveminutes.wiki">5 Minutes as a Single User &mdash; Up and Running in</a></li>
2424
<li><a href="fossil-from-msvc.wiki">2010 IDE &mdash; Integrating Fossil in the Microsoft Express</a></li>
2525
<li><a href="tech_overview.wiki"><b>A Technical Overview Of The Design And Implementation Of Fossil</b></a></li>
2626
<li><a href="adding_code.wiki"><b>Adding New Features To Fossil</b></a></li>
27
+<li><a href="admin-v-setup.md">Admin User Capabilities &mdash; The Differences Between the Setup and</a></li>
2728
<li><a href="copyright-release.html">Agreement &mdash; Contributor License</a></li>
2829
<li><a href="alerts.md">Alerts And Notifications &mdash; Email</a></li>
2930
<li><a href="delta_encoder_algorithm.wiki">Algorithm &mdash; Fossil Delta Encoding</a></li>
3031
<li><a href="blame.wiki">Algorithm Of Fossil &mdash; The Annotate/Blame</a></li>
3132
<li><a href="blame.wiki">Annotate/Blame Algorithm Of Fossil &mdash; The</a></li>
@@ -33,16 +34,18 @@
3334
<li><a href="faq.wiki">Asked Questions &mdash; Frequently</a></li>
3435
<li><a href="password.wiki">Authentication &mdash; Password Management And</a></li>
3536
<li><a href="backoffice.md">Backoffice mechanism of Fossil &mdash; The</a></li>
3637
<li><a href="whyusefossil.wiki"><b>Benefits Of Version Control</b></a></li>
3738
<li><a href="hashpolicy.wiki">Between SHA1 and SHA3-256 &mdash; Hash Policy: Choosing</a></li>
39
+<li><a href="admin-v-setup.md">Between the Setup and Admin User Capabilities &mdash; The Differences</a></li>
3840
<li><a href="blockchain.md">Blockchain &mdash; Fossil As</a></li>
3941
<li><a href="antibot.wiki">Bots &mdash; Defense against Spiders and</a></li>
4042
<li><a href="private.wiki">Branches &mdash; Creating, Syncing, and Deleting Private</a></li>
4143
<li><a href="branching.wiki"><b>Branching, Forking, Merging, and Tagging</b></a></li>
4244
<li><a href="bugtheory.wiki"><b>Bug Tracking In Fossil</b></a></li>
4345
<li><a href="makefile.wiki">Build Process &mdash; The Fossil</a></li>
46
+<li><a href="admin-v-setup.md">Capabilities &mdash; The Differences Between the Setup and Admin User</a></li>
4447
<li><a href="aboutcgi.wiki">CGI Works In Fossil &mdash; How</a></li>
4548
<li><a href="changes.wiki">Changelog &mdash; Fossil</a></li>
4649
<li><a href="checkin_names.wiki"><b>Check-in And Version Names</b></a></li>
4750
<li><a href="checkin.wiki"><b>Check-in Checklist</b></a></li>
4851
<li><a href="checkin.wiki">Checklist &mdash; Check-in</a></li>
@@ -75,10 +78,11 @@
7578
<li><a href="private.wiki">Deleting Private Branches &mdash; Creating, Syncing, and</a></li>
7679
<li><a href="delta_encoder_algorithm.wiki">Delta Encoding Algorithm &mdash; Fossil</a></li>
7780
<li><a href="delta_format.wiki">Delta Format &mdash; Fossil</a></li>
7881
<li><a href="tech_overview.wiki">Design And Implementation Of Fossil &mdash; A Technical Overview Of The</a></li>
7982
<li><a href="theory1.wiki">Design Of The Fossil DVCS &mdash; Thoughts On The</a></li>
83
+<li><a href="admin-v-setup.md">Differences Between the Setup and Admin User Capabilities &mdash; The</a></li>
8084
<li><a href="embeddeddoc.wiki">Documentation &mdash; Embedded Project</a></li>
8185
<li><a href="contribute.wiki">Documentation To The Fossil Project &mdash; Contributing Code or</a></li>
8286
<li><a href="aboutdownload.wiki">Download Page Works &mdash; How The</a></li>
8387
<li><a href="theory1.wiki">DVCS &mdash; Thoughts On The Design Of The Fossil</a></li>
8488
<li><a href="quotes.wiki">DVCSes in General &mdash; Quotes: What People Are Saying About Fossil, Git, and</a></li>
@@ -200,10 +204,11 @@
200204
<li><a href="th1.md">Scripting Language &mdash; The TH1</a></li>
201205
<li><a href="selfcheck.wiki">Self Checks &mdash; Fossil Repository Integrity</a></li>
202206
<li><a href="selfhost.wiki">Self Hosting Repositories &mdash; Fossil</a></li>
203207
<li><a href="server.wiki">Server &mdash; How To Configure A Fossil</a></li>
204208
<li><a href="settings.wiki">Settings &mdash; Fossil</a></li>
209
+<li><a href="admin-v-setup.md">Setup and Admin User Capabilities &mdash; The Differences Between the</a></li>
205210
<li><a href="hashpolicy.wiki">SHA1 and SHA3-256 &mdash; Hash Policy: Choosing Between</a></li>
206211
<li><a href="hashpolicy.wiki">SHA3-256 &mdash; Hash Policy: Choosing Between SHA1 and</a></li>
207212
<li><a href="shunning.wiki"><b>Shunning: Deleting Content From Fossil</b></a></li>
208213
<li><a href="fiveminutes.wiki">Single User &mdash; Up and Running in 5 Minutes as a</a></li>
209214
<li><a href="../../../sitemap"><b>Site Map</b></a></li>
@@ -224,10 +229,11 @@
224229
<li><a href="tech_overview.wiki">Technical Overview Of The Design And Implementation Of Fossil &mdash; A</a></li>
225230
<li><a href="../test/release-checklist.wiki">Testing Checklist &mdash; Pre-Release</a></li>
226231
<li><a href="th1.md">TH1 Scripting Language &mdash; The</a></li>
227232
<li><a href="backoffice.md"><b>The "Backoffice" mechanism of Fossil</b></a></li>
228233
<li><a href="blame.wiki"><b>The Annotate/Blame Algorithm Of Fossil</b></a></li>
234
+<li><a href="admin-v-setup.md"><b>The Differences Between the Setup and Admin User Capabilities</b></a></li>
229235
<li><a href="makefile.wiki"><b>The Fossil Build Process</b></a></li>
230236
<li><a href="sync.wiki"><b>The Fossil Sync Protocol</b></a></li>
231237
<li><a href="tickets.wiki"><b>The Fossil Ticket System</b></a></li>
232238
<li><a href="webui.wiki"><b>The Fossil Web Interface</b></a></li>
233239
<li><a href="th1.md"><b>The TH1 Scripting Language</b></a></li>
@@ -241,10 +247,11 @@
241247
<li><a href="bugtheory.wiki">Tracking In Fossil &mdash; Bug</a></li>
242248
<li><a href="unvers.wiki"><b>Unversioned Files</b></a></li>
243249
<li><a href="fiveminutes.wiki"><b>Up and Running in 5 Minutes as a Single User</b></a></li>
244250
<li><a href="hints.wiki">Usage Hints &mdash; Fossil Tips And</a></li>
245251
<li><a href="fiveminutes.wiki">User &mdash; Up and Running in 5 Minutes as a Single</a></li>
252
+<li><a href="admin-v-setup.md">User Capabilities &mdash; The Differences Between the Setup and Admin</a></li>
246253
<li><a href="ssl.wiki"><b>Using SSL with Fossil</b></a></li>
247254
<li><a href="env-opts.md">Variables and Global Options &mdash; Environment</a></li>
248255
<li><a href="whyusefossil.wiki">Version Control &mdash; Benefits Of</a></li>
249256
<li><a href="checkin_names.wiki">Version Names &mdash; Check-in And</a></li>
250257
<li><a href="fossil-v-git.wiki">Versus Git &mdash; Fossil</a></li>
251258
--- www/permutedindex.html
+++ www/permutedindex.html
@@ -22,10 +22,11 @@
22 <ul>
23 <li><a href="fiveminutes.wiki">5 Minutes as a Single User &mdash; Up and Running in</a></li>
24 <li><a href="fossil-from-msvc.wiki">2010 IDE &mdash; Integrating Fossil in the Microsoft Express</a></li>
25 <li><a href="tech_overview.wiki"><b>A Technical Overview Of The Design And Implementation Of Fossil</b></a></li>
26 <li><a href="adding_code.wiki"><b>Adding New Features To Fossil</b></a></li>
 
27 <li><a href="copyright-release.html">Agreement &mdash; Contributor License</a></li>
28 <li><a href="alerts.md">Alerts And Notifications &mdash; Email</a></li>
29 <li><a href="delta_encoder_algorithm.wiki">Algorithm &mdash; Fossil Delta Encoding</a></li>
30 <li><a href="blame.wiki">Algorithm Of Fossil &mdash; The Annotate/Blame</a></li>
31 <li><a href="blame.wiki">Annotate/Blame Algorithm Of Fossil &mdash; The</a></li>
@@ -33,16 +34,18 @@
33 <li><a href="faq.wiki">Asked Questions &mdash; Frequently</a></li>
34 <li><a href="password.wiki">Authentication &mdash; Password Management And</a></li>
35 <li><a href="backoffice.md">Backoffice mechanism of Fossil &mdash; The</a></li>
36 <li><a href="whyusefossil.wiki"><b>Benefits Of Version Control</b></a></li>
37 <li><a href="hashpolicy.wiki">Between SHA1 and SHA3-256 &mdash; Hash Policy: Choosing</a></li>
 
38 <li><a href="blockchain.md">Blockchain &mdash; Fossil As</a></li>
39 <li><a href="antibot.wiki">Bots &mdash; Defense against Spiders and</a></li>
40 <li><a href="private.wiki">Branches &mdash; Creating, Syncing, and Deleting Private</a></li>
41 <li><a href="branching.wiki"><b>Branching, Forking, Merging, and Tagging</b></a></li>
42 <li><a href="bugtheory.wiki"><b>Bug Tracking In Fossil</b></a></li>
43 <li><a href="makefile.wiki">Build Process &mdash; The Fossil</a></li>
 
44 <li><a href="aboutcgi.wiki">CGI Works In Fossil &mdash; How</a></li>
45 <li><a href="changes.wiki">Changelog &mdash; Fossil</a></li>
46 <li><a href="checkin_names.wiki"><b>Check-in And Version Names</b></a></li>
47 <li><a href="checkin.wiki"><b>Check-in Checklist</b></a></li>
48 <li><a href="checkin.wiki">Checklist &mdash; Check-in</a></li>
@@ -75,10 +78,11 @@
75 <li><a href="private.wiki">Deleting Private Branches &mdash; Creating, Syncing, and</a></li>
76 <li><a href="delta_encoder_algorithm.wiki">Delta Encoding Algorithm &mdash; Fossil</a></li>
77 <li><a href="delta_format.wiki">Delta Format &mdash; Fossil</a></li>
78 <li><a href="tech_overview.wiki">Design And Implementation Of Fossil &mdash; A Technical Overview Of The</a></li>
79 <li><a href="theory1.wiki">Design Of The Fossil DVCS &mdash; Thoughts On The</a></li>
 
80 <li><a href="embeddeddoc.wiki">Documentation &mdash; Embedded Project</a></li>
81 <li><a href="contribute.wiki">Documentation To The Fossil Project &mdash; Contributing Code or</a></li>
82 <li><a href="aboutdownload.wiki">Download Page Works &mdash; How The</a></li>
83 <li><a href="theory1.wiki">DVCS &mdash; Thoughts On The Design Of The Fossil</a></li>
84 <li><a href="quotes.wiki">DVCSes in General &mdash; Quotes: What People Are Saying About Fossil, Git, and</a></li>
@@ -200,10 +204,11 @@
200 <li><a href="th1.md">Scripting Language &mdash; The TH1</a></li>
201 <li><a href="selfcheck.wiki">Self Checks &mdash; Fossil Repository Integrity</a></li>
202 <li><a href="selfhost.wiki">Self Hosting Repositories &mdash; Fossil</a></li>
203 <li><a href="server.wiki">Server &mdash; How To Configure A Fossil</a></li>
204 <li><a href="settings.wiki">Settings &mdash; Fossil</a></li>
 
205 <li><a href="hashpolicy.wiki">SHA1 and SHA3-256 &mdash; Hash Policy: Choosing Between</a></li>
206 <li><a href="hashpolicy.wiki">SHA3-256 &mdash; Hash Policy: Choosing Between SHA1 and</a></li>
207 <li><a href="shunning.wiki"><b>Shunning: Deleting Content From Fossil</b></a></li>
208 <li><a href="fiveminutes.wiki">Single User &mdash; Up and Running in 5 Minutes as a</a></li>
209 <li><a href="../../../sitemap"><b>Site Map</b></a></li>
@@ -224,10 +229,11 @@
224 <li><a href="tech_overview.wiki">Technical Overview Of The Design And Implementation Of Fossil &mdash; A</a></li>
225 <li><a href="../test/release-checklist.wiki">Testing Checklist &mdash; Pre-Release</a></li>
226 <li><a href="th1.md">TH1 Scripting Language &mdash; The</a></li>
227 <li><a href="backoffice.md"><b>The "Backoffice" mechanism of Fossil</b></a></li>
228 <li><a href="blame.wiki"><b>The Annotate/Blame Algorithm Of Fossil</b></a></li>
 
229 <li><a href="makefile.wiki"><b>The Fossil Build Process</b></a></li>
230 <li><a href="sync.wiki"><b>The Fossil Sync Protocol</b></a></li>
231 <li><a href="tickets.wiki"><b>The Fossil Ticket System</b></a></li>
232 <li><a href="webui.wiki"><b>The Fossil Web Interface</b></a></li>
233 <li><a href="th1.md"><b>The TH1 Scripting Language</b></a></li>
@@ -241,10 +247,11 @@
241 <li><a href="bugtheory.wiki">Tracking In Fossil &mdash; Bug</a></li>
242 <li><a href="unvers.wiki"><b>Unversioned Files</b></a></li>
243 <li><a href="fiveminutes.wiki"><b>Up and Running in 5 Minutes as a Single User</b></a></li>
244 <li><a href="hints.wiki">Usage Hints &mdash; Fossil Tips And</a></li>
245 <li><a href="fiveminutes.wiki">User &mdash; Up and Running in 5 Minutes as a Single</a></li>
 
246 <li><a href="ssl.wiki"><b>Using SSL with Fossil</b></a></li>
247 <li><a href="env-opts.md">Variables and Global Options &mdash; Environment</a></li>
248 <li><a href="whyusefossil.wiki">Version Control &mdash; Benefits Of</a></li>
249 <li><a href="checkin_names.wiki">Version Names &mdash; Check-in And</a></li>
250 <li><a href="fossil-v-git.wiki">Versus Git &mdash; Fossil</a></li>
251
--- www/permutedindex.html
+++ www/permutedindex.html
@@ -22,10 +22,11 @@
22 <ul>
23 <li><a href="fiveminutes.wiki">5 Minutes as a Single User &mdash; Up and Running in</a></li>
24 <li><a href="fossil-from-msvc.wiki">2010 IDE &mdash; Integrating Fossil in the Microsoft Express</a></li>
25 <li><a href="tech_overview.wiki"><b>A Technical Overview Of The Design And Implementation Of Fossil</b></a></li>
26 <li><a href="adding_code.wiki"><b>Adding New Features To Fossil</b></a></li>
27 <li><a href="admin-v-setup.md">Admin User Capabilities &mdash; The Differences Between the Setup and</a></li>
28 <li><a href="copyright-release.html">Agreement &mdash; Contributor License</a></li>
29 <li><a href="alerts.md">Alerts And Notifications &mdash; Email</a></li>
30 <li><a href="delta_encoder_algorithm.wiki">Algorithm &mdash; Fossil Delta Encoding</a></li>
31 <li><a href="blame.wiki">Algorithm Of Fossil &mdash; The Annotate/Blame</a></li>
32 <li><a href="blame.wiki">Annotate/Blame Algorithm Of Fossil &mdash; The</a></li>
@@ -33,16 +34,18 @@
34 <li><a href="faq.wiki">Asked Questions &mdash; Frequently</a></li>
35 <li><a href="password.wiki">Authentication &mdash; Password Management And</a></li>
36 <li><a href="backoffice.md">Backoffice mechanism of Fossil &mdash; The</a></li>
37 <li><a href="whyusefossil.wiki"><b>Benefits Of Version Control</b></a></li>
38 <li><a href="hashpolicy.wiki">Between SHA1 and SHA3-256 &mdash; Hash Policy: Choosing</a></li>
39 <li><a href="admin-v-setup.md">Between the Setup and Admin User Capabilities &mdash; The Differences</a></li>
40 <li><a href="blockchain.md">Blockchain &mdash; Fossil As</a></li>
41 <li><a href="antibot.wiki">Bots &mdash; Defense against Spiders and</a></li>
42 <li><a href="private.wiki">Branches &mdash; Creating, Syncing, and Deleting Private</a></li>
43 <li><a href="branching.wiki"><b>Branching, Forking, Merging, and Tagging</b></a></li>
44 <li><a href="bugtheory.wiki"><b>Bug Tracking In Fossil</b></a></li>
45 <li><a href="makefile.wiki">Build Process &mdash; The Fossil</a></li>
46 <li><a href="admin-v-setup.md">Capabilities &mdash; The Differences Between the Setup and Admin User</a></li>
47 <li><a href="aboutcgi.wiki">CGI Works In Fossil &mdash; How</a></li>
48 <li><a href="changes.wiki">Changelog &mdash; Fossil</a></li>
49 <li><a href="checkin_names.wiki"><b>Check-in And Version Names</b></a></li>
50 <li><a href="checkin.wiki"><b>Check-in Checklist</b></a></li>
51 <li><a href="checkin.wiki">Checklist &mdash; Check-in</a></li>
@@ -75,10 +78,11 @@
78 <li><a href="private.wiki">Deleting Private Branches &mdash; Creating, Syncing, and</a></li>
79 <li><a href="delta_encoder_algorithm.wiki">Delta Encoding Algorithm &mdash; Fossil</a></li>
80 <li><a href="delta_format.wiki">Delta Format &mdash; Fossil</a></li>
81 <li><a href="tech_overview.wiki">Design And Implementation Of Fossil &mdash; A Technical Overview Of The</a></li>
82 <li><a href="theory1.wiki">Design Of The Fossil DVCS &mdash; Thoughts On The</a></li>
83 <li><a href="admin-v-setup.md">Differences Between the Setup and Admin User Capabilities &mdash; The</a></li>
84 <li><a href="embeddeddoc.wiki">Documentation &mdash; Embedded Project</a></li>
85 <li><a href="contribute.wiki">Documentation To The Fossil Project &mdash; Contributing Code or</a></li>
86 <li><a href="aboutdownload.wiki">Download Page Works &mdash; How The</a></li>
87 <li><a href="theory1.wiki">DVCS &mdash; Thoughts On The Design Of The Fossil</a></li>
88 <li><a href="quotes.wiki">DVCSes in General &mdash; Quotes: What People Are Saying About Fossil, Git, and</a></li>
@@ -200,10 +204,11 @@
204 <li><a href="th1.md">Scripting Language &mdash; The TH1</a></li>
205 <li><a href="selfcheck.wiki">Self Checks &mdash; Fossil Repository Integrity</a></li>
206 <li><a href="selfhost.wiki">Self Hosting Repositories &mdash; Fossil</a></li>
207 <li><a href="server.wiki">Server &mdash; How To Configure A Fossil</a></li>
208 <li><a href="settings.wiki">Settings &mdash; Fossil</a></li>
209 <li><a href="admin-v-setup.md">Setup and Admin User Capabilities &mdash; The Differences Between the</a></li>
210 <li><a href="hashpolicy.wiki">SHA1 and SHA3-256 &mdash; Hash Policy: Choosing Between</a></li>
211 <li><a href="hashpolicy.wiki">SHA3-256 &mdash; Hash Policy: Choosing Between SHA1 and</a></li>
212 <li><a href="shunning.wiki"><b>Shunning: Deleting Content From Fossil</b></a></li>
213 <li><a href="fiveminutes.wiki">Single User &mdash; Up and Running in 5 Minutes as a</a></li>
214 <li><a href="../../../sitemap"><b>Site Map</b></a></li>
@@ -224,10 +229,11 @@
229 <li><a href="tech_overview.wiki">Technical Overview Of The Design And Implementation Of Fossil &mdash; A</a></li>
230 <li><a href="../test/release-checklist.wiki">Testing Checklist &mdash; Pre-Release</a></li>
231 <li><a href="th1.md">TH1 Scripting Language &mdash; The</a></li>
232 <li><a href="backoffice.md"><b>The "Backoffice" mechanism of Fossil</b></a></li>
233 <li><a href="blame.wiki"><b>The Annotate/Blame Algorithm Of Fossil</b></a></li>
234 <li><a href="admin-v-setup.md"><b>The Differences Between the Setup and Admin User Capabilities</b></a></li>
235 <li><a href="makefile.wiki"><b>The Fossil Build Process</b></a></li>
236 <li><a href="sync.wiki"><b>The Fossil Sync Protocol</b></a></li>
237 <li><a href="tickets.wiki"><b>The Fossil Ticket System</b></a></li>
238 <li><a href="webui.wiki"><b>The Fossil Web Interface</b></a></li>
239 <li><a href="th1.md"><b>The TH1 Scripting Language</b></a></li>
@@ -241,10 +247,11 @@
247 <li><a href="bugtheory.wiki">Tracking In Fossil &mdash; Bug</a></li>
248 <li><a href="unvers.wiki"><b>Unversioned Files</b></a></li>
249 <li><a href="fiveminutes.wiki"><b>Up and Running in 5 Minutes as a Single User</b></a></li>
250 <li><a href="hints.wiki">Usage Hints &mdash; Fossil Tips And</a></li>
251 <li><a href="fiveminutes.wiki">User &mdash; Up and Running in 5 Minutes as a Single</a></li>
252 <li><a href="admin-v-setup.md">User Capabilities &mdash; The Differences Between the Setup and Admin</a></li>
253 <li><a href="ssl.wiki"><b>Using SSL with Fossil</b></a></li>
254 <li><a href="env-opts.md">Variables and Global Options &mdash; Environment</a></li>
255 <li><a href="whyusefossil.wiki">Version Control &mdash; Benefits Of</a></li>
256 <li><a href="checkin_names.wiki">Version Names &mdash; Check-in And</a></li>
257 <li><a href="fossil-v-git.wiki">Versus Git &mdash; Fossil</a></li>
258

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button