Fossil SCM

Update the built-in SQLite to the latest 3.26.0 beta for testing.

drh 2018-11-28 13:19 trunk
Commit c523d0a9b5dc738f506f78df860d081f816745f3f275f5e4743ebb1bae38a045
3 files changed +79 -33 +576 -467 +2 -1
+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
+576 -467
--- 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-11-28 11:49:46 b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a73771"
11681168
11691169
/*
11701170
** CAPI3REF: Run-Time Library Version Numbers
11711171
** KEYWORDS: sqlite3_version sqlite3_sourceid
11721172
**
@@ -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
@@ -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];
@@ -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-11-28 11:49:46 b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a73771", -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-11-28 11:49:46 b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a7alt2"
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 **
@@ -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
@@ -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];
@@ -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-11-28 11:49:46 b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a73771"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -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
@@ -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];
@@ -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-11-28 11:49:46 b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a73771", -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-11-28 11:49:46 b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a7alt2"
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
+2 -1
--- 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-11-28 11:49:46 b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a73771"
129129
130130
/*
131131
** CAPI3REF: Run-Time Library Version Numbers
132132
** KEYWORDS: sqlite3_version sqlite3_sourceid
133133
**
@@ -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
72507251
--- 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 **
@@ -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
7250
--- 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-28 11:49:46 b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a73771"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -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
7251

Keyboard Shortcuts

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