Fossil SCM

Update the built-in SQLite to the latest 3.35 alpha including CLI enhancements and DROP COLUMN support.

drh 2021-02-19 14:58 trunk
Commit 736e5c892bb94c8c7ef9dbe8212d1137bf99e62fa7c7088ad02d1aa55ac502d9
3 files changed +12 -5 +1223 -939 +2 -2
+12 -5
--- src/shell.c
+++ src/shell.c
@@ -18795,11 +18795,11 @@
1879518795
1879618796
if( (c=='o'
1879718797
&& (strncmp(azArg[0], "output", n)==0||strncmp(azArg[0], "once", n)==0))
1879818798
|| (c=='e' && n==5 && strcmp(azArg[0],"excel")==0)
1879918799
){
18800
- const char *zFile = 0;
18800
+ char *zFile = 0;
1880118801
int bTxtMode = 0;
1880218802
int i;
1880318803
int eMode = 0;
1880418804
int bBOM = 0;
1880518805
int bOnce = 0; /* 0: .output, 1: .once, 2: .excel */
@@ -18825,21 +18825,26 @@
1882518825
azArg[i]);
1882618826
showHelp(p->out, azArg[0]);
1882718827
rc = 1;
1882818828
goto meta_command_exit;
1882918829
}
18830
- }else if( zFile==0 ){
18831
- zFile = z;
18830
+ }else if( zFile==0 && eMode!='e' && eMode!='x' ){
18831
+ zFile = sqlite3_mprintf("%s", z);
18832
+ if( zFile[0]=='|' ){
18833
+ while( i+1<nArg ) zFile = sqlite3_mprintf("%z %s", zFile, azArg[++i]);
18834
+ break;
18835
+ }
1883218836
}else{
1883318837
utf8_printf(p->out,"ERROR: extra parameter: \"%s\". Usage:\n",
1883418838
azArg[i]);
1883518839
showHelp(p->out, azArg[0]);
1883618840
rc = 1;
18841
+ sqlite3_free(zFile);
1883718842
goto meta_command_exit;
1883818843
}
1883918844
}
18840
- if( zFile==0 ) zFile = "stdout";
18845
+ if( zFile==0 ) zFile = sqlite3_mprintf("stdout");
1884118846
if( bOnce ){
1884218847
p->outCount = 2;
1884318848
}else{
1884418849
p->outCount = 0;
1884518850
}
@@ -18858,11 +18863,12 @@
1885818863
}else{
1885918864
/* text editor mode */
1886018865
newTempFile(p, "txt");
1886118866
bTxtMode = 1;
1886218867
}
18863
- zFile = p->zTempFile;
18868
+ sqlite3_free(zFile);
18869
+ zFile = sqlite3_mprintf("%s", p->zTempFile);
1886418870
}
1886518871
#endif /* SQLITE_NOHAVE_SYSTEM */
1886618872
if( zFile[0]=='|' ){
1886718873
#ifdef SQLITE_OMIT_POPEN
1886818874
raw_printf(stderr, "Error: pipes are not supported in this OS\n");
@@ -18890,10 +18896,11 @@
1889018896
} else {
1889118897
if( bBOM ) fprintf(p->out,"\357\273\277");
1889218898
sqlite3_snprintf(sizeof(p->outfile), p->outfile, "%s", zFile);
1889318899
}
1889418900
}
18901
+ sqlite3_free(zFile);
1889518902
}else
1889618903
1889718904
if( c=='p' && n>=3 && strncmp(azArg[0], "parameter", n)==0 ){
1889818905
open_db(p,0);
1889918906
if( nArg<=1 ) goto parameter_syntax_error;
1890018907
--- src/shell.c
+++ src/shell.c
@@ -18795,11 +18795,11 @@
18795
18796 if( (c=='o'
18797 && (strncmp(azArg[0], "output", n)==0||strncmp(azArg[0], "once", n)==0))
18798 || (c=='e' && n==5 && strcmp(azArg[0],"excel")==0)
18799 ){
18800 const char *zFile = 0;
18801 int bTxtMode = 0;
18802 int i;
18803 int eMode = 0;
18804 int bBOM = 0;
18805 int bOnce = 0; /* 0: .output, 1: .once, 2: .excel */
@@ -18825,21 +18825,26 @@
18825 azArg[i]);
18826 showHelp(p->out, azArg[0]);
18827 rc = 1;
18828 goto meta_command_exit;
18829 }
18830 }else if( zFile==0 ){
18831 zFile = z;
 
 
 
 
18832 }else{
18833 utf8_printf(p->out,"ERROR: extra parameter: \"%s\". Usage:\n",
18834 azArg[i]);
18835 showHelp(p->out, azArg[0]);
18836 rc = 1;
 
18837 goto meta_command_exit;
18838 }
18839 }
18840 if( zFile==0 ) zFile = "stdout";
18841 if( bOnce ){
18842 p->outCount = 2;
18843 }else{
18844 p->outCount = 0;
18845 }
@@ -18858,11 +18863,12 @@
18858 }else{
18859 /* text editor mode */
18860 newTempFile(p, "txt");
18861 bTxtMode = 1;
18862 }
18863 zFile = p->zTempFile;
 
18864 }
18865 #endif /* SQLITE_NOHAVE_SYSTEM */
18866 if( zFile[0]=='|' ){
18867 #ifdef SQLITE_OMIT_POPEN
18868 raw_printf(stderr, "Error: pipes are not supported in this OS\n");
@@ -18890,10 +18896,11 @@
18890 } else {
18891 if( bBOM ) fprintf(p->out,"\357\273\277");
18892 sqlite3_snprintf(sizeof(p->outfile), p->outfile, "%s", zFile);
18893 }
18894 }
 
18895 }else
18896
18897 if( c=='p' && n>=3 && strncmp(azArg[0], "parameter", n)==0 ){
18898 open_db(p,0);
18899 if( nArg<=1 ) goto parameter_syntax_error;
18900
--- src/shell.c
+++ src/shell.c
@@ -18795,11 +18795,11 @@
18795
18796 if( (c=='o'
18797 && (strncmp(azArg[0], "output", n)==0||strncmp(azArg[0], "once", n)==0))
18798 || (c=='e' && n==5 && strcmp(azArg[0],"excel")==0)
18799 ){
18800 char *zFile = 0;
18801 int bTxtMode = 0;
18802 int i;
18803 int eMode = 0;
18804 int bBOM = 0;
18805 int bOnce = 0; /* 0: .output, 1: .once, 2: .excel */
@@ -18825,21 +18825,26 @@
18825 azArg[i]);
18826 showHelp(p->out, azArg[0]);
18827 rc = 1;
18828 goto meta_command_exit;
18829 }
18830 }else if( zFile==0 && eMode!='e' && eMode!='x' ){
18831 zFile = sqlite3_mprintf("%s", z);
18832 if( zFile[0]=='|' ){
18833 while( i+1<nArg ) zFile = sqlite3_mprintf("%z %s", zFile, azArg[++i]);
18834 break;
18835 }
18836 }else{
18837 utf8_printf(p->out,"ERROR: extra parameter: \"%s\". Usage:\n",
18838 azArg[i]);
18839 showHelp(p->out, azArg[0]);
18840 rc = 1;
18841 sqlite3_free(zFile);
18842 goto meta_command_exit;
18843 }
18844 }
18845 if( zFile==0 ) zFile = sqlite3_mprintf("stdout");
18846 if( bOnce ){
18847 p->outCount = 2;
18848 }else{
18849 p->outCount = 0;
18850 }
@@ -18858,11 +18863,12 @@
18863 }else{
18864 /* text editor mode */
18865 newTempFile(p, "txt");
18866 bTxtMode = 1;
18867 }
18868 sqlite3_free(zFile);
18869 zFile = sqlite3_mprintf("%s", p->zTempFile);
18870 }
18871 #endif /* SQLITE_NOHAVE_SYSTEM */
18872 if( zFile[0]=='|' ){
18873 #ifdef SQLITE_OMIT_POPEN
18874 raw_printf(stderr, "Error: pipes are not supported in this OS\n");
@@ -18890,10 +18896,11 @@
18896 } else {
18897 if( bBOM ) fprintf(p->out,"\357\273\277");
18898 sqlite3_snprintf(sizeof(p->outfile), p->outfile, "%s", zFile);
18899 }
18900 }
18901 sqlite3_free(zFile);
18902 }else
18903
18904 if( c=='p' && n>=3 && strncmp(azArg[0], "parameter", n)==0 ){
18905 open_db(p,0);
18906 if( nArg<=1 ) goto parameter_syntax_error;
18907
+1223 -939
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1171,11 +1171,11 @@
11711171
** be held constant and Z will be incremented or else Y will be incremented
11721172
** and Z will be reset to zero.
11731173
**
11741174
** Since [version 3.6.18] ([dateof:3.6.18]),
11751175
** SQLite source code has been stored in the
1176
-** <a href="http://fossil-scm.org/">Fossil configuration management
1176
+** <a href="http://www.fossil-scm.org/">Fossil configuration management
11771177
** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
11781178
** a string which identifies a particular check-in of SQLite
11791179
** within its configuration management system. ^The SQLITE_SOURCE_ID
11801180
** string contains the date and time of the check-in (UTC) and a SHA1
11811181
** or SHA3-256 hash of the entire source tree. If the source code has
@@ -1186,11 +1186,11 @@
11861186
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
11871187
** [sqlite_version()] and [sqlite_source_id()].
11881188
*/
11891189
#define SQLITE_VERSION "3.35.0"
11901190
#define SQLITE_VERSION_NUMBER 3035000
1191
-#define SQLITE_SOURCE_ID "2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398f17d"
1191
+#define SQLITE_SOURCE_ID "2021-02-19 14:32:58 c844a331e78949850fde8ed95058cb34f863566944bc9e92e3ae042768f130e1"
11921192
11931193
/*
11941194
** CAPI3REF: Run-Time Library Version Numbers
11951195
** KEYWORDS: sqlite3_version sqlite3_sourceid
11961196
**
@@ -15966,11 +15966,11 @@
1596615966
#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN)
1596715967
SQLITE_PRIVATE void sqlite3ExplainBreakpoint(const char*,const char*);
1596815968
#else
1596915969
# define sqlite3ExplainBreakpoint(A,B) /*no-op*/
1597015970
#endif
15971
-SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*,int,char*);
15971
+SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*, int, char*, u16);
1597215972
SQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe*, int addr, u8);
1597315973
SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1);
1597415974
SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2);
1597515975
SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, int addr, int P3);
1597615976
SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u16 P5);
@@ -17475,11 +17475,16 @@
1747517475
u8 szEst; /* Estimated size of value in this column. sizeof(INT)==1 */
1747617476
u8 hName; /* Column name hash for faster lookup */
1747717477
u16 colFlags; /* Boolean properties. See COLFLAG_ defines below */
1747817478
};
1747917479
17480
-/* Allowed values for Column.colFlags:
17480
+/* Allowed values for Column.colFlags.
17481
+**
17482
+** Constraints:
17483
+** TF_HasVirtual == COLFLAG_VIRTUAL
17484
+** TF_HasStored == COLFLAG_STORED
17485
+** TF_HasHidden == COLFLAG_HIDDEN
1748117486
*/
1748217487
#define COLFLAG_PRIMKEY 0x0001 /* Column is part of the primary key */
1748317488
#define COLFLAG_HIDDEN 0x0002 /* A hidden column in a virtual table */
1748417489
#define COLFLAG_HASTYPE 0x0004 /* Type name follows column name */
1748517490
#define COLFLAG_UNIQUE 0x0008 /* Column def contains "UNIQUE" or "PK" */
@@ -17664,15 +17669,16 @@
1766417669
** the TF_OOOHidden attribute would apply in this case. Such tables require
1766517670
** special handling during INSERT processing. The "OOO" means "Out Of Order".
1766617671
**
1766717672
** Constraints:
1766817673
**
17669
-** TF_HasVirtual == COLFLAG_Virtual
17670
-** TF_HasStored == COLFLAG_Stored
17674
+** TF_HasVirtual == COLFLAG_VIRTUAL
17675
+** TF_HasStored == COLFLAG_STORED
17676
+** TF_HasHidden == COLFLAG_HIDDEN
1767117677
*/
1767217678
#define TF_Readonly 0x0001 /* Read-only system table */
17673
-#define TF_Ephemeral 0x0002 /* An ephemeral table */
17679
+#define TF_HasHidden 0x0002 /* Has one or more hidden columns */
1767417680
#define TF_HasPrimaryKey 0x0004 /* Table has a primary key */
1767517681
#define TF_Autoincrement 0x0008 /* Integer primary key is autoincrement */
1767617682
#define TF_HasStat1 0x0010 /* nRowLogEst set from sqlite_stat1 */
1767717683
#define TF_HasVirtual 0x0020 /* Has one or more VIRTUAL columns */
1767817684
#define TF_HasStored 0x0040 /* Has one or more STORED columns */
@@ -17683,10 +17689,11 @@
1768317689
#define TF_NoVisibleRowid 0x0200 /* No user-visible "rowid" column */
1768417690
#define TF_OOOHidden 0x0400 /* Out-of-Order hidden columns */
1768517691
#define TF_HasNotNull 0x0800 /* Contains NOT NULL constraints */
1768617692
#define TF_Shadow 0x1000 /* True for a shadow table */
1768717693
#define TF_HasStat4 0x2000 /* STAT4 info available for this table */
17694
+#define TF_Ephemeral 0x4000 /* An ephemeral table */
1768817695
1768917696
/*
1769017697
** Test to see whether or not a table is a virtual table. This is
1769117698
** done as a macro so that it will be optimized out when virtual
1769217699
** table support is omitted from the build.
@@ -18051,11 +18058,10 @@
1805118058
int iMem; /* Memory location that acts as accumulator */
1805218059
int iDistinct; /* Ephemeral table used to enforce DISTINCT */
1805318060
} *aFunc;
1805418061
int nFunc; /* Number of entries in aFunc[] */
1805518062
u32 selId; /* Select to which this AggInfo belongs */
18056
- AggInfo *pNext; /* Next in list of them all */
1805718063
};
1805818064
1805918065
/*
1806018066
** The datatype ynVar is a signed integer, either 16-bit or 32-bit.
1806118067
** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater
@@ -18644,10 +18650,11 @@
1864418650
#define SF_WhereBegin 0x0080000 /* Really a WhereBegin() call. Debug Only */
1864518651
#define SF_WinRewrite 0x0100000 /* Window function rewrite accomplished */
1864618652
#define SF_View 0x0200000 /* SELECT statement is a view */
1864718653
#define SF_NoopOrderBy 0x0400000 /* ORDER BY is ignored for this query */
1864818654
#define SF_UpdateFrom 0x0800000 /* Statement is an UPDATE...FROM */
18655
+#define SF_PushDown 0x1000000 /* SELECT has be modified by push-down opt */
1864918656
1865018657
/*
1865118658
** The results of a SELECT can be distributed in several ways, as defined
1865218659
** by one of the following macros. The "SRT" prefix means "SELECT Result
1865318660
** Type".
@@ -18886,11 +18893,10 @@
1888618893
#endif
1888718894
AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */
1888818895
Parse *pToplevel; /* Parse structure for main program (or NULL) */
1888918896
Table *pTriggerTab; /* Table triggers are being coded for */
1889018897
Parse *pParentParse; /* Parent parser if this parser is nested */
18891
- AggInfo *pAggList; /* List of all AggInfo objects */
1889218898
union {
1889318899
int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */
1889418900
Returning *pReturning; /* The RETURNING clause */
1889518901
} u1;
1889618902
u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */
@@ -19170,11 +19176,12 @@
1917019176
} InitData;
1917119177
1917219178
/*
1917319179
** Allowed values for mInitFlags
1917419180
*/
19175
-#define INITFLAG_AlterTable 0x0001 /* This is a reparse after ALTER TABLE */
19181
+#define INITFLAG_AlterRename 0x0001 /* Reparse after a RENAME */
19182
+#define INITFLAG_AlterDrop 0x0002 /* Reparse after a DROP COLUMN */
1917619183
1917719184
/*
1917819185
** Structure containing global configuration data for the SQLite library.
1917919186
**
1918019187
** This structure also contains some state information.
@@ -19990,10 +19997,11 @@
1999019997
# define sqlite3TriggerColmask(A,B,C,D,E,F,G) 0
1999119998
# define sqlite3TriggerStepSrc(A,B) 0
1999219999
#endif
1999320000
1999420001
SQLITE_PRIVATE int sqlite3JoinType(Parse*, Token*, Token*, Token*);
20002
+SQLITE_PRIVATE int sqlite3ColumnIndex(Table *pTab, const char *zCol);
1999520003
SQLITE_PRIVATE void sqlite3SetJoinExpr(Expr*,int);
1999620004
SQLITE_PRIVATE void sqlite3CreateForeignKey(Parse*, ExprList*, Token*, ExprList*, int);
1999720005
SQLITE_PRIVATE void sqlite3DeferForeignKey(Parse*, int);
1999820006
#ifndef SQLITE_OMIT_AUTHORIZATION
1999920007
SQLITE_PRIVATE void sqlite3AuthRead(Parse*,Expr*,Schema*,SrcList*);
@@ -20174,10 +20182,11 @@
2017420182
SQLITE_PRIVATE int sqlite3ResolveSelfReference(Parse*,Table*,int,Expr*,ExprList*);
2017520183
SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
2017620184
SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int);
2017720185
SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *);
2017820186
SQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *, SrcList *);
20187
+SQLITE_PRIVATE void sqlite3AlterDropColumn(Parse*, SrcList*, Token*);
2017920188
SQLITE_PRIVATE void *sqlite3RenameTokenMap(Parse*, void*, Token*);
2018020189
SQLITE_PRIVATE void sqlite3RenameTokenRemap(Parse*, void *pTo, void *pFrom);
2018120190
SQLITE_PRIVATE void sqlite3RenameExprUnmap(Parse*, Expr*);
2018220191
SQLITE_PRIVATE void sqlite3RenameExprlistUnmap(Parse*, ExprList*);
2018320192
SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(Parse*, u8, CollSeq *, const char*);
@@ -78733,13 +78742,14 @@
7873378742
** as having been used.
7873478743
**
7873578744
** The zWhere string must have been obtained from sqlite3_malloc().
7873678745
** This routine will take ownership of the allocated memory.
7873778746
*/
78738
-SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere){
78747
+SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere, u16 p5){
7873978748
int j;
7874078749
sqlite3VdbeAddOp4(p, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC);
78750
+ sqlite3VdbeChangeP5(p, p5);
7874178751
for(j=0; j<p->db->nDb; j++) sqlite3VdbeUsesBtree(p, j);
7874278752
sqlite3MayAbort(p->pParse);
7874378753
}
7874478754
7874578755
/*
@@ -92185,11 +92195,11 @@
9218592195
9218692196
#ifndef SQLITE_OMIT_ALTERTABLE
9218792197
if( pOp->p4.z==0 ){
9218892198
sqlite3SchemaClear(db->aDb[iDb].pSchema);
9218992199
db->mDbFlags &= ~DBFLAG_SchemaKnownOk;
92190
- rc = sqlite3InitOne(db, iDb, &p->zErrMsg, INITFLAG_AlterTable);
92200
+ rc = sqlite3InitOne(db, iDb, &p->zErrMsg, pOp->p5);
9219192201
db->mDbFlags |= DBFLAG_SchemaChange;
9219292202
p->expired = 0;
9219392203
}else
9219492204
#endif
9219592205
{
@@ -98575,11 +98585,10 @@
9857598585
static void resolveAlias(
9857698586
Parse *pParse, /* Parsing context */
9857798587
ExprList *pEList, /* A result set */
9857898588
int iCol, /* A column in the result set. 0..pEList->nExpr-1 */
9857998589
Expr *pExpr, /* Transform this into an alias to the result set */
98580
- const char *zType, /* "GROUP" or "ORDER" or "" */
9858198590
int nSubquery /* Number of subqueries that the label is moving */
9858298591
){
9858398592
Expr *pOrig; /* The iCol-th column of the result set */
9858498593
Expr *pDup; /* Copy of pOrig */
9858598594
sqlite3 *db; /* The database connection */
@@ -98588,11 +98597,11 @@
9858898597
pOrig = pEList->a[iCol].pExpr;
9858998598
assert( pOrig!=0 );
9859098599
db = pParse->db;
9859198600
pDup = sqlite3ExprDup(db, pOrig, 0);
9859298601
if( pDup!=0 ){
98593
- if( zType[0]!='G' ) incrAggFunctionDepth(pDup, nSubquery);
98602
+ incrAggFunctionDepth(pDup, nSubquery);
9859498603
if( pExpr->op==TK_COLLATE ){
9859598604
pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);
9859698605
}
9859798606
9859898607
/* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
@@ -98873,13 +98882,14 @@
9887398882
} /* if( pSrcList ) */
9887498883
9887598884
#if !defined(SQLITE_OMIT_TRIGGER) || !defined(SQLITE_OMIT_UPSERT)
9887698885
/* If we have not already resolved the name, then maybe
9887798886
** it is a new.* or old.* trigger argument reference. Or
98878
- ** maybe it is an excluded.* from an upsert.
98887
+ ** maybe it is an excluded.* from an upsert. Or maybe it is
98888
+ ** a reference in the RETURNING clause to a table being modified.
9887998889
*/
98880
- if( cntTab==0 && zDb==0 ){
98890
+ if( cnt==0 && zDb==0 ){
9888198891
pTab = 0;
9888298892
#ifndef SQLITE_OMIT_TRIGGER
9888398893
if( pParse->pTriggerTab!=0 ){
9888498894
int op = pParse->eTriggerOp;
9888598895
assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT );
@@ -98887,18 +98897,18 @@
9888798897
pExpr->iTable = 1;
9888898898
pTab = pParse->pTriggerTab;
9888998899
}else if( op!=TK_INSERT && zTab && sqlite3StrICmp("old",zTab)==0 ){
9889098900
pExpr->iTable = 0;
9889198901
pTab = pParse->pTriggerTab;
98892
- }else if( pParse->bReturning ){
98902
+ }else if( pParse->bReturning && (pNC->ncFlags & NC_UBaseReg)!=0 ){
9889398903
pExpr->iTable = op!=TK_DELETE;
9889498904
pTab = pParse->pTriggerTab;
9889598905
}
9889698906
}
9889798907
#endif /* SQLITE_OMIT_TRIGGER */
9889898908
#ifndef SQLITE_OMIT_UPSERT
98899
- if( (pNC->ncFlags & NC_UUpsert)!=0 && ALWAYS(zTab) ){
98909
+ if( (pNC->ncFlags & NC_UUpsert)!=0 && zTab!=0 ){
9890098910
Upsert *pUpsert = pNC->uNC.pUpsert;
9890198911
if( pUpsert && sqlite3StrICmp("excluded",zTab)==0 ){
9890298912
pTab = pUpsert->pUpsertSrc->a[0].pTab;
9890398913
pExpr->iTable = EXCLUDED_TABLE_NUMBER;
9890498914
}
@@ -98941,11 +98951,11 @@
9894198951
{
9894298952
pExpr->y.pTab = pTab;
9894398953
if( pParse->bReturning ){
9894498954
eNewExprOp = TK_REGISTER;
9894598955
pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable
98946
- + iCol + 1;
98956
+ + iCol + 1;
9894798957
}else{
9894898958
pExpr->iColumn = (i16)iCol;
9894998959
eNewExprOp = TK_TRIGGER;
9895098960
#ifndef SQLITE_OMIT_TRIGGER
9895198961
if( iCol<0 ){
@@ -99028,11 +99038,11 @@
9902899038
}
9902999039
if( sqlite3ExprVectorSize(pOrig)!=1 ){
9903099040
sqlite3ErrorMsg(pParse, "row value misused");
9903199041
return WRC_Abort;
9903299042
}
99033
- resolveAlias(pParse, pEList, j, pExpr, "", nSubquery);
99043
+ resolveAlias(pParse, pEList, j, pExpr, nSubquery);
9903499044
cnt = 1;
9903599045
pMatch = 0;
9903699046
assert( zTab==0 && zDb==0 );
9903799047
if( IN_RENAME_OBJECT ){
9903899048
sqlite3RenameTokenRemap(pParse, 0, (void*)pExpr);
@@ -99130,14 +99140,16 @@
9913099140
pMatch->colUsed |= sqlite3ExprColUsed(pExpr);
9913199141
}
9913299142
9913399143
/* Clean up and return
9913499144
*/
99135
- sqlite3ExprDelete(db, pExpr->pLeft);
99136
- pExpr->pLeft = 0;
99137
- sqlite3ExprDelete(db, pExpr->pRight);
99138
- pExpr->pRight = 0;
99145
+ if( !ExprHasProperty(pExpr,(EP_TokenOnly|EP_Leaf)) ){
99146
+ sqlite3ExprDelete(db, pExpr->pLeft);
99147
+ pExpr->pLeft = 0;
99148
+ sqlite3ExprDelete(db, pExpr->pRight);
99149
+ pExpr->pRight = 0;
99150
+ }
9913999151
pExpr->op = eNewExprOp;
9914099152
ExprSetProperty(pExpr, EP_Leaf);
9914199153
lookupname_end:
9914299154
if( cnt==1 ){
9914399155
assert( pNC!=0 );
@@ -99905,12 +99917,11 @@
9990599917
if( pItem->u.x.iOrderByCol ){
9990699918
if( pItem->u.x.iOrderByCol>pEList->nExpr ){
9990799919
resolveOutOfRangeError(pParse, zType, i+1, pEList->nExpr);
9990899920
return 1;
9990999921
}
99910
- resolveAlias(pParse, pEList, pItem->u.x.iOrderByCol-1, pItem->pExpr,
99911
- zType,0);
99922
+ resolveAlias(pParse, pEList, pItem->u.x.iOrderByCol-1, pItem->pExpr,0);
9991299923
}
9991399924
}
9991499925
return 0;
9991599926
}
9991699927
@@ -100153,11 +100164,11 @@
100153100164
** aliases in the result set.
100154100165
**
100155100166
** Minor point: If this is the case, then the expression will be
100156100167
** re-evaluated for each reference to it.
100157100168
*/
100158
- assert( (sNC.ncFlags & (NC_UAggInfo|NC_UUpsert))==0 );
100169
+ assert( (sNC.ncFlags & (NC_UAggInfo|NC_UUpsert|NC_UBaseReg))==0 );
100159100170
sNC.uNC.pEList = p->pEList;
100160100171
sNC.ncFlags |= NC_UEList;
100161100172
if( sqlite3ResolveExprNames(&sNC, p->pHaving) ) return WRC_Abort;
100162100173
if( sqlite3ResolveExprNames(&sNC, p->pWhere) ) return WRC_Abort;
100163100174
@@ -106625,43 +106636,49 @@
106625106636
** bTemp is not true, database "temp", can still be parsed. This is
106626106637
** called at the end of the generation of an ALTER TABLE ... RENAME ...
106627106638
** statement to ensure that the operation has not rendered any schema
106628106639
** objects unusable.
106629106640
*/
106630
-static void renameTestSchema(Parse *pParse, const char *zDb, int bTemp){
106641
+static void renameTestSchema(
106642
+ Parse *pParse, /* Parse context */
106643
+ const char *zDb, /* Name of db to verify schema of */
106644
+ int bTemp, /* True if this is the temp db */
106645
+ const char *zWhen /* "when" part of error message */
106646
+){
106647
+ pParse->colNamesSet = 1;
106631106648
sqlite3NestedParse(pParse,
106632106649
"SELECT 1 "
106633106650
"FROM \"%w\"." DFLT_SCHEMA_TABLE " "
106634106651
"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
106635106652
" AND sql NOT LIKE 'create virtual%%'"
106636
- " AND sqlite_rename_test(%Q, sql, type, name, %d)=NULL ",
106653
+ " AND sqlite_rename_test(%Q, sql, type, name, %d, %Q)=NULL ",
106637106654
zDb,
106638
- zDb, bTemp
106655
+ zDb, bTemp, zWhen
106639106656
);
106640106657
106641106658
if( bTemp==0 ){
106642106659
sqlite3NestedParse(pParse,
106643106660
"SELECT 1 "
106644106661
"FROM temp." DFLT_SCHEMA_TABLE " "
106645106662
"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
106646106663
" AND sql NOT LIKE 'create virtual%%'"
106647
- " AND sqlite_rename_test(%Q, sql, type, name, 1)=NULL ",
106648
- zDb
106664
+ " AND sqlite_rename_test(%Q, sql, type, name, 1, %Q)=NULL ",
106665
+ zDb, zWhen
106649106666
);
106650106667
}
106651106668
}
106652106669
106653106670
/*
106654106671
** Generate code to reload the schema for database iDb. And, if iDb!=1, for
106655106672
** the temp database as well.
106656106673
*/
106657
-static void renameReloadSchema(Parse *pParse, int iDb){
106674
+static void renameReloadSchema(Parse *pParse, int iDb, u16 p5){
106658106675
Vdbe *v = pParse->pVdbe;
106659106676
if( v ){
106660106677
sqlite3ChangeCookie(pParse, iDb);
106661
- sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, iDb, 0);
106662
- if( iDb!=1 ) sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, 1, 0);
106678
+ sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, iDb, 0, p5);
106679
+ if( iDb!=1 ) sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, 1, 0, p5);
106663106680
}
106664106681
}
106665106682
106666106683
/*
106667106684
** Generate code to implement the "ALTER TABLE xxx RENAME TO yyy"
@@ -106806,11 +106823,11 @@
106806106823
sqlite3NestedParse(pParse,
106807106824
"UPDATE sqlite_temp_schema SET "
106808106825
"sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), "
106809106826
"tbl_name = "
106810106827
"CASE WHEN tbl_name=%Q COLLATE nocase AND "
106811
- " sqlite_rename_test(%Q, sql, type, name, 1) "
106828
+ " sqlite_rename_test(%Q, sql, type, name, 1, 'after rename') "
106812106829
"THEN %Q ELSE tbl_name END "
106813106830
"WHERE type IN ('view', 'trigger')"
106814106831
, zDb, zTabName, zName, zTabName, zDb, zName);
106815106832
}
106816106833
@@ -106825,12 +106842,12 @@
106825106842
sqlite3VdbeLoadString(v, i, zName);
106826106843
sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);
106827106844
}
106828106845
#endif
106829106846
106830
- renameReloadSchema(pParse, iDb);
106831
- renameTestSchema(pParse, zDb, iDb==1);
106847
+ renameReloadSchema(pParse, iDb, INITFLAG_AlterRename);
106848
+ renameTestSchema(pParse, zDb, iDb==1, "after rename");
106832106849
106833106850
exit_rename_table:
106834106851
sqlite3SrcListDelete(db, pSrc);
106835106852
sqlite3DbFree(db, zName);
106836106853
db->mDbFlags = savedDbFlags;
@@ -106988,11 +107005,11 @@
106988107005
sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, 3);
106989107006
sqlite3ReleaseTempReg(pParse, r1);
106990107007
}
106991107008
106992107009
/* Reload the table definition */
106993
- renameReloadSchema(pParse, iDb);
107010
+ renameReloadSchema(pParse, iDb, INITFLAG_AlterRename);
106994107011
}
106995107012
106996107013
/*
106997107014
** This function is called by the parser after the table-name in
106998107015
** an "ALTER TABLE <table-name> ADD" statement is parsed. Argument
@@ -107088,11 +107105,11 @@
107088107105
** it loads an error message into pParse and returns non-zero.
107089107106
**
107090107107
** Or, if pTab is not a view or virtual table, zero is returned.
107091107108
*/
107092107109
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
107093
-static int isRealTable(Parse *pParse, Table *pTab){
107110
+static int isRealTable(Parse *pParse, Table *pTab, int bDrop){
107094107111
const char *zType = 0;
107095107112
#ifndef SQLITE_OMIT_VIEW
107096107113
if( pTab->pSelect ){
107097107114
zType = "view";
107098107115
}
@@ -107101,19 +107118,20 @@
107101107118
if( IsVirtual(pTab) ){
107102107119
zType = "virtual table";
107103107120
}
107104107121
#endif
107105107122
if( zType ){
107106
- sqlite3ErrorMsg(
107107
- pParse, "cannot rename columns of %s \"%s\"", zType, pTab->zName
107123
+ sqlite3ErrorMsg(pParse, "cannot %s %s \"%s\"",
107124
+ (bDrop ? "drop column from" : "rename columns of"),
107125
+ zType, pTab->zName
107108107126
);
107109107127
return 1;
107110107128
}
107111107129
return 0;
107112107130
}
107113107131
#else /* !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) */
107114
-# define isRealTable(x,y) (0)
107132
+# define isRealTable(x,y,z) (0)
107115107133
#endif
107116107134
107117107135
/*
107118107136
** Handles the following parser reduction:
107119107137
**
@@ -107138,11 +107156,11 @@
107138107156
pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]);
107139107157
if( !pTab ) goto exit_rename_column;
107140107158
107141107159
/* Cannot alter a system table */
107142107160
if( SQLITE_OK!=isAlterableTable(pParse, pTab) ) goto exit_rename_column;
107143
- if( SQLITE_OK!=isRealTable(pParse, pTab) ) goto exit_rename_column;
107161
+ if( SQLITE_OK!=isRealTable(pParse, pTab, 0) ) goto exit_rename_column;
107144107162
107145107163
/* Which schema holds the table to be altered */
107146107164
iSchema = sqlite3SchemaToIndex(db, pTab->pSchema);
107147107165
assert( iSchema>=0 );
107148107166
zDb = db->aDb[iSchema].zDbSName;
@@ -107192,12 +107210,12 @@
107192107210
"WHERE type IN ('trigger', 'view')",
107193107211
zDb, pTab->zName, iCol, zNew, bQuote
107194107212
);
107195107213
107196107214
/* Drop and reload the database schema. */
107197
- renameReloadSchema(pParse, iSchema);
107198
- renameTestSchema(pParse, zDb, iSchema==1);
107215
+ renameReloadSchema(pParse, iSchema, INITFLAG_AlterRename);
107216
+ renameTestSchema(pParse, zDb, iSchema==1, "after rename");
107199107217
107200107218
exit_rename_column:
107201107219
sqlite3SrcListDelete(db, pSrc);
107202107220
sqlite3DbFree(db, zOld);
107203107221
sqlite3DbFree(db, zNew);
@@ -107445,27 +107463,37 @@
107445107463
}
107446107464
}
107447107465
107448107466
/*
107449107467
** Search the Parse object passed as the first argument for a RenameToken
107450
-** object associated with parse tree element pPtr. If found, remove it
107451
-** from the Parse object and add it to the list maintained by the
107452
-** RenameCtx object passed as the second argument.
107468
+** object associated with parse tree element pPtr. If found, return a pointer
107469
+** to it. Otherwise, return NULL.
107470
+**
107471
+** If the second argument passed to this function is not NULL and a matching
107472
+** RenameToken object is found, remove it from the Parse object and add it to
107473
+** the list maintained by the RenameCtx object.
107453107474
*/
107454
-static void renameTokenFind(Parse *pParse, struct RenameCtx *pCtx, void *pPtr){
107475
+static RenameToken *renameTokenFind(
107476
+ Parse *pParse,
107477
+ struct RenameCtx *pCtx,
107478
+ void *pPtr
107479
+){
107455107480
RenameToken **pp;
107456107481
assert( pPtr!=0 );
107457107482
for(pp=&pParse->pRename; (*pp); pp=&(*pp)->pNext){
107458107483
if( (*pp)->p==pPtr ){
107459107484
RenameToken *pToken = *pp;
107460
- *pp = pToken->pNext;
107461
- pToken->pNext = pCtx->pList;
107462
- pCtx->pList = pToken;
107463
- pCtx->nList++;
107464
- break;
107485
+ if( pCtx ){
107486
+ *pp = pToken->pNext;
107487
+ pToken->pNext = pCtx->pList;
107488
+ pCtx->pList = pToken;
107489
+ pCtx->nList++;
107490
+ }
107491
+ return pToken;
107465107492
}
107466107493
}
107494
+ return 0;
107467107495
}
107468107496
107469107497
/*
107470107498
** This is a Walker select callback. It does nothing. It is only required
107471107499
** because without a dummy callback, sqlite3WalkExpr() and similar do not
@@ -107532,21 +107560,21 @@
107532107560
** sub-routine is currently stored in pParse->zErrMsg. This function
107533107561
** adds context to the error message and then stores it in pCtx.
107534107562
*/
107535107563
static void renameColumnParseError(
107536107564
sqlite3_context *pCtx,
107537
- int bPost,
107565
+ const char *zWhen,
107538107566
sqlite3_value *pType,
107539107567
sqlite3_value *pObject,
107540107568
Parse *pParse
107541107569
){
107542107570
const char *zT = (const char*)sqlite3_value_text(pType);
107543107571
const char *zN = (const char*)sqlite3_value_text(pObject);
107544107572
char *zErr;
107545107573
107546
- zErr = sqlite3_mprintf("error in %s %s%s: %s",
107547
- zT, zN, (bPost ? " after rename" : ""),
107574
+ zErr = sqlite3_mprintf("error in %s %s%s%s: %s",
107575
+ zT, zN, (zWhen[0] ? " " : ""), zWhen,
107548107576
pParse->zErrMsg
107549107577
);
107550107578
sqlite3_result_error(pCtx, zErr, -1);
107551107579
sqlite3_free(zErr);
107552107580
}
@@ -107621,11 +107649,11 @@
107621107649
** trigger object, the database must be corrupt. */
107622107650
memset(p, 0, sizeof(Parse));
107623107651
p->eParseMode = PARSE_MODE_RENAME;
107624107652
p->db = db;
107625107653
p->nQueryLoop = 1;
107626
- rc = sqlite3RunParser(p, zSql, &zErr);
107654
+ rc = zSql ? sqlite3RunParser(p, zSql, &zErr) : SQLITE_NOMEM;
107627107655
assert( p->zErrMsg==0 );
107628107656
assert( rc!=SQLITE_OK || zErr==0 );
107629107657
p->zErrMsg = zErr;
107630107658
if( db->mallocFailed ) rc = SQLITE_NOMEM;
107631107659
if( rc==SQLITE_OK
@@ -108048,11 +108076,11 @@
108048108076
rc = renameEditSql(context, &sCtx, zSql, zNew, bQuote);
108049108077
108050108078
renameColumnFunc_done:
108051108079
if( rc!=SQLITE_OK ){
108052108080
if( sParse.zErrMsg ){
108053
- renameColumnParseError(context, 0, argv[1], argv[2], &sParse);
108081
+ renameColumnParseError(context, "", argv[1], argv[2], &sParse);
108054108082
}else{
108055108083
sqlite3_result_error_code(context, rc);
108056108084
}
108057108085
}
108058108086
@@ -108237,11 +108265,11 @@
108237108265
if( rc==SQLITE_OK ){
108238108266
rc = renameEditSql(context, &sCtx, zInput, zNew, bQuote);
108239108267
}
108240108268
if( rc!=SQLITE_OK ){
108241108269
if( sParse.zErrMsg ){
108242
- renameColumnParseError(context, 0, argv[1], argv[2], &sParse);
108270
+ renameColumnParseError(context, "", argv[1], argv[2], &sParse);
108243108271
}else{
108244108272
sqlite3_result_error_code(context, rc);
108245108273
}
108246108274
}
108247108275
@@ -108266,10 +108294,11 @@
108266108294
** 0: Database name ("main", "temp" etc.).
108267108295
** 1: SQL statement.
108268108296
** 2: Object type ("view", "table", "trigger" or "index").
108269108297
** 3: Object name.
108270108298
** 4: True if object is from temp schema.
108299
+** 5: "when" part of error message.
108271108300
**
108272108301
** Unless it finds an error, this function normally returns NULL. However, it
108273108302
** returns integer value 1 if:
108274108303
**
108275108304
** * the SQL argument creates a trigger, and
@@ -108283,10 +108312,11 @@
108283108312
sqlite3 *db = sqlite3_context_db_handle(context);
108284108313
char const *zDb = (const char*)sqlite3_value_text(argv[0]);
108285108314
char const *zInput = (const char*)sqlite3_value_text(argv[1]);
108286108315
int bTemp = sqlite3_value_int(argv[4]);
108287108316
int isLegacy = (db->flags & SQLITE_LegacyAlter);
108317
+ char const *zWhen = (const char*)sqlite3_value_text(argv[5]);
108288108318
108289108319
#ifndef SQLITE_OMIT_AUTHORIZATION
108290108320
sqlite3_xauth xAuth = db->xAuth;
108291108321
db->xAuth = 0;
108292108322
#endif
@@ -108315,29 +108345,222 @@
108315108345
if( i1==i2 ) sqlite3_result_int(context, 1);
108316108346
}
108317108347
}
108318108348
}
108319108349
108320
- if( rc!=SQLITE_OK ){
108321
- renameColumnParseError(context, 1, argv[2], argv[3], &sParse);
108350
+ if( rc!=SQLITE_OK && zWhen ){
108351
+ renameColumnParseError(context, zWhen, argv[2], argv[3],&sParse);
108322108352
}
108323108353
renameParseCleanup(&sParse);
108324108354
}
108325108355
108326108356
#ifndef SQLITE_OMIT_AUTHORIZATION
108327108357
db->xAuth = xAuth;
108328108358
#endif
108329108359
}
108360
+
108361
+/*
108362
+** The implementation of internal UDF sqlite_drop_column().
108363
+**
108364
+** Arguments:
108365
+**
108366
+** argv[0]: An integer - the index of the schema containing the table
108367
+** argv[1]: CREATE TABLE statement to modify.
108368
+** argv[2]: An integer - the index of the column to remove.
108369
+** argv[3]: Byte offset of first byte after last column definition in argv[1]
108370
+**
108371
+** The value returned is a string containing the CREATE TABLE statement
108372
+** with column argv[2] removed.
108373
+*/
108374
+static void dropColumnFunc(
108375
+ sqlite3_context *context,
108376
+ int NotUsed,
108377
+ sqlite3_value **argv
108378
+){
108379
+ sqlite3 *db = sqlite3_context_db_handle(context);
108380
+ int iSchema = sqlite3_value_int(argv[0]);
108381
+ const char *zSql = (const char*)sqlite3_value_text(argv[1]);
108382
+ int iCol = sqlite3_value_int(argv[2]);
108383
+ int iAddColOffset = sqlite3_value_int(argv[3]);
108384
+ const char *zDb = db->aDb[iSchema].zDbSName;
108385
+ int rc;
108386
+ Parse sParse;
108387
+ RenameToken *pCol;
108388
+ Table *pTab;
108389
+ const char *zEnd;
108390
+ char *zNew = 0;
108391
+
108392
+#ifndef SQLITE_OMIT_AUTHORIZATION
108393
+ sqlite3_xauth xAuth = db->xAuth;
108394
+ db->xAuth = 0;
108395
+#endif
108396
+
108397
+ rc = renameParseSql(&sParse, zDb, db, zSql, iSchema==1);
108398
+ if( rc!=SQLITE_OK ) goto drop_column_done;
108399
+ pTab = sParse.pNewTable;
108400
+ if( iCol>=pTab->nCol ){
108401
+ /* This can happen if the sqlite_schema table is corrupt */
108402
+ rc = SQLITE_CORRUPT_BKPT;
108403
+ goto drop_column_done;
108404
+ }
108405
+
108406
+ pCol = renameTokenFind(&sParse, 0, (void*)pTab->aCol[iCol].zName);
108407
+ if( iCol<pTab->nCol-1 ){
108408
+ RenameToken *pEnd;
108409
+ pEnd = renameTokenFind(&sParse, 0, (void*)pTab->aCol[iCol+1].zName);
108410
+ zEnd = (const char*)pEnd->t.z;
108411
+ }else{
108412
+ zEnd = (const char*)&zSql[iAddColOffset];
108413
+ while( ALWAYS(pCol->t.z[0]!=0) && pCol->t.z[0]!=',' ) pCol->t.z--;
108414
+ }
108415
+
108416
+ zNew = sqlite3MPrintf(db, "%.*s%s", pCol->t.z-zSql, zSql, zEnd);
108417
+ sqlite3_result_text(context, zNew, -1, SQLITE_TRANSIENT);
108418
+ sqlite3_free(zNew);
108419
+
108420
+drop_column_done:
108421
+ renameParseCleanup(&sParse);
108422
+#ifndef SQLITE_OMIT_AUTHORIZATION
108423
+ db->xAuth = xAuth;
108424
+#endif
108425
+ if( rc!=SQLITE_OK ){
108426
+ sqlite3_result_error_code(context, rc);
108427
+ }
108428
+}
108429
+
108430
+/*
108431
+** This function is called by the parser upon parsing an
108432
+**
108433
+** ALTER TABLE pSrc DROP COLUMN pName
108434
+**
108435
+** statement. Argument pSrc contains the possibly qualified name of the
108436
+** table being edited, and token pName the name of the column to drop.
108437
+*/
108438
+SQLITE_PRIVATE void sqlite3AlterDropColumn(Parse *pParse, SrcList *pSrc, Token *pName){
108439
+ sqlite3 *db = pParse->db; /* Database handle */
108440
+ Table *pTab; /* Table to modify */
108441
+ int iDb; /* Index of db containing pTab in aDb[] */
108442
+ const char *zDb; /* Database containing pTab ("main" etc.) */
108443
+ char *zCol = 0; /* Name of column to drop */
108444
+ int iCol; /* Index of column zCol in pTab->aCol[] */
108445
+
108446
+ /* Look up the table being altered. */
108447
+ assert( pParse->pNewTable==0 );
108448
+ assert( sqlite3BtreeHoldsAllMutexes(db) );
108449
+ if( NEVER(db->mallocFailed) ) goto exit_drop_column;
108450
+ pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]);
108451
+ if( !pTab ) goto exit_drop_column;
108452
+
108453
+ /* Make sure this is not an attempt to ALTER a view, virtual table or
108454
+ ** system table. */
108455
+ if( SQLITE_OK!=isAlterableTable(pParse, pTab) ) goto exit_drop_column;
108456
+ if( SQLITE_OK!=isRealTable(pParse, pTab, 1) ) goto exit_drop_column;
108457
+
108458
+ /* Find the index of the column being dropped. */
108459
+ zCol = sqlite3NameFromToken(db, pName);
108460
+ if( zCol==0 ){
108461
+ assert( db->mallocFailed );
108462
+ goto exit_drop_column;
108463
+ }
108464
+ iCol = sqlite3ColumnIndex(pTab, zCol);
108465
+ if( iCol<0 ){
108466
+ sqlite3ErrorMsg(pParse, "no such column: \"%s\"", zCol);
108467
+ goto exit_drop_column;
108468
+ }
108469
+
108470
+ /* Do not allow the user to drop a PRIMARY KEY column or a column
108471
+ ** constrained by a UNIQUE constraint. */
108472
+ if( pTab->aCol[iCol].colFlags & (COLFLAG_PRIMKEY|COLFLAG_UNIQUE) ){
108473
+ sqlite3ErrorMsg(pParse, "cannot drop %s column: \"%s\"",
108474
+ (pTab->aCol[iCol].colFlags&COLFLAG_PRIMKEY) ? "PRIMARY KEY" : "UNIQUE",
108475
+ zCol
108476
+ );
108477
+ goto exit_drop_column;
108478
+ }
108479
+
108480
+ /* Do not allow the number of columns to go to zero */
108481
+ if( pTab->nCol<=1 ){
108482
+ sqlite3ErrorMsg(pParse, "cannot drop column \"%s\": no other columns exist",zCol);
108483
+ goto exit_drop_column;
108484
+ }
108485
+
108486
+ /* Edit the sqlite_schema table */
108487
+ iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
108488
+ assert( iDb>=0 );
108489
+ zDb = db->aDb[iDb].zDbSName;
108490
+ renameTestSchema(pParse, zDb, iDb==1, "");
108491
+ sqlite3NestedParse(pParse,
108492
+ "UPDATE \"%w\"." DFLT_SCHEMA_TABLE " SET "
108493
+ "sql = sqlite_drop_column(%d, sql, %d, %d) "
108494
+ "WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)"
108495
+ , zDb, iDb, iCol, pTab->addColOffset, pTab->zName
108496
+ );
108497
+
108498
+ /* Drop and reload the database schema. */
108499
+ renameReloadSchema(pParse, iDb, INITFLAG_AlterDrop);
108500
+ renameTestSchema(pParse, zDb, iDb==1, "after drop column");
108501
+
108502
+ /* Edit rows of table on disk */
108503
+ if( pParse->nErr==0 && (pTab->aCol[iCol].colFlags & COLFLAG_VIRTUAL)==0 ){
108504
+ int i;
108505
+ int addr;
108506
+ int reg;
108507
+ int regRec;
108508
+ Index *pPk = 0;
108509
+ int nField = 0; /* Number of non-virtual columns after drop */
108510
+ int iCur;
108511
+ Vdbe *v = sqlite3GetVdbe(pParse);
108512
+ iCur = pParse->nTab++;
108513
+ sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenWrite);
108514
+ addr = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);
108515
+ reg = ++pParse->nMem;
108516
+ pParse->nMem += pTab->nCol;
108517
+ if( HasRowid(pTab) ){
108518
+ sqlite3VdbeAddOp2(v, OP_Rowid, iCur, reg);
108519
+ }else{
108520
+ pPk = sqlite3PrimaryKeyIndex(pTab);
108521
+ }
108522
+ for(i=0; i<pTab->nCol; i++){
108523
+ if( i!=iCol && (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0 ){
108524
+ int regOut;
108525
+ if( pPk ){
108526
+ int iPos = sqlite3TableColumnToIndex(pPk, i);
108527
+ int iColPos = sqlite3TableColumnToIndex(pPk, iCol);
108528
+ regOut = reg+1+iPos-(iPos>iColPos);
108529
+ }else{
108530
+ regOut = reg+1+nField;
108531
+ }
108532
+ sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, i, regOut);
108533
+ nField++;
108534
+ }
108535
+ }
108536
+ regRec = reg + pTab->nCol;
108537
+ sqlite3VdbeAddOp3(v, OP_MakeRecord, reg+1, nField, regRec);
108538
+ if( pPk ){
108539
+ sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iCur, regRec, reg+1, pPk->nKeyCol);
108540
+ }else{
108541
+ sqlite3VdbeAddOp3(v, OP_Insert, iCur, regRec, reg);
108542
+ }
108543
+
108544
+ sqlite3VdbeAddOp2(v, OP_Next, iCur, addr+1); VdbeCoverage(v);
108545
+ sqlite3VdbeJumpHere(v, addr);
108546
+ }
108547
+
108548
+exit_drop_column:
108549
+ sqlite3DbFree(db, zCol);
108550
+ sqlite3SrcListDelete(db, pSrc);
108551
+}
108330108552
108331108553
/*
108332108554
** Register built-in functions used to help implement ALTER TABLE
108333108555
*/
108334108556
SQLITE_PRIVATE void sqlite3AlterFunctions(void){
108335108557
static FuncDef aAlterTableFuncs[] = {
108336
- INTERNAL_FUNCTION(sqlite_rename_column, 9, renameColumnFunc),
108337
- INTERNAL_FUNCTION(sqlite_rename_table, 7, renameTableFunc),
108338
- INTERNAL_FUNCTION(sqlite_rename_test, 5, renameTableTest),
108558
+ INTERNAL_FUNCTION(sqlite_rename_column, 9, renameColumnFunc),
108559
+ INTERNAL_FUNCTION(sqlite_rename_table, 7, renameTableFunc),
108560
+ INTERNAL_FUNCTION(sqlite_rename_test, 6, renameTableTest),
108561
+ INTERNAL_FUNCTION(sqlite_drop_column, 4, dropColumnFunc),
108339108562
};
108340108563
sqlite3InsertBuiltinFuncs(aAlterTableFuncs, ArraySize(aAlterTableFuncs));
108341108564
}
108342108565
#endif /* SQLITE_ALTER_TABLE */
108343108566
@@ -111318,16 +111541,18 @@
111318111541
int i;
111319111542
int reg;
111320111543
111321111544
addrRewind =
111322111545
sqlite3VdbeAddOp1(v, OP_Rewind, pReturning->iRetCur);
111546
+ VdbeCoverage(v);
111323111547
reg = pReturning->iRetReg;
111324111548
for(i=0; i<pReturning->nRetCol; i++){
111325111549
sqlite3VdbeAddOp3(v, OP_Column, pReturning->iRetCur, i, reg+i);
111326111550
}
111327111551
sqlite3VdbeAddOp2(v, OP_ResultRow, reg, i);
111328111552
sqlite3VdbeAddOp2(v, OP_Next, pReturning->iRetCur, addrRewind+1);
111553
+ VdbeCoverage(v);
111329111554
sqlite3VdbeJumpHere(v, addrRewind);
111330111555
}
111331111556
sqlite3VdbeAddOp0(v, OP_Halt);
111332111557
111333111558
#if SQLITE_USER_AUTHENTICATION
@@ -112417,10 +112642,11 @@
112417112642
*/
112418112643
#if SQLITE_ENABLE_HIDDEN_COLUMNS
112419112644
SQLITE_PRIVATE void sqlite3ColumnPropertiesFromName(Table *pTab, Column *pCol){
112420112645
if( sqlite3_strnicmp(pCol->zName, "__hidden__", 10)==0 ){
112421112646
pCol->colFlags |= COLFLAG_HIDDEN;
112647
+ if( pTab ) pTab->tabFlags |= TF_HasHidden;
112422112648
}else if( pTab && pCol!=pTab->aCol && (pCol[-1].colFlags & COLFLAG_HIDDEN) ){
112423112649
pTab->tabFlags |= TF_OOOHidden;
112424112650
}
112425112651
}
112426112652
#endif
@@ -112461,11 +112687,15 @@
112461112687
*/
112462112688
SQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){
112463112689
Returning *pRet;
112464112690
Hash *pHash;
112465112691
sqlite3 *db = pParse->db;
112466
- assert( !pParse->bReturning );
112692
+ if( pParse->pNewTrigger ){
112693
+ sqlite3ErrorMsg(pParse, "cannot use RETURNING in a trigger");
112694
+ }else{
112695
+ assert( pParse->bReturning==0 );
112696
+ }
112467112697
pParse->bReturning = 1;
112468112698
pRet = sqlite3DbMallocZero(db, sizeof(*pRet));
112469112699
if( pRet==0 ){
112470112700
sqlite3ExprListDelete(db, pList);
112471112701
return;
@@ -112484,11 +112714,11 @@
112484112714
pRet->retTrig.step_list = &pRet->retTStep;
112485112715
pRet->retTStep.op = TK_RETURNING;
112486112716
pRet->retTStep.pTrig = &pRet->retTrig;
112487112717
pRet->retTStep.pExprList = pList;
112488112718
pHash = &(db->aDb[1].pSchema->trigHash);
112489
- assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 );
112719
+ assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 || pParse->nErr );
112490112720
if( sqlite3HashInsert(pHash, RETURNING_TRIGGER_NAME, &pRet->retTrig)
112491112721
==&pRet->retTrig ){
112492112722
sqlite3OomFault(db);
112493112723
}
112494112724
}
@@ -113789,11 +114019,11 @@
113789114019
}
113790114020
#endif
113791114021
113792114022
/* Reparse everything to update our internal data structures */
113793114023
sqlite3VdbeAddParseSchemaOp(v, iDb,
113794
- sqlite3MPrintf(db, "tbl_name='%q' AND type!='trigger'", p->zName));
114024
+ sqlite3MPrintf(db, "tbl_name='%q' AND type!='trigger'", p->zName),0);
113795114025
}
113796114026
113797114027
/* Add the table to the in-memory representation of the database.
113798114028
*/
113799114029
if( db->init.busy ){
@@ -115277,11 +115507,11 @@
115277115507
*/
115278115508
if( pTblName ){
115279115509
sqlite3RefillIndex(pParse, pIndex, iMem);
115280115510
sqlite3ChangeCookie(pParse, iDb);
115281115511
sqlite3VdbeAddParseSchemaOp(v, iDb,
115282
- sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName));
115512
+ sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName), 0);
115283115513
sqlite3VdbeAddOp2(v, OP_Expire, 0, 1);
115284115514
}
115285115515
115286115516
sqlite3VdbeJumpHere(v, (int)pIndex->tnum);
115287115517
}
@@ -118623,11 +118853,12 @@
118623118853
while( (c = Utf8Read(zPattern))!=0 ){
118624118854
if( c==matchAll ){ /* Match "*" */
118625118855
/* Skip over multiple "*" characters in the pattern. If there
118626118856
** are also "?" characters, skip those as well, but consume a
118627118857
** single character of the input string for each "?" skipped */
118628
- while( (c=Utf8Read(zPattern)) == matchAll || c == matchOne ){
118858
+ while( (c=Utf8Read(zPattern)) == matchAll
118859
+ || (c == matchOne && matchOne!=0) ){
118629118860
if( c==matchOne && sqlite3Utf8Read(&zString)==0 ){
118630118861
return SQLITE_NOWILDCARDMATCH;
118631118862
}
118632118863
}
118633118864
if( c==0 ){
@@ -122603,23 +122834,28 @@
122603122834
ipkColumn--;
122604122835
}
122605122836
}
122606122837
}
122607122838
#endif
122608
- }
122609
-
122610
- /* Make sure the number of columns in the source data matches the number
122611
- ** of columns to be inserted into the table.
122612
- */
122613
- for(i=0; i<pTab->nCol; i++){
122614
- if( pTab->aCol[i].colFlags & COLFLAG_NOINSERT ) nHidden++;
122615
- }
122616
- if( pColumn==0 && nColumn && nColumn!=(pTab->nCol-nHidden) ){
122617
- sqlite3ErrorMsg(pParse,
122618
- "table %S has %d columns but %d values were supplied",
122619
- pTabList, 0, pTab->nCol-nHidden, nColumn);
122620
- goto insert_cleanup;
122839
+
122840
+ /* Make sure the number of columns in the source data matches the number
122841
+ ** of columns to be inserted into the table.
122842
+ */
122843
+ assert( TF_HasHidden==COLFLAG_HIDDEN );
122844
+ assert( TF_HasGenerated==COLFLAG_GENERATED );
122845
+ assert( COLFLAG_NOINSERT==(COLFLAG_GENERATED|COLFLAG_HIDDEN) );
122846
+ if( (pTab->tabFlags & (TF_HasGenerated|TF_HasHidden))!=0 ){
122847
+ for(i=0; i<pTab->nCol; i++){
122848
+ if( pTab->aCol[i].colFlags & COLFLAG_NOINSERT ) nHidden++;
122849
+ }
122850
+ }
122851
+ if( nColumn!=(pTab->nCol-nHidden) ){
122852
+ sqlite3ErrorMsg(pParse,
122853
+ "table %S has %d columns but %d values were supplied",
122854
+ pTabList, 0, pTab->nCol-nHidden, nColumn);
122855
+ goto insert_cleanup;
122856
+ }
122621122857
}
122622122858
if( pColumn!=0 && nColumn!=pColumn->nId ){
122623122859
sqlite3ErrorMsg(pParse, "%d values for %d columns", nColumn, pColumn->nId);
122624122860
goto insert_cleanup;
122625122861
}
@@ -124078,10 +124314,36 @@
124078124314
}
124079124315
sqlite3VdbeChangeP5(v, i+1);
124080124316
}
124081124317
#endif
124082124318
124319
+/*
124320
+** Table pTab is a WITHOUT ROWID table that is being written to. The cursor
124321
+** number is iCur, and register regData contains the new record for the
124322
+** PK index. This function adds code to invoke the pre-update hook,
124323
+** if one is registered.
124324
+*/
124325
+#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
124326
+static void codeWithoutRowidPreupdate(
124327
+ Parse *pParse, /* Parse context */
124328
+ Table *pTab, /* Table being updated */
124329
+ int iCur, /* Cursor number for table */
124330
+ int regData /* Data containing new record */
124331
+){
124332
+ Vdbe *v = pParse->pVdbe;
124333
+ int r = sqlite3GetTempReg(pParse);
124334
+ assert( !HasRowid(pTab) );
124335
+ assert( 0==(pParse->db->mDbFlags & DBFLAG_Vacuum) );
124336
+ sqlite3VdbeAddOp2(v, OP_Integer, 0, r);
124337
+ sqlite3VdbeAddOp4(v, OP_Insert, iCur, regData, r, (char*)pTab, P4_TABLE);
124338
+ sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP);
124339
+ sqlite3ReleaseTempReg(pParse, r);
124340
+}
124341
+#else
124342
+# define codeWithoutRowidPreupdate(a,b,c,d)
124343
+#endif
124344
+
124083124345
/*
124084124346
** This routine generates code to finish the INSERT or UPDATE operation
124085124347
** that was started by a prior call to sqlite3GenerateConstraintChecks.
124086124348
** A consecutive range of registers starting at regNewData contains the
124087124349
** rowid and the content to be inserted.
@@ -124126,21 +124388,13 @@
124126124388
pik_flags = (useSeekResult ? OPFLAG_USESEEKRESULT : 0);
124127124389
if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
124128124390
assert( pParse->nested==0 );
124129124391
pik_flags |= OPFLAG_NCHANGE;
124130124392
pik_flags |= (update_flags & OPFLAG_SAVEPOSITION);
124131
-#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
124132124393
if( update_flags==0 ){
124133
- int r = sqlite3GetTempReg(pParse);
124134
- sqlite3VdbeAddOp2(v, OP_Integer, 0, r);
124135
- sqlite3VdbeAddOp4(v, OP_Insert,
124136
- iIdxCur+i, aRegIdx[i], r, (char*)pTab, P4_TABLE
124137
- );
124138
- sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP);
124139
- sqlite3ReleaseTempReg(pParse, r);
124140
- }
124141
-#endif
124394
+ codeWithoutRowidPreupdate(pParse, pTab, iIdxCur+i, aRegIdx[i]);
124395
+ }
124142124396
}
124143124397
sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iIdxCur+i, aRegIdx[i],
124144124398
aRegIdx[i]+1,
124145124399
pIdx->uniqNotNull ? pIdx->nKeyCol: pIdx->nColumn);
124146124400
sqlite3VdbeChangeP5(v, pik_flags);
@@ -124609,20 +124863,22 @@
124609124863
insFlags = OPFLAG_APPEND|OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT;
124610124864
}else{
124611124865
insFlags = OPFLAG_NCHANGE|OPFLAG_LASTROWID|OPFLAG_APPEND|OPFLAG_PREFORMAT;
124612124866
}
124613124867
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
124614
- if( db->xPreUpdateCallback ){
124868
+ if( (db->mDbFlags & DBFLAG_Vacuum)==0 ){
124615124869
sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);
124616124870
insFlags &= ~OPFLAG_PREFORMAT;
124617124871
}else
124618124872
#endif
124619124873
{
124620124874
sqlite3VdbeAddOp3(v, OP_RowCell, iDest, iSrc, regRowid);
124621124875
}
124622
- sqlite3VdbeAddOp4(v, OP_Insert, iDest, regData, regRowid,
124623
- (char*)pDest, P4_TABLE);
124876
+ sqlite3VdbeAddOp3(v, OP_Insert, iDest, regData, regRowid);
124877
+ if( (db->mDbFlags & DBFLAG_Vacuum)==0 ){
124878
+ sqlite3VdbeChangeP4(v, -1, (char*)pDest, P4_TABLE);
124879
+ }
124624124880
sqlite3VdbeChangeP5(v, insFlags);
124625124881
124626124882
sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1); VdbeCoverage(v);
124627124883
sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
124628124884
sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
@@ -124671,10 +124927,16 @@
124671124927
}else if( !HasRowid(pSrc) && pDestIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){
124672124928
idxInsFlags |= OPFLAG_NCHANGE;
124673124929
}
124674124930
if( idxInsFlags!=(OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT) ){
124675124931
sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);
124932
+ if( (db->mDbFlags & DBFLAG_Vacuum)==0
124933
+ && !HasRowid(pDest)
124934
+ && IsPrimaryKeyIndex(pDestIdx)
124935
+ ){
124936
+ codeWithoutRowidPreupdate(pParse, pDest, iDest, regData);
124937
+ }
124676124938
}
124677124939
sqlite3VdbeAddOp2(v, OP_IdxInsert, iDest, regData);
124678124940
sqlite3VdbeChangeP5(v, idxInsFlags|OPFLAG_APPEND);
124679124941
sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1); VdbeCoverage(v);
124680124942
sqlite3VdbeJumpHere(v, addr1);
@@ -129635,26 +129897,30 @@
129635129897
** Fill the InitData structure with an error message that indicates
129636129898
** that the database is corrupt.
129637129899
*/
129638129900
static void corruptSchema(
129639129901
InitData *pData, /* Initialization context */
129640
- const char *zObj, /* Object being parsed at the point of error */
129902
+ char **azObj, /* Type and name of object being parsed */
129641129903
const char *zExtra /* Error information */
129642129904
){
129643129905
sqlite3 *db = pData->db;
129644129906
if( db->mallocFailed ){
129645129907
pData->rc = SQLITE_NOMEM_BKPT;
129646129908
}else if( pData->pzErrMsg[0]!=0 ){
129647129909
/* A error message has already been generated. Do not overwrite it */
129648
- }else if( pData->mInitFlags & INITFLAG_AlterTable ){
129649
- *pData->pzErrMsg = sqlite3DbStrDup(db, zExtra);
129910
+ }else if( pData->mInitFlags & (INITFLAG_AlterRename|INITFLAG_AlterDrop) ){
129911
+ *pData->pzErrMsg = sqlite3MPrintf(db,
129912
+ "error in %s %s after %s: %s", azObj[0], azObj[1],
129913
+ (pData->mInitFlags & INITFLAG_AlterRename) ? "rename" : "drop column",
129914
+ zExtra
129915
+ );
129650129916
pData->rc = SQLITE_ERROR;
129651129917
}else if( db->flags & SQLITE_WriteSchema ){
129652129918
pData->rc = SQLITE_CORRUPT_BKPT;
129653129919
}else{
129654129920
char *z;
129655
- if( zObj==0 ) zObj = "?";
129921
+ const char *zObj = azObj[1] ? azObj[1] : "?";
129656129922
z = sqlite3MPrintf(db, "malformed database schema (%s)", zObj);
129657129923
if( zExtra && zExtra[0] ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra);
129658129924
*pData->pzErrMsg = z;
129659129925
pData->rc = SQLITE_CORRUPT_BKPT;
129660129926
}
@@ -129708,18 +129974,18 @@
129708129974
UNUSED_PARAMETER2(NotUsed, argc);
129709129975
assert( sqlite3_mutex_held(db->mutex) );
129710129976
db->mDbFlags |= DBFLAG_EncodingFixed;
129711129977
pData->nInitRow++;
129712129978
if( db->mallocFailed ){
129713
- corruptSchema(pData, argv[1], 0);
129979
+ corruptSchema(pData, argv, 0);
129714129980
return 1;
129715129981
}
129716129982
129717129983
assert( iDb>=0 && iDb<db->nDb );
129718129984
if( argv==0 ) return 0; /* Might happen if EMPTY_RESULT_CALLBACKS are on */
129719129985
if( argv[3]==0 ){
129720
- corruptSchema(pData, argv[1], 0);
129986
+ corruptSchema(pData, argv, 0);
129721129987
}else if( argv[4]
129722129988
&& 'c'==sqlite3UpperToLower[(unsigned char)argv[4][0]]
129723129989
&& 'r'==sqlite3UpperToLower[(unsigned char)argv[4][1]] ){
129724129990
/* Call the parser to process a CREATE TABLE, INDEX or VIEW.
129725129991
** But because db->init.busy is set to 1, no VDBE code is generated
@@ -129740,11 +130006,11 @@
129740130006
db->init.iDb = iDb;
129741130007
if( sqlite3GetUInt32(argv[3], &db->init.newTnum)==0
129742130008
|| (db->init.newTnum>pData->mxPage && pData->mxPage>0)
129743130009
){
129744130010
if( sqlite3Config.bExtraSchemaChecks ){
129745
- corruptSchema(pData, argv[1], "invalid rootpage");
130011
+ corruptSchema(pData, argv, "invalid rootpage");
129746130012
}
129747130013
}
129748130014
db->init.orphanTrigger = 0;
129749130015
db->init.azInit = argv;
129750130016
pStmt = 0;
@@ -129759,17 +130025,17 @@
129759130025
}else{
129760130026
if( rc > pData->rc ) pData->rc = rc;
129761130027
if( rc==SQLITE_NOMEM ){
129762130028
sqlite3OomFault(db);
129763130029
}else if( rc!=SQLITE_INTERRUPT && (rc&0xFF)!=SQLITE_LOCKED ){
129764
- corruptSchema(pData, argv[1], sqlite3_errmsg(db));
130030
+ corruptSchema(pData, argv, sqlite3_errmsg(db));
129765130031
}
129766130032
}
129767130033
}
129768130034
sqlite3_finalize(pStmt);
129769130035
}else if( argv[1]==0 || (argv[4]!=0 && argv[4][0]!=0) ){
129770
- corruptSchema(pData, argv[1], 0);
130036
+ corruptSchema(pData, argv, 0);
129771130037
}else{
129772130038
/* If the SQL column is blank it means this is an index that
129773130039
** was created to be the PRIMARY KEY or to fulfill a UNIQUE
129774130040
** constraint for a CREATE TABLE. The index should have already
129775130041
** been created when we processed the CREATE TABLE. All we have
@@ -129776,19 +130042,19 @@
129776130042
** to do here is record the root page number for that index.
129777130043
*/
129778130044
Index *pIndex;
129779130045
pIndex = sqlite3FindIndex(db, argv[1], db->aDb[iDb].zDbSName);
129780130046
if( pIndex==0 ){
129781
- corruptSchema(pData, argv[1], "orphan index");
130047
+ corruptSchema(pData, argv, "orphan index");
129782130048
}else
129783130049
if( sqlite3GetUInt32(argv[3],&pIndex->tnum)==0
129784130050
|| pIndex->tnum<2
129785130051
|| pIndex->tnum>pData->mxPage
129786130052
|| sqlite3IndexHasDuplicateRootPage(pIndex)
129787130053
){
129788130054
if( sqlite3Config.bExtraSchemaChecks ){
129789
- corruptSchema(pData, argv[1], "invalid rootpage");
130055
+ corruptSchema(pData, argv, "invalid rootpage");
129790130056
}
129791130057
}
129792130058
}
129793130059
return 0;
129794130060
}
@@ -130164,35 +130430,20 @@
130164130430
assert( i>=0 && i<db->nDb );
130165130431
}
130166130432
return i;
130167130433
}
130168130434
130169
-/*
130170
-** Deallocate a single AggInfo object
130171
-*/
130172
-static void agginfoFree(sqlite3 *db, AggInfo *p){
130173
- sqlite3DbFree(db, p->aCol);
130174
- sqlite3DbFree(db, p->aFunc);
130175
- sqlite3DbFree(db, p);
130176
-}
130177
-
130178130435
/*
130179130436
** Free all memory allocations in the pParse object
130180130437
*/
130181130438
SQLITE_PRIVATE void sqlite3ParserReset(Parse *pParse){
130182130439
sqlite3 *db = pParse->db;
130183
- AggInfo *pThis = pParse->pAggList;
130184
- while( pThis ){
130185
- AggInfo *pNext = pThis->pNext;
130186
- agginfoFree(db, pThis);
130187
- pThis = pNext;
130188
- }
130189130440
while( pParse->pCleanup ){
130190130441
ParseCleanup *pCleanup = pParse->pCleanup;
130191130442
pParse->pCleanup = pCleanup->pNext;
130192130443
pCleanup->xCleanup(db, pCleanup->pPtr);
130193
- sqlite3DbFree(db, pCleanup);
130444
+ sqlite3DbFreeNN(db, pCleanup);
130194130445
}
130195130446
sqlite3DbFree(db, pParse->aLabel);
130196130447
if( pParse->pConstExpr ){
130197130448
sqlite3ExprListDelete(db, pParse->pConstExpr);
130198130449
}
@@ -130893,11 +131144,11 @@
130893131144
130894131145
/*
130895131146
** Return the index of a column in a table. Return -1 if the column
130896131147
** is not contained in the table.
130897131148
*/
130898
-static int columnIndex(Table *pTab, const char *zCol){
131149
+SQLITE_PRIVATE int sqlite3ColumnIndex(Table *pTab, const char *zCol){
130899131150
int i;
130900131151
u8 h = sqlite3StrIHash(zCol);
130901131152
Column *pCol;
130902131153
for(pCol=pTab->aCol, i=0; i<pTab->nCol; pCol++, i++){
130903131154
if( pCol->hName==h && sqlite3StrICmp(pCol->zName, zCol)==0 ) return i;
@@ -130925,11 +131176,11 @@
130925131176
int i; /* For looping over tables in pSrc */
130926131177
int iCol; /* Index of column matching zCol */
130927131178
130928131179
assert( (piTab==0)==(piCol==0) ); /* Both or neither are NULL */
130929131180
for(i=0; i<N; i++){
130930
- iCol = columnIndex(pSrc->a[i].pTab, zCol);
131181
+ iCol = sqlite3ColumnIndex(pSrc->a[i].pTab, zCol);
130931131182
if( iCol>=0
130932131183
&& (bIgnoreHidden==0 || IsHiddenColumn(&pSrc->a[i].pTab->aCol[iCol])==0)
130933131184
){
130934131185
if( piTab ){
130935131186
*piTab = i;
@@ -131135,11 +131386,11 @@
131135131386
int iLeft; /* Table on the left with matching column name */
131136131387
int iLeftCol; /* Column number of matching column on the left */
131137131388
int iRightCol; /* Column number of matching column on the right */
131138131389
131139131390
zName = pList->a[j].zName;
131140
- iRightCol = columnIndex(pRightTab, zName);
131391
+ iRightCol = sqlite3ColumnIndex(pRightTab, zName);
131141131392
if( iRightCol<0
131142131393
|| !tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol, 0)
131143131394
){
131144131395
sqlite3ErrorMsg(pParse, "cannot join using column %s - column "
131145131396
"not present in both tables", zName);
@@ -132717,10 +132968,11 @@
132717132968
sNC.pSrcList = pSelect->pSrc;
132718132969
a = pSelect->pEList->a;
132719132970
for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
132720132971
const char *zType;
132721132972
int n, m;
132973
+ pTab->tabFlags |= (pCol->colFlags & COLFLAG_NOINSERT);
132722132974
p = a[i].pExpr;
132723132975
zType = columnType(&sNC, p, 0, 0, 0);
132724132976
/* pCol->szEst = ... // Column size est for SELECT tables never used */
132725132977
pCol->affinity = sqlite3ExprAffinity(p);
132726132978
if( zType ){
@@ -134319,11 +134571,12 @@
134319134571
** Expression walker callback used by renumberCursors() to update
134320134572
** Expr objects to match newly assigned cursor numbers.
134321134573
*/
134322134574
static int renumberCursorsCb(Walker *pWalker, Expr *pExpr){
134323134575
int *aCsrMap = pWalker->u.aiCol;
134324
- if( pExpr->op==TK_COLUMN && aCsrMap[pExpr->iTable] ){
134576
+ int op = pExpr->op;
134577
+ if( (op==TK_COLUMN || op==TK_IF_NULL_ROW) && aCsrMap[pExpr->iTable] ){
134325134578
pExpr->iTable = aCsrMap[pExpr->iTable];
134326134579
}
134327134580
if( ExprHasProperty(pExpr, EP_FromJoin) && aCsrMap[pExpr->iRightJoinTable] ){
134328134581
pExpr->iRightJoinTable = aCsrMap[pExpr->iRightJoinTable];
134329134582
}
@@ -135223,10 +135476,11 @@
135223135476
if( ExprHasProperty(pWhere,EP_FromJoin) && pWhere->iRightJoinTable!=iCursor ){
135224135477
return 0; /* restriction (5) */
135225135478
}
135226135479
if( sqlite3ExprIsTableConstant(pWhere, iCursor) ){
135227135480
nChng++;
135481
+ pSubq->selFlags |= SF_PushDown;
135228135482
while( pSubq ){
135229135483
SubstContext x;
135230135484
pNew = sqlite3ExprDup(pParse->db, pWhere, 0);
135231135485
unsetJoinExpr(pNew, -1);
135232135486
x.pParse = pParse;
@@ -136395,10 +136649,12 @@
136395136649
static struct SrcList_item *isSelfJoinView(
136396136650
SrcList *pTabList, /* Search for self-joins in this FROM clause */
136397136651
struct SrcList_item *pThis /* Search for prior reference to this subquery */
136398136652
){
136399136653
struct SrcList_item *pItem;
136654
+ assert( pThis->pSelect!=0 );
136655
+ if( pThis->pSelect->selFlags & SF_PushDown ) return 0;
136400136656
for(pItem = pTabList->a; pItem<pThis; pItem++){
136401136657
Select *pS1;
136402136658
if( pItem->pSelect==0 ) continue;
136403136659
if( pItem->fg.viaCoroutine ) continue;
136404136660
if( pItem->zName==0 ) continue;
@@ -136410,21 +136666,28 @@
136410136666
if( pItem->pTab->pSchema==0 && pThis->pSelect->selId!=pS1->selId ){
136411136667
/* The query flattener left two different CTE tables with identical
136412136668
** names in the same FROM clause. */
136413136669
continue;
136414136670
}
136415
- if( sqlite3ExprCompare(0, pThis->pSelect->pWhere, pS1->pWhere, -1)
136416
- || sqlite3ExprCompare(0, pThis->pSelect->pHaving, pS1->pHaving, -1)
136417
- ){
136671
+ if( pItem->pSelect->selFlags & SF_PushDown ){
136418136672
/* The view was modified by some other optimization such as
136419136673
** pushDownWhereTerms() */
136420136674
continue;
136421136675
}
136422136676
return pItem;
136423136677
}
136424136678
return 0;
136425136679
}
136680
+
136681
+/*
136682
+** Deallocate a single AggInfo object
136683
+*/
136684
+static void agginfoFree(sqlite3 *db, AggInfo *p){
136685
+ sqlite3DbFree(db, p->aCol);
136686
+ sqlite3DbFree(db, p->aFunc);
136687
+ sqlite3DbFreeNN(db, p);
136688
+}
136426136689
136427136690
#ifdef SQLITE_COUNTOFVIEW_OPTIMIZATION
136428136691
/*
136429136692
** Attempt to transform a query of the form
136430136693
**
@@ -136833,10 +137096,11 @@
136833137096
SELECTTRACE(0x100,pParse,p,
136834137097
("After WHERE-clause push-down into subquery %d:\n", pSub->selId));
136835137098
sqlite3TreeViewSelect(0, p, 0);
136836137099
}
136837137100
#endif
137101
+ assert( pItem->pSelect && (pItem->pSelect->selFlags & SF_PushDown)!=0 );
136838137102
}else{
136839137103
SELECTTRACE(0x100,pParse,p,("Push-down not possible\n"));
136840137104
}
136841137105
136842137106
zSavedAuthContext = pParse->zAuthContext;
@@ -137055,10 +137319,11 @@
137055137319
sSort.labelOBLopt = sqlite3WhereOrderByLimitOptLabel(pWInfo);
137056137320
if( sSort.nOBSat==sSort.pOrderBy->nExpr ){
137057137321
sSort.pOrderBy = 0;
137058137322
}
137059137323
}
137324
+ SELECTTRACE(1,pParse,p,("WhereBegin returns\n"));
137060137325
137061137326
/* If sorting index that was created by a prior OP_OpenEphemeral
137062137327
** instruction ended up not being needed, then change the OP_OpenEphemeral
137063137328
** into an OP_Noop.
137064137329
*/
@@ -137093,10 +137358,11 @@
137093137358
sqlite3WhereContinueLabel(pWInfo),
137094137359
sqlite3WhereBreakLabel(pWInfo));
137095137360
137096137361
/* End the database scan loop.
137097137362
*/
137363
+ SELECTTRACE(1,pParse,p,("WhereEnd\n"));
137098137364
sqlite3WhereEnd(pWInfo);
137099137365
}
137100137366
}else{
137101137367
/* This case when there exist aggregate functions or a GROUP BY clause
137102137368
** or both */
@@ -137163,15 +137429,17 @@
137163137429
/* Convert TK_COLUMN nodes into TK_AGG_COLUMN and make entries in
137164137430
** sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the
137165137431
** SELECT statement.
137166137432
*/
137167137433
pAggInfo = sqlite3DbMallocZero(db, sizeof(*pAggInfo) );
137168
- if( pAggInfo==0 ){
137434
+ if( pAggInfo ){
137435
+ sqlite3ParserAddCleanup(pParse,
137436
+ (void(*)(sqlite3*,void*))agginfoFree, pAggInfo);
137437
+ }
137438
+ if( db->mallocFailed ){
137169137439
goto select_end;
137170137440
}
137171
- pAggInfo->pNext = pParse->pAggList;
137172
- pParse->pAggList = pAggInfo;
137173137441
pAggInfo->selId = p->selId;
137174137442
memset(&sNC, 0, sizeof(sNC));
137175137443
sNC.pParse = pParse;
137176137444
sNC.pSrcList = pTabList;
137177137445
sNC.uNC.pAggInfo = pAggInfo;
@@ -137286,10 +137554,11 @@
137286137554
SELECTTRACE(1,pParse,p,("WhereBegin\n"));
137287137555
pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pGroupBy, 0,
137288137556
WHERE_GROUPBY | (orderByGrp ? WHERE_SORTBYGROUP : 0), 0
137289137557
);
137290137558
if( pWInfo==0 ) goto select_end;
137559
+ SELECTTRACE(1,pParse,p,("WhereBegin returns\n"));
137291137560
if( sqlite3WhereIsOrdered(pWInfo)==pGroupBy->nExpr ){
137292137561
/* The optimizer is able to deliver rows in group by order so
137293137562
** we do not have to sort. The OP_OpenEphemeral table will be
137294137563
** cancelled later because we still need to use the pKeyInfo
137295137564
*/
@@ -137334,10 +137603,11 @@
137334137603
regRecord = sqlite3GetTempReg(pParse);
137335137604
sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regRecord);
137336137605
sqlite3VdbeAddOp2(v, OP_SorterInsert, pAggInfo->sortingIdx, regRecord);
137337137606
sqlite3ReleaseTempReg(pParse, regRecord);
137338137607
sqlite3ReleaseTempRange(pParse, regBase, nCol);
137608
+ SELECTTRACE(1,pParse,p,("WhereEnd\n"));
137339137609
sqlite3WhereEnd(pWInfo);
137340137610
pAggInfo->sortingIdxPTab = sortPTab = pParse->nTab++;
137341137611
sortOut = sqlite3GetTempReg(pParse);
137342137612
sqlite3VdbeAddOp3(v, OP_OpenPseudo, sortPTab, sortOut, nCol);
137343137613
sqlite3VdbeAddOp2(v, OP_SorterSort, pAggInfo->sortingIdx, addrEnd);
@@ -137411,10 +137681,11 @@
137411137681
*/
137412137682
if( groupBySort ){
137413137683
sqlite3VdbeAddOp2(v, OP_SorterNext, pAggInfo->sortingIdx,addrTopOfLoop);
137414137684
VdbeCoverage(v);
137415137685
}else{
137686
+ SELECTTRACE(1,pParse,p,("WhereEnd\n"));
137416137687
sqlite3WhereEnd(pWInfo);
137417137688
sqlite3VdbeChangeToNoop(v, addrSortingIdx);
137418137689
}
137419137690
137420137691
/* Output the final row of result
@@ -137566,15 +137837,17 @@
137566137837
pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pMinMaxOrderBy,
137567137838
0, minMaxFlag, 0);
137568137839
if( pWInfo==0 ){
137569137840
goto select_end;
137570137841
}
137842
+ SELECTTRACE(1,pParse,p,("WhereBegin returns\n"));
137571137843
updateAccumulator(pParse, regAcc, pAggInfo);
137572137844
if( regAcc ) sqlite3VdbeAddOp2(v, OP_Integer, 1, regAcc);
137573137845
if( minMaxFlag ){
137574137846
sqlite3WhereMinMaxOptEarlyOut(v, pWInfo);
137575137847
}
137848
+ SELECTTRACE(1,pParse,p,("WhereEnd\n"));
137576137849
sqlite3WhereEnd(pWInfo);
137577137850
finalizeAggFunctions(pParse, pAggInfo);
137578137851
}
137579137852
137580137853
sSort.pOrderBy = 0;
@@ -138199,11 +138472,11 @@
138199138472
db->aDb[iDb].zDbSName, zName,
138200138473
pTrig->table, z);
138201138474
sqlite3DbFree(db, z);
138202138475
sqlite3ChangeCookie(pParse, iDb);
138203138476
sqlite3VdbeAddParseSchemaOp(v, iDb,
138204
- sqlite3MPrintf(db, "type='trigger' AND name='%q'", zName));
138477
+ sqlite3MPrintf(db, "type='trigger' AND name='%q'", zName), 0);
138205138478
}
138206138479
138207138480
if( db->init.busy ){
138208138481
Trigger *pLink = pTrig;
138209138482
Hash *pHash = &db->aDb[iDb].pSchema->trigHash;
@@ -141764,11 +142037,11 @@
141764142037
v = sqlite3GetVdbe(pParse);
141765142038
sqlite3ChangeCookie(pParse, iDb);
141766142039
141767142040
sqlite3VdbeAddOp0(v, OP_Expire);
141768142041
zWhere = sqlite3MPrintf(db, "name=%Q AND sql=%Q", pTab->zName, zStmt);
141769
- sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere);
142042
+ sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere, 0);
141770142043
sqlite3DbFree(db, zStmt);
141771142044
141772142045
iReg = ++pParse->nMem;
141773142046
sqlite3VdbeLoadString(v, iReg, pTab->zName);
141774142047
sqlite3VdbeAddOp2(v, OP_VCreate, iDb, iReg);
@@ -141935,10 +142208,11 @@
141935142208
if( zType[i]=='\0' && i>0 ){
141936142209
assert(zType[i-1]==' ');
141937142210
zType[i-1] = '\0';
141938142211
}
141939142212
pTab->aCol[iCol].colFlags |= COLFLAG_HIDDEN;
142213
+ pTab->tabFlags |= TF_HasHidden;
141940142214
oooHidden = TF_OOOHidden;
141941142215
}else{
141942142216
pTab->tabFlags |= oooHidden;
141943142217
}
141944142218
}
@@ -156754,22 +157028,22 @@
156754157028
#define sqlite3ParserCTX_PDECL ,Parse *pParse
156755157029
#define sqlite3ParserCTX_PARAM ,pParse
156756157030
#define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
156757157031
#define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
156758157032
#define YYFALLBACK 1
156759
-#define YYNSTATE 571
156760
-#define YYNRULE 393
156761
-#define YYNRULE_WITH_ACTION 332
157033
+#define YYNSTATE 573
157034
+#define YYNRULE 394
157035
+#define YYNRULE_WITH_ACTION 333
156762157036
#define YYNTOKEN 182
156763
-#define YY_MAX_SHIFT 570
156764
-#define YY_MIN_SHIFTREDUCE 822
156765
-#define YY_MAX_SHIFTREDUCE 1214
156766
-#define YY_ERROR_ACTION 1215
156767
-#define YY_ACCEPT_ACTION 1216
156768
-#define YY_NO_ACTION 1217
156769
-#define YY_MIN_REDUCE 1218
156770
-#define YY_MAX_REDUCE 1610
157037
+#define YY_MAX_SHIFT 572
157038
+#define YY_MIN_SHIFTREDUCE 825
157039
+#define YY_MAX_SHIFTREDUCE 1218
157040
+#define YY_ERROR_ACTION 1219
157041
+#define YY_ACCEPT_ACTION 1220
157042
+#define YY_NO_ACTION 1221
157043
+#define YY_MIN_REDUCE 1222
157044
+#define YY_MAX_REDUCE 1615
156771157045
/************* End control #defines *******************************************/
156772157046
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
156773157047
156774157048
/* Define the yytestcase() macro to be a no-op if is not already defined
156775157049
** otherwise.
@@ -156834,212 +157108,212 @@
156834157108
** yy_default[] Default action for each state.
156835157109
**
156836157110
*********** Begin parsing tables **********************************************/
156837157111
#define YY_ACTTAB_COUNT (2017)
156838157112
static const YYACTIONTYPE yy_action[] = {
156839
- /* 0 */ 564, 1249, 564, 197, 1571, 564, 1252, 564, 116, 113,
156840
- /* 10 */ 218, 564, 1259, 564, 486, 393, 116, 113, 218, 405,
156841
- /* 20 */ 357, 357, 42, 42, 42, 42, 469, 42, 42, 72,
156842
- /* 30 */ 72, 956, 1251, 72, 72, 72, 72, 1496, 1576, 957,
156843
- /* 40 */ 9, 886, 251, 123, 124, 114, 1192, 1192, 1032, 1035,
156844
- /* 50 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 445, 405,
156845
- /* 60 */ 471, 1551, 570, 2, 1220, 1577, 546, 145, 147, 305,
156846
- /* 70 */ 546, 138, 546, 1292, 1292, 522, 564, 1189, 1300, 545,
156847
- /* 80 */ 521, 511, 167, 123, 124, 114, 1192, 1192, 1032, 1035,
156848
- /* 90 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 72, 72,
156849
- /* 100 */ 281, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156850
- /* 110 */ 117, 438, 273, 273, 273, 273, 443, 1168, 1532, 371,
156851
- /* 120 */ 1534, 1168, 370, 1532, 535, 561, 1140, 561, 1140, 405,
156852
- /* 130 */ 1075, 248, 215, 1189, 174, 527, 100, 304, 555, 228,
156853
- /* 140 */ 438, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156854
- /* 150 */ 117, 438, 448, 123, 124, 114, 1192, 1192, 1032, 1035,
156855
- /* 160 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 541, 448,
156856
- /* 170 */ 447, 442, 1168, 1169, 1170, 395, 1168, 1169, 1170, 125,
157113
+ /* 0 */ 566, 1253, 566, 197, 1576, 566, 1256, 566, 116, 113,
157114
+ /* 10 */ 218, 566, 1263, 566, 488, 395, 116, 113, 218, 407,
157115
+ /* 20 */ 359, 359, 42, 42, 42, 42, 471, 42, 42, 72,
157116
+ /* 30 */ 72, 959, 1255, 72, 72, 72, 72, 1500, 1581, 960,
157117
+ /* 40 */ 9, 889, 252, 123, 124, 114, 1196, 1196, 1035, 1038,
157118
+ /* 50 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 415, 407,
157119
+ /* 60 */ 473, 1556, 572, 2, 1224, 1582, 548, 145, 147, 306,
157120
+ /* 70 */ 548, 138, 548, 1296, 1296, 524, 566, 1193, 1304, 547,
157121
+ /* 80 */ 523, 513, 167, 123, 124, 114, 1196, 1196, 1035, 1038,
157122
+ /* 90 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 72, 72,
157123
+ /* 100 */ 282, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157124
+ /* 110 */ 117, 441, 274, 274, 274, 274, 446, 1172, 1537, 373,
157125
+ /* 120 */ 1539, 1172, 372, 1537, 537, 563, 1144, 563, 1144, 407,
157126
+ /* 130 */ 1078, 249, 215, 1193, 174, 529, 100, 305, 557, 229,
157127
+ /* 140 */ 441, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157128
+ /* 150 */ 117, 441, 450, 123, 124, 114, 1196, 1196, 1035, 1038,
157129
+ /* 160 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 543, 450,
157130
+ /* 170 */ 449, 445, 1172, 1173, 1174, 397, 1172, 1173, 1174, 125,
156857157131
/* 180 */ 120, 120, 120, 120, 119, 119, 118, 118, 118, 117,
156858
- /* 190 */ 438, 119, 119, 118, 118, 118, 117, 438, 268, 405,
156859
- /* 200 */ 1548, 122, 122, 122, 122, 115, 379, 84, 375, 273,
156860
- /* 210 */ 273, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156861
- /* 220 */ 117, 438, 561, 123, 124, 114, 1192, 1192, 1032, 1035,
156862
- /* 230 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 405, 467,
156863
- /* 240 */ 1118, 1604, 448, 82, 1604, 460, 329, 81, 120, 120,
156864
- /* 250 */ 120, 120, 119, 119, 118, 118, 118, 117, 438, 116,
156865
- /* 260 */ 113, 218, 123, 124, 114, 1192, 1192, 1032, 1035, 1025,
156866
- /* 270 */ 1025, 121, 121, 122, 122, 122, 122, 564, 542, 1519,
156867
- /* 280 */ 877, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156868
- /* 290 */ 117, 438, 118, 118, 118, 117, 438, 12, 197, 71,
156869
- /* 300 */ 71, 1135, 122, 122, 122, 122, 384, 405, 428, 1168,
156870
- /* 310 */ 398, 503, 531, 347, 1135, 166, 312, 1135, 1116, 878,
157132
+ /* 190 */ 441, 119, 119, 118, 118, 118, 117, 441, 269, 407,
157133
+ /* 200 */ 1553, 122, 122, 122, 122, 115, 381, 84, 377, 274,
157134
+ /* 210 */ 274, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157135
+ /* 220 */ 117, 441, 563, 123, 124, 114, 1196, 1196, 1035, 1038,
157136
+ /* 230 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 407, 469,
157137
+ /* 240 */ 1122, 1609, 450, 82, 1609, 462, 331, 81, 120, 120,
157138
+ /* 250 */ 120, 120, 119, 119, 118, 118, 118, 117, 441, 116,
157139
+ /* 260 */ 113, 218, 123, 124, 114, 1196, 1196, 1035, 1038, 1028,
157140
+ /* 270 */ 1028, 121, 121, 122, 122, 122, 122, 566, 544, 1524,
157141
+ /* 280 */ 880, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157142
+ /* 290 */ 117, 441, 118, 118, 118, 117, 441, 12, 197, 71,
157143
+ /* 300 */ 71, 1139, 122, 122, 122, 122, 386, 407, 431, 1172,
157144
+ /* 310 */ 400, 505, 533, 349, 1139, 166, 314, 1139, 1120, 881,
156871157145
/* 320 */ 120, 120, 120, 120, 119, 119, 118, 118, 118, 117,
156872
- /* 330 */ 438, 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025,
156873
- /* 340 */ 121, 121, 122, 122, 122, 122, 1168, 267, 267, 120,
156874
- /* 350 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438,
156875
- /* 360 */ 561, 378, 1012, 1135, 1168, 1169, 1170, 240, 530, 563,
156876
- /* 370 */ 499, 496, 495, 426, 538, 476, 1135, 1527, 1003, 1135,
156877
- /* 380 */ 494, 6, 1002, 1392, 502, 1022, 1022, 1033, 1036, 120,
156878
- /* 390 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438,
156879
- /* 400 */ 425, 1168, 1169, 1170, 1096, 1460, 259, 276, 355, 505,
156880
- /* 410 */ 350, 504, 245, 405, 1002, 1002, 1004, 343, 346, 1097,
156881
- /* 420 */ 240, 460, 329, 499, 496, 495, 369, 510, 1526, 357,
156882
- /* 430 */ 529, 358, 6, 494, 1098, 450, 203, 123, 124, 114,
156883
- /* 440 */ 1192, 1192, 1032, 1035, 1025, 1025, 121, 121, 122, 122,
156884
- /* 450 */ 122, 122, 520, 419, 1168, 897, 405, 569, 1026, 1220,
156885
- /* 460 */ 500, 319, 1270, 992, 305, 898, 138, 188, 1287, 423,
156886
- /* 470 */ 1266, 167, 486, 1300, 16, 16, 144, 857, 1287, 1269,
156887
- /* 480 */ 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025, 121,
157146
+ /* 330 */ 441, 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028,
157147
+ /* 340 */ 121, 121, 122, 122, 122, 122, 1172, 268, 268, 120,
157148
+ /* 350 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441,
157149
+ /* 360 */ 563, 380, 1015, 1139, 1172, 1173, 1174, 241, 532, 565,
157150
+ /* 370 */ 501, 498, 497, 429, 540, 478, 1139, 1532, 1006, 1139,
157151
+ /* 380 */ 496, 6, 1005, 1396, 504, 1025, 1025, 1036, 1039, 120,
157152
+ /* 390 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441,
157153
+ /* 400 */ 428, 1172, 1173, 1174, 1099, 1464, 260, 277, 357, 507,
157154
+ /* 410 */ 352, 506, 246, 407, 1005, 1005, 1007, 345, 348, 1100,
157155
+ /* 420 */ 241, 462, 331, 501, 498, 497, 371, 512, 1531, 359,
157156
+ /* 430 */ 531, 360, 6, 496, 1101, 452, 203, 123, 124, 114,
157157
+ /* 440 */ 1196, 1196, 1035, 1038, 1028, 1028, 121, 121, 122, 122,
157158
+ /* 450 */ 122, 122, 522, 422, 1172, 900, 407, 571, 1029, 1224,
157159
+ /* 460 */ 502, 321, 1274, 995, 306, 901, 138, 188, 1291, 426,
157160
+ /* 470 */ 1270, 167, 488, 1304, 16, 16, 144, 860, 1291, 1273,
157161
+ /* 480 */ 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028, 121,
156888157162
/* 490 */ 121, 122, 122, 122, 122, 120, 120, 120, 120, 119,
156889
- /* 500 */ 119, 118, 118, 118, 117, 438, 526, 273, 273, 1168,
156890
- /* 510 */ 1169, 1170, 1392, 564, 166, 327, 1495, 1012, 414, 372,
156891
- /* 520 */ 561, 486, 316, 1168, 318, 405, 304, 555, 373, 861,
156892
- /* 530 */ 182, 216, 857, 1003, 228, 72, 72, 1002, 120, 120,
156893
- /* 540 */ 120, 120, 119, 119, 118, 118, 118, 117, 438, 123,
156894
- /* 550 */ 124, 114, 1192, 1192, 1032, 1035, 1025, 1025, 121, 121,
156895
- /* 560 */ 122, 122, 122, 122, 405, 1459, 442, 1168, 854, 1002,
156896
- /* 570 */ 1002, 1004, 300, 1524, 116, 113, 218, 6, 1168, 1169,
156897
- /* 580 */ 1170, 183, 420, 116, 113, 218, 1168, 314, 123, 124,
156898
- /* 590 */ 114, 1192, 1192, 1032, 1035, 1025, 1025, 121, 121, 122,
156899
- /* 600 */ 122, 122, 122, 1465, 317, 943, 469, 120, 120, 120,
156900
- /* 610 */ 120, 119, 119, 118, 118, 118, 117, 438, 1168, 211,
156901
- /* 620 */ 1465, 1467, 1168, 1169, 1170, 917, 539, 1526, 475, 1168,
156902
- /* 630 */ 916, 6, 1168, 405, 922, 435, 434, 1153, 213, 509,
156903
- /* 640 */ 32, 1168, 1169, 1170, 279, 5, 120, 120, 120, 120,
156904
- /* 650 */ 119, 119, 118, 118, 118, 117, 438, 123, 124, 114,
156905
- /* 660 */ 1192, 1192, 1032, 1035, 1025, 1025, 121, 121, 122, 122,
156906
- /* 670 */ 122, 122, 405, 1168, 1169, 1170, 1013, 1168, 273, 273,
156907
- /* 680 */ 286, 1199, 1168, 1199, 1168, 1169, 1170, 1168, 1169, 1170,
156908
- /* 690 */ 564, 561, 167, 1465, 117, 438, 123, 124, 114, 1192,
156909
- /* 700 */ 1192, 1032, 1035, 1025, 1025, 121, 121, 122, 122, 122,
156910
- /* 710 */ 122, 942, 13, 13, 127, 120, 120, 120, 120, 119,
156911
- /* 720 */ 119, 118, 118, 118, 117, 438, 285, 417, 564, 449,
156912
- /* 730 */ 564, 1392, 1168, 1169, 1170, 1290, 1290, 1168, 1169, 1170,
156913
- /* 740 */ 97, 405, 992, 1606, 391, 997, 486, 304, 555, 17,
157163
+ /* 500 */ 119, 118, 118, 118, 117, 441, 528, 274, 274, 1172,
157164
+ /* 510 */ 1173, 1174, 1396, 566, 166, 329, 1499, 1015, 417, 374,
157165
+ /* 520 */ 563, 488, 318, 1172, 320, 407, 305, 557, 375, 864,
157166
+ /* 530 */ 182, 216, 860, 1006, 229, 72, 72, 1005, 120, 120,
157167
+ /* 540 */ 120, 120, 119, 119, 118, 118, 118, 117, 441, 123,
157168
+ /* 550 */ 124, 114, 1196, 1196, 1035, 1038, 1028, 1028, 121, 121,
157169
+ /* 560 */ 122, 122, 122, 122, 407, 1463, 445, 1172, 857, 1005,
157170
+ /* 570 */ 1005, 1007, 301, 1529, 116, 113, 218, 6, 1172, 1173,
157171
+ /* 580 */ 1174, 183, 423, 116, 113, 218, 1172, 316, 123, 124,
157172
+ /* 590 */ 114, 1196, 1196, 1035, 1038, 1028, 1028, 121, 121, 122,
157173
+ /* 600 */ 122, 122, 122, 1469, 319, 946, 471, 120, 120, 120,
157174
+ /* 610 */ 120, 119, 119, 118, 118, 118, 117, 441, 1172, 211,
157175
+ /* 620 */ 1469, 1471, 1172, 1173, 1174, 920, 541, 1531, 477, 1172,
157176
+ /* 630 */ 919, 6, 1172, 407, 925, 438, 437, 1157, 213, 511,
157177
+ /* 640 */ 32, 1172, 1173, 1174, 280, 5, 120, 120, 120, 120,
157178
+ /* 650 */ 119, 119, 118, 118, 118, 117, 441, 123, 124, 114,
157179
+ /* 660 */ 1196, 1196, 1035, 1038, 1028, 1028, 121, 121, 122, 122,
157180
+ /* 670 */ 122, 122, 407, 1172, 1173, 1174, 1016, 1172, 274, 274,
157181
+ /* 680 */ 287, 1203, 1172, 1203, 1172, 1173, 1174, 1172, 1173, 1174,
157182
+ /* 690 */ 566, 563, 167, 1469, 117, 441, 123, 124, 114, 1196,
157183
+ /* 700 */ 1196, 1035, 1038, 1028, 1028, 121, 121, 122, 122, 122,
157184
+ /* 710 */ 122, 945, 13, 13, 127, 120, 120, 120, 120, 119,
157185
+ /* 720 */ 119, 118, 118, 118, 117, 441, 286, 420, 566, 451,
157186
+ /* 730 */ 566, 1396, 1172, 1173, 1174, 1294, 1294, 1172, 1173, 1174,
157187
+ /* 740 */ 97, 407, 995, 1611, 393, 1000, 488, 305, 557, 17,
156914157188
/* 750 */ 72, 72, 72, 72, 120, 120, 120, 120, 119, 119,
156915
- /* 760 */ 118, 118, 118, 117, 438, 123, 124, 114, 1192, 1192,
156916
- /* 770 */ 1032, 1035, 1025, 1025, 121, 121, 122, 122, 122, 122,
156917
- /* 780 */ 405, 1216, 1, 1, 570, 2, 1220, 301, 415, 433,
156918
- /* 790 */ 1299, 305, 839, 138, 327, 455, 315, 402, 401, 564,
156919
- /* 800 */ 1300, 421, 3, 290, 123, 124, 114, 1192, 1192, 1032,
156920
- /* 810 */ 1035, 1025, 1025, 121, 121, 122, 122, 122, 122, 377,
156921
- /* 820 */ 564, 13, 13, 120, 120, 120, 120, 119, 119, 118,
156922
- /* 830 */ 118, 118, 117, 438, 273, 273, 422, 273, 273, 1168,
156923
- /* 840 */ 1304, 357, 13, 13, 1118, 1605, 12, 561, 1605, 405,
156924
- /* 850 */ 561, 458, 561, 1168, 558, 558, 558, 424, 436, 436,
156925
- /* 860 */ 436, 228, 120, 120, 120, 120, 119, 119, 118, 118,
156926
- /* 870 */ 118, 117, 438, 123, 124, 114, 1192, 1192, 1032, 1035,
156927
- /* 880 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 146, 197,
156928
- /* 890 */ 414, 564, 1055, 442, 1168, 1169, 1170, 414, 469, 435,
156929
- /* 900 */ 434, 404, 562, 247, 911, 911, 564, 1196, 1168, 1169,
156930
- /* 910 */ 1170, 486, 1198, 72, 72, 491, 1507, 547, 102, 194,
156931
- /* 920 */ 1197, 564, 1116, 294, 459, 294, 1298, 251, 72, 72,
156932
- /* 930 */ 1452, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156933
- /* 940 */ 117, 438, 244, 56, 56, 1199, 564, 1199, 564, 1238,
156934
- /* 950 */ 437, 273, 273, 564, 514, 1295, 564, 512, 564, 282,
156935
- /* 960 */ 273, 273, 1189, 517, 561, 546, 284, 341, 52, 52,
156936
- /* 970 */ 13, 13, 289, 561, 548, 13, 13, 564, 13, 13,
156937
- /* 980 */ 13, 13, 549, 273, 273, 293, 1407, 105, 273, 273,
156938
- /* 990 */ 191, 273, 273, 192, 444, 543, 561, 273, 273, 57,
156939
- /* 1000 */ 57, 561, 274, 274, 561, 513, 1504, 405, 270, 410,
156940
- /* 1010 */ 561, 941, 198, 304, 555, 561, 273, 273, 1189, 106,
156941
- /* 1020 */ 409, 104, 356, 1545, 307, 346, 564, 405, 336, 561,
156942
- /* 1030 */ 339, 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025,
156943
- /* 1040 */ 121, 121, 122, 122, 122, 122, 469, 405, 15, 15,
156944
- /* 1050 */ 475, 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025,
156945
- /* 1060 */ 121, 121, 122, 122, 122, 122, 1080, 1080, 483, 358,
156946
- /* 1070 */ 475, 123, 112, 114, 1192, 1192, 1032, 1035, 1025, 1025,
156947
- /* 1080 */ 121, 121, 122, 122, 122, 122, 390, 1212, 308, 120,
156948
- /* 1090 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438,
156949
- /* 1100 */ 99, 217, 480, 1172, 1406, 564, 477, 430, 541, 120,
156950
- /* 1110 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438,
156951
- /* 1120 */ 291, 1077, 564, 1392, 564, 1077, 941, 44, 44, 120,
156952
- /* 1130 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438,
156953
- /* 1140 */ 356, 1545, 537, 1096, 58, 58, 45, 45, 326, 405,
156954
- /* 1150 */ 1135, 827, 828, 829, 243, 242, 241, 481, 1097, 1172,
156955
- /* 1160 */ 1392, 536, 311, 1135, 1213, 486, 1135, 564, 292, 405,
156956
- /* 1170 */ 1146, 1241, 411, 1098, 124, 114, 1192, 1192, 1032, 1035,
156957
- /* 1180 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 564, 59,
156958
- /* 1190 */ 59, 564, 507, 482, 552, 114, 1192, 1192, 1032, 1035,
156959
- /* 1200 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 1525, 334,
156960
- /* 1210 */ 60, 60, 6, 61, 61, 390, 1117, 1523, 917, 1520,
156961
- /* 1220 */ 1146, 6, 564, 916, 564, 109, 556, 564, 4, 941,
156962
- /* 1230 */ 431, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156963
- /* 1240 */ 117, 438, 559, 864, 62, 62, 63, 63, 564, 46,
157189
+ /* 760 */ 118, 118, 118, 117, 441, 123, 124, 114, 1196, 1196,
157190
+ /* 770 */ 1035, 1038, 1028, 1028, 121, 121, 122, 122, 122, 122,
157191
+ /* 780 */ 407, 1220, 1, 1, 572, 2, 1224, 302, 418, 436,
157192
+ /* 790 */ 1303, 306, 842, 138, 329, 457, 317, 404, 403, 566,
157193
+ /* 800 */ 1304, 424, 3, 291, 123, 124, 114, 1196, 1196, 1035,
157194
+ /* 810 */ 1038, 1028, 1028, 121, 121, 122, 122, 122, 122, 379,
157195
+ /* 820 */ 566, 13, 13, 120, 120, 120, 120, 119, 119, 118,
157196
+ /* 830 */ 118, 118, 117, 441, 274, 274, 425, 274, 274, 1172,
157197
+ /* 840 */ 1308, 359, 13, 13, 1122, 1610, 12, 563, 1610, 407,
157198
+ /* 850 */ 563, 460, 563, 1172, 560, 560, 560, 427, 439, 439,
157199
+ /* 860 */ 439, 229, 120, 120, 120, 120, 119, 119, 118, 118,
157200
+ /* 870 */ 118, 117, 441, 123, 124, 114, 1196, 1196, 1035, 1038,
157201
+ /* 880 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 146, 197,
157202
+ /* 890 */ 417, 566, 1058, 445, 1172, 1173, 1174, 417, 471, 438,
157203
+ /* 900 */ 437, 406, 564, 248, 914, 914, 566, 1200, 1172, 1173,
157204
+ /* 910 */ 1174, 488, 1202, 72, 72, 493, 1510, 549, 102, 194,
157205
+ /* 920 */ 1201, 566, 1120, 295, 461, 295, 1302, 252, 72, 72,
157206
+ /* 930 */ 1456, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157207
+ /* 940 */ 117, 441, 245, 56, 56, 1203, 566, 1203, 566, 1242,
157208
+ /* 950 */ 440, 274, 274, 566, 516, 1299, 566, 514, 566, 283,
157209
+ /* 960 */ 274, 274, 1193, 519, 563, 548, 285, 343, 52, 52,
157210
+ /* 970 */ 13, 13, 290, 563, 550, 13, 13, 566, 13, 13,
157211
+ /* 980 */ 13, 13, 551, 274, 274, 294, 1411, 105, 274, 274,
157212
+ /* 990 */ 191, 274, 274, 192, 1512, 545, 563, 274, 274, 57,
157213
+ /* 1000 */ 57, 563, 275, 275, 563, 515, 447, 407, 271, 412,
157214
+ /* 1010 */ 563, 944, 198, 305, 557, 563, 274, 274, 1193, 106,
157215
+ /* 1020 */ 411, 104, 358, 1550, 1508, 348, 566, 407, 338, 563,
157216
+ /* 1030 */ 341, 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028,
157217
+ /* 1040 */ 121, 121, 122, 122, 122, 122, 471, 407, 15, 15,
157218
+ /* 1050 */ 477, 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028,
157219
+ /* 1060 */ 121, 121, 122, 122, 122, 122, 1083, 1083, 485, 360,
157220
+ /* 1070 */ 477, 123, 112, 114, 1196, 1196, 1035, 1038, 1028, 1028,
157221
+ /* 1080 */ 121, 121, 122, 122, 122, 122, 392, 1216, 309, 120,
157222
+ /* 1090 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441,
157223
+ /* 1100 */ 99, 217, 482, 1176, 1410, 566, 479, 433, 543, 120,
157224
+ /* 1110 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441,
157225
+ /* 1120 */ 292, 1080, 566, 1396, 566, 1080, 944, 44, 44, 120,
157226
+ /* 1130 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441,
157227
+ /* 1140 */ 358, 1550, 539, 1099, 58, 58, 45, 45, 328, 407,
157228
+ /* 1150 */ 1139, 830, 831, 832, 244, 243, 242, 483, 1100, 1176,
157229
+ /* 1160 */ 1396, 538, 310, 1139, 1217, 488, 1139, 566, 293, 407,
157230
+ /* 1170 */ 1150, 1245, 413, 1101, 124, 114, 1196, 1196, 1035, 1038,
157231
+ /* 1180 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 566, 59,
157232
+ /* 1190 */ 59, 566, 509, 484, 554, 114, 1196, 1196, 1035, 1038,
157233
+ /* 1200 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 1530, 336,
157234
+ /* 1210 */ 60, 60, 6, 61, 61, 392, 1121, 1528, 920, 1525,
157235
+ /* 1220 */ 1150, 6, 566, 919, 566, 109, 558, 566, 4, 944,
157236
+ /* 1230 */ 434, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157237
+ /* 1240 */ 117, 441, 561, 867, 62, 62, 63, 63, 566, 46,
156964157238
/* 1250 */ 46, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156965
- /* 1260 */ 117, 438, 564, 1135, 1522, 439, 1323, 564, 6, 564,
156966
- /* 1270 */ 47, 47, 564, 557, 411, 1268, 1135, 553, 142, 1135,
156967
- /* 1280 */ 564, 465, 304, 555, 48, 48, 564, 167, 544, 50,
156968
- /* 1290 */ 50, 51, 51, 1213, 64, 64, 956, 109, 556, 864,
156969
- /* 1300 */ 4, 564, 65, 65, 957, 1012, 564, 140, 66, 66,
156970
- /* 1310 */ 564, 107, 107, 564, 559, 849, 205, 564, 108, 217,
156971
- /* 1320 */ 439, 566, 565, 14, 14, 1002, 8, 523, 67, 67,
156972
- /* 1330 */ 564, 452, 129, 129, 221, 68, 68, 439, 453, 53,
156973
- /* 1340 */ 53, 403, 304, 555, 941, 412, 168, 211, 403, 553,
156974
- /* 1350 */ 111, 1188, 69, 69, 99, 462, 244, 1002, 1002, 1004,
156975
- /* 1360 */ 1005, 27, 466, 533, 564, 403, 564, 1336, 532, 272,
156976
- /* 1370 */ 215, 849, 403, 564, 85, 202, 564, 1012, 564, 1207,
156977
- /* 1380 */ 564, 303, 564, 107, 107, 564, 70, 70, 54, 54,
156978
- /* 1390 */ 108, 403, 439, 566, 565, 153, 153, 1002, 154, 154,
156979
- /* 1400 */ 77, 77, 55, 55, 73, 73, 1113, 130, 130, 392,
156980
- /* 1410 */ 109, 556, 143, 4, 38, 564, 473, 299, 564, 461,
156981
- /* 1420 */ 225, 1335, 524, 410, 30, 876, 875, 559, 454, 1002,
156982
- /* 1430 */ 1002, 1004, 1005, 27, 1550, 1157, 441, 74, 74, 277,
156983
- /* 1440 */ 131, 131, 324, 1510, 388, 388, 387, 262, 385, 564,
156984
- /* 1450 */ 439, 836, 868, 320, 463, 31, 564, 883, 884, 354,
156985
- /* 1460 */ 325, 206, 553, 99, 222, 206, 310, 544, 1539, 353,
156986
- /* 1470 */ 994, 132, 132, 250, 309, 1484, 533, 287, 128, 128,
156987
- /* 1480 */ 1062, 534, 109, 556, 468, 4, 564, 250, 1483, 470,
156988
- /* 1490 */ 1012, 564, 250, 275, 564, 330, 107, 107, 99, 559,
156989
- /* 1500 */ 1074, 564, 1074, 108, 224, 439, 566, 565, 152, 152,
156990
- /* 1510 */ 1002, 474, 158, 151, 151, 160, 136, 136, 492, 959,
156991
- /* 1520 */ 960, 246, 439, 135, 135, 344, 478, 564, 99, 1058,
156992
- /* 1530 */ 487, 223, 246, 564, 553, 227, 1062, 950, 914, 1006,
156993
- /* 1540 */ 250, 111, 1002, 1002, 1004, 1005, 27, 331, 533, 133,
156994
- /* 1550 */ 133, 564, 1073, 532, 1073, 134, 134, 847, 915, 1332,
156995
- /* 1560 */ 141, 111, 1012, 335, 338, 406, 340, 342, 107, 107,
156996
- /* 1570 */ 304, 555, 1283, 76, 76, 108, 564, 439, 566, 565,
156997
- /* 1580 */ 1157, 441, 1002, 564, 277, 109, 556, 551, 4, 388,
156998
- /* 1590 */ 388, 387, 262, 385, 446, 1006, 836, 1267, 78, 78,
156999
- /* 1600 */ 349, 564, 559, 359, 564, 75, 75, 360, 1330, 222,
157000
- /* 1610 */ 1564, 310, 1344, 1391, 1002, 1002, 1004, 1005, 27, 309,
157001
- /* 1620 */ 1319, 550, 1397, 43, 43, 439, 49, 49, 1248, 1240,
157002
- /* 1630 */ 1229, 1228, 1230, 1558, 265, 1316, 200, 553, 362, 364,
157003
- /* 1640 */ 366, 389, 11, 208, 1373, 220, 1378, 280, 1366, 224,
157004
- /* 1650 */ 451, 322, 472, 328, 283, 1561, 1266, 158, 323, 1383,
157005
- /* 1660 */ 160, 1382, 288, 368, 497, 1012, 352, 396, 382, 212,
157006
- /* 1670 */ 1456, 107, 107, 921, 1455, 1207, 223, 254, 108, 1503,
157007
- /* 1680 */ 439, 566, 565, 1501, 1204, 1002, 413, 204, 207, 84,
157008
- /* 1690 */ 195, 109, 556, 1379, 4, 554, 180, 196, 170, 80,
157009
- /* 1700 */ 164, 456, 175, 1461, 172, 83, 176, 457, 559, 177,
157010
- /* 1710 */ 406, 178, 35, 490, 230, 304, 555, 1002, 1002, 1004,
157011
- /* 1720 */ 1005, 27, 97, 394, 1385, 1384, 464, 1387, 184, 397,
157012
- /* 1730 */ 36, 439, 1450, 479, 90, 485, 189, 234, 236, 446,
157013
- /* 1740 */ 1472, 266, 488, 553, 337, 333, 237, 399, 1231, 238,
157014
- /* 1750 */ 506, 1286, 427, 92, 1277, 868, 1276, 1285, 213, 101,
157015
- /* 1760 */ 556, 429, 4, 1284, 1255, 1575, 1574, 525, 1256, 400,
157016
- /* 1770 */ 351, 1012, 1254, 1573, 1544, 96, 559, 107, 107, 516,
157017
- /* 1780 */ 519, 297, 298, 1327, 108, 361, 439, 566, 565, 1328,
157018
- /* 1790 */ 252, 1002, 253, 432, 1530, 126, 1529, 544, 10, 439,
157019
- /* 1800 */ 1436, 376, 528, 103, 98, 260, 1237, 34, 567, 1163,
157020
- /* 1810 */ 374, 553, 1326, 363, 199, 1309, 365, 1308, 1325, 380,
157021
- /* 1820 */ 367, 261, 381, 1002, 1002, 1004, 1005, 27, 1351, 1350,
157022
- /* 1830 */ 263, 264, 568, 1226, 1221, 155, 1488, 1489, 1487, 1012,
157023
- /* 1840 */ 139, 156, 1486, 79, 295, 107, 107, 302, 823, 440,
157024
- /* 1850 */ 209, 210, 108, 201, 439, 566, 565, 306, 157, 1002,
157025
- /* 1860 */ 219, 277, 278, 137, 1072, 1070, 388, 388, 387, 262,
157026
- /* 1870 */ 385, 313, 407, 836, 171, 159, 408, 169, 1188, 226,
157027
- /* 1880 */ 900, 173, 321, 1086, 229, 179, 222, 161, 310, 162,
157028
- /* 1890 */ 416, 1002, 1002, 1004, 1005, 27, 309, 181, 418, 163,
157029
- /* 1900 */ 1089, 86, 87, 88, 89, 231, 232, 1085, 148, 18,
157030
- /* 1910 */ 233, 332, 250, 1201, 484, 186, 235, 37, 838, 489,
157031
- /* 1920 */ 353, 1078, 185, 239, 187, 493, 224, 91, 866, 19,
157032
- /* 1930 */ 498, 345, 20, 348, 158, 501, 93, 160, 165, 879,
157033
- /* 1940 */ 149, 296, 94, 508, 95, 1151, 150, 1038, 1121, 39,
157034
- /* 1950 */ 515, 1122, 40, 223, 214, 518, 269, 271, 190, 944,
157035
- /* 1960 */ 1137, 111, 1139, 249, 1141, 1145, 21, 1125, 1144, 33,
157036
- /* 1970 */ 540, 949, 22, 23, 24, 25, 193, 99, 1053, 26,
157037
- /* 1980 */ 1039, 7, 1037, 1041, 1095, 1042, 1094, 406, 255, 256,
157038
- /* 1990 */ 28, 41, 304, 555, 1007, 848, 560, 110, 29, 386,
157039
- /* 2000 */ 910, 257, 383, 258, 1566, 1159, 1158, 1565, 1217, 1217,
157040
- /* 2010 */ 1217, 1217, 1217, 1217, 1217, 1217, 446,
157239
+ /* 1260 */ 117, 441, 566, 1139, 1527, 442, 1327, 566, 6, 566,
157240
+ /* 1270 */ 47, 47, 566, 559, 413, 1272, 1139, 555, 142, 1139,
157241
+ /* 1280 */ 566, 467, 305, 557, 48, 48, 566, 167, 546, 50,
157242
+ /* 1290 */ 50, 51, 51, 1217, 64, 64, 959, 109, 558, 867,
157243
+ /* 1300 */ 4, 566, 65, 65, 960, 1015, 566, 140, 66, 66,
157244
+ /* 1310 */ 566, 107, 107, 566, 561, 852, 205, 566, 108, 217,
157245
+ /* 1320 */ 442, 568, 567, 14, 14, 1005, 8, 525, 67, 67,
157246
+ /* 1330 */ 566, 454, 129, 129, 222, 68, 68, 442, 455, 53,
157247
+ /* 1340 */ 53, 405, 305, 557, 944, 414, 168, 211, 405, 555,
157248
+ /* 1350 */ 111, 1192, 69, 69, 99, 464, 245, 1005, 1005, 1007,
157249
+ /* 1360 */ 1008, 27, 468, 535, 566, 405, 566, 313, 534, 273,
157250
+ /* 1370 */ 215, 852, 405, 566, 85, 202, 566, 1015, 566, 1211,
157251
+ /* 1380 */ 566, 304, 566, 107, 107, 566, 70, 70, 54, 54,
157252
+ /* 1390 */ 108, 405, 442, 568, 567, 153, 153, 1005, 154, 154,
157253
+ /* 1400 */ 77, 77, 55, 55, 73, 73, 1117, 130, 130, 394,
157254
+ /* 1410 */ 109, 558, 143, 4, 38, 566, 475, 300, 566, 463,
157255
+ /* 1420 */ 279, 1340, 526, 412, 30, 226, 1077, 561, 1077, 1005,
157256
+ /* 1430 */ 1005, 1007, 1008, 27, 1555, 1161, 444, 74, 74, 278,
157257
+ /* 1440 */ 131, 131, 326, 1339, 390, 390, 389, 263, 387, 566,
157258
+ /* 1450 */ 442, 839, 871, 308, 465, 31, 566, 879, 878, 356,
157259
+ /* 1460 */ 327, 206, 555, 99, 223, 206, 312, 546, 1544, 355,
157260
+ /* 1470 */ 997, 132, 132, 251, 311, 456, 535, 288, 128, 128,
157261
+ /* 1480 */ 1065, 536, 109, 558, 470, 4, 566, 251, 1515, 472,
157262
+ /* 1490 */ 1015, 566, 251, 276, 566, 332, 107, 107, 99, 561,
157263
+ /* 1500 */ 1076, 566, 1076, 108, 225, 442, 568, 567, 152, 152,
157264
+ /* 1510 */ 1005, 476, 158, 151, 151, 160, 136, 136, 494, 886,
157265
+ /* 1520 */ 887, 247, 442, 135, 135, 346, 322, 566, 99, 1061,
157266
+ /* 1530 */ 489, 224, 247, 566, 555, 1488, 1065, 1487, 953, 1009,
157267
+ /* 1540 */ 228, 251, 1005, 1005, 1007, 1008, 27, 480, 535, 133,
157268
+ /* 1550 */ 133, 566, 333, 534, 1336, 134, 134, 962, 963, 337,
157269
+ /* 1560 */ 917, 340, 1015, 111, 850, 408, 342, 141, 107, 107,
157270
+ /* 1570 */ 305, 557, 344, 76, 76, 108, 566, 442, 568, 567,
157271
+ /* 1580 */ 1161, 444, 1005, 566, 278, 109, 558, 553, 4, 390,
157272
+ /* 1590 */ 390, 389, 263, 387, 448, 1009, 839, 918, 78, 78,
157273
+ /* 1600 */ 111, 566, 561, 1287, 566, 75, 75, 1271, 1334, 223,
157274
+ /* 1610 */ 1569, 312, 351, 361, 1005, 1005, 1007, 1008, 27, 311,
157275
+ /* 1620 */ 362, 1348, 1395, 43, 43, 442, 49, 49, 1323, 552,
157276
+ /* 1630 */ 1401, 1252, 1244, 1233, 1232, 1234, 1563, 555, 200, 266,
157277
+ /* 1640 */ 1320, 391, 11, 364, 221, 366, 368, 1382, 1377, 225,
157278
+ /* 1650 */ 281, 453, 324, 330, 284, 1387, 474, 158, 208, 370,
157279
+ /* 1660 */ 160, 1370, 325, 556, 195, 1015, 289, 499, 384, 354,
157280
+ /* 1670 */ 1270, 107, 107, 924, 1386, 398, 224, 212, 108, 1460,
157281
+ /* 1680 */ 442, 568, 567, 1459, 1566, 1005, 1211, 255, 1208, 1507,
157282
+ /* 1690 */ 1505, 109, 558, 416, 4, 196, 207, 204, 170, 219,
157283
+ /* 1700 */ 80, 84, 180, 1383, 1465, 83, 164, 172, 561, 458,
157284
+ /* 1710 */ 408, 175, 176, 459, 177, 305, 557, 1005, 1005, 1007,
157285
+ /* 1720 */ 1008, 27, 35, 178, 492, 231, 396, 97, 1389, 466,
157286
+ /* 1730 */ 1388, 442, 481, 36, 1391, 184, 399, 90, 235, 448,
157287
+ /* 1740 */ 1454, 1476, 267, 555, 487, 189, 237, 490, 339, 238,
157288
+ /* 1750 */ 335, 1235, 239, 401, 508, 1281, 430, 1290, 1289, 101,
157289
+ /* 1760 */ 558, 1288, 4, 92, 871, 213, 1580, 432, 1331, 527,
157290
+ /* 1770 */ 96, 1015, 1260, 353, 402, 1579, 561, 107, 107, 1259,
157291
+ /* 1780 */ 363, 1258, 1578, 1280, 108, 298, 442, 568, 567, 1549,
157292
+ /* 1790 */ 518, 1005, 299, 521, 253, 1332, 365, 1535, 254, 442,
157293
+ /* 1800 */ 1534, 435, 546, 10, 126, 378, 1440, 103, 530, 303,
157294
+ /* 1810 */ 98, 555, 261, 1241, 34, 569, 199, 1313, 1330, 1329,
157295
+ /* 1820 */ 367, 369, 376, 1005, 1005, 1007, 1008, 27, 1312, 382,
157296
+ /* 1830 */ 1355, 1354, 383, 1167, 262, 264, 265, 570, 1230, 1015,
157297
+ /* 1840 */ 155, 1225, 1492, 1493, 1491, 107, 107, 1490, 156, 139,
157298
+ /* 1850 */ 296, 79, 108, 826, 442, 568, 567, 209, 157, 1005,
157299
+ /* 1860 */ 443, 278, 201, 210, 307, 220, 390, 390, 389, 263,
157300
+ /* 1870 */ 387, 137, 315, 839, 409, 1075, 1073, 410, 171, 169,
157301
+ /* 1880 */ 159, 903, 173, 227, 1192, 230, 223, 323, 312, 1089,
157302
+ /* 1890 */ 179, 1005, 1005, 1007, 1008, 27, 311, 161, 162, 419,
157303
+ /* 1900 */ 421, 86, 181, 163, 87, 1092, 232, 88, 1088, 148,
157304
+ /* 1910 */ 233, 18, 234, 89, 334, 1081, 251, 1205, 486, 236,
157305
+ /* 1920 */ 186, 37, 841, 355, 491, 240, 225, 869, 187, 503,
157306
+ /* 1930 */ 185, 495, 91, 19, 158, 347, 20, 160, 93, 350,
157307
+ /* 1940 */ 500, 882, 297, 149, 94, 165, 510, 95, 1155, 150,
157308
+ /* 1950 */ 1041, 1125, 39, 224, 40, 517, 1126, 214, 520, 270,
157309
+ /* 1960 */ 272, 190, 947, 250, 111, 1143, 1141, 1145, 1149, 21,
157310
+ /* 1970 */ 1129, 33, 542, 1148, 22, 23, 24, 25, 193, 952,
157311
+ /* 1980 */ 99, 1056, 1042, 1040, 26, 1044, 1098, 408, 7, 1097,
157312
+ /* 1990 */ 256, 257, 305, 557, 1045, 28, 41, 562, 1010, 851,
157313
+ /* 2000 */ 110, 29, 913, 385, 388, 258, 259, 1163, 1162, 1571,
157314
+ /* 2010 */ 1221, 1221, 1221, 1570, 1221, 1221, 448,
157041157315
};
157042157316
static const YYCODETYPE yy_lookahead[] = {
157043157317
/* 0 */ 190, 212, 190, 190, 211, 190, 212, 190, 270, 271,
157044157318
/* 10 */ 272, 190, 219, 190, 190, 202, 270, 271, 272, 19,
157045157319
/* 20 */ 190, 190, 212, 213, 212, 213, 190, 212, 213, 212,
@@ -157180,70 +157454,70 @@
157180157454
/* 1370 */ 253, 115, 250, 190, 147, 148, 190, 99, 190, 60,
157181157455
/* 1380 */ 190, 240, 190, 105, 106, 190, 212, 213, 212, 213,
157182157456
/* 1390 */ 112, 250, 114, 115, 116, 212, 213, 119, 212, 213,
157183157457
/* 1400 */ 212, 213, 212, 213, 212, 213, 23, 212, 213, 26,
157184157458
/* 1410 */ 19, 20, 22, 22, 24, 190, 19, 251, 190, 127,
157185
- /* 1420 */ 24, 190, 114, 113, 22, 118, 119, 36, 190, 151,
157459
+ /* 1420 */ 98, 190, 114, 113, 22, 24, 151, 36, 153, 151,
157186157460
/* 1430 */ 152, 153, 154, 155, 0, 1, 2, 212, 213, 5,
157187157461
/* 1440 */ 212, 213, 150, 190, 10, 11, 12, 13, 14, 190,
157188
- /* 1450 */ 59, 17, 124, 190, 127, 53, 190, 7, 8, 119,
157462
+ /* 1450 */ 59, 17, 124, 131, 127, 53, 190, 118, 119, 119,
157189157463
/* 1460 */ 23, 140, 71, 26, 30, 140, 32, 143, 312, 129,
157190157464
/* 1470 */ 23, 212, 213, 26, 40, 190, 85, 150, 212, 213,
157191157465
/* 1480 */ 59, 90, 19, 20, 23, 22, 190, 26, 190, 23,
157192157466
/* 1490 */ 99, 190, 26, 22, 190, 23, 105, 106, 26, 36,
157193157467
/* 1500 */ 151, 190, 153, 112, 70, 114, 115, 116, 212, 213,
157194
- /* 1510 */ 119, 114, 78, 212, 213, 81, 212, 213, 23, 83,
157195
- /* 1520 */ 84, 26, 59, 212, 213, 23, 190, 190, 26, 23,
157196
- /* 1530 */ 284, 97, 26, 190, 71, 139, 115, 23, 23, 59,
157197
- /* 1540 */ 26, 26, 151, 152, 153, 154, 155, 190, 85, 212,
157198
- /* 1550 */ 213, 190, 151, 90, 153, 212, 213, 23, 23, 190,
157199
- /* 1560 */ 26, 26, 99, 190, 190, 131, 190, 190, 105, 106,
157468
+ /* 1510 */ 119, 114, 78, 212, 213, 81, 212, 213, 23, 7,
157469
+ /* 1520 */ 8, 26, 59, 212, 213, 23, 190, 190, 26, 23,
157470
+ /* 1530 */ 284, 97, 26, 190, 71, 190, 115, 190, 23, 59,
157471
+ /* 1540 */ 139, 26, 151, 152, 153, 154, 155, 190, 85, 212,
157472
+ /* 1550 */ 213, 190, 190, 90, 190, 212, 213, 83, 84, 190,
157473
+ /* 1560 */ 23, 190, 99, 26, 23, 131, 190, 26, 105, 106,
157200157474
/* 1570 */ 136, 137, 190, 212, 213, 112, 190, 114, 115, 116,
157201157475
/* 1580 */ 1, 2, 119, 190, 5, 19, 20, 232, 22, 10,
157202
- /* 1590 */ 11, 12, 13, 14, 160, 115, 17, 190, 212, 213,
157203
- /* 1600 */ 190, 190, 36, 190, 190, 212, 213, 190, 190, 30,
157476
+ /* 1590 */ 11, 12, 13, 14, 160, 115, 17, 23, 212, 213,
157477
+ /* 1600 */ 26, 190, 36, 190, 190, 212, 213, 190, 190, 30,
157204157478
/* 1610 */ 139, 32, 190, 190, 151, 152, 153, 154, 155, 40,
157205157479
/* 1620 */ 190, 190, 190, 212, 213, 59, 212, 213, 190, 190,
157206
- /* 1630 */ 190, 190, 190, 190, 283, 251, 238, 71, 251, 251,
157207
- /* 1640 */ 251, 188, 239, 210, 263, 293, 267, 241, 263, 70,
157208
- /* 1650 */ 255, 289, 289, 241, 255, 193, 221, 78, 242, 267,
157209
- /* 1660 */ 81, 267, 242, 255, 216, 99, 215, 267, 241, 225,
157210
- /* 1670 */ 215, 105, 106, 107, 215, 60, 97, 139, 112, 197,
157211
- /* 1680 */ 114, 115, 116, 197, 38, 119, 197, 148, 239, 149,
157212
- /* 1690 */ 245, 19, 20, 268, 22, 276, 22, 245, 293, 290,
157213
- /* 1700 */ 43, 18, 233, 279, 230, 290, 233, 197, 36, 233,
157214
- /* 1710 */ 131, 233, 266, 18, 196, 136, 137, 151, 152, 153,
157215
- /* 1720 */ 154, 155, 147, 242, 268, 268, 242, 230, 230, 242,
157216
- /* 1730 */ 266, 59, 242, 197, 156, 62, 22, 196, 196, 160,
157217
- /* 1740 */ 286, 197, 217, 71, 197, 285, 196, 217, 197, 196,
157218
- /* 1750 */ 113, 214, 64, 22, 223, 124, 223, 214, 163, 19,
157219
- /* 1760 */ 20, 111, 22, 214, 216, 220, 220, 142, 214, 217,
157220
- /* 1770 */ 214, 99, 214, 214, 306, 113, 36, 105, 106, 217,
157221
- /* 1780 */ 217, 278, 278, 257, 112, 256, 114, 115, 116, 257,
157222
- /* 1790 */ 197, 119, 91, 82, 311, 146, 311, 143, 22, 59,
157223
- /* 1800 */ 273, 197, 144, 156, 145, 25, 200, 26, 199, 13,
157224
- /* 1810 */ 245, 71, 257, 256, 244, 246, 256, 246, 257, 243,
157225
- /* 1820 */ 256, 191, 242, 151, 152, 153, 154, 155, 261, 261,
157226
- /* 1830 */ 191, 6, 189, 189, 189, 203, 209, 209, 209, 99,
157227
- /* 1840 */ 218, 203, 209, 209, 218, 105, 106, 275, 4, 3,
157228
- /* 1850 */ 210, 210, 112, 22, 114, 115, 116, 161, 203, 119,
157229
- /* 1860 */ 15, 5, 98, 16, 23, 23, 10, 11, 12, 13,
157230
- /* 1870 */ 14, 137, 299, 17, 149, 128, 299, 296, 26, 24,
157231
- /* 1880 */ 20, 140, 16, 1, 142, 140, 30, 128, 32, 128,
157232
- /* 1890 */ 61, 151, 152, 153, 154, 155, 40, 149, 37, 128,
157233
- /* 1900 */ 114, 53, 53, 53, 53, 34, 139, 1, 5, 22,
157234
- /* 1910 */ 113, 159, 26, 75, 41, 113, 139, 24, 20, 19,
157235
- /* 1920 */ 129, 68, 68, 123, 22, 67, 70, 22, 59, 22,
157236
- /* 1930 */ 67, 23, 22, 24, 78, 96, 22, 81, 37, 28,
157237
- /* 1940 */ 23, 67, 147, 22, 26, 23, 23, 23, 23, 22,
157238
- /* 1950 */ 24, 23, 22, 97, 139, 24, 23, 23, 22, 141,
157239
- /* 1960 */ 88, 26, 86, 34, 75, 75, 34, 23, 93, 22,
157240
- /* 1970 */ 24, 114, 34, 34, 34, 34, 26, 26, 23, 34,
157241
- /* 1980 */ 23, 44, 23, 23, 23, 11, 23, 131, 26, 22,
157242
- /* 1990 */ 22, 22, 136, 137, 23, 23, 26, 22, 22, 15,
157243
- /* 2000 */ 133, 139, 23, 139, 139, 1, 1, 139, 313, 313,
157244
- /* 2010 */ 313, 313, 313, 313, 313, 313, 160, 313, 313, 313,
157480
+ /* 1630 */ 190, 190, 190, 190, 190, 190, 190, 71, 238, 283,
157481
+ /* 1640 */ 251, 188, 239, 251, 293, 251, 251, 267, 263, 70,
157482
+ /* 1650 */ 241, 255, 289, 241, 255, 267, 289, 78, 210, 255,
157483
+ /* 1660 */ 81, 263, 242, 276, 245, 99, 242, 216, 241, 215,
157484
+ /* 1670 */ 221, 105, 106, 107, 267, 267, 97, 225, 112, 215,
157485
+ /* 1680 */ 114, 115, 116, 215, 193, 119, 60, 139, 38, 197,
157486
+ /* 1690 */ 197, 19, 20, 197, 22, 245, 239, 148, 293, 293,
157487
+ /* 1700 */ 290, 149, 22, 268, 279, 290, 43, 230, 36, 18,
157488
+ /* 1710 */ 131, 233, 233, 197, 233, 136, 137, 151, 152, 153,
157489
+ /* 1720 */ 154, 155, 266, 233, 18, 196, 242, 147, 268, 242,
157490
+ /* 1730 */ 268, 59, 197, 266, 230, 230, 242, 156, 196, 160,
157491
+ /* 1740 */ 242, 286, 197, 71, 62, 22, 196, 217, 197, 196,
157492
+ /* 1750 */ 285, 197, 196, 217, 113, 223, 64, 214, 214, 19,
157493
+ /* 1760 */ 20, 214, 22, 22, 124, 163, 220, 111, 257, 142,
157494
+ /* 1770 */ 113, 99, 214, 214, 217, 220, 36, 105, 106, 216,
157495
+ /* 1780 */ 256, 214, 214, 223, 112, 278, 114, 115, 116, 306,
157496
+ /* 1790 */ 217, 119, 278, 217, 197, 257, 256, 311, 91, 59,
157497
+ /* 1800 */ 311, 82, 143, 22, 146, 197, 273, 156, 144, 275,
157498
+ /* 1810 */ 145, 71, 25, 200, 26, 199, 244, 246, 257, 257,
157499
+ /* 1820 */ 256, 256, 245, 151, 152, 153, 154, 155, 246, 243,
157500
+ /* 1830 */ 261, 261, 242, 13, 191, 191, 6, 189, 189, 99,
157501
+ /* 1840 */ 203, 189, 209, 209, 209, 105, 106, 209, 203, 218,
157502
+ /* 1850 */ 218, 209, 112, 4, 114, 115, 116, 210, 203, 119,
157503
+ /* 1860 */ 3, 5, 22, 210, 161, 15, 10, 11, 12, 13,
157504
+ /* 1870 */ 14, 16, 137, 17, 299, 23, 23, 299, 149, 296,
157505
+ /* 1880 */ 128, 20, 140, 24, 26, 142, 30, 16, 32, 1,
157506
+ /* 1890 */ 140, 151, 152, 153, 154, 155, 40, 128, 128, 61,
157507
+ /* 1900 */ 37, 53, 149, 128, 53, 114, 34, 53, 1, 5,
157508
+ /* 1910 */ 139, 22, 113, 53, 159, 68, 26, 75, 41, 139,
157509
+ /* 1920 */ 113, 24, 20, 129, 19, 123, 70, 59, 22, 96,
157510
+ /* 1930 */ 68, 67, 22, 22, 78, 23, 22, 81, 22, 24,
157511
+ /* 1940 */ 67, 28, 67, 23, 147, 37, 22, 26, 23, 23,
157512
+ /* 1950 */ 23, 23, 22, 97, 22, 24, 23, 139, 24, 23,
157513
+ /* 1960 */ 23, 22, 141, 34, 26, 86, 88, 75, 75, 34,
157514
+ /* 1970 */ 23, 22, 24, 93, 34, 34, 34, 34, 26, 114,
157515
+ /* 1980 */ 26, 23, 23, 23, 34, 23, 23, 131, 44, 23,
157516
+ /* 1990 */ 26, 22, 136, 137, 11, 22, 22, 26, 23, 23,
157517
+ /* 2000 */ 22, 22, 133, 23, 15, 139, 139, 1, 1, 139,
157518
+ /* 2010 */ 313, 313, 313, 139, 313, 313, 160, 313, 313, 313,
157245157519
/* 2020 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157246157520
/* 2030 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157247157521
/* 2040 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157248157522
/* 2050 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157249157523
/* 2060 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
@@ -157257,15 +157531,15 @@
157257157531
/* 2140 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157258157532
/* 2150 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157259157533
/* 2160 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157260157534
/* 2170 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157261157535
/* 2180 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157262
- /* 2190 */ 182, 182, 182, 182, 182, 182, 182, 182, 182,
157536
+ /* 2190 */ 313, 313, 313, 313, 313, 313, 182, 182, 182,
157263157537
};
157264
-#define YY_SHIFT_COUNT (570)
157538
+#define YY_SHIFT_COUNT (572)
157265157539
#define YY_SHIFT_MIN (0)
157266
-#define YY_SHIFT_MAX (2005)
157540
+#define YY_SHIFT_MAX (2007)
157267157541
static const unsigned short int yy_shift_ofst[] = {
157268157542
/* 0 */ 1579, 1434, 1856, 1206, 1206, 1, 1278, 1391, 1463, 1672,
157269157543
/* 10 */ 1672, 1672, 390, 0, 0, 180, 1008, 1672, 1672, 1672,
157270157544
/* 20 */ 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672,
157271157545
/* 30 */ 794, 794, 287, 287, 250, 611, 1, 1, 1, 1,
@@ -157285,48 +157559,48 @@
157285157559
/* 170 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
157286157560
/* 180 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
157287157561
/* 190 */ 573, 1074, 1074, 573, 119, 1187, 1187, 1044, 1044, 1145,
157288157562
/* 200 */ 1146, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 418, 263,
157289157563
/* 210 */ 263, 559, 303, 618, 527, 623, 464, 570, 780, 573,
157290
- /* 220 */ 573, 573, 573, 573, 573, 573, 573, 573, 669, 573,
157564
+ /* 220 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 669,
157291157565
/* 230 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
157292
- /* 240 */ 573, 245, 245, 245, 573, 573, 573, 573, 985, 573,
157293
- /* 250 */ 573, 573, 18, 1076, 573, 573, 1131, 573, 573, 573,
157294
- /* 260 */ 573, 573, 573, 573, 573, 941, 1092, 770, 903, 903,
157295
- /* 270 */ 903, 903, 1203, 770, 770, 1085, 692, 1144, 1319, 1168,
157296
- /* 280 */ 1227, 1321, 1308, 1227, 1308, 1397, 593, 1168, 1168, 593,
157297
- /* 290 */ 1168, 1321, 1397, 1328, 15, 1310, 1265, 1265, 1265, 1308,
157298
- /* 300 */ 1324, 1324, 863, 1325, 492, 1390, 1615, 1538, 1538, 1646,
157299
- /* 310 */ 1646, 1538, 1540, 1539, 1674, 1657, 1683, 1683, 1683, 1683,
157300
- /* 320 */ 1538, 1695, 1575, 1539, 1539, 1575, 1674, 1657, 1575, 1657,
157301
- /* 330 */ 1575, 1538, 1695, 1578, 1673, 1538, 1695, 1714, 1538, 1695,
157302
- /* 340 */ 1538, 1695, 1714, 1637, 1637, 1637, 1688, 1731, 1731, 1714,
157303
- /* 350 */ 1637, 1631, 1637, 1688, 1637, 1637, 1595, 1714, 1650, 1650,
157304
- /* 360 */ 1714, 1625, 1662, 1625, 1662, 1625, 1662, 1625, 1662, 1538,
157305
- /* 370 */ 1701, 1701, 1711, 1711, 1649, 1654, 1776, 1538, 1647, 1649,
157306
- /* 380 */ 1659, 1658, 1575, 1780, 1781, 1796, 1796, 1825, 1825, 1825,
157307
- /* 390 */ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
157308
- /* 400 */ 2017, 2017, 2017, 2017, 2017, 339, 445, 1064, 1193, 951,
157309
- /* 410 */ 1029, 1256, 1383, 1402, 1396, 1292, 1327, 1437, 727, 1447,
157310
- /* 420 */ 1461, 1466, 1472, 1495, 1502, 1184, 1307, 1450, 1340, 1421,
157311
- /* 430 */ 1506, 1514, 1436, 1515, 1349, 1401, 1534, 1535, 1480, 1471,
157312
- /* 440 */ 1844, 1846, 1831, 1696, 1845, 1764, 1847, 1841, 1842, 1734,
157313
- /* 450 */ 1725, 1747, 1852, 1852, 1855, 1741, 1860, 1742, 1866, 1882,
157314
- /* 460 */ 1745, 1759, 1852, 1761, 1829, 1861, 1852, 1748, 1848, 1849,
157315
- /* 470 */ 1850, 1851, 1771, 1786, 1871, 1767, 1906, 1903, 1887, 1797,
157316
- /* 480 */ 1752, 1853, 1886, 1854, 1838, 1873, 1777, 1802, 1893, 1898,
157317
- /* 490 */ 1900, 1791, 1800, 1902, 1858, 1905, 1907, 1908, 1910, 1863,
157318
- /* 500 */ 1869, 1909, 1839, 1911, 1914, 1874, 1901, 1917, 1795, 1921,
157319
- /* 510 */ 1922, 1923, 1924, 1918, 1925, 1927, 1926, 1928, 1930, 1931,
157320
- /* 520 */ 1815, 1933, 1934, 1857, 1929, 1936, 1818, 1935, 1932, 1938,
157321
- /* 530 */ 1939, 1940, 1872, 1889, 1876, 1937, 1890, 1875, 1941, 1944,
157322
- /* 540 */ 1947, 1946, 1950, 1951, 1945, 1955, 1935, 1957, 1959, 1960,
157323
- /* 550 */ 1961, 1962, 1963, 1967, 1974, 1968, 1969, 1971, 1972, 1975,
157324
- /* 560 */ 1976, 1970, 1867, 1862, 1864, 1865, 1868, 1979, 1984, 2004,
157325
- /* 570 */ 2005,
157566
+ /* 240 */ 573, 573, 245, 245, 245, 573, 573, 573, 573, 985,
157567
+ /* 250 */ 573, 573, 573, 18, 1076, 573, 573, 1131, 573, 573,
157568
+ /* 260 */ 573, 573, 573, 573, 573, 573, 941, 1092, 770, 903,
157569
+ /* 270 */ 903, 903, 903, 1203, 770, 770, 1085, 692, 1144, 1319,
157570
+ /* 280 */ 1168, 1227, 1321, 1308, 1227, 1308, 1397, 593, 1168, 1168,
157571
+ /* 290 */ 593, 1168, 1321, 1397, 1328, 15, 1310, 1265, 1265, 1265,
157572
+ /* 300 */ 1308, 1324, 1324, 863, 1325, 492, 1390, 1626, 1626, 1548,
157573
+ /* 310 */ 1548, 1650, 1650, 1548, 1552, 1549, 1680, 1663, 1691, 1691,
157574
+ /* 320 */ 1691, 1691, 1548, 1706, 1580, 1549, 1549, 1580, 1680, 1663,
157575
+ /* 330 */ 1580, 1663, 1580, 1548, 1706, 1581, 1682, 1548, 1706, 1723,
157576
+ /* 340 */ 1548, 1706, 1548, 1706, 1723, 1641, 1641, 1641, 1692, 1741,
157577
+ /* 350 */ 1741, 1723, 1641, 1640, 1641, 1692, 1641, 1641, 1602, 1723,
157578
+ /* 360 */ 1656, 1656, 1723, 1627, 1657, 1627, 1657, 1627, 1657, 1627,
157579
+ /* 370 */ 1657, 1548, 1707, 1707, 1719, 1719, 1658, 1659, 1781, 1548,
157580
+ /* 380 */ 1651, 1658, 1665, 1664, 1580, 1787, 1788, 1820, 1820, 1830,
157581
+ /* 390 */ 1830, 1830, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
157582
+ /* 400 */ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 339, 445, 1064,
157583
+ /* 410 */ 1193, 951, 1029, 1256, 1383, 1322, 1402, 1401, 1292, 1327,
157584
+ /* 420 */ 1437, 727, 1447, 1461, 1466, 1472, 1495, 1502, 1184, 1339,
157585
+ /* 430 */ 1512, 1340, 1421, 1506, 1515, 1474, 1537, 1275, 1349, 1541,
157586
+ /* 440 */ 1574, 1480, 1471, 1849, 1857, 1840, 1703, 1850, 1855, 1852,
157587
+ /* 450 */ 1853, 1735, 1729, 1752, 1858, 1858, 1859, 1742, 1861, 1743,
157588
+ /* 460 */ 1871, 1888, 1750, 1769, 1858, 1770, 1838, 1863, 1858, 1753,
157589
+ /* 470 */ 1848, 1851, 1854, 1860, 1775, 1791, 1872, 1771, 1907, 1904,
157590
+ /* 480 */ 1889, 1799, 1755, 1847, 1890, 1862, 1842, 1877, 1780, 1807,
157591
+ /* 490 */ 1897, 1902, 1905, 1794, 1802, 1906, 1864, 1910, 1911, 1912,
157592
+ /* 500 */ 1914, 1873, 1868, 1915, 1833, 1913, 1916, 1875, 1908, 1920,
157593
+ /* 510 */ 1797, 1924, 1925, 1926, 1927, 1921, 1928, 1930, 1931, 1933,
157594
+ /* 520 */ 1932, 1934, 1818, 1936, 1937, 1865, 1929, 1939, 1821, 1938,
157595
+ /* 530 */ 1935, 1940, 1941, 1942, 1878, 1892, 1879, 1944, 1893, 1880,
157596
+ /* 540 */ 1943, 1947, 1949, 1948, 1952, 1954, 1950, 1958, 1938, 1959,
157597
+ /* 550 */ 1960, 1962, 1963, 1964, 1966, 1969, 1983, 1973, 1974, 1975,
157598
+ /* 560 */ 1976, 1978, 1979, 1971, 1869, 1866, 1867, 1870, 1874, 1980,
157599
+ /* 570 */ 1989, 2006, 2007,
157326157600
};
157327
-#define YY_REDUCE_COUNT (404)
157601
+#define YY_REDUCE_COUNT (406)
157328157602
#define YY_REDUCE_MIN (-262)
157329157603
#define YY_REDUCE_MAX (1655)
157330157604
static const short yy_reduce_ofst[] = {
157331157605
/* 0 */ 599, -123, 272, 716, 756, -121, -190, -188, -185, -183,
157332157606
/* 10 */ -179, -177, -26, 304, 313, -254, -11, 500, 609, 630,
@@ -157348,89 +157622,89 @@
157348157622
/* 170 */ -187, 328, 700, 707, 239, 282, 331, 556, 721, 438,
157349157623
/* 180 */ 193, 860, 322, 541, 880, 933, 975, 241, 651, 879,
157350157624
/* 190 */ 970, 270, 905, 918, 88, 914, 961, 967, 1069, -39,
157351157625
/* 200 */ 604, 1050, 1091, 1098, 1115, 1122, 1117, 1141, -211, -206,
157352157626
/* 210 */ -180, -130, -161, 10, 179, 236, 316, 341, 629, 726,
157353
- /* 220 */ 804, 816, 834, 898, 972, 1177, 1231, 1238, 170, 1253,
157354
- /* 230 */ 1263, 1285, 1298, 1336, 1357, 1369, 1373, 1374, 1376, 1377,
157355
- /* 240 */ 1382, 240, 257, 1053, 1407, 1410, 1413, 1417, 1012, 1422,
157356
- /* 250 */ 1423, 1430, 1166, 1156, 1418, 1431, 1355, 1432, 179, 1438,
157357
- /* 260 */ 1439, 1440, 1441, 1442, 1443, 1246, 1351, 1398, 1384, 1387,
157358
- /* 270 */ 1388, 1389, 1012, 1398, 1398, 1403, 1433, 1453, 1352, 1379,
157359
- /* 280 */ 1381, 1406, 1395, 1385, 1399, 1362, 1416, 1392, 1394, 1420,
157360
- /* 290 */ 1400, 1412, 1363, 1448, 1444, 1435, 1451, 1455, 1459, 1408,
157361
- /* 300 */ 1445, 1452, 1419, 1427, 1449, 1462, 1405, 1482, 1486, 1409,
157362
- /* 310 */ 1415, 1489, 1424, 1425, 1446, 1474, 1469, 1473, 1476, 1478,
157363
- /* 320 */ 1510, 1518, 1481, 1456, 1457, 1484, 1464, 1497, 1487, 1498,
157364
- /* 330 */ 1490, 1536, 1541, 1454, 1460, 1544, 1542, 1525, 1547, 1550,
157365
- /* 340 */ 1551, 1553, 1530, 1537, 1543, 1549, 1531, 1545, 1546, 1552,
157366
- /* 350 */ 1554, 1548, 1556, 1533, 1558, 1559, 1468, 1562, 1503, 1504,
157367
- /* 360 */ 1563, 1526, 1529, 1532, 1557, 1555, 1560, 1561, 1564, 1593,
157368
- /* 370 */ 1483, 1485, 1567, 1568, 1569, 1565, 1527, 1604, 1572, 1571,
157369
- /* 380 */ 1570, 1576, 1580, 1606, 1609, 1630, 1639, 1643, 1644, 1645,
157370
- /* 390 */ 1573, 1577, 1581, 1632, 1627, 1628, 1629, 1633, 1638, 1622,
157371
- /* 400 */ 1626, 1640, 1641, 1634, 1655,
157627
+ /* 220 */ 804, 816, 834, 898, 972, 1177, 1231, 1253, 1285, 170,
157628
+ /* 230 */ 1298, 1336, 1345, 1347, 1357, 1362, 1364, 1369, 1371, 1376,
157629
+ /* 240 */ 1382, 1413, 240, 257, 1053, 1417, 1422, 1423, 1430, 1012,
157630
+ /* 250 */ 1431, 1432, 1438, 1166, 1156, 1418, 1439, 1355, 1440, 179,
157631
+ /* 260 */ 1441, 1442, 1443, 1444, 1445, 1446, 1246, 1356, 1400, 1389,
157632
+ /* 270 */ 1392, 1394, 1395, 1012, 1400, 1400, 1403, 1448, 1453, 1351,
157633
+ /* 280 */ 1380, 1385, 1409, 1396, 1398, 1399, 1363, 1420, 1388, 1407,
157634
+ /* 290 */ 1424, 1408, 1412, 1367, 1451, 1452, 1449, 1454, 1464, 1468,
157635
+ /* 300 */ 1404, 1419, 1450, 1387, 1427, 1457, 1491, 1405, 1406, 1492,
157636
+ /* 310 */ 1493, 1410, 1415, 1496, 1425, 1435, 1456, 1477, 1478, 1479,
157637
+ /* 320 */ 1481, 1490, 1516, 1529, 1484, 1460, 1462, 1487, 1467, 1504,
157638
+ /* 330 */ 1494, 1505, 1498, 1535, 1542, 1455, 1465, 1545, 1550, 1530,
157639
+ /* 340 */ 1551, 1553, 1554, 1556, 1536, 1543, 1544, 1547, 1532, 1546,
157640
+ /* 350 */ 1555, 1557, 1558, 1563, 1559, 1560, 1567, 1568, 1483, 1573,
157641
+ /* 360 */ 1507, 1514, 1576, 1511, 1524, 1538, 1540, 1561, 1564, 1562,
157642
+ /* 370 */ 1565, 1597, 1486, 1489, 1569, 1570, 1571, 1577, 1533, 1608,
157643
+ /* 380 */ 1534, 1582, 1572, 1586, 1590, 1613, 1616, 1643, 1644, 1648,
157644
+ /* 390 */ 1649, 1652, 1575, 1578, 1583, 1637, 1633, 1634, 1635, 1638,
157645
+ /* 400 */ 1645, 1631, 1632, 1647, 1653, 1642, 1655,
157372157646
};
157373157647
static const YYACTIONTYPE yy_default[] = {
157374
- /* 0 */ 1610, 1610, 1610, 1445, 1215, 1324, 1215, 1215, 1215, 1445,
157375
- /* 10 */ 1445, 1445, 1215, 1354, 1354, 1498, 1246, 1215, 1215, 1215,
157376
- /* 20 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1444, 1215, 1215,
157377
- /* 30 */ 1215, 1215, 1528, 1528, 1215, 1215, 1215, 1215, 1215, 1215,
157378
- /* 40 */ 1215, 1215, 1215, 1363, 1215, 1370, 1215, 1215, 1215, 1215,
157379
- /* 50 */ 1215, 1446, 1447, 1215, 1215, 1215, 1497, 1499, 1462, 1377,
157380
- /* 60 */ 1376, 1375, 1374, 1480, 1341, 1368, 1361, 1365, 1440, 1441,
157381
- /* 70 */ 1439, 1443, 1447, 1446, 1215, 1364, 1411, 1425, 1410, 1215,
157382
- /* 80 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157383
- /* 90 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157384
- /* 100 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157385
- /* 110 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157386
- /* 120 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1419, 1424,
157387
- /* 130 */ 1430, 1423, 1420, 1413, 1412, 1414, 1415, 1215, 1236, 1288,
157388
- /* 140 */ 1215, 1215, 1215, 1215, 1516, 1515, 1215, 1215, 1246, 1405,
157389
- /* 150 */ 1404, 1416, 1417, 1427, 1426, 1505, 1563, 1562, 1463, 1215,
157390
- /* 160 */ 1215, 1215, 1215, 1215, 1215, 1215, 1528, 1215, 1215, 1215,
157391
- /* 170 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157392
- /* 180 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157393
- /* 190 */ 1215, 1528, 1528, 1215, 1246, 1528, 1528, 1242, 1242, 1348,
157394
- /* 200 */ 1215, 1511, 1315, 1315, 1315, 1315, 1324, 1315, 1215, 1215,
157395
- /* 210 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157396
- /* 220 */ 1215, 1215, 1502, 1500, 1215, 1215, 1215, 1215, 1215, 1215,
157397
- /* 230 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157398
- /* 240 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157399
- /* 250 */ 1215, 1215, 1320, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157400
- /* 260 */ 1215, 1215, 1215, 1215, 1557, 1215, 1475, 1302, 1320, 1320,
157401
- /* 270 */ 1320, 1320, 1322, 1303, 1301, 1314, 1247, 1222, 1602, 1380,
157402
- /* 280 */ 1369, 1321, 1343, 1369, 1343, 1599, 1367, 1380, 1380, 1367,
157403
- /* 290 */ 1380, 1321, 1599, 1263, 1579, 1258, 1354, 1354, 1354, 1343,
157404
- /* 300 */ 1348, 1348, 1442, 1321, 1314, 1215, 1602, 1329, 1329, 1601,
157405
- /* 310 */ 1601, 1329, 1463, 1586, 1389, 1291, 1297, 1297, 1297, 1297,
157406
- /* 320 */ 1329, 1233, 1367, 1586, 1586, 1367, 1389, 1291, 1367, 1291,
157407
- /* 330 */ 1367, 1329, 1233, 1479, 1596, 1329, 1233, 1453, 1329, 1233,
157408
- /* 340 */ 1329, 1233, 1453, 1289, 1289, 1289, 1278, 1215, 1215, 1453,
157409
- /* 350 */ 1289, 1263, 1289, 1278, 1289, 1289, 1546, 1453, 1457, 1457,
157410
- /* 360 */ 1453, 1347, 1342, 1347, 1342, 1347, 1342, 1347, 1342, 1329,
157411
- /* 370 */ 1538, 1538, 1357, 1357, 1362, 1348, 1448, 1329, 1215, 1362,
157412
- /* 380 */ 1360, 1358, 1367, 1239, 1281, 1560, 1560, 1556, 1556, 1556,
157413
- /* 390 */ 1607, 1607, 1511, 1572, 1246, 1246, 1246, 1246, 1572, 1265,
157414
- /* 400 */ 1265, 1247, 1247, 1246, 1572, 1215, 1215, 1215, 1215, 1215,
157415
- /* 410 */ 1215, 1567, 1215, 1464, 1333, 1215, 1215, 1215, 1215, 1215,
157416
- /* 420 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157417
- /* 430 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1394,
157418
- /* 440 */ 1215, 1218, 1508, 1215, 1215, 1506, 1215, 1215, 1215, 1215,
157419
- /* 450 */ 1215, 1215, 1371, 1372, 1334, 1215, 1215, 1215, 1215, 1215,
157420
- /* 460 */ 1215, 1215, 1386, 1215, 1215, 1215, 1381, 1215, 1215, 1215,
157421
- /* 470 */ 1215, 1215, 1215, 1215, 1215, 1598, 1215, 1215, 1215, 1215,
157422
- /* 480 */ 1215, 1215, 1478, 1477, 1215, 1215, 1331, 1215, 1215, 1215,
157423
- /* 490 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157424
- /* 500 */ 1261, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157425
- /* 510 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157426
- /* 520 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1359, 1215, 1215,
157427
- /* 530 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157428
- /* 540 */ 1215, 1215, 1543, 1349, 1215, 1215, 1589, 1215, 1215, 1215,
157429
- /* 550 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157430
- /* 560 */ 1215, 1583, 1305, 1396, 1215, 1395, 1399, 1215, 1227, 1215,
157431
- /* 570 */ 1215,
157648
+ /* 0 */ 1615, 1615, 1615, 1449, 1219, 1328, 1219, 1219, 1219, 1449,
157649
+ /* 10 */ 1449, 1449, 1219, 1358, 1358, 1502, 1250, 1219, 1219, 1219,
157650
+ /* 20 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1448, 1219, 1219,
157651
+ /* 30 */ 1219, 1219, 1533, 1533, 1219, 1219, 1219, 1219, 1219, 1219,
157652
+ /* 40 */ 1219, 1219, 1219, 1367, 1219, 1374, 1219, 1219, 1219, 1219,
157653
+ /* 50 */ 1219, 1450, 1451, 1219, 1219, 1219, 1501, 1503, 1466, 1381,
157654
+ /* 60 */ 1380, 1379, 1378, 1484, 1345, 1372, 1365, 1369, 1444, 1445,
157655
+ /* 70 */ 1443, 1447, 1451, 1450, 1219, 1368, 1415, 1429, 1414, 1219,
157656
+ /* 80 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157657
+ /* 90 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157658
+ /* 100 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157659
+ /* 110 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157660
+ /* 120 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1423, 1428,
157661
+ /* 130 */ 1434, 1427, 1424, 1417, 1416, 1418, 1419, 1219, 1240, 1292,
157662
+ /* 140 */ 1219, 1219, 1219, 1219, 1521, 1520, 1219, 1219, 1250, 1409,
157663
+ /* 150 */ 1408, 1420, 1421, 1431, 1430, 1509, 1568, 1567, 1467, 1219,
157664
+ /* 160 */ 1219, 1219, 1219, 1219, 1219, 1219, 1533, 1219, 1219, 1219,
157665
+ /* 170 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157666
+ /* 180 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157667
+ /* 190 */ 1219, 1533, 1533, 1219, 1250, 1533, 1533, 1246, 1246, 1352,
157668
+ /* 200 */ 1219, 1516, 1319, 1319, 1319, 1319, 1328, 1319, 1219, 1219,
157669
+ /* 210 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157670
+ /* 220 */ 1219, 1219, 1219, 1506, 1504, 1219, 1219, 1219, 1219, 1219,
157671
+ /* 230 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157672
+ /* 240 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157673
+ /* 250 */ 1219, 1219, 1219, 1324, 1219, 1219, 1219, 1219, 1219, 1219,
157674
+ /* 260 */ 1219, 1219, 1219, 1219, 1219, 1562, 1219, 1479, 1306, 1324,
157675
+ /* 270 */ 1324, 1324, 1324, 1326, 1307, 1305, 1318, 1251, 1226, 1607,
157676
+ /* 280 */ 1384, 1373, 1325, 1347, 1373, 1347, 1604, 1371, 1384, 1384,
157677
+ /* 290 */ 1371, 1384, 1325, 1604, 1267, 1584, 1262, 1358, 1358, 1358,
157678
+ /* 300 */ 1347, 1352, 1352, 1446, 1325, 1318, 1219, 1607, 1607, 1333,
157679
+ /* 310 */ 1333, 1606, 1606, 1333, 1467, 1591, 1393, 1295, 1301, 1301,
157680
+ /* 320 */ 1301, 1301, 1333, 1237, 1371, 1591, 1591, 1371, 1393, 1295,
157681
+ /* 330 */ 1371, 1295, 1371, 1333, 1237, 1483, 1601, 1333, 1237, 1457,
157682
+ /* 340 */ 1333, 1237, 1333, 1237, 1457, 1293, 1293, 1293, 1282, 1219,
157683
+ /* 350 */ 1219, 1457, 1293, 1267, 1293, 1282, 1293, 1293, 1551, 1457,
157684
+ /* 360 */ 1461, 1461, 1457, 1351, 1346, 1351, 1346, 1351, 1346, 1351,
157685
+ /* 370 */ 1346, 1333, 1543, 1543, 1361, 1361, 1366, 1352, 1452, 1333,
157686
+ /* 380 */ 1219, 1366, 1364, 1362, 1371, 1243, 1285, 1565, 1565, 1561,
157687
+ /* 390 */ 1561, 1561, 1612, 1612, 1516, 1577, 1250, 1250, 1250, 1250,
157688
+ /* 400 */ 1577, 1269, 1269, 1251, 1251, 1250, 1577, 1219, 1219, 1219,
157689
+ /* 410 */ 1219, 1219, 1219, 1572, 1219, 1511, 1468, 1337, 1219, 1219,
157690
+ /* 420 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157691
+ /* 430 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157692
+ /* 440 */ 1219, 1219, 1398, 1219, 1222, 1513, 1219, 1219, 1219, 1219,
157693
+ /* 450 */ 1219, 1219, 1219, 1219, 1375, 1376, 1338, 1219, 1219, 1219,
157694
+ /* 460 */ 1219, 1219, 1219, 1219, 1390, 1219, 1219, 1219, 1385, 1219,
157695
+ /* 470 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1603, 1219, 1219,
157696
+ /* 480 */ 1219, 1219, 1219, 1219, 1482, 1481, 1219, 1219, 1335, 1219,
157697
+ /* 490 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157698
+ /* 500 */ 1219, 1219, 1265, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157699
+ /* 510 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157700
+ /* 520 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1363,
157701
+ /* 530 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157702
+ /* 540 */ 1219, 1219, 1219, 1219, 1548, 1353, 1219, 1219, 1594, 1219,
157703
+ /* 550 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157704
+ /* 560 */ 1219, 1219, 1219, 1588, 1309, 1400, 1219, 1399, 1403, 1219,
157705
+ /* 570 */ 1231, 1219, 1219,
157432157706
};
157433157707
/********** End of lemon-generated parsing tables *****************************/
157434157708
157435157709
/* The next table maps tokens (terminal symbols) into fallback tokens.
157436157710
** If a construct like the following:
@@ -158324,115 +158598,116 @@
158324158598
/* 283 */ "cmd ::= REINDEX nm dbnm",
158325158599
/* 284 */ "cmd ::= ANALYZE",
158326158600
/* 285 */ "cmd ::= ANALYZE nm dbnm",
158327158601
/* 286 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
158328158602
/* 287 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
158329
- /* 288 */ "add_column_fullname ::= fullname",
158330
- /* 289 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
158331
- /* 290 */ "cmd ::= create_vtab",
158332
- /* 291 */ "cmd ::= create_vtab LP vtabarglist RP",
158333
- /* 292 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
158334
- /* 293 */ "vtabarg ::=",
158335
- /* 294 */ "vtabargtoken ::= ANY",
158336
- /* 295 */ "vtabargtoken ::= lp anylist RP",
158337
- /* 296 */ "lp ::= LP",
158338
- /* 297 */ "with ::= WITH wqlist",
158339
- /* 298 */ "with ::= WITH RECURSIVE wqlist",
158340
- /* 299 */ "wqlist ::= nm eidlist_opt AS LP select RP",
158341
- /* 300 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP",
158342
- /* 301 */ "windowdefn_list ::= windowdefn",
158343
- /* 302 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
158344
- /* 303 */ "windowdefn ::= nm AS LP window RP",
158345
- /* 304 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
158346
- /* 305 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
158347
- /* 306 */ "window ::= ORDER BY sortlist frame_opt",
158348
- /* 307 */ "window ::= nm ORDER BY sortlist frame_opt",
158349
- /* 308 */ "window ::= frame_opt",
158350
- /* 309 */ "window ::= nm frame_opt",
158351
- /* 310 */ "frame_opt ::=",
158352
- /* 311 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
158353
- /* 312 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
158354
- /* 313 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
158355
- /* 314 */ "frame_bound_s ::= frame_bound",
158356
- /* 315 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
158357
- /* 316 */ "frame_bound_e ::= frame_bound",
158358
- /* 317 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
158359
- /* 318 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
158360
- /* 319 */ "frame_bound ::= CURRENT ROW",
158361
- /* 320 */ "frame_exclude_opt ::=",
158362
- /* 321 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
158363
- /* 322 */ "frame_exclude ::= NO OTHERS",
158364
- /* 323 */ "frame_exclude ::= CURRENT ROW",
158365
- /* 324 */ "frame_exclude ::= GROUP|TIES",
158366
- /* 325 */ "window_clause ::= WINDOW windowdefn_list",
158367
- /* 326 */ "filter_over ::= filter_clause over_clause",
158368
- /* 327 */ "filter_over ::= over_clause",
158369
- /* 328 */ "filter_over ::= filter_clause",
158370
- /* 329 */ "over_clause ::= OVER LP window RP",
158371
- /* 330 */ "over_clause ::= OVER nm",
158372
- /* 331 */ "filter_clause ::= FILTER LP WHERE expr RP",
158373
- /* 332 */ "input ::= cmdlist",
158374
- /* 333 */ "cmdlist ::= cmdlist ecmd",
158375
- /* 334 */ "cmdlist ::= ecmd",
158376
- /* 335 */ "ecmd ::= SEMI",
158377
- /* 336 */ "ecmd ::= cmdx SEMI",
158378
- /* 337 */ "ecmd ::= explain cmdx SEMI",
158379
- /* 338 */ "trans_opt ::=",
158380
- /* 339 */ "trans_opt ::= TRANSACTION",
158381
- /* 340 */ "trans_opt ::= TRANSACTION nm",
158382
- /* 341 */ "savepoint_opt ::= SAVEPOINT",
158383
- /* 342 */ "savepoint_opt ::=",
158384
- /* 343 */ "cmd ::= create_table create_table_args",
158385
- /* 344 */ "columnlist ::= columnlist COMMA columnname carglist",
158386
- /* 345 */ "columnlist ::= columnname carglist",
158387
- /* 346 */ "nm ::= ID|INDEXED",
158388
- /* 347 */ "nm ::= STRING",
158389
- /* 348 */ "nm ::= JOIN_KW",
158390
- /* 349 */ "typetoken ::= typename",
158391
- /* 350 */ "typename ::= ID|STRING",
158392
- /* 351 */ "signed ::= plus_num",
158393
- /* 352 */ "signed ::= minus_num",
158394
- /* 353 */ "carglist ::= carglist ccons",
158395
- /* 354 */ "carglist ::=",
158396
- /* 355 */ "ccons ::= NULL onconf",
158397
- /* 356 */ "ccons ::= GENERATED ALWAYS AS generated",
158398
- /* 357 */ "ccons ::= AS generated",
158399
- /* 358 */ "conslist_opt ::= COMMA conslist",
158400
- /* 359 */ "conslist ::= conslist tconscomma tcons",
158401
- /* 360 */ "conslist ::= tcons",
158402
- /* 361 */ "tconscomma ::=",
158403
- /* 362 */ "defer_subclause_opt ::= defer_subclause",
158404
- /* 363 */ "resolvetype ::= raisetype",
158405
- /* 364 */ "selectnowith ::= oneselect",
158406
- /* 365 */ "oneselect ::= values",
158407
- /* 366 */ "sclp ::= selcollist COMMA",
158408
- /* 367 */ "as ::= ID|STRING",
158409
- /* 368 */ "returning ::=",
158410
- /* 369 */ "expr ::= term",
158411
- /* 370 */ "likeop ::= LIKE_KW|MATCH",
158412
- /* 371 */ "exprlist ::= nexprlist",
158413
- /* 372 */ "nmnum ::= plus_num",
158414
- /* 373 */ "nmnum ::= nm",
158415
- /* 374 */ "nmnum ::= ON",
158416
- /* 375 */ "nmnum ::= DELETE",
158417
- /* 376 */ "nmnum ::= DEFAULT",
158418
- /* 377 */ "plus_num ::= INTEGER|FLOAT",
158419
- /* 378 */ "foreach_clause ::=",
158420
- /* 379 */ "foreach_clause ::= FOR EACH ROW",
158421
- /* 380 */ "trnm ::= nm",
158422
- /* 381 */ "tridxby ::=",
158423
- /* 382 */ "database_kw_opt ::= DATABASE",
158424
- /* 383 */ "database_kw_opt ::=",
158425
- /* 384 */ "kwcolumn_opt ::=",
158426
- /* 385 */ "kwcolumn_opt ::= COLUMNKW",
158427
- /* 386 */ "vtabarglist ::= vtabarg",
158428
- /* 387 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
158429
- /* 388 */ "vtabarg ::= vtabarg vtabargtoken",
158430
- /* 389 */ "anylist ::=",
158431
- /* 390 */ "anylist ::= anylist LP anylist RP",
158432
- /* 391 */ "anylist ::= anylist ANY",
158433
- /* 392 */ "with ::=",
158603
+ /* 288 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm",
158604
+ /* 289 */ "add_column_fullname ::= fullname",
158605
+ /* 290 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
158606
+ /* 291 */ "cmd ::= create_vtab",
158607
+ /* 292 */ "cmd ::= create_vtab LP vtabarglist RP",
158608
+ /* 293 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
158609
+ /* 294 */ "vtabarg ::=",
158610
+ /* 295 */ "vtabargtoken ::= ANY",
158611
+ /* 296 */ "vtabargtoken ::= lp anylist RP",
158612
+ /* 297 */ "lp ::= LP",
158613
+ /* 298 */ "with ::= WITH wqlist",
158614
+ /* 299 */ "with ::= WITH RECURSIVE wqlist",
158615
+ /* 300 */ "wqlist ::= nm eidlist_opt AS LP select RP",
158616
+ /* 301 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP",
158617
+ /* 302 */ "windowdefn_list ::= windowdefn",
158618
+ /* 303 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
158619
+ /* 304 */ "windowdefn ::= nm AS LP window RP",
158620
+ /* 305 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
158621
+ /* 306 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
158622
+ /* 307 */ "window ::= ORDER BY sortlist frame_opt",
158623
+ /* 308 */ "window ::= nm ORDER BY sortlist frame_opt",
158624
+ /* 309 */ "window ::= frame_opt",
158625
+ /* 310 */ "window ::= nm frame_opt",
158626
+ /* 311 */ "frame_opt ::=",
158627
+ /* 312 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
158628
+ /* 313 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
158629
+ /* 314 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
158630
+ /* 315 */ "frame_bound_s ::= frame_bound",
158631
+ /* 316 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
158632
+ /* 317 */ "frame_bound_e ::= frame_bound",
158633
+ /* 318 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
158634
+ /* 319 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
158635
+ /* 320 */ "frame_bound ::= CURRENT ROW",
158636
+ /* 321 */ "frame_exclude_opt ::=",
158637
+ /* 322 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
158638
+ /* 323 */ "frame_exclude ::= NO OTHERS",
158639
+ /* 324 */ "frame_exclude ::= CURRENT ROW",
158640
+ /* 325 */ "frame_exclude ::= GROUP|TIES",
158641
+ /* 326 */ "window_clause ::= WINDOW windowdefn_list",
158642
+ /* 327 */ "filter_over ::= filter_clause over_clause",
158643
+ /* 328 */ "filter_over ::= over_clause",
158644
+ /* 329 */ "filter_over ::= filter_clause",
158645
+ /* 330 */ "over_clause ::= OVER LP window RP",
158646
+ /* 331 */ "over_clause ::= OVER nm",
158647
+ /* 332 */ "filter_clause ::= FILTER LP WHERE expr RP",
158648
+ /* 333 */ "input ::= cmdlist",
158649
+ /* 334 */ "cmdlist ::= cmdlist ecmd",
158650
+ /* 335 */ "cmdlist ::= ecmd",
158651
+ /* 336 */ "ecmd ::= SEMI",
158652
+ /* 337 */ "ecmd ::= cmdx SEMI",
158653
+ /* 338 */ "ecmd ::= explain cmdx SEMI",
158654
+ /* 339 */ "trans_opt ::=",
158655
+ /* 340 */ "trans_opt ::= TRANSACTION",
158656
+ /* 341 */ "trans_opt ::= TRANSACTION nm",
158657
+ /* 342 */ "savepoint_opt ::= SAVEPOINT",
158658
+ /* 343 */ "savepoint_opt ::=",
158659
+ /* 344 */ "cmd ::= create_table create_table_args",
158660
+ /* 345 */ "columnlist ::= columnlist COMMA columnname carglist",
158661
+ /* 346 */ "columnlist ::= columnname carglist",
158662
+ /* 347 */ "nm ::= ID|INDEXED",
158663
+ /* 348 */ "nm ::= STRING",
158664
+ /* 349 */ "nm ::= JOIN_KW",
158665
+ /* 350 */ "typetoken ::= typename",
158666
+ /* 351 */ "typename ::= ID|STRING",
158667
+ /* 352 */ "signed ::= plus_num",
158668
+ /* 353 */ "signed ::= minus_num",
158669
+ /* 354 */ "carglist ::= carglist ccons",
158670
+ /* 355 */ "carglist ::=",
158671
+ /* 356 */ "ccons ::= NULL onconf",
158672
+ /* 357 */ "ccons ::= GENERATED ALWAYS AS generated",
158673
+ /* 358 */ "ccons ::= AS generated",
158674
+ /* 359 */ "conslist_opt ::= COMMA conslist",
158675
+ /* 360 */ "conslist ::= conslist tconscomma tcons",
158676
+ /* 361 */ "conslist ::= tcons",
158677
+ /* 362 */ "tconscomma ::=",
158678
+ /* 363 */ "defer_subclause_opt ::= defer_subclause",
158679
+ /* 364 */ "resolvetype ::= raisetype",
158680
+ /* 365 */ "selectnowith ::= oneselect",
158681
+ /* 366 */ "oneselect ::= values",
158682
+ /* 367 */ "sclp ::= selcollist COMMA",
158683
+ /* 368 */ "as ::= ID|STRING",
158684
+ /* 369 */ "returning ::=",
158685
+ /* 370 */ "expr ::= term",
158686
+ /* 371 */ "likeop ::= LIKE_KW|MATCH",
158687
+ /* 372 */ "exprlist ::= nexprlist",
158688
+ /* 373 */ "nmnum ::= plus_num",
158689
+ /* 374 */ "nmnum ::= nm",
158690
+ /* 375 */ "nmnum ::= ON",
158691
+ /* 376 */ "nmnum ::= DELETE",
158692
+ /* 377 */ "nmnum ::= DEFAULT",
158693
+ /* 378 */ "plus_num ::= INTEGER|FLOAT",
158694
+ /* 379 */ "foreach_clause ::=",
158695
+ /* 380 */ "foreach_clause ::= FOR EACH ROW",
158696
+ /* 381 */ "trnm ::= nm",
158697
+ /* 382 */ "tridxby ::=",
158698
+ /* 383 */ "database_kw_opt ::= DATABASE",
158699
+ /* 384 */ "database_kw_opt ::=",
158700
+ /* 385 */ "kwcolumn_opt ::=",
158701
+ /* 386 */ "kwcolumn_opt ::= COLUMNKW",
158702
+ /* 387 */ "vtabarglist ::= vtabarg",
158703
+ /* 388 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
158704
+ /* 389 */ "vtabarg ::= vtabarg vtabargtoken",
158705
+ /* 390 */ "anylist ::=",
158706
+ /* 391 */ "anylist ::= anylist LP anylist RP",
158707
+ /* 392 */ "anylist ::= anylist ANY",
158708
+ /* 393 */ "with ::=",
158434158709
};
158435158710
#endif /* NDEBUG */
158436158711
158437158712
158438158713
#if YYSTACKDEPTH<=0
@@ -159225,115 +159500,116 @@
159225159500
187, /* (283) cmd ::= REINDEX nm dbnm */
159226159501
187, /* (284) cmd ::= ANALYZE */
159227159502
187, /* (285) cmd ::= ANALYZE nm dbnm */
159228159503
187, /* (286) cmd ::= ALTER TABLE fullname RENAME TO nm */
159229159504
187, /* (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
159230
- 292, /* (288) add_column_fullname ::= fullname */
159231
- 187, /* (289) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
159232
- 187, /* (290) cmd ::= create_vtab */
159233
- 187, /* (291) cmd ::= create_vtab LP vtabarglist RP */
159234
- 294, /* (292) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
159235
- 296, /* (293) vtabarg ::= */
159236
- 297, /* (294) vtabargtoken ::= ANY */
159237
- 297, /* (295) vtabargtoken ::= lp anylist RP */
159238
- 298, /* (296) lp ::= LP */
159239
- 262, /* (297) with ::= WITH wqlist */
159240
- 262, /* (298) with ::= WITH RECURSIVE wqlist */
159241
- 237, /* (299) wqlist ::= nm eidlist_opt AS LP select RP */
159242
- 237, /* (300) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
159243
- 300, /* (301) windowdefn_list ::= windowdefn */
159244
- 300, /* (302) windowdefn_list ::= windowdefn_list COMMA windowdefn */
159245
- 301, /* (303) windowdefn ::= nm AS LP window RP */
159246
- 302, /* (304) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
159247
- 302, /* (305) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
159248
- 302, /* (306) window ::= ORDER BY sortlist frame_opt */
159249
- 302, /* (307) window ::= nm ORDER BY sortlist frame_opt */
159250
- 302, /* (308) window ::= frame_opt */
159251
- 302, /* (309) window ::= nm frame_opt */
159252
- 303, /* (310) frame_opt ::= */
159253
- 303, /* (311) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
159254
- 303, /* (312) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
159255
- 307, /* (313) range_or_rows ::= RANGE|ROWS|GROUPS */
159256
- 309, /* (314) frame_bound_s ::= frame_bound */
159257
- 309, /* (315) frame_bound_s ::= UNBOUNDED PRECEDING */
159258
- 310, /* (316) frame_bound_e ::= frame_bound */
159259
- 310, /* (317) frame_bound_e ::= UNBOUNDED FOLLOWING */
159260
- 308, /* (318) frame_bound ::= expr PRECEDING|FOLLOWING */
159261
- 308, /* (319) frame_bound ::= CURRENT ROW */
159262
- 311, /* (320) frame_exclude_opt ::= */
159263
- 311, /* (321) frame_exclude_opt ::= EXCLUDE frame_exclude */
159264
- 312, /* (322) frame_exclude ::= NO OTHERS */
159265
- 312, /* (323) frame_exclude ::= CURRENT ROW */
159266
- 312, /* (324) frame_exclude ::= GROUP|TIES */
159267
- 247, /* (325) window_clause ::= WINDOW windowdefn_list */
159268
- 269, /* (326) filter_over ::= filter_clause over_clause */
159269
- 269, /* (327) filter_over ::= over_clause */
159270
- 269, /* (328) filter_over ::= filter_clause */
159271
- 306, /* (329) over_clause ::= OVER LP window RP */
159272
- 306, /* (330) over_clause ::= OVER nm */
159273
- 305, /* (331) filter_clause ::= FILTER LP WHERE expr RP */
159274
- 182, /* (332) input ::= cmdlist */
159275
- 183, /* (333) cmdlist ::= cmdlist ecmd */
159276
- 183, /* (334) cmdlist ::= ecmd */
159277
- 184, /* (335) ecmd ::= SEMI */
159278
- 184, /* (336) ecmd ::= cmdx SEMI */
159279
- 184, /* (337) ecmd ::= explain cmdx SEMI */
159280
- 189, /* (338) trans_opt ::= */
159281
- 189, /* (339) trans_opt ::= TRANSACTION */
159282
- 189, /* (340) trans_opt ::= TRANSACTION nm */
159283
- 191, /* (341) savepoint_opt ::= SAVEPOINT */
159284
- 191, /* (342) savepoint_opt ::= */
159285
- 187, /* (343) cmd ::= create_table create_table_args */
159286
- 198, /* (344) columnlist ::= columnlist COMMA columnname carglist */
159287
- 198, /* (345) columnlist ::= columnname carglist */
159288
- 190, /* (346) nm ::= ID|INDEXED */
159289
- 190, /* (347) nm ::= STRING */
159290
- 190, /* (348) nm ::= JOIN_KW */
159291
- 204, /* (349) typetoken ::= typename */
159292
- 205, /* (350) typename ::= ID|STRING */
159293
- 206, /* (351) signed ::= plus_num */
159294
- 206, /* (352) signed ::= minus_num */
159295
- 203, /* (353) carglist ::= carglist ccons */
159296
- 203, /* (354) carglist ::= */
159297
- 211, /* (355) ccons ::= NULL onconf */
159298
- 211, /* (356) ccons ::= GENERATED ALWAYS AS generated */
159299
- 211, /* (357) ccons ::= AS generated */
159300
- 199, /* (358) conslist_opt ::= COMMA conslist */
159301
- 224, /* (359) conslist ::= conslist tconscomma tcons */
159302
- 224, /* (360) conslist ::= tcons */
159303
- 225, /* (361) tconscomma ::= */
159304
- 229, /* (362) defer_subclause_opt ::= defer_subclause */
159305
- 231, /* (363) resolvetype ::= raisetype */
159306
- 235, /* (364) selectnowith ::= oneselect */
159307
- 236, /* (365) oneselect ::= values */
159308
- 250, /* (366) sclp ::= selcollist COMMA */
159309
- 251, /* (367) as ::= ID|STRING */
159310
- 268, /* (368) returning ::= */
159311
- 213, /* (369) expr ::= term */
159312
- 270, /* (370) likeop ::= LIKE_KW|MATCH */
159313
- 258, /* (371) exprlist ::= nexprlist */
159314
- 280, /* (372) nmnum ::= plus_num */
159315
- 280, /* (373) nmnum ::= nm */
159316
- 280, /* (374) nmnum ::= ON */
159317
- 280, /* (375) nmnum ::= DELETE */
159318
- 280, /* (376) nmnum ::= DEFAULT */
159319
- 207, /* (377) plus_num ::= INTEGER|FLOAT */
159320
- 285, /* (378) foreach_clause ::= */
159321
- 285, /* (379) foreach_clause ::= FOR EACH ROW */
159322
- 288, /* (380) trnm ::= nm */
159323
- 289, /* (381) tridxby ::= */
159324
- 290, /* (382) database_kw_opt ::= DATABASE */
159325
- 290, /* (383) database_kw_opt ::= */
159326
- 293, /* (384) kwcolumn_opt ::= */
159327
- 293, /* (385) kwcolumn_opt ::= COLUMNKW */
159328
- 295, /* (386) vtabarglist ::= vtabarg */
159329
- 295, /* (387) vtabarglist ::= vtabarglist COMMA vtabarg */
159330
- 296, /* (388) vtabarg ::= vtabarg vtabargtoken */
159331
- 299, /* (389) anylist ::= */
159332
- 299, /* (390) anylist ::= anylist LP anylist RP */
159333
- 299, /* (391) anylist ::= anylist ANY */
159334
- 262, /* (392) with ::= */
159505
+ 187, /* (288) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
159506
+ 292, /* (289) add_column_fullname ::= fullname */
159507
+ 187, /* (290) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
159508
+ 187, /* (291) cmd ::= create_vtab */
159509
+ 187, /* (292) cmd ::= create_vtab LP vtabarglist RP */
159510
+ 294, /* (293) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
159511
+ 296, /* (294) vtabarg ::= */
159512
+ 297, /* (295) vtabargtoken ::= ANY */
159513
+ 297, /* (296) vtabargtoken ::= lp anylist RP */
159514
+ 298, /* (297) lp ::= LP */
159515
+ 262, /* (298) with ::= WITH wqlist */
159516
+ 262, /* (299) with ::= WITH RECURSIVE wqlist */
159517
+ 237, /* (300) wqlist ::= nm eidlist_opt AS LP select RP */
159518
+ 237, /* (301) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
159519
+ 300, /* (302) windowdefn_list ::= windowdefn */
159520
+ 300, /* (303) windowdefn_list ::= windowdefn_list COMMA windowdefn */
159521
+ 301, /* (304) windowdefn ::= nm AS LP window RP */
159522
+ 302, /* (305) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
159523
+ 302, /* (306) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
159524
+ 302, /* (307) window ::= ORDER BY sortlist frame_opt */
159525
+ 302, /* (308) window ::= nm ORDER BY sortlist frame_opt */
159526
+ 302, /* (309) window ::= frame_opt */
159527
+ 302, /* (310) window ::= nm frame_opt */
159528
+ 303, /* (311) frame_opt ::= */
159529
+ 303, /* (312) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
159530
+ 303, /* (313) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
159531
+ 307, /* (314) range_or_rows ::= RANGE|ROWS|GROUPS */
159532
+ 309, /* (315) frame_bound_s ::= frame_bound */
159533
+ 309, /* (316) frame_bound_s ::= UNBOUNDED PRECEDING */
159534
+ 310, /* (317) frame_bound_e ::= frame_bound */
159535
+ 310, /* (318) frame_bound_e ::= UNBOUNDED FOLLOWING */
159536
+ 308, /* (319) frame_bound ::= expr PRECEDING|FOLLOWING */
159537
+ 308, /* (320) frame_bound ::= CURRENT ROW */
159538
+ 311, /* (321) frame_exclude_opt ::= */
159539
+ 311, /* (322) frame_exclude_opt ::= EXCLUDE frame_exclude */
159540
+ 312, /* (323) frame_exclude ::= NO OTHERS */
159541
+ 312, /* (324) frame_exclude ::= CURRENT ROW */
159542
+ 312, /* (325) frame_exclude ::= GROUP|TIES */
159543
+ 247, /* (326) window_clause ::= WINDOW windowdefn_list */
159544
+ 269, /* (327) filter_over ::= filter_clause over_clause */
159545
+ 269, /* (328) filter_over ::= over_clause */
159546
+ 269, /* (329) filter_over ::= filter_clause */
159547
+ 306, /* (330) over_clause ::= OVER LP window RP */
159548
+ 306, /* (331) over_clause ::= OVER nm */
159549
+ 305, /* (332) filter_clause ::= FILTER LP WHERE expr RP */
159550
+ 182, /* (333) input ::= cmdlist */
159551
+ 183, /* (334) cmdlist ::= cmdlist ecmd */
159552
+ 183, /* (335) cmdlist ::= ecmd */
159553
+ 184, /* (336) ecmd ::= SEMI */
159554
+ 184, /* (337) ecmd ::= cmdx SEMI */
159555
+ 184, /* (338) ecmd ::= explain cmdx SEMI */
159556
+ 189, /* (339) trans_opt ::= */
159557
+ 189, /* (340) trans_opt ::= TRANSACTION */
159558
+ 189, /* (341) trans_opt ::= TRANSACTION nm */
159559
+ 191, /* (342) savepoint_opt ::= SAVEPOINT */
159560
+ 191, /* (343) savepoint_opt ::= */
159561
+ 187, /* (344) cmd ::= create_table create_table_args */
159562
+ 198, /* (345) columnlist ::= columnlist COMMA columnname carglist */
159563
+ 198, /* (346) columnlist ::= columnname carglist */
159564
+ 190, /* (347) nm ::= ID|INDEXED */
159565
+ 190, /* (348) nm ::= STRING */
159566
+ 190, /* (349) nm ::= JOIN_KW */
159567
+ 204, /* (350) typetoken ::= typename */
159568
+ 205, /* (351) typename ::= ID|STRING */
159569
+ 206, /* (352) signed ::= plus_num */
159570
+ 206, /* (353) signed ::= minus_num */
159571
+ 203, /* (354) carglist ::= carglist ccons */
159572
+ 203, /* (355) carglist ::= */
159573
+ 211, /* (356) ccons ::= NULL onconf */
159574
+ 211, /* (357) ccons ::= GENERATED ALWAYS AS generated */
159575
+ 211, /* (358) ccons ::= AS generated */
159576
+ 199, /* (359) conslist_opt ::= COMMA conslist */
159577
+ 224, /* (360) conslist ::= conslist tconscomma tcons */
159578
+ 224, /* (361) conslist ::= tcons */
159579
+ 225, /* (362) tconscomma ::= */
159580
+ 229, /* (363) defer_subclause_opt ::= defer_subclause */
159581
+ 231, /* (364) resolvetype ::= raisetype */
159582
+ 235, /* (365) selectnowith ::= oneselect */
159583
+ 236, /* (366) oneselect ::= values */
159584
+ 250, /* (367) sclp ::= selcollist COMMA */
159585
+ 251, /* (368) as ::= ID|STRING */
159586
+ 268, /* (369) returning ::= */
159587
+ 213, /* (370) expr ::= term */
159588
+ 270, /* (371) likeop ::= LIKE_KW|MATCH */
159589
+ 258, /* (372) exprlist ::= nexprlist */
159590
+ 280, /* (373) nmnum ::= plus_num */
159591
+ 280, /* (374) nmnum ::= nm */
159592
+ 280, /* (375) nmnum ::= ON */
159593
+ 280, /* (376) nmnum ::= DELETE */
159594
+ 280, /* (377) nmnum ::= DEFAULT */
159595
+ 207, /* (378) plus_num ::= INTEGER|FLOAT */
159596
+ 285, /* (379) foreach_clause ::= */
159597
+ 285, /* (380) foreach_clause ::= FOR EACH ROW */
159598
+ 288, /* (381) trnm ::= nm */
159599
+ 289, /* (382) tridxby ::= */
159600
+ 290, /* (383) database_kw_opt ::= DATABASE */
159601
+ 290, /* (384) database_kw_opt ::= */
159602
+ 293, /* (385) kwcolumn_opt ::= */
159603
+ 293, /* (386) kwcolumn_opt ::= COLUMNKW */
159604
+ 295, /* (387) vtabarglist ::= vtabarg */
159605
+ 295, /* (388) vtabarglist ::= vtabarglist COMMA vtabarg */
159606
+ 296, /* (389) vtabarg ::= vtabarg vtabargtoken */
159607
+ 299, /* (390) anylist ::= */
159608
+ 299, /* (391) anylist ::= anylist LP anylist RP */
159609
+ 299, /* (392) anylist ::= anylist ANY */
159610
+ 262, /* (393) with ::= */
159335159611
};
159336159612
159337159613
/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
159338159614
** of symbols on the right-hand side of that rule. */
159339159615
static const signed char yyRuleInfoNRhs[] = {
@@ -159623,115 +159899,116 @@
159623159899
-3, /* (283) cmd ::= REINDEX nm dbnm */
159624159900
-1, /* (284) cmd ::= ANALYZE */
159625159901
-3, /* (285) cmd ::= ANALYZE nm dbnm */
159626159902
-6, /* (286) cmd ::= ALTER TABLE fullname RENAME TO nm */
159627159903
-7, /* (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
159628
- -1, /* (288) add_column_fullname ::= fullname */
159629
- -8, /* (289) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
159630
- -1, /* (290) cmd ::= create_vtab */
159631
- -4, /* (291) cmd ::= create_vtab LP vtabarglist RP */
159632
- -8, /* (292) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
159633
- 0, /* (293) vtabarg ::= */
159634
- -1, /* (294) vtabargtoken ::= ANY */
159635
- -3, /* (295) vtabargtoken ::= lp anylist RP */
159636
- -1, /* (296) lp ::= LP */
159637
- -2, /* (297) with ::= WITH wqlist */
159638
- -3, /* (298) with ::= WITH RECURSIVE wqlist */
159639
- -6, /* (299) wqlist ::= nm eidlist_opt AS LP select RP */
159640
- -8, /* (300) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
159641
- -1, /* (301) windowdefn_list ::= windowdefn */
159642
- -3, /* (302) windowdefn_list ::= windowdefn_list COMMA windowdefn */
159643
- -5, /* (303) windowdefn ::= nm AS LP window RP */
159644
- -5, /* (304) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
159645
- -6, /* (305) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
159646
- -4, /* (306) window ::= ORDER BY sortlist frame_opt */
159647
- -5, /* (307) window ::= nm ORDER BY sortlist frame_opt */
159648
- -1, /* (308) window ::= frame_opt */
159649
- -2, /* (309) window ::= nm frame_opt */
159650
- 0, /* (310) frame_opt ::= */
159651
- -3, /* (311) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
159652
- -6, /* (312) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
159653
- -1, /* (313) range_or_rows ::= RANGE|ROWS|GROUPS */
159654
- -1, /* (314) frame_bound_s ::= frame_bound */
159655
- -2, /* (315) frame_bound_s ::= UNBOUNDED PRECEDING */
159656
- -1, /* (316) frame_bound_e ::= frame_bound */
159657
- -2, /* (317) frame_bound_e ::= UNBOUNDED FOLLOWING */
159658
- -2, /* (318) frame_bound ::= expr PRECEDING|FOLLOWING */
159659
- -2, /* (319) frame_bound ::= CURRENT ROW */
159660
- 0, /* (320) frame_exclude_opt ::= */
159661
- -2, /* (321) frame_exclude_opt ::= EXCLUDE frame_exclude */
159662
- -2, /* (322) frame_exclude ::= NO OTHERS */
159663
- -2, /* (323) frame_exclude ::= CURRENT ROW */
159664
- -1, /* (324) frame_exclude ::= GROUP|TIES */
159665
- -2, /* (325) window_clause ::= WINDOW windowdefn_list */
159666
- -2, /* (326) filter_over ::= filter_clause over_clause */
159667
- -1, /* (327) filter_over ::= over_clause */
159668
- -1, /* (328) filter_over ::= filter_clause */
159669
- -4, /* (329) over_clause ::= OVER LP window RP */
159670
- -2, /* (330) over_clause ::= OVER nm */
159671
- -5, /* (331) filter_clause ::= FILTER LP WHERE expr RP */
159672
- -1, /* (332) input ::= cmdlist */
159673
- -2, /* (333) cmdlist ::= cmdlist ecmd */
159674
- -1, /* (334) cmdlist ::= ecmd */
159675
- -1, /* (335) ecmd ::= SEMI */
159676
- -2, /* (336) ecmd ::= cmdx SEMI */
159677
- -3, /* (337) ecmd ::= explain cmdx SEMI */
159678
- 0, /* (338) trans_opt ::= */
159679
- -1, /* (339) trans_opt ::= TRANSACTION */
159680
- -2, /* (340) trans_opt ::= TRANSACTION nm */
159681
- -1, /* (341) savepoint_opt ::= SAVEPOINT */
159682
- 0, /* (342) savepoint_opt ::= */
159683
- -2, /* (343) cmd ::= create_table create_table_args */
159684
- -4, /* (344) columnlist ::= columnlist COMMA columnname carglist */
159685
- -2, /* (345) columnlist ::= columnname carglist */
159686
- -1, /* (346) nm ::= ID|INDEXED */
159687
- -1, /* (347) nm ::= STRING */
159688
- -1, /* (348) nm ::= JOIN_KW */
159689
- -1, /* (349) typetoken ::= typename */
159690
- -1, /* (350) typename ::= ID|STRING */
159691
- -1, /* (351) signed ::= plus_num */
159692
- -1, /* (352) signed ::= minus_num */
159693
- -2, /* (353) carglist ::= carglist ccons */
159694
- 0, /* (354) carglist ::= */
159695
- -2, /* (355) ccons ::= NULL onconf */
159696
- -4, /* (356) ccons ::= GENERATED ALWAYS AS generated */
159697
- -2, /* (357) ccons ::= AS generated */
159698
- -2, /* (358) conslist_opt ::= COMMA conslist */
159699
- -3, /* (359) conslist ::= conslist tconscomma tcons */
159700
- -1, /* (360) conslist ::= tcons */
159701
- 0, /* (361) tconscomma ::= */
159702
- -1, /* (362) defer_subclause_opt ::= defer_subclause */
159703
- -1, /* (363) resolvetype ::= raisetype */
159704
- -1, /* (364) selectnowith ::= oneselect */
159705
- -1, /* (365) oneselect ::= values */
159706
- -2, /* (366) sclp ::= selcollist COMMA */
159707
- -1, /* (367) as ::= ID|STRING */
159708
- 0, /* (368) returning ::= */
159709
- -1, /* (369) expr ::= term */
159710
- -1, /* (370) likeop ::= LIKE_KW|MATCH */
159711
- -1, /* (371) exprlist ::= nexprlist */
159712
- -1, /* (372) nmnum ::= plus_num */
159713
- -1, /* (373) nmnum ::= nm */
159714
- -1, /* (374) nmnum ::= ON */
159715
- -1, /* (375) nmnum ::= DELETE */
159716
- -1, /* (376) nmnum ::= DEFAULT */
159717
- -1, /* (377) plus_num ::= INTEGER|FLOAT */
159718
- 0, /* (378) foreach_clause ::= */
159719
- -3, /* (379) foreach_clause ::= FOR EACH ROW */
159720
- -1, /* (380) trnm ::= nm */
159721
- 0, /* (381) tridxby ::= */
159722
- -1, /* (382) database_kw_opt ::= DATABASE */
159723
- 0, /* (383) database_kw_opt ::= */
159724
- 0, /* (384) kwcolumn_opt ::= */
159725
- -1, /* (385) kwcolumn_opt ::= COLUMNKW */
159726
- -1, /* (386) vtabarglist ::= vtabarg */
159727
- -3, /* (387) vtabarglist ::= vtabarglist COMMA vtabarg */
159728
- -2, /* (388) vtabarg ::= vtabarg vtabargtoken */
159729
- 0, /* (389) anylist ::= */
159730
- -4, /* (390) anylist ::= anylist LP anylist RP */
159731
- -2, /* (391) anylist ::= anylist ANY */
159732
- 0, /* (392) with ::= */
159904
+ -6, /* (288) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
159905
+ -1, /* (289) add_column_fullname ::= fullname */
159906
+ -8, /* (290) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
159907
+ -1, /* (291) cmd ::= create_vtab */
159908
+ -4, /* (292) cmd ::= create_vtab LP vtabarglist RP */
159909
+ -8, /* (293) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
159910
+ 0, /* (294) vtabarg ::= */
159911
+ -1, /* (295) vtabargtoken ::= ANY */
159912
+ -3, /* (296) vtabargtoken ::= lp anylist RP */
159913
+ -1, /* (297) lp ::= LP */
159914
+ -2, /* (298) with ::= WITH wqlist */
159915
+ -3, /* (299) with ::= WITH RECURSIVE wqlist */
159916
+ -6, /* (300) wqlist ::= nm eidlist_opt AS LP select RP */
159917
+ -8, /* (301) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
159918
+ -1, /* (302) windowdefn_list ::= windowdefn */
159919
+ -3, /* (303) windowdefn_list ::= windowdefn_list COMMA windowdefn */
159920
+ -5, /* (304) windowdefn ::= nm AS LP window RP */
159921
+ -5, /* (305) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
159922
+ -6, /* (306) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
159923
+ -4, /* (307) window ::= ORDER BY sortlist frame_opt */
159924
+ -5, /* (308) window ::= nm ORDER BY sortlist frame_opt */
159925
+ -1, /* (309) window ::= frame_opt */
159926
+ -2, /* (310) window ::= nm frame_opt */
159927
+ 0, /* (311) frame_opt ::= */
159928
+ -3, /* (312) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
159929
+ -6, /* (313) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
159930
+ -1, /* (314) range_or_rows ::= RANGE|ROWS|GROUPS */
159931
+ -1, /* (315) frame_bound_s ::= frame_bound */
159932
+ -2, /* (316) frame_bound_s ::= UNBOUNDED PRECEDING */
159933
+ -1, /* (317) frame_bound_e ::= frame_bound */
159934
+ -2, /* (318) frame_bound_e ::= UNBOUNDED FOLLOWING */
159935
+ -2, /* (319) frame_bound ::= expr PRECEDING|FOLLOWING */
159936
+ -2, /* (320) frame_bound ::= CURRENT ROW */
159937
+ 0, /* (321) frame_exclude_opt ::= */
159938
+ -2, /* (322) frame_exclude_opt ::= EXCLUDE frame_exclude */
159939
+ -2, /* (323) frame_exclude ::= NO OTHERS */
159940
+ -2, /* (324) frame_exclude ::= CURRENT ROW */
159941
+ -1, /* (325) frame_exclude ::= GROUP|TIES */
159942
+ -2, /* (326) window_clause ::= WINDOW windowdefn_list */
159943
+ -2, /* (327) filter_over ::= filter_clause over_clause */
159944
+ -1, /* (328) filter_over ::= over_clause */
159945
+ -1, /* (329) filter_over ::= filter_clause */
159946
+ -4, /* (330) over_clause ::= OVER LP window RP */
159947
+ -2, /* (331) over_clause ::= OVER nm */
159948
+ -5, /* (332) filter_clause ::= FILTER LP WHERE expr RP */
159949
+ -1, /* (333) input ::= cmdlist */
159950
+ -2, /* (334) cmdlist ::= cmdlist ecmd */
159951
+ -1, /* (335) cmdlist ::= ecmd */
159952
+ -1, /* (336) ecmd ::= SEMI */
159953
+ -2, /* (337) ecmd ::= cmdx SEMI */
159954
+ -3, /* (338) ecmd ::= explain cmdx SEMI */
159955
+ 0, /* (339) trans_opt ::= */
159956
+ -1, /* (340) trans_opt ::= TRANSACTION */
159957
+ -2, /* (341) trans_opt ::= TRANSACTION nm */
159958
+ -1, /* (342) savepoint_opt ::= SAVEPOINT */
159959
+ 0, /* (343) savepoint_opt ::= */
159960
+ -2, /* (344) cmd ::= create_table create_table_args */
159961
+ -4, /* (345) columnlist ::= columnlist COMMA columnname carglist */
159962
+ -2, /* (346) columnlist ::= columnname carglist */
159963
+ -1, /* (347) nm ::= ID|INDEXED */
159964
+ -1, /* (348) nm ::= STRING */
159965
+ -1, /* (349) nm ::= JOIN_KW */
159966
+ -1, /* (350) typetoken ::= typename */
159967
+ -1, /* (351) typename ::= ID|STRING */
159968
+ -1, /* (352) signed ::= plus_num */
159969
+ -1, /* (353) signed ::= minus_num */
159970
+ -2, /* (354) carglist ::= carglist ccons */
159971
+ 0, /* (355) carglist ::= */
159972
+ -2, /* (356) ccons ::= NULL onconf */
159973
+ -4, /* (357) ccons ::= GENERATED ALWAYS AS generated */
159974
+ -2, /* (358) ccons ::= AS generated */
159975
+ -2, /* (359) conslist_opt ::= COMMA conslist */
159976
+ -3, /* (360) conslist ::= conslist tconscomma tcons */
159977
+ -1, /* (361) conslist ::= tcons */
159978
+ 0, /* (362) tconscomma ::= */
159979
+ -1, /* (363) defer_subclause_opt ::= defer_subclause */
159980
+ -1, /* (364) resolvetype ::= raisetype */
159981
+ -1, /* (365) selectnowith ::= oneselect */
159982
+ -1, /* (366) oneselect ::= values */
159983
+ -2, /* (367) sclp ::= selcollist COMMA */
159984
+ -1, /* (368) as ::= ID|STRING */
159985
+ 0, /* (369) returning ::= */
159986
+ -1, /* (370) expr ::= term */
159987
+ -1, /* (371) likeop ::= LIKE_KW|MATCH */
159988
+ -1, /* (372) exprlist ::= nexprlist */
159989
+ -1, /* (373) nmnum ::= plus_num */
159990
+ -1, /* (374) nmnum ::= nm */
159991
+ -1, /* (375) nmnum ::= ON */
159992
+ -1, /* (376) nmnum ::= DELETE */
159993
+ -1, /* (377) nmnum ::= DEFAULT */
159994
+ -1, /* (378) plus_num ::= INTEGER|FLOAT */
159995
+ 0, /* (379) foreach_clause ::= */
159996
+ -3, /* (380) foreach_clause ::= FOR EACH ROW */
159997
+ -1, /* (381) trnm ::= nm */
159998
+ 0, /* (382) tridxby ::= */
159999
+ -1, /* (383) database_kw_opt ::= DATABASE */
160000
+ 0, /* (384) database_kw_opt ::= */
160001
+ 0, /* (385) kwcolumn_opt ::= */
160002
+ -1, /* (386) kwcolumn_opt ::= COLUMNKW */
160003
+ -1, /* (387) vtabarglist ::= vtabarg */
160004
+ -3, /* (388) vtabarglist ::= vtabarglist COMMA vtabarg */
160005
+ -2, /* (389) vtabarg ::= vtabarg vtabargtoken */
160006
+ 0, /* (390) anylist ::= */
160007
+ -4, /* (391) anylist ::= anylist LP anylist RP */
160008
+ -2, /* (392) anylist ::= anylist ANY */
160009
+ 0, /* (393) with ::= */
159733160010
};
159734160011
159735160012
static void yy_accept(yyParser*); /* Forward Declaration */
159736160013
159737160014
/*
@@ -159787,11 +160064,11 @@
159787160064
{yymsp[1].minor.yy412 = TK_DEFERRED;}
159788160065
break;
159789160066
case 5: /* transtype ::= DEFERRED */
159790160067
case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
159791160068
case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
159792
- case 313: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==313);
160069
+ case 314: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==314);
159793160070
{yymsp[0].minor.yy412 = yymsp[0].major; /*A-overwrites-X*/}
159794160071
break;
159795160072
case 8: /* cmd ::= COMMIT|END trans_opt */
159796160073
case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
159797160074
{sqlite3EndTransaction(pParse,yymsp[-1].major);}
@@ -160964,167 +161241,172 @@
160964161241
{
160965161242
yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
160966161243
sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
160967161244
}
160968161245
break;
160969
- case 288: /* add_column_fullname ::= fullname */
161246
+ case 288: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
161247
+{
161248
+ sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy457, &yymsp[0].minor.yy0);
161249
+}
161250
+ break;
161251
+ case 289: /* add_column_fullname ::= fullname */
160970161252
{
160971161253
disableLookaside(pParse);
160972161254
sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy457);
160973161255
}
160974161256
break;
160975
- case 289: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
161257
+ case 290: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
160976161258
{
160977161259
sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy457, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
160978161260
}
160979161261
break;
160980
- case 290: /* cmd ::= create_vtab */
161262
+ case 291: /* cmd ::= create_vtab */
160981161263
{sqlite3VtabFinishParse(pParse,0);}
160982161264
break;
160983
- case 291: /* cmd ::= create_vtab LP vtabarglist RP */
161265
+ case 292: /* cmd ::= create_vtab LP vtabarglist RP */
160984161266
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
160985161267
break;
160986
- case 292: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
161268
+ case 293: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
160987161269
{
160988161270
sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy412);
160989161271
}
160990161272
break;
160991
- case 293: /* vtabarg ::= */
161273
+ case 294: /* vtabarg ::= */
160992161274
{sqlite3VtabArgInit(pParse);}
160993161275
break;
160994
- case 294: /* vtabargtoken ::= ANY */
160995
- case 295: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==295);
160996
- case 296: /* lp ::= LP */ yytestcase(yyruleno==296);
161276
+ case 295: /* vtabargtoken ::= ANY */
161277
+ case 296: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==296);
161278
+ case 297: /* lp ::= LP */ yytestcase(yyruleno==297);
160997161279
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
160998161280
break;
160999
- case 297: /* with ::= WITH wqlist */
161000
- case 298: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==298);
161281
+ case 298: /* with ::= WITH wqlist */
161282
+ case 299: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==299);
161001161283
{ sqlite3WithPush(pParse, yymsp[0].minor.yy105, 1); }
161002161284
break;
161003
- case 299: /* wqlist ::= nm eidlist_opt AS LP select RP */
161285
+ case 300: /* wqlist ::= nm eidlist_opt AS LP select RP */
161004161286
{
161005161287
yymsp[-5].minor.yy105 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy350, yymsp[-1].minor.yy293); /*A-overwrites-X*/
161006161288
}
161007161289
break;
161008
- case 300: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
161290
+ case 301: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
161009161291
{
161010161292
yymsp[-7].minor.yy105 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy105, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy350, yymsp[-1].minor.yy293);
161011161293
}
161012161294
break;
161013
- case 301: /* windowdefn_list ::= windowdefn */
161295
+ case 302: /* windowdefn_list ::= windowdefn */
161014161296
{ yylhsminor.yy503 = yymsp[0].minor.yy503; }
161015161297
yymsp[0].minor.yy503 = yylhsminor.yy503;
161016161298
break;
161017
- case 302: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
161299
+ case 303: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
161018161300
{
161019161301
assert( yymsp[0].minor.yy503!=0 );
161020161302
sqlite3WindowChain(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy503);
161021161303
yymsp[0].minor.yy503->pNextWin = yymsp[-2].minor.yy503;
161022161304
yylhsminor.yy503 = yymsp[0].minor.yy503;
161023161305
}
161024161306
yymsp[-2].minor.yy503 = yylhsminor.yy503;
161025161307
break;
161026
- case 303: /* windowdefn ::= nm AS LP window RP */
161308
+ case 304: /* windowdefn ::= nm AS LP window RP */
161027161309
{
161028161310
if( ALWAYS(yymsp[-1].minor.yy503) ){
161029161311
yymsp[-1].minor.yy503->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
161030161312
}
161031161313
yylhsminor.yy503 = yymsp[-1].minor.yy503;
161032161314
}
161033161315
yymsp[-4].minor.yy503 = yylhsminor.yy503;
161034161316
break;
161035
- case 304: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
161317
+ case 305: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
161036161318
{
161037161319
yymsp[-4].minor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy350, yymsp[-1].minor.yy350, 0);
161038161320
}
161039161321
break;
161040
- case 305: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
161322
+ case 306: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
161041161323
{
161042161324
yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy350, yymsp[-1].minor.yy350, &yymsp[-5].minor.yy0);
161043161325
}
161044161326
yymsp[-5].minor.yy503 = yylhsminor.yy503;
161045161327
break;
161046
- case 306: /* window ::= ORDER BY sortlist frame_opt */
161328
+ case 307: /* window ::= ORDER BY sortlist frame_opt */
161047161329
{
161048161330
yymsp[-3].minor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, yymsp[-1].minor.yy350, 0);
161049161331
}
161050161332
break;
161051
- case 307: /* window ::= nm ORDER BY sortlist frame_opt */
161333
+ case 308: /* window ::= nm ORDER BY sortlist frame_opt */
161052161334
{
161053161335
yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, yymsp[-1].minor.yy350, &yymsp[-4].minor.yy0);
161054161336
}
161055161337
yymsp[-4].minor.yy503 = yylhsminor.yy503;
161056161338
break;
161057
- case 308: /* window ::= frame_opt */
161058
- case 327: /* filter_over ::= over_clause */ yytestcase(yyruleno==327);
161339
+ case 309: /* window ::= frame_opt */
161340
+ case 328: /* filter_over ::= over_clause */ yytestcase(yyruleno==328);
161059161341
{
161060161342
yylhsminor.yy503 = yymsp[0].minor.yy503;
161061161343
}
161062161344
yymsp[0].minor.yy503 = yylhsminor.yy503;
161063161345
break;
161064
- case 309: /* window ::= nm frame_opt */
161346
+ case 310: /* window ::= nm frame_opt */
161065161347
{
161066161348
yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, 0, &yymsp[-1].minor.yy0);
161067161349
}
161068161350
yymsp[-1].minor.yy503 = yylhsminor.yy503;
161069161351
break;
161070
- case 310: /* frame_opt ::= */
161352
+ case 311: /* frame_opt ::= */
161071161353
{
161072161354
yymsp[1].minor.yy503 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
161073161355
}
161074161356
break;
161075
- case 311: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
161357
+ case 312: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
161076161358
{
161077161359
yylhsminor.yy503 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy412, yymsp[-1].minor.yy341.eType, yymsp[-1].minor.yy341.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy624);
161078161360
}
161079161361
yymsp[-2].minor.yy503 = yylhsminor.yy503;
161080161362
break;
161081
- case 312: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
161363
+ case 313: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
161082161364
{
161083161365
yylhsminor.yy503 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy412, yymsp[-3].minor.yy341.eType, yymsp[-3].minor.yy341.pExpr, yymsp[-1].minor.yy341.eType, yymsp[-1].minor.yy341.pExpr, yymsp[0].minor.yy624);
161084161366
}
161085161367
yymsp[-5].minor.yy503 = yylhsminor.yy503;
161086161368
break;
161087
- case 314: /* frame_bound_s ::= frame_bound */
161088
- case 316: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==316);
161369
+ case 315: /* frame_bound_s ::= frame_bound */
161370
+ case 317: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==317);
161089161371
{yylhsminor.yy341 = yymsp[0].minor.yy341;}
161090161372
yymsp[0].minor.yy341 = yylhsminor.yy341;
161091161373
break;
161092
- case 315: /* frame_bound_s ::= UNBOUNDED PRECEDING */
161093
- case 317: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==317);
161094
- case 319: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==319);
161374
+ case 316: /* frame_bound_s ::= UNBOUNDED PRECEDING */
161375
+ case 318: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==318);
161376
+ case 320: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==320);
161095161377
{yylhsminor.yy341.eType = yymsp[-1].major; yylhsminor.yy341.pExpr = 0;}
161096161378
yymsp[-1].minor.yy341 = yylhsminor.yy341;
161097161379
break;
161098
- case 318: /* frame_bound ::= expr PRECEDING|FOLLOWING */
161380
+ case 319: /* frame_bound ::= expr PRECEDING|FOLLOWING */
161099161381
{yylhsminor.yy341.eType = yymsp[0].major; yylhsminor.yy341.pExpr = yymsp[-1].minor.yy354;}
161100161382
yymsp[-1].minor.yy341 = yylhsminor.yy341;
161101161383
break;
161102
- case 320: /* frame_exclude_opt ::= */
161384
+ case 321: /* frame_exclude_opt ::= */
161103161385
{yymsp[1].minor.yy624 = 0;}
161104161386
break;
161105
- case 321: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
161387
+ case 322: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
161106161388
{yymsp[-1].minor.yy624 = yymsp[0].minor.yy624;}
161107161389
break;
161108
- case 322: /* frame_exclude ::= NO OTHERS */
161109
- case 323: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==323);
161390
+ case 323: /* frame_exclude ::= NO OTHERS */
161391
+ case 324: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==324);
161110161392
{yymsp[-1].minor.yy624 = yymsp[-1].major; /*A-overwrites-X*/}
161111161393
break;
161112
- case 324: /* frame_exclude ::= GROUP|TIES */
161394
+ case 325: /* frame_exclude ::= GROUP|TIES */
161113161395
{yymsp[0].minor.yy624 = yymsp[0].major; /*A-overwrites-X*/}
161114161396
break;
161115
- case 325: /* window_clause ::= WINDOW windowdefn_list */
161397
+ case 326: /* window_clause ::= WINDOW windowdefn_list */
161116161398
{ yymsp[-1].minor.yy503 = yymsp[0].minor.yy503; }
161117161399
break;
161118
- case 326: /* filter_over ::= filter_clause over_clause */
161400
+ case 327: /* filter_over ::= filter_clause over_clause */
161119161401
{
161120161402
yymsp[0].minor.yy503->pFilter = yymsp[-1].minor.yy354;
161121161403
yylhsminor.yy503 = yymsp[0].minor.yy503;
161122161404
}
161123161405
yymsp[-1].minor.yy503 = yylhsminor.yy503;
161124161406
break;
161125
- case 328: /* filter_over ::= filter_clause */
161407
+ case 329: /* filter_over ::= filter_clause */
161126161408
{
161127161409
yylhsminor.yy503 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
161128161410
if( yylhsminor.yy503 ){
161129161411
yylhsminor.yy503->eFrmType = TK_FILTER;
161130161412
yylhsminor.yy503->pFilter = yymsp[0].minor.yy354;
@@ -161132,89 +161414,89 @@
161132161414
sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy354);
161133161415
}
161134161416
}
161135161417
yymsp[0].minor.yy503 = yylhsminor.yy503;
161136161418
break;
161137
- case 329: /* over_clause ::= OVER LP window RP */
161419
+ case 330: /* over_clause ::= OVER LP window RP */
161138161420
{
161139161421
yymsp[-3].minor.yy503 = yymsp[-1].minor.yy503;
161140161422
assert( yymsp[-3].minor.yy503!=0 );
161141161423
}
161142161424
break;
161143
- case 330: /* over_clause ::= OVER nm */
161425
+ case 331: /* over_clause ::= OVER nm */
161144161426
{
161145161427
yymsp[-1].minor.yy503 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
161146161428
if( yymsp[-1].minor.yy503 ){
161147161429
yymsp[-1].minor.yy503->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
161148161430
}
161149161431
}
161150161432
break;
161151
- case 331: /* filter_clause ::= FILTER LP WHERE expr RP */
161433
+ case 332: /* filter_clause ::= FILTER LP WHERE expr RP */
161152161434
{ yymsp[-4].minor.yy354 = yymsp[-1].minor.yy354; }
161153161435
break;
161154161436
default:
161155
- /* (332) input ::= cmdlist */ yytestcase(yyruleno==332);
161156
- /* (333) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==333);
161157
- /* (334) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=334);
161158
- /* (335) ecmd ::= SEMI */ yytestcase(yyruleno==335);
161159
- /* (336) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==336);
161160
- /* (337) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=337);
161161
- /* (338) trans_opt ::= */ yytestcase(yyruleno==338);
161162
- /* (339) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==339);
161163
- /* (340) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==340);
161164
- /* (341) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==341);
161165
- /* (342) savepoint_opt ::= */ yytestcase(yyruleno==342);
161166
- /* (343) cmd ::= create_table create_table_args */ yytestcase(yyruleno==343);
161167
- /* (344) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==344);
161168
- /* (345) columnlist ::= columnname carglist */ yytestcase(yyruleno==345);
161169
- /* (346) nm ::= ID|INDEXED */ yytestcase(yyruleno==346);
161170
- /* (347) nm ::= STRING */ yytestcase(yyruleno==347);
161171
- /* (348) nm ::= JOIN_KW */ yytestcase(yyruleno==348);
161172
- /* (349) typetoken ::= typename */ yytestcase(yyruleno==349);
161173
- /* (350) typename ::= ID|STRING */ yytestcase(yyruleno==350);
161174
- /* (351) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=351);
161175
- /* (352) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=352);
161176
- /* (353) carglist ::= carglist ccons */ yytestcase(yyruleno==353);
161177
- /* (354) carglist ::= */ yytestcase(yyruleno==354);
161178
- /* (355) ccons ::= NULL onconf */ yytestcase(yyruleno==355);
161179
- /* (356) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==356);
161180
- /* (357) ccons ::= AS generated */ yytestcase(yyruleno==357);
161181
- /* (358) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==358);
161182
- /* (359) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==359);
161183
- /* (360) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=360);
161184
- /* (361) tconscomma ::= */ yytestcase(yyruleno==361);
161185
- /* (362) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=362);
161186
- /* (363) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=363);
161187
- /* (364) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=364);
161188
- /* (365) oneselect ::= values */ yytestcase(yyruleno==365);
161189
- /* (366) sclp ::= selcollist COMMA */ yytestcase(yyruleno==366);
161190
- /* (367) as ::= ID|STRING */ yytestcase(yyruleno==367);
161191
- /* (368) returning ::= */ yytestcase(yyruleno==368);
161192
- /* (369) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=369);
161193
- /* (370) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==370);
161194
- /* (371) exprlist ::= nexprlist */ yytestcase(yyruleno==371);
161195
- /* (372) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=372);
161196
- /* (373) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=373);
161197
- /* (374) nmnum ::= ON */ yytestcase(yyruleno==374);
161198
- /* (375) nmnum ::= DELETE */ yytestcase(yyruleno==375);
161199
- /* (376) nmnum ::= DEFAULT */ yytestcase(yyruleno==376);
161200
- /* (377) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==377);
161201
- /* (378) foreach_clause ::= */ yytestcase(yyruleno==378);
161202
- /* (379) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==379);
161203
- /* (380) trnm ::= nm */ yytestcase(yyruleno==380);
161204
- /* (381) tridxby ::= */ yytestcase(yyruleno==381);
161205
- /* (382) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==382);
161206
- /* (383) database_kw_opt ::= */ yytestcase(yyruleno==383);
161207
- /* (384) kwcolumn_opt ::= */ yytestcase(yyruleno==384);
161208
- /* (385) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==385);
161209
- /* (386) vtabarglist ::= vtabarg */ yytestcase(yyruleno==386);
161210
- /* (387) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==387);
161211
- /* (388) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==388);
161212
- /* (389) anylist ::= */ yytestcase(yyruleno==389);
161213
- /* (390) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==390);
161214
- /* (391) anylist ::= anylist ANY */ yytestcase(yyruleno==391);
161215
- /* (392) with ::= */ yytestcase(yyruleno==392);
161437
+ /* (333) input ::= cmdlist */ yytestcase(yyruleno==333);
161438
+ /* (334) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==334);
161439
+ /* (335) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=335);
161440
+ /* (336) ecmd ::= SEMI */ yytestcase(yyruleno==336);
161441
+ /* (337) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==337);
161442
+ /* (338) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=338);
161443
+ /* (339) trans_opt ::= */ yytestcase(yyruleno==339);
161444
+ /* (340) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==340);
161445
+ /* (341) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==341);
161446
+ /* (342) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==342);
161447
+ /* (343) savepoint_opt ::= */ yytestcase(yyruleno==343);
161448
+ /* (344) cmd ::= create_table create_table_args */ yytestcase(yyruleno==344);
161449
+ /* (345) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==345);
161450
+ /* (346) columnlist ::= columnname carglist */ yytestcase(yyruleno==346);
161451
+ /* (347) nm ::= ID|INDEXED */ yytestcase(yyruleno==347);
161452
+ /* (348) nm ::= STRING */ yytestcase(yyruleno==348);
161453
+ /* (349) nm ::= JOIN_KW */ yytestcase(yyruleno==349);
161454
+ /* (350) typetoken ::= typename */ yytestcase(yyruleno==350);
161455
+ /* (351) typename ::= ID|STRING */ yytestcase(yyruleno==351);
161456
+ /* (352) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=352);
161457
+ /* (353) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=353);
161458
+ /* (354) carglist ::= carglist ccons */ yytestcase(yyruleno==354);
161459
+ /* (355) carglist ::= */ yytestcase(yyruleno==355);
161460
+ /* (356) ccons ::= NULL onconf */ yytestcase(yyruleno==356);
161461
+ /* (357) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==357);
161462
+ /* (358) ccons ::= AS generated */ yytestcase(yyruleno==358);
161463
+ /* (359) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==359);
161464
+ /* (360) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==360);
161465
+ /* (361) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=361);
161466
+ /* (362) tconscomma ::= */ yytestcase(yyruleno==362);
161467
+ /* (363) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=363);
161468
+ /* (364) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=364);
161469
+ /* (365) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=365);
161470
+ /* (366) oneselect ::= values */ yytestcase(yyruleno==366);
161471
+ /* (367) sclp ::= selcollist COMMA */ yytestcase(yyruleno==367);
161472
+ /* (368) as ::= ID|STRING */ yytestcase(yyruleno==368);
161473
+ /* (369) returning ::= */ yytestcase(yyruleno==369);
161474
+ /* (370) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=370);
161475
+ /* (371) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==371);
161476
+ /* (372) exprlist ::= nexprlist */ yytestcase(yyruleno==372);
161477
+ /* (373) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=373);
161478
+ /* (374) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=374);
161479
+ /* (375) nmnum ::= ON */ yytestcase(yyruleno==375);
161480
+ /* (376) nmnum ::= DELETE */ yytestcase(yyruleno==376);
161481
+ /* (377) nmnum ::= DEFAULT */ yytestcase(yyruleno==377);
161482
+ /* (378) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==378);
161483
+ /* (379) foreach_clause ::= */ yytestcase(yyruleno==379);
161484
+ /* (380) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==380);
161485
+ /* (381) trnm ::= nm */ yytestcase(yyruleno==381);
161486
+ /* (382) tridxby ::= */ yytestcase(yyruleno==382);
161487
+ /* (383) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==383);
161488
+ /* (384) database_kw_opt ::= */ yytestcase(yyruleno==384);
161489
+ /* (385) kwcolumn_opt ::= */ yytestcase(yyruleno==385);
161490
+ /* (386) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==386);
161491
+ /* (387) vtabarglist ::= vtabarg */ yytestcase(yyruleno==387);
161492
+ /* (388) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==388);
161493
+ /* (389) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==389);
161494
+ /* (390) anylist ::= */ yytestcase(yyruleno==390);
161495
+ /* (391) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==391);
161496
+ /* (392) anylist ::= anylist ANY */ yytestcase(yyruleno==392);
161497
+ /* (393) with ::= */ yytestcase(yyruleno==393);
161216161498
break;
161217161499
/********** End reduce actions ************************************************/
161218161500
};
161219161501
assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
161220161502
yygoto = yyRuleInfoLhs[yyruleno];
@@ -203040,26 +203322,28 @@
203040203322
#ifdef SQLITE_AMALGAMATION
203041203323
assert( WAL_CKPT_LOCK==1 );
203042203324
#endif
203043203325
203044203326
assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );
203045
- if( pRbu && (pRbu->eStage==RBU_STAGE_OAL || pRbu->eStage==RBU_STAGE_MOVE) ){
203046
- /* Magic number 1 is the WAL_CKPT_LOCK lock. Preventing SQLite from
203047
- ** taking this lock also prevents any checkpoints from occurring.
203048
- ** todo: really, it's not clear why this might occur, as
203049
- ** wal_autocheckpoint ought to be turned off. */
203327
+ if( pRbu && (
203328
+ pRbu->eStage==RBU_STAGE_OAL
203329
+ || pRbu->eStage==RBU_STAGE_MOVE
203330
+ || pRbu->eStage==RBU_STAGE_DONE
203331
+ )){
203332
+ /* Prevent SQLite from taking a shm-lock on the target file when it
203333
+ ** is supplying heap memory to the upper layer in place of *-shm
203334
+ ** segments. */
203050203335
if( ofst==WAL_LOCK_CKPT && n==1 ) rc = SQLITE_BUSY;
203051203336
}else{
203052203337
int bCapture = 0;
203053203338
if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){
203054203339
bCapture = 1;
203055203340
}
203056
-
203057203341
if( bCapture==0 || 0==(flags & SQLITE_SHM_UNLOCK) ){
203058203342
rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags);
203059203343
if( bCapture && rc==SQLITE_OK ){
203060
- pRbu->mLock |= (1 << ofst);
203344
+ pRbu->mLock |= ((1<<n) - 1) << ofst;
203061203345
}
203062203346
}
203063203347
}
203064203348
203065203349
return rc;
@@ -228484,11 +228768,11 @@
228484228768
int nArg, /* Number of args */
228485228769
sqlite3_value **apUnused /* Function arguments */
228486228770
){
228487228771
assert( nArg==0 );
228488228772
UNUSED_PARAM2(nArg, apUnused);
228489
- sqlite3_result_text(pCtx, "fts5: 2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398f17d", -1, SQLITE_TRANSIENT);
228773
+ sqlite3_result_text(pCtx, "fts5: 2021-02-17 13:19:22 c46a94a624c2cc6c49ac916a206a913081e1628c24805987cabc75c9057ea36b", -1, SQLITE_TRANSIENT);
228490228774
}
228491228775
228492228776
/*
228493228777
** Return true if zName is the extension on one of the shadow tables used
228494228778
** by this module.
@@ -233410,12 +233694,12 @@
233410233694
}
233411233695
#endif /* SQLITE_CORE */
233412233696
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
233413233697
233414233698
/************** End of stmt.c ************************************************/
233415
-#if __LINE__!=233415
233699
+#if __LINE__!=233699
233416233700
#undef SQLITE_SOURCE_ID
233417
-#define SQLITE_SOURCE_ID "2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398alt2"
233701
+#define SQLITE_SOURCE_ID "2021-02-19 14:32:58 c844a331e78949850fde8ed95058cb34f863566944bc9e92e3ae042768f1alt2"
233418233702
#endif
233419233703
/* Return the source-id for this library */
233420233704
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
233421233705
/************************** End of sqlite3.c ******************************/
233422233706
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1171,11 +1171,11 @@
1171 ** be held constant and Z will be incremented or else Y will be incremented
1172 ** and Z will be reset to zero.
1173 **
1174 ** Since [version 3.6.18] ([dateof:3.6.18]),
1175 ** SQLite source code has been stored in the
1176 ** <a href="http://fossil-scm.org/">Fossil configuration management
1177 ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
1178 ** a string which identifies a particular check-in of SQLite
1179 ** within its configuration management system. ^The SQLITE_SOURCE_ID
1180 ** string contains the date and time of the check-in (UTC) and a SHA1
1181 ** or SHA3-256 hash of the entire source tree. If the source code has
@@ -1186,11 +1186,11 @@
1186 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1187 ** [sqlite_version()] and [sqlite_source_id()].
1188 */
1189 #define SQLITE_VERSION "3.35.0"
1190 #define SQLITE_VERSION_NUMBER 3035000
1191 #define SQLITE_SOURCE_ID "2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398f17d"
1192
1193 /*
1194 ** CAPI3REF: Run-Time Library Version Numbers
1195 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1196 **
@@ -15966,11 +15966,11 @@
15966 #if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN)
15967 SQLITE_PRIVATE void sqlite3ExplainBreakpoint(const char*,const char*);
15968 #else
15969 # define sqlite3ExplainBreakpoint(A,B) /*no-op*/
15970 #endif
15971 SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*,int,char*);
15972 SQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe*, int addr, u8);
15973 SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1);
15974 SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2);
15975 SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, int addr, int P3);
15976 SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u16 P5);
@@ -17475,11 +17475,16 @@
17475 u8 szEst; /* Estimated size of value in this column. sizeof(INT)==1 */
17476 u8 hName; /* Column name hash for faster lookup */
17477 u16 colFlags; /* Boolean properties. See COLFLAG_ defines below */
17478 };
17479
17480 /* Allowed values for Column.colFlags:
 
 
 
 
 
17481 */
17482 #define COLFLAG_PRIMKEY 0x0001 /* Column is part of the primary key */
17483 #define COLFLAG_HIDDEN 0x0002 /* A hidden column in a virtual table */
17484 #define COLFLAG_HASTYPE 0x0004 /* Type name follows column name */
17485 #define COLFLAG_UNIQUE 0x0008 /* Column def contains "UNIQUE" or "PK" */
@@ -17664,15 +17669,16 @@
17664 ** the TF_OOOHidden attribute would apply in this case. Such tables require
17665 ** special handling during INSERT processing. The "OOO" means "Out Of Order".
17666 **
17667 ** Constraints:
17668 **
17669 ** TF_HasVirtual == COLFLAG_Virtual
17670 ** TF_HasStored == COLFLAG_Stored
 
17671 */
17672 #define TF_Readonly 0x0001 /* Read-only system table */
17673 #define TF_Ephemeral 0x0002 /* An ephemeral table */
17674 #define TF_HasPrimaryKey 0x0004 /* Table has a primary key */
17675 #define TF_Autoincrement 0x0008 /* Integer primary key is autoincrement */
17676 #define TF_HasStat1 0x0010 /* nRowLogEst set from sqlite_stat1 */
17677 #define TF_HasVirtual 0x0020 /* Has one or more VIRTUAL columns */
17678 #define TF_HasStored 0x0040 /* Has one or more STORED columns */
@@ -17683,10 +17689,11 @@
17683 #define TF_NoVisibleRowid 0x0200 /* No user-visible "rowid" column */
17684 #define TF_OOOHidden 0x0400 /* Out-of-Order hidden columns */
17685 #define TF_HasNotNull 0x0800 /* Contains NOT NULL constraints */
17686 #define TF_Shadow 0x1000 /* True for a shadow table */
17687 #define TF_HasStat4 0x2000 /* STAT4 info available for this table */
 
17688
17689 /*
17690 ** Test to see whether or not a table is a virtual table. This is
17691 ** done as a macro so that it will be optimized out when virtual
17692 ** table support is omitted from the build.
@@ -18051,11 +18058,10 @@
18051 int iMem; /* Memory location that acts as accumulator */
18052 int iDistinct; /* Ephemeral table used to enforce DISTINCT */
18053 } *aFunc;
18054 int nFunc; /* Number of entries in aFunc[] */
18055 u32 selId; /* Select to which this AggInfo belongs */
18056 AggInfo *pNext; /* Next in list of them all */
18057 };
18058
18059 /*
18060 ** The datatype ynVar is a signed integer, either 16-bit or 32-bit.
18061 ** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater
@@ -18644,10 +18650,11 @@
18644 #define SF_WhereBegin 0x0080000 /* Really a WhereBegin() call. Debug Only */
18645 #define SF_WinRewrite 0x0100000 /* Window function rewrite accomplished */
18646 #define SF_View 0x0200000 /* SELECT statement is a view */
18647 #define SF_NoopOrderBy 0x0400000 /* ORDER BY is ignored for this query */
18648 #define SF_UpdateFrom 0x0800000 /* Statement is an UPDATE...FROM */
 
18649
18650 /*
18651 ** The results of a SELECT can be distributed in several ways, as defined
18652 ** by one of the following macros. The "SRT" prefix means "SELECT Result
18653 ** Type".
@@ -18886,11 +18893,10 @@
18886 #endif
18887 AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */
18888 Parse *pToplevel; /* Parse structure for main program (or NULL) */
18889 Table *pTriggerTab; /* Table triggers are being coded for */
18890 Parse *pParentParse; /* Parent parser if this parser is nested */
18891 AggInfo *pAggList; /* List of all AggInfo objects */
18892 union {
18893 int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */
18894 Returning *pReturning; /* The RETURNING clause */
18895 } u1;
18896 u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */
@@ -19170,11 +19176,12 @@
19170 } InitData;
19171
19172 /*
19173 ** Allowed values for mInitFlags
19174 */
19175 #define INITFLAG_AlterTable 0x0001 /* This is a reparse after ALTER TABLE */
 
19176
19177 /*
19178 ** Structure containing global configuration data for the SQLite library.
19179 **
19180 ** This structure also contains some state information.
@@ -19990,10 +19997,11 @@
19990 # define sqlite3TriggerColmask(A,B,C,D,E,F,G) 0
19991 # define sqlite3TriggerStepSrc(A,B) 0
19992 #endif
19993
19994 SQLITE_PRIVATE int sqlite3JoinType(Parse*, Token*, Token*, Token*);
 
19995 SQLITE_PRIVATE void sqlite3SetJoinExpr(Expr*,int);
19996 SQLITE_PRIVATE void sqlite3CreateForeignKey(Parse*, ExprList*, Token*, ExprList*, int);
19997 SQLITE_PRIVATE void sqlite3DeferForeignKey(Parse*, int);
19998 #ifndef SQLITE_OMIT_AUTHORIZATION
19999 SQLITE_PRIVATE void sqlite3AuthRead(Parse*,Expr*,Schema*,SrcList*);
@@ -20174,10 +20182,11 @@
20174 SQLITE_PRIVATE int sqlite3ResolveSelfReference(Parse*,Table*,int,Expr*,ExprList*);
20175 SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
20176 SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int);
20177 SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *);
20178 SQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *, SrcList *);
 
20179 SQLITE_PRIVATE void *sqlite3RenameTokenMap(Parse*, void*, Token*);
20180 SQLITE_PRIVATE void sqlite3RenameTokenRemap(Parse*, void *pTo, void *pFrom);
20181 SQLITE_PRIVATE void sqlite3RenameExprUnmap(Parse*, Expr*);
20182 SQLITE_PRIVATE void sqlite3RenameExprlistUnmap(Parse*, ExprList*);
20183 SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(Parse*, u8, CollSeq *, const char*);
@@ -78733,13 +78742,14 @@
78733 ** as having been used.
78734 **
78735 ** The zWhere string must have been obtained from sqlite3_malloc().
78736 ** This routine will take ownership of the allocated memory.
78737 */
78738 SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere){
78739 int j;
78740 sqlite3VdbeAddOp4(p, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC);
 
78741 for(j=0; j<p->db->nDb; j++) sqlite3VdbeUsesBtree(p, j);
78742 sqlite3MayAbort(p->pParse);
78743 }
78744
78745 /*
@@ -92185,11 +92195,11 @@
92185
92186 #ifndef SQLITE_OMIT_ALTERTABLE
92187 if( pOp->p4.z==0 ){
92188 sqlite3SchemaClear(db->aDb[iDb].pSchema);
92189 db->mDbFlags &= ~DBFLAG_SchemaKnownOk;
92190 rc = sqlite3InitOne(db, iDb, &p->zErrMsg, INITFLAG_AlterTable);
92191 db->mDbFlags |= DBFLAG_SchemaChange;
92192 p->expired = 0;
92193 }else
92194 #endif
92195 {
@@ -98575,11 +98585,10 @@
98575 static void resolveAlias(
98576 Parse *pParse, /* Parsing context */
98577 ExprList *pEList, /* A result set */
98578 int iCol, /* A column in the result set. 0..pEList->nExpr-1 */
98579 Expr *pExpr, /* Transform this into an alias to the result set */
98580 const char *zType, /* "GROUP" or "ORDER" or "" */
98581 int nSubquery /* Number of subqueries that the label is moving */
98582 ){
98583 Expr *pOrig; /* The iCol-th column of the result set */
98584 Expr *pDup; /* Copy of pOrig */
98585 sqlite3 *db; /* The database connection */
@@ -98588,11 +98597,11 @@
98588 pOrig = pEList->a[iCol].pExpr;
98589 assert( pOrig!=0 );
98590 db = pParse->db;
98591 pDup = sqlite3ExprDup(db, pOrig, 0);
98592 if( pDup!=0 ){
98593 if( zType[0]!='G' ) incrAggFunctionDepth(pDup, nSubquery);
98594 if( pExpr->op==TK_COLLATE ){
98595 pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);
98596 }
98597
98598 /* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
@@ -98873,13 +98882,14 @@
98873 } /* if( pSrcList ) */
98874
98875 #if !defined(SQLITE_OMIT_TRIGGER) || !defined(SQLITE_OMIT_UPSERT)
98876 /* If we have not already resolved the name, then maybe
98877 ** it is a new.* or old.* trigger argument reference. Or
98878 ** maybe it is an excluded.* from an upsert.
 
98879 */
98880 if( cntTab==0 && zDb==0 ){
98881 pTab = 0;
98882 #ifndef SQLITE_OMIT_TRIGGER
98883 if( pParse->pTriggerTab!=0 ){
98884 int op = pParse->eTriggerOp;
98885 assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT );
@@ -98887,18 +98897,18 @@
98887 pExpr->iTable = 1;
98888 pTab = pParse->pTriggerTab;
98889 }else if( op!=TK_INSERT && zTab && sqlite3StrICmp("old",zTab)==0 ){
98890 pExpr->iTable = 0;
98891 pTab = pParse->pTriggerTab;
98892 }else if( pParse->bReturning ){
98893 pExpr->iTable = op!=TK_DELETE;
98894 pTab = pParse->pTriggerTab;
98895 }
98896 }
98897 #endif /* SQLITE_OMIT_TRIGGER */
98898 #ifndef SQLITE_OMIT_UPSERT
98899 if( (pNC->ncFlags & NC_UUpsert)!=0 && ALWAYS(zTab) ){
98900 Upsert *pUpsert = pNC->uNC.pUpsert;
98901 if( pUpsert && sqlite3StrICmp("excluded",zTab)==0 ){
98902 pTab = pUpsert->pUpsertSrc->a[0].pTab;
98903 pExpr->iTable = EXCLUDED_TABLE_NUMBER;
98904 }
@@ -98941,11 +98951,11 @@
98941 {
98942 pExpr->y.pTab = pTab;
98943 if( pParse->bReturning ){
98944 eNewExprOp = TK_REGISTER;
98945 pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable
98946 + iCol + 1;
98947 }else{
98948 pExpr->iColumn = (i16)iCol;
98949 eNewExprOp = TK_TRIGGER;
98950 #ifndef SQLITE_OMIT_TRIGGER
98951 if( iCol<0 ){
@@ -99028,11 +99038,11 @@
99028 }
99029 if( sqlite3ExprVectorSize(pOrig)!=1 ){
99030 sqlite3ErrorMsg(pParse, "row value misused");
99031 return WRC_Abort;
99032 }
99033 resolveAlias(pParse, pEList, j, pExpr, "", nSubquery);
99034 cnt = 1;
99035 pMatch = 0;
99036 assert( zTab==0 && zDb==0 );
99037 if( IN_RENAME_OBJECT ){
99038 sqlite3RenameTokenRemap(pParse, 0, (void*)pExpr);
@@ -99130,14 +99140,16 @@
99130 pMatch->colUsed |= sqlite3ExprColUsed(pExpr);
99131 }
99132
99133 /* Clean up and return
99134 */
99135 sqlite3ExprDelete(db, pExpr->pLeft);
99136 pExpr->pLeft = 0;
99137 sqlite3ExprDelete(db, pExpr->pRight);
99138 pExpr->pRight = 0;
 
 
99139 pExpr->op = eNewExprOp;
99140 ExprSetProperty(pExpr, EP_Leaf);
99141 lookupname_end:
99142 if( cnt==1 ){
99143 assert( pNC!=0 );
@@ -99905,12 +99917,11 @@
99905 if( pItem->u.x.iOrderByCol ){
99906 if( pItem->u.x.iOrderByCol>pEList->nExpr ){
99907 resolveOutOfRangeError(pParse, zType, i+1, pEList->nExpr);
99908 return 1;
99909 }
99910 resolveAlias(pParse, pEList, pItem->u.x.iOrderByCol-1, pItem->pExpr,
99911 zType,0);
99912 }
99913 }
99914 return 0;
99915 }
99916
@@ -100153,11 +100164,11 @@
100153 ** aliases in the result set.
100154 **
100155 ** Minor point: If this is the case, then the expression will be
100156 ** re-evaluated for each reference to it.
100157 */
100158 assert( (sNC.ncFlags & (NC_UAggInfo|NC_UUpsert))==0 );
100159 sNC.uNC.pEList = p->pEList;
100160 sNC.ncFlags |= NC_UEList;
100161 if( sqlite3ResolveExprNames(&sNC, p->pHaving) ) return WRC_Abort;
100162 if( sqlite3ResolveExprNames(&sNC, p->pWhere) ) return WRC_Abort;
100163
@@ -106625,43 +106636,49 @@
106625 ** bTemp is not true, database "temp", can still be parsed. This is
106626 ** called at the end of the generation of an ALTER TABLE ... RENAME ...
106627 ** statement to ensure that the operation has not rendered any schema
106628 ** objects unusable.
106629 */
106630 static void renameTestSchema(Parse *pParse, const char *zDb, int bTemp){
 
 
 
 
 
 
106631 sqlite3NestedParse(pParse,
106632 "SELECT 1 "
106633 "FROM \"%w\"." DFLT_SCHEMA_TABLE " "
106634 "WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
106635 " AND sql NOT LIKE 'create virtual%%'"
106636 " AND sqlite_rename_test(%Q, sql, type, name, %d)=NULL ",
106637 zDb,
106638 zDb, bTemp
106639 );
106640
106641 if( bTemp==0 ){
106642 sqlite3NestedParse(pParse,
106643 "SELECT 1 "
106644 "FROM temp." DFLT_SCHEMA_TABLE " "
106645 "WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
106646 " AND sql NOT LIKE 'create virtual%%'"
106647 " AND sqlite_rename_test(%Q, sql, type, name, 1)=NULL ",
106648 zDb
106649 );
106650 }
106651 }
106652
106653 /*
106654 ** Generate code to reload the schema for database iDb. And, if iDb!=1, for
106655 ** the temp database as well.
106656 */
106657 static void renameReloadSchema(Parse *pParse, int iDb){
106658 Vdbe *v = pParse->pVdbe;
106659 if( v ){
106660 sqlite3ChangeCookie(pParse, iDb);
106661 sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, iDb, 0);
106662 if( iDb!=1 ) sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, 1, 0);
106663 }
106664 }
106665
106666 /*
106667 ** Generate code to implement the "ALTER TABLE xxx RENAME TO yyy"
@@ -106806,11 +106823,11 @@
106806 sqlite3NestedParse(pParse,
106807 "UPDATE sqlite_temp_schema SET "
106808 "sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), "
106809 "tbl_name = "
106810 "CASE WHEN tbl_name=%Q COLLATE nocase AND "
106811 " sqlite_rename_test(%Q, sql, type, name, 1) "
106812 "THEN %Q ELSE tbl_name END "
106813 "WHERE type IN ('view', 'trigger')"
106814 , zDb, zTabName, zName, zTabName, zDb, zName);
106815 }
106816
@@ -106825,12 +106842,12 @@
106825 sqlite3VdbeLoadString(v, i, zName);
106826 sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);
106827 }
106828 #endif
106829
106830 renameReloadSchema(pParse, iDb);
106831 renameTestSchema(pParse, zDb, iDb==1);
106832
106833 exit_rename_table:
106834 sqlite3SrcListDelete(db, pSrc);
106835 sqlite3DbFree(db, zName);
106836 db->mDbFlags = savedDbFlags;
@@ -106988,11 +107005,11 @@
106988 sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, 3);
106989 sqlite3ReleaseTempReg(pParse, r1);
106990 }
106991
106992 /* Reload the table definition */
106993 renameReloadSchema(pParse, iDb);
106994 }
106995
106996 /*
106997 ** This function is called by the parser after the table-name in
106998 ** an "ALTER TABLE <table-name> ADD" statement is parsed. Argument
@@ -107088,11 +107105,11 @@
107088 ** it loads an error message into pParse and returns non-zero.
107089 **
107090 ** Or, if pTab is not a view or virtual table, zero is returned.
107091 */
107092 #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
107093 static int isRealTable(Parse *pParse, Table *pTab){
107094 const char *zType = 0;
107095 #ifndef SQLITE_OMIT_VIEW
107096 if( pTab->pSelect ){
107097 zType = "view";
107098 }
@@ -107101,19 +107118,20 @@
107101 if( IsVirtual(pTab) ){
107102 zType = "virtual table";
107103 }
107104 #endif
107105 if( zType ){
107106 sqlite3ErrorMsg(
107107 pParse, "cannot rename columns of %s \"%s\"", zType, pTab->zName
 
107108 );
107109 return 1;
107110 }
107111 return 0;
107112 }
107113 #else /* !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) */
107114 # define isRealTable(x,y) (0)
107115 #endif
107116
107117 /*
107118 ** Handles the following parser reduction:
107119 **
@@ -107138,11 +107156,11 @@
107138 pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]);
107139 if( !pTab ) goto exit_rename_column;
107140
107141 /* Cannot alter a system table */
107142 if( SQLITE_OK!=isAlterableTable(pParse, pTab) ) goto exit_rename_column;
107143 if( SQLITE_OK!=isRealTable(pParse, pTab) ) goto exit_rename_column;
107144
107145 /* Which schema holds the table to be altered */
107146 iSchema = sqlite3SchemaToIndex(db, pTab->pSchema);
107147 assert( iSchema>=0 );
107148 zDb = db->aDb[iSchema].zDbSName;
@@ -107192,12 +107210,12 @@
107192 "WHERE type IN ('trigger', 'view')",
107193 zDb, pTab->zName, iCol, zNew, bQuote
107194 );
107195
107196 /* Drop and reload the database schema. */
107197 renameReloadSchema(pParse, iSchema);
107198 renameTestSchema(pParse, zDb, iSchema==1);
107199
107200 exit_rename_column:
107201 sqlite3SrcListDelete(db, pSrc);
107202 sqlite3DbFree(db, zOld);
107203 sqlite3DbFree(db, zNew);
@@ -107445,27 +107463,37 @@
107445 }
107446 }
107447
107448 /*
107449 ** Search the Parse object passed as the first argument for a RenameToken
107450 ** object associated with parse tree element pPtr. If found, remove it
107451 ** from the Parse object and add it to the list maintained by the
107452 ** RenameCtx object passed as the second argument.
 
 
 
107453 */
107454 static void renameTokenFind(Parse *pParse, struct RenameCtx *pCtx, void *pPtr){
 
 
 
 
107455 RenameToken **pp;
107456 assert( pPtr!=0 );
107457 for(pp=&pParse->pRename; (*pp); pp=&(*pp)->pNext){
107458 if( (*pp)->p==pPtr ){
107459 RenameToken *pToken = *pp;
107460 *pp = pToken->pNext;
107461 pToken->pNext = pCtx->pList;
107462 pCtx->pList = pToken;
107463 pCtx->nList++;
107464 break;
 
 
107465 }
107466 }
 
107467 }
107468
107469 /*
107470 ** This is a Walker select callback. It does nothing. It is only required
107471 ** because without a dummy callback, sqlite3WalkExpr() and similar do not
@@ -107532,21 +107560,21 @@
107532 ** sub-routine is currently stored in pParse->zErrMsg. This function
107533 ** adds context to the error message and then stores it in pCtx.
107534 */
107535 static void renameColumnParseError(
107536 sqlite3_context *pCtx,
107537 int bPost,
107538 sqlite3_value *pType,
107539 sqlite3_value *pObject,
107540 Parse *pParse
107541 ){
107542 const char *zT = (const char*)sqlite3_value_text(pType);
107543 const char *zN = (const char*)sqlite3_value_text(pObject);
107544 char *zErr;
107545
107546 zErr = sqlite3_mprintf("error in %s %s%s: %s",
107547 zT, zN, (bPost ? " after rename" : ""),
107548 pParse->zErrMsg
107549 );
107550 sqlite3_result_error(pCtx, zErr, -1);
107551 sqlite3_free(zErr);
107552 }
@@ -107621,11 +107649,11 @@
107621 ** trigger object, the database must be corrupt. */
107622 memset(p, 0, sizeof(Parse));
107623 p->eParseMode = PARSE_MODE_RENAME;
107624 p->db = db;
107625 p->nQueryLoop = 1;
107626 rc = sqlite3RunParser(p, zSql, &zErr);
107627 assert( p->zErrMsg==0 );
107628 assert( rc!=SQLITE_OK || zErr==0 );
107629 p->zErrMsg = zErr;
107630 if( db->mallocFailed ) rc = SQLITE_NOMEM;
107631 if( rc==SQLITE_OK
@@ -108048,11 +108076,11 @@
108048 rc = renameEditSql(context, &sCtx, zSql, zNew, bQuote);
108049
108050 renameColumnFunc_done:
108051 if( rc!=SQLITE_OK ){
108052 if( sParse.zErrMsg ){
108053 renameColumnParseError(context, 0, argv[1], argv[2], &sParse);
108054 }else{
108055 sqlite3_result_error_code(context, rc);
108056 }
108057 }
108058
@@ -108237,11 +108265,11 @@
108237 if( rc==SQLITE_OK ){
108238 rc = renameEditSql(context, &sCtx, zInput, zNew, bQuote);
108239 }
108240 if( rc!=SQLITE_OK ){
108241 if( sParse.zErrMsg ){
108242 renameColumnParseError(context, 0, argv[1], argv[2], &sParse);
108243 }else{
108244 sqlite3_result_error_code(context, rc);
108245 }
108246 }
108247
@@ -108266,10 +108294,11 @@
108266 ** 0: Database name ("main", "temp" etc.).
108267 ** 1: SQL statement.
108268 ** 2: Object type ("view", "table", "trigger" or "index").
108269 ** 3: Object name.
108270 ** 4: True if object is from temp schema.
 
108271 **
108272 ** Unless it finds an error, this function normally returns NULL. However, it
108273 ** returns integer value 1 if:
108274 **
108275 ** * the SQL argument creates a trigger, and
@@ -108283,10 +108312,11 @@
108283 sqlite3 *db = sqlite3_context_db_handle(context);
108284 char const *zDb = (const char*)sqlite3_value_text(argv[0]);
108285 char const *zInput = (const char*)sqlite3_value_text(argv[1]);
108286 int bTemp = sqlite3_value_int(argv[4]);
108287 int isLegacy = (db->flags & SQLITE_LegacyAlter);
 
108288
108289 #ifndef SQLITE_OMIT_AUTHORIZATION
108290 sqlite3_xauth xAuth = db->xAuth;
108291 db->xAuth = 0;
108292 #endif
@@ -108315,29 +108345,222 @@
108315 if( i1==i2 ) sqlite3_result_int(context, 1);
108316 }
108317 }
108318 }
108319
108320 if( rc!=SQLITE_OK ){
108321 renameColumnParseError(context, 1, argv[2], argv[3], &sParse);
108322 }
108323 renameParseCleanup(&sParse);
108324 }
108325
108326 #ifndef SQLITE_OMIT_AUTHORIZATION
108327 db->xAuth = xAuth;
108328 #endif
108329 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108330
108331 /*
108332 ** Register built-in functions used to help implement ALTER TABLE
108333 */
108334 SQLITE_PRIVATE void sqlite3AlterFunctions(void){
108335 static FuncDef aAlterTableFuncs[] = {
108336 INTERNAL_FUNCTION(sqlite_rename_column, 9, renameColumnFunc),
108337 INTERNAL_FUNCTION(sqlite_rename_table, 7, renameTableFunc),
108338 INTERNAL_FUNCTION(sqlite_rename_test, 5, renameTableTest),
 
108339 };
108340 sqlite3InsertBuiltinFuncs(aAlterTableFuncs, ArraySize(aAlterTableFuncs));
108341 }
108342 #endif /* SQLITE_ALTER_TABLE */
108343
@@ -111318,16 +111541,18 @@
111318 int i;
111319 int reg;
111320
111321 addrRewind =
111322 sqlite3VdbeAddOp1(v, OP_Rewind, pReturning->iRetCur);
 
111323 reg = pReturning->iRetReg;
111324 for(i=0; i<pReturning->nRetCol; i++){
111325 sqlite3VdbeAddOp3(v, OP_Column, pReturning->iRetCur, i, reg+i);
111326 }
111327 sqlite3VdbeAddOp2(v, OP_ResultRow, reg, i);
111328 sqlite3VdbeAddOp2(v, OP_Next, pReturning->iRetCur, addrRewind+1);
 
111329 sqlite3VdbeJumpHere(v, addrRewind);
111330 }
111331 sqlite3VdbeAddOp0(v, OP_Halt);
111332
111333 #if SQLITE_USER_AUTHENTICATION
@@ -112417,10 +112642,11 @@
112417 */
112418 #if SQLITE_ENABLE_HIDDEN_COLUMNS
112419 SQLITE_PRIVATE void sqlite3ColumnPropertiesFromName(Table *pTab, Column *pCol){
112420 if( sqlite3_strnicmp(pCol->zName, "__hidden__", 10)==0 ){
112421 pCol->colFlags |= COLFLAG_HIDDEN;
 
112422 }else if( pTab && pCol!=pTab->aCol && (pCol[-1].colFlags & COLFLAG_HIDDEN) ){
112423 pTab->tabFlags |= TF_OOOHidden;
112424 }
112425 }
112426 #endif
@@ -112461,11 +112687,15 @@
112461 */
112462 SQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){
112463 Returning *pRet;
112464 Hash *pHash;
112465 sqlite3 *db = pParse->db;
112466 assert( !pParse->bReturning );
 
 
 
 
112467 pParse->bReturning = 1;
112468 pRet = sqlite3DbMallocZero(db, sizeof(*pRet));
112469 if( pRet==0 ){
112470 sqlite3ExprListDelete(db, pList);
112471 return;
@@ -112484,11 +112714,11 @@
112484 pRet->retTrig.step_list = &pRet->retTStep;
112485 pRet->retTStep.op = TK_RETURNING;
112486 pRet->retTStep.pTrig = &pRet->retTrig;
112487 pRet->retTStep.pExprList = pList;
112488 pHash = &(db->aDb[1].pSchema->trigHash);
112489 assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 );
112490 if( sqlite3HashInsert(pHash, RETURNING_TRIGGER_NAME, &pRet->retTrig)
112491 ==&pRet->retTrig ){
112492 sqlite3OomFault(db);
112493 }
112494 }
@@ -113789,11 +114019,11 @@
113789 }
113790 #endif
113791
113792 /* Reparse everything to update our internal data structures */
113793 sqlite3VdbeAddParseSchemaOp(v, iDb,
113794 sqlite3MPrintf(db, "tbl_name='%q' AND type!='trigger'", p->zName));
113795 }
113796
113797 /* Add the table to the in-memory representation of the database.
113798 */
113799 if( db->init.busy ){
@@ -115277,11 +115507,11 @@
115277 */
115278 if( pTblName ){
115279 sqlite3RefillIndex(pParse, pIndex, iMem);
115280 sqlite3ChangeCookie(pParse, iDb);
115281 sqlite3VdbeAddParseSchemaOp(v, iDb,
115282 sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName));
115283 sqlite3VdbeAddOp2(v, OP_Expire, 0, 1);
115284 }
115285
115286 sqlite3VdbeJumpHere(v, (int)pIndex->tnum);
115287 }
@@ -118623,11 +118853,12 @@
118623 while( (c = Utf8Read(zPattern))!=0 ){
118624 if( c==matchAll ){ /* Match "*" */
118625 /* Skip over multiple "*" characters in the pattern. If there
118626 ** are also "?" characters, skip those as well, but consume a
118627 ** single character of the input string for each "?" skipped */
118628 while( (c=Utf8Read(zPattern)) == matchAll || c == matchOne ){
 
118629 if( c==matchOne && sqlite3Utf8Read(&zString)==0 ){
118630 return SQLITE_NOWILDCARDMATCH;
118631 }
118632 }
118633 if( c==0 ){
@@ -122603,23 +122834,28 @@
122603 ipkColumn--;
122604 }
122605 }
122606 }
122607 #endif
122608 }
122609
122610 /* Make sure the number of columns in the source data matches the number
122611 ** of columns to be inserted into the table.
122612 */
122613 for(i=0; i<pTab->nCol; i++){
122614 if( pTab->aCol[i].colFlags & COLFLAG_NOINSERT ) nHidden++;
122615 }
122616 if( pColumn==0 && nColumn && nColumn!=(pTab->nCol-nHidden) ){
122617 sqlite3ErrorMsg(pParse,
122618 "table %S has %d columns but %d values were supplied",
122619 pTabList, 0, pTab->nCol-nHidden, nColumn);
122620 goto insert_cleanup;
 
 
 
 
 
122621 }
122622 if( pColumn!=0 && nColumn!=pColumn->nId ){
122623 sqlite3ErrorMsg(pParse, "%d values for %d columns", nColumn, pColumn->nId);
122624 goto insert_cleanup;
122625 }
@@ -124078,10 +124314,36 @@
124078 }
124079 sqlite3VdbeChangeP5(v, i+1);
124080 }
124081 #endif
124082
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124083 /*
124084 ** This routine generates code to finish the INSERT or UPDATE operation
124085 ** that was started by a prior call to sqlite3GenerateConstraintChecks.
124086 ** A consecutive range of registers starting at regNewData contains the
124087 ** rowid and the content to be inserted.
@@ -124126,21 +124388,13 @@
124126 pik_flags = (useSeekResult ? OPFLAG_USESEEKRESULT : 0);
124127 if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
124128 assert( pParse->nested==0 );
124129 pik_flags |= OPFLAG_NCHANGE;
124130 pik_flags |= (update_flags & OPFLAG_SAVEPOSITION);
124131 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
124132 if( update_flags==0 ){
124133 int r = sqlite3GetTempReg(pParse);
124134 sqlite3VdbeAddOp2(v, OP_Integer, 0, r);
124135 sqlite3VdbeAddOp4(v, OP_Insert,
124136 iIdxCur+i, aRegIdx[i], r, (char*)pTab, P4_TABLE
124137 );
124138 sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP);
124139 sqlite3ReleaseTempReg(pParse, r);
124140 }
124141 #endif
124142 }
124143 sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iIdxCur+i, aRegIdx[i],
124144 aRegIdx[i]+1,
124145 pIdx->uniqNotNull ? pIdx->nKeyCol: pIdx->nColumn);
124146 sqlite3VdbeChangeP5(v, pik_flags);
@@ -124609,20 +124863,22 @@
124609 insFlags = OPFLAG_APPEND|OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT;
124610 }else{
124611 insFlags = OPFLAG_NCHANGE|OPFLAG_LASTROWID|OPFLAG_APPEND|OPFLAG_PREFORMAT;
124612 }
124613 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
124614 if( db->xPreUpdateCallback ){
124615 sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);
124616 insFlags &= ~OPFLAG_PREFORMAT;
124617 }else
124618 #endif
124619 {
124620 sqlite3VdbeAddOp3(v, OP_RowCell, iDest, iSrc, regRowid);
124621 }
124622 sqlite3VdbeAddOp4(v, OP_Insert, iDest, regData, regRowid,
124623 (char*)pDest, P4_TABLE);
 
 
124624 sqlite3VdbeChangeP5(v, insFlags);
124625
124626 sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1); VdbeCoverage(v);
124627 sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
124628 sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
@@ -124671,10 +124927,16 @@
124671 }else if( !HasRowid(pSrc) && pDestIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){
124672 idxInsFlags |= OPFLAG_NCHANGE;
124673 }
124674 if( idxInsFlags!=(OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT) ){
124675 sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);
 
 
 
 
 
 
124676 }
124677 sqlite3VdbeAddOp2(v, OP_IdxInsert, iDest, regData);
124678 sqlite3VdbeChangeP5(v, idxInsFlags|OPFLAG_APPEND);
124679 sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1); VdbeCoverage(v);
124680 sqlite3VdbeJumpHere(v, addr1);
@@ -129635,26 +129897,30 @@
129635 ** Fill the InitData structure with an error message that indicates
129636 ** that the database is corrupt.
129637 */
129638 static void corruptSchema(
129639 InitData *pData, /* Initialization context */
129640 const char *zObj, /* Object being parsed at the point of error */
129641 const char *zExtra /* Error information */
129642 ){
129643 sqlite3 *db = pData->db;
129644 if( db->mallocFailed ){
129645 pData->rc = SQLITE_NOMEM_BKPT;
129646 }else if( pData->pzErrMsg[0]!=0 ){
129647 /* A error message has already been generated. Do not overwrite it */
129648 }else if( pData->mInitFlags & INITFLAG_AlterTable ){
129649 *pData->pzErrMsg = sqlite3DbStrDup(db, zExtra);
 
 
 
 
129650 pData->rc = SQLITE_ERROR;
129651 }else if( db->flags & SQLITE_WriteSchema ){
129652 pData->rc = SQLITE_CORRUPT_BKPT;
129653 }else{
129654 char *z;
129655 if( zObj==0 ) zObj = "?";
129656 z = sqlite3MPrintf(db, "malformed database schema (%s)", zObj);
129657 if( zExtra && zExtra[0] ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra);
129658 *pData->pzErrMsg = z;
129659 pData->rc = SQLITE_CORRUPT_BKPT;
129660 }
@@ -129708,18 +129974,18 @@
129708 UNUSED_PARAMETER2(NotUsed, argc);
129709 assert( sqlite3_mutex_held(db->mutex) );
129710 db->mDbFlags |= DBFLAG_EncodingFixed;
129711 pData->nInitRow++;
129712 if( db->mallocFailed ){
129713 corruptSchema(pData, argv[1], 0);
129714 return 1;
129715 }
129716
129717 assert( iDb>=0 && iDb<db->nDb );
129718 if( argv==0 ) return 0; /* Might happen if EMPTY_RESULT_CALLBACKS are on */
129719 if( argv[3]==0 ){
129720 corruptSchema(pData, argv[1], 0);
129721 }else if( argv[4]
129722 && 'c'==sqlite3UpperToLower[(unsigned char)argv[4][0]]
129723 && 'r'==sqlite3UpperToLower[(unsigned char)argv[4][1]] ){
129724 /* Call the parser to process a CREATE TABLE, INDEX or VIEW.
129725 ** But because db->init.busy is set to 1, no VDBE code is generated
@@ -129740,11 +130006,11 @@
129740 db->init.iDb = iDb;
129741 if( sqlite3GetUInt32(argv[3], &db->init.newTnum)==0
129742 || (db->init.newTnum>pData->mxPage && pData->mxPage>0)
129743 ){
129744 if( sqlite3Config.bExtraSchemaChecks ){
129745 corruptSchema(pData, argv[1], "invalid rootpage");
129746 }
129747 }
129748 db->init.orphanTrigger = 0;
129749 db->init.azInit = argv;
129750 pStmt = 0;
@@ -129759,17 +130025,17 @@
129759 }else{
129760 if( rc > pData->rc ) pData->rc = rc;
129761 if( rc==SQLITE_NOMEM ){
129762 sqlite3OomFault(db);
129763 }else if( rc!=SQLITE_INTERRUPT && (rc&0xFF)!=SQLITE_LOCKED ){
129764 corruptSchema(pData, argv[1], sqlite3_errmsg(db));
129765 }
129766 }
129767 }
129768 sqlite3_finalize(pStmt);
129769 }else if( argv[1]==0 || (argv[4]!=0 && argv[4][0]!=0) ){
129770 corruptSchema(pData, argv[1], 0);
129771 }else{
129772 /* If the SQL column is blank it means this is an index that
129773 ** was created to be the PRIMARY KEY or to fulfill a UNIQUE
129774 ** constraint for a CREATE TABLE. The index should have already
129775 ** been created when we processed the CREATE TABLE. All we have
@@ -129776,19 +130042,19 @@
129776 ** to do here is record the root page number for that index.
129777 */
129778 Index *pIndex;
129779 pIndex = sqlite3FindIndex(db, argv[1], db->aDb[iDb].zDbSName);
129780 if( pIndex==0 ){
129781 corruptSchema(pData, argv[1], "orphan index");
129782 }else
129783 if( sqlite3GetUInt32(argv[3],&pIndex->tnum)==0
129784 || pIndex->tnum<2
129785 || pIndex->tnum>pData->mxPage
129786 || sqlite3IndexHasDuplicateRootPage(pIndex)
129787 ){
129788 if( sqlite3Config.bExtraSchemaChecks ){
129789 corruptSchema(pData, argv[1], "invalid rootpage");
129790 }
129791 }
129792 }
129793 return 0;
129794 }
@@ -130164,35 +130430,20 @@
130164 assert( i>=0 && i<db->nDb );
130165 }
130166 return i;
130167 }
130168
130169 /*
130170 ** Deallocate a single AggInfo object
130171 */
130172 static void agginfoFree(sqlite3 *db, AggInfo *p){
130173 sqlite3DbFree(db, p->aCol);
130174 sqlite3DbFree(db, p->aFunc);
130175 sqlite3DbFree(db, p);
130176 }
130177
130178 /*
130179 ** Free all memory allocations in the pParse object
130180 */
130181 SQLITE_PRIVATE void sqlite3ParserReset(Parse *pParse){
130182 sqlite3 *db = pParse->db;
130183 AggInfo *pThis = pParse->pAggList;
130184 while( pThis ){
130185 AggInfo *pNext = pThis->pNext;
130186 agginfoFree(db, pThis);
130187 pThis = pNext;
130188 }
130189 while( pParse->pCleanup ){
130190 ParseCleanup *pCleanup = pParse->pCleanup;
130191 pParse->pCleanup = pCleanup->pNext;
130192 pCleanup->xCleanup(db, pCleanup->pPtr);
130193 sqlite3DbFree(db, pCleanup);
130194 }
130195 sqlite3DbFree(db, pParse->aLabel);
130196 if( pParse->pConstExpr ){
130197 sqlite3ExprListDelete(db, pParse->pConstExpr);
130198 }
@@ -130893,11 +131144,11 @@
130893
130894 /*
130895 ** Return the index of a column in a table. Return -1 if the column
130896 ** is not contained in the table.
130897 */
130898 static int columnIndex(Table *pTab, const char *zCol){
130899 int i;
130900 u8 h = sqlite3StrIHash(zCol);
130901 Column *pCol;
130902 for(pCol=pTab->aCol, i=0; i<pTab->nCol; pCol++, i++){
130903 if( pCol->hName==h && sqlite3StrICmp(pCol->zName, zCol)==0 ) return i;
@@ -130925,11 +131176,11 @@
130925 int i; /* For looping over tables in pSrc */
130926 int iCol; /* Index of column matching zCol */
130927
130928 assert( (piTab==0)==(piCol==0) ); /* Both or neither are NULL */
130929 for(i=0; i<N; i++){
130930 iCol = columnIndex(pSrc->a[i].pTab, zCol);
130931 if( iCol>=0
130932 && (bIgnoreHidden==0 || IsHiddenColumn(&pSrc->a[i].pTab->aCol[iCol])==0)
130933 ){
130934 if( piTab ){
130935 *piTab = i;
@@ -131135,11 +131386,11 @@
131135 int iLeft; /* Table on the left with matching column name */
131136 int iLeftCol; /* Column number of matching column on the left */
131137 int iRightCol; /* Column number of matching column on the right */
131138
131139 zName = pList->a[j].zName;
131140 iRightCol = columnIndex(pRightTab, zName);
131141 if( iRightCol<0
131142 || !tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol, 0)
131143 ){
131144 sqlite3ErrorMsg(pParse, "cannot join using column %s - column "
131145 "not present in both tables", zName);
@@ -132717,10 +132968,11 @@
132717 sNC.pSrcList = pSelect->pSrc;
132718 a = pSelect->pEList->a;
132719 for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
132720 const char *zType;
132721 int n, m;
 
132722 p = a[i].pExpr;
132723 zType = columnType(&sNC, p, 0, 0, 0);
132724 /* pCol->szEst = ... // Column size est for SELECT tables never used */
132725 pCol->affinity = sqlite3ExprAffinity(p);
132726 if( zType ){
@@ -134319,11 +134571,12 @@
134319 ** Expression walker callback used by renumberCursors() to update
134320 ** Expr objects to match newly assigned cursor numbers.
134321 */
134322 static int renumberCursorsCb(Walker *pWalker, Expr *pExpr){
134323 int *aCsrMap = pWalker->u.aiCol;
134324 if( pExpr->op==TK_COLUMN && aCsrMap[pExpr->iTable] ){
 
134325 pExpr->iTable = aCsrMap[pExpr->iTable];
134326 }
134327 if( ExprHasProperty(pExpr, EP_FromJoin) && aCsrMap[pExpr->iRightJoinTable] ){
134328 pExpr->iRightJoinTable = aCsrMap[pExpr->iRightJoinTable];
134329 }
@@ -135223,10 +135476,11 @@
135223 if( ExprHasProperty(pWhere,EP_FromJoin) && pWhere->iRightJoinTable!=iCursor ){
135224 return 0; /* restriction (5) */
135225 }
135226 if( sqlite3ExprIsTableConstant(pWhere, iCursor) ){
135227 nChng++;
 
135228 while( pSubq ){
135229 SubstContext x;
135230 pNew = sqlite3ExprDup(pParse->db, pWhere, 0);
135231 unsetJoinExpr(pNew, -1);
135232 x.pParse = pParse;
@@ -136395,10 +136649,12 @@
136395 static struct SrcList_item *isSelfJoinView(
136396 SrcList *pTabList, /* Search for self-joins in this FROM clause */
136397 struct SrcList_item *pThis /* Search for prior reference to this subquery */
136398 ){
136399 struct SrcList_item *pItem;
 
 
136400 for(pItem = pTabList->a; pItem<pThis; pItem++){
136401 Select *pS1;
136402 if( pItem->pSelect==0 ) continue;
136403 if( pItem->fg.viaCoroutine ) continue;
136404 if( pItem->zName==0 ) continue;
@@ -136410,21 +136666,28 @@
136410 if( pItem->pTab->pSchema==0 && pThis->pSelect->selId!=pS1->selId ){
136411 /* The query flattener left two different CTE tables with identical
136412 ** names in the same FROM clause. */
136413 continue;
136414 }
136415 if( sqlite3ExprCompare(0, pThis->pSelect->pWhere, pS1->pWhere, -1)
136416 || sqlite3ExprCompare(0, pThis->pSelect->pHaving, pS1->pHaving, -1)
136417 ){
136418 /* The view was modified by some other optimization such as
136419 ** pushDownWhereTerms() */
136420 continue;
136421 }
136422 return pItem;
136423 }
136424 return 0;
136425 }
 
 
 
 
 
 
 
 
 
136426
136427 #ifdef SQLITE_COUNTOFVIEW_OPTIMIZATION
136428 /*
136429 ** Attempt to transform a query of the form
136430 **
@@ -136833,10 +137096,11 @@
136833 SELECTTRACE(0x100,pParse,p,
136834 ("After WHERE-clause push-down into subquery %d:\n", pSub->selId));
136835 sqlite3TreeViewSelect(0, p, 0);
136836 }
136837 #endif
 
136838 }else{
136839 SELECTTRACE(0x100,pParse,p,("Push-down not possible\n"));
136840 }
136841
136842 zSavedAuthContext = pParse->zAuthContext;
@@ -137055,10 +137319,11 @@
137055 sSort.labelOBLopt = sqlite3WhereOrderByLimitOptLabel(pWInfo);
137056 if( sSort.nOBSat==sSort.pOrderBy->nExpr ){
137057 sSort.pOrderBy = 0;
137058 }
137059 }
 
137060
137061 /* If sorting index that was created by a prior OP_OpenEphemeral
137062 ** instruction ended up not being needed, then change the OP_OpenEphemeral
137063 ** into an OP_Noop.
137064 */
@@ -137093,10 +137358,11 @@
137093 sqlite3WhereContinueLabel(pWInfo),
137094 sqlite3WhereBreakLabel(pWInfo));
137095
137096 /* End the database scan loop.
137097 */
 
137098 sqlite3WhereEnd(pWInfo);
137099 }
137100 }else{
137101 /* This case when there exist aggregate functions or a GROUP BY clause
137102 ** or both */
@@ -137163,15 +137429,17 @@
137163 /* Convert TK_COLUMN nodes into TK_AGG_COLUMN and make entries in
137164 ** sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the
137165 ** SELECT statement.
137166 */
137167 pAggInfo = sqlite3DbMallocZero(db, sizeof(*pAggInfo) );
137168 if( pAggInfo==0 ){
 
 
 
 
137169 goto select_end;
137170 }
137171 pAggInfo->pNext = pParse->pAggList;
137172 pParse->pAggList = pAggInfo;
137173 pAggInfo->selId = p->selId;
137174 memset(&sNC, 0, sizeof(sNC));
137175 sNC.pParse = pParse;
137176 sNC.pSrcList = pTabList;
137177 sNC.uNC.pAggInfo = pAggInfo;
@@ -137286,10 +137554,11 @@
137286 SELECTTRACE(1,pParse,p,("WhereBegin\n"));
137287 pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pGroupBy, 0,
137288 WHERE_GROUPBY | (orderByGrp ? WHERE_SORTBYGROUP : 0), 0
137289 );
137290 if( pWInfo==0 ) goto select_end;
 
137291 if( sqlite3WhereIsOrdered(pWInfo)==pGroupBy->nExpr ){
137292 /* The optimizer is able to deliver rows in group by order so
137293 ** we do not have to sort. The OP_OpenEphemeral table will be
137294 ** cancelled later because we still need to use the pKeyInfo
137295 */
@@ -137334,10 +137603,11 @@
137334 regRecord = sqlite3GetTempReg(pParse);
137335 sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regRecord);
137336 sqlite3VdbeAddOp2(v, OP_SorterInsert, pAggInfo->sortingIdx, regRecord);
137337 sqlite3ReleaseTempReg(pParse, regRecord);
137338 sqlite3ReleaseTempRange(pParse, regBase, nCol);
 
137339 sqlite3WhereEnd(pWInfo);
137340 pAggInfo->sortingIdxPTab = sortPTab = pParse->nTab++;
137341 sortOut = sqlite3GetTempReg(pParse);
137342 sqlite3VdbeAddOp3(v, OP_OpenPseudo, sortPTab, sortOut, nCol);
137343 sqlite3VdbeAddOp2(v, OP_SorterSort, pAggInfo->sortingIdx, addrEnd);
@@ -137411,10 +137681,11 @@
137411 */
137412 if( groupBySort ){
137413 sqlite3VdbeAddOp2(v, OP_SorterNext, pAggInfo->sortingIdx,addrTopOfLoop);
137414 VdbeCoverage(v);
137415 }else{
 
137416 sqlite3WhereEnd(pWInfo);
137417 sqlite3VdbeChangeToNoop(v, addrSortingIdx);
137418 }
137419
137420 /* Output the final row of result
@@ -137566,15 +137837,17 @@
137566 pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pMinMaxOrderBy,
137567 0, minMaxFlag, 0);
137568 if( pWInfo==0 ){
137569 goto select_end;
137570 }
 
137571 updateAccumulator(pParse, regAcc, pAggInfo);
137572 if( regAcc ) sqlite3VdbeAddOp2(v, OP_Integer, 1, regAcc);
137573 if( minMaxFlag ){
137574 sqlite3WhereMinMaxOptEarlyOut(v, pWInfo);
137575 }
 
137576 sqlite3WhereEnd(pWInfo);
137577 finalizeAggFunctions(pParse, pAggInfo);
137578 }
137579
137580 sSort.pOrderBy = 0;
@@ -138199,11 +138472,11 @@
138199 db->aDb[iDb].zDbSName, zName,
138200 pTrig->table, z);
138201 sqlite3DbFree(db, z);
138202 sqlite3ChangeCookie(pParse, iDb);
138203 sqlite3VdbeAddParseSchemaOp(v, iDb,
138204 sqlite3MPrintf(db, "type='trigger' AND name='%q'", zName));
138205 }
138206
138207 if( db->init.busy ){
138208 Trigger *pLink = pTrig;
138209 Hash *pHash = &db->aDb[iDb].pSchema->trigHash;
@@ -141764,11 +142037,11 @@
141764 v = sqlite3GetVdbe(pParse);
141765 sqlite3ChangeCookie(pParse, iDb);
141766
141767 sqlite3VdbeAddOp0(v, OP_Expire);
141768 zWhere = sqlite3MPrintf(db, "name=%Q AND sql=%Q", pTab->zName, zStmt);
141769 sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere);
141770 sqlite3DbFree(db, zStmt);
141771
141772 iReg = ++pParse->nMem;
141773 sqlite3VdbeLoadString(v, iReg, pTab->zName);
141774 sqlite3VdbeAddOp2(v, OP_VCreate, iDb, iReg);
@@ -141935,10 +142208,11 @@
141935 if( zType[i]=='\0' && i>0 ){
141936 assert(zType[i-1]==' ');
141937 zType[i-1] = '\0';
141938 }
141939 pTab->aCol[iCol].colFlags |= COLFLAG_HIDDEN;
 
141940 oooHidden = TF_OOOHidden;
141941 }else{
141942 pTab->tabFlags |= oooHidden;
141943 }
141944 }
@@ -156754,22 +157028,22 @@
156754 #define sqlite3ParserCTX_PDECL ,Parse *pParse
156755 #define sqlite3ParserCTX_PARAM ,pParse
156756 #define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
156757 #define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
156758 #define YYFALLBACK 1
156759 #define YYNSTATE 571
156760 #define YYNRULE 393
156761 #define YYNRULE_WITH_ACTION 332
156762 #define YYNTOKEN 182
156763 #define YY_MAX_SHIFT 570
156764 #define YY_MIN_SHIFTREDUCE 822
156765 #define YY_MAX_SHIFTREDUCE 1214
156766 #define YY_ERROR_ACTION 1215
156767 #define YY_ACCEPT_ACTION 1216
156768 #define YY_NO_ACTION 1217
156769 #define YY_MIN_REDUCE 1218
156770 #define YY_MAX_REDUCE 1610
156771 /************* End control #defines *******************************************/
156772 #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
156773
156774 /* Define the yytestcase() macro to be a no-op if is not already defined
156775 ** otherwise.
@@ -156834,212 +157108,212 @@
156834 ** yy_default[] Default action for each state.
156835 **
156836 *********** Begin parsing tables **********************************************/
156837 #define YY_ACTTAB_COUNT (2017)
156838 static const YYACTIONTYPE yy_action[] = {
156839 /* 0 */ 564, 1249, 564, 197, 1571, 564, 1252, 564, 116, 113,
156840 /* 10 */ 218, 564, 1259, 564, 486, 393, 116, 113, 218, 405,
156841 /* 20 */ 357, 357, 42, 42, 42, 42, 469, 42, 42, 72,
156842 /* 30 */ 72, 956, 1251, 72, 72, 72, 72, 1496, 1576, 957,
156843 /* 40 */ 9, 886, 251, 123, 124, 114, 1192, 1192, 1032, 1035,
156844 /* 50 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 445, 405,
156845 /* 60 */ 471, 1551, 570, 2, 1220, 1577, 546, 145, 147, 305,
156846 /* 70 */ 546, 138, 546, 1292, 1292, 522, 564, 1189, 1300, 545,
156847 /* 80 */ 521, 511, 167, 123, 124, 114, 1192, 1192, 1032, 1035,
156848 /* 90 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 72, 72,
156849 /* 100 */ 281, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156850 /* 110 */ 117, 438, 273, 273, 273, 273, 443, 1168, 1532, 371,
156851 /* 120 */ 1534, 1168, 370, 1532, 535, 561, 1140, 561, 1140, 405,
156852 /* 130 */ 1075, 248, 215, 1189, 174, 527, 100, 304, 555, 228,
156853 /* 140 */ 438, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156854 /* 150 */ 117, 438, 448, 123, 124, 114, 1192, 1192, 1032, 1035,
156855 /* 160 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 541, 448,
156856 /* 170 */ 447, 442, 1168, 1169, 1170, 395, 1168, 1169, 1170, 125,
156857 /* 180 */ 120, 120, 120, 120, 119, 119, 118, 118, 118, 117,
156858 /* 190 */ 438, 119, 119, 118, 118, 118, 117, 438, 268, 405,
156859 /* 200 */ 1548, 122, 122, 122, 122, 115, 379, 84, 375, 273,
156860 /* 210 */ 273, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156861 /* 220 */ 117, 438, 561, 123, 124, 114, 1192, 1192, 1032, 1035,
156862 /* 230 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 405, 467,
156863 /* 240 */ 1118, 1604, 448, 82, 1604, 460, 329, 81, 120, 120,
156864 /* 250 */ 120, 120, 119, 119, 118, 118, 118, 117, 438, 116,
156865 /* 260 */ 113, 218, 123, 124, 114, 1192, 1192, 1032, 1035, 1025,
156866 /* 270 */ 1025, 121, 121, 122, 122, 122, 122, 564, 542, 1519,
156867 /* 280 */ 877, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156868 /* 290 */ 117, 438, 118, 118, 118, 117, 438, 12, 197, 71,
156869 /* 300 */ 71, 1135, 122, 122, 122, 122, 384, 405, 428, 1168,
156870 /* 310 */ 398, 503, 531, 347, 1135, 166, 312, 1135, 1116, 878,
156871 /* 320 */ 120, 120, 120, 120, 119, 119, 118, 118, 118, 117,
156872 /* 330 */ 438, 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025,
156873 /* 340 */ 121, 121, 122, 122, 122, 122, 1168, 267, 267, 120,
156874 /* 350 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438,
156875 /* 360 */ 561, 378, 1012, 1135, 1168, 1169, 1170, 240, 530, 563,
156876 /* 370 */ 499, 496, 495, 426, 538, 476, 1135, 1527, 1003, 1135,
156877 /* 380 */ 494, 6, 1002, 1392, 502, 1022, 1022, 1033, 1036, 120,
156878 /* 390 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438,
156879 /* 400 */ 425, 1168, 1169, 1170, 1096, 1460, 259, 276, 355, 505,
156880 /* 410 */ 350, 504, 245, 405, 1002, 1002, 1004, 343, 346, 1097,
156881 /* 420 */ 240, 460, 329, 499, 496, 495, 369, 510, 1526, 357,
156882 /* 430 */ 529, 358, 6, 494, 1098, 450, 203, 123, 124, 114,
156883 /* 440 */ 1192, 1192, 1032, 1035, 1025, 1025, 121, 121, 122, 122,
156884 /* 450 */ 122, 122, 520, 419, 1168, 897, 405, 569, 1026, 1220,
156885 /* 460 */ 500, 319, 1270, 992, 305, 898, 138, 188, 1287, 423,
156886 /* 470 */ 1266, 167, 486, 1300, 16, 16, 144, 857, 1287, 1269,
156887 /* 480 */ 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025, 121,
156888 /* 490 */ 121, 122, 122, 122, 122, 120, 120, 120, 120, 119,
156889 /* 500 */ 119, 118, 118, 118, 117, 438, 526, 273, 273, 1168,
156890 /* 510 */ 1169, 1170, 1392, 564, 166, 327, 1495, 1012, 414, 372,
156891 /* 520 */ 561, 486, 316, 1168, 318, 405, 304, 555, 373, 861,
156892 /* 530 */ 182, 216, 857, 1003, 228, 72, 72, 1002, 120, 120,
156893 /* 540 */ 120, 120, 119, 119, 118, 118, 118, 117, 438, 123,
156894 /* 550 */ 124, 114, 1192, 1192, 1032, 1035, 1025, 1025, 121, 121,
156895 /* 560 */ 122, 122, 122, 122, 405, 1459, 442, 1168, 854, 1002,
156896 /* 570 */ 1002, 1004, 300, 1524, 116, 113, 218, 6, 1168, 1169,
156897 /* 580 */ 1170, 183, 420, 116, 113, 218, 1168, 314, 123, 124,
156898 /* 590 */ 114, 1192, 1192, 1032, 1035, 1025, 1025, 121, 121, 122,
156899 /* 600 */ 122, 122, 122, 1465, 317, 943, 469, 120, 120, 120,
156900 /* 610 */ 120, 119, 119, 118, 118, 118, 117, 438, 1168, 211,
156901 /* 620 */ 1465, 1467, 1168, 1169, 1170, 917, 539, 1526, 475, 1168,
156902 /* 630 */ 916, 6, 1168, 405, 922, 435, 434, 1153, 213, 509,
156903 /* 640 */ 32, 1168, 1169, 1170, 279, 5, 120, 120, 120, 120,
156904 /* 650 */ 119, 119, 118, 118, 118, 117, 438, 123, 124, 114,
156905 /* 660 */ 1192, 1192, 1032, 1035, 1025, 1025, 121, 121, 122, 122,
156906 /* 670 */ 122, 122, 405, 1168, 1169, 1170, 1013, 1168, 273, 273,
156907 /* 680 */ 286, 1199, 1168, 1199, 1168, 1169, 1170, 1168, 1169, 1170,
156908 /* 690 */ 564, 561, 167, 1465, 117, 438, 123, 124, 114, 1192,
156909 /* 700 */ 1192, 1032, 1035, 1025, 1025, 121, 121, 122, 122, 122,
156910 /* 710 */ 122, 942, 13, 13, 127, 120, 120, 120, 120, 119,
156911 /* 720 */ 119, 118, 118, 118, 117, 438, 285, 417, 564, 449,
156912 /* 730 */ 564, 1392, 1168, 1169, 1170, 1290, 1290, 1168, 1169, 1170,
156913 /* 740 */ 97, 405, 992, 1606, 391, 997, 486, 304, 555, 17,
156914 /* 750 */ 72, 72, 72, 72, 120, 120, 120, 120, 119, 119,
156915 /* 760 */ 118, 118, 118, 117, 438, 123, 124, 114, 1192, 1192,
156916 /* 770 */ 1032, 1035, 1025, 1025, 121, 121, 122, 122, 122, 122,
156917 /* 780 */ 405, 1216, 1, 1, 570, 2, 1220, 301, 415, 433,
156918 /* 790 */ 1299, 305, 839, 138, 327, 455, 315, 402, 401, 564,
156919 /* 800 */ 1300, 421, 3, 290, 123, 124, 114, 1192, 1192, 1032,
156920 /* 810 */ 1035, 1025, 1025, 121, 121, 122, 122, 122, 122, 377,
156921 /* 820 */ 564, 13, 13, 120, 120, 120, 120, 119, 119, 118,
156922 /* 830 */ 118, 118, 117, 438, 273, 273, 422, 273, 273, 1168,
156923 /* 840 */ 1304, 357, 13, 13, 1118, 1605, 12, 561, 1605, 405,
156924 /* 850 */ 561, 458, 561, 1168, 558, 558, 558, 424, 436, 436,
156925 /* 860 */ 436, 228, 120, 120, 120, 120, 119, 119, 118, 118,
156926 /* 870 */ 118, 117, 438, 123, 124, 114, 1192, 1192, 1032, 1035,
156927 /* 880 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 146, 197,
156928 /* 890 */ 414, 564, 1055, 442, 1168, 1169, 1170, 414, 469, 435,
156929 /* 900 */ 434, 404, 562, 247, 911, 911, 564, 1196, 1168, 1169,
156930 /* 910 */ 1170, 486, 1198, 72, 72, 491, 1507, 547, 102, 194,
156931 /* 920 */ 1197, 564, 1116, 294, 459, 294, 1298, 251, 72, 72,
156932 /* 930 */ 1452, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156933 /* 940 */ 117, 438, 244, 56, 56, 1199, 564, 1199, 564, 1238,
156934 /* 950 */ 437, 273, 273, 564, 514, 1295, 564, 512, 564, 282,
156935 /* 960 */ 273, 273, 1189, 517, 561, 546, 284, 341, 52, 52,
156936 /* 970 */ 13, 13, 289, 561, 548, 13, 13, 564, 13, 13,
156937 /* 980 */ 13, 13, 549, 273, 273, 293, 1407, 105, 273, 273,
156938 /* 990 */ 191, 273, 273, 192, 444, 543, 561, 273, 273, 57,
156939 /* 1000 */ 57, 561, 274, 274, 561, 513, 1504, 405, 270, 410,
156940 /* 1010 */ 561, 941, 198, 304, 555, 561, 273, 273, 1189, 106,
156941 /* 1020 */ 409, 104, 356, 1545, 307, 346, 564, 405, 336, 561,
156942 /* 1030 */ 339, 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025,
156943 /* 1040 */ 121, 121, 122, 122, 122, 122, 469, 405, 15, 15,
156944 /* 1050 */ 475, 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025,
156945 /* 1060 */ 121, 121, 122, 122, 122, 122, 1080, 1080, 483, 358,
156946 /* 1070 */ 475, 123, 112, 114, 1192, 1192, 1032, 1035, 1025, 1025,
156947 /* 1080 */ 121, 121, 122, 122, 122, 122, 390, 1212, 308, 120,
156948 /* 1090 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438,
156949 /* 1100 */ 99, 217, 480, 1172, 1406, 564, 477, 430, 541, 120,
156950 /* 1110 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438,
156951 /* 1120 */ 291, 1077, 564, 1392, 564, 1077, 941, 44, 44, 120,
156952 /* 1130 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438,
156953 /* 1140 */ 356, 1545, 537, 1096, 58, 58, 45, 45, 326, 405,
156954 /* 1150 */ 1135, 827, 828, 829, 243, 242, 241, 481, 1097, 1172,
156955 /* 1160 */ 1392, 536, 311, 1135, 1213, 486, 1135, 564, 292, 405,
156956 /* 1170 */ 1146, 1241, 411, 1098, 124, 114, 1192, 1192, 1032, 1035,
156957 /* 1180 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 564, 59,
156958 /* 1190 */ 59, 564, 507, 482, 552, 114, 1192, 1192, 1032, 1035,
156959 /* 1200 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 1525, 334,
156960 /* 1210 */ 60, 60, 6, 61, 61, 390, 1117, 1523, 917, 1520,
156961 /* 1220 */ 1146, 6, 564, 916, 564, 109, 556, 564, 4, 941,
156962 /* 1230 */ 431, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156963 /* 1240 */ 117, 438, 559, 864, 62, 62, 63, 63, 564, 46,
156964 /* 1250 */ 46, 120, 120, 120, 120, 119, 119, 118, 118, 118,
156965 /* 1260 */ 117, 438, 564, 1135, 1522, 439, 1323, 564, 6, 564,
156966 /* 1270 */ 47, 47, 564, 557, 411, 1268, 1135, 553, 142, 1135,
156967 /* 1280 */ 564, 465, 304, 555, 48, 48, 564, 167, 544, 50,
156968 /* 1290 */ 50, 51, 51, 1213, 64, 64, 956, 109, 556, 864,
156969 /* 1300 */ 4, 564, 65, 65, 957, 1012, 564, 140, 66, 66,
156970 /* 1310 */ 564, 107, 107, 564, 559, 849, 205, 564, 108, 217,
156971 /* 1320 */ 439, 566, 565, 14, 14, 1002, 8, 523, 67, 67,
156972 /* 1330 */ 564, 452, 129, 129, 221, 68, 68, 439, 453, 53,
156973 /* 1340 */ 53, 403, 304, 555, 941, 412, 168, 211, 403, 553,
156974 /* 1350 */ 111, 1188, 69, 69, 99, 462, 244, 1002, 1002, 1004,
156975 /* 1360 */ 1005, 27, 466, 533, 564, 403, 564, 1336, 532, 272,
156976 /* 1370 */ 215, 849, 403, 564, 85, 202, 564, 1012, 564, 1207,
156977 /* 1380 */ 564, 303, 564, 107, 107, 564, 70, 70, 54, 54,
156978 /* 1390 */ 108, 403, 439, 566, 565, 153, 153, 1002, 154, 154,
156979 /* 1400 */ 77, 77, 55, 55, 73, 73, 1113, 130, 130, 392,
156980 /* 1410 */ 109, 556, 143, 4, 38, 564, 473, 299, 564, 461,
156981 /* 1420 */ 225, 1335, 524, 410, 30, 876, 875, 559, 454, 1002,
156982 /* 1430 */ 1002, 1004, 1005, 27, 1550, 1157, 441, 74, 74, 277,
156983 /* 1440 */ 131, 131, 324, 1510, 388, 388, 387, 262, 385, 564,
156984 /* 1450 */ 439, 836, 868, 320, 463, 31, 564, 883, 884, 354,
156985 /* 1460 */ 325, 206, 553, 99, 222, 206, 310, 544, 1539, 353,
156986 /* 1470 */ 994, 132, 132, 250, 309, 1484, 533, 287, 128, 128,
156987 /* 1480 */ 1062, 534, 109, 556, 468, 4, 564, 250, 1483, 470,
156988 /* 1490 */ 1012, 564, 250, 275, 564, 330, 107, 107, 99, 559,
156989 /* 1500 */ 1074, 564, 1074, 108, 224, 439, 566, 565, 152, 152,
156990 /* 1510 */ 1002, 474, 158, 151, 151, 160, 136, 136, 492, 959,
156991 /* 1520 */ 960, 246, 439, 135, 135, 344, 478, 564, 99, 1058,
156992 /* 1530 */ 487, 223, 246, 564, 553, 227, 1062, 950, 914, 1006,
156993 /* 1540 */ 250, 111, 1002, 1002, 1004, 1005, 27, 331, 533, 133,
156994 /* 1550 */ 133, 564, 1073, 532, 1073, 134, 134, 847, 915, 1332,
156995 /* 1560 */ 141, 111, 1012, 335, 338, 406, 340, 342, 107, 107,
156996 /* 1570 */ 304, 555, 1283, 76, 76, 108, 564, 439, 566, 565,
156997 /* 1580 */ 1157, 441, 1002, 564, 277, 109, 556, 551, 4, 388,
156998 /* 1590 */ 388, 387, 262, 385, 446, 1006, 836, 1267, 78, 78,
156999 /* 1600 */ 349, 564, 559, 359, 564, 75, 75, 360, 1330, 222,
157000 /* 1610 */ 1564, 310, 1344, 1391, 1002, 1002, 1004, 1005, 27, 309,
157001 /* 1620 */ 1319, 550, 1397, 43, 43, 439, 49, 49, 1248, 1240,
157002 /* 1630 */ 1229, 1228, 1230, 1558, 265, 1316, 200, 553, 362, 364,
157003 /* 1640 */ 366, 389, 11, 208, 1373, 220, 1378, 280, 1366, 224,
157004 /* 1650 */ 451, 322, 472, 328, 283, 1561, 1266, 158, 323, 1383,
157005 /* 1660 */ 160, 1382, 288, 368, 497, 1012, 352, 396, 382, 212,
157006 /* 1670 */ 1456, 107, 107, 921, 1455, 1207, 223, 254, 108, 1503,
157007 /* 1680 */ 439, 566, 565, 1501, 1204, 1002, 413, 204, 207, 84,
157008 /* 1690 */ 195, 109, 556, 1379, 4, 554, 180, 196, 170, 80,
157009 /* 1700 */ 164, 456, 175, 1461, 172, 83, 176, 457, 559, 177,
157010 /* 1710 */ 406, 178, 35, 490, 230, 304, 555, 1002, 1002, 1004,
157011 /* 1720 */ 1005, 27, 97, 394, 1385, 1384, 464, 1387, 184, 397,
157012 /* 1730 */ 36, 439, 1450, 479, 90, 485, 189, 234, 236, 446,
157013 /* 1740 */ 1472, 266, 488, 553, 337, 333, 237, 399, 1231, 238,
157014 /* 1750 */ 506, 1286, 427, 92, 1277, 868, 1276, 1285, 213, 101,
157015 /* 1760 */ 556, 429, 4, 1284, 1255, 1575, 1574, 525, 1256, 400,
157016 /* 1770 */ 351, 1012, 1254, 1573, 1544, 96, 559, 107, 107, 516,
157017 /* 1780 */ 519, 297, 298, 1327, 108, 361, 439, 566, 565, 1328,
157018 /* 1790 */ 252, 1002, 253, 432, 1530, 126, 1529, 544, 10, 439,
157019 /* 1800 */ 1436, 376, 528, 103, 98, 260, 1237, 34, 567, 1163,
157020 /* 1810 */ 374, 553, 1326, 363, 199, 1309, 365, 1308, 1325, 380,
157021 /* 1820 */ 367, 261, 381, 1002, 1002, 1004, 1005, 27, 1351, 1350,
157022 /* 1830 */ 263, 264, 568, 1226, 1221, 155, 1488, 1489, 1487, 1012,
157023 /* 1840 */ 139, 156, 1486, 79, 295, 107, 107, 302, 823, 440,
157024 /* 1850 */ 209, 210, 108, 201, 439, 566, 565, 306, 157, 1002,
157025 /* 1860 */ 219, 277, 278, 137, 1072, 1070, 388, 388, 387, 262,
157026 /* 1870 */ 385, 313, 407, 836, 171, 159, 408, 169, 1188, 226,
157027 /* 1880 */ 900, 173, 321, 1086, 229, 179, 222, 161, 310, 162,
157028 /* 1890 */ 416, 1002, 1002, 1004, 1005, 27, 309, 181, 418, 163,
157029 /* 1900 */ 1089, 86, 87, 88, 89, 231, 232, 1085, 148, 18,
157030 /* 1910 */ 233, 332, 250, 1201, 484, 186, 235, 37, 838, 489,
157031 /* 1920 */ 353, 1078, 185, 239, 187, 493, 224, 91, 866, 19,
157032 /* 1930 */ 498, 345, 20, 348, 158, 501, 93, 160, 165, 879,
157033 /* 1940 */ 149, 296, 94, 508, 95, 1151, 150, 1038, 1121, 39,
157034 /* 1950 */ 515, 1122, 40, 223, 214, 518, 269, 271, 190, 944,
157035 /* 1960 */ 1137, 111, 1139, 249, 1141, 1145, 21, 1125, 1144, 33,
157036 /* 1970 */ 540, 949, 22, 23, 24, 25, 193, 99, 1053, 26,
157037 /* 1980 */ 1039, 7, 1037, 1041, 1095, 1042, 1094, 406, 255, 256,
157038 /* 1990 */ 28, 41, 304, 555, 1007, 848, 560, 110, 29, 386,
157039 /* 2000 */ 910, 257, 383, 258, 1566, 1159, 1158, 1565, 1217, 1217,
157040 /* 2010 */ 1217, 1217, 1217, 1217, 1217, 1217, 446,
157041 };
157042 static const YYCODETYPE yy_lookahead[] = {
157043 /* 0 */ 190, 212, 190, 190, 211, 190, 212, 190, 270, 271,
157044 /* 10 */ 272, 190, 219, 190, 190, 202, 270, 271, 272, 19,
157045 /* 20 */ 190, 190, 212, 213, 212, 213, 190, 212, 213, 212,
@@ -157180,70 +157454,70 @@
157180 /* 1370 */ 253, 115, 250, 190, 147, 148, 190, 99, 190, 60,
157181 /* 1380 */ 190, 240, 190, 105, 106, 190, 212, 213, 212, 213,
157182 /* 1390 */ 112, 250, 114, 115, 116, 212, 213, 119, 212, 213,
157183 /* 1400 */ 212, 213, 212, 213, 212, 213, 23, 212, 213, 26,
157184 /* 1410 */ 19, 20, 22, 22, 24, 190, 19, 251, 190, 127,
157185 /* 1420 */ 24, 190, 114, 113, 22, 118, 119, 36, 190, 151,
157186 /* 1430 */ 152, 153, 154, 155, 0, 1, 2, 212, 213, 5,
157187 /* 1440 */ 212, 213, 150, 190, 10, 11, 12, 13, 14, 190,
157188 /* 1450 */ 59, 17, 124, 190, 127, 53, 190, 7, 8, 119,
157189 /* 1460 */ 23, 140, 71, 26, 30, 140, 32, 143, 312, 129,
157190 /* 1470 */ 23, 212, 213, 26, 40, 190, 85, 150, 212, 213,
157191 /* 1480 */ 59, 90, 19, 20, 23, 22, 190, 26, 190, 23,
157192 /* 1490 */ 99, 190, 26, 22, 190, 23, 105, 106, 26, 36,
157193 /* 1500 */ 151, 190, 153, 112, 70, 114, 115, 116, 212, 213,
157194 /* 1510 */ 119, 114, 78, 212, 213, 81, 212, 213, 23, 83,
157195 /* 1520 */ 84, 26, 59, 212, 213, 23, 190, 190, 26, 23,
157196 /* 1530 */ 284, 97, 26, 190, 71, 139, 115, 23, 23, 59,
157197 /* 1540 */ 26, 26, 151, 152, 153, 154, 155, 190, 85, 212,
157198 /* 1550 */ 213, 190, 151, 90, 153, 212, 213, 23, 23, 190,
157199 /* 1560 */ 26, 26, 99, 190, 190, 131, 190, 190, 105, 106,
157200 /* 1570 */ 136, 137, 190, 212, 213, 112, 190, 114, 115, 116,
157201 /* 1580 */ 1, 2, 119, 190, 5, 19, 20, 232, 22, 10,
157202 /* 1590 */ 11, 12, 13, 14, 160, 115, 17, 190, 212, 213,
157203 /* 1600 */ 190, 190, 36, 190, 190, 212, 213, 190, 190, 30,
157204 /* 1610 */ 139, 32, 190, 190, 151, 152, 153, 154, 155, 40,
157205 /* 1620 */ 190, 190, 190, 212, 213, 59, 212, 213, 190, 190,
157206 /* 1630 */ 190, 190, 190, 190, 283, 251, 238, 71, 251, 251,
157207 /* 1640 */ 251, 188, 239, 210, 263, 293, 267, 241, 263, 70,
157208 /* 1650 */ 255, 289, 289, 241, 255, 193, 221, 78, 242, 267,
157209 /* 1660 */ 81, 267, 242, 255, 216, 99, 215, 267, 241, 225,
157210 /* 1670 */ 215, 105, 106, 107, 215, 60, 97, 139, 112, 197,
157211 /* 1680 */ 114, 115, 116, 197, 38, 119, 197, 148, 239, 149,
157212 /* 1690 */ 245, 19, 20, 268, 22, 276, 22, 245, 293, 290,
157213 /* 1700 */ 43, 18, 233, 279, 230, 290, 233, 197, 36, 233,
157214 /* 1710 */ 131, 233, 266, 18, 196, 136, 137, 151, 152, 153,
157215 /* 1720 */ 154, 155, 147, 242, 268, 268, 242, 230, 230, 242,
157216 /* 1730 */ 266, 59, 242, 197, 156, 62, 22, 196, 196, 160,
157217 /* 1740 */ 286, 197, 217, 71, 197, 285, 196, 217, 197, 196,
157218 /* 1750 */ 113, 214, 64, 22, 223, 124, 223, 214, 163, 19,
157219 /* 1760 */ 20, 111, 22, 214, 216, 220, 220, 142, 214, 217,
157220 /* 1770 */ 214, 99, 214, 214, 306, 113, 36, 105, 106, 217,
157221 /* 1780 */ 217, 278, 278, 257, 112, 256, 114, 115, 116, 257,
157222 /* 1790 */ 197, 119, 91, 82, 311, 146, 311, 143, 22, 59,
157223 /* 1800 */ 273, 197, 144, 156, 145, 25, 200, 26, 199, 13,
157224 /* 1810 */ 245, 71, 257, 256, 244, 246, 256, 246, 257, 243,
157225 /* 1820 */ 256, 191, 242, 151, 152, 153, 154, 155, 261, 261,
157226 /* 1830 */ 191, 6, 189, 189, 189, 203, 209, 209, 209, 99,
157227 /* 1840 */ 218, 203, 209, 209, 218, 105, 106, 275, 4, 3,
157228 /* 1850 */ 210, 210, 112, 22, 114, 115, 116, 161, 203, 119,
157229 /* 1860 */ 15, 5, 98, 16, 23, 23, 10, 11, 12, 13,
157230 /* 1870 */ 14, 137, 299, 17, 149, 128, 299, 296, 26, 24,
157231 /* 1880 */ 20, 140, 16, 1, 142, 140, 30, 128, 32, 128,
157232 /* 1890 */ 61, 151, 152, 153, 154, 155, 40, 149, 37, 128,
157233 /* 1900 */ 114, 53, 53, 53, 53, 34, 139, 1, 5, 22,
157234 /* 1910 */ 113, 159, 26, 75, 41, 113, 139, 24, 20, 19,
157235 /* 1920 */ 129, 68, 68, 123, 22, 67, 70, 22, 59, 22,
157236 /* 1930 */ 67, 23, 22, 24, 78, 96, 22, 81, 37, 28,
157237 /* 1940 */ 23, 67, 147, 22, 26, 23, 23, 23, 23, 22,
157238 /* 1950 */ 24, 23, 22, 97, 139, 24, 23, 23, 22, 141,
157239 /* 1960 */ 88, 26, 86, 34, 75, 75, 34, 23, 93, 22,
157240 /* 1970 */ 24, 114, 34, 34, 34, 34, 26, 26, 23, 34,
157241 /* 1980 */ 23, 44, 23, 23, 23, 11, 23, 131, 26, 22,
157242 /* 1990 */ 22, 22, 136, 137, 23, 23, 26, 22, 22, 15,
157243 /* 2000 */ 133, 139, 23, 139, 139, 1, 1, 139, 313, 313,
157244 /* 2010 */ 313, 313, 313, 313, 313, 313, 160, 313, 313, 313,
157245 /* 2020 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157246 /* 2030 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157247 /* 2040 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157248 /* 2050 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157249 /* 2060 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
@@ -157257,15 +157531,15 @@
157257 /* 2140 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157258 /* 2150 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157259 /* 2160 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157260 /* 2170 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157261 /* 2180 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157262 /* 2190 */ 182, 182, 182, 182, 182, 182, 182, 182, 182,
157263 };
157264 #define YY_SHIFT_COUNT (570)
157265 #define YY_SHIFT_MIN (0)
157266 #define YY_SHIFT_MAX (2005)
157267 static const unsigned short int yy_shift_ofst[] = {
157268 /* 0 */ 1579, 1434, 1856, 1206, 1206, 1, 1278, 1391, 1463, 1672,
157269 /* 10 */ 1672, 1672, 390, 0, 0, 180, 1008, 1672, 1672, 1672,
157270 /* 20 */ 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672,
157271 /* 30 */ 794, 794, 287, 287, 250, 611, 1, 1, 1, 1,
@@ -157285,48 +157559,48 @@
157285 /* 170 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
157286 /* 180 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
157287 /* 190 */ 573, 1074, 1074, 573, 119, 1187, 1187, 1044, 1044, 1145,
157288 /* 200 */ 1146, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 418, 263,
157289 /* 210 */ 263, 559, 303, 618, 527, 623, 464, 570, 780, 573,
157290 /* 220 */ 573, 573, 573, 573, 573, 573, 573, 573, 669, 573,
157291 /* 230 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
157292 /* 240 */ 573, 245, 245, 245, 573, 573, 573, 573, 985, 573,
157293 /* 250 */ 573, 573, 18, 1076, 573, 573, 1131, 573, 573, 573,
157294 /* 260 */ 573, 573, 573, 573, 573, 941, 1092, 770, 903, 903,
157295 /* 270 */ 903, 903, 1203, 770, 770, 1085, 692, 1144, 1319, 1168,
157296 /* 280 */ 1227, 1321, 1308, 1227, 1308, 1397, 593, 1168, 1168, 593,
157297 /* 290 */ 1168, 1321, 1397, 1328, 15, 1310, 1265, 1265, 1265, 1308,
157298 /* 300 */ 1324, 1324, 863, 1325, 492, 1390, 1615, 1538, 1538, 1646,
157299 /* 310 */ 1646, 1538, 1540, 1539, 1674, 1657, 1683, 1683, 1683, 1683,
157300 /* 320 */ 1538, 1695, 1575, 1539, 1539, 1575, 1674, 1657, 1575, 1657,
157301 /* 330 */ 1575, 1538, 1695, 1578, 1673, 1538, 1695, 1714, 1538, 1695,
157302 /* 340 */ 1538, 1695, 1714, 1637, 1637, 1637, 1688, 1731, 1731, 1714,
157303 /* 350 */ 1637, 1631, 1637, 1688, 1637, 1637, 1595, 1714, 1650, 1650,
157304 /* 360 */ 1714, 1625, 1662, 1625, 1662, 1625, 1662, 1625, 1662, 1538,
157305 /* 370 */ 1701, 1701, 1711, 1711, 1649, 1654, 1776, 1538, 1647, 1649,
157306 /* 380 */ 1659, 1658, 1575, 1780, 1781, 1796, 1796, 1825, 1825, 1825,
157307 /* 390 */ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
157308 /* 400 */ 2017, 2017, 2017, 2017, 2017, 339, 445, 1064, 1193, 951,
157309 /* 410 */ 1029, 1256, 1383, 1402, 1396, 1292, 1327, 1437, 727, 1447,
157310 /* 420 */ 1461, 1466, 1472, 1495, 1502, 1184, 1307, 1450, 1340, 1421,
157311 /* 430 */ 1506, 1514, 1436, 1515, 1349, 1401, 1534, 1535, 1480, 1471,
157312 /* 440 */ 1844, 1846, 1831, 1696, 1845, 1764, 1847, 1841, 1842, 1734,
157313 /* 450 */ 1725, 1747, 1852, 1852, 1855, 1741, 1860, 1742, 1866, 1882,
157314 /* 460 */ 1745, 1759, 1852, 1761, 1829, 1861, 1852, 1748, 1848, 1849,
157315 /* 470 */ 1850, 1851, 1771, 1786, 1871, 1767, 1906, 1903, 1887, 1797,
157316 /* 480 */ 1752, 1853, 1886, 1854, 1838, 1873, 1777, 1802, 1893, 1898,
157317 /* 490 */ 1900, 1791, 1800, 1902, 1858, 1905, 1907, 1908, 1910, 1863,
157318 /* 500 */ 1869, 1909, 1839, 1911, 1914, 1874, 1901, 1917, 1795, 1921,
157319 /* 510 */ 1922, 1923, 1924, 1918, 1925, 1927, 1926, 1928, 1930, 1931,
157320 /* 520 */ 1815, 1933, 1934, 1857, 1929, 1936, 1818, 1935, 1932, 1938,
157321 /* 530 */ 1939, 1940, 1872, 1889, 1876, 1937, 1890, 1875, 1941, 1944,
157322 /* 540 */ 1947, 1946, 1950, 1951, 1945, 1955, 1935, 1957, 1959, 1960,
157323 /* 550 */ 1961, 1962, 1963, 1967, 1974, 1968, 1969, 1971, 1972, 1975,
157324 /* 560 */ 1976, 1970, 1867, 1862, 1864, 1865, 1868, 1979, 1984, 2004,
157325 /* 570 */ 2005,
157326 };
157327 #define YY_REDUCE_COUNT (404)
157328 #define YY_REDUCE_MIN (-262)
157329 #define YY_REDUCE_MAX (1655)
157330 static const short yy_reduce_ofst[] = {
157331 /* 0 */ 599, -123, 272, 716, 756, -121, -190, -188, -185, -183,
157332 /* 10 */ -179, -177, -26, 304, 313, -254, -11, 500, 609, 630,
@@ -157348,89 +157622,89 @@
157348 /* 170 */ -187, 328, 700, 707, 239, 282, 331, 556, 721, 438,
157349 /* 180 */ 193, 860, 322, 541, 880, 933, 975, 241, 651, 879,
157350 /* 190 */ 970, 270, 905, 918, 88, 914, 961, 967, 1069, -39,
157351 /* 200 */ 604, 1050, 1091, 1098, 1115, 1122, 1117, 1141, -211, -206,
157352 /* 210 */ -180, -130, -161, 10, 179, 236, 316, 341, 629, 726,
157353 /* 220 */ 804, 816, 834, 898, 972, 1177, 1231, 1238, 170, 1253,
157354 /* 230 */ 1263, 1285, 1298, 1336, 1357, 1369, 1373, 1374, 1376, 1377,
157355 /* 240 */ 1382, 240, 257, 1053, 1407, 1410, 1413, 1417, 1012, 1422,
157356 /* 250 */ 1423, 1430, 1166, 1156, 1418, 1431, 1355, 1432, 179, 1438,
157357 /* 260 */ 1439, 1440, 1441, 1442, 1443, 1246, 1351, 1398, 1384, 1387,
157358 /* 270 */ 1388, 1389, 1012, 1398, 1398, 1403, 1433, 1453, 1352, 1379,
157359 /* 280 */ 1381, 1406, 1395, 1385, 1399, 1362, 1416, 1392, 1394, 1420,
157360 /* 290 */ 1400, 1412, 1363, 1448, 1444, 1435, 1451, 1455, 1459, 1408,
157361 /* 300 */ 1445, 1452, 1419, 1427, 1449, 1462, 1405, 1482, 1486, 1409,
157362 /* 310 */ 1415, 1489, 1424, 1425, 1446, 1474, 1469, 1473, 1476, 1478,
157363 /* 320 */ 1510, 1518, 1481, 1456, 1457, 1484, 1464, 1497, 1487, 1498,
157364 /* 330 */ 1490, 1536, 1541, 1454, 1460, 1544, 1542, 1525, 1547, 1550,
157365 /* 340 */ 1551, 1553, 1530, 1537, 1543, 1549, 1531, 1545, 1546, 1552,
157366 /* 350 */ 1554, 1548, 1556, 1533, 1558, 1559, 1468, 1562, 1503, 1504,
157367 /* 360 */ 1563, 1526, 1529, 1532, 1557, 1555, 1560, 1561, 1564, 1593,
157368 /* 370 */ 1483, 1485, 1567, 1568, 1569, 1565, 1527, 1604, 1572, 1571,
157369 /* 380 */ 1570, 1576, 1580, 1606, 1609, 1630, 1639, 1643, 1644, 1645,
157370 /* 390 */ 1573, 1577, 1581, 1632, 1627, 1628, 1629, 1633, 1638, 1622,
157371 /* 400 */ 1626, 1640, 1641, 1634, 1655,
157372 };
157373 static const YYACTIONTYPE yy_default[] = {
157374 /* 0 */ 1610, 1610, 1610, 1445, 1215, 1324, 1215, 1215, 1215, 1445,
157375 /* 10 */ 1445, 1445, 1215, 1354, 1354, 1498, 1246, 1215, 1215, 1215,
157376 /* 20 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1444, 1215, 1215,
157377 /* 30 */ 1215, 1215, 1528, 1528, 1215, 1215, 1215, 1215, 1215, 1215,
157378 /* 40 */ 1215, 1215, 1215, 1363, 1215, 1370, 1215, 1215, 1215, 1215,
157379 /* 50 */ 1215, 1446, 1447, 1215, 1215, 1215, 1497, 1499, 1462, 1377,
157380 /* 60 */ 1376, 1375, 1374, 1480, 1341, 1368, 1361, 1365, 1440, 1441,
157381 /* 70 */ 1439, 1443, 1447, 1446, 1215, 1364, 1411, 1425, 1410, 1215,
157382 /* 80 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157383 /* 90 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157384 /* 100 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157385 /* 110 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157386 /* 120 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1419, 1424,
157387 /* 130 */ 1430, 1423, 1420, 1413, 1412, 1414, 1415, 1215, 1236, 1288,
157388 /* 140 */ 1215, 1215, 1215, 1215, 1516, 1515, 1215, 1215, 1246, 1405,
157389 /* 150 */ 1404, 1416, 1417, 1427, 1426, 1505, 1563, 1562, 1463, 1215,
157390 /* 160 */ 1215, 1215, 1215, 1215, 1215, 1215, 1528, 1215, 1215, 1215,
157391 /* 170 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157392 /* 180 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157393 /* 190 */ 1215, 1528, 1528, 1215, 1246, 1528, 1528, 1242, 1242, 1348,
157394 /* 200 */ 1215, 1511, 1315, 1315, 1315, 1315, 1324, 1315, 1215, 1215,
157395 /* 210 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157396 /* 220 */ 1215, 1215, 1502, 1500, 1215, 1215, 1215, 1215, 1215, 1215,
157397 /* 230 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157398 /* 240 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157399 /* 250 */ 1215, 1215, 1320, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157400 /* 260 */ 1215, 1215, 1215, 1215, 1557, 1215, 1475, 1302, 1320, 1320,
157401 /* 270 */ 1320, 1320, 1322, 1303, 1301, 1314, 1247, 1222, 1602, 1380,
157402 /* 280 */ 1369, 1321, 1343, 1369, 1343, 1599, 1367, 1380, 1380, 1367,
157403 /* 290 */ 1380, 1321, 1599, 1263, 1579, 1258, 1354, 1354, 1354, 1343,
157404 /* 300 */ 1348, 1348, 1442, 1321, 1314, 1215, 1602, 1329, 1329, 1601,
157405 /* 310 */ 1601, 1329, 1463, 1586, 1389, 1291, 1297, 1297, 1297, 1297,
157406 /* 320 */ 1329, 1233, 1367, 1586, 1586, 1367, 1389, 1291, 1367, 1291,
157407 /* 330 */ 1367, 1329, 1233, 1479, 1596, 1329, 1233, 1453, 1329, 1233,
157408 /* 340 */ 1329, 1233, 1453, 1289, 1289, 1289, 1278, 1215, 1215, 1453,
157409 /* 350 */ 1289, 1263, 1289, 1278, 1289, 1289, 1546, 1453, 1457, 1457,
157410 /* 360 */ 1453, 1347, 1342, 1347, 1342, 1347, 1342, 1347, 1342, 1329,
157411 /* 370 */ 1538, 1538, 1357, 1357, 1362, 1348, 1448, 1329, 1215, 1362,
157412 /* 380 */ 1360, 1358, 1367, 1239, 1281, 1560, 1560, 1556, 1556, 1556,
157413 /* 390 */ 1607, 1607, 1511, 1572, 1246, 1246, 1246, 1246, 1572, 1265,
157414 /* 400 */ 1265, 1247, 1247, 1246, 1572, 1215, 1215, 1215, 1215, 1215,
157415 /* 410 */ 1215, 1567, 1215, 1464, 1333, 1215, 1215, 1215, 1215, 1215,
157416 /* 420 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157417 /* 430 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1394,
157418 /* 440 */ 1215, 1218, 1508, 1215, 1215, 1506, 1215, 1215, 1215, 1215,
157419 /* 450 */ 1215, 1215, 1371, 1372, 1334, 1215, 1215, 1215, 1215, 1215,
157420 /* 460 */ 1215, 1215, 1386, 1215, 1215, 1215, 1381, 1215, 1215, 1215,
157421 /* 470 */ 1215, 1215, 1215, 1215, 1215, 1598, 1215, 1215, 1215, 1215,
157422 /* 480 */ 1215, 1215, 1478, 1477, 1215, 1215, 1331, 1215, 1215, 1215,
157423 /* 490 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157424 /* 500 */ 1261, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157425 /* 510 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157426 /* 520 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1359, 1215, 1215,
157427 /* 530 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157428 /* 540 */ 1215, 1215, 1543, 1349, 1215, 1215, 1589, 1215, 1215, 1215,
157429 /* 550 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
157430 /* 560 */ 1215, 1583, 1305, 1396, 1215, 1395, 1399, 1215, 1227, 1215,
157431 /* 570 */ 1215,
157432 };
157433 /********** End of lemon-generated parsing tables *****************************/
157434
157435 /* The next table maps tokens (terminal symbols) into fallback tokens.
157436 ** If a construct like the following:
@@ -158324,115 +158598,116 @@
158324 /* 283 */ "cmd ::= REINDEX nm dbnm",
158325 /* 284 */ "cmd ::= ANALYZE",
158326 /* 285 */ "cmd ::= ANALYZE nm dbnm",
158327 /* 286 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
158328 /* 287 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
158329 /* 288 */ "add_column_fullname ::= fullname",
158330 /* 289 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
158331 /* 290 */ "cmd ::= create_vtab",
158332 /* 291 */ "cmd ::= create_vtab LP vtabarglist RP",
158333 /* 292 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
158334 /* 293 */ "vtabarg ::=",
158335 /* 294 */ "vtabargtoken ::= ANY",
158336 /* 295 */ "vtabargtoken ::= lp anylist RP",
158337 /* 296 */ "lp ::= LP",
158338 /* 297 */ "with ::= WITH wqlist",
158339 /* 298 */ "with ::= WITH RECURSIVE wqlist",
158340 /* 299 */ "wqlist ::= nm eidlist_opt AS LP select RP",
158341 /* 300 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP",
158342 /* 301 */ "windowdefn_list ::= windowdefn",
158343 /* 302 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
158344 /* 303 */ "windowdefn ::= nm AS LP window RP",
158345 /* 304 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
158346 /* 305 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
158347 /* 306 */ "window ::= ORDER BY sortlist frame_opt",
158348 /* 307 */ "window ::= nm ORDER BY sortlist frame_opt",
158349 /* 308 */ "window ::= frame_opt",
158350 /* 309 */ "window ::= nm frame_opt",
158351 /* 310 */ "frame_opt ::=",
158352 /* 311 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
158353 /* 312 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
158354 /* 313 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
158355 /* 314 */ "frame_bound_s ::= frame_bound",
158356 /* 315 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
158357 /* 316 */ "frame_bound_e ::= frame_bound",
158358 /* 317 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
158359 /* 318 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
158360 /* 319 */ "frame_bound ::= CURRENT ROW",
158361 /* 320 */ "frame_exclude_opt ::=",
158362 /* 321 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
158363 /* 322 */ "frame_exclude ::= NO OTHERS",
158364 /* 323 */ "frame_exclude ::= CURRENT ROW",
158365 /* 324 */ "frame_exclude ::= GROUP|TIES",
158366 /* 325 */ "window_clause ::= WINDOW windowdefn_list",
158367 /* 326 */ "filter_over ::= filter_clause over_clause",
158368 /* 327 */ "filter_over ::= over_clause",
158369 /* 328 */ "filter_over ::= filter_clause",
158370 /* 329 */ "over_clause ::= OVER LP window RP",
158371 /* 330 */ "over_clause ::= OVER nm",
158372 /* 331 */ "filter_clause ::= FILTER LP WHERE expr RP",
158373 /* 332 */ "input ::= cmdlist",
158374 /* 333 */ "cmdlist ::= cmdlist ecmd",
158375 /* 334 */ "cmdlist ::= ecmd",
158376 /* 335 */ "ecmd ::= SEMI",
158377 /* 336 */ "ecmd ::= cmdx SEMI",
158378 /* 337 */ "ecmd ::= explain cmdx SEMI",
158379 /* 338 */ "trans_opt ::=",
158380 /* 339 */ "trans_opt ::= TRANSACTION",
158381 /* 340 */ "trans_opt ::= TRANSACTION nm",
158382 /* 341 */ "savepoint_opt ::= SAVEPOINT",
158383 /* 342 */ "savepoint_opt ::=",
158384 /* 343 */ "cmd ::= create_table create_table_args",
158385 /* 344 */ "columnlist ::= columnlist COMMA columnname carglist",
158386 /* 345 */ "columnlist ::= columnname carglist",
158387 /* 346 */ "nm ::= ID|INDEXED",
158388 /* 347 */ "nm ::= STRING",
158389 /* 348 */ "nm ::= JOIN_KW",
158390 /* 349 */ "typetoken ::= typename",
158391 /* 350 */ "typename ::= ID|STRING",
158392 /* 351 */ "signed ::= plus_num",
158393 /* 352 */ "signed ::= minus_num",
158394 /* 353 */ "carglist ::= carglist ccons",
158395 /* 354 */ "carglist ::=",
158396 /* 355 */ "ccons ::= NULL onconf",
158397 /* 356 */ "ccons ::= GENERATED ALWAYS AS generated",
158398 /* 357 */ "ccons ::= AS generated",
158399 /* 358 */ "conslist_opt ::= COMMA conslist",
158400 /* 359 */ "conslist ::= conslist tconscomma tcons",
158401 /* 360 */ "conslist ::= tcons",
158402 /* 361 */ "tconscomma ::=",
158403 /* 362 */ "defer_subclause_opt ::= defer_subclause",
158404 /* 363 */ "resolvetype ::= raisetype",
158405 /* 364 */ "selectnowith ::= oneselect",
158406 /* 365 */ "oneselect ::= values",
158407 /* 366 */ "sclp ::= selcollist COMMA",
158408 /* 367 */ "as ::= ID|STRING",
158409 /* 368 */ "returning ::=",
158410 /* 369 */ "expr ::= term",
158411 /* 370 */ "likeop ::= LIKE_KW|MATCH",
158412 /* 371 */ "exprlist ::= nexprlist",
158413 /* 372 */ "nmnum ::= plus_num",
158414 /* 373 */ "nmnum ::= nm",
158415 /* 374 */ "nmnum ::= ON",
158416 /* 375 */ "nmnum ::= DELETE",
158417 /* 376 */ "nmnum ::= DEFAULT",
158418 /* 377 */ "plus_num ::= INTEGER|FLOAT",
158419 /* 378 */ "foreach_clause ::=",
158420 /* 379 */ "foreach_clause ::= FOR EACH ROW",
158421 /* 380 */ "trnm ::= nm",
158422 /* 381 */ "tridxby ::=",
158423 /* 382 */ "database_kw_opt ::= DATABASE",
158424 /* 383 */ "database_kw_opt ::=",
158425 /* 384 */ "kwcolumn_opt ::=",
158426 /* 385 */ "kwcolumn_opt ::= COLUMNKW",
158427 /* 386 */ "vtabarglist ::= vtabarg",
158428 /* 387 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
158429 /* 388 */ "vtabarg ::= vtabarg vtabargtoken",
158430 /* 389 */ "anylist ::=",
158431 /* 390 */ "anylist ::= anylist LP anylist RP",
158432 /* 391 */ "anylist ::= anylist ANY",
158433 /* 392 */ "with ::=",
 
158434 };
158435 #endif /* NDEBUG */
158436
158437
158438 #if YYSTACKDEPTH<=0
@@ -159225,115 +159500,116 @@
159225 187, /* (283) cmd ::= REINDEX nm dbnm */
159226 187, /* (284) cmd ::= ANALYZE */
159227 187, /* (285) cmd ::= ANALYZE nm dbnm */
159228 187, /* (286) cmd ::= ALTER TABLE fullname RENAME TO nm */
159229 187, /* (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
159230 292, /* (288) add_column_fullname ::= fullname */
159231 187, /* (289) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
159232 187, /* (290) cmd ::= create_vtab */
159233 187, /* (291) cmd ::= create_vtab LP vtabarglist RP */
159234 294, /* (292) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
159235 296, /* (293) vtabarg ::= */
159236 297, /* (294) vtabargtoken ::= ANY */
159237 297, /* (295) vtabargtoken ::= lp anylist RP */
159238 298, /* (296) lp ::= LP */
159239 262, /* (297) with ::= WITH wqlist */
159240 262, /* (298) with ::= WITH RECURSIVE wqlist */
159241 237, /* (299) wqlist ::= nm eidlist_opt AS LP select RP */
159242 237, /* (300) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
159243 300, /* (301) windowdefn_list ::= windowdefn */
159244 300, /* (302) windowdefn_list ::= windowdefn_list COMMA windowdefn */
159245 301, /* (303) windowdefn ::= nm AS LP window RP */
159246 302, /* (304) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
159247 302, /* (305) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
159248 302, /* (306) window ::= ORDER BY sortlist frame_opt */
159249 302, /* (307) window ::= nm ORDER BY sortlist frame_opt */
159250 302, /* (308) window ::= frame_opt */
159251 302, /* (309) window ::= nm frame_opt */
159252 303, /* (310) frame_opt ::= */
159253 303, /* (311) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
159254 303, /* (312) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
159255 307, /* (313) range_or_rows ::= RANGE|ROWS|GROUPS */
159256 309, /* (314) frame_bound_s ::= frame_bound */
159257 309, /* (315) frame_bound_s ::= UNBOUNDED PRECEDING */
159258 310, /* (316) frame_bound_e ::= frame_bound */
159259 310, /* (317) frame_bound_e ::= UNBOUNDED FOLLOWING */
159260 308, /* (318) frame_bound ::= expr PRECEDING|FOLLOWING */
159261 308, /* (319) frame_bound ::= CURRENT ROW */
159262 311, /* (320) frame_exclude_opt ::= */
159263 311, /* (321) frame_exclude_opt ::= EXCLUDE frame_exclude */
159264 312, /* (322) frame_exclude ::= NO OTHERS */
159265 312, /* (323) frame_exclude ::= CURRENT ROW */
159266 312, /* (324) frame_exclude ::= GROUP|TIES */
159267 247, /* (325) window_clause ::= WINDOW windowdefn_list */
159268 269, /* (326) filter_over ::= filter_clause over_clause */
159269 269, /* (327) filter_over ::= over_clause */
159270 269, /* (328) filter_over ::= filter_clause */
159271 306, /* (329) over_clause ::= OVER LP window RP */
159272 306, /* (330) over_clause ::= OVER nm */
159273 305, /* (331) filter_clause ::= FILTER LP WHERE expr RP */
159274 182, /* (332) input ::= cmdlist */
159275 183, /* (333) cmdlist ::= cmdlist ecmd */
159276 183, /* (334) cmdlist ::= ecmd */
159277 184, /* (335) ecmd ::= SEMI */
159278 184, /* (336) ecmd ::= cmdx SEMI */
159279 184, /* (337) ecmd ::= explain cmdx SEMI */
159280 189, /* (338) trans_opt ::= */
159281 189, /* (339) trans_opt ::= TRANSACTION */
159282 189, /* (340) trans_opt ::= TRANSACTION nm */
159283 191, /* (341) savepoint_opt ::= SAVEPOINT */
159284 191, /* (342) savepoint_opt ::= */
159285 187, /* (343) cmd ::= create_table create_table_args */
159286 198, /* (344) columnlist ::= columnlist COMMA columnname carglist */
159287 198, /* (345) columnlist ::= columnname carglist */
159288 190, /* (346) nm ::= ID|INDEXED */
159289 190, /* (347) nm ::= STRING */
159290 190, /* (348) nm ::= JOIN_KW */
159291 204, /* (349) typetoken ::= typename */
159292 205, /* (350) typename ::= ID|STRING */
159293 206, /* (351) signed ::= plus_num */
159294 206, /* (352) signed ::= minus_num */
159295 203, /* (353) carglist ::= carglist ccons */
159296 203, /* (354) carglist ::= */
159297 211, /* (355) ccons ::= NULL onconf */
159298 211, /* (356) ccons ::= GENERATED ALWAYS AS generated */
159299 211, /* (357) ccons ::= AS generated */
159300 199, /* (358) conslist_opt ::= COMMA conslist */
159301 224, /* (359) conslist ::= conslist tconscomma tcons */
159302 224, /* (360) conslist ::= tcons */
159303 225, /* (361) tconscomma ::= */
159304 229, /* (362) defer_subclause_opt ::= defer_subclause */
159305 231, /* (363) resolvetype ::= raisetype */
159306 235, /* (364) selectnowith ::= oneselect */
159307 236, /* (365) oneselect ::= values */
159308 250, /* (366) sclp ::= selcollist COMMA */
159309 251, /* (367) as ::= ID|STRING */
159310 268, /* (368) returning ::= */
159311 213, /* (369) expr ::= term */
159312 270, /* (370) likeop ::= LIKE_KW|MATCH */
159313 258, /* (371) exprlist ::= nexprlist */
159314 280, /* (372) nmnum ::= plus_num */
159315 280, /* (373) nmnum ::= nm */
159316 280, /* (374) nmnum ::= ON */
159317 280, /* (375) nmnum ::= DELETE */
159318 280, /* (376) nmnum ::= DEFAULT */
159319 207, /* (377) plus_num ::= INTEGER|FLOAT */
159320 285, /* (378) foreach_clause ::= */
159321 285, /* (379) foreach_clause ::= FOR EACH ROW */
159322 288, /* (380) trnm ::= nm */
159323 289, /* (381) tridxby ::= */
159324 290, /* (382) database_kw_opt ::= DATABASE */
159325 290, /* (383) database_kw_opt ::= */
159326 293, /* (384) kwcolumn_opt ::= */
159327 293, /* (385) kwcolumn_opt ::= COLUMNKW */
159328 295, /* (386) vtabarglist ::= vtabarg */
159329 295, /* (387) vtabarglist ::= vtabarglist COMMA vtabarg */
159330 296, /* (388) vtabarg ::= vtabarg vtabargtoken */
159331 299, /* (389) anylist ::= */
159332 299, /* (390) anylist ::= anylist LP anylist RP */
159333 299, /* (391) anylist ::= anylist ANY */
159334 262, /* (392) with ::= */
 
159335 };
159336
159337 /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
159338 ** of symbols on the right-hand side of that rule. */
159339 static const signed char yyRuleInfoNRhs[] = {
@@ -159623,115 +159899,116 @@
159623 -3, /* (283) cmd ::= REINDEX nm dbnm */
159624 -1, /* (284) cmd ::= ANALYZE */
159625 -3, /* (285) cmd ::= ANALYZE nm dbnm */
159626 -6, /* (286) cmd ::= ALTER TABLE fullname RENAME TO nm */
159627 -7, /* (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
159628 -1, /* (288) add_column_fullname ::= fullname */
159629 -8, /* (289) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
159630 -1, /* (290) cmd ::= create_vtab */
159631 -4, /* (291) cmd ::= create_vtab LP vtabarglist RP */
159632 -8, /* (292) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
159633 0, /* (293) vtabarg ::= */
159634 -1, /* (294) vtabargtoken ::= ANY */
159635 -3, /* (295) vtabargtoken ::= lp anylist RP */
159636 -1, /* (296) lp ::= LP */
159637 -2, /* (297) with ::= WITH wqlist */
159638 -3, /* (298) with ::= WITH RECURSIVE wqlist */
159639 -6, /* (299) wqlist ::= nm eidlist_opt AS LP select RP */
159640 -8, /* (300) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
159641 -1, /* (301) windowdefn_list ::= windowdefn */
159642 -3, /* (302) windowdefn_list ::= windowdefn_list COMMA windowdefn */
159643 -5, /* (303) windowdefn ::= nm AS LP window RP */
159644 -5, /* (304) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
159645 -6, /* (305) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
159646 -4, /* (306) window ::= ORDER BY sortlist frame_opt */
159647 -5, /* (307) window ::= nm ORDER BY sortlist frame_opt */
159648 -1, /* (308) window ::= frame_opt */
159649 -2, /* (309) window ::= nm frame_opt */
159650 0, /* (310) frame_opt ::= */
159651 -3, /* (311) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
159652 -6, /* (312) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
159653 -1, /* (313) range_or_rows ::= RANGE|ROWS|GROUPS */
159654 -1, /* (314) frame_bound_s ::= frame_bound */
159655 -2, /* (315) frame_bound_s ::= UNBOUNDED PRECEDING */
159656 -1, /* (316) frame_bound_e ::= frame_bound */
159657 -2, /* (317) frame_bound_e ::= UNBOUNDED FOLLOWING */
159658 -2, /* (318) frame_bound ::= expr PRECEDING|FOLLOWING */
159659 -2, /* (319) frame_bound ::= CURRENT ROW */
159660 0, /* (320) frame_exclude_opt ::= */
159661 -2, /* (321) frame_exclude_opt ::= EXCLUDE frame_exclude */
159662 -2, /* (322) frame_exclude ::= NO OTHERS */
159663 -2, /* (323) frame_exclude ::= CURRENT ROW */
159664 -1, /* (324) frame_exclude ::= GROUP|TIES */
159665 -2, /* (325) window_clause ::= WINDOW windowdefn_list */
159666 -2, /* (326) filter_over ::= filter_clause over_clause */
159667 -1, /* (327) filter_over ::= over_clause */
159668 -1, /* (328) filter_over ::= filter_clause */
159669 -4, /* (329) over_clause ::= OVER LP window RP */
159670 -2, /* (330) over_clause ::= OVER nm */
159671 -5, /* (331) filter_clause ::= FILTER LP WHERE expr RP */
159672 -1, /* (332) input ::= cmdlist */
159673 -2, /* (333) cmdlist ::= cmdlist ecmd */
159674 -1, /* (334) cmdlist ::= ecmd */
159675 -1, /* (335) ecmd ::= SEMI */
159676 -2, /* (336) ecmd ::= cmdx SEMI */
159677 -3, /* (337) ecmd ::= explain cmdx SEMI */
159678 0, /* (338) trans_opt ::= */
159679 -1, /* (339) trans_opt ::= TRANSACTION */
159680 -2, /* (340) trans_opt ::= TRANSACTION nm */
159681 -1, /* (341) savepoint_opt ::= SAVEPOINT */
159682 0, /* (342) savepoint_opt ::= */
159683 -2, /* (343) cmd ::= create_table create_table_args */
159684 -4, /* (344) columnlist ::= columnlist COMMA columnname carglist */
159685 -2, /* (345) columnlist ::= columnname carglist */
159686 -1, /* (346) nm ::= ID|INDEXED */
159687 -1, /* (347) nm ::= STRING */
159688 -1, /* (348) nm ::= JOIN_KW */
159689 -1, /* (349) typetoken ::= typename */
159690 -1, /* (350) typename ::= ID|STRING */
159691 -1, /* (351) signed ::= plus_num */
159692 -1, /* (352) signed ::= minus_num */
159693 -2, /* (353) carglist ::= carglist ccons */
159694 0, /* (354) carglist ::= */
159695 -2, /* (355) ccons ::= NULL onconf */
159696 -4, /* (356) ccons ::= GENERATED ALWAYS AS generated */
159697 -2, /* (357) ccons ::= AS generated */
159698 -2, /* (358) conslist_opt ::= COMMA conslist */
159699 -3, /* (359) conslist ::= conslist tconscomma tcons */
159700 -1, /* (360) conslist ::= tcons */
159701 0, /* (361) tconscomma ::= */
159702 -1, /* (362) defer_subclause_opt ::= defer_subclause */
159703 -1, /* (363) resolvetype ::= raisetype */
159704 -1, /* (364) selectnowith ::= oneselect */
159705 -1, /* (365) oneselect ::= values */
159706 -2, /* (366) sclp ::= selcollist COMMA */
159707 -1, /* (367) as ::= ID|STRING */
159708 0, /* (368) returning ::= */
159709 -1, /* (369) expr ::= term */
159710 -1, /* (370) likeop ::= LIKE_KW|MATCH */
159711 -1, /* (371) exprlist ::= nexprlist */
159712 -1, /* (372) nmnum ::= plus_num */
159713 -1, /* (373) nmnum ::= nm */
159714 -1, /* (374) nmnum ::= ON */
159715 -1, /* (375) nmnum ::= DELETE */
159716 -1, /* (376) nmnum ::= DEFAULT */
159717 -1, /* (377) plus_num ::= INTEGER|FLOAT */
159718 0, /* (378) foreach_clause ::= */
159719 -3, /* (379) foreach_clause ::= FOR EACH ROW */
159720 -1, /* (380) trnm ::= nm */
159721 0, /* (381) tridxby ::= */
159722 -1, /* (382) database_kw_opt ::= DATABASE */
159723 0, /* (383) database_kw_opt ::= */
159724 0, /* (384) kwcolumn_opt ::= */
159725 -1, /* (385) kwcolumn_opt ::= COLUMNKW */
159726 -1, /* (386) vtabarglist ::= vtabarg */
159727 -3, /* (387) vtabarglist ::= vtabarglist COMMA vtabarg */
159728 -2, /* (388) vtabarg ::= vtabarg vtabargtoken */
159729 0, /* (389) anylist ::= */
159730 -4, /* (390) anylist ::= anylist LP anylist RP */
159731 -2, /* (391) anylist ::= anylist ANY */
159732 0, /* (392) with ::= */
 
159733 };
159734
159735 static void yy_accept(yyParser*); /* Forward Declaration */
159736
159737 /*
@@ -159787,11 +160064,11 @@
159787 {yymsp[1].minor.yy412 = TK_DEFERRED;}
159788 break;
159789 case 5: /* transtype ::= DEFERRED */
159790 case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
159791 case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
159792 case 313: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==313);
159793 {yymsp[0].minor.yy412 = yymsp[0].major; /*A-overwrites-X*/}
159794 break;
159795 case 8: /* cmd ::= COMMIT|END trans_opt */
159796 case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
159797 {sqlite3EndTransaction(pParse,yymsp[-1].major);}
@@ -160964,167 +161241,172 @@
160964 {
160965 yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
160966 sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
160967 }
160968 break;
160969 case 288: /* add_column_fullname ::= fullname */
 
 
 
 
 
160970 {
160971 disableLookaside(pParse);
160972 sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy457);
160973 }
160974 break;
160975 case 289: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
160976 {
160977 sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy457, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
160978 }
160979 break;
160980 case 290: /* cmd ::= create_vtab */
160981 {sqlite3VtabFinishParse(pParse,0);}
160982 break;
160983 case 291: /* cmd ::= create_vtab LP vtabarglist RP */
160984 {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
160985 break;
160986 case 292: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
160987 {
160988 sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy412);
160989 }
160990 break;
160991 case 293: /* vtabarg ::= */
160992 {sqlite3VtabArgInit(pParse);}
160993 break;
160994 case 294: /* vtabargtoken ::= ANY */
160995 case 295: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==295);
160996 case 296: /* lp ::= LP */ yytestcase(yyruleno==296);
160997 {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
160998 break;
160999 case 297: /* with ::= WITH wqlist */
161000 case 298: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==298);
161001 { sqlite3WithPush(pParse, yymsp[0].minor.yy105, 1); }
161002 break;
161003 case 299: /* wqlist ::= nm eidlist_opt AS LP select RP */
161004 {
161005 yymsp[-5].minor.yy105 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy350, yymsp[-1].minor.yy293); /*A-overwrites-X*/
161006 }
161007 break;
161008 case 300: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
161009 {
161010 yymsp[-7].minor.yy105 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy105, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy350, yymsp[-1].minor.yy293);
161011 }
161012 break;
161013 case 301: /* windowdefn_list ::= windowdefn */
161014 { yylhsminor.yy503 = yymsp[0].minor.yy503; }
161015 yymsp[0].minor.yy503 = yylhsminor.yy503;
161016 break;
161017 case 302: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
161018 {
161019 assert( yymsp[0].minor.yy503!=0 );
161020 sqlite3WindowChain(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy503);
161021 yymsp[0].minor.yy503->pNextWin = yymsp[-2].minor.yy503;
161022 yylhsminor.yy503 = yymsp[0].minor.yy503;
161023 }
161024 yymsp[-2].minor.yy503 = yylhsminor.yy503;
161025 break;
161026 case 303: /* windowdefn ::= nm AS LP window RP */
161027 {
161028 if( ALWAYS(yymsp[-1].minor.yy503) ){
161029 yymsp[-1].minor.yy503->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
161030 }
161031 yylhsminor.yy503 = yymsp[-1].minor.yy503;
161032 }
161033 yymsp[-4].minor.yy503 = yylhsminor.yy503;
161034 break;
161035 case 304: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
161036 {
161037 yymsp[-4].minor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy350, yymsp[-1].minor.yy350, 0);
161038 }
161039 break;
161040 case 305: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
161041 {
161042 yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy350, yymsp[-1].minor.yy350, &yymsp[-5].minor.yy0);
161043 }
161044 yymsp[-5].minor.yy503 = yylhsminor.yy503;
161045 break;
161046 case 306: /* window ::= ORDER BY sortlist frame_opt */
161047 {
161048 yymsp[-3].minor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, yymsp[-1].minor.yy350, 0);
161049 }
161050 break;
161051 case 307: /* window ::= nm ORDER BY sortlist frame_opt */
161052 {
161053 yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, yymsp[-1].minor.yy350, &yymsp[-4].minor.yy0);
161054 }
161055 yymsp[-4].minor.yy503 = yylhsminor.yy503;
161056 break;
161057 case 308: /* window ::= frame_opt */
161058 case 327: /* filter_over ::= over_clause */ yytestcase(yyruleno==327);
161059 {
161060 yylhsminor.yy503 = yymsp[0].minor.yy503;
161061 }
161062 yymsp[0].minor.yy503 = yylhsminor.yy503;
161063 break;
161064 case 309: /* window ::= nm frame_opt */
161065 {
161066 yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, 0, &yymsp[-1].minor.yy0);
161067 }
161068 yymsp[-1].minor.yy503 = yylhsminor.yy503;
161069 break;
161070 case 310: /* frame_opt ::= */
161071 {
161072 yymsp[1].minor.yy503 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
161073 }
161074 break;
161075 case 311: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
161076 {
161077 yylhsminor.yy503 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy412, yymsp[-1].minor.yy341.eType, yymsp[-1].minor.yy341.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy624);
161078 }
161079 yymsp[-2].minor.yy503 = yylhsminor.yy503;
161080 break;
161081 case 312: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
161082 {
161083 yylhsminor.yy503 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy412, yymsp[-3].minor.yy341.eType, yymsp[-3].minor.yy341.pExpr, yymsp[-1].minor.yy341.eType, yymsp[-1].minor.yy341.pExpr, yymsp[0].minor.yy624);
161084 }
161085 yymsp[-5].minor.yy503 = yylhsminor.yy503;
161086 break;
161087 case 314: /* frame_bound_s ::= frame_bound */
161088 case 316: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==316);
161089 {yylhsminor.yy341 = yymsp[0].minor.yy341;}
161090 yymsp[0].minor.yy341 = yylhsminor.yy341;
161091 break;
161092 case 315: /* frame_bound_s ::= UNBOUNDED PRECEDING */
161093 case 317: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==317);
161094 case 319: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==319);
161095 {yylhsminor.yy341.eType = yymsp[-1].major; yylhsminor.yy341.pExpr = 0;}
161096 yymsp[-1].minor.yy341 = yylhsminor.yy341;
161097 break;
161098 case 318: /* frame_bound ::= expr PRECEDING|FOLLOWING */
161099 {yylhsminor.yy341.eType = yymsp[0].major; yylhsminor.yy341.pExpr = yymsp[-1].minor.yy354;}
161100 yymsp[-1].minor.yy341 = yylhsminor.yy341;
161101 break;
161102 case 320: /* frame_exclude_opt ::= */
161103 {yymsp[1].minor.yy624 = 0;}
161104 break;
161105 case 321: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
161106 {yymsp[-1].minor.yy624 = yymsp[0].minor.yy624;}
161107 break;
161108 case 322: /* frame_exclude ::= NO OTHERS */
161109 case 323: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==323);
161110 {yymsp[-1].minor.yy624 = yymsp[-1].major; /*A-overwrites-X*/}
161111 break;
161112 case 324: /* frame_exclude ::= GROUP|TIES */
161113 {yymsp[0].minor.yy624 = yymsp[0].major; /*A-overwrites-X*/}
161114 break;
161115 case 325: /* window_clause ::= WINDOW windowdefn_list */
161116 { yymsp[-1].minor.yy503 = yymsp[0].minor.yy503; }
161117 break;
161118 case 326: /* filter_over ::= filter_clause over_clause */
161119 {
161120 yymsp[0].minor.yy503->pFilter = yymsp[-1].minor.yy354;
161121 yylhsminor.yy503 = yymsp[0].minor.yy503;
161122 }
161123 yymsp[-1].minor.yy503 = yylhsminor.yy503;
161124 break;
161125 case 328: /* filter_over ::= filter_clause */
161126 {
161127 yylhsminor.yy503 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
161128 if( yylhsminor.yy503 ){
161129 yylhsminor.yy503->eFrmType = TK_FILTER;
161130 yylhsminor.yy503->pFilter = yymsp[0].minor.yy354;
@@ -161132,89 +161414,89 @@
161132 sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy354);
161133 }
161134 }
161135 yymsp[0].minor.yy503 = yylhsminor.yy503;
161136 break;
161137 case 329: /* over_clause ::= OVER LP window RP */
161138 {
161139 yymsp[-3].minor.yy503 = yymsp[-1].minor.yy503;
161140 assert( yymsp[-3].minor.yy503!=0 );
161141 }
161142 break;
161143 case 330: /* over_clause ::= OVER nm */
161144 {
161145 yymsp[-1].minor.yy503 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
161146 if( yymsp[-1].minor.yy503 ){
161147 yymsp[-1].minor.yy503->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
161148 }
161149 }
161150 break;
161151 case 331: /* filter_clause ::= FILTER LP WHERE expr RP */
161152 { yymsp[-4].minor.yy354 = yymsp[-1].minor.yy354; }
161153 break;
161154 default:
161155 /* (332) input ::= cmdlist */ yytestcase(yyruleno==332);
161156 /* (333) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==333);
161157 /* (334) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=334);
161158 /* (335) ecmd ::= SEMI */ yytestcase(yyruleno==335);
161159 /* (336) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==336);
161160 /* (337) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=337);
161161 /* (338) trans_opt ::= */ yytestcase(yyruleno==338);
161162 /* (339) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==339);
161163 /* (340) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==340);
161164 /* (341) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==341);
161165 /* (342) savepoint_opt ::= */ yytestcase(yyruleno==342);
161166 /* (343) cmd ::= create_table create_table_args */ yytestcase(yyruleno==343);
161167 /* (344) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==344);
161168 /* (345) columnlist ::= columnname carglist */ yytestcase(yyruleno==345);
161169 /* (346) nm ::= ID|INDEXED */ yytestcase(yyruleno==346);
161170 /* (347) nm ::= STRING */ yytestcase(yyruleno==347);
161171 /* (348) nm ::= JOIN_KW */ yytestcase(yyruleno==348);
161172 /* (349) typetoken ::= typename */ yytestcase(yyruleno==349);
161173 /* (350) typename ::= ID|STRING */ yytestcase(yyruleno==350);
161174 /* (351) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=351);
161175 /* (352) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=352);
161176 /* (353) carglist ::= carglist ccons */ yytestcase(yyruleno==353);
161177 /* (354) carglist ::= */ yytestcase(yyruleno==354);
161178 /* (355) ccons ::= NULL onconf */ yytestcase(yyruleno==355);
161179 /* (356) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==356);
161180 /* (357) ccons ::= AS generated */ yytestcase(yyruleno==357);
161181 /* (358) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==358);
161182 /* (359) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==359);
161183 /* (360) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=360);
161184 /* (361) tconscomma ::= */ yytestcase(yyruleno==361);
161185 /* (362) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=362);
161186 /* (363) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=363);
161187 /* (364) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=364);
161188 /* (365) oneselect ::= values */ yytestcase(yyruleno==365);
161189 /* (366) sclp ::= selcollist COMMA */ yytestcase(yyruleno==366);
161190 /* (367) as ::= ID|STRING */ yytestcase(yyruleno==367);
161191 /* (368) returning ::= */ yytestcase(yyruleno==368);
161192 /* (369) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=369);
161193 /* (370) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==370);
161194 /* (371) exprlist ::= nexprlist */ yytestcase(yyruleno==371);
161195 /* (372) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=372);
161196 /* (373) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=373);
161197 /* (374) nmnum ::= ON */ yytestcase(yyruleno==374);
161198 /* (375) nmnum ::= DELETE */ yytestcase(yyruleno==375);
161199 /* (376) nmnum ::= DEFAULT */ yytestcase(yyruleno==376);
161200 /* (377) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==377);
161201 /* (378) foreach_clause ::= */ yytestcase(yyruleno==378);
161202 /* (379) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==379);
161203 /* (380) trnm ::= nm */ yytestcase(yyruleno==380);
161204 /* (381) tridxby ::= */ yytestcase(yyruleno==381);
161205 /* (382) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==382);
161206 /* (383) database_kw_opt ::= */ yytestcase(yyruleno==383);
161207 /* (384) kwcolumn_opt ::= */ yytestcase(yyruleno==384);
161208 /* (385) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==385);
161209 /* (386) vtabarglist ::= vtabarg */ yytestcase(yyruleno==386);
161210 /* (387) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==387);
161211 /* (388) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==388);
161212 /* (389) anylist ::= */ yytestcase(yyruleno==389);
161213 /* (390) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==390);
161214 /* (391) anylist ::= anylist ANY */ yytestcase(yyruleno==391);
161215 /* (392) with ::= */ yytestcase(yyruleno==392);
161216 break;
161217 /********** End reduce actions ************************************************/
161218 };
161219 assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
161220 yygoto = yyRuleInfoLhs[yyruleno];
@@ -203040,26 +203322,28 @@
203040 #ifdef SQLITE_AMALGAMATION
203041 assert( WAL_CKPT_LOCK==1 );
203042 #endif
203043
203044 assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );
203045 if( pRbu && (pRbu->eStage==RBU_STAGE_OAL || pRbu->eStage==RBU_STAGE_MOVE) ){
203046 /* Magic number 1 is the WAL_CKPT_LOCK lock. Preventing SQLite from
203047 ** taking this lock also prevents any checkpoints from occurring.
203048 ** todo: really, it's not clear why this might occur, as
203049 ** wal_autocheckpoint ought to be turned off. */
 
 
 
203050 if( ofst==WAL_LOCK_CKPT && n==1 ) rc = SQLITE_BUSY;
203051 }else{
203052 int bCapture = 0;
203053 if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){
203054 bCapture = 1;
203055 }
203056
203057 if( bCapture==0 || 0==(flags & SQLITE_SHM_UNLOCK) ){
203058 rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags);
203059 if( bCapture && rc==SQLITE_OK ){
203060 pRbu->mLock |= (1 << ofst);
203061 }
203062 }
203063 }
203064
203065 return rc;
@@ -228484,11 +228768,11 @@
228484 int nArg, /* Number of args */
228485 sqlite3_value **apUnused /* Function arguments */
228486 ){
228487 assert( nArg==0 );
228488 UNUSED_PARAM2(nArg, apUnused);
228489 sqlite3_result_text(pCtx, "fts5: 2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398f17d", -1, SQLITE_TRANSIENT);
228490 }
228491
228492 /*
228493 ** Return true if zName is the extension on one of the shadow tables used
228494 ** by this module.
@@ -233410,12 +233694,12 @@
233410 }
233411 #endif /* SQLITE_CORE */
233412 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
233413
233414 /************** End of stmt.c ************************************************/
233415 #if __LINE__!=233415
233416 #undef SQLITE_SOURCE_ID
233417 #define SQLITE_SOURCE_ID "2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398alt2"
233418 #endif
233419 /* Return the source-id for this library */
233420 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
233421 /************************** End of sqlite3.c ******************************/
233422
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1171,11 +1171,11 @@
1171 ** be held constant and Z will be incremented or else Y will be incremented
1172 ** and Z will be reset to zero.
1173 **
1174 ** Since [version 3.6.18] ([dateof:3.6.18]),
1175 ** SQLite source code has been stored in the
1176 ** <a href="http://www.fossil-scm.org/">Fossil configuration management
1177 ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
1178 ** a string which identifies a particular check-in of SQLite
1179 ** within its configuration management system. ^The SQLITE_SOURCE_ID
1180 ** string contains the date and time of the check-in (UTC) and a SHA1
1181 ** or SHA3-256 hash of the entire source tree. If the source code has
@@ -1186,11 +1186,11 @@
1186 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1187 ** [sqlite_version()] and [sqlite_source_id()].
1188 */
1189 #define SQLITE_VERSION "3.35.0"
1190 #define SQLITE_VERSION_NUMBER 3035000
1191 #define SQLITE_SOURCE_ID "2021-02-19 14:32:58 c844a331e78949850fde8ed95058cb34f863566944bc9e92e3ae042768f130e1"
1192
1193 /*
1194 ** CAPI3REF: Run-Time Library Version Numbers
1195 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1196 **
@@ -15966,11 +15966,11 @@
15966 #if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN)
15967 SQLITE_PRIVATE void sqlite3ExplainBreakpoint(const char*,const char*);
15968 #else
15969 # define sqlite3ExplainBreakpoint(A,B) /*no-op*/
15970 #endif
15971 SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*, int, char*, u16);
15972 SQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe*, int addr, u8);
15973 SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1);
15974 SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2);
15975 SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, int addr, int P3);
15976 SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u16 P5);
@@ -17475,11 +17475,16 @@
17475 u8 szEst; /* Estimated size of value in this column. sizeof(INT)==1 */
17476 u8 hName; /* Column name hash for faster lookup */
17477 u16 colFlags; /* Boolean properties. See COLFLAG_ defines below */
17478 };
17479
17480 /* Allowed values for Column.colFlags.
17481 **
17482 ** Constraints:
17483 ** TF_HasVirtual == COLFLAG_VIRTUAL
17484 ** TF_HasStored == COLFLAG_STORED
17485 ** TF_HasHidden == COLFLAG_HIDDEN
17486 */
17487 #define COLFLAG_PRIMKEY 0x0001 /* Column is part of the primary key */
17488 #define COLFLAG_HIDDEN 0x0002 /* A hidden column in a virtual table */
17489 #define COLFLAG_HASTYPE 0x0004 /* Type name follows column name */
17490 #define COLFLAG_UNIQUE 0x0008 /* Column def contains "UNIQUE" or "PK" */
@@ -17664,15 +17669,16 @@
17669 ** the TF_OOOHidden attribute would apply in this case. Such tables require
17670 ** special handling during INSERT processing. The "OOO" means "Out Of Order".
17671 **
17672 ** Constraints:
17673 **
17674 ** TF_HasVirtual == COLFLAG_VIRTUAL
17675 ** TF_HasStored == COLFLAG_STORED
17676 ** TF_HasHidden == COLFLAG_HIDDEN
17677 */
17678 #define TF_Readonly 0x0001 /* Read-only system table */
17679 #define TF_HasHidden 0x0002 /* Has one or more hidden columns */
17680 #define TF_HasPrimaryKey 0x0004 /* Table has a primary key */
17681 #define TF_Autoincrement 0x0008 /* Integer primary key is autoincrement */
17682 #define TF_HasStat1 0x0010 /* nRowLogEst set from sqlite_stat1 */
17683 #define TF_HasVirtual 0x0020 /* Has one or more VIRTUAL columns */
17684 #define TF_HasStored 0x0040 /* Has one or more STORED columns */
@@ -17683,10 +17689,11 @@
17689 #define TF_NoVisibleRowid 0x0200 /* No user-visible "rowid" column */
17690 #define TF_OOOHidden 0x0400 /* Out-of-Order hidden columns */
17691 #define TF_HasNotNull 0x0800 /* Contains NOT NULL constraints */
17692 #define TF_Shadow 0x1000 /* True for a shadow table */
17693 #define TF_HasStat4 0x2000 /* STAT4 info available for this table */
17694 #define TF_Ephemeral 0x4000 /* An ephemeral table */
17695
17696 /*
17697 ** Test to see whether or not a table is a virtual table. This is
17698 ** done as a macro so that it will be optimized out when virtual
17699 ** table support is omitted from the build.
@@ -18051,11 +18058,10 @@
18058 int iMem; /* Memory location that acts as accumulator */
18059 int iDistinct; /* Ephemeral table used to enforce DISTINCT */
18060 } *aFunc;
18061 int nFunc; /* Number of entries in aFunc[] */
18062 u32 selId; /* Select to which this AggInfo belongs */
 
18063 };
18064
18065 /*
18066 ** The datatype ynVar is a signed integer, either 16-bit or 32-bit.
18067 ** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater
@@ -18644,10 +18650,11 @@
18650 #define SF_WhereBegin 0x0080000 /* Really a WhereBegin() call. Debug Only */
18651 #define SF_WinRewrite 0x0100000 /* Window function rewrite accomplished */
18652 #define SF_View 0x0200000 /* SELECT statement is a view */
18653 #define SF_NoopOrderBy 0x0400000 /* ORDER BY is ignored for this query */
18654 #define SF_UpdateFrom 0x0800000 /* Statement is an UPDATE...FROM */
18655 #define SF_PushDown 0x1000000 /* SELECT has be modified by push-down opt */
18656
18657 /*
18658 ** The results of a SELECT can be distributed in several ways, as defined
18659 ** by one of the following macros. The "SRT" prefix means "SELECT Result
18660 ** Type".
@@ -18886,11 +18893,10 @@
18893 #endif
18894 AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */
18895 Parse *pToplevel; /* Parse structure for main program (or NULL) */
18896 Table *pTriggerTab; /* Table triggers are being coded for */
18897 Parse *pParentParse; /* Parent parser if this parser is nested */
 
18898 union {
18899 int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */
18900 Returning *pReturning; /* The RETURNING clause */
18901 } u1;
18902 u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */
@@ -19170,11 +19176,12 @@
19176 } InitData;
19177
19178 /*
19179 ** Allowed values for mInitFlags
19180 */
19181 #define INITFLAG_AlterRename 0x0001 /* Reparse after a RENAME */
19182 #define INITFLAG_AlterDrop 0x0002 /* Reparse after a DROP COLUMN */
19183
19184 /*
19185 ** Structure containing global configuration data for the SQLite library.
19186 **
19187 ** This structure also contains some state information.
@@ -19990,10 +19997,11 @@
19997 # define sqlite3TriggerColmask(A,B,C,D,E,F,G) 0
19998 # define sqlite3TriggerStepSrc(A,B) 0
19999 #endif
20000
20001 SQLITE_PRIVATE int sqlite3JoinType(Parse*, Token*, Token*, Token*);
20002 SQLITE_PRIVATE int sqlite3ColumnIndex(Table *pTab, const char *zCol);
20003 SQLITE_PRIVATE void sqlite3SetJoinExpr(Expr*,int);
20004 SQLITE_PRIVATE void sqlite3CreateForeignKey(Parse*, ExprList*, Token*, ExprList*, int);
20005 SQLITE_PRIVATE void sqlite3DeferForeignKey(Parse*, int);
20006 #ifndef SQLITE_OMIT_AUTHORIZATION
20007 SQLITE_PRIVATE void sqlite3AuthRead(Parse*,Expr*,Schema*,SrcList*);
@@ -20174,10 +20182,11 @@
20182 SQLITE_PRIVATE int sqlite3ResolveSelfReference(Parse*,Table*,int,Expr*,ExprList*);
20183 SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
20184 SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int);
20185 SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *);
20186 SQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *, SrcList *);
20187 SQLITE_PRIVATE void sqlite3AlterDropColumn(Parse*, SrcList*, Token*);
20188 SQLITE_PRIVATE void *sqlite3RenameTokenMap(Parse*, void*, Token*);
20189 SQLITE_PRIVATE void sqlite3RenameTokenRemap(Parse*, void *pTo, void *pFrom);
20190 SQLITE_PRIVATE void sqlite3RenameExprUnmap(Parse*, Expr*);
20191 SQLITE_PRIVATE void sqlite3RenameExprlistUnmap(Parse*, ExprList*);
20192 SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(Parse*, u8, CollSeq *, const char*);
@@ -78733,13 +78742,14 @@
78742 ** as having been used.
78743 **
78744 ** The zWhere string must have been obtained from sqlite3_malloc().
78745 ** This routine will take ownership of the allocated memory.
78746 */
78747 SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere, u16 p5){
78748 int j;
78749 sqlite3VdbeAddOp4(p, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC);
78750 sqlite3VdbeChangeP5(p, p5);
78751 for(j=0; j<p->db->nDb; j++) sqlite3VdbeUsesBtree(p, j);
78752 sqlite3MayAbort(p->pParse);
78753 }
78754
78755 /*
@@ -92185,11 +92195,11 @@
92195
92196 #ifndef SQLITE_OMIT_ALTERTABLE
92197 if( pOp->p4.z==0 ){
92198 sqlite3SchemaClear(db->aDb[iDb].pSchema);
92199 db->mDbFlags &= ~DBFLAG_SchemaKnownOk;
92200 rc = sqlite3InitOne(db, iDb, &p->zErrMsg, pOp->p5);
92201 db->mDbFlags |= DBFLAG_SchemaChange;
92202 p->expired = 0;
92203 }else
92204 #endif
92205 {
@@ -98575,11 +98585,10 @@
98585 static void resolveAlias(
98586 Parse *pParse, /* Parsing context */
98587 ExprList *pEList, /* A result set */
98588 int iCol, /* A column in the result set. 0..pEList->nExpr-1 */
98589 Expr *pExpr, /* Transform this into an alias to the result set */
 
98590 int nSubquery /* Number of subqueries that the label is moving */
98591 ){
98592 Expr *pOrig; /* The iCol-th column of the result set */
98593 Expr *pDup; /* Copy of pOrig */
98594 sqlite3 *db; /* The database connection */
@@ -98588,11 +98597,11 @@
98597 pOrig = pEList->a[iCol].pExpr;
98598 assert( pOrig!=0 );
98599 db = pParse->db;
98600 pDup = sqlite3ExprDup(db, pOrig, 0);
98601 if( pDup!=0 ){
98602 incrAggFunctionDepth(pDup, nSubquery);
98603 if( pExpr->op==TK_COLLATE ){
98604 pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);
98605 }
98606
98607 /* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
@@ -98873,13 +98882,14 @@
98882 } /* if( pSrcList ) */
98883
98884 #if !defined(SQLITE_OMIT_TRIGGER) || !defined(SQLITE_OMIT_UPSERT)
98885 /* If we have not already resolved the name, then maybe
98886 ** it is a new.* or old.* trigger argument reference. Or
98887 ** maybe it is an excluded.* from an upsert. Or maybe it is
98888 ** a reference in the RETURNING clause to a table being modified.
98889 */
98890 if( cnt==0 && zDb==0 ){
98891 pTab = 0;
98892 #ifndef SQLITE_OMIT_TRIGGER
98893 if( pParse->pTriggerTab!=0 ){
98894 int op = pParse->eTriggerOp;
98895 assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT );
@@ -98887,18 +98897,18 @@
98897 pExpr->iTable = 1;
98898 pTab = pParse->pTriggerTab;
98899 }else if( op!=TK_INSERT && zTab && sqlite3StrICmp("old",zTab)==0 ){
98900 pExpr->iTable = 0;
98901 pTab = pParse->pTriggerTab;
98902 }else if( pParse->bReturning && (pNC->ncFlags & NC_UBaseReg)!=0 ){
98903 pExpr->iTable = op!=TK_DELETE;
98904 pTab = pParse->pTriggerTab;
98905 }
98906 }
98907 #endif /* SQLITE_OMIT_TRIGGER */
98908 #ifndef SQLITE_OMIT_UPSERT
98909 if( (pNC->ncFlags & NC_UUpsert)!=0 && zTab!=0 ){
98910 Upsert *pUpsert = pNC->uNC.pUpsert;
98911 if( pUpsert && sqlite3StrICmp("excluded",zTab)==0 ){
98912 pTab = pUpsert->pUpsertSrc->a[0].pTab;
98913 pExpr->iTable = EXCLUDED_TABLE_NUMBER;
98914 }
@@ -98941,11 +98951,11 @@
98951 {
98952 pExpr->y.pTab = pTab;
98953 if( pParse->bReturning ){
98954 eNewExprOp = TK_REGISTER;
98955 pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable
98956 + iCol + 1;
98957 }else{
98958 pExpr->iColumn = (i16)iCol;
98959 eNewExprOp = TK_TRIGGER;
98960 #ifndef SQLITE_OMIT_TRIGGER
98961 if( iCol<0 ){
@@ -99028,11 +99038,11 @@
99038 }
99039 if( sqlite3ExprVectorSize(pOrig)!=1 ){
99040 sqlite3ErrorMsg(pParse, "row value misused");
99041 return WRC_Abort;
99042 }
99043 resolveAlias(pParse, pEList, j, pExpr, nSubquery);
99044 cnt = 1;
99045 pMatch = 0;
99046 assert( zTab==0 && zDb==0 );
99047 if( IN_RENAME_OBJECT ){
99048 sqlite3RenameTokenRemap(pParse, 0, (void*)pExpr);
@@ -99130,14 +99140,16 @@
99140 pMatch->colUsed |= sqlite3ExprColUsed(pExpr);
99141 }
99142
99143 /* Clean up and return
99144 */
99145 if( !ExprHasProperty(pExpr,(EP_TokenOnly|EP_Leaf)) ){
99146 sqlite3ExprDelete(db, pExpr->pLeft);
99147 pExpr->pLeft = 0;
99148 sqlite3ExprDelete(db, pExpr->pRight);
99149 pExpr->pRight = 0;
99150 }
99151 pExpr->op = eNewExprOp;
99152 ExprSetProperty(pExpr, EP_Leaf);
99153 lookupname_end:
99154 if( cnt==1 ){
99155 assert( pNC!=0 );
@@ -99905,12 +99917,11 @@
99917 if( pItem->u.x.iOrderByCol ){
99918 if( pItem->u.x.iOrderByCol>pEList->nExpr ){
99919 resolveOutOfRangeError(pParse, zType, i+1, pEList->nExpr);
99920 return 1;
99921 }
99922 resolveAlias(pParse, pEList, pItem->u.x.iOrderByCol-1, pItem->pExpr,0);
 
99923 }
99924 }
99925 return 0;
99926 }
99927
@@ -100153,11 +100164,11 @@
100164 ** aliases in the result set.
100165 **
100166 ** Minor point: If this is the case, then the expression will be
100167 ** re-evaluated for each reference to it.
100168 */
100169 assert( (sNC.ncFlags & (NC_UAggInfo|NC_UUpsert|NC_UBaseReg))==0 );
100170 sNC.uNC.pEList = p->pEList;
100171 sNC.ncFlags |= NC_UEList;
100172 if( sqlite3ResolveExprNames(&sNC, p->pHaving) ) return WRC_Abort;
100173 if( sqlite3ResolveExprNames(&sNC, p->pWhere) ) return WRC_Abort;
100174
@@ -106625,43 +106636,49 @@
106636 ** bTemp is not true, database "temp", can still be parsed. This is
106637 ** called at the end of the generation of an ALTER TABLE ... RENAME ...
106638 ** statement to ensure that the operation has not rendered any schema
106639 ** objects unusable.
106640 */
106641 static void renameTestSchema(
106642 Parse *pParse, /* Parse context */
106643 const char *zDb, /* Name of db to verify schema of */
106644 int bTemp, /* True if this is the temp db */
106645 const char *zWhen /* "when" part of error message */
106646 ){
106647 pParse->colNamesSet = 1;
106648 sqlite3NestedParse(pParse,
106649 "SELECT 1 "
106650 "FROM \"%w\"." DFLT_SCHEMA_TABLE " "
106651 "WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
106652 " AND sql NOT LIKE 'create virtual%%'"
106653 " AND sqlite_rename_test(%Q, sql, type, name, %d, %Q)=NULL ",
106654 zDb,
106655 zDb, bTemp, zWhen
106656 );
106657
106658 if( bTemp==0 ){
106659 sqlite3NestedParse(pParse,
106660 "SELECT 1 "
106661 "FROM temp." DFLT_SCHEMA_TABLE " "
106662 "WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
106663 " AND sql NOT LIKE 'create virtual%%'"
106664 " AND sqlite_rename_test(%Q, sql, type, name, 1, %Q)=NULL ",
106665 zDb, zWhen
106666 );
106667 }
106668 }
106669
106670 /*
106671 ** Generate code to reload the schema for database iDb. And, if iDb!=1, for
106672 ** the temp database as well.
106673 */
106674 static void renameReloadSchema(Parse *pParse, int iDb, u16 p5){
106675 Vdbe *v = pParse->pVdbe;
106676 if( v ){
106677 sqlite3ChangeCookie(pParse, iDb);
106678 sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, iDb, 0, p5);
106679 if( iDb!=1 ) sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, 1, 0, p5);
106680 }
106681 }
106682
106683 /*
106684 ** Generate code to implement the "ALTER TABLE xxx RENAME TO yyy"
@@ -106806,11 +106823,11 @@
106823 sqlite3NestedParse(pParse,
106824 "UPDATE sqlite_temp_schema SET "
106825 "sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), "
106826 "tbl_name = "
106827 "CASE WHEN tbl_name=%Q COLLATE nocase AND "
106828 " sqlite_rename_test(%Q, sql, type, name, 1, 'after rename') "
106829 "THEN %Q ELSE tbl_name END "
106830 "WHERE type IN ('view', 'trigger')"
106831 , zDb, zTabName, zName, zTabName, zDb, zName);
106832 }
106833
@@ -106825,12 +106842,12 @@
106842 sqlite3VdbeLoadString(v, i, zName);
106843 sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);
106844 }
106845 #endif
106846
106847 renameReloadSchema(pParse, iDb, INITFLAG_AlterRename);
106848 renameTestSchema(pParse, zDb, iDb==1, "after rename");
106849
106850 exit_rename_table:
106851 sqlite3SrcListDelete(db, pSrc);
106852 sqlite3DbFree(db, zName);
106853 db->mDbFlags = savedDbFlags;
@@ -106988,11 +107005,11 @@
107005 sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, 3);
107006 sqlite3ReleaseTempReg(pParse, r1);
107007 }
107008
107009 /* Reload the table definition */
107010 renameReloadSchema(pParse, iDb, INITFLAG_AlterRename);
107011 }
107012
107013 /*
107014 ** This function is called by the parser after the table-name in
107015 ** an "ALTER TABLE <table-name> ADD" statement is parsed. Argument
@@ -107088,11 +107105,11 @@
107105 ** it loads an error message into pParse and returns non-zero.
107106 **
107107 ** Or, if pTab is not a view or virtual table, zero is returned.
107108 */
107109 #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
107110 static int isRealTable(Parse *pParse, Table *pTab, int bDrop){
107111 const char *zType = 0;
107112 #ifndef SQLITE_OMIT_VIEW
107113 if( pTab->pSelect ){
107114 zType = "view";
107115 }
@@ -107101,19 +107118,20 @@
107118 if( IsVirtual(pTab) ){
107119 zType = "virtual table";
107120 }
107121 #endif
107122 if( zType ){
107123 sqlite3ErrorMsg(pParse, "cannot %s %s \"%s\"",
107124 (bDrop ? "drop column from" : "rename columns of"),
107125 zType, pTab->zName
107126 );
107127 return 1;
107128 }
107129 return 0;
107130 }
107131 #else /* !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) */
107132 # define isRealTable(x,y,z) (0)
107133 #endif
107134
107135 /*
107136 ** Handles the following parser reduction:
107137 **
@@ -107138,11 +107156,11 @@
107156 pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]);
107157 if( !pTab ) goto exit_rename_column;
107158
107159 /* Cannot alter a system table */
107160 if( SQLITE_OK!=isAlterableTable(pParse, pTab) ) goto exit_rename_column;
107161 if( SQLITE_OK!=isRealTable(pParse, pTab, 0) ) goto exit_rename_column;
107162
107163 /* Which schema holds the table to be altered */
107164 iSchema = sqlite3SchemaToIndex(db, pTab->pSchema);
107165 assert( iSchema>=0 );
107166 zDb = db->aDb[iSchema].zDbSName;
@@ -107192,12 +107210,12 @@
107210 "WHERE type IN ('trigger', 'view')",
107211 zDb, pTab->zName, iCol, zNew, bQuote
107212 );
107213
107214 /* Drop and reload the database schema. */
107215 renameReloadSchema(pParse, iSchema, INITFLAG_AlterRename);
107216 renameTestSchema(pParse, zDb, iSchema==1, "after rename");
107217
107218 exit_rename_column:
107219 sqlite3SrcListDelete(db, pSrc);
107220 sqlite3DbFree(db, zOld);
107221 sqlite3DbFree(db, zNew);
@@ -107445,27 +107463,37 @@
107463 }
107464 }
107465
107466 /*
107467 ** Search the Parse object passed as the first argument for a RenameToken
107468 ** object associated with parse tree element pPtr. If found, return a pointer
107469 ** to it. Otherwise, return NULL.
107470 **
107471 ** If the second argument passed to this function is not NULL and a matching
107472 ** RenameToken object is found, remove it from the Parse object and add it to
107473 ** the list maintained by the RenameCtx object.
107474 */
107475 static RenameToken *renameTokenFind(
107476 Parse *pParse,
107477 struct RenameCtx *pCtx,
107478 void *pPtr
107479 ){
107480 RenameToken **pp;
107481 assert( pPtr!=0 );
107482 for(pp=&pParse->pRename; (*pp); pp=&(*pp)->pNext){
107483 if( (*pp)->p==pPtr ){
107484 RenameToken *pToken = *pp;
107485 if( pCtx ){
107486 *pp = pToken->pNext;
107487 pToken->pNext = pCtx->pList;
107488 pCtx->pList = pToken;
107489 pCtx->nList++;
107490 }
107491 return pToken;
107492 }
107493 }
107494 return 0;
107495 }
107496
107497 /*
107498 ** This is a Walker select callback. It does nothing. It is only required
107499 ** because without a dummy callback, sqlite3WalkExpr() and similar do not
@@ -107532,21 +107560,21 @@
107560 ** sub-routine is currently stored in pParse->zErrMsg. This function
107561 ** adds context to the error message and then stores it in pCtx.
107562 */
107563 static void renameColumnParseError(
107564 sqlite3_context *pCtx,
107565 const char *zWhen,
107566 sqlite3_value *pType,
107567 sqlite3_value *pObject,
107568 Parse *pParse
107569 ){
107570 const char *zT = (const char*)sqlite3_value_text(pType);
107571 const char *zN = (const char*)sqlite3_value_text(pObject);
107572 char *zErr;
107573
107574 zErr = sqlite3_mprintf("error in %s %s%s%s: %s",
107575 zT, zN, (zWhen[0] ? " " : ""), zWhen,
107576 pParse->zErrMsg
107577 );
107578 sqlite3_result_error(pCtx, zErr, -1);
107579 sqlite3_free(zErr);
107580 }
@@ -107621,11 +107649,11 @@
107649 ** trigger object, the database must be corrupt. */
107650 memset(p, 0, sizeof(Parse));
107651 p->eParseMode = PARSE_MODE_RENAME;
107652 p->db = db;
107653 p->nQueryLoop = 1;
107654 rc = zSql ? sqlite3RunParser(p, zSql, &zErr) : SQLITE_NOMEM;
107655 assert( p->zErrMsg==0 );
107656 assert( rc!=SQLITE_OK || zErr==0 );
107657 p->zErrMsg = zErr;
107658 if( db->mallocFailed ) rc = SQLITE_NOMEM;
107659 if( rc==SQLITE_OK
@@ -108048,11 +108076,11 @@
108076 rc = renameEditSql(context, &sCtx, zSql, zNew, bQuote);
108077
108078 renameColumnFunc_done:
108079 if( rc!=SQLITE_OK ){
108080 if( sParse.zErrMsg ){
108081 renameColumnParseError(context, "", argv[1], argv[2], &sParse);
108082 }else{
108083 sqlite3_result_error_code(context, rc);
108084 }
108085 }
108086
@@ -108237,11 +108265,11 @@
108265 if( rc==SQLITE_OK ){
108266 rc = renameEditSql(context, &sCtx, zInput, zNew, bQuote);
108267 }
108268 if( rc!=SQLITE_OK ){
108269 if( sParse.zErrMsg ){
108270 renameColumnParseError(context, "", argv[1], argv[2], &sParse);
108271 }else{
108272 sqlite3_result_error_code(context, rc);
108273 }
108274 }
108275
@@ -108266,10 +108294,11 @@
108294 ** 0: Database name ("main", "temp" etc.).
108295 ** 1: SQL statement.
108296 ** 2: Object type ("view", "table", "trigger" or "index").
108297 ** 3: Object name.
108298 ** 4: True if object is from temp schema.
108299 ** 5: "when" part of error message.
108300 **
108301 ** Unless it finds an error, this function normally returns NULL. However, it
108302 ** returns integer value 1 if:
108303 **
108304 ** * the SQL argument creates a trigger, and
@@ -108283,10 +108312,11 @@
108312 sqlite3 *db = sqlite3_context_db_handle(context);
108313 char const *zDb = (const char*)sqlite3_value_text(argv[0]);
108314 char const *zInput = (const char*)sqlite3_value_text(argv[1]);
108315 int bTemp = sqlite3_value_int(argv[4]);
108316 int isLegacy = (db->flags & SQLITE_LegacyAlter);
108317 char const *zWhen = (const char*)sqlite3_value_text(argv[5]);
108318
108319 #ifndef SQLITE_OMIT_AUTHORIZATION
108320 sqlite3_xauth xAuth = db->xAuth;
108321 db->xAuth = 0;
108322 #endif
@@ -108315,29 +108345,222 @@
108345 if( i1==i2 ) sqlite3_result_int(context, 1);
108346 }
108347 }
108348 }
108349
108350 if( rc!=SQLITE_OK && zWhen ){
108351 renameColumnParseError(context, zWhen, argv[2], argv[3],&sParse);
108352 }
108353 renameParseCleanup(&sParse);
108354 }
108355
108356 #ifndef SQLITE_OMIT_AUTHORIZATION
108357 db->xAuth = xAuth;
108358 #endif
108359 }
108360
108361 /*
108362 ** The implementation of internal UDF sqlite_drop_column().
108363 **
108364 ** Arguments:
108365 **
108366 ** argv[0]: An integer - the index of the schema containing the table
108367 ** argv[1]: CREATE TABLE statement to modify.
108368 ** argv[2]: An integer - the index of the column to remove.
108369 ** argv[3]: Byte offset of first byte after last column definition in argv[1]
108370 **
108371 ** The value returned is a string containing the CREATE TABLE statement
108372 ** with column argv[2] removed.
108373 */
108374 static void dropColumnFunc(
108375 sqlite3_context *context,
108376 int NotUsed,
108377 sqlite3_value **argv
108378 ){
108379 sqlite3 *db = sqlite3_context_db_handle(context);
108380 int iSchema = sqlite3_value_int(argv[0]);
108381 const char *zSql = (const char*)sqlite3_value_text(argv[1]);
108382 int iCol = sqlite3_value_int(argv[2]);
108383 int iAddColOffset = sqlite3_value_int(argv[3]);
108384 const char *zDb = db->aDb[iSchema].zDbSName;
108385 int rc;
108386 Parse sParse;
108387 RenameToken *pCol;
108388 Table *pTab;
108389 const char *zEnd;
108390 char *zNew = 0;
108391
108392 #ifndef SQLITE_OMIT_AUTHORIZATION
108393 sqlite3_xauth xAuth = db->xAuth;
108394 db->xAuth = 0;
108395 #endif
108396
108397 rc = renameParseSql(&sParse, zDb, db, zSql, iSchema==1);
108398 if( rc!=SQLITE_OK ) goto drop_column_done;
108399 pTab = sParse.pNewTable;
108400 if( iCol>=pTab->nCol ){
108401 /* This can happen if the sqlite_schema table is corrupt */
108402 rc = SQLITE_CORRUPT_BKPT;
108403 goto drop_column_done;
108404 }
108405
108406 pCol = renameTokenFind(&sParse, 0, (void*)pTab->aCol[iCol].zName);
108407 if( iCol<pTab->nCol-1 ){
108408 RenameToken *pEnd;
108409 pEnd = renameTokenFind(&sParse, 0, (void*)pTab->aCol[iCol+1].zName);
108410 zEnd = (const char*)pEnd->t.z;
108411 }else{
108412 zEnd = (const char*)&zSql[iAddColOffset];
108413 while( ALWAYS(pCol->t.z[0]!=0) && pCol->t.z[0]!=',' ) pCol->t.z--;
108414 }
108415
108416 zNew = sqlite3MPrintf(db, "%.*s%s", pCol->t.z-zSql, zSql, zEnd);
108417 sqlite3_result_text(context, zNew, -1, SQLITE_TRANSIENT);
108418 sqlite3_free(zNew);
108419
108420 drop_column_done:
108421 renameParseCleanup(&sParse);
108422 #ifndef SQLITE_OMIT_AUTHORIZATION
108423 db->xAuth = xAuth;
108424 #endif
108425 if( rc!=SQLITE_OK ){
108426 sqlite3_result_error_code(context, rc);
108427 }
108428 }
108429
108430 /*
108431 ** This function is called by the parser upon parsing an
108432 **
108433 ** ALTER TABLE pSrc DROP COLUMN pName
108434 **
108435 ** statement. Argument pSrc contains the possibly qualified name of the
108436 ** table being edited, and token pName the name of the column to drop.
108437 */
108438 SQLITE_PRIVATE void sqlite3AlterDropColumn(Parse *pParse, SrcList *pSrc, Token *pName){
108439 sqlite3 *db = pParse->db; /* Database handle */
108440 Table *pTab; /* Table to modify */
108441 int iDb; /* Index of db containing pTab in aDb[] */
108442 const char *zDb; /* Database containing pTab ("main" etc.) */
108443 char *zCol = 0; /* Name of column to drop */
108444 int iCol; /* Index of column zCol in pTab->aCol[] */
108445
108446 /* Look up the table being altered. */
108447 assert( pParse->pNewTable==0 );
108448 assert( sqlite3BtreeHoldsAllMutexes(db) );
108449 if( NEVER(db->mallocFailed) ) goto exit_drop_column;
108450 pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]);
108451 if( !pTab ) goto exit_drop_column;
108452
108453 /* Make sure this is not an attempt to ALTER a view, virtual table or
108454 ** system table. */
108455 if( SQLITE_OK!=isAlterableTable(pParse, pTab) ) goto exit_drop_column;
108456 if( SQLITE_OK!=isRealTable(pParse, pTab, 1) ) goto exit_drop_column;
108457
108458 /* Find the index of the column being dropped. */
108459 zCol = sqlite3NameFromToken(db, pName);
108460 if( zCol==0 ){
108461 assert( db->mallocFailed );
108462 goto exit_drop_column;
108463 }
108464 iCol = sqlite3ColumnIndex(pTab, zCol);
108465 if( iCol<0 ){
108466 sqlite3ErrorMsg(pParse, "no such column: \"%s\"", zCol);
108467 goto exit_drop_column;
108468 }
108469
108470 /* Do not allow the user to drop a PRIMARY KEY column or a column
108471 ** constrained by a UNIQUE constraint. */
108472 if( pTab->aCol[iCol].colFlags & (COLFLAG_PRIMKEY|COLFLAG_UNIQUE) ){
108473 sqlite3ErrorMsg(pParse, "cannot drop %s column: \"%s\"",
108474 (pTab->aCol[iCol].colFlags&COLFLAG_PRIMKEY) ? "PRIMARY KEY" : "UNIQUE",
108475 zCol
108476 );
108477 goto exit_drop_column;
108478 }
108479
108480 /* Do not allow the number of columns to go to zero */
108481 if( pTab->nCol<=1 ){
108482 sqlite3ErrorMsg(pParse, "cannot drop column \"%s\": no other columns exist",zCol);
108483 goto exit_drop_column;
108484 }
108485
108486 /* Edit the sqlite_schema table */
108487 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
108488 assert( iDb>=0 );
108489 zDb = db->aDb[iDb].zDbSName;
108490 renameTestSchema(pParse, zDb, iDb==1, "");
108491 sqlite3NestedParse(pParse,
108492 "UPDATE \"%w\"." DFLT_SCHEMA_TABLE " SET "
108493 "sql = sqlite_drop_column(%d, sql, %d, %d) "
108494 "WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)"
108495 , zDb, iDb, iCol, pTab->addColOffset, pTab->zName
108496 );
108497
108498 /* Drop and reload the database schema. */
108499 renameReloadSchema(pParse, iDb, INITFLAG_AlterDrop);
108500 renameTestSchema(pParse, zDb, iDb==1, "after drop column");
108501
108502 /* Edit rows of table on disk */
108503 if( pParse->nErr==0 && (pTab->aCol[iCol].colFlags & COLFLAG_VIRTUAL)==0 ){
108504 int i;
108505 int addr;
108506 int reg;
108507 int regRec;
108508 Index *pPk = 0;
108509 int nField = 0; /* Number of non-virtual columns after drop */
108510 int iCur;
108511 Vdbe *v = sqlite3GetVdbe(pParse);
108512 iCur = pParse->nTab++;
108513 sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenWrite);
108514 addr = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);
108515 reg = ++pParse->nMem;
108516 pParse->nMem += pTab->nCol;
108517 if( HasRowid(pTab) ){
108518 sqlite3VdbeAddOp2(v, OP_Rowid, iCur, reg);
108519 }else{
108520 pPk = sqlite3PrimaryKeyIndex(pTab);
108521 }
108522 for(i=0; i<pTab->nCol; i++){
108523 if( i!=iCol && (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0 ){
108524 int regOut;
108525 if( pPk ){
108526 int iPos = sqlite3TableColumnToIndex(pPk, i);
108527 int iColPos = sqlite3TableColumnToIndex(pPk, iCol);
108528 regOut = reg+1+iPos-(iPos>iColPos);
108529 }else{
108530 regOut = reg+1+nField;
108531 }
108532 sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, i, regOut);
108533 nField++;
108534 }
108535 }
108536 regRec = reg + pTab->nCol;
108537 sqlite3VdbeAddOp3(v, OP_MakeRecord, reg+1, nField, regRec);
108538 if( pPk ){
108539 sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iCur, regRec, reg+1, pPk->nKeyCol);
108540 }else{
108541 sqlite3VdbeAddOp3(v, OP_Insert, iCur, regRec, reg);
108542 }
108543
108544 sqlite3VdbeAddOp2(v, OP_Next, iCur, addr+1); VdbeCoverage(v);
108545 sqlite3VdbeJumpHere(v, addr);
108546 }
108547
108548 exit_drop_column:
108549 sqlite3DbFree(db, zCol);
108550 sqlite3SrcListDelete(db, pSrc);
108551 }
108552
108553 /*
108554 ** Register built-in functions used to help implement ALTER TABLE
108555 */
108556 SQLITE_PRIVATE void sqlite3AlterFunctions(void){
108557 static FuncDef aAlterTableFuncs[] = {
108558 INTERNAL_FUNCTION(sqlite_rename_column, 9, renameColumnFunc),
108559 INTERNAL_FUNCTION(sqlite_rename_table, 7, renameTableFunc),
108560 INTERNAL_FUNCTION(sqlite_rename_test, 6, renameTableTest),
108561 INTERNAL_FUNCTION(sqlite_drop_column, 4, dropColumnFunc),
108562 };
108563 sqlite3InsertBuiltinFuncs(aAlterTableFuncs, ArraySize(aAlterTableFuncs));
108564 }
108565 #endif /* SQLITE_ALTER_TABLE */
108566
@@ -111318,16 +111541,18 @@
111541 int i;
111542 int reg;
111543
111544 addrRewind =
111545 sqlite3VdbeAddOp1(v, OP_Rewind, pReturning->iRetCur);
111546 VdbeCoverage(v);
111547 reg = pReturning->iRetReg;
111548 for(i=0; i<pReturning->nRetCol; i++){
111549 sqlite3VdbeAddOp3(v, OP_Column, pReturning->iRetCur, i, reg+i);
111550 }
111551 sqlite3VdbeAddOp2(v, OP_ResultRow, reg, i);
111552 sqlite3VdbeAddOp2(v, OP_Next, pReturning->iRetCur, addrRewind+1);
111553 VdbeCoverage(v);
111554 sqlite3VdbeJumpHere(v, addrRewind);
111555 }
111556 sqlite3VdbeAddOp0(v, OP_Halt);
111557
111558 #if SQLITE_USER_AUTHENTICATION
@@ -112417,10 +112642,11 @@
112642 */
112643 #if SQLITE_ENABLE_HIDDEN_COLUMNS
112644 SQLITE_PRIVATE void sqlite3ColumnPropertiesFromName(Table *pTab, Column *pCol){
112645 if( sqlite3_strnicmp(pCol->zName, "__hidden__", 10)==0 ){
112646 pCol->colFlags |= COLFLAG_HIDDEN;
112647 if( pTab ) pTab->tabFlags |= TF_HasHidden;
112648 }else if( pTab && pCol!=pTab->aCol && (pCol[-1].colFlags & COLFLAG_HIDDEN) ){
112649 pTab->tabFlags |= TF_OOOHidden;
112650 }
112651 }
112652 #endif
@@ -112461,11 +112687,15 @@
112687 */
112688 SQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){
112689 Returning *pRet;
112690 Hash *pHash;
112691 sqlite3 *db = pParse->db;
112692 if( pParse->pNewTrigger ){
112693 sqlite3ErrorMsg(pParse, "cannot use RETURNING in a trigger");
112694 }else{
112695 assert( pParse->bReturning==0 );
112696 }
112697 pParse->bReturning = 1;
112698 pRet = sqlite3DbMallocZero(db, sizeof(*pRet));
112699 if( pRet==0 ){
112700 sqlite3ExprListDelete(db, pList);
112701 return;
@@ -112484,11 +112714,11 @@
112714 pRet->retTrig.step_list = &pRet->retTStep;
112715 pRet->retTStep.op = TK_RETURNING;
112716 pRet->retTStep.pTrig = &pRet->retTrig;
112717 pRet->retTStep.pExprList = pList;
112718 pHash = &(db->aDb[1].pSchema->trigHash);
112719 assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 || pParse->nErr );
112720 if( sqlite3HashInsert(pHash, RETURNING_TRIGGER_NAME, &pRet->retTrig)
112721 ==&pRet->retTrig ){
112722 sqlite3OomFault(db);
112723 }
112724 }
@@ -113789,11 +114019,11 @@
114019 }
114020 #endif
114021
114022 /* Reparse everything to update our internal data structures */
114023 sqlite3VdbeAddParseSchemaOp(v, iDb,
114024 sqlite3MPrintf(db, "tbl_name='%q' AND type!='trigger'", p->zName),0);
114025 }
114026
114027 /* Add the table to the in-memory representation of the database.
114028 */
114029 if( db->init.busy ){
@@ -115277,11 +115507,11 @@
115507 */
115508 if( pTblName ){
115509 sqlite3RefillIndex(pParse, pIndex, iMem);
115510 sqlite3ChangeCookie(pParse, iDb);
115511 sqlite3VdbeAddParseSchemaOp(v, iDb,
115512 sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName), 0);
115513 sqlite3VdbeAddOp2(v, OP_Expire, 0, 1);
115514 }
115515
115516 sqlite3VdbeJumpHere(v, (int)pIndex->tnum);
115517 }
@@ -118623,11 +118853,12 @@
118853 while( (c = Utf8Read(zPattern))!=0 ){
118854 if( c==matchAll ){ /* Match "*" */
118855 /* Skip over multiple "*" characters in the pattern. If there
118856 ** are also "?" characters, skip those as well, but consume a
118857 ** single character of the input string for each "?" skipped */
118858 while( (c=Utf8Read(zPattern)) == matchAll
118859 || (c == matchOne && matchOne!=0) ){
118860 if( c==matchOne && sqlite3Utf8Read(&zString)==0 ){
118861 return SQLITE_NOWILDCARDMATCH;
118862 }
118863 }
118864 if( c==0 ){
@@ -122603,23 +122834,28 @@
122834 ipkColumn--;
122835 }
122836 }
122837 }
122838 #endif
122839
122840 /* Make sure the number of columns in the source data matches the number
122841 ** of columns to be inserted into the table.
122842 */
122843 assert( TF_HasHidden==COLFLAG_HIDDEN );
122844 assert( TF_HasGenerated==COLFLAG_GENERATED );
122845 assert( COLFLAG_NOINSERT==(COLFLAG_GENERATED|COLFLAG_HIDDEN) );
122846 if( (pTab->tabFlags & (TF_HasGenerated|TF_HasHidden))!=0 ){
122847 for(i=0; i<pTab->nCol; i++){
122848 if( pTab->aCol[i].colFlags & COLFLAG_NOINSERT ) nHidden++;
122849 }
122850 }
122851 if( nColumn!=(pTab->nCol-nHidden) ){
122852 sqlite3ErrorMsg(pParse,
122853 "table %S has %d columns but %d values were supplied",
122854 pTabList, 0, pTab->nCol-nHidden, nColumn);
122855 goto insert_cleanup;
122856 }
122857 }
122858 if( pColumn!=0 && nColumn!=pColumn->nId ){
122859 sqlite3ErrorMsg(pParse, "%d values for %d columns", nColumn, pColumn->nId);
122860 goto insert_cleanup;
122861 }
@@ -124078,10 +124314,36 @@
124314 }
124315 sqlite3VdbeChangeP5(v, i+1);
124316 }
124317 #endif
124318
124319 /*
124320 ** Table pTab is a WITHOUT ROWID table that is being written to. The cursor
124321 ** number is iCur, and register regData contains the new record for the
124322 ** PK index. This function adds code to invoke the pre-update hook,
124323 ** if one is registered.
124324 */
124325 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
124326 static void codeWithoutRowidPreupdate(
124327 Parse *pParse, /* Parse context */
124328 Table *pTab, /* Table being updated */
124329 int iCur, /* Cursor number for table */
124330 int regData /* Data containing new record */
124331 ){
124332 Vdbe *v = pParse->pVdbe;
124333 int r = sqlite3GetTempReg(pParse);
124334 assert( !HasRowid(pTab) );
124335 assert( 0==(pParse->db->mDbFlags & DBFLAG_Vacuum) );
124336 sqlite3VdbeAddOp2(v, OP_Integer, 0, r);
124337 sqlite3VdbeAddOp4(v, OP_Insert, iCur, regData, r, (char*)pTab, P4_TABLE);
124338 sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP);
124339 sqlite3ReleaseTempReg(pParse, r);
124340 }
124341 #else
124342 # define codeWithoutRowidPreupdate(a,b,c,d)
124343 #endif
124344
124345 /*
124346 ** This routine generates code to finish the INSERT or UPDATE operation
124347 ** that was started by a prior call to sqlite3GenerateConstraintChecks.
124348 ** A consecutive range of registers starting at regNewData contains the
124349 ** rowid and the content to be inserted.
@@ -124126,21 +124388,13 @@
124388 pik_flags = (useSeekResult ? OPFLAG_USESEEKRESULT : 0);
124389 if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
124390 assert( pParse->nested==0 );
124391 pik_flags |= OPFLAG_NCHANGE;
124392 pik_flags |= (update_flags & OPFLAG_SAVEPOSITION);
 
124393 if( update_flags==0 ){
124394 codeWithoutRowidPreupdate(pParse, pTab, iIdxCur+i, aRegIdx[i]);
124395 }
 
 
 
 
 
 
 
124396 }
124397 sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iIdxCur+i, aRegIdx[i],
124398 aRegIdx[i]+1,
124399 pIdx->uniqNotNull ? pIdx->nKeyCol: pIdx->nColumn);
124400 sqlite3VdbeChangeP5(v, pik_flags);
@@ -124609,20 +124863,22 @@
124863 insFlags = OPFLAG_APPEND|OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT;
124864 }else{
124865 insFlags = OPFLAG_NCHANGE|OPFLAG_LASTROWID|OPFLAG_APPEND|OPFLAG_PREFORMAT;
124866 }
124867 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
124868 if( (db->mDbFlags & DBFLAG_Vacuum)==0 ){
124869 sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);
124870 insFlags &= ~OPFLAG_PREFORMAT;
124871 }else
124872 #endif
124873 {
124874 sqlite3VdbeAddOp3(v, OP_RowCell, iDest, iSrc, regRowid);
124875 }
124876 sqlite3VdbeAddOp3(v, OP_Insert, iDest, regData, regRowid);
124877 if( (db->mDbFlags & DBFLAG_Vacuum)==0 ){
124878 sqlite3VdbeChangeP4(v, -1, (char*)pDest, P4_TABLE);
124879 }
124880 sqlite3VdbeChangeP5(v, insFlags);
124881
124882 sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1); VdbeCoverage(v);
124883 sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
124884 sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
@@ -124671,10 +124927,16 @@
124927 }else if( !HasRowid(pSrc) && pDestIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){
124928 idxInsFlags |= OPFLAG_NCHANGE;
124929 }
124930 if( idxInsFlags!=(OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT) ){
124931 sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);
124932 if( (db->mDbFlags & DBFLAG_Vacuum)==0
124933 && !HasRowid(pDest)
124934 && IsPrimaryKeyIndex(pDestIdx)
124935 ){
124936 codeWithoutRowidPreupdate(pParse, pDest, iDest, regData);
124937 }
124938 }
124939 sqlite3VdbeAddOp2(v, OP_IdxInsert, iDest, regData);
124940 sqlite3VdbeChangeP5(v, idxInsFlags|OPFLAG_APPEND);
124941 sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1); VdbeCoverage(v);
124942 sqlite3VdbeJumpHere(v, addr1);
@@ -129635,26 +129897,30 @@
129897 ** Fill the InitData structure with an error message that indicates
129898 ** that the database is corrupt.
129899 */
129900 static void corruptSchema(
129901 InitData *pData, /* Initialization context */
129902 char **azObj, /* Type and name of object being parsed */
129903 const char *zExtra /* Error information */
129904 ){
129905 sqlite3 *db = pData->db;
129906 if( db->mallocFailed ){
129907 pData->rc = SQLITE_NOMEM_BKPT;
129908 }else if( pData->pzErrMsg[0]!=0 ){
129909 /* A error message has already been generated. Do not overwrite it */
129910 }else if( pData->mInitFlags & (INITFLAG_AlterRename|INITFLAG_AlterDrop) ){
129911 *pData->pzErrMsg = sqlite3MPrintf(db,
129912 "error in %s %s after %s: %s", azObj[0], azObj[1],
129913 (pData->mInitFlags & INITFLAG_AlterRename) ? "rename" : "drop column",
129914 zExtra
129915 );
129916 pData->rc = SQLITE_ERROR;
129917 }else if( db->flags & SQLITE_WriteSchema ){
129918 pData->rc = SQLITE_CORRUPT_BKPT;
129919 }else{
129920 char *z;
129921 const char *zObj = azObj[1] ? azObj[1] : "?";
129922 z = sqlite3MPrintf(db, "malformed database schema (%s)", zObj);
129923 if( zExtra && zExtra[0] ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra);
129924 *pData->pzErrMsg = z;
129925 pData->rc = SQLITE_CORRUPT_BKPT;
129926 }
@@ -129708,18 +129974,18 @@
129974 UNUSED_PARAMETER2(NotUsed, argc);
129975 assert( sqlite3_mutex_held(db->mutex) );
129976 db->mDbFlags |= DBFLAG_EncodingFixed;
129977 pData->nInitRow++;
129978 if( db->mallocFailed ){
129979 corruptSchema(pData, argv, 0);
129980 return 1;
129981 }
129982
129983 assert( iDb>=0 && iDb<db->nDb );
129984 if( argv==0 ) return 0; /* Might happen if EMPTY_RESULT_CALLBACKS are on */
129985 if( argv[3]==0 ){
129986 corruptSchema(pData, argv, 0);
129987 }else if( argv[4]
129988 && 'c'==sqlite3UpperToLower[(unsigned char)argv[4][0]]
129989 && 'r'==sqlite3UpperToLower[(unsigned char)argv[4][1]] ){
129990 /* Call the parser to process a CREATE TABLE, INDEX or VIEW.
129991 ** But because db->init.busy is set to 1, no VDBE code is generated
@@ -129740,11 +130006,11 @@
130006 db->init.iDb = iDb;
130007 if( sqlite3GetUInt32(argv[3], &db->init.newTnum)==0
130008 || (db->init.newTnum>pData->mxPage && pData->mxPage>0)
130009 ){
130010 if( sqlite3Config.bExtraSchemaChecks ){
130011 corruptSchema(pData, argv, "invalid rootpage");
130012 }
130013 }
130014 db->init.orphanTrigger = 0;
130015 db->init.azInit = argv;
130016 pStmt = 0;
@@ -129759,17 +130025,17 @@
130025 }else{
130026 if( rc > pData->rc ) pData->rc = rc;
130027 if( rc==SQLITE_NOMEM ){
130028 sqlite3OomFault(db);
130029 }else if( rc!=SQLITE_INTERRUPT && (rc&0xFF)!=SQLITE_LOCKED ){
130030 corruptSchema(pData, argv, sqlite3_errmsg(db));
130031 }
130032 }
130033 }
130034 sqlite3_finalize(pStmt);
130035 }else if( argv[1]==0 || (argv[4]!=0 && argv[4][0]!=0) ){
130036 corruptSchema(pData, argv, 0);
130037 }else{
130038 /* If the SQL column is blank it means this is an index that
130039 ** was created to be the PRIMARY KEY or to fulfill a UNIQUE
130040 ** constraint for a CREATE TABLE. The index should have already
130041 ** been created when we processed the CREATE TABLE. All we have
@@ -129776,19 +130042,19 @@
130042 ** to do here is record the root page number for that index.
130043 */
130044 Index *pIndex;
130045 pIndex = sqlite3FindIndex(db, argv[1], db->aDb[iDb].zDbSName);
130046 if( pIndex==0 ){
130047 corruptSchema(pData, argv, "orphan index");
130048 }else
130049 if( sqlite3GetUInt32(argv[3],&pIndex->tnum)==0
130050 || pIndex->tnum<2
130051 || pIndex->tnum>pData->mxPage
130052 || sqlite3IndexHasDuplicateRootPage(pIndex)
130053 ){
130054 if( sqlite3Config.bExtraSchemaChecks ){
130055 corruptSchema(pData, argv, "invalid rootpage");
130056 }
130057 }
130058 }
130059 return 0;
130060 }
@@ -130164,35 +130430,20 @@
130430 assert( i>=0 && i<db->nDb );
130431 }
130432 return i;
130433 }
130434
 
 
 
 
 
 
 
 
 
130435 /*
130436 ** Free all memory allocations in the pParse object
130437 */
130438 SQLITE_PRIVATE void sqlite3ParserReset(Parse *pParse){
130439 sqlite3 *db = pParse->db;
 
 
 
 
 
 
130440 while( pParse->pCleanup ){
130441 ParseCleanup *pCleanup = pParse->pCleanup;
130442 pParse->pCleanup = pCleanup->pNext;
130443 pCleanup->xCleanup(db, pCleanup->pPtr);
130444 sqlite3DbFreeNN(db, pCleanup);
130445 }
130446 sqlite3DbFree(db, pParse->aLabel);
130447 if( pParse->pConstExpr ){
130448 sqlite3ExprListDelete(db, pParse->pConstExpr);
130449 }
@@ -130893,11 +131144,11 @@
131144
131145 /*
131146 ** Return the index of a column in a table. Return -1 if the column
131147 ** is not contained in the table.
131148 */
131149 SQLITE_PRIVATE int sqlite3ColumnIndex(Table *pTab, const char *zCol){
131150 int i;
131151 u8 h = sqlite3StrIHash(zCol);
131152 Column *pCol;
131153 for(pCol=pTab->aCol, i=0; i<pTab->nCol; pCol++, i++){
131154 if( pCol->hName==h && sqlite3StrICmp(pCol->zName, zCol)==0 ) return i;
@@ -130925,11 +131176,11 @@
131176 int i; /* For looping over tables in pSrc */
131177 int iCol; /* Index of column matching zCol */
131178
131179 assert( (piTab==0)==(piCol==0) ); /* Both or neither are NULL */
131180 for(i=0; i<N; i++){
131181 iCol = sqlite3ColumnIndex(pSrc->a[i].pTab, zCol);
131182 if( iCol>=0
131183 && (bIgnoreHidden==0 || IsHiddenColumn(&pSrc->a[i].pTab->aCol[iCol])==0)
131184 ){
131185 if( piTab ){
131186 *piTab = i;
@@ -131135,11 +131386,11 @@
131386 int iLeft; /* Table on the left with matching column name */
131387 int iLeftCol; /* Column number of matching column on the left */
131388 int iRightCol; /* Column number of matching column on the right */
131389
131390 zName = pList->a[j].zName;
131391 iRightCol = sqlite3ColumnIndex(pRightTab, zName);
131392 if( iRightCol<0
131393 || !tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol, 0)
131394 ){
131395 sqlite3ErrorMsg(pParse, "cannot join using column %s - column "
131396 "not present in both tables", zName);
@@ -132717,10 +132968,11 @@
132968 sNC.pSrcList = pSelect->pSrc;
132969 a = pSelect->pEList->a;
132970 for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
132971 const char *zType;
132972 int n, m;
132973 pTab->tabFlags |= (pCol->colFlags & COLFLAG_NOINSERT);
132974 p = a[i].pExpr;
132975 zType = columnType(&sNC, p, 0, 0, 0);
132976 /* pCol->szEst = ... // Column size est for SELECT tables never used */
132977 pCol->affinity = sqlite3ExprAffinity(p);
132978 if( zType ){
@@ -134319,11 +134571,12 @@
134571 ** Expression walker callback used by renumberCursors() to update
134572 ** Expr objects to match newly assigned cursor numbers.
134573 */
134574 static int renumberCursorsCb(Walker *pWalker, Expr *pExpr){
134575 int *aCsrMap = pWalker->u.aiCol;
134576 int op = pExpr->op;
134577 if( (op==TK_COLUMN || op==TK_IF_NULL_ROW) && aCsrMap[pExpr->iTable] ){
134578 pExpr->iTable = aCsrMap[pExpr->iTable];
134579 }
134580 if( ExprHasProperty(pExpr, EP_FromJoin) && aCsrMap[pExpr->iRightJoinTable] ){
134581 pExpr->iRightJoinTable = aCsrMap[pExpr->iRightJoinTable];
134582 }
@@ -135223,10 +135476,11 @@
135476 if( ExprHasProperty(pWhere,EP_FromJoin) && pWhere->iRightJoinTable!=iCursor ){
135477 return 0; /* restriction (5) */
135478 }
135479 if( sqlite3ExprIsTableConstant(pWhere, iCursor) ){
135480 nChng++;
135481 pSubq->selFlags |= SF_PushDown;
135482 while( pSubq ){
135483 SubstContext x;
135484 pNew = sqlite3ExprDup(pParse->db, pWhere, 0);
135485 unsetJoinExpr(pNew, -1);
135486 x.pParse = pParse;
@@ -136395,10 +136649,12 @@
136649 static struct SrcList_item *isSelfJoinView(
136650 SrcList *pTabList, /* Search for self-joins in this FROM clause */
136651 struct SrcList_item *pThis /* Search for prior reference to this subquery */
136652 ){
136653 struct SrcList_item *pItem;
136654 assert( pThis->pSelect!=0 );
136655 if( pThis->pSelect->selFlags & SF_PushDown ) return 0;
136656 for(pItem = pTabList->a; pItem<pThis; pItem++){
136657 Select *pS1;
136658 if( pItem->pSelect==0 ) continue;
136659 if( pItem->fg.viaCoroutine ) continue;
136660 if( pItem->zName==0 ) continue;
@@ -136410,21 +136666,28 @@
136666 if( pItem->pTab->pSchema==0 && pThis->pSelect->selId!=pS1->selId ){
136667 /* The query flattener left two different CTE tables with identical
136668 ** names in the same FROM clause. */
136669 continue;
136670 }
136671 if( pItem->pSelect->selFlags & SF_PushDown ){
 
 
136672 /* The view was modified by some other optimization such as
136673 ** pushDownWhereTerms() */
136674 continue;
136675 }
136676 return pItem;
136677 }
136678 return 0;
136679 }
136680
136681 /*
136682 ** Deallocate a single AggInfo object
136683 */
136684 static void agginfoFree(sqlite3 *db, AggInfo *p){
136685 sqlite3DbFree(db, p->aCol);
136686 sqlite3DbFree(db, p->aFunc);
136687 sqlite3DbFreeNN(db, p);
136688 }
136689
136690 #ifdef SQLITE_COUNTOFVIEW_OPTIMIZATION
136691 /*
136692 ** Attempt to transform a query of the form
136693 **
@@ -136833,10 +137096,11 @@
137096 SELECTTRACE(0x100,pParse,p,
137097 ("After WHERE-clause push-down into subquery %d:\n", pSub->selId));
137098 sqlite3TreeViewSelect(0, p, 0);
137099 }
137100 #endif
137101 assert( pItem->pSelect && (pItem->pSelect->selFlags & SF_PushDown)!=0 );
137102 }else{
137103 SELECTTRACE(0x100,pParse,p,("Push-down not possible\n"));
137104 }
137105
137106 zSavedAuthContext = pParse->zAuthContext;
@@ -137055,10 +137319,11 @@
137319 sSort.labelOBLopt = sqlite3WhereOrderByLimitOptLabel(pWInfo);
137320 if( sSort.nOBSat==sSort.pOrderBy->nExpr ){
137321 sSort.pOrderBy = 0;
137322 }
137323 }
137324 SELECTTRACE(1,pParse,p,("WhereBegin returns\n"));
137325
137326 /* If sorting index that was created by a prior OP_OpenEphemeral
137327 ** instruction ended up not being needed, then change the OP_OpenEphemeral
137328 ** into an OP_Noop.
137329 */
@@ -137093,10 +137358,11 @@
137358 sqlite3WhereContinueLabel(pWInfo),
137359 sqlite3WhereBreakLabel(pWInfo));
137360
137361 /* End the database scan loop.
137362 */
137363 SELECTTRACE(1,pParse,p,("WhereEnd\n"));
137364 sqlite3WhereEnd(pWInfo);
137365 }
137366 }else{
137367 /* This case when there exist aggregate functions or a GROUP BY clause
137368 ** or both */
@@ -137163,15 +137429,17 @@
137429 /* Convert TK_COLUMN nodes into TK_AGG_COLUMN and make entries in
137430 ** sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the
137431 ** SELECT statement.
137432 */
137433 pAggInfo = sqlite3DbMallocZero(db, sizeof(*pAggInfo) );
137434 if( pAggInfo ){
137435 sqlite3ParserAddCleanup(pParse,
137436 (void(*)(sqlite3*,void*))agginfoFree, pAggInfo);
137437 }
137438 if( db->mallocFailed ){
137439 goto select_end;
137440 }
 
 
137441 pAggInfo->selId = p->selId;
137442 memset(&sNC, 0, sizeof(sNC));
137443 sNC.pParse = pParse;
137444 sNC.pSrcList = pTabList;
137445 sNC.uNC.pAggInfo = pAggInfo;
@@ -137286,10 +137554,11 @@
137554 SELECTTRACE(1,pParse,p,("WhereBegin\n"));
137555 pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pGroupBy, 0,
137556 WHERE_GROUPBY | (orderByGrp ? WHERE_SORTBYGROUP : 0), 0
137557 );
137558 if( pWInfo==0 ) goto select_end;
137559 SELECTTRACE(1,pParse,p,("WhereBegin returns\n"));
137560 if( sqlite3WhereIsOrdered(pWInfo)==pGroupBy->nExpr ){
137561 /* The optimizer is able to deliver rows in group by order so
137562 ** we do not have to sort. The OP_OpenEphemeral table will be
137563 ** cancelled later because we still need to use the pKeyInfo
137564 */
@@ -137334,10 +137603,11 @@
137603 regRecord = sqlite3GetTempReg(pParse);
137604 sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regRecord);
137605 sqlite3VdbeAddOp2(v, OP_SorterInsert, pAggInfo->sortingIdx, regRecord);
137606 sqlite3ReleaseTempReg(pParse, regRecord);
137607 sqlite3ReleaseTempRange(pParse, regBase, nCol);
137608 SELECTTRACE(1,pParse,p,("WhereEnd\n"));
137609 sqlite3WhereEnd(pWInfo);
137610 pAggInfo->sortingIdxPTab = sortPTab = pParse->nTab++;
137611 sortOut = sqlite3GetTempReg(pParse);
137612 sqlite3VdbeAddOp3(v, OP_OpenPseudo, sortPTab, sortOut, nCol);
137613 sqlite3VdbeAddOp2(v, OP_SorterSort, pAggInfo->sortingIdx, addrEnd);
@@ -137411,10 +137681,11 @@
137681 */
137682 if( groupBySort ){
137683 sqlite3VdbeAddOp2(v, OP_SorterNext, pAggInfo->sortingIdx,addrTopOfLoop);
137684 VdbeCoverage(v);
137685 }else{
137686 SELECTTRACE(1,pParse,p,("WhereEnd\n"));
137687 sqlite3WhereEnd(pWInfo);
137688 sqlite3VdbeChangeToNoop(v, addrSortingIdx);
137689 }
137690
137691 /* Output the final row of result
@@ -137566,15 +137837,17 @@
137837 pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pMinMaxOrderBy,
137838 0, minMaxFlag, 0);
137839 if( pWInfo==0 ){
137840 goto select_end;
137841 }
137842 SELECTTRACE(1,pParse,p,("WhereBegin returns\n"));
137843 updateAccumulator(pParse, regAcc, pAggInfo);
137844 if( regAcc ) sqlite3VdbeAddOp2(v, OP_Integer, 1, regAcc);
137845 if( minMaxFlag ){
137846 sqlite3WhereMinMaxOptEarlyOut(v, pWInfo);
137847 }
137848 SELECTTRACE(1,pParse,p,("WhereEnd\n"));
137849 sqlite3WhereEnd(pWInfo);
137850 finalizeAggFunctions(pParse, pAggInfo);
137851 }
137852
137853 sSort.pOrderBy = 0;
@@ -138199,11 +138472,11 @@
138472 db->aDb[iDb].zDbSName, zName,
138473 pTrig->table, z);
138474 sqlite3DbFree(db, z);
138475 sqlite3ChangeCookie(pParse, iDb);
138476 sqlite3VdbeAddParseSchemaOp(v, iDb,
138477 sqlite3MPrintf(db, "type='trigger' AND name='%q'", zName), 0);
138478 }
138479
138480 if( db->init.busy ){
138481 Trigger *pLink = pTrig;
138482 Hash *pHash = &db->aDb[iDb].pSchema->trigHash;
@@ -141764,11 +142037,11 @@
142037 v = sqlite3GetVdbe(pParse);
142038 sqlite3ChangeCookie(pParse, iDb);
142039
142040 sqlite3VdbeAddOp0(v, OP_Expire);
142041 zWhere = sqlite3MPrintf(db, "name=%Q AND sql=%Q", pTab->zName, zStmt);
142042 sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere, 0);
142043 sqlite3DbFree(db, zStmt);
142044
142045 iReg = ++pParse->nMem;
142046 sqlite3VdbeLoadString(v, iReg, pTab->zName);
142047 sqlite3VdbeAddOp2(v, OP_VCreate, iDb, iReg);
@@ -141935,10 +142208,11 @@
142208 if( zType[i]=='\0' && i>0 ){
142209 assert(zType[i-1]==' ');
142210 zType[i-1] = '\0';
142211 }
142212 pTab->aCol[iCol].colFlags |= COLFLAG_HIDDEN;
142213 pTab->tabFlags |= TF_HasHidden;
142214 oooHidden = TF_OOOHidden;
142215 }else{
142216 pTab->tabFlags |= oooHidden;
142217 }
142218 }
@@ -156754,22 +157028,22 @@
157028 #define sqlite3ParserCTX_PDECL ,Parse *pParse
157029 #define sqlite3ParserCTX_PARAM ,pParse
157030 #define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
157031 #define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
157032 #define YYFALLBACK 1
157033 #define YYNSTATE 573
157034 #define YYNRULE 394
157035 #define YYNRULE_WITH_ACTION 333
157036 #define YYNTOKEN 182
157037 #define YY_MAX_SHIFT 572
157038 #define YY_MIN_SHIFTREDUCE 825
157039 #define YY_MAX_SHIFTREDUCE 1218
157040 #define YY_ERROR_ACTION 1219
157041 #define YY_ACCEPT_ACTION 1220
157042 #define YY_NO_ACTION 1221
157043 #define YY_MIN_REDUCE 1222
157044 #define YY_MAX_REDUCE 1615
157045 /************* End control #defines *******************************************/
157046 #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
157047
157048 /* Define the yytestcase() macro to be a no-op if is not already defined
157049 ** otherwise.
@@ -156834,212 +157108,212 @@
157108 ** yy_default[] Default action for each state.
157109 **
157110 *********** Begin parsing tables **********************************************/
157111 #define YY_ACTTAB_COUNT (2017)
157112 static const YYACTIONTYPE yy_action[] = {
157113 /* 0 */ 566, 1253, 566, 197, 1576, 566, 1256, 566, 116, 113,
157114 /* 10 */ 218, 566, 1263, 566, 488, 395, 116, 113, 218, 407,
157115 /* 20 */ 359, 359, 42, 42, 42, 42, 471, 42, 42, 72,
157116 /* 30 */ 72, 959, 1255, 72, 72, 72, 72, 1500, 1581, 960,
157117 /* 40 */ 9, 889, 252, 123, 124, 114, 1196, 1196, 1035, 1038,
157118 /* 50 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 415, 407,
157119 /* 60 */ 473, 1556, 572, 2, 1224, 1582, 548, 145, 147, 306,
157120 /* 70 */ 548, 138, 548, 1296, 1296, 524, 566, 1193, 1304, 547,
157121 /* 80 */ 523, 513, 167, 123, 124, 114, 1196, 1196, 1035, 1038,
157122 /* 90 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 72, 72,
157123 /* 100 */ 282, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157124 /* 110 */ 117, 441, 274, 274, 274, 274, 446, 1172, 1537, 373,
157125 /* 120 */ 1539, 1172, 372, 1537, 537, 563, 1144, 563, 1144, 407,
157126 /* 130 */ 1078, 249, 215, 1193, 174, 529, 100, 305, 557, 229,
157127 /* 140 */ 441, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157128 /* 150 */ 117, 441, 450, 123, 124, 114, 1196, 1196, 1035, 1038,
157129 /* 160 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 543, 450,
157130 /* 170 */ 449, 445, 1172, 1173, 1174, 397, 1172, 1173, 1174, 125,
157131 /* 180 */ 120, 120, 120, 120, 119, 119, 118, 118, 118, 117,
157132 /* 190 */ 441, 119, 119, 118, 118, 118, 117, 441, 269, 407,
157133 /* 200 */ 1553, 122, 122, 122, 122, 115, 381, 84, 377, 274,
157134 /* 210 */ 274, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157135 /* 220 */ 117, 441, 563, 123, 124, 114, 1196, 1196, 1035, 1038,
157136 /* 230 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 407, 469,
157137 /* 240 */ 1122, 1609, 450, 82, 1609, 462, 331, 81, 120, 120,
157138 /* 250 */ 120, 120, 119, 119, 118, 118, 118, 117, 441, 116,
157139 /* 260 */ 113, 218, 123, 124, 114, 1196, 1196, 1035, 1038, 1028,
157140 /* 270 */ 1028, 121, 121, 122, 122, 122, 122, 566, 544, 1524,
157141 /* 280 */ 880, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157142 /* 290 */ 117, 441, 118, 118, 118, 117, 441, 12, 197, 71,
157143 /* 300 */ 71, 1139, 122, 122, 122, 122, 386, 407, 431, 1172,
157144 /* 310 */ 400, 505, 533, 349, 1139, 166, 314, 1139, 1120, 881,
157145 /* 320 */ 120, 120, 120, 120, 119, 119, 118, 118, 118, 117,
157146 /* 330 */ 441, 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028,
157147 /* 340 */ 121, 121, 122, 122, 122, 122, 1172, 268, 268, 120,
157148 /* 350 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441,
157149 /* 360 */ 563, 380, 1015, 1139, 1172, 1173, 1174, 241, 532, 565,
157150 /* 370 */ 501, 498, 497, 429, 540, 478, 1139, 1532, 1006, 1139,
157151 /* 380 */ 496, 6, 1005, 1396, 504, 1025, 1025, 1036, 1039, 120,
157152 /* 390 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441,
157153 /* 400 */ 428, 1172, 1173, 1174, 1099, 1464, 260, 277, 357, 507,
157154 /* 410 */ 352, 506, 246, 407, 1005, 1005, 1007, 345, 348, 1100,
157155 /* 420 */ 241, 462, 331, 501, 498, 497, 371, 512, 1531, 359,
157156 /* 430 */ 531, 360, 6, 496, 1101, 452, 203, 123, 124, 114,
157157 /* 440 */ 1196, 1196, 1035, 1038, 1028, 1028, 121, 121, 122, 122,
157158 /* 450 */ 122, 122, 522, 422, 1172, 900, 407, 571, 1029, 1224,
157159 /* 460 */ 502, 321, 1274, 995, 306, 901, 138, 188, 1291, 426,
157160 /* 470 */ 1270, 167, 488, 1304, 16, 16, 144, 860, 1291, 1273,
157161 /* 480 */ 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028, 121,
157162 /* 490 */ 121, 122, 122, 122, 122, 120, 120, 120, 120, 119,
157163 /* 500 */ 119, 118, 118, 118, 117, 441, 528, 274, 274, 1172,
157164 /* 510 */ 1173, 1174, 1396, 566, 166, 329, 1499, 1015, 417, 374,
157165 /* 520 */ 563, 488, 318, 1172, 320, 407, 305, 557, 375, 864,
157166 /* 530 */ 182, 216, 860, 1006, 229, 72, 72, 1005, 120, 120,
157167 /* 540 */ 120, 120, 119, 119, 118, 118, 118, 117, 441, 123,
157168 /* 550 */ 124, 114, 1196, 1196, 1035, 1038, 1028, 1028, 121, 121,
157169 /* 560 */ 122, 122, 122, 122, 407, 1463, 445, 1172, 857, 1005,
157170 /* 570 */ 1005, 1007, 301, 1529, 116, 113, 218, 6, 1172, 1173,
157171 /* 580 */ 1174, 183, 423, 116, 113, 218, 1172, 316, 123, 124,
157172 /* 590 */ 114, 1196, 1196, 1035, 1038, 1028, 1028, 121, 121, 122,
157173 /* 600 */ 122, 122, 122, 1469, 319, 946, 471, 120, 120, 120,
157174 /* 610 */ 120, 119, 119, 118, 118, 118, 117, 441, 1172, 211,
157175 /* 620 */ 1469, 1471, 1172, 1173, 1174, 920, 541, 1531, 477, 1172,
157176 /* 630 */ 919, 6, 1172, 407, 925, 438, 437, 1157, 213, 511,
157177 /* 640 */ 32, 1172, 1173, 1174, 280, 5, 120, 120, 120, 120,
157178 /* 650 */ 119, 119, 118, 118, 118, 117, 441, 123, 124, 114,
157179 /* 660 */ 1196, 1196, 1035, 1038, 1028, 1028, 121, 121, 122, 122,
157180 /* 670 */ 122, 122, 407, 1172, 1173, 1174, 1016, 1172, 274, 274,
157181 /* 680 */ 287, 1203, 1172, 1203, 1172, 1173, 1174, 1172, 1173, 1174,
157182 /* 690 */ 566, 563, 167, 1469, 117, 441, 123, 124, 114, 1196,
157183 /* 700 */ 1196, 1035, 1038, 1028, 1028, 121, 121, 122, 122, 122,
157184 /* 710 */ 122, 945, 13, 13, 127, 120, 120, 120, 120, 119,
157185 /* 720 */ 119, 118, 118, 118, 117, 441, 286, 420, 566, 451,
157186 /* 730 */ 566, 1396, 1172, 1173, 1174, 1294, 1294, 1172, 1173, 1174,
157187 /* 740 */ 97, 407, 995, 1611, 393, 1000, 488, 305, 557, 17,
157188 /* 750 */ 72, 72, 72, 72, 120, 120, 120, 120, 119, 119,
157189 /* 760 */ 118, 118, 118, 117, 441, 123, 124, 114, 1196, 1196,
157190 /* 770 */ 1035, 1038, 1028, 1028, 121, 121, 122, 122, 122, 122,
157191 /* 780 */ 407, 1220, 1, 1, 572, 2, 1224, 302, 418, 436,
157192 /* 790 */ 1303, 306, 842, 138, 329, 457, 317, 404, 403, 566,
157193 /* 800 */ 1304, 424, 3, 291, 123, 124, 114, 1196, 1196, 1035,
157194 /* 810 */ 1038, 1028, 1028, 121, 121, 122, 122, 122, 122, 379,
157195 /* 820 */ 566, 13, 13, 120, 120, 120, 120, 119, 119, 118,
157196 /* 830 */ 118, 118, 117, 441, 274, 274, 425, 274, 274, 1172,
157197 /* 840 */ 1308, 359, 13, 13, 1122, 1610, 12, 563, 1610, 407,
157198 /* 850 */ 563, 460, 563, 1172, 560, 560, 560, 427, 439, 439,
157199 /* 860 */ 439, 229, 120, 120, 120, 120, 119, 119, 118, 118,
157200 /* 870 */ 118, 117, 441, 123, 124, 114, 1196, 1196, 1035, 1038,
157201 /* 880 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 146, 197,
157202 /* 890 */ 417, 566, 1058, 445, 1172, 1173, 1174, 417, 471, 438,
157203 /* 900 */ 437, 406, 564, 248, 914, 914, 566, 1200, 1172, 1173,
157204 /* 910 */ 1174, 488, 1202, 72, 72, 493, 1510, 549, 102, 194,
157205 /* 920 */ 1201, 566, 1120, 295, 461, 295, 1302, 252, 72, 72,
157206 /* 930 */ 1456, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157207 /* 940 */ 117, 441, 245, 56, 56, 1203, 566, 1203, 566, 1242,
157208 /* 950 */ 440, 274, 274, 566, 516, 1299, 566, 514, 566, 283,
157209 /* 960 */ 274, 274, 1193, 519, 563, 548, 285, 343, 52, 52,
157210 /* 970 */ 13, 13, 290, 563, 550, 13, 13, 566, 13, 13,
157211 /* 980 */ 13, 13, 551, 274, 274, 294, 1411, 105, 274, 274,
157212 /* 990 */ 191, 274, 274, 192, 1512, 545, 563, 274, 274, 57,
157213 /* 1000 */ 57, 563, 275, 275, 563, 515, 447, 407, 271, 412,
157214 /* 1010 */ 563, 944, 198, 305, 557, 563, 274, 274, 1193, 106,
157215 /* 1020 */ 411, 104, 358, 1550, 1508, 348, 566, 407, 338, 563,
157216 /* 1030 */ 341, 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028,
157217 /* 1040 */ 121, 121, 122, 122, 122, 122, 471, 407, 15, 15,
157218 /* 1050 */ 477, 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028,
157219 /* 1060 */ 121, 121, 122, 122, 122, 122, 1083, 1083, 485, 360,
157220 /* 1070 */ 477, 123, 112, 114, 1196, 1196, 1035, 1038, 1028, 1028,
157221 /* 1080 */ 121, 121, 122, 122, 122, 122, 392, 1216, 309, 120,
157222 /* 1090 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441,
157223 /* 1100 */ 99, 217, 482, 1176, 1410, 566, 479, 433, 543, 120,
157224 /* 1110 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441,
157225 /* 1120 */ 292, 1080, 566, 1396, 566, 1080, 944, 44, 44, 120,
157226 /* 1130 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441,
157227 /* 1140 */ 358, 1550, 539, 1099, 58, 58, 45, 45, 328, 407,
157228 /* 1150 */ 1139, 830, 831, 832, 244, 243, 242, 483, 1100, 1176,
157229 /* 1160 */ 1396, 538, 310, 1139, 1217, 488, 1139, 566, 293, 407,
157230 /* 1170 */ 1150, 1245, 413, 1101, 124, 114, 1196, 1196, 1035, 1038,
157231 /* 1180 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 566, 59,
157232 /* 1190 */ 59, 566, 509, 484, 554, 114, 1196, 1196, 1035, 1038,
157233 /* 1200 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 1530, 336,
157234 /* 1210 */ 60, 60, 6, 61, 61, 392, 1121, 1528, 920, 1525,
157235 /* 1220 */ 1150, 6, 566, 919, 566, 109, 558, 566, 4, 944,
157236 /* 1230 */ 434, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157237 /* 1240 */ 117, 441, 561, 867, 62, 62, 63, 63, 566, 46,
157238 /* 1250 */ 46, 120, 120, 120, 120, 119, 119, 118, 118, 118,
157239 /* 1260 */ 117, 441, 566, 1139, 1527, 442, 1327, 566, 6, 566,
157240 /* 1270 */ 47, 47, 566, 559, 413, 1272, 1139, 555, 142, 1139,
157241 /* 1280 */ 566, 467, 305, 557, 48, 48, 566, 167, 546, 50,
157242 /* 1290 */ 50, 51, 51, 1217, 64, 64, 959, 109, 558, 867,
157243 /* 1300 */ 4, 566, 65, 65, 960, 1015, 566, 140, 66, 66,
157244 /* 1310 */ 566, 107, 107, 566, 561, 852, 205, 566, 108, 217,
157245 /* 1320 */ 442, 568, 567, 14, 14, 1005, 8, 525, 67, 67,
157246 /* 1330 */ 566, 454, 129, 129, 222, 68, 68, 442, 455, 53,
157247 /* 1340 */ 53, 405, 305, 557, 944, 414, 168, 211, 405, 555,
157248 /* 1350 */ 111, 1192, 69, 69, 99, 464, 245, 1005, 1005, 1007,
157249 /* 1360 */ 1008, 27, 468, 535, 566, 405, 566, 313, 534, 273,
157250 /* 1370 */ 215, 852, 405, 566, 85, 202, 566, 1015, 566, 1211,
157251 /* 1380 */ 566, 304, 566, 107, 107, 566, 70, 70, 54, 54,
157252 /* 1390 */ 108, 405, 442, 568, 567, 153, 153, 1005, 154, 154,
157253 /* 1400 */ 77, 77, 55, 55, 73, 73, 1117, 130, 130, 394,
157254 /* 1410 */ 109, 558, 143, 4, 38, 566, 475, 300, 566, 463,
157255 /* 1420 */ 279, 1340, 526, 412, 30, 226, 1077, 561, 1077, 1005,
157256 /* 1430 */ 1005, 1007, 1008, 27, 1555, 1161, 444, 74, 74, 278,
157257 /* 1440 */ 131, 131, 326, 1339, 390, 390, 389, 263, 387, 566,
157258 /* 1450 */ 442, 839, 871, 308, 465, 31, 566, 879, 878, 356,
157259 /* 1460 */ 327, 206, 555, 99, 223, 206, 312, 546, 1544, 355,
157260 /* 1470 */ 997, 132, 132, 251, 311, 456, 535, 288, 128, 128,
157261 /* 1480 */ 1065, 536, 109, 558, 470, 4, 566, 251, 1515, 472,
157262 /* 1490 */ 1015, 566, 251, 276, 566, 332, 107, 107, 99, 561,
157263 /* 1500 */ 1076, 566, 1076, 108, 225, 442, 568, 567, 152, 152,
157264 /* 1510 */ 1005, 476, 158, 151, 151, 160, 136, 136, 494, 886,
157265 /* 1520 */ 887, 247, 442, 135, 135, 346, 322, 566, 99, 1061,
157266 /* 1530 */ 489, 224, 247, 566, 555, 1488, 1065, 1487, 953, 1009,
157267 /* 1540 */ 228, 251, 1005, 1005, 1007, 1008, 27, 480, 535, 133,
157268 /* 1550 */ 133, 566, 333, 534, 1336, 134, 134, 962, 963, 337,
157269 /* 1560 */ 917, 340, 1015, 111, 850, 408, 342, 141, 107, 107,
157270 /* 1570 */ 305, 557, 344, 76, 76, 108, 566, 442, 568, 567,
157271 /* 1580 */ 1161, 444, 1005, 566, 278, 109, 558, 553, 4, 390,
157272 /* 1590 */ 390, 389, 263, 387, 448, 1009, 839, 918, 78, 78,
157273 /* 1600 */ 111, 566, 561, 1287, 566, 75, 75, 1271, 1334, 223,
157274 /* 1610 */ 1569, 312, 351, 361, 1005, 1005, 1007, 1008, 27, 311,
157275 /* 1620 */ 362, 1348, 1395, 43, 43, 442, 49, 49, 1323, 552,
157276 /* 1630 */ 1401, 1252, 1244, 1233, 1232, 1234, 1563, 555, 200, 266,
157277 /* 1640 */ 1320, 391, 11, 364, 221, 366, 368, 1382, 1377, 225,
157278 /* 1650 */ 281, 453, 324, 330, 284, 1387, 474, 158, 208, 370,
157279 /* 1660 */ 160, 1370, 325, 556, 195, 1015, 289, 499, 384, 354,
157280 /* 1670 */ 1270, 107, 107, 924, 1386, 398, 224, 212, 108, 1460,
157281 /* 1680 */ 442, 568, 567, 1459, 1566, 1005, 1211, 255, 1208, 1507,
157282 /* 1690 */ 1505, 109, 558, 416, 4, 196, 207, 204, 170, 219,
157283 /* 1700 */ 80, 84, 180, 1383, 1465, 83, 164, 172, 561, 458,
157284 /* 1710 */ 408, 175, 176, 459, 177, 305, 557, 1005, 1005, 1007,
157285 /* 1720 */ 1008, 27, 35, 178, 492, 231, 396, 97, 1389, 466,
157286 /* 1730 */ 1388, 442, 481, 36, 1391, 184, 399, 90, 235, 448,
157287 /* 1740 */ 1454, 1476, 267, 555, 487, 189, 237, 490, 339, 238,
157288 /* 1750 */ 335, 1235, 239, 401, 508, 1281, 430, 1290, 1289, 101,
157289 /* 1760 */ 558, 1288, 4, 92, 871, 213, 1580, 432, 1331, 527,
157290 /* 1770 */ 96, 1015, 1260, 353, 402, 1579, 561, 107, 107, 1259,
157291 /* 1780 */ 363, 1258, 1578, 1280, 108, 298, 442, 568, 567, 1549,
157292 /* 1790 */ 518, 1005, 299, 521, 253, 1332, 365, 1535, 254, 442,
157293 /* 1800 */ 1534, 435, 546, 10, 126, 378, 1440, 103, 530, 303,
157294 /* 1810 */ 98, 555, 261, 1241, 34, 569, 199, 1313, 1330, 1329,
157295 /* 1820 */ 367, 369, 376, 1005, 1005, 1007, 1008, 27, 1312, 382,
157296 /* 1830 */ 1355, 1354, 383, 1167, 262, 264, 265, 570, 1230, 1015,
157297 /* 1840 */ 155, 1225, 1492, 1493, 1491, 107, 107, 1490, 156, 139,
157298 /* 1850 */ 296, 79, 108, 826, 442, 568, 567, 209, 157, 1005,
157299 /* 1860 */ 443, 278, 201, 210, 307, 220, 390, 390, 389, 263,
157300 /* 1870 */ 387, 137, 315, 839, 409, 1075, 1073, 410, 171, 169,
157301 /* 1880 */ 159, 903, 173, 227, 1192, 230, 223, 323, 312, 1089,
157302 /* 1890 */ 179, 1005, 1005, 1007, 1008, 27, 311, 161, 162, 419,
157303 /* 1900 */ 421, 86, 181, 163, 87, 1092, 232, 88, 1088, 148,
157304 /* 1910 */ 233, 18, 234, 89, 334, 1081, 251, 1205, 486, 236,
157305 /* 1920 */ 186, 37, 841, 355, 491, 240, 225, 869, 187, 503,
157306 /* 1930 */ 185, 495, 91, 19, 158, 347, 20, 160, 93, 350,
157307 /* 1940 */ 500, 882, 297, 149, 94, 165, 510, 95, 1155, 150,
157308 /* 1950 */ 1041, 1125, 39, 224, 40, 517, 1126, 214, 520, 270,
157309 /* 1960 */ 272, 190, 947, 250, 111, 1143, 1141, 1145, 1149, 21,
157310 /* 1970 */ 1129, 33, 542, 1148, 22, 23, 24, 25, 193, 952,
157311 /* 1980 */ 99, 1056, 1042, 1040, 26, 1044, 1098, 408, 7, 1097,
157312 /* 1990 */ 256, 257, 305, 557, 1045, 28, 41, 562, 1010, 851,
157313 /* 2000 */ 110, 29, 913, 385, 388, 258, 259, 1163, 1162, 1571,
157314 /* 2010 */ 1221, 1221, 1221, 1570, 1221, 1221, 448,
157315 };
157316 static const YYCODETYPE yy_lookahead[] = {
157317 /* 0 */ 190, 212, 190, 190, 211, 190, 212, 190, 270, 271,
157318 /* 10 */ 272, 190, 219, 190, 190, 202, 270, 271, 272, 19,
157319 /* 20 */ 190, 190, 212, 213, 212, 213, 190, 212, 213, 212,
@@ -157180,70 +157454,70 @@
157454 /* 1370 */ 253, 115, 250, 190, 147, 148, 190, 99, 190, 60,
157455 /* 1380 */ 190, 240, 190, 105, 106, 190, 212, 213, 212, 213,
157456 /* 1390 */ 112, 250, 114, 115, 116, 212, 213, 119, 212, 213,
157457 /* 1400 */ 212, 213, 212, 213, 212, 213, 23, 212, 213, 26,
157458 /* 1410 */ 19, 20, 22, 22, 24, 190, 19, 251, 190, 127,
157459 /* 1420 */ 98, 190, 114, 113, 22, 24, 151, 36, 153, 151,
157460 /* 1430 */ 152, 153, 154, 155, 0, 1, 2, 212, 213, 5,
157461 /* 1440 */ 212, 213, 150, 190, 10, 11, 12, 13, 14, 190,
157462 /* 1450 */ 59, 17, 124, 131, 127, 53, 190, 118, 119, 119,
157463 /* 1460 */ 23, 140, 71, 26, 30, 140, 32, 143, 312, 129,
157464 /* 1470 */ 23, 212, 213, 26, 40, 190, 85, 150, 212, 213,
157465 /* 1480 */ 59, 90, 19, 20, 23, 22, 190, 26, 190, 23,
157466 /* 1490 */ 99, 190, 26, 22, 190, 23, 105, 106, 26, 36,
157467 /* 1500 */ 151, 190, 153, 112, 70, 114, 115, 116, 212, 213,
157468 /* 1510 */ 119, 114, 78, 212, 213, 81, 212, 213, 23, 7,
157469 /* 1520 */ 8, 26, 59, 212, 213, 23, 190, 190, 26, 23,
157470 /* 1530 */ 284, 97, 26, 190, 71, 190, 115, 190, 23, 59,
157471 /* 1540 */ 139, 26, 151, 152, 153, 154, 155, 190, 85, 212,
157472 /* 1550 */ 213, 190, 190, 90, 190, 212, 213, 83, 84, 190,
157473 /* 1560 */ 23, 190, 99, 26, 23, 131, 190, 26, 105, 106,
157474 /* 1570 */ 136, 137, 190, 212, 213, 112, 190, 114, 115, 116,
157475 /* 1580 */ 1, 2, 119, 190, 5, 19, 20, 232, 22, 10,
157476 /* 1590 */ 11, 12, 13, 14, 160, 115, 17, 23, 212, 213,
157477 /* 1600 */ 26, 190, 36, 190, 190, 212, 213, 190, 190, 30,
157478 /* 1610 */ 139, 32, 190, 190, 151, 152, 153, 154, 155, 40,
157479 /* 1620 */ 190, 190, 190, 212, 213, 59, 212, 213, 190, 190,
157480 /* 1630 */ 190, 190, 190, 190, 190, 190, 190, 71, 238, 283,
157481 /* 1640 */ 251, 188, 239, 251, 293, 251, 251, 267, 263, 70,
157482 /* 1650 */ 241, 255, 289, 241, 255, 267, 289, 78, 210, 255,
157483 /* 1660 */ 81, 263, 242, 276, 245, 99, 242, 216, 241, 215,
157484 /* 1670 */ 221, 105, 106, 107, 267, 267, 97, 225, 112, 215,
157485 /* 1680 */ 114, 115, 116, 215, 193, 119, 60, 139, 38, 197,
157486 /* 1690 */ 197, 19, 20, 197, 22, 245, 239, 148, 293, 293,
157487 /* 1700 */ 290, 149, 22, 268, 279, 290, 43, 230, 36, 18,
157488 /* 1710 */ 131, 233, 233, 197, 233, 136, 137, 151, 152, 153,
157489 /* 1720 */ 154, 155, 266, 233, 18, 196, 242, 147, 268, 242,
157490 /* 1730 */ 268, 59, 197, 266, 230, 230, 242, 156, 196, 160,
157491 /* 1740 */ 242, 286, 197, 71, 62, 22, 196, 217, 197, 196,
157492 /* 1750 */ 285, 197, 196, 217, 113, 223, 64, 214, 214, 19,
157493 /* 1760 */ 20, 214, 22, 22, 124, 163, 220, 111, 257, 142,
157494 /* 1770 */ 113, 99, 214, 214, 217, 220, 36, 105, 106, 216,
157495 /* 1780 */ 256, 214, 214, 223, 112, 278, 114, 115, 116, 306,
157496 /* 1790 */ 217, 119, 278, 217, 197, 257, 256, 311, 91, 59,
157497 /* 1800 */ 311, 82, 143, 22, 146, 197, 273, 156, 144, 275,
157498 /* 1810 */ 145, 71, 25, 200, 26, 199, 244, 246, 257, 257,
157499 /* 1820 */ 256, 256, 245, 151, 152, 153, 154, 155, 246, 243,
157500 /* 1830 */ 261, 261, 242, 13, 191, 191, 6, 189, 189, 99,
157501 /* 1840 */ 203, 189, 209, 209, 209, 105, 106, 209, 203, 218,
157502 /* 1850 */ 218, 209, 112, 4, 114, 115, 116, 210, 203, 119,
157503 /* 1860 */ 3, 5, 22, 210, 161, 15, 10, 11, 12, 13,
157504 /* 1870 */ 14, 16, 137, 17, 299, 23, 23, 299, 149, 296,
157505 /* 1880 */ 128, 20, 140, 24, 26, 142, 30, 16, 32, 1,
157506 /* 1890 */ 140, 151, 152, 153, 154, 155, 40, 128, 128, 61,
157507 /* 1900 */ 37, 53, 149, 128, 53, 114, 34, 53, 1, 5,
157508 /* 1910 */ 139, 22, 113, 53, 159, 68, 26, 75, 41, 139,
157509 /* 1920 */ 113, 24, 20, 129, 19, 123, 70, 59, 22, 96,
157510 /* 1930 */ 68, 67, 22, 22, 78, 23, 22, 81, 22, 24,
157511 /* 1940 */ 67, 28, 67, 23, 147, 37, 22, 26, 23, 23,
157512 /* 1950 */ 23, 23, 22, 97, 22, 24, 23, 139, 24, 23,
157513 /* 1960 */ 23, 22, 141, 34, 26, 86, 88, 75, 75, 34,
157514 /* 1970 */ 23, 22, 24, 93, 34, 34, 34, 34, 26, 114,
157515 /* 1980 */ 26, 23, 23, 23, 34, 23, 23, 131, 44, 23,
157516 /* 1990 */ 26, 22, 136, 137, 11, 22, 22, 26, 23, 23,
157517 /* 2000 */ 22, 22, 133, 23, 15, 139, 139, 1, 1, 139,
157518 /* 2010 */ 313, 313, 313, 139, 313, 313, 160, 313, 313, 313,
157519 /* 2020 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157520 /* 2030 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157521 /* 2040 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157522 /* 2050 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157523 /* 2060 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
@@ -157257,15 +157531,15 @@
157531 /* 2140 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157532 /* 2150 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157533 /* 2160 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157534 /* 2170 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157535 /* 2180 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
157536 /* 2190 */ 313, 313, 313, 313, 313, 313, 182, 182, 182,
157537 };
157538 #define YY_SHIFT_COUNT (572)
157539 #define YY_SHIFT_MIN (0)
157540 #define YY_SHIFT_MAX (2007)
157541 static const unsigned short int yy_shift_ofst[] = {
157542 /* 0 */ 1579, 1434, 1856, 1206, 1206, 1, 1278, 1391, 1463, 1672,
157543 /* 10 */ 1672, 1672, 390, 0, 0, 180, 1008, 1672, 1672, 1672,
157544 /* 20 */ 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672,
157545 /* 30 */ 794, 794, 287, 287, 250, 611, 1, 1, 1, 1,
@@ -157285,48 +157559,48 @@
157559 /* 170 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
157560 /* 180 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
157561 /* 190 */ 573, 1074, 1074, 573, 119, 1187, 1187, 1044, 1044, 1145,
157562 /* 200 */ 1146, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 418, 263,
157563 /* 210 */ 263, 559, 303, 618, 527, 623, 464, 570, 780, 573,
157564 /* 220 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 669,
157565 /* 230 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
157566 /* 240 */ 573, 573, 245, 245, 245, 573, 573, 573, 573, 985,
157567 /* 250 */ 573, 573, 573, 18, 1076, 573, 573, 1131, 573, 573,
157568 /* 260 */ 573, 573, 573, 573, 573, 573, 941, 1092, 770, 903,
157569 /* 270 */ 903, 903, 903, 1203, 770, 770, 1085, 692, 1144, 1319,
157570 /* 280 */ 1168, 1227, 1321, 1308, 1227, 1308, 1397, 593, 1168, 1168,
157571 /* 290 */ 593, 1168, 1321, 1397, 1328, 15, 1310, 1265, 1265, 1265,
157572 /* 300 */ 1308, 1324, 1324, 863, 1325, 492, 1390, 1626, 1626, 1548,
157573 /* 310 */ 1548, 1650, 1650, 1548, 1552, 1549, 1680, 1663, 1691, 1691,
157574 /* 320 */ 1691, 1691, 1548, 1706, 1580, 1549, 1549, 1580, 1680, 1663,
157575 /* 330 */ 1580, 1663, 1580, 1548, 1706, 1581, 1682, 1548, 1706, 1723,
157576 /* 340 */ 1548, 1706, 1548, 1706, 1723, 1641, 1641, 1641, 1692, 1741,
157577 /* 350 */ 1741, 1723, 1641, 1640, 1641, 1692, 1641, 1641, 1602, 1723,
157578 /* 360 */ 1656, 1656, 1723, 1627, 1657, 1627, 1657, 1627, 1657, 1627,
157579 /* 370 */ 1657, 1548, 1707, 1707, 1719, 1719, 1658, 1659, 1781, 1548,
157580 /* 380 */ 1651, 1658, 1665, 1664, 1580, 1787, 1788, 1820, 1820, 1830,
157581 /* 390 */ 1830, 1830, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
157582 /* 400 */ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 339, 445, 1064,
157583 /* 410 */ 1193, 951, 1029, 1256, 1383, 1322, 1402, 1401, 1292, 1327,
157584 /* 420 */ 1437, 727, 1447, 1461, 1466, 1472, 1495, 1502, 1184, 1339,
157585 /* 430 */ 1512, 1340, 1421, 1506, 1515, 1474, 1537, 1275, 1349, 1541,
157586 /* 440 */ 1574, 1480, 1471, 1849, 1857, 1840, 1703, 1850, 1855, 1852,
157587 /* 450 */ 1853, 1735, 1729, 1752, 1858, 1858, 1859, 1742, 1861, 1743,
157588 /* 460 */ 1871, 1888, 1750, 1769, 1858, 1770, 1838, 1863, 1858, 1753,
157589 /* 470 */ 1848, 1851, 1854, 1860, 1775, 1791, 1872, 1771, 1907, 1904,
157590 /* 480 */ 1889, 1799, 1755, 1847, 1890, 1862, 1842, 1877, 1780, 1807,
157591 /* 490 */ 1897, 1902, 1905, 1794, 1802, 1906, 1864, 1910, 1911, 1912,
157592 /* 500 */ 1914, 1873, 1868, 1915, 1833, 1913, 1916, 1875, 1908, 1920,
157593 /* 510 */ 1797, 1924, 1925, 1926, 1927, 1921, 1928, 1930, 1931, 1933,
157594 /* 520 */ 1932, 1934, 1818, 1936, 1937, 1865, 1929, 1939, 1821, 1938,
157595 /* 530 */ 1935, 1940, 1941, 1942, 1878, 1892, 1879, 1944, 1893, 1880,
157596 /* 540 */ 1943, 1947, 1949, 1948, 1952, 1954, 1950, 1958, 1938, 1959,
157597 /* 550 */ 1960, 1962, 1963, 1964, 1966, 1969, 1983, 1973, 1974, 1975,
157598 /* 560 */ 1976, 1978, 1979, 1971, 1869, 1866, 1867, 1870, 1874, 1980,
157599 /* 570 */ 1989, 2006, 2007,
157600 };
157601 #define YY_REDUCE_COUNT (406)
157602 #define YY_REDUCE_MIN (-262)
157603 #define YY_REDUCE_MAX (1655)
157604 static const short yy_reduce_ofst[] = {
157605 /* 0 */ 599, -123, 272, 716, 756, -121, -190, -188, -185, -183,
157606 /* 10 */ -179, -177, -26, 304, 313, -254, -11, 500, 609, 630,
@@ -157348,89 +157622,89 @@
157622 /* 170 */ -187, 328, 700, 707, 239, 282, 331, 556, 721, 438,
157623 /* 180 */ 193, 860, 322, 541, 880, 933, 975, 241, 651, 879,
157624 /* 190 */ 970, 270, 905, 918, 88, 914, 961, 967, 1069, -39,
157625 /* 200 */ 604, 1050, 1091, 1098, 1115, 1122, 1117, 1141, -211, -206,
157626 /* 210 */ -180, -130, -161, 10, 179, 236, 316, 341, 629, 726,
157627 /* 220 */ 804, 816, 834, 898, 972, 1177, 1231, 1253, 1285, 170,
157628 /* 230 */ 1298, 1336, 1345, 1347, 1357, 1362, 1364, 1369, 1371, 1376,
157629 /* 240 */ 1382, 1413, 240, 257, 1053, 1417, 1422, 1423, 1430, 1012,
157630 /* 250 */ 1431, 1432, 1438, 1166, 1156, 1418, 1439, 1355, 1440, 179,
157631 /* 260 */ 1441, 1442, 1443, 1444, 1445, 1446, 1246, 1356, 1400, 1389,
157632 /* 270 */ 1392, 1394, 1395, 1012, 1400, 1400, 1403, 1448, 1453, 1351,
157633 /* 280 */ 1380, 1385, 1409, 1396, 1398, 1399, 1363, 1420, 1388, 1407,
157634 /* 290 */ 1424, 1408, 1412, 1367, 1451, 1452, 1449, 1454, 1464, 1468,
157635 /* 300 */ 1404, 1419, 1450, 1387, 1427, 1457, 1491, 1405, 1406, 1492,
157636 /* 310 */ 1493, 1410, 1415, 1496, 1425, 1435, 1456, 1477, 1478, 1479,
157637 /* 320 */ 1481, 1490, 1516, 1529, 1484, 1460, 1462, 1487, 1467, 1504,
157638 /* 330 */ 1494, 1505, 1498, 1535, 1542, 1455, 1465, 1545, 1550, 1530,
157639 /* 340 */ 1551, 1553, 1554, 1556, 1536, 1543, 1544, 1547, 1532, 1546,
157640 /* 350 */ 1555, 1557, 1558, 1563, 1559, 1560, 1567, 1568, 1483, 1573,
157641 /* 360 */ 1507, 1514, 1576, 1511, 1524, 1538, 1540, 1561, 1564, 1562,
157642 /* 370 */ 1565, 1597, 1486, 1489, 1569, 1570, 1571, 1577, 1533, 1608,
157643 /* 380 */ 1534, 1582, 1572, 1586, 1590, 1613, 1616, 1643, 1644, 1648,
157644 /* 390 */ 1649, 1652, 1575, 1578, 1583, 1637, 1633, 1634, 1635, 1638,
157645 /* 400 */ 1645, 1631, 1632, 1647, 1653, 1642, 1655,
157646 };
157647 static const YYACTIONTYPE yy_default[] = {
157648 /* 0 */ 1615, 1615, 1615, 1449, 1219, 1328, 1219, 1219, 1219, 1449,
157649 /* 10 */ 1449, 1449, 1219, 1358, 1358, 1502, 1250, 1219, 1219, 1219,
157650 /* 20 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1448, 1219, 1219,
157651 /* 30 */ 1219, 1219, 1533, 1533, 1219, 1219, 1219, 1219, 1219, 1219,
157652 /* 40 */ 1219, 1219, 1219, 1367, 1219, 1374, 1219, 1219, 1219, 1219,
157653 /* 50 */ 1219, 1450, 1451, 1219, 1219, 1219, 1501, 1503, 1466, 1381,
157654 /* 60 */ 1380, 1379, 1378, 1484, 1345, 1372, 1365, 1369, 1444, 1445,
157655 /* 70 */ 1443, 1447, 1451, 1450, 1219, 1368, 1415, 1429, 1414, 1219,
157656 /* 80 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157657 /* 90 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157658 /* 100 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157659 /* 110 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157660 /* 120 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1423, 1428,
157661 /* 130 */ 1434, 1427, 1424, 1417, 1416, 1418, 1419, 1219, 1240, 1292,
157662 /* 140 */ 1219, 1219, 1219, 1219, 1521, 1520, 1219, 1219, 1250, 1409,
157663 /* 150 */ 1408, 1420, 1421, 1431, 1430, 1509, 1568, 1567, 1467, 1219,
157664 /* 160 */ 1219, 1219, 1219, 1219, 1219, 1219, 1533, 1219, 1219, 1219,
157665 /* 170 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157666 /* 180 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157667 /* 190 */ 1219, 1533, 1533, 1219, 1250, 1533, 1533, 1246, 1246, 1352,
157668 /* 200 */ 1219, 1516, 1319, 1319, 1319, 1319, 1328, 1319, 1219, 1219,
157669 /* 210 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157670 /* 220 */ 1219, 1219, 1219, 1506, 1504, 1219, 1219, 1219, 1219, 1219,
157671 /* 230 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157672 /* 240 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157673 /* 250 */ 1219, 1219, 1219, 1324, 1219, 1219, 1219, 1219, 1219, 1219,
157674 /* 260 */ 1219, 1219, 1219, 1219, 1219, 1562, 1219, 1479, 1306, 1324,
157675 /* 270 */ 1324, 1324, 1324, 1326, 1307, 1305, 1318, 1251, 1226, 1607,
157676 /* 280 */ 1384, 1373, 1325, 1347, 1373, 1347, 1604, 1371, 1384, 1384,
157677 /* 290 */ 1371, 1384, 1325, 1604, 1267, 1584, 1262, 1358, 1358, 1358,
157678 /* 300 */ 1347, 1352, 1352, 1446, 1325, 1318, 1219, 1607, 1607, 1333,
157679 /* 310 */ 1333, 1606, 1606, 1333, 1467, 1591, 1393, 1295, 1301, 1301,
157680 /* 320 */ 1301, 1301, 1333, 1237, 1371, 1591, 1591, 1371, 1393, 1295,
157681 /* 330 */ 1371, 1295, 1371, 1333, 1237, 1483, 1601, 1333, 1237, 1457,
157682 /* 340 */ 1333, 1237, 1333, 1237, 1457, 1293, 1293, 1293, 1282, 1219,
157683 /* 350 */ 1219, 1457, 1293, 1267, 1293, 1282, 1293, 1293, 1551, 1457,
157684 /* 360 */ 1461, 1461, 1457, 1351, 1346, 1351, 1346, 1351, 1346, 1351,
157685 /* 370 */ 1346, 1333, 1543, 1543, 1361, 1361, 1366, 1352, 1452, 1333,
157686 /* 380 */ 1219, 1366, 1364, 1362, 1371, 1243, 1285, 1565, 1565, 1561,
157687 /* 390 */ 1561, 1561, 1612, 1612, 1516, 1577, 1250, 1250, 1250, 1250,
157688 /* 400 */ 1577, 1269, 1269, 1251, 1251, 1250, 1577, 1219, 1219, 1219,
157689 /* 410 */ 1219, 1219, 1219, 1572, 1219, 1511, 1468, 1337, 1219, 1219,
157690 /* 420 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157691 /* 430 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157692 /* 440 */ 1219, 1219, 1398, 1219, 1222, 1513, 1219, 1219, 1219, 1219,
157693 /* 450 */ 1219, 1219, 1219, 1219, 1375, 1376, 1338, 1219, 1219, 1219,
157694 /* 460 */ 1219, 1219, 1219, 1219, 1390, 1219, 1219, 1219, 1385, 1219,
157695 /* 470 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1603, 1219, 1219,
157696 /* 480 */ 1219, 1219, 1219, 1219, 1482, 1481, 1219, 1219, 1335, 1219,
157697 /* 490 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157698 /* 500 */ 1219, 1219, 1265, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157699 /* 510 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157700 /* 520 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1363,
157701 /* 530 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157702 /* 540 */ 1219, 1219, 1219, 1219, 1548, 1353, 1219, 1219, 1594, 1219,
157703 /* 550 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
157704 /* 560 */ 1219, 1219, 1219, 1588, 1309, 1400, 1219, 1399, 1403, 1219,
157705 /* 570 */ 1231, 1219, 1219,
157706 };
157707 /********** End of lemon-generated parsing tables *****************************/
157708
157709 /* The next table maps tokens (terminal symbols) into fallback tokens.
157710 ** If a construct like the following:
@@ -158324,115 +158598,116 @@
158598 /* 283 */ "cmd ::= REINDEX nm dbnm",
158599 /* 284 */ "cmd ::= ANALYZE",
158600 /* 285 */ "cmd ::= ANALYZE nm dbnm",
158601 /* 286 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
158602 /* 287 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
158603 /* 288 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm",
158604 /* 289 */ "add_column_fullname ::= fullname",
158605 /* 290 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
158606 /* 291 */ "cmd ::= create_vtab",
158607 /* 292 */ "cmd ::= create_vtab LP vtabarglist RP",
158608 /* 293 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
158609 /* 294 */ "vtabarg ::=",
158610 /* 295 */ "vtabargtoken ::= ANY",
158611 /* 296 */ "vtabargtoken ::= lp anylist RP",
158612 /* 297 */ "lp ::= LP",
158613 /* 298 */ "with ::= WITH wqlist",
158614 /* 299 */ "with ::= WITH RECURSIVE wqlist",
158615 /* 300 */ "wqlist ::= nm eidlist_opt AS LP select RP",
158616 /* 301 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP",
158617 /* 302 */ "windowdefn_list ::= windowdefn",
158618 /* 303 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
158619 /* 304 */ "windowdefn ::= nm AS LP window RP",
158620 /* 305 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
158621 /* 306 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
158622 /* 307 */ "window ::= ORDER BY sortlist frame_opt",
158623 /* 308 */ "window ::= nm ORDER BY sortlist frame_opt",
158624 /* 309 */ "window ::= frame_opt",
158625 /* 310 */ "window ::= nm frame_opt",
158626 /* 311 */ "frame_opt ::=",
158627 /* 312 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
158628 /* 313 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
158629 /* 314 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
158630 /* 315 */ "frame_bound_s ::= frame_bound",
158631 /* 316 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
158632 /* 317 */ "frame_bound_e ::= frame_bound",
158633 /* 318 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
158634 /* 319 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
158635 /* 320 */ "frame_bound ::= CURRENT ROW",
158636 /* 321 */ "frame_exclude_opt ::=",
158637 /* 322 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
158638 /* 323 */ "frame_exclude ::= NO OTHERS",
158639 /* 324 */ "frame_exclude ::= CURRENT ROW",
158640 /* 325 */ "frame_exclude ::= GROUP|TIES",
158641 /* 326 */ "window_clause ::= WINDOW windowdefn_list",
158642 /* 327 */ "filter_over ::= filter_clause over_clause",
158643 /* 328 */ "filter_over ::= over_clause",
158644 /* 329 */ "filter_over ::= filter_clause",
158645 /* 330 */ "over_clause ::= OVER LP window RP",
158646 /* 331 */ "over_clause ::= OVER nm",
158647 /* 332 */ "filter_clause ::= FILTER LP WHERE expr RP",
158648 /* 333 */ "input ::= cmdlist",
158649 /* 334 */ "cmdlist ::= cmdlist ecmd",
158650 /* 335 */ "cmdlist ::= ecmd",
158651 /* 336 */ "ecmd ::= SEMI",
158652 /* 337 */ "ecmd ::= cmdx SEMI",
158653 /* 338 */ "ecmd ::= explain cmdx SEMI",
158654 /* 339 */ "trans_opt ::=",
158655 /* 340 */ "trans_opt ::= TRANSACTION",
158656 /* 341 */ "trans_opt ::= TRANSACTION nm",
158657 /* 342 */ "savepoint_opt ::= SAVEPOINT",
158658 /* 343 */ "savepoint_opt ::=",
158659 /* 344 */ "cmd ::= create_table create_table_args",
158660 /* 345 */ "columnlist ::= columnlist COMMA columnname carglist",
158661 /* 346 */ "columnlist ::= columnname carglist",
158662 /* 347 */ "nm ::= ID|INDEXED",
158663 /* 348 */ "nm ::= STRING",
158664 /* 349 */ "nm ::= JOIN_KW",
158665 /* 350 */ "typetoken ::= typename",
158666 /* 351 */ "typename ::= ID|STRING",
158667 /* 352 */ "signed ::= plus_num",
158668 /* 353 */ "signed ::= minus_num",
158669 /* 354 */ "carglist ::= carglist ccons",
158670 /* 355 */ "carglist ::=",
158671 /* 356 */ "ccons ::= NULL onconf",
158672 /* 357 */ "ccons ::= GENERATED ALWAYS AS generated",
158673 /* 358 */ "ccons ::= AS generated",
158674 /* 359 */ "conslist_opt ::= COMMA conslist",
158675 /* 360 */ "conslist ::= conslist tconscomma tcons",
158676 /* 361 */ "conslist ::= tcons",
158677 /* 362 */ "tconscomma ::=",
158678 /* 363 */ "defer_subclause_opt ::= defer_subclause",
158679 /* 364 */ "resolvetype ::= raisetype",
158680 /* 365 */ "selectnowith ::= oneselect",
158681 /* 366 */ "oneselect ::= values",
158682 /* 367 */ "sclp ::= selcollist COMMA",
158683 /* 368 */ "as ::= ID|STRING",
158684 /* 369 */ "returning ::=",
158685 /* 370 */ "expr ::= term",
158686 /* 371 */ "likeop ::= LIKE_KW|MATCH",
158687 /* 372 */ "exprlist ::= nexprlist",
158688 /* 373 */ "nmnum ::= plus_num",
158689 /* 374 */ "nmnum ::= nm",
158690 /* 375 */ "nmnum ::= ON",
158691 /* 376 */ "nmnum ::= DELETE",
158692 /* 377 */ "nmnum ::= DEFAULT",
158693 /* 378 */ "plus_num ::= INTEGER|FLOAT",
158694 /* 379 */ "foreach_clause ::=",
158695 /* 380 */ "foreach_clause ::= FOR EACH ROW",
158696 /* 381 */ "trnm ::= nm",
158697 /* 382 */ "tridxby ::=",
158698 /* 383 */ "database_kw_opt ::= DATABASE",
158699 /* 384 */ "database_kw_opt ::=",
158700 /* 385 */ "kwcolumn_opt ::=",
158701 /* 386 */ "kwcolumn_opt ::= COLUMNKW",
158702 /* 387 */ "vtabarglist ::= vtabarg",
158703 /* 388 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
158704 /* 389 */ "vtabarg ::= vtabarg vtabargtoken",
158705 /* 390 */ "anylist ::=",
158706 /* 391 */ "anylist ::= anylist LP anylist RP",
158707 /* 392 */ "anylist ::= anylist ANY",
158708 /* 393 */ "with ::=",
158709 };
158710 #endif /* NDEBUG */
158711
158712
158713 #if YYSTACKDEPTH<=0
@@ -159225,115 +159500,116 @@
159500 187, /* (283) cmd ::= REINDEX nm dbnm */
159501 187, /* (284) cmd ::= ANALYZE */
159502 187, /* (285) cmd ::= ANALYZE nm dbnm */
159503 187, /* (286) cmd ::= ALTER TABLE fullname RENAME TO nm */
159504 187, /* (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
159505 187, /* (288) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
159506 292, /* (289) add_column_fullname ::= fullname */
159507 187, /* (290) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
159508 187, /* (291) cmd ::= create_vtab */
159509 187, /* (292) cmd ::= create_vtab LP vtabarglist RP */
159510 294, /* (293) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
159511 296, /* (294) vtabarg ::= */
159512 297, /* (295) vtabargtoken ::= ANY */
159513 297, /* (296) vtabargtoken ::= lp anylist RP */
159514 298, /* (297) lp ::= LP */
159515 262, /* (298) with ::= WITH wqlist */
159516 262, /* (299) with ::= WITH RECURSIVE wqlist */
159517 237, /* (300) wqlist ::= nm eidlist_opt AS LP select RP */
159518 237, /* (301) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
159519 300, /* (302) windowdefn_list ::= windowdefn */
159520 300, /* (303) windowdefn_list ::= windowdefn_list COMMA windowdefn */
159521 301, /* (304) windowdefn ::= nm AS LP window RP */
159522 302, /* (305) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
159523 302, /* (306) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
159524 302, /* (307) window ::= ORDER BY sortlist frame_opt */
159525 302, /* (308) window ::= nm ORDER BY sortlist frame_opt */
159526 302, /* (309) window ::= frame_opt */
159527 302, /* (310) window ::= nm frame_opt */
159528 303, /* (311) frame_opt ::= */
159529 303, /* (312) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
159530 303, /* (313) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
159531 307, /* (314) range_or_rows ::= RANGE|ROWS|GROUPS */
159532 309, /* (315) frame_bound_s ::= frame_bound */
159533 309, /* (316) frame_bound_s ::= UNBOUNDED PRECEDING */
159534 310, /* (317) frame_bound_e ::= frame_bound */
159535 310, /* (318) frame_bound_e ::= UNBOUNDED FOLLOWING */
159536 308, /* (319) frame_bound ::= expr PRECEDING|FOLLOWING */
159537 308, /* (320) frame_bound ::= CURRENT ROW */
159538 311, /* (321) frame_exclude_opt ::= */
159539 311, /* (322) frame_exclude_opt ::= EXCLUDE frame_exclude */
159540 312, /* (323) frame_exclude ::= NO OTHERS */
159541 312, /* (324) frame_exclude ::= CURRENT ROW */
159542 312, /* (325) frame_exclude ::= GROUP|TIES */
159543 247, /* (326) window_clause ::= WINDOW windowdefn_list */
159544 269, /* (327) filter_over ::= filter_clause over_clause */
159545 269, /* (328) filter_over ::= over_clause */
159546 269, /* (329) filter_over ::= filter_clause */
159547 306, /* (330) over_clause ::= OVER LP window RP */
159548 306, /* (331) over_clause ::= OVER nm */
159549 305, /* (332) filter_clause ::= FILTER LP WHERE expr RP */
159550 182, /* (333) input ::= cmdlist */
159551 183, /* (334) cmdlist ::= cmdlist ecmd */
159552 183, /* (335) cmdlist ::= ecmd */
159553 184, /* (336) ecmd ::= SEMI */
159554 184, /* (337) ecmd ::= cmdx SEMI */
159555 184, /* (338) ecmd ::= explain cmdx SEMI */
159556 189, /* (339) trans_opt ::= */
159557 189, /* (340) trans_opt ::= TRANSACTION */
159558 189, /* (341) trans_opt ::= TRANSACTION nm */
159559 191, /* (342) savepoint_opt ::= SAVEPOINT */
159560 191, /* (343) savepoint_opt ::= */
159561 187, /* (344) cmd ::= create_table create_table_args */
159562 198, /* (345) columnlist ::= columnlist COMMA columnname carglist */
159563 198, /* (346) columnlist ::= columnname carglist */
159564 190, /* (347) nm ::= ID|INDEXED */
159565 190, /* (348) nm ::= STRING */
159566 190, /* (349) nm ::= JOIN_KW */
159567 204, /* (350) typetoken ::= typename */
159568 205, /* (351) typename ::= ID|STRING */
159569 206, /* (352) signed ::= plus_num */
159570 206, /* (353) signed ::= minus_num */
159571 203, /* (354) carglist ::= carglist ccons */
159572 203, /* (355) carglist ::= */
159573 211, /* (356) ccons ::= NULL onconf */
159574 211, /* (357) ccons ::= GENERATED ALWAYS AS generated */
159575 211, /* (358) ccons ::= AS generated */
159576 199, /* (359) conslist_opt ::= COMMA conslist */
159577 224, /* (360) conslist ::= conslist tconscomma tcons */
159578 224, /* (361) conslist ::= tcons */
159579 225, /* (362) tconscomma ::= */
159580 229, /* (363) defer_subclause_opt ::= defer_subclause */
159581 231, /* (364) resolvetype ::= raisetype */
159582 235, /* (365) selectnowith ::= oneselect */
159583 236, /* (366) oneselect ::= values */
159584 250, /* (367) sclp ::= selcollist COMMA */
159585 251, /* (368) as ::= ID|STRING */
159586 268, /* (369) returning ::= */
159587 213, /* (370) expr ::= term */
159588 270, /* (371) likeop ::= LIKE_KW|MATCH */
159589 258, /* (372) exprlist ::= nexprlist */
159590 280, /* (373) nmnum ::= plus_num */
159591 280, /* (374) nmnum ::= nm */
159592 280, /* (375) nmnum ::= ON */
159593 280, /* (376) nmnum ::= DELETE */
159594 280, /* (377) nmnum ::= DEFAULT */
159595 207, /* (378) plus_num ::= INTEGER|FLOAT */
159596 285, /* (379) foreach_clause ::= */
159597 285, /* (380) foreach_clause ::= FOR EACH ROW */
159598 288, /* (381) trnm ::= nm */
159599 289, /* (382) tridxby ::= */
159600 290, /* (383) database_kw_opt ::= DATABASE */
159601 290, /* (384) database_kw_opt ::= */
159602 293, /* (385) kwcolumn_opt ::= */
159603 293, /* (386) kwcolumn_opt ::= COLUMNKW */
159604 295, /* (387) vtabarglist ::= vtabarg */
159605 295, /* (388) vtabarglist ::= vtabarglist COMMA vtabarg */
159606 296, /* (389) vtabarg ::= vtabarg vtabargtoken */
159607 299, /* (390) anylist ::= */
159608 299, /* (391) anylist ::= anylist LP anylist RP */
159609 299, /* (392) anylist ::= anylist ANY */
159610 262, /* (393) with ::= */
159611 };
159612
159613 /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
159614 ** of symbols on the right-hand side of that rule. */
159615 static const signed char yyRuleInfoNRhs[] = {
@@ -159623,115 +159899,116 @@
159899 -3, /* (283) cmd ::= REINDEX nm dbnm */
159900 -1, /* (284) cmd ::= ANALYZE */
159901 -3, /* (285) cmd ::= ANALYZE nm dbnm */
159902 -6, /* (286) cmd ::= ALTER TABLE fullname RENAME TO nm */
159903 -7, /* (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
159904 -6, /* (288) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
159905 -1, /* (289) add_column_fullname ::= fullname */
159906 -8, /* (290) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
159907 -1, /* (291) cmd ::= create_vtab */
159908 -4, /* (292) cmd ::= create_vtab LP vtabarglist RP */
159909 -8, /* (293) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
159910 0, /* (294) vtabarg ::= */
159911 -1, /* (295) vtabargtoken ::= ANY */
159912 -3, /* (296) vtabargtoken ::= lp anylist RP */
159913 -1, /* (297) lp ::= LP */
159914 -2, /* (298) with ::= WITH wqlist */
159915 -3, /* (299) with ::= WITH RECURSIVE wqlist */
159916 -6, /* (300) wqlist ::= nm eidlist_opt AS LP select RP */
159917 -8, /* (301) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
159918 -1, /* (302) windowdefn_list ::= windowdefn */
159919 -3, /* (303) windowdefn_list ::= windowdefn_list COMMA windowdefn */
159920 -5, /* (304) windowdefn ::= nm AS LP window RP */
159921 -5, /* (305) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
159922 -6, /* (306) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
159923 -4, /* (307) window ::= ORDER BY sortlist frame_opt */
159924 -5, /* (308) window ::= nm ORDER BY sortlist frame_opt */
159925 -1, /* (309) window ::= frame_opt */
159926 -2, /* (310) window ::= nm frame_opt */
159927 0, /* (311) frame_opt ::= */
159928 -3, /* (312) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
159929 -6, /* (313) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
159930 -1, /* (314) range_or_rows ::= RANGE|ROWS|GROUPS */
159931 -1, /* (315) frame_bound_s ::= frame_bound */
159932 -2, /* (316) frame_bound_s ::= UNBOUNDED PRECEDING */
159933 -1, /* (317) frame_bound_e ::= frame_bound */
159934 -2, /* (318) frame_bound_e ::= UNBOUNDED FOLLOWING */
159935 -2, /* (319) frame_bound ::= expr PRECEDING|FOLLOWING */
159936 -2, /* (320) frame_bound ::= CURRENT ROW */
159937 0, /* (321) frame_exclude_opt ::= */
159938 -2, /* (322) frame_exclude_opt ::= EXCLUDE frame_exclude */
159939 -2, /* (323) frame_exclude ::= NO OTHERS */
159940 -2, /* (324) frame_exclude ::= CURRENT ROW */
159941 -1, /* (325) frame_exclude ::= GROUP|TIES */
159942 -2, /* (326) window_clause ::= WINDOW windowdefn_list */
159943 -2, /* (327) filter_over ::= filter_clause over_clause */
159944 -1, /* (328) filter_over ::= over_clause */
159945 -1, /* (329) filter_over ::= filter_clause */
159946 -4, /* (330) over_clause ::= OVER LP window RP */
159947 -2, /* (331) over_clause ::= OVER nm */
159948 -5, /* (332) filter_clause ::= FILTER LP WHERE expr RP */
159949 -1, /* (333) input ::= cmdlist */
159950 -2, /* (334) cmdlist ::= cmdlist ecmd */
159951 -1, /* (335) cmdlist ::= ecmd */
159952 -1, /* (336) ecmd ::= SEMI */
159953 -2, /* (337) ecmd ::= cmdx SEMI */
159954 -3, /* (338) ecmd ::= explain cmdx SEMI */
159955 0, /* (339) trans_opt ::= */
159956 -1, /* (340) trans_opt ::= TRANSACTION */
159957 -2, /* (341) trans_opt ::= TRANSACTION nm */
159958 -1, /* (342) savepoint_opt ::= SAVEPOINT */
159959 0, /* (343) savepoint_opt ::= */
159960 -2, /* (344) cmd ::= create_table create_table_args */
159961 -4, /* (345) columnlist ::= columnlist COMMA columnname carglist */
159962 -2, /* (346) columnlist ::= columnname carglist */
159963 -1, /* (347) nm ::= ID|INDEXED */
159964 -1, /* (348) nm ::= STRING */
159965 -1, /* (349) nm ::= JOIN_KW */
159966 -1, /* (350) typetoken ::= typename */
159967 -1, /* (351) typename ::= ID|STRING */
159968 -1, /* (352) signed ::= plus_num */
159969 -1, /* (353) signed ::= minus_num */
159970 -2, /* (354) carglist ::= carglist ccons */
159971 0, /* (355) carglist ::= */
159972 -2, /* (356) ccons ::= NULL onconf */
159973 -4, /* (357) ccons ::= GENERATED ALWAYS AS generated */
159974 -2, /* (358) ccons ::= AS generated */
159975 -2, /* (359) conslist_opt ::= COMMA conslist */
159976 -3, /* (360) conslist ::= conslist tconscomma tcons */
159977 -1, /* (361) conslist ::= tcons */
159978 0, /* (362) tconscomma ::= */
159979 -1, /* (363) defer_subclause_opt ::= defer_subclause */
159980 -1, /* (364) resolvetype ::= raisetype */
159981 -1, /* (365) selectnowith ::= oneselect */
159982 -1, /* (366) oneselect ::= values */
159983 -2, /* (367) sclp ::= selcollist COMMA */
159984 -1, /* (368) as ::= ID|STRING */
159985 0, /* (369) returning ::= */
159986 -1, /* (370) expr ::= term */
159987 -1, /* (371) likeop ::= LIKE_KW|MATCH */
159988 -1, /* (372) exprlist ::= nexprlist */
159989 -1, /* (373) nmnum ::= plus_num */
159990 -1, /* (374) nmnum ::= nm */
159991 -1, /* (375) nmnum ::= ON */
159992 -1, /* (376) nmnum ::= DELETE */
159993 -1, /* (377) nmnum ::= DEFAULT */
159994 -1, /* (378) plus_num ::= INTEGER|FLOAT */
159995 0, /* (379) foreach_clause ::= */
159996 -3, /* (380) foreach_clause ::= FOR EACH ROW */
159997 -1, /* (381) trnm ::= nm */
159998 0, /* (382) tridxby ::= */
159999 -1, /* (383) database_kw_opt ::= DATABASE */
160000 0, /* (384) database_kw_opt ::= */
160001 0, /* (385) kwcolumn_opt ::= */
160002 -1, /* (386) kwcolumn_opt ::= COLUMNKW */
160003 -1, /* (387) vtabarglist ::= vtabarg */
160004 -3, /* (388) vtabarglist ::= vtabarglist COMMA vtabarg */
160005 -2, /* (389) vtabarg ::= vtabarg vtabargtoken */
160006 0, /* (390) anylist ::= */
160007 -4, /* (391) anylist ::= anylist LP anylist RP */
160008 -2, /* (392) anylist ::= anylist ANY */
160009 0, /* (393) with ::= */
160010 };
160011
160012 static void yy_accept(yyParser*); /* Forward Declaration */
160013
160014 /*
@@ -159787,11 +160064,11 @@
160064 {yymsp[1].minor.yy412 = TK_DEFERRED;}
160065 break;
160066 case 5: /* transtype ::= DEFERRED */
160067 case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
160068 case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
160069 case 314: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==314);
160070 {yymsp[0].minor.yy412 = yymsp[0].major; /*A-overwrites-X*/}
160071 break;
160072 case 8: /* cmd ::= COMMIT|END trans_opt */
160073 case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
160074 {sqlite3EndTransaction(pParse,yymsp[-1].major);}
@@ -160964,167 +161241,172 @@
161241 {
161242 yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
161243 sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
161244 }
161245 break;
161246 case 288: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
161247 {
161248 sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy457, &yymsp[0].minor.yy0);
161249 }
161250 break;
161251 case 289: /* add_column_fullname ::= fullname */
161252 {
161253 disableLookaside(pParse);
161254 sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy457);
161255 }
161256 break;
161257 case 290: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
161258 {
161259 sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy457, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
161260 }
161261 break;
161262 case 291: /* cmd ::= create_vtab */
161263 {sqlite3VtabFinishParse(pParse,0);}
161264 break;
161265 case 292: /* cmd ::= create_vtab LP vtabarglist RP */
161266 {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
161267 break;
161268 case 293: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
161269 {
161270 sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy412);
161271 }
161272 break;
161273 case 294: /* vtabarg ::= */
161274 {sqlite3VtabArgInit(pParse);}
161275 break;
161276 case 295: /* vtabargtoken ::= ANY */
161277 case 296: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==296);
161278 case 297: /* lp ::= LP */ yytestcase(yyruleno==297);
161279 {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
161280 break;
161281 case 298: /* with ::= WITH wqlist */
161282 case 299: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==299);
161283 { sqlite3WithPush(pParse, yymsp[0].minor.yy105, 1); }
161284 break;
161285 case 300: /* wqlist ::= nm eidlist_opt AS LP select RP */
161286 {
161287 yymsp[-5].minor.yy105 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy350, yymsp[-1].minor.yy293); /*A-overwrites-X*/
161288 }
161289 break;
161290 case 301: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
161291 {
161292 yymsp[-7].minor.yy105 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy105, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy350, yymsp[-1].minor.yy293);
161293 }
161294 break;
161295 case 302: /* windowdefn_list ::= windowdefn */
161296 { yylhsminor.yy503 = yymsp[0].minor.yy503; }
161297 yymsp[0].minor.yy503 = yylhsminor.yy503;
161298 break;
161299 case 303: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
161300 {
161301 assert( yymsp[0].minor.yy503!=0 );
161302 sqlite3WindowChain(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy503);
161303 yymsp[0].minor.yy503->pNextWin = yymsp[-2].minor.yy503;
161304 yylhsminor.yy503 = yymsp[0].minor.yy503;
161305 }
161306 yymsp[-2].minor.yy503 = yylhsminor.yy503;
161307 break;
161308 case 304: /* windowdefn ::= nm AS LP window RP */
161309 {
161310 if( ALWAYS(yymsp[-1].minor.yy503) ){
161311 yymsp[-1].minor.yy503->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
161312 }
161313 yylhsminor.yy503 = yymsp[-1].minor.yy503;
161314 }
161315 yymsp[-4].minor.yy503 = yylhsminor.yy503;
161316 break;
161317 case 305: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
161318 {
161319 yymsp[-4].minor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy350, yymsp[-1].minor.yy350, 0);
161320 }
161321 break;
161322 case 306: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
161323 {
161324 yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy350, yymsp[-1].minor.yy350, &yymsp[-5].minor.yy0);
161325 }
161326 yymsp[-5].minor.yy503 = yylhsminor.yy503;
161327 break;
161328 case 307: /* window ::= ORDER BY sortlist frame_opt */
161329 {
161330 yymsp[-3].minor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, yymsp[-1].minor.yy350, 0);
161331 }
161332 break;
161333 case 308: /* window ::= nm ORDER BY sortlist frame_opt */
161334 {
161335 yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, yymsp[-1].minor.yy350, &yymsp[-4].minor.yy0);
161336 }
161337 yymsp[-4].minor.yy503 = yylhsminor.yy503;
161338 break;
161339 case 309: /* window ::= frame_opt */
161340 case 328: /* filter_over ::= over_clause */ yytestcase(yyruleno==328);
161341 {
161342 yylhsminor.yy503 = yymsp[0].minor.yy503;
161343 }
161344 yymsp[0].minor.yy503 = yylhsminor.yy503;
161345 break;
161346 case 310: /* window ::= nm frame_opt */
161347 {
161348 yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, 0, &yymsp[-1].minor.yy0);
161349 }
161350 yymsp[-1].minor.yy503 = yylhsminor.yy503;
161351 break;
161352 case 311: /* frame_opt ::= */
161353 {
161354 yymsp[1].minor.yy503 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
161355 }
161356 break;
161357 case 312: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
161358 {
161359 yylhsminor.yy503 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy412, yymsp[-1].minor.yy341.eType, yymsp[-1].minor.yy341.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy624);
161360 }
161361 yymsp[-2].minor.yy503 = yylhsminor.yy503;
161362 break;
161363 case 313: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
161364 {
161365 yylhsminor.yy503 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy412, yymsp[-3].minor.yy341.eType, yymsp[-3].minor.yy341.pExpr, yymsp[-1].minor.yy341.eType, yymsp[-1].minor.yy341.pExpr, yymsp[0].minor.yy624);
161366 }
161367 yymsp[-5].minor.yy503 = yylhsminor.yy503;
161368 break;
161369 case 315: /* frame_bound_s ::= frame_bound */
161370 case 317: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==317);
161371 {yylhsminor.yy341 = yymsp[0].minor.yy341;}
161372 yymsp[0].minor.yy341 = yylhsminor.yy341;
161373 break;
161374 case 316: /* frame_bound_s ::= UNBOUNDED PRECEDING */
161375 case 318: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==318);
161376 case 320: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==320);
161377 {yylhsminor.yy341.eType = yymsp[-1].major; yylhsminor.yy341.pExpr = 0;}
161378 yymsp[-1].minor.yy341 = yylhsminor.yy341;
161379 break;
161380 case 319: /* frame_bound ::= expr PRECEDING|FOLLOWING */
161381 {yylhsminor.yy341.eType = yymsp[0].major; yylhsminor.yy341.pExpr = yymsp[-1].minor.yy354;}
161382 yymsp[-1].minor.yy341 = yylhsminor.yy341;
161383 break;
161384 case 321: /* frame_exclude_opt ::= */
161385 {yymsp[1].minor.yy624 = 0;}
161386 break;
161387 case 322: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
161388 {yymsp[-1].minor.yy624 = yymsp[0].minor.yy624;}
161389 break;
161390 case 323: /* frame_exclude ::= NO OTHERS */
161391 case 324: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==324);
161392 {yymsp[-1].minor.yy624 = yymsp[-1].major; /*A-overwrites-X*/}
161393 break;
161394 case 325: /* frame_exclude ::= GROUP|TIES */
161395 {yymsp[0].minor.yy624 = yymsp[0].major; /*A-overwrites-X*/}
161396 break;
161397 case 326: /* window_clause ::= WINDOW windowdefn_list */
161398 { yymsp[-1].minor.yy503 = yymsp[0].minor.yy503; }
161399 break;
161400 case 327: /* filter_over ::= filter_clause over_clause */
161401 {
161402 yymsp[0].minor.yy503->pFilter = yymsp[-1].minor.yy354;
161403 yylhsminor.yy503 = yymsp[0].minor.yy503;
161404 }
161405 yymsp[-1].minor.yy503 = yylhsminor.yy503;
161406 break;
161407 case 329: /* filter_over ::= filter_clause */
161408 {
161409 yylhsminor.yy503 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
161410 if( yylhsminor.yy503 ){
161411 yylhsminor.yy503->eFrmType = TK_FILTER;
161412 yylhsminor.yy503->pFilter = yymsp[0].minor.yy354;
@@ -161132,89 +161414,89 @@
161414 sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy354);
161415 }
161416 }
161417 yymsp[0].minor.yy503 = yylhsminor.yy503;
161418 break;
161419 case 330: /* over_clause ::= OVER LP window RP */
161420 {
161421 yymsp[-3].minor.yy503 = yymsp[-1].minor.yy503;
161422 assert( yymsp[-3].minor.yy503!=0 );
161423 }
161424 break;
161425 case 331: /* over_clause ::= OVER nm */
161426 {
161427 yymsp[-1].minor.yy503 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
161428 if( yymsp[-1].minor.yy503 ){
161429 yymsp[-1].minor.yy503->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
161430 }
161431 }
161432 break;
161433 case 332: /* filter_clause ::= FILTER LP WHERE expr RP */
161434 { yymsp[-4].minor.yy354 = yymsp[-1].minor.yy354; }
161435 break;
161436 default:
161437 /* (333) input ::= cmdlist */ yytestcase(yyruleno==333);
161438 /* (334) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==334);
161439 /* (335) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=335);
161440 /* (336) ecmd ::= SEMI */ yytestcase(yyruleno==336);
161441 /* (337) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==337);
161442 /* (338) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=338);
161443 /* (339) trans_opt ::= */ yytestcase(yyruleno==339);
161444 /* (340) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==340);
161445 /* (341) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==341);
161446 /* (342) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==342);
161447 /* (343) savepoint_opt ::= */ yytestcase(yyruleno==343);
161448 /* (344) cmd ::= create_table create_table_args */ yytestcase(yyruleno==344);
161449 /* (345) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==345);
161450 /* (346) columnlist ::= columnname carglist */ yytestcase(yyruleno==346);
161451 /* (347) nm ::= ID|INDEXED */ yytestcase(yyruleno==347);
161452 /* (348) nm ::= STRING */ yytestcase(yyruleno==348);
161453 /* (349) nm ::= JOIN_KW */ yytestcase(yyruleno==349);
161454 /* (350) typetoken ::= typename */ yytestcase(yyruleno==350);
161455 /* (351) typename ::= ID|STRING */ yytestcase(yyruleno==351);
161456 /* (352) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=352);
161457 /* (353) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=353);
161458 /* (354) carglist ::= carglist ccons */ yytestcase(yyruleno==354);
161459 /* (355) carglist ::= */ yytestcase(yyruleno==355);
161460 /* (356) ccons ::= NULL onconf */ yytestcase(yyruleno==356);
161461 /* (357) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==357);
161462 /* (358) ccons ::= AS generated */ yytestcase(yyruleno==358);
161463 /* (359) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==359);
161464 /* (360) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==360);
161465 /* (361) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=361);
161466 /* (362) tconscomma ::= */ yytestcase(yyruleno==362);
161467 /* (363) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=363);
161468 /* (364) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=364);
161469 /* (365) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=365);
161470 /* (366) oneselect ::= values */ yytestcase(yyruleno==366);
161471 /* (367) sclp ::= selcollist COMMA */ yytestcase(yyruleno==367);
161472 /* (368) as ::= ID|STRING */ yytestcase(yyruleno==368);
161473 /* (369) returning ::= */ yytestcase(yyruleno==369);
161474 /* (370) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=370);
161475 /* (371) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==371);
161476 /* (372) exprlist ::= nexprlist */ yytestcase(yyruleno==372);
161477 /* (373) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=373);
161478 /* (374) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=374);
161479 /* (375) nmnum ::= ON */ yytestcase(yyruleno==375);
161480 /* (376) nmnum ::= DELETE */ yytestcase(yyruleno==376);
161481 /* (377) nmnum ::= DEFAULT */ yytestcase(yyruleno==377);
161482 /* (378) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==378);
161483 /* (379) foreach_clause ::= */ yytestcase(yyruleno==379);
161484 /* (380) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==380);
161485 /* (381) trnm ::= nm */ yytestcase(yyruleno==381);
161486 /* (382) tridxby ::= */ yytestcase(yyruleno==382);
161487 /* (383) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==383);
161488 /* (384) database_kw_opt ::= */ yytestcase(yyruleno==384);
161489 /* (385) kwcolumn_opt ::= */ yytestcase(yyruleno==385);
161490 /* (386) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==386);
161491 /* (387) vtabarglist ::= vtabarg */ yytestcase(yyruleno==387);
161492 /* (388) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==388);
161493 /* (389) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==389);
161494 /* (390) anylist ::= */ yytestcase(yyruleno==390);
161495 /* (391) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==391);
161496 /* (392) anylist ::= anylist ANY */ yytestcase(yyruleno==392);
161497 /* (393) with ::= */ yytestcase(yyruleno==393);
161498 break;
161499 /********** End reduce actions ************************************************/
161500 };
161501 assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
161502 yygoto = yyRuleInfoLhs[yyruleno];
@@ -203040,26 +203322,28 @@
203322 #ifdef SQLITE_AMALGAMATION
203323 assert( WAL_CKPT_LOCK==1 );
203324 #endif
203325
203326 assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );
203327 if( pRbu && (
203328 pRbu->eStage==RBU_STAGE_OAL
203329 || pRbu->eStage==RBU_STAGE_MOVE
203330 || pRbu->eStage==RBU_STAGE_DONE
203331 )){
203332 /* Prevent SQLite from taking a shm-lock on the target file when it
203333 ** is supplying heap memory to the upper layer in place of *-shm
203334 ** segments. */
203335 if( ofst==WAL_LOCK_CKPT && n==1 ) rc = SQLITE_BUSY;
203336 }else{
203337 int bCapture = 0;
203338 if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){
203339 bCapture = 1;
203340 }
 
203341 if( bCapture==0 || 0==(flags & SQLITE_SHM_UNLOCK) ){
203342 rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags);
203343 if( bCapture && rc==SQLITE_OK ){
203344 pRbu->mLock |= ((1<<n) - 1) << ofst;
203345 }
203346 }
203347 }
203348
203349 return rc;
@@ -228484,11 +228768,11 @@
228768 int nArg, /* Number of args */
228769 sqlite3_value **apUnused /* Function arguments */
228770 ){
228771 assert( nArg==0 );
228772 UNUSED_PARAM2(nArg, apUnused);
228773 sqlite3_result_text(pCtx, "fts5: 2021-02-17 13:19:22 c46a94a624c2cc6c49ac916a206a913081e1628c24805987cabc75c9057ea36b", -1, SQLITE_TRANSIENT);
228774 }
228775
228776 /*
228777 ** Return true if zName is the extension on one of the shadow tables used
228778 ** by this module.
@@ -233410,12 +233694,12 @@
233694 }
233695 #endif /* SQLITE_CORE */
233696 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
233697
233698 /************** End of stmt.c ************************************************/
233699 #if __LINE__!=233699
233700 #undef SQLITE_SOURCE_ID
233701 #define SQLITE_SOURCE_ID "2021-02-19 14:32:58 c844a331e78949850fde8ed95058cb34f863566944bc9e92e3ae042768f1alt2"
233702 #endif
233703 /* Return the source-id for this library */
233704 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
233705 /************************** End of sqlite3.c ******************************/
233706
+2 -2
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -108,11 +108,11 @@
108108
** be held constant and Z will be incremented or else Y will be incremented
109109
** and Z will be reset to zero.
110110
**
111111
** Since [version 3.6.18] ([dateof:3.6.18]),
112112
** SQLite source code has been stored in the
113
-** <a href="http://fossil-scm.org/">Fossil configuration management
113
+** <a href="http://www.fossil-scm.org/">Fossil configuration management
114114
** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
115115
** a string which identifies a particular check-in of SQLite
116116
** within its configuration management system. ^The SQLITE_SOURCE_ID
117117
** string contains the date and time of the check-in (UTC) and a SHA1
118118
** or SHA3-256 hash of the entire source tree. If the source code has
@@ -123,11 +123,11 @@
123123
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124124
** [sqlite_version()] and [sqlite_source_id()].
125125
*/
126126
#define SQLITE_VERSION "3.35.0"
127127
#define SQLITE_VERSION_NUMBER 3035000
128
-#define SQLITE_SOURCE_ID "2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398f17d"
128
+#define SQLITE_SOURCE_ID "2021-02-19 14:32:58 c844a331e78949850fde8ed95058cb34f863566944bc9e92e3ae042768f130e1"
129129
130130
/*
131131
** CAPI3REF: Run-Time Library Version Numbers
132132
** KEYWORDS: sqlite3_version sqlite3_sourceid
133133
**
134134
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -108,11 +108,11 @@
108 ** be held constant and Z will be incremented or else Y will be incremented
109 ** and Z will be reset to zero.
110 **
111 ** Since [version 3.6.18] ([dateof:3.6.18]),
112 ** SQLite source code has been stored in the
113 ** <a href="http://fossil-scm.org/">Fossil configuration management
114 ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
115 ** a string which identifies a particular check-in of SQLite
116 ** within its configuration management system. ^The SQLITE_SOURCE_ID
117 ** string contains the date and time of the check-in (UTC) and a SHA1
118 ** or SHA3-256 hash of the entire source tree. If the source code has
@@ -123,11 +123,11 @@
123 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124 ** [sqlite_version()] and [sqlite_source_id()].
125 */
126 #define SQLITE_VERSION "3.35.0"
127 #define SQLITE_VERSION_NUMBER 3035000
128 #define SQLITE_SOURCE_ID "2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398f17d"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
134
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -108,11 +108,11 @@
108 ** be held constant and Z will be incremented or else Y will be incremented
109 ** and Z will be reset to zero.
110 **
111 ** Since [version 3.6.18] ([dateof:3.6.18]),
112 ** SQLite source code has been stored in the
113 ** <a href="http://www.fossil-scm.org/">Fossil configuration management
114 ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
115 ** a string which identifies a particular check-in of SQLite
116 ** within its configuration management system. ^The SQLITE_SOURCE_ID
117 ** string contains the date and time of the check-in (UTC) and a SHA1
118 ** or SHA3-256 hash of the entire source tree. If the source code has
@@ -123,11 +123,11 @@
123 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124 ** [sqlite_version()] and [sqlite_source_id()].
125 */
126 #define SQLITE_VERSION "3.35.0"
127 #define SQLITE_VERSION_NUMBER 3035000
128 #define SQLITE_SOURCE_ID "2021-02-19 14:32:58 c844a331e78949850fde8ed95058cb34f863566944bc9e92e3ae042768f130e1"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
134

Keyboard Shortcuts

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