Fossil SCM

Update the built-in SQLite to the latest 3.48.0 alpha - mostly to get rid of the #line macros in sqlite3.c that were somehow introduced in the previous update.

drh 2024-11-15 13:51 trunk
Commit 5493cc7bb598466e6f9a42d4f82a96b9ab12d95e7b6a9b95c2003b04a9cb11f6
3 files changed +162 -25 +56 -862 +12 -2
+162 -25
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -457,14 +457,24 @@
457457
** that into UTF-8. Otherwise, non-ASCII characters all get translated
458458
** into '?'.
459459
*/
460460
wchar_t *b1 = sqlite3_malloc( sz*sizeof(wchar_t) );
461461
if( b1==0 ) return 0;
462
- _setmode(_fileno(in), IsConsole(in) ? _O_WTEXT : _O_U8TEXT);
463
- if( fgetws(b1, sz/4, in)==0 ){
464
- sqlite3_free(b1);
465
- return 0;
462
+#ifndef SQLITE_USE_STDIO_FOR_CONSOLE
463
+ DWORD nRead = 0;
464
+ if( IsConsole(in)
465
+ && ReadConsoleW(GetStdHandle(STD_INPUT_HANDLE), b1, sz, &nRead, 0)
466
+ ){
467
+ b1[nRead] = 0;
468
+ }else
469
+#endif
470
+ {
471
+ _setmode(_fileno(in), IsConsole(in) ? _O_WTEXT : _O_U8TEXT);
472
+ if( fgetws(b1, sz/4, in)==0 ){
473
+ sqlite3_free(b1);
474
+ return 0;
475
+ }
466476
}
467477
WideCharToMultiByte(CP_UTF8, 0, b1, -1, buf, sz, 0, 0);
468478
sqlite3_free(b1);
469479
return buf;
470480
}else{
@@ -516,24 +526,37 @@
516526
if( !UseWtextForOutput(out) ){
517527
/* Writing to a file or other destination, just write bytes without
518528
** any translation. */
519529
return fputs(z, out);
520530
}else{
521
- /* When writing to the command-prompt in Windows, it is necessary
522
- ** to use O_U8TEXT to render Unicode U+0080 and greater. Go ahead
523
- ** use O_U8TEXT for everything in text mode.
531
+ /* One must use UTF16 in order to get unicode support when writing
532
+ ** to the console on Windows.
524533
*/
525534
int sz = (int)strlen(z);
526535
wchar_t *b1 = sqlite3_malloc( (sz+1)*sizeof(wchar_t) );
527536
if( b1==0 ) return 0;
528537
sz = MultiByteToWideChar(CP_UTF8, 0, z, sz, b1, sz);
529538
b1[sz] = 0;
530
- _setmode(_fileno(out), _O_U8TEXT);
531
- if( UseBinaryWText(out) ){
532
- piecemealOutput(b1, sz, out);
533
- }else{
534
- fputws(b1, out);
539
+
540
+#ifndef SQLITE_STDIO_FOR_CONSOLE
541
+ DWORD nWr = 0;
542
+ if( IsConsole(out)
543
+ && WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE),b1,sz,&nWr,0)
544
+ ){
545
+ /* If writing to the console, then the WriteConsoleW() is all we
546
+ ** need to do. */
547
+ }else
548
+#endif
549
+ {
550
+ /* For non-console I/O, or if SQLITE_USE_STDIO_FOR_CONSOLE is defined
551
+ ** then write using the standard library. */
552
+ _setmode(_fileno(out), _O_U8TEXT);
553
+ if( UseBinaryWText(out) ){
554
+ piecemealOutput(b1, sz, out);
555
+ }else{
556
+ fputws(b1, out);
557
+ }
535558
}
536559
sqlite3_free(b1);
537560
return 0;
538561
}
539562
}
@@ -16757,10 +16780,20 @@
1675716780
1675816781
/*
1675916782
** Shared-memory operations.
1676016783
*/
1676116784
static int vfstraceShmLock(sqlite3_file *pFile, int ofst, int n, int flags){
16785
+ static const char *azLockName[] = {
16786
+ "WRITE",
16787
+ "CKPT",
16788
+ "RECOVER",
16789
+ "READ0",
16790
+ "READ1",
16791
+ "READ2",
16792
+ "READ3",
16793
+ "READ4",
16794
+ };
1676216795
vfstrace_file *p = (vfstrace_file *)pFile;
1676316796
vfstrace_info *pInfo = p->pInfo;
1676416797
int rc;
1676516798
char zLck[100];
1676616799
int i = 0;
@@ -16770,12 +16803,19 @@
1677016803
if( flags & SQLITE_SHM_SHARED ) strappend(zLck, &i, "|SHARED");
1677116804
if( flags & SQLITE_SHM_EXCLUSIVE ) strappend(zLck, &i, "|EXCLUSIVE");
1677216805
if( flags & ~(0xf) ){
1677316806
sqlite3_snprintf(sizeof(zLck)-i, &zLck[i], "|0x%x", flags);
1677416807
}
16775
- vfstrace_printf(pInfo, "%s.xShmLock(%s,ofst=%d,n=%d,%s)",
16776
- pInfo->zVfsName, p->zFName, ofst, n, &zLck[1]);
16808
+ if( ofst>=0 && ofst<sizeof(azLockName)/sizeof(azLockName[0]) ){
16809
+ vfstrace_printf(pInfo, "%s.xShmLock(%s,ofst=%d(%s),n=%d,%s)",
16810
+ pInfo->zVfsName, p->zFName, ofst, azLockName[ofst],
16811
+ n, &zLck[1]);
16812
+ }else{
16813
+ vfstrace_printf(pInfo, "%s.xShmLock(%s,ofst=5d,n=%d,%s)",
16814
+ pInfo->zVfsName, p->zFName, ofst,
16815
+ n, &zLck[1]);
16816
+ }
1677716817
rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags);
1677816818
vfstrace_print_errcode(pInfo, " -> %s\n", rc);
1677916819
return rc;
1678016820
}
1678116821
static int vfstraceShmMap(
@@ -20231,10 +20271,12 @@
2023120271
apVal[iField] = sqlite3_value_dup( pVal );
2023220272
if( apVal[iField]==0 ){
2023320273
recoverError(p, SQLITE_NOMEM, 0);
2023420274
}
2023520275
p1->nVal = iField+1;
20276
+ }else if( pTab->nCol==0 ){
20277
+ p1->nVal = pTab->nCol;
2023620278
}
2023720279
p1->iPrevCell = iCell;
2023820280
p1->iPrevPage = iPage;
2023920281
}
2024020282
}else{
@@ -22010,11 +22052,11 @@
2201022052
2201122053
/*
2201222054
** Output the given string as quoted according to JSON quoting rules.
2201322055
*/
2201422056
static void output_json_string(FILE *out, const char *z, i64 n){
22015
- char c;
22057
+ unsigned char c;
2201622058
static const char *zq = "\"";
2201722059
static long ctrlMask = ~0L;
2201822060
static const char *zDQBS = "\"\\";
2201922061
const char *pcLimit;
2202022062
char ace[3] = "\\?";
@@ -22030,11 +22072,11 @@
2203022072
if( pcEnd > z ){
2203122073
sqlite3_fprintf(out, "%.*s", (int)(pcEnd-z), z);
2203222074
z = pcEnd;
2203322075
}
2203422076
if( z >= pcLimit ) break;
22035
- c = *(z++);
22077
+ c = (unsigned char)*(z++);
2203622078
switch( c ){
2203722079
case '"': case '\\':
2203822080
cbsSay = (char)c;
2203922081
break;
2204022082
case '\b': cbsSay = 'b'; break;
@@ -22045,11 +22087,11 @@
2204522087
default: cbsSay = 0; break;
2204622088
}
2204722089
if( cbsSay ){
2204822090
ace[1] = cbsSay;
2204922091
sqlite3_fputs(ace, out);
22050
- }else if( c<=0x1f || c==0x7f ){
22092
+ }else if( c<=0x1f || c>=0x7f ){
2205122093
sqlite3_fprintf(out, "\\u%04x", c);
2205222094
}else{
2205322095
ace[1] = (char)c;
2205422096
sqlite3_fputs(ace+1, out);
2205522097
}
@@ -24787,13 +24829,13 @@
2478724829
if( rc ){
2478824830
sqlite3_fprintf(p->out, "/****** ERROR: %s ******/\n", zErr);
2478924831
}else{
2479024832
rc = SQLITE_CORRUPT;
2479124833
}
24792
- sqlite3_free(zErr);
2479324834
free(zQ2);
2479424835
}
24836
+ sqlite3_free(zErr);
2479524837
return rc;
2479624838
}
2479724839
2479824840
/*
2479924841
** Text of help messages.
@@ -24852,10 +24894,11 @@
2485224894
".databases List names and files of attached databases",
2485324895
".dbconfig ?op? ?val? List or change sqlite3_db_config() options",
2485424896
#if SQLITE_SHELL_HAVE_RECOVER
2485524897
".dbinfo ?DB? Show status information about the database",
2485624898
#endif
24899
+ ".dbtotxt Hex dump of the database file",
2485724900
".dump ?OBJECTS? Render database content as SQL",
2485824901
" Options:",
2485924902
" --data-only Output only INSERT statements",
2486024903
" --newlines Allow unescaped newline characters in output",
2486124904
" --nosys Omit system tables (ex: \"sqlite_stat1\")",
@@ -26522,10 +26565,105 @@
2652226565
sqlite3_file_control(p->db, zDb, SQLITE_FCNTL_DATA_VERSION, &iDataVersion);
2652326566
sqlite3_fprintf(p->out, "%-20s %u\n", "data version", iDataVersion);
2652426567
return 0;
2652526568
}
2652626569
#endif /* SQLITE_SHELL_HAVE_RECOVER */
26570
+
26571
+/*
26572
+** Implementation of the ".dbtotxt" command.
26573
+**
26574
+** Return 1 on error, 2 to exit, and 0 otherwise.
26575
+*/
26576
+static int shell_dbtotxt_command(ShellState *p, int nArg, char **azArg){
26577
+ sqlite3_stmt *pStmt = 0;
26578
+ sqlite3_int64 nPage = 0;
26579
+ int pgSz = 0;
26580
+ const char *zFilename;
26581
+ const char *zTail;
26582
+ char *zName = 0;
26583
+ int rc, i, j;
26584
+ unsigned char bShow[256]; /* Characters ok to display */
26585
+
26586
+ memset(bShow, '.', sizeof(bShow));
26587
+ for(i=' '; i<='~'; i++){
26588
+ if( i!='{' && i!='}' && i!='"' && i!='\\' ) bShow[i] = (unsigned char)i;
26589
+ }
26590
+ rc = sqlite3_prepare_v2(p->db, "PRAGMA page_size", -1, &pStmt, 0);
26591
+ if( rc ) goto dbtotxt_error;
26592
+ rc = 0;
26593
+ if( sqlite3_step(pStmt)!=SQLITE_ROW ) goto dbtotxt_error;
26594
+ pgSz = sqlite3_column_int(pStmt, 0);
26595
+ sqlite3_finalize(pStmt);
26596
+ pStmt = 0;
26597
+ if( pgSz<512 || pgSz>65536 || (pgSz&(pgSz-1))!=0 ) goto dbtotxt_error;
26598
+ rc = sqlite3_prepare_v2(p->db, "PRAGMA page_count", -1, &pStmt, 0);
26599
+ if( rc ) goto dbtotxt_error;
26600
+ rc = 0;
26601
+ if( sqlite3_step(pStmt)!=SQLITE_ROW ) goto dbtotxt_error;
26602
+ nPage = sqlite3_column_int64(pStmt, 0);
26603
+ sqlite3_finalize(pStmt);
26604
+ pStmt = 0;
26605
+ if( nPage<1 ) goto dbtotxt_error;
26606
+ rc = sqlite3_prepare_v2(p->db, "PRAGMA databases", -1, &pStmt, 0);
26607
+ if( rc ) goto dbtotxt_error;
26608
+ rc = 0;
26609
+ if( sqlite3_step(pStmt)!=SQLITE_ROW ){
26610
+ zTail = zFilename = "unk.db";
26611
+ }else{
26612
+ zFilename = (const char*)sqlite3_column_text(pStmt, 2);
26613
+ if( zFilename==0 || zFilename[0]==0 ) zFilename = "unk.db";
26614
+ zTail = strrchr(zFilename, '/');
26615
+#if defined(_WIN32)
26616
+ if( zTail==0 ) zTail = strrchr(zFilename, '\\');
26617
+#endif
26618
+ if( zTail ) zFilename = zTail;
26619
+ }
26620
+ zName = strdup(zTail);
26621
+ shell_check_oom(zName);
26622
+ sqlite3_fprintf(p->out, "| size %lld pagesize %d filename %s\n",
26623
+ nPage*pgSz, pgSz, zName);
26624
+ sqlite3_finalize(pStmt);
26625
+ pStmt = 0;
26626
+ rc = sqlite3_prepare_v2(p->db,
26627
+ "SELECT pgno, data FROM sqlite_dbpage ORDER BY pgno", -1, &pStmt, 0);
26628
+ if( rc ) goto dbtotxt_error;
26629
+ rc = 0;
26630
+ while( sqlite3_step(pStmt)==SQLITE_ROW ){
26631
+ sqlite3_int64 pgno = sqlite3_column_int64(pStmt, 0);
26632
+ const u8 *aData = sqlite3_column_blob(pStmt, 1);
26633
+ int seenPageLabel = 0;
26634
+ for(i=0; i<pgSz; i+=16){
26635
+ const u8 *aLine = aData+i;
26636
+ for(j=0; j<16 && aLine[j]==0; j++){}
26637
+ if( j==16 ) continue;
26638
+ if( !seenPageLabel ){
26639
+ sqlite3_fprintf(p->out, "| page %lld offset %lld\n", pgno, pgno*pgSz);
26640
+ seenPageLabel = 1;
26641
+ }
26642
+ sqlite3_fprintf(p->out, "| %5d:", i);
26643
+ for(j=0; j<16; j++) sqlite3_fprintf(p->out, " %02x", aLine[j]);
26644
+ sqlite3_fprintf(p->out, " ");
26645
+ for(j=0; j<16; j++){
26646
+ unsigned char c = (unsigned char)aLine[j];
26647
+ sqlite3_fprintf(p->out, "%c", bShow[c]);
26648
+ }
26649
+ sqlite3_fprintf(p->out, "\n");
26650
+ }
26651
+ }
26652
+ sqlite3_finalize(pStmt);
26653
+ sqlite3_fprintf(p->out, "| end %s\n", zName);
26654
+ free(zName);
26655
+ return 0;
26656
+
26657
+dbtotxt_error:
26658
+ if( rc ){
26659
+ sqlite3_fprintf(stderr, "ERROR: %s\n", sqlite3_errmsg(p->db));
26660
+ }
26661
+ sqlite3_finalize(pStmt);
26662
+ free(zName);
26663
+ return 1;
26664
+}
2652726665
2652826666
/*
2652926667
** Print the given string as an error message.
2653026668
*/
2653126669
static void shellEmitError(const char *zErr){
@@ -28699,10 +28837,14 @@
2869928837
}else{
2870028838
eputz("Usage: .echo on|off\n");
2870128839
rc = 1;
2870228840
}
2870328841
}else
28842
+
28843
+ if( c=='d' && n>=3 && cli_strncmp(azArg[0], "dbtotxt", n)==0 ){
28844
+ rc = shell_dbtotxt_command(p, nArg, azArg);
28845
+ }else
2870428846
2870528847
if( c=='e' && cli_strncmp(azArg[0], "eqp", n)==0 ){
2870628848
if( nArg==2 ){
2870728849
p->autoEQPtest = 0;
2870828850
if( p->autoEQPtrace ){
@@ -33077,19 +33219,14 @@
3307733219
*/
3307833220
if( stdin_is_interactive ){
3307933221
char *zHome;
3308033222
char *zHistory;
3308133223
int nHistory;
33082
-#if CIO_WIN_WC_XLATE
33083
-# define SHELL_CIO_CHAR_SET (stdout_is_console? " (UTF-16 console I/O)" : "")
33084
-#else
33085
-# define SHELL_CIO_CHAR_SET ""
33086
-#endif
3308733224
sqlite3_fprintf(stdout,
33088
- "SQLite version %s %.19s%s\n" /*extra-version-info*/
33225
+ "SQLite version %s %.19s\n" /*extra-version-info*/
3308933226
"Enter \".help\" for usage hints.\n",
33090
- sqlite3_libversion(), sqlite3_sourceid(), SHELL_CIO_CHAR_SET);
33227
+ sqlite3_libversion(), sqlite3_sourceid());
3309133228
if( warnInmemoryDb ){
3309233229
sputz(stdout, "Connected to a ");
3309333230
printBold("transient in-memory database");
3309433231
sputz(stdout, ".\nUse \".open FILENAME\" to reopen on a"
3309533232
" persistent database.\n");
3309633233
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -457,14 +457,24 @@
457 ** that into UTF-8. Otherwise, non-ASCII characters all get translated
458 ** into '?'.
459 */
460 wchar_t *b1 = sqlite3_malloc( sz*sizeof(wchar_t) );
461 if( b1==0 ) return 0;
462 _setmode(_fileno(in), IsConsole(in) ? _O_WTEXT : _O_U8TEXT);
463 if( fgetws(b1, sz/4, in)==0 ){
464 sqlite3_free(b1);
465 return 0;
 
 
 
 
 
 
 
 
 
 
466 }
467 WideCharToMultiByte(CP_UTF8, 0, b1, -1, buf, sz, 0, 0);
468 sqlite3_free(b1);
469 return buf;
470 }else{
@@ -516,24 +526,37 @@
516 if( !UseWtextForOutput(out) ){
517 /* Writing to a file or other destination, just write bytes without
518 ** any translation. */
519 return fputs(z, out);
520 }else{
521 /* When writing to the command-prompt in Windows, it is necessary
522 ** to use O_U8TEXT to render Unicode U+0080 and greater. Go ahead
523 ** use O_U8TEXT for everything in text mode.
524 */
525 int sz = (int)strlen(z);
526 wchar_t *b1 = sqlite3_malloc( (sz+1)*sizeof(wchar_t) );
527 if( b1==0 ) return 0;
528 sz = MultiByteToWideChar(CP_UTF8, 0, z, sz, b1, sz);
529 b1[sz] = 0;
530 _setmode(_fileno(out), _O_U8TEXT);
531 if( UseBinaryWText(out) ){
532 piecemealOutput(b1, sz, out);
533 }else{
534 fputws(b1, out);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535 }
536 sqlite3_free(b1);
537 return 0;
538 }
539 }
@@ -16757,10 +16780,20 @@
16757
16758 /*
16759 ** Shared-memory operations.
16760 */
16761 static int vfstraceShmLock(sqlite3_file *pFile, int ofst, int n, int flags){
 
 
 
 
 
 
 
 
 
 
16762 vfstrace_file *p = (vfstrace_file *)pFile;
16763 vfstrace_info *pInfo = p->pInfo;
16764 int rc;
16765 char zLck[100];
16766 int i = 0;
@@ -16770,12 +16803,19 @@
16770 if( flags & SQLITE_SHM_SHARED ) strappend(zLck, &i, "|SHARED");
16771 if( flags & SQLITE_SHM_EXCLUSIVE ) strappend(zLck, &i, "|EXCLUSIVE");
16772 if( flags & ~(0xf) ){
16773 sqlite3_snprintf(sizeof(zLck)-i, &zLck[i], "|0x%x", flags);
16774 }
16775 vfstrace_printf(pInfo, "%s.xShmLock(%s,ofst=%d,n=%d,%s)",
16776 pInfo->zVfsName, p->zFName, ofst, n, &zLck[1]);
 
 
 
 
 
 
 
16777 rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags);
16778 vfstrace_print_errcode(pInfo, " -> %s\n", rc);
16779 return rc;
16780 }
16781 static int vfstraceShmMap(
@@ -20231,10 +20271,12 @@
20231 apVal[iField] = sqlite3_value_dup( pVal );
20232 if( apVal[iField]==0 ){
20233 recoverError(p, SQLITE_NOMEM, 0);
20234 }
20235 p1->nVal = iField+1;
 
 
20236 }
20237 p1->iPrevCell = iCell;
20238 p1->iPrevPage = iPage;
20239 }
20240 }else{
@@ -22010,11 +22052,11 @@
22010
22011 /*
22012 ** Output the given string as quoted according to JSON quoting rules.
22013 */
22014 static void output_json_string(FILE *out, const char *z, i64 n){
22015 char c;
22016 static const char *zq = "\"";
22017 static long ctrlMask = ~0L;
22018 static const char *zDQBS = "\"\\";
22019 const char *pcLimit;
22020 char ace[3] = "\\?";
@@ -22030,11 +22072,11 @@
22030 if( pcEnd > z ){
22031 sqlite3_fprintf(out, "%.*s", (int)(pcEnd-z), z);
22032 z = pcEnd;
22033 }
22034 if( z >= pcLimit ) break;
22035 c = *(z++);
22036 switch( c ){
22037 case '"': case '\\':
22038 cbsSay = (char)c;
22039 break;
22040 case '\b': cbsSay = 'b'; break;
@@ -22045,11 +22087,11 @@
22045 default: cbsSay = 0; break;
22046 }
22047 if( cbsSay ){
22048 ace[1] = cbsSay;
22049 sqlite3_fputs(ace, out);
22050 }else if( c<=0x1f || c==0x7f ){
22051 sqlite3_fprintf(out, "\\u%04x", c);
22052 }else{
22053 ace[1] = (char)c;
22054 sqlite3_fputs(ace+1, out);
22055 }
@@ -24787,13 +24829,13 @@
24787 if( rc ){
24788 sqlite3_fprintf(p->out, "/****** ERROR: %s ******/\n", zErr);
24789 }else{
24790 rc = SQLITE_CORRUPT;
24791 }
24792 sqlite3_free(zErr);
24793 free(zQ2);
24794 }
 
24795 return rc;
24796 }
24797
24798 /*
24799 ** Text of help messages.
@@ -24852,10 +24894,11 @@
24852 ".databases List names and files of attached databases",
24853 ".dbconfig ?op? ?val? List or change sqlite3_db_config() options",
24854 #if SQLITE_SHELL_HAVE_RECOVER
24855 ".dbinfo ?DB? Show status information about the database",
24856 #endif
 
24857 ".dump ?OBJECTS? Render database content as SQL",
24858 " Options:",
24859 " --data-only Output only INSERT statements",
24860 " --newlines Allow unescaped newline characters in output",
24861 " --nosys Omit system tables (ex: \"sqlite_stat1\")",
@@ -26522,10 +26565,105 @@
26522 sqlite3_file_control(p->db, zDb, SQLITE_FCNTL_DATA_VERSION, &iDataVersion);
26523 sqlite3_fprintf(p->out, "%-20s %u\n", "data version", iDataVersion);
26524 return 0;
26525 }
26526 #endif /* SQLITE_SHELL_HAVE_RECOVER */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26527
26528 /*
26529 ** Print the given string as an error message.
26530 */
26531 static void shellEmitError(const char *zErr){
@@ -28699,10 +28837,14 @@
28699 }else{
28700 eputz("Usage: .echo on|off\n");
28701 rc = 1;
28702 }
28703 }else
 
 
 
 
28704
28705 if( c=='e' && cli_strncmp(azArg[0], "eqp", n)==0 ){
28706 if( nArg==2 ){
28707 p->autoEQPtest = 0;
28708 if( p->autoEQPtrace ){
@@ -33077,19 +33219,14 @@
33077 */
33078 if( stdin_is_interactive ){
33079 char *zHome;
33080 char *zHistory;
33081 int nHistory;
33082 #if CIO_WIN_WC_XLATE
33083 # define SHELL_CIO_CHAR_SET (stdout_is_console? " (UTF-16 console I/O)" : "")
33084 #else
33085 # define SHELL_CIO_CHAR_SET ""
33086 #endif
33087 sqlite3_fprintf(stdout,
33088 "SQLite version %s %.19s%s\n" /*extra-version-info*/
33089 "Enter \".help\" for usage hints.\n",
33090 sqlite3_libversion(), sqlite3_sourceid(), SHELL_CIO_CHAR_SET);
33091 if( warnInmemoryDb ){
33092 sputz(stdout, "Connected to a ");
33093 printBold("transient in-memory database");
33094 sputz(stdout, ".\nUse \".open FILENAME\" to reopen on a"
33095 " persistent database.\n");
33096
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -457,14 +457,24 @@
457 ** that into UTF-8. Otherwise, non-ASCII characters all get translated
458 ** into '?'.
459 */
460 wchar_t *b1 = sqlite3_malloc( sz*sizeof(wchar_t) );
461 if( b1==0 ) return 0;
462 #ifndef SQLITE_USE_STDIO_FOR_CONSOLE
463 DWORD nRead = 0;
464 if( IsConsole(in)
465 && ReadConsoleW(GetStdHandle(STD_INPUT_HANDLE), b1, sz, &nRead, 0)
466 ){
467 b1[nRead] = 0;
468 }else
469 #endif
470 {
471 _setmode(_fileno(in), IsConsole(in) ? _O_WTEXT : _O_U8TEXT);
472 if( fgetws(b1, sz/4, in)==0 ){
473 sqlite3_free(b1);
474 return 0;
475 }
476 }
477 WideCharToMultiByte(CP_UTF8, 0, b1, -1, buf, sz, 0, 0);
478 sqlite3_free(b1);
479 return buf;
480 }else{
@@ -516,24 +526,37 @@
526 if( !UseWtextForOutput(out) ){
527 /* Writing to a file or other destination, just write bytes without
528 ** any translation. */
529 return fputs(z, out);
530 }else{
531 /* One must use UTF16 in order to get unicode support when writing
532 ** to the console on Windows.
 
533 */
534 int sz = (int)strlen(z);
535 wchar_t *b1 = sqlite3_malloc( (sz+1)*sizeof(wchar_t) );
536 if( b1==0 ) return 0;
537 sz = MultiByteToWideChar(CP_UTF8, 0, z, sz, b1, sz);
538 b1[sz] = 0;
539
540 #ifndef SQLITE_STDIO_FOR_CONSOLE
541 DWORD nWr = 0;
542 if( IsConsole(out)
543 && WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE),b1,sz,&nWr,0)
544 ){
545 /* If writing to the console, then the WriteConsoleW() is all we
546 ** need to do. */
547 }else
548 #endif
549 {
550 /* For non-console I/O, or if SQLITE_USE_STDIO_FOR_CONSOLE is defined
551 ** then write using the standard library. */
552 _setmode(_fileno(out), _O_U8TEXT);
553 if( UseBinaryWText(out) ){
554 piecemealOutput(b1, sz, out);
555 }else{
556 fputws(b1, out);
557 }
558 }
559 sqlite3_free(b1);
560 return 0;
561 }
562 }
@@ -16757,10 +16780,20 @@
16780
16781 /*
16782 ** Shared-memory operations.
16783 */
16784 static int vfstraceShmLock(sqlite3_file *pFile, int ofst, int n, int flags){
16785 static const char *azLockName[] = {
16786 "WRITE",
16787 "CKPT",
16788 "RECOVER",
16789 "READ0",
16790 "READ1",
16791 "READ2",
16792 "READ3",
16793 "READ4",
16794 };
16795 vfstrace_file *p = (vfstrace_file *)pFile;
16796 vfstrace_info *pInfo = p->pInfo;
16797 int rc;
16798 char zLck[100];
16799 int i = 0;
@@ -16770,12 +16803,19 @@
16803 if( flags & SQLITE_SHM_SHARED ) strappend(zLck, &i, "|SHARED");
16804 if( flags & SQLITE_SHM_EXCLUSIVE ) strappend(zLck, &i, "|EXCLUSIVE");
16805 if( flags & ~(0xf) ){
16806 sqlite3_snprintf(sizeof(zLck)-i, &zLck[i], "|0x%x", flags);
16807 }
16808 if( ofst>=0 && ofst<sizeof(azLockName)/sizeof(azLockName[0]) ){
16809 vfstrace_printf(pInfo, "%s.xShmLock(%s,ofst=%d(%s),n=%d,%s)",
16810 pInfo->zVfsName, p->zFName, ofst, azLockName[ofst],
16811 n, &zLck[1]);
16812 }else{
16813 vfstrace_printf(pInfo, "%s.xShmLock(%s,ofst=5d,n=%d,%s)",
16814 pInfo->zVfsName, p->zFName, ofst,
16815 n, &zLck[1]);
16816 }
16817 rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags);
16818 vfstrace_print_errcode(pInfo, " -> %s\n", rc);
16819 return rc;
16820 }
16821 static int vfstraceShmMap(
@@ -20231,10 +20271,12 @@
20271 apVal[iField] = sqlite3_value_dup( pVal );
20272 if( apVal[iField]==0 ){
20273 recoverError(p, SQLITE_NOMEM, 0);
20274 }
20275 p1->nVal = iField+1;
20276 }else if( pTab->nCol==0 ){
20277 p1->nVal = pTab->nCol;
20278 }
20279 p1->iPrevCell = iCell;
20280 p1->iPrevPage = iPage;
20281 }
20282 }else{
@@ -22010,11 +22052,11 @@
22052
22053 /*
22054 ** Output the given string as quoted according to JSON quoting rules.
22055 */
22056 static void output_json_string(FILE *out, const char *z, i64 n){
22057 unsigned char c;
22058 static const char *zq = "\"";
22059 static long ctrlMask = ~0L;
22060 static const char *zDQBS = "\"\\";
22061 const char *pcLimit;
22062 char ace[3] = "\\?";
@@ -22030,11 +22072,11 @@
22072 if( pcEnd > z ){
22073 sqlite3_fprintf(out, "%.*s", (int)(pcEnd-z), z);
22074 z = pcEnd;
22075 }
22076 if( z >= pcLimit ) break;
22077 c = (unsigned char)*(z++);
22078 switch( c ){
22079 case '"': case '\\':
22080 cbsSay = (char)c;
22081 break;
22082 case '\b': cbsSay = 'b'; break;
@@ -22045,11 +22087,11 @@
22087 default: cbsSay = 0; break;
22088 }
22089 if( cbsSay ){
22090 ace[1] = cbsSay;
22091 sqlite3_fputs(ace, out);
22092 }else if( c<=0x1f || c>=0x7f ){
22093 sqlite3_fprintf(out, "\\u%04x", c);
22094 }else{
22095 ace[1] = (char)c;
22096 sqlite3_fputs(ace+1, out);
22097 }
@@ -24787,13 +24829,13 @@
24829 if( rc ){
24830 sqlite3_fprintf(p->out, "/****** ERROR: %s ******/\n", zErr);
24831 }else{
24832 rc = SQLITE_CORRUPT;
24833 }
 
24834 free(zQ2);
24835 }
24836 sqlite3_free(zErr);
24837 return rc;
24838 }
24839
24840 /*
24841 ** Text of help messages.
@@ -24852,10 +24894,11 @@
24894 ".databases List names and files of attached databases",
24895 ".dbconfig ?op? ?val? List or change sqlite3_db_config() options",
24896 #if SQLITE_SHELL_HAVE_RECOVER
24897 ".dbinfo ?DB? Show status information about the database",
24898 #endif
24899 ".dbtotxt Hex dump of the database file",
24900 ".dump ?OBJECTS? Render database content as SQL",
24901 " Options:",
24902 " --data-only Output only INSERT statements",
24903 " --newlines Allow unescaped newline characters in output",
24904 " --nosys Omit system tables (ex: \"sqlite_stat1\")",
@@ -26522,10 +26565,105 @@
26565 sqlite3_file_control(p->db, zDb, SQLITE_FCNTL_DATA_VERSION, &iDataVersion);
26566 sqlite3_fprintf(p->out, "%-20s %u\n", "data version", iDataVersion);
26567 return 0;
26568 }
26569 #endif /* SQLITE_SHELL_HAVE_RECOVER */
26570
26571 /*
26572 ** Implementation of the ".dbtotxt" command.
26573 **
26574 ** Return 1 on error, 2 to exit, and 0 otherwise.
26575 */
26576 static int shell_dbtotxt_command(ShellState *p, int nArg, char **azArg){
26577 sqlite3_stmt *pStmt = 0;
26578 sqlite3_int64 nPage = 0;
26579 int pgSz = 0;
26580 const char *zFilename;
26581 const char *zTail;
26582 char *zName = 0;
26583 int rc, i, j;
26584 unsigned char bShow[256]; /* Characters ok to display */
26585
26586 memset(bShow, '.', sizeof(bShow));
26587 for(i=' '; i<='~'; i++){
26588 if( i!='{' && i!='}' && i!='"' && i!='\\' ) bShow[i] = (unsigned char)i;
26589 }
26590 rc = sqlite3_prepare_v2(p->db, "PRAGMA page_size", -1, &pStmt, 0);
26591 if( rc ) goto dbtotxt_error;
26592 rc = 0;
26593 if( sqlite3_step(pStmt)!=SQLITE_ROW ) goto dbtotxt_error;
26594 pgSz = sqlite3_column_int(pStmt, 0);
26595 sqlite3_finalize(pStmt);
26596 pStmt = 0;
26597 if( pgSz<512 || pgSz>65536 || (pgSz&(pgSz-1))!=0 ) goto dbtotxt_error;
26598 rc = sqlite3_prepare_v2(p->db, "PRAGMA page_count", -1, &pStmt, 0);
26599 if( rc ) goto dbtotxt_error;
26600 rc = 0;
26601 if( sqlite3_step(pStmt)!=SQLITE_ROW ) goto dbtotxt_error;
26602 nPage = sqlite3_column_int64(pStmt, 0);
26603 sqlite3_finalize(pStmt);
26604 pStmt = 0;
26605 if( nPage<1 ) goto dbtotxt_error;
26606 rc = sqlite3_prepare_v2(p->db, "PRAGMA databases", -1, &pStmt, 0);
26607 if( rc ) goto dbtotxt_error;
26608 rc = 0;
26609 if( sqlite3_step(pStmt)!=SQLITE_ROW ){
26610 zTail = zFilename = "unk.db";
26611 }else{
26612 zFilename = (const char*)sqlite3_column_text(pStmt, 2);
26613 if( zFilename==0 || zFilename[0]==0 ) zFilename = "unk.db";
26614 zTail = strrchr(zFilename, '/');
26615 #if defined(_WIN32)
26616 if( zTail==0 ) zTail = strrchr(zFilename, '\\');
26617 #endif
26618 if( zTail ) zFilename = zTail;
26619 }
26620 zName = strdup(zTail);
26621 shell_check_oom(zName);
26622 sqlite3_fprintf(p->out, "| size %lld pagesize %d filename %s\n",
26623 nPage*pgSz, pgSz, zName);
26624 sqlite3_finalize(pStmt);
26625 pStmt = 0;
26626 rc = sqlite3_prepare_v2(p->db,
26627 "SELECT pgno, data FROM sqlite_dbpage ORDER BY pgno", -1, &pStmt, 0);
26628 if( rc ) goto dbtotxt_error;
26629 rc = 0;
26630 while( sqlite3_step(pStmt)==SQLITE_ROW ){
26631 sqlite3_int64 pgno = sqlite3_column_int64(pStmt, 0);
26632 const u8 *aData = sqlite3_column_blob(pStmt, 1);
26633 int seenPageLabel = 0;
26634 for(i=0; i<pgSz; i+=16){
26635 const u8 *aLine = aData+i;
26636 for(j=0; j<16 && aLine[j]==0; j++){}
26637 if( j==16 ) continue;
26638 if( !seenPageLabel ){
26639 sqlite3_fprintf(p->out, "| page %lld offset %lld\n", pgno, pgno*pgSz);
26640 seenPageLabel = 1;
26641 }
26642 sqlite3_fprintf(p->out, "| %5d:", i);
26643 for(j=0; j<16; j++) sqlite3_fprintf(p->out, " %02x", aLine[j]);
26644 sqlite3_fprintf(p->out, " ");
26645 for(j=0; j<16; j++){
26646 unsigned char c = (unsigned char)aLine[j];
26647 sqlite3_fprintf(p->out, "%c", bShow[c]);
26648 }
26649 sqlite3_fprintf(p->out, "\n");
26650 }
26651 }
26652 sqlite3_finalize(pStmt);
26653 sqlite3_fprintf(p->out, "| end %s\n", zName);
26654 free(zName);
26655 return 0;
26656
26657 dbtotxt_error:
26658 if( rc ){
26659 sqlite3_fprintf(stderr, "ERROR: %s\n", sqlite3_errmsg(p->db));
26660 }
26661 sqlite3_finalize(pStmt);
26662 free(zName);
26663 return 1;
26664 }
26665
26666 /*
26667 ** Print the given string as an error message.
26668 */
26669 static void shellEmitError(const char *zErr){
@@ -28699,10 +28837,14 @@
28837 }else{
28838 eputz("Usage: .echo on|off\n");
28839 rc = 1;
28840 }
28841 }else
28842
28843 if( c=='d' && n>=3 && cli_strncmp(azArg[0], "dbtotxt", n)==0 ){
28844 rc = shell_dbtotxt_command(p, nArg, azArg);
28845 }else
28846
28847 if( c=='e' && cli_strncmp(azArg[0], "eqp", n)==0 ){
28848 if( nArg==2 ){
28849 p->autoEQPtest = 0;
28850 if( p->autoEQPtrace ){
@@ -33077,19 +33219,14 @@
33219 */
33220 if( stdin_is_interactive ){
33221 char *zHome;
33222 char *zHistory;
33223 int nHistory;
 
 
 
 
 
33224 sqlite3_fprintf(stdout,
33225 "SQLite version %s %.19s\n" /*extra-version-info*/
33226 "Enter \".help\" for usage hints.\n",
33227 sqlite3_libversion(), sqlite3_sourceid());
33228 if( warnInmemoryDb ){
33229 sputz(stdout, "Connected to a ");
33230 printBold("transient in-memory database");
33231 sputz(stdout, ".\nUse \".open FILENAME\" to reopen on a"
33232 " persistent database.\n");
33233
+56 -862
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
1616
** if you want a wrapper to interface SQLite with your choice of programming
1717
** language. The code for the "sqlite3" command-line shell is also in a
1818
** separate file. This file contains only code for the core SQLite library.
1919
**
2020
** The content in this amalgamation comes from Fossil check-in
21
-** 5495b12569c318d5020b4b5a625a392ef8e7 with changes in files:
21
+** 81202d2ab5963fdcf20555b6d0b31cc955ac with changes in files:
2222
**
2323
**
2424
*/
2525
#ifndef SQLITE_AMALGAMATION
2626
#define SQLITE_CORE 1
@@ -27,11 +27,10 @@
2727
#define SQLITE_AMALGAMATION 1
2828
#ifndef SQLITE_PRIVATE
2929
# define SQLITE_PRIVATE static
3030
#endif
3131
/************** Begin file sqliteInt.h ***************************************/
32
-#line 1 "tsrc/sqliteInt.h"
3332
/*
3433
** 2001 September 15
3534
**
3635
** The author disclaims copyright to this source code. In place of
3736
** a legal notice, here is a blessing:
@@ -88,11 +87,10 @@
8887
** compiler warnings due to subsequent content in this file and other files
8988
** that are included by this file.
9089
*/
9190
/************** Include msvc.h in the middle of sqliteInt.h ******************/
9291
/************** Begin file msvc.h ********************************************/
93
-#line 1 "tsrc/msvc.h"
9492
/*
9593
** 2015 January 12
9694
**
9795
** The author disclaims copyright to this source code. In place of
9896
** a legal notice, here is a blessing:
@@ -137,18 +135,16 @@
137135
138136
#endif /* SQLITE_MSVC_H */
139137
140138
/************** End of msvc.h ************************************************/
141139
/************** Continuing where we left off in sqliteInt.h ******************/
142
-#line 60 "tsrc/sqliteInt.h"
143140
144141
/*
145142
** Special setup for VxWorks
146143
*/
147144
/************** Include vxworks.h in the middle of sqliteInt.h ***************/
148145
/************** Begin file vxworks.h *****************************************/
149
-#line 1 "tsrc/vxworks.h"
150146
/*
151147
** 2015-03-02
152148
**
153149
** The author disclaims copyright to this source code. In place of
154150
** a legal notice, here is a blessing:
@@ -180,11 +176,10 @@
180176
#define HAVE_LSTAT 1
181177
#endif /* defined(_WRS_KERNEL) */
182178
183179
/************** End of vxworks.h *********************************************/
184180
/************** Continuing where we left off in sqliteInt.h ******************/
185
-#line 65 "tsrc/sqliteInt.h"
186181
187182
/*
188183
** These #defines should enable >2GB file support on POSIX if the
189184
** underlying operating system supports it. If the OS lacks
190185
** large file support, or if the OS is windows, these should be no-ops.
@@ -320,11 +315,10 @@
320315
** first in QNX. Also, the _USE_32BIT_TIME_T macro must appear first for
321316
** MinGW.
322317
*/
323318
/************** Include sqlite3.h in the middle of sqliteInt.h ***************/
324319
/************** Begin file sqlite3.h *****************************************/
325
-#line 1 "tsrc/sqlite3.h"
326320
/*
327321
** 2001-09-15
328322
**
329323
** The author disclaims copyright to this source code. In place of
330324
** a legal notice, here is a blessing:
@@ -471,11 +465,11 @@
471465
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
472466
** [sqlite_version()] and [sqlite_source_id()].
473467
*/
474468
#define SQLITE_VERSION "3.48.0"
475469
#define SQLITE_VERSION_NUMBER 3048000
476
-#define SQLITE_SOURCE_ID "2024-11-06 12:58:31 5495b12569c318d5020b4b5a625a392ef8e777b81c0200624fbbc2a6b5eddef9"
470
+#define SQLITE_SOURCE_ID "2024-11-14 19:34:28 81202d2ab5963fdcf20555b6d0b31cc955ac27f1cd87656faea5c0611c9a2ee8"
477471
478472
/*
479473
** CAPI3REF: Run-Time Library Version Numbers
480474
** KEYWORDS: sqlite3_version sqlite3_sourceid
481475
**
@@ -1423,10 +1417,15 @@
14231417
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
14241418
** opcode causes the xFileControl method to swap the file handle with the one
14251419
** pointed to by the pArg argument. This capability is used during testing
14261420
** and only needs to be supported when SQLITE_TEST is defined.
14271421
**
1422
+** <li>[[SQLITE_FCNTL_NULL_IO]]
1423
+** The [SQLITE_FCNTL_NULL_IO] opcode sets the low-level file descriptor
1424
+** or file handle for the [sqlite3_file] object such that it will no longer
1425
+** read or write to the database file.
1426
+**
14281427
** <li>[[SQLITE_FCNTL_WAL_BLOCK]]
14291428
** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might
14301429
** be advantageous to block on the next WAL lock if the lock is not immediately
14311430
** available. The WAL subsystem issues this signal during rare
14321431
** circumstances in order to fix a problem with priority inversion.
@@ -1576,10 +1575,11 @@
15761575
#define SQLITE_FCNTL_RESERVE_BYTES 38
15771576
#define SQLITE_FCNTL_CKPT_START 39
15781577
#define SQLITE_FCNTL_EXTERNAL_READER 40
15791578
#define SQLITE_FCNTL_CKSM_FILE 41
15801579
#define SQLITE_FCNTL_RESET_CACHE 42
1580
+#define SQLITE_FCNTL_NULL_IO 43
15811581
15821582
/* deprecated names */
15831583
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
15841584
#define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
15851585
#define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -2954,14 +2954,18 @@
29542954
**
29552955
** ^These functions return the number of rows modified, inserted or
29562956
** deleted by the most recently completed INSERT, UPDATE or DELETE
29572957
** statement on the database connection specified by the only parameter.
29582958
** The two functions are identical except for the type of the return value
2959
-** and that if the number of rows modified by the most recent INSERT, UPDATE
2959
+** and that if the number of rows modified by the most recent INSERT, UPDATE,
29602960
** or DELETE is greater than the maximum value supported by type "int", then
29612961
** the return value of sqlite3_changes() is undefined. ^Executing any other
29622962
** type of SQL statement does not modify the value returned by these functions.
2963
+** For the purposes of this interface, a CREATE TABLE AS SELECT statement
2964
+** does not count as an INSERT, UPDATE or DELETE statement and hence the rows
2965
+** added to the new table by the CREATE TABLE AS SELECT statement are not
2966
+** counted.
29632967
**
29642968
** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
29652969
** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
29662970
** [foreign key actions] or [REPLACE] constraint resolution are not counted.
29672971
**
@@ -13908,11 +13912,10 @@
1390813912
/******** End of fts5.h *********/
1390913913
#endif /* SQLITE3_H */
1391013914
1391113915
/************** End of sqlite3.h *********************************************/
1391213916
/************** Continuing where we left off in sqliteInt.h ******************/
13913
-#line 203 "tsrc/sqliteInt.h"
1391413917
1391513918
/*
1391613919
** Reuse the STATIC_LRU for mutex access to sqlite3_temp_directory.
1391713920
*/
1391813921
#define SQLITE_MUTEX_STATIC_TEMPDIR SQLITE_MUTEX_STATIC_VFS1
@@ -13926,11 +13929,10 @@
1392613929
#define SQLITECONFIG_H 1
1392713930
#endif
1392813931
1392913932
/************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/
1393013933
/************** Begin file sqliteLimit.h *************************************/
13931
-#line 1 "tsrc/sqliteLimit.h"
1393213934
/*
1393313935
** 2007 May 7
1393413936
**
1393513937
** The author disclaims copyright to this source code. In place of
1393613938
** a legal notice, here is a blessing:
@@ -13952,10 +13954,11 @@
1395213954
** to count the size: 2^31-1 or 2147483647.
1395313955
*/
1395413956
#ifndef SQLITE_MAX_LENGTH
1395513957
# define SQLITE_MAX_LENGTH 1000000000
1395613958
#endif
13959
+#define SQLITE_MIN_LENGTH 30 /* Minimum value for the length limit */
1395713960
1395813961
/*
1395913962
** This is the maximum number of
1396013963
**
1396113964
** * Columns in a table
@@ -14140,11 +14143,10 @@
1414014143
# define SQLITE_MAX_TRIGGER_DEPTH 1000
1414114144
#endif
1414214145
1414314146
/************** End of sqliteLimit.h *****************************************/
1414414147
/************** Continuing where we left off in sqliteInt.h ******************/
14145
-#line 219 "tsrc/sqliteInt.h"
1414614148
1414714149
/* Disable nuisance warnings on Borland compilers */
1414814150
#if defined(__BORLANDC__)
1414914151
#pragma warn -rch /* unreachable code */
1415014152
#pragma warn -ccc /* Condition is always true or false */
@@ -14558,11 +14560,10 @@
1455814560
#define likely(X) (X)
1455914561
#define unlikely(X) (X)
1456014562
1456114563
/************** Include hash.h in the middle of sqliteInt.h ******************/
1456214564
/************** Begin file hash.h ********************************************/
14563
-#line 1 "tsrc/hash.h"
1456414565
/*
1456514566
** 2001 September 22
1456614567
**
1456714568
** The author disclaims copyright to this source code. In place of
1456814569
** a legal notice, here is a blessing:
@@ -14658,14 +14659,12 @@
1465814659
1465914660
#endif /* SQLITE_HASH_H */
1466014661
1466114662
/************** End of hash.h ************************************************/
1466214663
/************** Continuing where we left off in sqliteInt.h ******************/
14663
-#line 635 "tsrc/sqliteInt.h"
1466414664
/************** Include parse.h in the middle of sqliteInt.h *****************/
1466514665
/************** Begin file parse.h *******************************************/
14666
-#line 1 "tsrc/parse.h"
1466714666
#define TK_SEMI 1
1466814667
#define TK_EXPLAIN 2
1466914668
#define TK_QUERY 3
1467014669
#define TK_PLAN 4
1467114670
#define TK_BEGIN 5
@@ -14850,11 +14849,10 @@
1485014849
#define TK_SPACE 184
1485114850
#define TK_ILLEGAL 185
1485214851
1485314852
/************** End of parse.h ***********************************************/
1485414853
/************** Continuing where we left off in sqliteInt.h ******************/
14855
-#line 636 "tsrc/sqliteInt.h"
1485614854
#include <stdio.h>
1485714855
#include <stdlib.h>
1485814856
#include <string.h>
1485914857
#include <assert.h>
1486014858
#include <stddef.h>
@@ -15616,11 +15614,10 @@
1561615614
** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
1561715615
** pointer types (i.e. FuncDef) defined above.
1561815616
*/
1561915617
/************** Include os.h in the middle of sqliteInt.h ********************/
1562015618
/************** Begin file os.h **********************************************/
15621
-#line 1 "tsrc/os.h"
1562215619
/*
1562315620
** 2001 September 16
1562415621
**
1562515622
** The author disclaims copyright to this source code. In place of
1562615623
** a legal notice, here is a blessing:
@@ -15645,11 +15642,10 @@
1564515642
** Attempt to automatically detect the operating system and setup the
1564615643
** necessary pre-processor macros for it.
1564715644
*/
1564815645
/************** Include os_setup.h in the middle of os.h *********************/
1564915646
/************** Begin file os_setup.h ****************************************/
15650
-#line 1 "tsrc/os_setup.h"
1565115647
/*
1565215648
** 2013 November 25
1565315649
**
1565415650
** The author disclaims copyright to this source code. In place of
1565515651
** a legal notice, here is a blessing:
@@ -15740,11 +15736,10 @@
1574015736
1574115737
#endif /* SQLITE_OS_SETUP_H */
1574215738
1574315739
/************** End of os_setup.h ********************************************/
1574415740
/************** Continuing where we left off in os.h *************************/
15745
-#line 28 "tsrc/os.h"
1574615741
1574715742
/* If the SET_FULLSYNC macro is not defined above, then make it
1574815743
** a no-op
1574915744
*/
1575015745
#ifndef SET_FULLSYNC
@@ -15942,14 +15937,12 @@
1594215937
1594315938
#endif /* _SQLITE_OS_H_ */
1594415939
1594515940
/************** End of os.h **************************************************/
1594615941
/************** Continuing where we left off in sqliteInt.h ******************/
15947
-#line 1400 "tsrc/sqliteInt.h"
1594815942
/************** Include pager.h in the middle of sqliteInt.h *****************/
1594915943
/************** Begin file pager.h *******************************************/
15950
-#line 1 "tsrc/pager.h"
1595115944
/*
1595215945
** 2001 September 15
1595315946
**
1595415947
** The author disclaims copyright to this source code. In place of
1595515948
** a legal notice, here is a blessing:
@@ -16196,14 +16189,12 @@
1619616189
1619716190
#endif /* SQLITE_PAGER_H */
1619816191
1619916192
/************** End of pager.h ***********************************************/
1620016193
/************** Continuing where we left off in sqliteInt.h ******************/
16201
-#line 1401 "tsrc/sqliteInt.h"
1620216194
/************** Include btree.h in the middle of sqliteInt.h *****************/
1620316195
/************** Begin file btree.h *******************************************/
16204
-#line 1 "tsrc/btree.h"
1620516196
/*
1620616197
** 2001 September 15
1620716198
**
1620816199
** The author disclaims copyright to this source code. In place of
1620916200
** a legal notice, here is a blessing:
@@ -16627,14 +16618,12 @@
1662716618
1662816619
#endif /* SQLITE_BTREE_H */
1662916620
1663016621
/************** End of btree.h ***********************************************/
1663116622
/************** Continuing where we left off in sqliteInt.h ******************/
16632
-#line 1402 "tsrc/sqliteInt.h"
1663316623
/************** Include vdbe.h in the middle of sqliteInt.h ******************/
1663416624
/************** Begin file vdbe.h ********************************************/
16635
-#line 1 "tsrc/vdbe.h"
1663616625
/*
1663716626
** 2001 September 15
1663816627
**
1663916628
** The author disclaims copyright to this source code. In place of
1664016629
** a legal notice, here is a blessing:
@@ -16814,11 +16803,10 @@
1681416803
** The makefile scans the vdbe.c source file and creates the "opcodes.h"
1681516804
** header file that defines a number for each opcode used by the VDBE.
1681616805
*/
1681716806
/************** Include opcodes.h in the middle of vdbe.h ********************/
1681816807
/************** Begin file opcodes.h *****************************************/
16819
-#line 1 "tsrc/opcodes.h"
1682016808
/* Automatically generated. Do not edit */
1682116809
/* See the tool/mkopcodeh.tcl script for details */
1682216810
#define OP_Savepoint 0
1682316811
#define OP_AutoCommit 1
1682416812
#define OP_Transaction 2
@@ -17056,11 +17044,10 @@
1705617044
*/
1705717045
#define SQLITE_MX_JUMP_OPCODE 64 /* Maximum JUMP opcode */
1705817046
1705917047
/************** End of opcodes.h *********************************************/
1706017048
/************** Continuing where we left off in vdbe.h ***********************/
17061
-#line 183 "tsrc/vdbe.h"
1706217049
1706317050
/*
1706417051
** Additional non-public SQLITE_PREPARE_* flags
1706517052
*/
1706617053
#define SQLITE_PREPARE_SAVESQL 0x80 /* Preserve SQL text */
@@ -17306,14 +17293,12 @@
1730617293
1730717294
#endif /* SQLITE_VDBE_H */
1730817295
1730917296
/************** End of vdbe.h ************************************************/
1731017297
/************** Continuing where we left off in sqliteInt.h ******************/
17311
-#line 1403 "tsrc/sqliteInt.h"
1731217298
/************** Include pcache.h in the middle of sqliteInt.h ****************/
1731317299
/************** Begin file pcache.h ******************************************/
17314
-#line 1 "tsrc/pcache.h"
1731517300
/*
1731617301
** 2008 August 05
1731717302
**
1731817303
** The author disclaims copyright to this source code. In place of
1731917304
** a legal notice, here is a blessing:
@@ -17503,14 +17488,12 @@
1750317488
1750417489
#endif /* _PCACHE_H_ */
1750517490
1750617491
/************** End of pcache.h **********************************************/
1750717492
/************** Continuing where we left off in sqliteInt.h ******************/
17508
-#line 1404 "tsrc/sqliteInt.h"
1750917493
/************** Include mutex.h in the middle of sqliteInt.h *****************/
1751017494
/************** Begin file mutex.h *******************************************/
17511
-#line 1 "tsrc/mutex.h"
1751217495
/*
1751317496
** 2007 August 28
1751417497
**
1751517498
** The author disclaims copyright to this source code. In place of
1751617499
** a legal notice, here is a blessing:
@@ -17581,11 +17564,10 @@
1758117564
SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
1758217565
#endif /* defined(SQLITE_MUTEX_OMIT) */
1758317566
1758417567
/************** End of mutex.h ***********************************************/
1758517568
/************** Continuing where we left off in sqliteInt.h ******************/
17586
-#line 1405 "tsrc/sqliteInt.h"
1758717569
1758817570
/* The SQLITE_EXTRA_DURABLE compile-time option used to set the default
1758917571
** synchronous setting to EXTRA. It is no longer supported.
1759017572
*/
1759117573
#ifdef SQLITE_EXTRA_DURABLE
@@ -21982,11 +21964,10 @@
2198221964
2198321965
#endif /* SQLITEINT_H */
2198421966
2198521967
/************** End of sqliteInt.h *******************************************/
2198621968
/************** Begin file os_common.h ***************************************/
21987
-#line 1 "tsrc/os_common.h"
2198821969
/*
2198921970
** 2004 May 22
2199021971
**
2199121972
** The author disclaims copyright to this source code. In place of
2199221973
** a legal notice, here is a blessing:
@@ -22085,11 +22066,10 @@
2208522066
2208622067
#endif /* !defined(_OS_COMMON_H_) */
2208722068
2208822069
/************** End of os_common.h *******************************************/
2208922070
/************** Begin file ctime.c *******************************************/
22090
-#line 1 "tsrc/ctime.c"
2209122071
/* DO NOT EDIT!
2209222072
** This file is automatically generated by the script in the canonical
2209322073
** SQLite source tree at tool/mkctimec.tcl.
2209422074
**
2209522075
** To modify this header, edit any of the various lists in that script
@@ -22885,11 +22865,10 @@
2288522865
2288622866
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
2288722867
2288822868
/************** End of ctime.c ***********************************************/
2288922869
/************** Begin file global.c ******************************************/
22890
-#line 1 "tsrc/global.c"
2289122870
/*
2289222871
** 2008 June 13
2289322872
**
2289422873
** The author disclaims copyright to this source code. In place of
2289522874
** a legal notice, here is a blessing:
@@ -23290,11 +23269,10 @@
2329023269
"TEXT"
2329123270
};
2329223271
2329323272
/************** End of global.c **********************************************/
2329423273
/************** Begin file status.c ******************************************/
23295
-#line 1 "tsrc/status.c"
2329623274
/*
2329723275
** 2008 June 18
2329823276
**
2329923277
** The author disclaims copyright to this source code. In place of
2330023278
** a legal notice, here is a blessing:
@@ -23309,11 +23287,10 @@
2330923287
** functionality.
2331023288
*/
2331123289
/* #include "sqliteInt.h" */
2331223290
/************** Include vdbeInt.h in the middle of status.c ******************/
2331323291
/************** Begin file vdbeInt.h *****************************************/
23314
-#line 1 "tsrc/vdbeInt.h"
2331523292
/*
2331623293
** 2003 September 6
2331723294
**
2331823295
** The author disclaims copyright to this source code. In place of
2331923296
** a legal notice, here is a blessing:
@@ -24046,11 +24023,10 @@
2404624023
2404724024
#endif /* !defined(SQLITE_VDBEINT_H) */
2404824025
2404924026
/************** End of vdbeInt.h *********************************************/
2405024027
/************** Continuing where we left off in status.c *********************/
24051
-#line 18 "tsrc/status.c"
2405224028
2405324029
/*
2405424030
** Variables in which to record status information.
2405524031
*/
2405624032
#if SQLITE_PTRSIZE>4
@@ -24431,11 +24407,10 @@
2443124407
return rc;
2443224408
}
2443324409
2443424410
/************** End of status.c **********************************************/
2443524411
/************** Begin file date.c ********************************************/
24436
-#line 1 "tsrc/date.c"
2443724412
/*
2443824413
** 2003 October 31
2443924414
**
2444024415
** The author disclaims copyright to this source code. In place of
2444124416
** a legal notice, here is a blessing:
@@ -26250,11 +26225,10 @@
2625026225
sqlite3InsertBuiltinFuncs(aDateTimeFuncs, ArraySize(aDateTimeFuncs));
2625126226
}
2625226227
2625326228
/************** End of date.c ************************************************/
2625426229
/************** Begin file os.c **********************************************/
26255
-#line 1 "tsrc/os.c"
2625626230
/*
2625726231
** 2005 November 29
2625826232
**
2625926233
** The author disclaims copyright to this source code. In place of
2626026234
** a legal notice, here is a blessing:
@@ -26701,11 +26675,10 @@
2670126675
return SQLITE_OK;
2670226676
}
2670326677
2670426678
/************** End of os.c **************************************************/
2670526679
/************** Begin file fault.c *******************************************/
26706
-#line 1 "tsrc/fault.c"
2670726680
/*
2670826681
** 2008 Jan 22
2670926682
**
2671026683
** The author disclaims copyright to this source code. In place of
2671126684
** a legal notice, here is a blessing:
@@ -26792,11 +26765,10 @@
2679226765
2679326766
#endif /* #ifndef SQLITE_UNTESTABLE */
2679426767
2679526768
/************** End of fault.c ***********************************************/
2679626769
/************** Begin file mem0.c ********************************************/
26797
-#line 1 "tsrc/mem0.c"
2679826770
/*
2679926771
** 2008 October 28
2680026772
**
2680126773
** The author disclaims copyright to this source code. In place of
2680226774
** a legal notice, here is a blessing:
@@ -26855,11 +26827,10 @@
2685526827
2685626828
#endif /* SQLITE_ZERO_MALLOC */
2685726829
2685826830
/************** End of mem0.c ************************************************/
2685926831
/************** Begin file mem1.c ********************************************/
26860
-#line 1 "tsrc/mem1.c"
2686126832
/*
2686226833
** 2007 August 14
2686326834
**
2686426835
** The author disclaims copyright to this source code. In place of
2686526836
** a legal notice, here is a blessing:
@@ -27150,11 +27121,10 @@
2715027121
2715127122
#endif /* SQLITE_SYSTEM_MALLOC */
2715227123
2715327124
/************** End of mem1.c ************************************************/
2715427125
/************** Begin file mem2.c ********************************************/
27155
-#line 1 "tsrc/mem2.c"
2715627126
/*
2715727127
** 2007 August 15
2715827128
**
2715927129
** The author disclaims copyright to this source code. In place of
2716027130
** a legal notice, here is a blessing:
@@ -27682,11 +27652,10 @@
2768227652
2768327653
#endif /* SQLITE_MEMDEBUG */
2768427654
2768527655
/************** End of mem2.c ************************************************/
2768627656
/************** Begin file mem3.c ********************************************/
27687
-#line 1 "tsrc/mem3.c"
2768827657
/*
2768927658
** 2007 October 14
2769027659
**
2769127660
** The author disclaims copyright to this source code. In place of
2769227661
** a legal notice, here is a blessing:
@@ -28373,11 +28342,10 @@
2837328342
2837428343
#endif /* SQLITE_ENABLE_MEMSYS3 */
2837528344
2837628345
/************** End of mem3.c ************************************************/
2837728346
/************** Begin file mem5.c ********************************************/
28378
-#line 1 "tsrc/mem5.c"
2837928347
/*
2838028348
** 2007 October 14
2838128349
**
2838228350
** The author disclaims copyright to this source code. In place of
2838328351
** a legal notice, here is a blessing:
@@ -28962,11 +28930,10 @@
2896228930
2896328931
#endif /* SQLITE_ENABLE_MEMSYS5 */
2896428932
2896528933
/************** End of mem5.c ************************************************/
2896628934
/************** Begin file mutex.c *******************************************/
28967
-#line 1 "tsrc/mutex.c"
2896828935
/*
2896928936
** 2007 August 14
2897028937
**
2897128938
** The author disclaims copyright to this source code. In place of
2897228939
** a legal notice, here is a blessing:
@@ -29340,11 +29307,10 @@
2934029307
2934129308
#endif /* !defined(SQLITE_MUTEX_OMIT) */
2934229309
2934329310
/************** End of mutex.c ***********************************************/
2934429311
/************** Begin file mutex_noop.c **************************************/
29345
-#line 1 "tsrc/mutex_noop.c"
2934629312
/*
2934729313
** 2008 October 07
2934829314
**
2934929315
** The author disclaims copyright to this source code. In place of
2935029316
** a legal notice, here is a blessing:
@@ -29559,11 +29525,10 @@
2955929525
#endif /* defined(SQLITE_MUTEX_NOOP) */
2956029526
#endif /* !defined(SQLITE_MUTEX_OMIT) */
2956129527
2956229528
/************** End of mutex_noop.c ******************************************/
2956329529
/************** Begin file mutex_unix.c **************************************/
29564
-#line 1 "tsrc/mutex_unix.c"
2956529530
/*
2956629531
** 2007 August 28
2956729532
**
2956829533
** The author disclaims copyright to this source code. In place of
2956929534
** a legal notice, here is a blessing:
@@ -29957,11 +29922,10 @@
2995729922
2995829923
#endif /* SQLITE_MUTEX_PTHREADS */
2995929924
2996029925
/************** End of mutex_unix.c ******************************************/
2996129926
/************** Begin file mutex_w32.c ***************************************/
29962
-#line 1 "tsrc/mutex_w32.c"
2996329927
/*
2996429928
** 2007 August 14
2996529929
**
2996629930
** The author disclaims copyright to this source code. In place of
2996729931
** a legal notice, here is a blessing:
@@ -29984,11 +29948,10 @@
2998429948
/*
2998529949
** Include the header file for the Windows VFS.
2998629950
*/
2998729951
/************** Include os_win.h in the middle of mutex_w32.c ****************/
2998829952
/************** Begin file os_win.h ******************************************/
29989
-#line 1 "tsrc/os_win.h"
2999029953
/*
2999129954
** 2013 November 25
2999229955
**
2999329956
** The author disclaims copyright to this source code. In place of
2999429957
** a legal notice, here is a blessing:
@@ -30076,11 +30039,10 @@
3007630039
3007730040
#endif /* SQLITE_OS_WIN_H */
3007830041
3007930042
/************** End of os_win.h **********************************************/
3008030043
/************** Continuing where we left off in mutex_w32.c ******************/
30081
-#line 26 "tsrc/mutex_w32.c"
3008230044
#endif
3008330045
3008430046
/*
3008530047
** The code in this file is only used if we are compiling multithreaded
3008630048
** on a Win32 system.
@@ -30454,11 +30416,10 @@
3045430416
3045530417
#endif /* SQLITE_MUTEX_W32 */
3045630418
3045730419
/************** End of mutex_w32.c *******************************************/
3045830420
/************** Begin file malloc.c ******************************************/
30459
-#line 1 "tsrc/malloc.c"
3046030421
/*
3046130422
** 2001 September 15
3046230423
**
3046330424
** The author disclaims copyright to this source code. In place of
3046430425
** a legal notice, here is a blessing:
@@ -31378,11 +31339,10 @@
3137831339
return 0;
3137931340
}
3138031341
3138131342
/************** End of malloc.c **********************************************/
3138231343
/************** Begin file printf.c ******************************************/
31383
-#line 1 "tsrc/printf.c"
3138431344
/*
3138531345
** The "printf" code that follows dates from the 1980's. It is in
3138631346
** the public domain.
3138731347
**
3138831348
**************************************************************************
@@ -32828,11 +32788,10 @@
3282832788
}
3282932789
}
3283032790
3283132791
/************** End of printf.c **********************************************/
3283232792
/************** Begin file treeview.c ****************************************/
32833
-#line 1 "tsrc/treeview.c"
3283432793
/*
3283532794
** 2015-06-08
3283632795
**
3283732796
** The author disclaims copyright to this source code. In place of
3283832797
** a legal notice, here is a blessing:
@@ -34160,11 +34119,10 @@
3416034119
3416134120
#endif /* SQLITE_DEBUG */
3416234121
3416334122
/************** End of treeview.c ********************************************/
3416434123
/************** Begin file random.c ******************************************/
34165
-#line 1 "tsrc/random.c"
3416634124
/*
3416734125
** 2001 September 15
3416834126
**
3416934127
** The author disclaims copyright to this source code. In place of
3417034128
** a legal notice, here is a blessing:
@@ -34321,11 +34279,10 @@
3432134279
}
3432234280
#endif /* SQLITE_UNTESTABLE */
3432334281
3432434282
/************** End of random.c **********************************************/
3432534283
/************** Begin file threads.c *****************************************/
34326
-#line 1 "tsrc/threads.c"
3432734284
/*
3432834285
** 2012 July 21
3432934286
**
3433034287
** The author disclaims copyright to this source code. In place of
3433134288
** a legal notice, here is a blessing:
@@ -34599,11 +34556,10 @@
3459934556
/****************************** End Single-Threaded *************************/
3460034557
#endif /* SQLITE_MAX_WORKER_THREADS>0 */
3460134558
3460234559
/************** End of threads.c *********************************************/
3460334560
/************** Begin file utf.c *********************************************/
34604
-#line 1 "tsrc/utf.c"
3460534561
/*
3460634562
** 2004 April 13
3460734563
**
3460834564
** The author disclaims copyright to this source code. In place of
3460934565
** a legal notice, here is a blessing:
@@ -35171,11 +35127,10 @@
3517135127
#endif /* SQLITE_TEST */
3517235128
#endif /* SQLITE_OMIT_UTF16 */
3517335129
3517435130
/************** End of utf.c *************************************************/
3517535131
/************** Begin file util.c ********************************************/
35176
-#line 1 "tsrc/util.c"
3517735132
/*
3517835133
** 2001 September 15
3517935134
**
3518035135
** The author disclaims copyright to this source code. In place of
3518135136
** a legal notice, here is a blessing:
@@ -37023,11 +36978,10 @@
3702336978
return 0;
3702436979
}
3702536980
3702636981
/************** End of util.c ************************************************/
3702736982
/************** Begin file hash.c ********************************************/
37028
-#line 1 "tsrc/hash.c"
3702936983
/*
3703036984
** 2001 September 22
3703136985
**
3703236986
** The author disclaims copyright to this source code. In place of
3703336987
** a legal notice, here is a blessing:
@@ -37297,11 +37251,10 @@
3729737251
return 0;
3729837252
}
3729937253
3730037254
/************** End of hash.c ************************************************/
3730137255
/************** Begin file opcodes.c *****************************************/
37302
-#line 1 "tsrc/opcodes.c"
3730337256
/* Automatically generated. Do not edit */
3730437257
/* See the tool/mkopcodec.tcl script for details. */
3730537258
#if !defined(SQLITE_OMIT_EXPLAIN) \
3730637259
|| defined(VDBE_PROFILE) \
3730737260
|| defined(SQLITE_DEBUG)
@@ -37507,11 +37460,10 @@
3750737460
}
3750837461
#endif
3750937462
3751037463
/************** End of opcodes.c *********************************************/
3751137464
/************** Begin file os_kv.c *******************************************/
37512
-#line 1 "tsrc/os_kv.c"
3751337465
/*
3751437466
** 2022-09-06
3751537467
**
3751637468
** The author disclaims copyright to this source code. In place of
3751737469
** a legal notice, here is a blessing:
@@ -38490,11 +38442,10 @@
3849038442
}
3849138443
#endif
3849238444
3849338445
/************** End of os_kv.c ***********************************************/
3849438446
/************** Begin file os_unix.c *****************************************/
38495
-#line 1 "tsrc/os_unix.c"
3849638447
/*
3849738448
** 2004 May 22
3849838449
**
3849938450
** The author disclaims copyright to this source code. In place of
3850038451
** a legal notice, here is a blessing:
@@ -42480,10 +42431,15 @@
4248042431
int rc = osIoctl(pFile->h, F2FS_IOC_ABORT_VOLATILE_WRITE);
4248142432
return rc ? SQLITE_IOERR_ROLLBACK_ATOMIC : SQLITE_OK;
4248242433
}
4248342434
#endif /* __linux__ && SQLITE_ENABLE_BATCH_ATOMIC_WRITE */
4248442435
42436
+ case SQLITE_FCNTL_NULL_IO: {
42437
+ osClose(pFile->h);
42438
+ pFile->h = -1;
42439
+ return SQLITE_OK;
42440
+ }
4248542441
case SQLITE_FCNTL_LOCKSTATE: {
4248642442
*(int*)pArg = pFile->eFileLock;
4248742443
return SQLITE_OK;
4248842444
}
4248942445
case SQLITE_FCNTL_LAST_ERRNO: {
@@ -46760,11 +46716,10 @@
4676046716
4676146717
#endif /* SQLITE_OS_UNIX */
4676246718
4676346719
/************** End of os_unix.c *********************************************/
4676446720
/************** Begin file os_win.c ******************************************/
46765
-#line 1 "tsrc/os_win.c"
4676646721
/*
4676746722
** 2004 May 22
4676846723
**
4676946724
** The author disclaims copyright to this source code. In place of
4677046725
** a legal notice, here is a blessing:
@@ -50362,10 +50317,15 @@
5036250317
OSTRACE(("FCNTL oldFile=%p, newFile=%p, rc=SQLITE_OK\n",
5036350318
hOldFile, pFile->h));
5036450319
return SQLITE_OK;
5036550320
}
5036650321
#endif
50322
+ case SQLITE_FCNTL_NULL_IO: {
50323
+ (void)osCloseHandle(pFile->h);
50324
+ pFile->h = NULL;
50325
+ return SQLITE_OK;
50326
+ }
5036750327
case SQLITE_FCNTL_TEMPFILENAME: {
5036850328
char *zTFile = 0;
5036950329
int rc = winGetTempname(pFile->pVfs, &zTFile);
5037050330
if( rc==SQLITE_OK ){
5037150331
*(char**)pArg = zTFile;
@@ -52975,11 +52935,10 @@
5297552935
5297652936
#endif /* SQLITE_OS_WIN */
5297752937
5297852938
/************** End of os_win.c **********************************************/
5297952939
/************** Begin file memdb.c *******************************************/
52980
-#line 1 "tsrc/memdb.c"
5298152940
/*
5298252941
** 2016-09-07
5298352942
**
5298452943
** The author disclaims copyright to this source code. In place of
5298552944
** a legal notice, here is a blessing:
@@ -53915,11 +53874,10 @@
5391553874
}
5391653875
#endif /* SQLITE_OMIT_DESERIALIZE */
5391753876
5391853877
/************** End of memdb.c ***********************************************/
5391953878
/************** Begin file bitvec.c ******************************************/
53920
-#line 1 "tsrc/bitvec.c"
5392153879
/*
5392253880
** 2008 February 16
5392353881
**
5392453882
** The author disclaims copyright to this source code. In place of
5392553883
** a legal notice, here is a blessing:
@@ -54330,11 +54288,10 @@
5433054288
}
5433154289
#endif /* SQLITE_UNTESTABLE */
5433254290
5433354291
/************** End of bitvec.c **********************************************/
5433454292
/************** Begin file pcache.c ******************************************/
54335
-#line 1 "tsrc/pcache.c"
5433654293
/*
5433754294
** 2008 August 05
5433854295
**
5433954296
** The author disclaims copyright to this source code. In place of
5434054297
** a legal notice, here is a blessing:
@@ -55270,11 +55227,10 @@
5527055227
}
5527155228
#endif
5527255229
5527355230
/************** End of pcache.c **********************************************/
5527455231
/************** Begin file pcache1.c *****************************************/
55275
-#line 1 "tsrc/pcache1.c"
5527655232
/*
5527755233
** 2008 November 05
5527855234
**
5527955235
** The author disclaims copyright to this source code. In place of
5528055236
** a legal notice, here is a blessing:
@@ -56556,11 +56512,10 @@
5655656512
}
5655756513
#endif
5655856514
5655956515
/************** End of pcache1.c *********************************************/
5656056516
/************** Begin file rowset.c ******************************************/
56561
-#line 1 "tsrc/rowset.c"
5656256517
/*
5656356518
** 2008 December 3
5656456519
**
5656556520
** The author disclaims copyright to this source code. In place of
5656656521
** a legal notice, here is a blessing:
@@ -57062,11 +57017,10 @@
5706257017
return 0;
5706357018
}
5706457019
5706557020
/************** End of rowset.c **********************************************/
5706657021
/************** Begin file pager.c *******************************************/
57067
-#line 1 "tsrc/pager.c"
5706857022
/*
5706957023
** 2001 September 15
5707057024
**
5707157025
** The author disclaims copyright to this source code. In place of
5707257026
** a legal notice, here is a blessing:
@@ -57087,11 +57041,10 @@
5708757041
*/
5708857042
#ifndef SQLITE_OMIT_DISKIO
5708957043
/* #include "sqliteInt.h" */
5709057044
/************** Include wal.h in the middle of pager.c ***********************/
5709157045
/************** Begin file wal.h *********************************************/
57092
-#line 1 "tsrc/wal.h"
5709357046
/*
5709457047
** 2010 February 1
5709557048
**
5709657049
** The author disclaims copyright to this source code. In place of
5709757050
** a legal notice, here is a blessing:
@@ -57251,11 +57204,10 @@
5725157204
#endif /* ifndef SQLITE_OMIT_WAL */
5725257205
#endif /* SQLITE_WAL_H */
5725357206
5725457207
/************** End of wal.h *************************************************/
5725557208
/************** Continuing where we left off in pager.c **********************/
57256
-#line 24 "tsrc/pager.c"
5725757209
5725857210
5725957211
/******************* NOTES ON THE DESIGN OF THE PAGER ************************
5726057212
**
5726157213
** This comment block describes invariants that hold when using a rollback
@@ -65041,11 +64993,10 @@
6504164993
6504264994
#endif /* SQLITE_OMIT_DISKIO */
6504364995
6504464996
/************** End of pager.c ***********************************************/
6504564997
/************** Begin file wal.c *********************************************/
65046
-#line 1 "tsrc/wal.c"
6504764998
/*
6504864999
** 2010 February 1
6504965000
**
6505065001
** The author disclaims copyright to this source code. In place of
6505165002
** a legal notice, here is a blessing:
@@ -69638,11 +69589,10 @@
6963869589
6963969590
#endif /* #ifndef SQLITE_OMIT_WAL */
6964069591
6964169592
/************** End of wal.c *************************************************/
6964269593
/************** Begin file btmutex.c *****************************************/
69643
-#line 1 "tsrc/btmutex.c"
6964469594
/*
6964569595
** 2007 August 27
6964669596
**
6964769597
** The author disclaims copyright to this source code. In place of
6964869598
** a legal notice, here is a blessing:
@@ -69658,11 +69608,10 @@
6965869608
** big and we want to break it down some. This packaged seemed like
6965969609
** a good breakout.
6966069610
*/
6966169611
/************** Include btreeInt.h in the middle of btmutex.c ****************/
6966269612
/************** Begin file btreeInt.h ****************************************/
69663
-#line 1 "tsrc/btreeInt.h"
6966469613
/*
6966569614
** 2004 April 6
6966669615
**
6966769616
** The author disclaims copyright to this source code. In place of
6966869617
** a legal notice, here is a blessing:
@@ -70396,11 +70345,10 @@
7039670345
# define get2byteAligned(x) ((x)[0]<<8 | (x)[1])
7039770346
#endif
7039870347
7039970348
/************** End of btreeInt.h ********************************************/
7040070349
/************** Continuing where we left off in btmutex.c ********************/
70401
-#line 19 "tsrc/btmutex.c"
7040270350
#ifndef SQLITE_OMIT_SHARED_CACHE
7040370351
#if SQLITE_THREADSAFE
7040470352
7040570353
/*
7040670354
** Obtain the BtShared mutex associated with B-Tree handle p. Also,
@@ -70691,11 +70639,10 @@
7069170639
7069270640
#endif /* ifndef SQLITE_OMIT_SHARED_CACHE */
7069370641
7069470642
/************** End of btmutex.c *********************************************/
7069570643
/************** Begin file btree.c *******************************************/
70696
-#line 1 "tsrc/btree.c"
7069770644
/*
7069870645
** 2004 April 6
7069970646
**
7070070647
** The author disclaims copyright to this source code. In place of
7070170648
** a legal notice, here is a blessing:
@@ -82186,11 +82133,10 @@
8218682133
}
8218782134
#endif
8218882135
8218982136
/************** End of btree.c ***********************************************/
8219082137
/************** Begin file backup.c ******************************************/
82191
-#line 1 "tsrc/backup.c"
8219282138
/*
8219382139
** 2009 January 28
8219482140
**
8219582141
** The author disclaims copyright to this source code. In place of
8219682142
** a legal notice, here is a blessing:
@@ -82957,11 +82903,10 @@
8295782903
}
8295882904
#endif /* SQLITE_OMIT_VACUUM */
8295982905
8296082906
/************** End of backup.c **********************************************/
8296182907
/************** Begin file vdbemem.c *****************************************/
82962
-#line 1 "tsrc/vdbemem.c"
8296382908
/*
8296482909
** 2004 May 26
8296582910
**
8296682911
** The author disclaims copyright to this source code. In place of
8296782912
** a legal notice, here is a blessing:
@@ -85014,11 +84959,10 @@
8501484959
return valueBytes(pVal, enc);
8501584960
}
8501684961
8501784962
/************** End of vdbemem.c *********************************************/
8501884963
/************** Begin file vdbeaux.c *****************************************/
85019
-#line 1 "tsrc/vdbeaux.c"
8502084964
/*
8502184965
** 2003 September 6
8502284966
**
8502384967
** The author disclaims copyright to this source code. In place of
8502484968
** a legal notice, here is a blessing:
@@ -90566,11 +90510,10 @@
9056690510
}
9056790511
#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
9056890512
9056990513
/************** End of vdbeaux.c *********************************************/
9057090514
/************** Begin file vdbeapi.c *****************************************/
90571
-#line 1 "tsrc/vdbeapi.c"
9057290515
/*
9057390516
** 2004 May 26
9057490517
**
9057590518
** The author disclaims copyright to this source code. In place of
9057690519
** a legal notice, here is a blessing:
@@ -93153,11 +93096,10 @@
9315393096
}
9315493097
#endif /* SQLITE_ENABLE_STMT_SCANSTATUS */
9315593098
9315693099
/************** End of vdbeapi.c *********************************************/
9315793100
/************** Begin file vdbetrace.c ***************************************/
93158
-#line 1 "tsrc/vdbetrace.c"
9315993101
/*
9316093102
** 2009 November 25
9316193103
**
9316293104
** The author disclaims copyright to this source code. In place of
9316393105
** a legal notice, here is a blessing:
@@ -93349,11 +93291,10 @@
9334993291
9335093292
#endif /* #ifndef SQLITE_OMIT_TRACE */
9335193293
9335293294
/************** End of vdbetrace.c *******************************************/
9335393295
/************** Begin file vdbe.c ********************************************/
93354
-#line 1 "tsrc/vdbe.c"
9335593296
/*
9335693297
** 2001 September 15
9335793298
**
9335893299
** The author disclaims copyright to this source code. In place of
9335993300
** a legal notice, here is a blessing:
@@ -93381,11 +93322,10 @@
9338193322
#if defined(VDBE_PROFILE) \
9338293323
|| defined(SQLITE_PERFORMANCE_TRACE) \
9338393324
|| defined(SQLITE_ENABLE_STMT_SCANSTATUS)
9338493325
/************** Include hwtime.h in the middle of vdbe.c *********************/
9338593326
/************** Begin file hwtime.h ******************************************/
93386
-#line 1 "tsrc/hwtime.h"
9338793327
/*
9338893328
** 2008 May 27
9338993329
**
9339093330
** The author disclaims copyright to this source code. In place of
9339193331
** a legal notice, here is a blessing:
@@ -93470,11 +93410,10 @@
9347093410
9347193411
#endif /* !defined(SQLITE_HWTIME_H) */
9347293412
9347393413
/************** End of hwtime.h **********************************************/
9347493414
/************** Continuing where we left off in vdbe.c ***********************/
93475
-#line 31 "tsrc/vdbe.c"
9347693415
#endif
9347793416
9347893417
/*
9347993418
** Invoke this macro on memory cells just prior to changing the
9348093419
** value of the cell. This macro verifies that shallow copies are
@@ -102664,11 +102603,10 @@
102664102603
}
102665102604
102666102605
102667102606
/************** End of vdbe.c ************************************************/
102668102607
/************** Begin file vdbeblob.c ****************************************/
102669
-#line 1 "tsrc/vdbeblob.c"
102670102608
/*
102671102609
** 2007 May 1
102672102610
**
102673102611
** The author disclaims copyright to this source code. In place of
102674102612
** a legal notice, here is a blessing:
@@ -103188,11 +103126,10 @@
103188103126
103189103127
#endif /* #ifndef SQLITE_OMIT_INCRBLOB */
103190103128
103191103129
/************** End of vdbeblob.c ********************************************/
103192103130
/************** Begin file vdbesort.c ****************************************/
103193
-#line 1 "tsrc/vdbesort.c"
103194103131
/*
103195103132
** 2011-07-09
103196103133
**
103197103134
** The author disclaims copyright to this source code. In place of
103198103135
** a legal notice, here is a blessing:
@@ -105959,11 +105896,10 @@
105959105896
return SQLITE_OK;
105960105897
}
105961105898
105962105899
/************** End of vdbesort.c ********************************************/
105963105900
/************** Begin file vdbevtab.c ****************************************/
105964
-#line 1 "tsrc/vdbevtab.c"
105965105901
/*
105966105902
** 2020-03-23
105967105903
**
105968105904
** The author disclaims copyright to this source code. In place of
105969105905
** a legal notice, here is a blessing:
@@ -106409,11 +106345,10 @@
106409106345
SQLITE_PRIVATE int sqlite3VdbeBytecodeVtabInit(sqlite3 *db){ return SQLITE_OK; }
106410106346
#endif /* SQLITE_ENABLE_BYTECODE_VTAB */
106411106347
106412106348
/************** End of vdbevtab.c ********************************************/
106413106349
/************** Begin file memjournal.c **************************************/
106414
-#line 1 "tsrc/memjournal.c"
106415106350
/*
106416106351
** 2008 October 7
106417106352
**
106418106353
** The author disclaims copyright to this source code. In place of
106419106354
** a legal notice, here is a blessing:
@@ -106853,11 +106788,10 @@
106853106788
return MAX(pVfs->szOsFile, (int)sizeof(MemJournal));
106854106789
}
106855106790
106856106791
/************** End of memjournal.c ******************************************/
106857106792
/************** Begin file walker.c ******************************************/
106858
-#line 1 "tsrc/walker.c"
106859106793
/*
106860106794
** 2008 August 16
106861106795
**
106862106796
** The author disclaims copyright to this source code. In place of
106863106797
** a legal notice, here is a blessing:
@@ -107118,11 +107052,10 @@
107118107052
return WRC_Continue;
107119107053
}
107120107054
107121107055
/************** End of walker.c **********************************************/
107122107056
/************** Begin file resolve.c *****************************************/
107123
-#line 1 "tsrc/resolve.c"
107124107057
/*
107125107058
** 2008 August 18
107126107059
**
107127107060
** The author disclaims copyright to this source code. In place of
107128107061
** a legal notice, here is a blessing:
@@ -109440,11 +109373,10 @@
109440109373
return rc;
109441109374
}
109442109375
109443109376
/************** End of resolve.c *********************************************/
109444109377
/************** Begin file expr.c ********************************************/
109445
-#line 1 "tsrc/expr.c"
109446109378
/*
109447109379
** 2001 September 15
109448109380
**
109449109381
** The author disclaims copyright to this source code. In place of
109450109382
** a legal notice, here is a blessing:
@@ -116770,11 +116702,10 @@
116770116702
}
116771116703
#endif /* SQLITE_DEBUG */
116772116704
116773116705
/************** End of expr.c ************************************************/
116774116706
/************** Begin file alter.c *******************************************/
116775
-#line 1 "tsrc/alter.c"
116776116707
/*
116777116708
** 2005 February 15
116778116709
**
116779116710
** The author disclaims copyright to this source code. In place of
116780116711
** a legal notice, here is a blessing:
@@ -119090,11 +119021,10 @@
119090119021
}
119091119022
#endif /* SQLITE_ALTER_TABLE */
119092119023
119093119024
/************** End of alter.c ***********************************************/
119094119025
/************** Begin file analyze.c *****************************************/
119095
-#line 1 "tsrc/analyze.c"
119096119026
/*
119097119027
** 2005-07-08
119098119028
**
119099119029
** The author disclaims copyright to this source code. In place of
119100119030
** a legal notice, here is a blessing:
@@ -121115,11 +121045,10 @@
121115121045
121116121046
#endif /* SQLITE_OMIT_ANALYZE */
121117121047
121118121048
/************** End of analyze.c *********************************************/
121119121049
/************** Begin file attach.c ******************************************/
121120
-#line 1 "tsrc/attach.c"
121121121050
/*
121122121051
** 2003 April 6
121123121052
**
121124121053
** The author disclaims copyright to this source code. In place of
121125121054
** a legal notice, here is a blessing:
@@ -121728,11 +121657,10 @@
121728121657
}
121729121658
#endif
121730121659
121731121660
/************** End of attach.c **********************************************/
121732121661
/************** Begin file auth.c ********************************************/
121733
-#line 1 "tsrc/auth.c"
121734121662
/*
121735121663
** 2003 January 11
121736121664
**
121737121665
** The author disclaims copyright to this source code. In place of
121738121666
** a legal notice, here is a blessing:
@@ -121992,11 +121920,10 @@
121992121920
121993121921
#endif /* SQLITE_OMIT_AUTHORIZATION */
121994121922
121995121923
/************** End of auth.c ************************************************/
121996121924
/************** Begin file build.c *******************************************/
121997
-#line 1 "tsrc/build.c"
121998121925
/*
121999121926
** 2001 September 15
122000121927
**
122001121928
** The author disclaims copyright to this source code. In place of
122002121929
** a legal notice, here is a blessing:
@@ -127763,11 +127690,10 @@
127763127690
}
127764127691
#endif /* !defined(SQLITE_OMIT_CTE) */
127765127692
127766127693
/************** End of build.c ***********************************************/
127767127694
/************** Begin file callback.c ****************************************/
127768
-#line 1 "tsrc/callback.c"
127769127695
/*
127770127696
** 2005 May 23
127771127697
**
127772127698
** The author disclaims copyright to this source code. In place of
127773127699
** a legal notice, here is a blessing:
@@ -128307,11 +128233,10 @@
128307128233
return p;
128308128234
}
128309128235
128310128236
/************** End of callback.c ********************************************/
128311128237
/************** Begin file delete.c ******************************************/
128312
-#line 1 "tsrc/delete.c"
128313128238
/*
128314128239
** 2001 September 15
128315128240
**
128316128241
** The author disclaims copyright to this source code. In place of
128317128242
** a legal notice, here is a blessing:
@@ -129341,11 +129266,10 @@
129341129266
}
129342129267
}
129343129268
129344129269
/************** End of delete.c **********************************************/
129345129270
/************** Begin file func.c ********************************************/
129346
-#line 1 "tsrc/func.c"
129347129271
/*
129348129272
** 2002 February 23
129349129273
**
129350129274
** The author disclaims copyright to this source code. In place of
129351129275
** a legal notice, here is a blessing:
@@ -132188,11 +132112,10 @@
132188132112
#endif
132189132113
}
132190132114
132191132115
/************** End of func.c ************************************************/
132192132116
/************** Begin file fkey.c ********************************************/
132193
-#line 1 "tsrc/fkey.c"
132194132117
/*
132195132118
**
132196132119
** The author disclaims copyright to this source code. In place of
132197132120
** a legal notice, here is a blessing:
132198132121
**
@@ -133676,11 +133599,10 @@
133676133599
}
133677133600
#endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */
133678133601
133679133602
/************** End of fkey.c ************************************************/
133680133603
/************** Begin file insert.c ******************************************/
133681
-#line 1 "tsrc/insert.c"
133682133604
/*
133683133605
** 2001 September 15
133684133606
**
133685133607
** The author disclaims copyright to this source code. In place of
133686133608
** a legal notice, here is a blessing:
@@ -137072,11 +136994,10 @@
137072136994
}
137073136995
#endif /* SQLITE_OMIT_XFER_OPT */
137074136996
137075136997
/************** End of insert.c **********************************************/
137076136998
/************** Begin file legacy.c ******************************************/
137077
-#line 1 "tsrc/legacy.c"
137078136999
/*
137079137000
** 2001 September 15
137080137001
**
137081137002
** The author disclaims copyright to this source code. In place of
137082137003
** a legal notice, here is a blessing:
@@ -137217,11 +137138,10 @@
137217137138
return rc;
137218137139
}
137219137140
137220137141
/************** End of legacy.c **********************************************/
137221137142
/************** Begin file loadext.c *****************************************/
137222
-#line 1 "tsrc/loadext.c"
137223137143
/*
137224137144
** 2006 June 7
137225137145
**
137226137146
** The author disclaims copyright to this source code. In place of
137227137147
** a legal notice, here is a blessing:
@@ -137238,11 +137158,10 @@
137238137158
#ifndef SQLITE_CORE
137239137159
#define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */
137240137160
#endif
137241137161
/************** Include sqlite3ext.h in the middle of loadext.c **************/
137242137162
/************** Begin file sqlite3ext.h **************************************/
137243
-#line 1 "tsrc/sqlite3ext.h"
137244137163
/*
137245137164
** 2006 June 7
137246137165
**
137247137166
** The author disclaims copyright to this source code. In place of
137248137167
** a legal notice, here is a blessing:
@@ -137961,11 +137880,10 @@
137961137880
137962137881
#endif /* SQLITE3EXT_H */
137963137882
137964137883
/************** End of sqlite3ext.h ******************************************/
137965137884
/************** Continuing where we left off in loadext.c ********************/
137966
-#line 20 "tsrc/loadext.c"
137967137885
/* #include "sqliteInt.h" */
137968137886
137969137887
#ifndef SQLITE_OMIT_LOAD_EXTENSION
137970137888
/*
137971137889
** Some API routines are omitted when various features are
@@ -138867,11 +138785,10 @@
138867138785
}
138868138786
}
138869138787
138870138788
/************** End of loadext.c *********************************************/
138871138789
/************** Begin file pragma.c ******************************************/
138872
-#line 1 "tsrc/pragma.c"
138873138790
/*
138874138791
** 2003 April 6
138875138792
**
138876138793
** The author disclaims copyright to this source code. In place of
138877138794
** a legal notice, here is a blessing:
@@ -138900,11 +138817,10 @@
138900138817
** lexicographical order to facility a binary search of the pragma name.
138901138818
** Do not edit pragma.h directly. Edit and rerun the script in at
138902138819
** ../tool/mkpragmatab.tcl. */
138903138820
/************** Include pragma.h in the middle of pragma.c *******************/
138904138821
/************** Begin file pragma.h ******************************************/
138905
-#line 1 "tsrc/pragma.h"
138906138822
/* DO NOT EDIT!
138907138823
** This file is automatically generated by the script at
138908138824
** ../tool/mkpragmatab.tcl. To update the set of pragmas, edit
138909138825
** that script and rerun it.
138910138826
*/
@@ -139564,11 +139480,10 @@
139564139480
};
139565139481
/* Number of pragmas: 68 on by default, 78 total. */
139566139482
139567139483
/************** End of pragma.h **********************************************/
139568139484
/************** Continuing where we left off in pragma.c *********************/
139569
-#line 32 "tsrc/pragma.c"
139570139485
139571139486
/*
139572139487
** When the 0x10 bit of PRAGMA optimize is set, any ANALYZE commands
139573139488
** will be run with an analysis_limit set to the lessor of the value of
139574139489
** the following macro or to the actual analysis_limit if it is non-zero,
@@ -142608,11 +142523,10 @@
142608142523
142609142524
#endif /* SQLITE_OMIT_PRAGMA */
142610142525
142611142526
/************** End of pragma.c **********************************************/
142612142527
/************** Begin file prepare.c *****************************************/
142613
-#line 1 "tsrc/prepare.c"
142614142528
/*
142615142529
** 2005 May 25
142616142530
**
142617142531
** The author disclaims copyright to this source code. In place of
142618142532
** a legal notice, here is a blessing:
@@ -143702,11 +143616,10 @@
143702143616
143703143617
#endif /* SQLITE_OMIT_UTF16 */
143704143618
143705143619
/************** End of prepare.c *********************************************/
143706143620
/************** Begin file select.c ******************************************/
143707
-#line 1 "tsrc/select.c"
143708143621
/*
143709143622
** 2001 September 15
143710143623
**
143711143624
** The author disclaims copyright to this source code. In place of
143712143625
** a legal notice, here is a blessing:
@@ -152475,11 +152388,10 @@
152475152388
return rc;
152476152389
}
152477152390
152478152391
/************** End of select.c **********************************************/
152479152392
/************** Begin file table.c *******************************************/
152480
-#line 1 "tsrc/table.c"
152481152393
/*
152482152394
** 2001 September 15
152483152395
**
152484152396
** The author disclaims copyright to this source code. In place of
152485152397
** a legal notice, here is a blessing:
@@ -152677,11 +152589,10 @@
152677152589
152678152590
#endif /* SQLITE_OMIT_GET_TABLE */
152679152591
152680152592
/************** End of table.c ***********************************************/
152681152593
/************** Begin file trigger.c *****************************************/
152682
-#line 1 "tsrc/trigger.c"
152683152594
/*
152684152595
**
152685152596
** The author disclaims copyright to this source code. In place of
152686152597
** a legal notice, here is a blessing:
152687152598
**
@@ -154244,11 +154155,10 @@
154244154155
154245154156
#endif /* !defined(SQLITE_OMIT_TRIGGER) */
154246154157
154247154158
/************** End of trigger.c *********************************************/
154248154159
/************** Begin file update.c ******************************************/
154249
-#line 1 "tsrc/update.c"
154250154160
/*
154251154161
** 2001 September 15
154252154162
**
154253154163
** The author disclaims copyright to this source code. In place of
154254154164
** a legal notice, here is a blessing:
@@ -155616,11 +155526,10 @@
155616155526
}
155617155527
#endif /* SQLITE_OMIT_VIRTUALTABLE */
155618155528
155619155529
/************** End of update.c **********************************************/
155620155530
/************** Begin file upsert.c ******************************************/
155621
-#line 1 "tsrc/upsert.c"
155622155531
/*
155623155532
** 2018-04-12
155624155533
**
155625155534
** The author disclaims copyright to this source code. In place of
155626155535
** a legal notice, here is a blessing:
@@ -155949,11 +155858,10 @@
155949155858
155950155859
#endif /* SQLITE_OMIT_UPSERT */
155951155860
155952155861
/************** End of upsert.c **********************************************/
155953155862
/************** Begin file vacuum.c ******************************************/
155954
-#line 1 "tsrc/vacuum.c"
155955155863
/*
155956155864
** 2003 April 6
155957155865
**
155958155866
** The author disclaims copyright to this source code. In place of
155959155867
** a legal notice, here is a blessing:
@@ -156371,11 +156279,10 @@
156371156279
156372156280
#endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */
156373156281
156374156282
/************** End of vacuum.c **********************************************/
156375156283
/************** Begin file vtab.c ********************************************/
156376
-#line 1 "tsrc/vtab.c"
156377156284
/*
156378156285
** 2006 June 10
156379156286
**
156380156287
** The author disclaims copyright to this source code. In place of
156381156288
** a legal notice, here is a blessing:
@@ -157749,11 +157656,10 @@
157749157656
157750157657
#endif /* SQLITE_OMIT_VIRTUALTABLE */
157751157658
157752157659
/************** End of vtab.c ************************************************/
157753157660
/************** Begin file wherecode.c ***************************************/
157754
-#line 1 "tsrc/wherecode.c"
157755157661
/*
157756157662
** 2015-06-06
157757157663
**
157758157664
** The author disclaims copyright to this source code. In place of
157759157665
** a legal notice, here is a blessing:
@@ -157772,11 +157678,10 @@
157772157678
** file retains the code that does query planning and analysis.
157773157679
*/
157774157680
/* #include "sqliteInt.h" */
157775157681
/************** Include whereInt.h in the middle of wherecode.c **************/
157776157682
/************** Begin file whereInt.h ****************************************/
157777
-#line 1 "tsrc/whereInt.h"
157778157683
/*
157779157684
** 2013-11-12
157780157685
**
157781157686
** The author disclaims copyright to this source code. In place of
157782157687
** a legal notice, here is a blessing:
@@ -158429,11 +158334,10 @@
158429158334
158430158335
#endif /* !defined(SQLITE_WHEREINT_H) */
158431158336
158432158337
/************** End of whereInt.h ********************************************/
158433158338
/************** Continuing where we left off in wherecode.c ******************/
158434
-#line 22 "tsrc/wherecode.c"
158435158339
158436158340
#ifndef SQLITE_OMIT_EXPLAIN
158437158341
158438158342
/*
158439158343
** Return the name of the i-th column of the pIdx index.
@@ -161352,11 +161256,10 @@
161352161256
pParse->withinRJSubrtn--;
161353161257
}
161354161258
161355161259
/************** End of wherecode.c *******************************************/
161356161260
/************** Begin file whereexpr.c ***************************************/
161357
-#line 1 "tsrc/whereexpr.c"
161358161261
/*
161359161262
** 2015-06-08
161360161263
**
161361161264
** The author disclaims copyright to this source code. In place of
161362161265
** a legal notice, here is a blessing:
@@ -163258,11 +163161,10 @@
163258163161
}
163259163162
}
163260163163
163261163164
/************** End of whereexpr.c *******************************************/
163262163165
/************** Begin file where.c *******************************************/
163263
-#line 1 "tsrc/where.c"
163264163166
/*
163265163167
** 2001 September 15
163266163168
**
163267163169
** The author disclaims copyright to this source code. In place of
163268163170
** a legal notice, here is a blessing:
@@ -170759,11 +170661,10 @@
170759170661
return;
170760170662
}
170761170663
170762170664
/************** End of where.c ***********************************************/
170763170665
/************** Begin file window.c ******************************************/
170764
-#line 1 "tsrc/window.c"
170765170666
/*
170766170667
** 2018 May 08
170767170668
**
170768170669
** The author disclaims copyright to this source code. In place of
170769170670
** a legal notice, here is a blessing:
@@ -172432,10 +172333,11 @@
172432172333
for(pWin=pMWin; pWin; pWin=pWin->pNextWin){
172433172334
FuncDef *pFunc = pWin->pWFunc;
172434172335
int regArg;
172435172336
int nArg = pWin->bExprArgs ? 0 : windowArgCount(pWin);
172436172337
int i;
172338
+ int addrIf = 0;
172437172339
172438172340
assert( bInverse==0 || pWin->eStart!=TK_UNBOUNDED );
172439172341
172440172342
/* All OVER clauses in the same window function aggregate step must
172441172343
** be the same. */
@@ -172447,10 +172349,22 @@
172447172349
}else{
172448172350
sqlite3VdbeAddOp3(v, OP_Column, pMWin->iEphCsr, pWin->iArgCol+i, reg+i);
172449172351
}
172450172352
}
172451172353
regArg = reg;
172354
+
172355
+ if( pWin->pFilter ){
172356
+ int regTmp;
172357
+ assert( ExprUseXList(pWin->pOwner) );
172358
+ assert( pWin->bExprArgs || !nArg ||nArg==pWin->pOwner->x.pList->nExpr );
172359
+ assert( pWin->bExprArgs || nArg ||pWin->pOwner->x.pList==0 );
172360
+ regTmp = sqlite3GetTempReg(pParse);
172361
+ sqlite3VdbeAddOp3(v, OP_Column, csr, pWin->iArgCol+nArg,regTmp);
172362
+ addrIf = sqlite3VdbeAddOp3(v, OP_IfNot, regTmp, 0, 1);
172363
+ VdbeCoverage(v);
172364
+ sqlite3ReleaseTempReg(pParse, regTmp);
172365
+ }
172452172366
172453172367
if( pMWin->regStartRowid==0
172454172368
&& (pFunc->funcFlags & SQLITE_FUNC_MINMAX)
172455172369
&& (pWin->eStart!=TK_UNBOUNDED)
172456172370
){
@@ -172467,29 +172381,17 @@
172467172381
sqlite3VdbeAddOp1(v, OP_Delete, pWin->csrApp);
172468172382
sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);
172469172383
}
172470172384
sqlite3VdbeJumpHere(v, addrIsNull);
172471172385
}else if( pWin->regApp ){
172386
+ assert( pWin->pFilter==0 );
172472172387
assert( pFunc->zName==nth_valueName
172473172388
|| pFunc->zName==first_valueName
172474172389
);
172475172390
assert( bInverse==0 || bInverse==1 );
172476172391
sqlite3VdbeAddOp2(v, OP_AddImm, pWin->regApp+1-bInverse, 1);
172477172392
}else if( pFunc->xSFunc!=noopStepFunc ){
172478
- int addrIf = 0;
172479
- if( pWin->pFilter ){
172480
- int regTmp;
172481
- assert( ExprUseXList(pWin->pOwner) );
172482
- assert( pWin->bExprArgs || !nArg ||nArg==pWin->pOwner->x.pList->nExpr );
172483
- assert( pWin->bExprArgs || nArg ||pWin->pOwner->x.pList==0 );
172484
- regTmp = sqlite3GetTempReg(pParse);
172485
- sqlite3VdbeAddOp3(v, OP_Column, csr, pWin->iArgCol+nArg,regTmp);
172486
- addrIf = sqlite3VdbeAddOp3(v, OP_IfNot, regTmp, 0, 1);
172487
- VdbeCoverage(v);
172488
- sqlite3ReleaseTempReg(pParse, regTmp);
172489
- }
172490
-
172491172393
if( pWin->bExprArgs ){
172492172394
int iOp = sqlite3VdbeCurrentAddr(v);
172493172395
int iEnd;
172494172396
172495172397
assert( ExprUseXList(pWin->pOwner) );
@@ -172516,12 +172418,13 @@
172516172418
sqlite3VdbeAppendP4(v, pFunc, P4_FUNCDEF);
172517172419
sqlite3VdbeChangeP5(v, (u8)nArg);
172518172420
if( pWin->bExprArgs ){
172519172421
sqlite3ReleaseTempRange(pParse, regArg, nArg);
172520172422
}
172521
- if( addrIf ) sqlite3VdbeJumpHere(v, addrIf);
172522172423
}
172424
+
172425
+ if( addrIf ) sqlite3VdbeJumpHere(v, addrIf);
172523172426
}
172524172427
}
172525172428
172526172429
/*
172527172430
** Values that may be passed as the second argument to windowCodeOp().
@@ -173869,11 +173772,10 @@
173869173772
173870173773
#endif /* SQLITE_OMIT_WINDOWFUNC */
173871173774
173872173775
/************** End of window.c **********************************************/
173873173776
/************** Begin file parse.c *******************************************/
173874
-#line 1 "tsrc/parse.c"
173875173777
/* This file is automatically generated by Lemon from input grammar
173876173778
** source file "parse.y".
173877173779
*/
173878173780
/*
173879173781
** 2001-09-15
@@ -173893,11 +173795,10 @@
173893173795
** That input file is processed by Lemon to generate a C-language
173894173796
** implementation of a parser for the given grammar. You might be reading
173895173797
** this comment as part of the translated C-code. Edits should be made
173896173798
** to the original parse.y sources.
173897173799
*/
173898
-#line 62 "parse.y"
173899173800
173900173801
/* #include "sqliteInt.h" */
173901173802
173902173803
/*
173903173804
** Disable all error recovery processing in the parser push-down
@@ -173977,11 +173878,10 @@
173977173878
sqlite3ExprListDelete(pParse->db, pOrderBy);
173978173879
sqlite3ExprDelete(pParse->db, pLimit);
173979173880
}
173980173881
#endif /* SQLITE_ENABLE_UPDATE_DELETE_LIMIT */
173981173882
173982
-#line 517 "parse.y"
173983173883
173984173884
/*
173985173885
** For a compound SELECT statement, make sure p->pPrior->pNext==p for
173986173886
** all elements in the list. And make sure list length does not exceed
173987173887
** SQLITE_LIMIT_COMPOUND_SELECT.
@@ -174032,11 +173932,10 @@
174032173932
** testing.
174033173933
*/
174034173934
static void *parserStackRealloc(void *pOld, sqlite3_uint64 newSize){
174035173935
return sqlite3FaultSim(700) ? 0 : sqlite3_realloc(pOld, newSize);
174036173936
}
174037
-#line 1085 "parse.y"
174038173937
174039173938
174040173939
/* Construct a new Expr object from a single token */
174041173940
static Expr *tokenExpr(Parse *pParse, int op, Token t){
174042173941
Expr *p = sqlite3DbMallocRawNN(pParse->db, sizeof(Expr)+t.n+1);
@@ -174069,11 +173968,10 @@
174069173968
}
174070173969
}
174071173970
return p;
174072173971
}
174073173972
174074
-#line 1329 "parse.y"
174075173973
174076173974
/* A routine to convert a binary TK_IS or TK_ISNOT expression into a
174077173975
** unary TK_ISNULL or TK_NOTNULL expression. */
174078173976
static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
174079173977
sqlite3 *db = pParse->db;
@@ -174081,11 +173979,10 @@
174081173979
pA->op = (u8)op;
174082173980
sqlite3ExprDelete(db, pA->pRight);
174083173981
pA->pRight = 0;
174084173982
}
174085173983
}
174086
-#line 1564 "parse.y"
174087173984
174088173985
/* Add a single new term to an ExprList that is used to store a
174089173986
** list of identifiers. Report an error if the ID list contains
174090173987
** a COLLATE clause or an ASC or DESC keyword, except ignore the
174091173988
** error while parsing a legacy schema.
@@ -174105,16 +174002,14 @@
174105174002
pIdToken->n, pIdToken->z);
174106174003
}
174107174004
sqlite3ExprListSetName(pParse, p, pIdToken, 1);
174108174005
return p;
174109174006
}
174110
-#line 2048 "parse.y"
174111174007
174112174008
#if TK_SPAN>255
174113174009
# error too many tokens in the grammar
174114174010
#endif
174115
-#line 267 "parse.sql"
174116174011
/**************** End of %include directives **********************************/
174117174012
/* These constants specify the various numeric values for terminal symbols.
174118174013
***************** Begin token definitions *************************************/
174119174014
#ifndef TK_SEMI
174120174015
#define TK_SEMI 1
@@ -176295,13 +176190,11 @@
176295176190
case 240: /* selectnowith */
176296176191
case 241: /* oneselect */
176297176192
case 253: /* values */
176298176193
case 255: /* mvalues */
176299176194
{
176300
-#line 511 "parse.y"
176301176195
sqlite3SelectDelete(pParse->db, (yypminor->yy555));
176302
-#line 2453 "parse.sql"
176303176196
}
176304176197
break;
176305176198
case 217: /* term */
176306176199
case 218: /* expr */
176307176200
case 247: /* where_opt */
@@ -176312,13 +176205,11 @@
176312176205
case 285: /* vinto */
176313176206
case 292: /* when_clause */
176314176207
case 297: /* key_opt */
176315176208
case 314: /* filter_clause */
176316176209
{
176317
-#line 1083 "parse.y"
176318176210
sqlite3ExprDelete(pParse->db, (yypminor->yy454));
176319
-#line 2470 "parse.sql"
176320176211
}
176321176212
break;
176322176213
case 222: /* eidlist_opt */
176323176214
case 232: /* sortlist */
176324176215
case 233: /* eidlist */
@@ -176331,82 +176222,64 @@
176331176222
case 270: /* setlist */
176332176223
case 279: /* paren_exprlist */
176333176224
case 281: /* case_exprlist */
176334176225
case 313: /* part_opt */
176335176226
{
176336
-#line 1562 "parse.y"
176337176227
sqlite3ExprListDelete(pParse->db, (yypminor->yy14));
176338
-#line 2489 "parse.sql"
176339176228
}
176340176229
break;
176341176230
case 239: /* fullname */
176342176231
case 246: /* from */
176343176232
case 258: /* seltablist */
176344176233
case 259: /* stl_prefix */
176345176234
case 264: /* xfullname */
176346176235
{
176347
-#line 789 "parse.y"
176348176236
sqlite3SrcListDelete(pParse->db, (yypminor->yy203));
176349
-#line 2500 "parse.sql"
176350176237
}
176351176238
break;
176352176239
case 242: /* wqlist */
176353176240
{
176354
-#line 1849 "parse.y"
176355176241
sqlite3WithDelete(pParse->db, (yypminor->yy59));
176356
-#line 2507 "parse.sql"
176357176242
}
176358176243
break;
176359176244
case 252: /* window_clause */
176360176245
case 309: /* windowdefn_list */
176361176246
{
176362
-#line 1977 "parse.y"
176363176247
sqlite3WindowListDelete(pParse->db, (yypminor->yy211));
176364
-#line 2515 "parse.sql"
176365176248
}
176366176249
break;
176367176250
case 265: /* idlist */
176368176251
case 272: /* idlist_opt */
176369176252
{
176370
-#line 1068 "parse.y"
176371176253
sqlite3IdListDelete(pParse->db, (yypminor->yy132));
176372
-#line 2523 "parse.sql"
176373176254
}
176374176255
break;
176375176256
case 275: /* filter_over */
176376176257
case 310: /* windowdefn */
176377176258
case 311: /* window */
176378176259
case 312: /* frame_opt */
176379176260
case 315: /* over_clause */
176380176261
{
176381
-#line 1916 "parse.y"
176382176262
sqlite3WindowDelete(pParse->db, (yypminor->yy211));
176383
-#line 2534 "parse.sql"
176384176263
}
176385176264
break;
176386176265
case 288: /* trigger_cmd_list */
176387176266
case 293: /* trigger_cmd */
176388176267
{
176389
-#line 1677 "parse.y"
176390176268
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy427));
176391
-#line 2542 "parse.sql"
176392176269
}
176393176270
break;
176394176271
case 290: /* trigger_event */
176395176272
{
176396
-#line 1663 "parse.y"
176397176273
sqlite3IdListDelete(pParse->db, (yypminor->yy286).b);
176398
-#line 2549 "parse.sql"
176399176274
}
176400176275
break;
176401176276
case 317: /* frame_bound */
176402176277
case 318: /* frame_bound_s */
176403176278
case 319: /* frame_bound_e */
176404176279
{
176405
-#line 1921 "parse.y"
176406176280
sqlite3ExprDelete(pParse->db, (yypminor->yy509).pExpr);
176407
-#line 2558 "parse.sql"
176408176281
}
176409176282
break;
176410176283
/********* End destructor definitions *****************************************/
176411176284
default: break; /* If no destructor action specified: do nothing */
176412176285
}
@@ -176637,14 +176510,12 @@
176637176510
#endif
176638176511
while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
176639176512
/* Here code is inserted which will execute if the parser
176640176513
** stack every overflows */
176641176514
/******** Begin %stack_overflow code ******************************************/
176642
-#line 51 "parse.y"
176643176515
176644176516
sqlite3OomFault(pParse->db);
176645
-#line 2796 "parse.sql"
176646176517
/******** End %stack_overflow code ********************************************/
176647176518
sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument var */
176648176519
sqlite3ParserCTX_STORE
176649176520
}
176650176521
@@ -177571,481 +177442,330 @@
177571177442
** break;
177572177443
*/
177573177444
/********** Begin reduce actions **********************************************/
177574177445
YYMINORTYPE yylhsminor;
177575177446
case 0: /* explain ::= EXPLAIN */
177576
-#line 155 "parse.y"
177577177447
{ if( pParse->pReprepare==0 ) pParse->explain = 1; }
177578
-#line 3729 "parse.sql"
177579177448
break;
177580177449
case 1: /* explain ::= EXPLAIN QUERY PLAN */
177581
-#line 156 "parse.y"
177582177450
{ if( pParse->pReprepare==0 ) pParse->explain = 2; }
177583
-#line 3734 "parse.sql"
177584177451
break;
177585177452
case 2: /* cmdx ::= cmd */
177586
-#line 158 "parse.y"
177587177453
{ sqlite3FinishCoding(pParse); }
177588
-#line 3739 "parse.sql"
177589177454
break;
177590177455
case 3: /* cmd ::= BEGIN transtype trans_opt */
177591
-#line 163 "parse.y"
177592177456
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy144);}
177593
-#line 3744 "parse.sql"
177594177457
break;
177595177458
case 4: /* transtype ::= */
177596
-#line 168 "parse.y"
177597177459
{yymsp[1].minor.yy144 = TK_DEFERRED;}
177598
-#line 3749 "parse.sql"
177599177460
break;
177600177461
case 5: /* transtype ::= DEFERRED */
177601177462
case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
177602177463
case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
177603177464
case 324: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==324);
177604
-#line 169 "parse.y"
177605177465
{yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-X*/}
177606
-#line 3757 "parse.sql"
177607177466
break;
177608177467
case 8: /* cmd ::= COMMIT|END trans_opt */
177609177468
case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
177610
-#line 172 "parse.y"
177611177469
{sqlite3EndTransaction(pParse,yymsp[-1].major);}
177612
-#line 3763 "parse.sql"
177613177470
break;
177614177471
case 10: /* cmd ::= SAVEPOINT nm */
177615
-#line 177 "parse.y"
177616177472
{
177617177473
sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
177618177474
}
177619
-#line 3770 "parse.sql"
177620177475
break;
177621177476
case 11: /* cmd ::= RELEASE savepoint_opt nm */
177622
-#line 180 "parse.y"
177623177477
{
177624177478
sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
177625177479
}
177626
-#line 3777 "parse.sql"
177627177480
break;
177628177481
case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
177629
-#line 183 "parse.y"
177630177482
{
177631177483
sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
177632177484
}
177633
-#line 3784 "parse.sql"
177634177485
break;
177635177486
case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
177636
-#line 190 "parse.y"
177637177487
{
177638177488
sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy144,0,0,yymsp[-2].minor.yy144);
177639177489
}
177640
-#line 3791 "parse.sql"
177641177490
break;
177642177491
case 14: /* createkw ::= CREATE */
177643
-#line 193 "parse.y"
177644177492
{disableLookaside(pParse);}
177645
-#line 3796 "parse.sql"
177646177493
break;
177647177494
case 15: /* ifnotexists ::= */
177648177495
case 18: /* temp ::= */ yytestcase(yyruleno==18);
177649177496
case 47: /* autoinc ::= */ yytestcase(yyruleno==47);
177650177497
case 62: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==62);
177651177498
case 72: /* defer_subclause_opt ::= */ yytestcase(yyruleno==72);
177652177499
case 81: /* ifexists ::= */ yytestcase(yyruleno==81);
177653177500
case 100: /* distinct ::= */ yytestcase(yyruleno==100);
177654177501
case 246: /* collate ::= */ yytestcase(yyruleno==246);
177655
-#line 196 "parse.y"
177656177502
{yymsp[1].minor.yy144 = 0;}
177657
-#line 3808 "parse.sql"
177658177503
break;
177659177504
case 16: /* ifnotexists ::= IF NOT EXISTS */
177660
-#line 197 "parse.y"
177661177505
{yymsp[-2].minor.yy144 = 1;}
177662
-#line 3813 "parse.sql"
177663177506
break;
177664177507
case 17: /* temp ::= TEMP */
177665
-#line 200 "parse.y"
177666177508
{yymsp[0].minor.yy144 = pParse->db->init.busy==0;}
177667
-#line 3818 "parse.sql"
177668177509
break;
177669177510
case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_option_set */
177670
-#line 203 "parse.y"
177671177511
{
177672177512
sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy391,0);
177673177513
}
177674
-#line 3825 "parse.sql"
177675177514
break;
177676177515
case 20: /* create_table_args ::= AS select */
177677
-#line 206 "parse.y"
177678177516
{
177679177517
sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy555);
177680177518
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy555);
177681177519
}
177682
-#line 3833 "parse.sql"
177683177520
break;
177684177521
case 21: /* table_option_set ::= */
177685
-#line 212 "parse.y"
177686177522
{yymsp[1].minor.yy391 = 0;}
177687
-#line 3838 "parse.sql"
177688177523
break;
177689177524
case 22: /* table_option_set ::= table_option_set COMMA table_option */
177690
-#line 214 "parse.y"
177691177525
{yylhsminor.yy391 = yymsp[-2].minor.yy391|yymsp[0].minor.yy391;}
177692
-#line 3843 "parse.sql"
177693177526
yymsp[-2].minor.yy391 = yylhsminor.yy391;
177694177527
break;
177695177528
case 23: /* table_option ::= WITHOUT nm */
177696
-#line 215 "parse.y"
177697177529
{
177698177530
if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
177699177531
yymsp[-1].minor.yy391 = TF_WithoutRowid | TF_NoVisibleRowid;
177700177532
}else{
177701177533
yymsp[-1].minor.yy391 = 0;
177702177534
sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
177703177535
}
177704177536
}
177705
-#line 3856 "parse.sql"
177706177537
break;
177707177538
case 24: /* table_option ::= nm */
177708
-#line 223 "parse.y"
177709177539
{
177710177540
if( yymsp[0].minor.yy0.n==6 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"strict",6)==0 ){
177711177541
yylhsminor.yy391 = TF_Strict;
177712177542
}else{
177713177543
yylhsminor.yy391 = 0;
177714177544
sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
177715177545
}
177716177546
}
177717
-#line 3868 "parse.sql"
177718177547
yymsp[0].minor.yy391 = yylhsminor.yy391;
177719177548
break;
177720177549
case 25: /* columnname ::= nm typetoken */
177721
-#line 233 "parse.y"
177722177550
{sqlite3AddColumn(pParse,yymsp[-1].minor.yy0,yymsp[0].minor.yy0);}
177723
-#line 3874 "parse.sql"
177724177551
break;
177725177552
case 26: /* typetoken ::= */
177726177553
case 65: /* conslist_opt ::= */ yytestcase(yyruleno==65);
177727177554
case 106: /* as ::= */ yytestcase(yyruleno==106);
177728
-#line 327 "parse.y"
177729177555
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
177730
-#line 3881 "parse.sql"
177731177556
break;
177732177557
case 27: /* typetoken ::= typename LP signed RP */
177733
-#line 329 "parse.y"
177734177558
{
177735177559
yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
177736177560
}
177737
-#line 3888 "parse.sql"
177738177561
break;
177739177562
case 28: /* typetoken ::= typename LP signed COMMA signed RP */
177740
-#line 332 "parse.y"
177741177563
{
177742177564
yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
177743177565
}
177744
-#line 3895 "parse.sql"
177745177566
break;
177746177567
case 29: /* typename ::= typename ID|STRING */
177747
-#line 337 "parse.y"
177748177568
{yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
177749
-#line 3900 "parse.sql"
177750177569
break;
177751177570
case 30: /* scanpt ::= */
177752
-#line 355 "parse.y"
177753177571
{
177754177572
assert( yyLookahead!=YYNOCODE );
177755177573
yymsp[1].minor.yy168 = yyLookaheadToken.z;
177756177574
}
177757
-#line 3908 "parse.sql"
177758177575
break;
177759177576
case 31: /* scantok ::= */
177760
-#line 359 "parse.y"
177761177577
{
177762177578
assert( yyLookahead!=YYNOCODE );
177763177579
yymsp[1].minor.yy0 = yyLookaheadToken;
177764177580
}
177765
-#line 3916 "parse.sql"
177766177581
break;
177767177582
case 32: /* ccons ::= CONSTRAINT nm */
177768177583
case 67: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==67);
177769
-#line 369 "parse.y"
177770177584
{pParse->constraintName = yymsp[0].minor.yy0;}
177771
-#line 3922 "parse.sql"
177772177585
break;
177773177586
case 33: /* ccons ::= DEFAULT scantok term */
177774
-#line 371 "parse.y"
177775177587
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy454,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
177776
-#line 3927 "parse.sql"
177777177588
break;
177778177589
case 34: /* ccons ::= DEFAULT LP expr RP */
177779
-#line 373 "parse.y"
177780177590
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy454,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
177781
-#line 3932 "parse.sql"
177782177591
break;
177783177592
case 35: /* ccons ::= DEFAULT PLUS scantok term */
177784
-#line 375 "parse.y"
177785177593
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy454,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
177786
-#line 3937 "parse.sql"
177787177594
break;
177788177595
case 36: /* ccons ::= DEFAULT MINUS scantok term */
177789
-#line 376 "parse.y"
177790177596
{
177791177597
Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy454, 0);
177792177598
sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
177793177599
}
177794
-#line 3945 "parse.sql"
177795177600
break;
177796177601
case 37: /* ccons ::= DEFAULT scantok ID|INDEXED */
177797
-#line 380 "parse.y"
177798177602
{
177799177603
Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
177800177604
if( p ){
177801177605
sqlite3ExprIdToTrueFalse(p);
177802177606
testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
177803177607
}
177804177608
sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
177805177609
}
177806
-#line 3957 "parse.sql"
177807177610
break;
177808177611
case 38: /* ccons ::= NOT NULL onconf */
177809
-#line 393 "parse.y"
177810177612
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy144);}
177811
-#line 3962 "parse.sql"
177812177613
break;
177813177614
case 39: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
177814
-#line 395 "parse.y"
177815177615
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy144,yymsp[0].minor.yy144,yymsp[-2].minor.yy144);}
177816
-#line 3967 "parse.sql"
177817177616
break;
177818177617
case 40: /* ccons ::= UNIQUE onconf */
177819
-#line 396 "parse.y"
177820177618
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy144,0,0,0,0,
177821177619
SQLITE_IDXTYPE_UNIQUE);}
177822
-#line 3973 "parse.sql"
177823177620
break;
177824177621
case 41: /* ccons ::= CHECK LP expr RP */
177825
-#line 398 "parse.y"
177826177622
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy454,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy0.z);}
177827
-#line 3978 "parse.sql"
177828177623
break;
177829177624
case 42: /* ccons ::= REFERENCES nm eidlist_opt refargs */
177830
-#line 400 "parse.y"
177831177625
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy14,yymsp[0].minor.yy144);}
177832
-#line 3983 "parse.sql"
177833177626
break;
177834177627
case 43: /* ccons ::= defer_subclause */
177835
-#line 401 "parse.y"
177836177628
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy144);}
177837
-#line 3988 "parse.sql"
177838177629
break;
177839177630
case 44: /* ccons ::= COLLATE ID|STRING */
177840
-#line 402 "parse.y"
177841177631
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
177842
-#line 3993 "parse.sql"
177843177632
break;
177844177633
case 45: /* generated ::= LP expr RP */
177845
-#line 405 "parse.y"
177846177634
{sqlite3AddGenerated(pParse,yymsp[-1].minor.yy454,0);}
177847
-#line 3998 "parse.sql"
177848177635
break;
177849177636
case 46: /* generated ::= LP expr RP ID */
177850
-#line 406 "parse.y"
177851177637
{sqlite3AddGenerated(pParse,yymsp[-2].minor.yy454,&yymsp[0].minor.yy0);}
177852
-#line 4003 "parse.sql"
177853177638
break;
177854177639
case 48: /* autoinc ::= AUTOINCR */
177855
-#line 411 "parse.y"
177856177640
{yymsp[0].minor.yy144 = 1;}
177857
-#line 4008 "parse.sql"
177858177641
break;
177859177642
case 49: /* refargs ::= */
177860
-#line 419 "parse.y"
177861177643
{ yymsp[1].minor.yy144 = OE_None*0x0101; /* EV: R-19803-45884 */}
177862
-#line 4013 "parse.sql"
177863177644
break;
177864177645
case 50: /* refargs ::= refargs refarg */
177865
-#line 420 "parse.y"
177866177646
{ yymsp[-1].minor.yy144 = (yymsp[-1].minor.yy144 & ~yymsp[0].minor.yy383.mask) | yymsp[0].minor.yy383.value; }
177867
-#line 4018 "parse.sql"
177868177647
break;
177869177648
case 51: /* refarg ::= MATCH nm */
177870
-#line 422 "parse.y"
177871177649
{ yymsp[-1].minor.yy383.value = 0; yymsp[-1].minor.yy383.mask = 0x000000; }
177872
-#line 4023 "parse.sql"
177873177650
break;
177874177651
case 52: /* refarg ::= ON INSERT refact */
177875
-#line 423 "parse.y"
177876177652
{ yymsp[-2].minor.yy383.value = 0; yymsp[-2].minor.yy383.mask = 0x000000; }
177877
-#line 4028 "parse.sql"
177878177653
break;
177879177654
case 53: /* refarg ::= ON DELETE refact */
177880
-#line 424 "parse.y"
177881177655
{ yymsp[-2].minor.yy383.value = yymsp[0].minor.yy144; yymsp[-2].minor.yy383.mask = 0x0000ff; }
177882
-#line 4033 "parse.sql"
177883177656
break;
177884177657
case 54: /* refarg ::= ON UPDATE refact */
177885
-#line 425 "parse.y"
177886177658
{ yymsp[-2].minor.yy383.value = yymsp[0].minor.yy144<<8; yymsp[-2].minor.yy383.mask = 0x00ff00; }
177887
-#line 4038 "parse.sql"
177888177659
break;
177889177660
case 55: /* refact ::= SET NULL */
177890
-#line 427 "parse.y"
177891177661
{ yymsp[-1].minor.yy144 = OE_SetNull; /* EV: R-33326-45252 */}
177892
-#line 4043 "parse.sql"
177893177662
break;
177894177663
case 56: /* refact ::= SET DEFAULT */
177895
-#line 428 "parse.y"
177896177664
{ yymsp[-1].minor.yy144 = OE_SetDflt; /* EV: R-33326-45252 */}
177897
-#line 4048 "parse.sql"
177898177665
break;
177899177666
case 57: /* refact ::= CASCADE */
177900
-#line 429 "parse.y"
177901177667
{ yymsp[0].minor.yy144 = OE_Cascade; /* EV: R-33326-45252 */}
177902
-#line 4053 "parse.sql"
177903177668
break;
177904177669
case 58: /* refact ::= RESTRICT */
177905
-#line 430 "parse.y"
177906177670
{ yymsp[0].minor.yy144 = OE_Restrict; /* EV: R-33326-45252 */}
177907
-#line 4058 "parse.sql"
177908177671
break;
177909177672
case 59: /* refact ::= NO ACTION */
177910
-#line 431 "parse.y"
177911177673
{ yymsp[-1].minor.yy144 = OE_None; /* EV: R-33326-45252 */}
177912
-#line 4063 "parse.sql"
177913177674
break;
177914177675
case 60: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
177915
-#line 433 "parse.y"
177916177676
{yymsp[-2].minor.yy144 = 0;}
177917
-#line 4068 "parse.sql"
177918177677
break;
177919177678
case 61: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
177920177679
case 76: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==76);
177921177680
case 173: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==173);
177922
-#line 434 "parse.y"
177923177681
{yymsp[-1].minor.yy144 = yymsp[0].minor.yy144;}
177924
-#line 4075 "parse.sql"
177925177682
break;
177926177683
case 63: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
177927177684
case 80: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==80);
177928177685
case 219: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==219);
177929177686
case 222: /* in_op ::= NOT IN */ yytestcase(yyruleno==222);
177930177687
case 247: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==247);
177931
-#line 437 "parse.y"
177932177688
{yymsp[-1].minor.yy144 = 1;}
177933
-#line 4084 "parse.sql"
177934177689
break;
177935177690
case 64: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
177936
-#line 438 "parse.y"
177937177691
{yymsp[-1].minor.yy144 = 0;}
177938
-#line 4089 "parse.sql"
177939177692
break;
177940177693
case 66: /* tconscomma ::= COMMA */
177941
-#line 444 "parse.y"
177942177694
{pParse->constraintName.n = 0;}
177943
-#line 4094 "parse.sql"
177944177695
break;
177945177696
case 68: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
177946
-#line 448 "parse.y"
177947177697
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy14,yymsp[0].minor.yy144,yymsp[-2].minor.yy144,0);}
177948
-#line 4099 "parse.sql"
177949177698
break;
177950177699
case 69: /* tcons ::= UNIQUE LP sortlist RP onconf */
177951
-#line 450 "parse.y"
177952177700
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy14,yymsp[0].minor.yy144,0,0,0,0,
177953177701
SQLITE_IDXTYPE_UNIQUE);}
177954
-#line 4105 "parse.sql"
177955177702
break;
177956177703
case 70: /* tcons ::= CHECK LP expr RP onconf */
177957
-#line 453 "parse.y"
177958177704
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy454,yymsp[-3].minor.yy0.z,yymsp[-1].minor.yy0.z);}
177959
-#line 4110 "parse.sql"
177960177705
break;
177961177706
case 71: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
177962
-#line 455 "parse.y"
177963177707
{
177964177708
sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy14, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[-1].minor.yy144);
177965177709
sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy144);
177966177710
}
177967
-#line 4118 "parse.sql"
177968177711
break;
177969177712
case 73: /* onconf ::= */
177970177713
case 75: /* orconf ::= */ yytestcase(yyruleno==75);
177971
-#line 469 "parse.y"
177972177714
{yymsp[1].minor.yy144 = OE_Default;}
177973
-#line 4124 "parse.sql"
177974177715
break;
177975177716
case 74: /* onconf ::= ON CONFLICT resolvetype */
177976
-#line 470 "parse.y"
177977177717
{yymsp[-2].minor.yy144 = yymsp[0].minor.yy144;}
177978
-#line 4129 "parse.sql"
177979177718
break;
177980177719
case 77: /* resolvetype ::= IGNORE */
177981
-#line 474 "parse.y"
177982177720
{yymsp[0].minor.yy144 = OE_Ignore;}
177983
-#line 4134 "parse.sql"
177984177721
break;
177985177722
case 78: /* resolvetype ::= REPLACE */
177986177723
case 174: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==174);
177987
-#line 475 "parse.y"
177988177724
{yymsp[0].minor.yy144 = OE_Replace;}
177989
-#line 4140 "parse.sql"
177990177725
break;
177991177726
case 79: /* cmd ::= DROP TABLE ifexists fullname */
177992
-#line 479 "parse.y"
177993177727
{
177994177728
sqlite3DropTable(pParse, yymsp[0].minor.yy203, 0, yymsp[-1].minor.yy144);
177995177729
}
177996
-#line 4147 "parse.sql"
177997177730
break;
177998177731
case 82: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
177999
-#line 490 "parse.y"
178000177732
{
178001177733
sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[0].minor.yy555, yymsp[-7].minor.yy144, yymsp[-5].minor.yy144);
178002177734
}
178003
-#line 4154 "parse.sql"
178004177735
break;
178005177736
case 83: /* cmd ::= DROP VIEW ifexists fullname */
178006
-#line 493 "parse.y"
178007177737
{
178008177738
sqlite3DropTable(pParse, yymsp[0].minor.yy203, 1, yymsp[-1].minor.yy144);
178009177739
}
178010
-#line 4161 "parse.sql"
178011177740
break;
178012177741
case 84: /* cmd ::= select */
178013
-#line 500 "parse.y"
178014177742
{
178015177743
SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0, 0};
178016177744
if( (pParse->db->mDbFlags & DBFLAG_EncodingFixed)!=0
178017177745
|| sqlite3ReadSchema(pParse)==SQLITE_OK
178018177746
){
178019177747
sqlite3Select(pParse, yymsp[0].minor.yy555, &dest);
178020177748
}
178021177749
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy555);
178022177750
}
178023
-#line 4174 "parse.sql"
178024177751
break;
178025177752
case 85: /* select ::= WITH wqlist selectnowith */
178026
-#line 574 "parse.y"
178027177753
{yymsp[-2].minor.yy555 = attachWithToSelect(pParse,yymsp[0].minor.yy555,yymsp[-1].minor.yy59);}
178028
-#line 4179 "parse.sql"
178029177754
break;
178030177755
case 86: /* select ::= WITH RECURSIVE wqlist selectnowith */
178031
-#line 576 "parse.y"
178032177756
{yymsp[-3].minor.yy555 = attachWithToSelect(pParse,yymsp[0].minor.yy555,yymsp[-1].minor.yy59);}
178033
-#line 4184 "parse.sql"
178034177757
break;
178035177758
case 87: /* select ::= selectnowith */
178036
-#line 579 "parse.y"
178037177759
{
178038177760
Select *p = yymsp[0].minor.yy555;
178039177761
if( p ){
178040177762
parserDoubleLinkSelect(pParse, p);
178041177763
}
178042177764
}
178043
-#line 4194 "parse.sql"
178044177765
break;
178045177766
case 88: /* selectnowith ::= selectnowith multiselect_op oneselect */
178046
-#line 588 "parse.y"
178047177767
{
178048177768
Select *pRhs = yymsp[0].minor.yy555;
178049177769
Select *pLhs = yymsp[-2].minor.yy555;
178050177770
if( pRhs && pRhs->pPrior ){
178051177771
SrcList *pFrom;
@@ -178064,175 +177784,131 @@
178064177784
}else{
178065177785
sqlite3SelectDelete(pParse->db, pLhs);
178066177786
}
178067177787
yymsp[-2].minor.yy555 = pRhs;
178068177788
}
178069
-#line 4220 "parse.sql"
178070177789
break;
178071177790
case 89: /* multiselect_op ::= UNION */
178072177791
case 91: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==91);
178073
-#line 611 "parse.y"
178074177792
{yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-OP*/}
178075
-#line 4226 "parse.sql"
178076177793
break;
178077177794
case 90: /* multiselect_op ::= UNION ALL */
178078
-#line 612 "parse.y"
178079177795
{yymsp[-1].minor.yy144 = TK_ALL;}
178080
-#line 4231 "parse.sql"
178081177796
break;
178082177797
case 92: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
178083
-#line 618 "parse.y"
178084177798
{
178085177799
yymsp[-8].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy14,yymsp[-5].minor.yy203,yymsp[-4].minor.yy454,yymsp[-3].minor.yy14,yymsp[-2].minor.yy454,yymsp[-1].minor.yy14,yymsp[-7].minor.yy144,yymsp[0].minor.yy454);
178086177800
}
178087
-#line 4238 "parse.sql"
178088177801
break;
178089177802
case 93: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
178090
-#line 624 "parse.y"
178091177803
{
178092177804
yymsp[-9].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy14,yymsp[-6].minor.yy203,yymsp[-5].minor.yy454,yymsp[-4].minor.yy14,yymsp[-3].minor.yy454,yymsp[-1].minor.yy14,yymsp[-8].minor.yy144,yymsp[0].minor.yy454);
178093177805
if( yymsp[-9].minor.yy555 ){
178094177806
yymsp[-9].minor.yy555->pWinDefn = yymsp[-2].minor.yy211;
178095177807
}else{
178096177808
sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy211);
178097177809
}
178098177810
}
178099
-#line 4250 "parse.sql"
178100177811
break;
178101177812
case 94: /* values ::= VALUES LP nexprlist RP */
178102
-#line 640 "parse.y"
178103177813
{
178104177814
yymsp[-3].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy14,0,0,0,0,0,SF_Values,0);
178105177815
}
178106
-#line 4257 "parse.sql"
178107177816
break;
178108177817
case 95: /* oneselect ::= mvalues */
178109
-#line 647 "parse.y"
178110177818
{
178111177819
sqlite3MultiValuesEnd(pParse, yymsp[0].minor.yy555);
178112177820
}
178113
-#line 4264 "parse.sql"
178114177821
break;
178115177822
case 96: /* mvalues ::= values COMMA LP nexprlist RP */
178116177823
case 97: /* mvalues ::= mvalues COMMA LP nexprlist RP */ yytestcase(yyruleno==97);
178117
-#line 651 "parse.y"
178118177824
{
178119177825
yymsp[-4].minor.yy555 = sqlite3MultiValues(pParse, yymsp[-4].minor.yy555, yymsp[-1].minor.yy14);
178120177826
}
178121
-#line 4272 "parse.sql"
178122177827
break;
178123177828
case 98: /* distinct ::= DISTINCT */
178124
-#line 662 "parse.y"
178125177829
{yymsp[0].minor.yy144 = SF_Distinct;}
178126
-#line 4277 "parse.sql"
178127177830
break;
178128177831
case 99: /* distinct ::= ALL */
178129
-#line 663 "parse.y"
178130177832
{yymsp[0].minor.yy144 = SF_All;}
178131
-#line 4282 "parse.sql"
178132177833
break;
178133177834
case 101: /* sclp ::= */
178134177835
case 134: /* orderby_opt ::= */ yytestcase(yyruleno==134);
178135177836
case 144: /* groupby_opt ::= */ yytestcase(yyruleno==144);
178136177837
case 234: /* exprlist ::= */ yytestcase(yyruleno==234);
178137177838
case 237: /* paren_exprlist ::= */ yytestcase(yyruleno==237);
178138177839
case 242: /* eidlist_opt ::= */ yytestcase(yyruleno==242);
178139
-#line 676 "parse.y"
178140177840
{yymsp[1].minor.yy14 = 0;}
178141
-#line 4292 "parse.sql"
178142177841
break;
178143177842
case 102: /* selcollist ::= sclp scanpt expr scanpt as */
178144
-#line 677 "parse.y"
178145177843
{
178146177844
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[-2].minor.yy454);
178147177845
if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy14, &yymsp[0].minor.yy0, 1);
178148177846
sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy14,yymsp[-3].minor.yy168,yymsp[-1].minor.yy168);
178149177847
}
178150
-#line 4301 "parse.sql"
178151177848
break;
178152177849
case 103: /* selcollist ::= sclp scanpt STAR */
178153
-#line 682 "parse.y"
178154177850
{
178155177851
Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
178156177852
sqlite3ExprSetErrorOffset(p, (int)(yymsp[0].minor.yy0.z - pParse->zTail));
178157177853
yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy14, p);
178158177854
}
178159
-#line 4310 "parse.sql"
178160177855
break;
178161177856
case 104: /* selcollist ::= sclp scanpt nm DOT STAR */
178162
-#line 687 "parse.y"
178163177857
{
178164177858
Expr *pRight, *pLeft, *pDot;
178165177859
pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
178166177860
sqlite3ExprSetErrorOffset(pRight, (int)(yymsp[0].minor.yy0.z - pParse->zTail));
178167177861
pLeft = tokenExpr(pParse, TK_ID, yymsp[-2].minor.yy0);
178168177862
pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
178169177863
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, pDot);
178170177864
}
178171
-#line 4322 "parse.sql"
178172177865
break;
178173177866
case 105: /* as ::= AS nm */
178174177867
case 117: /* dbnm ::= DOT nm */ yytestcase(yyruleno==117);
178175177868
case 258: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==258);
178176177869
case 259: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==259);
178177
-#line 700 "parse.y"
178178177870
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
178179
-#line 4330 "parse.sql"
178180177871
break;
178181177872
case 107: /* from ::= */
178182177873
case 110: /* stl_prefix ::= */ yytestcase(yyruleno==110);
178183
-#line 714 "parse.y"
178184177874
{yymsp[1].minor.yy203 = 0;}
178185
-#line 4336 "parse.sql"
178186177875
break;
178187177876
case 108: /* from ::= FROM seltablist */
178188
-#line 715 "parse.y"
178189177877
{
178190177878
yymsp[-1].minor.yy203 = yymsp[0].minor.yy203;
178191177879
sqlite3SrcListShiftJoinType(pParse,yymsp[-1].minor.yy203);
178192177880
}
178193
-#line 4344 "parse.sql"
178194177881
break;
178195177882
case 109: /* stl_prefix ::= seltablist joinop */
178196
-#line 723 "parse.y"
178197177883
{
178198177884
if( ALWAYS(yymsp[-1].minor.yy203 && yymsp[-1].minor.yy203->nSrc>0) ) yymsp[-1].minor.yy203->a[yymsp[-1].minor.yy203->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy144;
178199177885
}
178200
-#line 4351 "parse.sql"
178201177886
break;
178202177887
case 111: /* seltablist ::= stl_prefix nm dbnm as on_using */
178203
-#line 727 "parse.y"
178204177888
{
178205177889
yymsp[-4].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-4].minor.yy203,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
178206177890
}
178207
-#line 4358 "parse.sql"
178208177891
break;
178209177892
case 112: /* seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
178210
-#line 730 "parse.y"
178211177893
{
178212177894
yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,0,&yymsp[0].minor.yy269);
178213177895
sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy203, &yymsp[-1].minor.yy0);
178214177896
}
178215
-#line 4366 "parse.sql"
178216177897
break;
178217177898
case 113: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
178218
-#line 734 "parse.y"
178219177899
{
178220177900
yymsp[-7].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-7].minor.yy203,&yymsp[-6].minor.yy0,&yymsp[-5].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
178221177901
sqlite3SrcListFuncArgs(pParse, yymsp[-7].minor.yy203, yymsp[-3].minor.yy14);
178222177902
}
178223
-#line 4374 "parse.sql"
178224177903
break;
178225177904
case 114: /* seltablist ::= stl_prefix LP select RP as on_using */
178226
-#line 739 "parse.y"
178227177905
{
178228177906
yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,yymsp[-3].minor.yy555,&yymsp[0].minor.yy269);
178229177907
}
178230
-#line 4381 "parse.sql"
178231177908
break;
178232177909
case 115: /* seltablist ::= stl_prefix LP seltablist RP as on_using */
178233
-#line 742 "parse.y"
178234177910
{
178235177911
if( yymsp[-5].minor.yy203==0 && yymsp[-1].minor.yy0.n==0 && yymsp[0].minor.yy269.pOn==0 && yymsp[0].minor.yy269.pUsing==0 ){
178236177912
yymsp[-5].minor.yy203 = yymsp[-3].minor.yy203;
178237177913
}else if( ALWAYS(yymsp[-3].minor.yy203!=0) && yymsp[-3].minor.yy203->nSrc==1 ){
178238177914
yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
@@ -178269,210 +177945,144 @@
178269177945
sqlite3SrcListShiftJoinType(pParse,yymsp[-3].minor.yy203);
178270177946
pSubquery = sqlite3SelectNew(pParse,0,yymsp[-3].minor.yy203,0,0,0,0,SF_NestedFrom,0);
178271177947
yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,pSubquery,&yymsp[0].minor.yy269);
178272177948
}
178273177949
}
178274
-#line 4425 "parse.sql"
178275177950
break;
178276177951
case 116: /* dbnm ::= */
178277177952
case 131: /* indexed_opt ::= */ yytestcase(yyruleno==131);
178278
-#line 785 "parse.y"
178279177953
{yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
178280
-#line 4431 "parse.sql"
178281177954
break;
178282177955
case 118: /* fullname ::= nm */
178283
-#line 790 "parse.y"
178284177956
{
178285177957
yylhsminor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
178286177958
if( IN_RENAME_OBJECT && yylhsminor.yy203 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy203->a[0].zName, &yymsp[0].minor.yy0);
178287177959
}
178288
-#line 4439 "parse.sql"
178289177960
yymsp[0].minor.yy203 = yylhsminor.yy203;
178290177961
break;
178291177962
case 119: /* fullname ::= nm DOT nm */
178292
-#line 794 "parse.y"
178293177963
{
178294177964
yylhsminor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
178295177965
if( IN_RENAME_OBJECT && yylhsminor.yy203 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy203->a[0].zName, &yymsp[0].minor.yy0);
178296177966
}
178297
-#line 4448 "parse.sql"
178298177967
yymsp[-2].minor.yy203 = yylhsminor.yy203;
178299177968
break;
178300177969
case 120: /* xfullname ::= nm */
178301
-#line 802 "parse.y"
178302177970
{yymsp[0].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
178303
-#line 4454 "parse.sql"
178304177971
break;
178305177972
case 121: /* xfullname ::= nm DOT nm */
178306
-#line 804 "parse.y"
178307177973
{yymsp[-2].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
178308
-#line 4459 "parse.sql"
178309177974
break;
178310177975
case 122: /* xfullname ::= nm DOT nm AS nm */
178311
-#line 805 "parse.y"
178312177976
{
178313177977
yymsp[-4].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
178314177978
if( yymsp[-4].minor.yy203 ) yymsp[-4].minor.yy203->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
178315177979
}
178316
-#line 4467 "parse.sql"
178317177980
break;
178318177981
case 123: /* xfullname ::= nm AS nm */
178319
-#line 809 "parse.y"
178320177982
{
178321177983
yymsp[-2].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
178322177984
if( yymsp[-2].minor.yy203 ) yymsp[-2].minor.yy203->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
178323177985
}
178324
-#line 4475 "parse.sql"
178325177986
break;
178326177987
case 124: /* joinop ::= COMMA|JOIN */
178327
-#line 815 "parse.y"
178328177988
{ yymsp[0].minor.yy144 = JT_INNER; }
178329
-#line 4480 "parse.sql"
178330177989
break;
178331177990
case 125: /* joinop ::= JOIN_KW JOIN */
178332
-#line 817 "parse.y"
178333177991
{yymsp[-1].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); /*X-overwrites-A*/}
178334
-#line 4485 "parse.sql"
178335177992
break;
178336177993
case 126: /* joinop ::= JOIN_KW nm JOIN */
178337
-#line 819 "parse.y"
178338177994
{yymsp[-2].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
178339
-#line 4490 "parse.sql"
178340177995
break;
178341177996
case 127: /* joinop ::= JOIN_KW nm nm JOIN */
178342
-#line 821 "parse.y"
178343177997
{yymsp[-3].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
178344
-#line 4495 "parse.sql"
178345177998
break;
178346177999
case 128: /* on_using ::= ON expr */
178347
-#line 842 "parse.y"
178348178000
{yymsp[-1].minor.yy269.pOn = yymsp[0].minor.yy454; yymsp[-1].minor.yy269.pUsing = 0;}
178349
-#line 4500 "parse.sql"
178350178001
break;
178351178002
case 129: /* on_using ::= USING LP idlist RP */
178352
-#line 843 "parse.y"
178353178003
{yymsp[-3].minor.yy269.pOn = 0; yymsp[-3].minor.yy269.pUsing = yymsp[-1].minor.yy132;}
178354
-#line 4505 "parse.sql"
178355178004
break;
178356178005
case 130: /* on_using ::= */
178357
-#line 844 "parse.y"
178358178006
{yymsp[1].minor.yy269.pOn = 0; yymsp[1].minor.yy269.pUsing = 0;}
178359
-#line 4510 "parse.sql"
178360178007
break;
178361178008
case 132: /* indexed_by ::= INDEXED BY nm */
178362
-#line 860 "parse.y"
178363178009
{yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
178364
-#line 4515 "parse.sql"
178365178010
break;
178366178011
case 133: /* indexed_by ::= NOT INDEXED */
178367
-#line 861 "parse.y"
178368178012
{yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
178369
-#line 4520 "parse.sql"
178370178013
break;
178371178014
case 135: /* orderby_opt ::= ORDER BY sortlist */
178372178015
case 145: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==145);
178373
-#line 874 "parse.y"
178374178016
{yymsp[-2].minor.yy14 = yymsp[0].minor.yy14;}
178375
-#line 4526 "parse.sql"
178376178017
break;
178377178018
case 136: /* sortlist ::= sortlist COMMA expr sortorder nulls */
178378
-#line 875 "parse.y"
178379178019
{
178380178020
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14,yymsp[-2].minor.yy454);
178381178021
sqlite3ExprListSetSortOrder(yymsp[-4].minor.yy14,yymsp[-1].minor.yy144,yymsp[0].minor.yy144);
178382178022
}
178383
-#line 4534 "parse.sql"
178384178023
break;
178385178024
case 137: /* sortlist ::= expr sortorder nulls */
178386
-#line 879 "parse.y"
178387178025
{
178388178026
yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[-2].minor.yy454); /*A-overwrites-Y*/
178389178027
sqlite3ExprListSetSortOrder(yymsp[-2].minor.yy14,yymsp[-1].minor.yy144,yymsp[0].minor.yy144);
178390178028
}
178391
-#line 4542 "parse.sql"
178392178029
break;
178393178030
case 138: /* sortorder ::= ASC */
178394
-#line 886 "parse.y"
178395178031
{yymsp[0].minor.yy144 = SQLITE_SO_ASC;}
178396
-#line 4547 "parse.sql"
178397178032
break;
178398178033
case 139: /* sortorder ::= DESC */
178399
-#line 887 "parse.y"
178400178034
{yymsp[0].minor.yy144 = SQLITE_SO_DESC;}
178401
-#line 4552 "parse.sql"
178402178035
break;
178403178036
case 140: /* sortorder ::= */
178404178037
case 143: /* nulls ::= */ yytestcase(yyruleno==143);
178405
-#line 888 "parse.y"
178406178038
{yymsp[1].minor.yy144 = SQLITE_SO_UNDEFINED;}
178407
-#line 4558 "parse.sql"
178408178039
break;
178409178040
case 141: /* nulls ::= NULLS FIRST */
178410
-#line 891 "parse.y"
178411178041
{yymsp[-1].minor.yy144 = SQLITE_SO_ASC;}
178412
-#line 4563 "parse.sql"
178413178042
break;
178414178043
case 142: /* nulls ::= NULLS LAST */
178415
-#line 892 "parse.y"
178416178044
{yymsp[-1].minor.yy144 = SQLITE_SO_DESC;}
178417
-#line 4568 "parse.sql"
178418178045
break;
178419178046
case 146: /* having_opt ::= */
178420178047
case 148: /* limit_opt ::= */ yytestcase(yyruleno==148);
178421178048
case 153: /* where_opt ::= */ yytestcase(yyruleno==153);
178422178049
case 155: /* where_opt_ret ::= */ yytestcase(yyruleno==155);
178423178050
case 232: /* case_else ::= */ yytestcase(yyruleno==232);
178424178051
case 233: /* case_operand ::= */ yytestcase(yyruleno==233);
178425178052
case 252: /* vinto ::= */ yytestcase(yyruleno==252);
178426
-#line 902 "parse.y"
178427178053
{yymsp[1].minor.yy454 = 0;}
178428
-#line 4579 "parse.sql"
178429178054
break;
178430178055
case 147: /* having_opt ::= HAVING expr */
178431178056
case 154: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==154);
178432178057
case 156: /* where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==156);
178433178058
case 231: /* case_else ::= ELSE expr */ yytestcase(yyruleno==231);
178434178059
case 251: /* vinto ::= INTO expr */ yytestcase(yyruleno==251);
178435
-#line 903 "parse.y"
178436178060
{yymsp[-1].minor.yy454 = yymsp[0].minor.yy454;}
178437
-#line 4588 "parse.sql"
178438178061
break;
178439178062
case 149: /* limit_opt ::= LIMIT expr */
178440
-#line 917 "parse.y"
178441178063
{yymsp[-1].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy454,0);}
178442
-#line 4593 "parse.sql"
178443178064
break;
178444178065
case 150: /* limit_opt ::= LIMIT expr OFFSET expr */
178445
-#line 919 "parse.y"
178446178066
{yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
178447
-#line 4598 "parse.sql"
178448178067
break;
178449178068
case 151: /* limit_opt ::= LIMIT expr COMMA expr */
178450
-#line 921 "parse.y"
178451178069
{yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy454,yymsp[-2].minor.yy454);}
178452
-#line 4603 "parse.sql"
178453178070
break;
178454178071
case 152: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
178455
-#line 939 "parse.y"
178456178072
{
178457178073
sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy203, &yymsp[-1].minor.yy0);
178458178074
sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy203,yymsp[0].minor.yy454,0,0);
178459178075
}
178460
-#line 4611 "parse.sql"
178461178076
break;
178462178077
case 157: /* where_opt_ret ::= RETURNING selcollist */
178463
-#line 955 "parse.y"
178464178078
{sqlite3AddReturning(pParse,yymsp[0].minor.yy14); yymsp[-1].minor.yy454 = 0;}
178465
-#line 4616 "parse.sql"
178466178079
break;
178467178080
case 158: /* where_opt_ret ::= WHERE expr RETURNING selcollist */
178468
-#line 957 "parse.y"
178469178081
{sqlite3AddReturning(pParse,yymsp[0].minor.yy14); yymsp[-3].minor.yy454 = yymsp[-2].minor.yy454;}
178470
-#line 4621 "parse.sql"
178471178082
break;
178472178083
case 159: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
178473
-#line 989 "parse.y"
178474178084
{
178475178085
sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy203, &yymsp[-4].minor.yy0);
178476178086
sqlite3ExprListCheckLength(pParse,yymsp[-2].minor.yy14,"set list");
178477178087
if( yymsp[-1].minor.yy203 ){
178478178088
SrcList *pFromClause = yymsp[-1].minor.yy203;
@@ -178486,134 +178096,92 @@
178486178096
}
178487178097
yymsp[-5].minor.yy203 = sqlite3SrcListAppendList(pParse, yymsp[-5].minor.yy203, pFromClause);
178488178098
}
178489178099
sqlite3Update(pParse,yymsp[-5].minor.yy203,yymsp[-2].minor.yy14,yymsp[0].minor.yy454,yymsp[-6].minor.yy144,0,0,0);
178490178100
}
178491
-#line 4642 "parse.sql"
178492178101
break;
178493178102
case 160: /* setlist ::= setlist COMMA nm EQ expr */
178494
-#line 1013 "parse.y"
178495178103
{
178496178104
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[0].minor.yy454);
178497178105
sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy14, &yymsp[-2].minor.yy0, 1);
178498178106
}
178499
-#line 4650 "parse.sql"
178500178107
break;
178501178108
case 161: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
178502
-#line 1017 "parse.y"
178503178109
{
178504178110
yymsp[-6].minor.yy14 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy14, yymsp[-3].minor.yy132, yymsp[0].minor.yy454);
178505178111
}
178506
-#line 4657 "parse.sql"
178507178112
break;
178508178113
case 162: /* setlist ::= nm EQ expr */
178509
-#line 1020 "parse.y"
178510178114
{
178511178115
yylhsminor.yy14 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy454);
178512178116
sqlite3ExprListSetName(pParse, yylhsminor.yy14, &yymsp[-2].minor.yy0, 1);
178513178117
}
178514
-#line 4665 "parse.sql"
178515178118
yymsp[-2].minor.yy14 = yylhsminor.yy14;
178516178119
break;
178517178120
case 163: /* setlist ::= LP idlist RP EQ expr */
178518
-#line 1024 "parse.y"
178519178121
{
178520178122
yymsp[-4].minor.yy14 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy132, yymsp[0].minor.yy454);
178521178123
}
178522
-#line 4673 "parse.sql"
178523178124
break;
178524178125
case 164: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
178525
-#line 1031 "parse.y"
178526178126
{
178527178127
sqlite3Insert(pParse, yymsp[-3].minor.yy203, yymsp[-1].minor.yy555, yymsp[-2].minor.yy132, yymsp[-5].minor.yy144, yymsp[0].minor.yy122);
178528178128
}
178529
-#line 4680 "parse.sql"
178530178129
break;
178531178130
case 165: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
178532
-#line 1035 "parse.y"
178533178131
{
178534178132
sqlite3Insert(pParse, yymsp[-4].minor.yy203, 0, yymsp[-3].minor.yy132, yymsp[-6].minor.yy144, 0);
178535178133
}
178536
-#line 4687 "parse.sql"
178537178134
break;
178538178135
case 166: /* upsert ::= */
178539
-#line 1046 "parse.y"
178540178136
{ yymsp[1].minor.yy122 = 0; }
178541
-#line 4692 "parse.sql"
178542178137
break;
178543178138
case 167: /* upsert ::= RETURNING selcollist */
178544
-#line 1047 "parse.y"
178545178139
{ yymsp[-1].minor.yy122 = 0; sqlite3AddReturning(pParse,yymsp[0].minor.yy14); }
178546
-#line 4697 "parse.sql"
178547178140
break;
178548178141
case 168: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
178549
-#line 1050 "parse.y"
178550178142
{ yymsp[-11].minor.yy122 = sqlite3UpsertNew(pParse->db,yymsp[-8].minor.yy14,yymsp[-6].minor.yy454,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454,yymsp[0].minor.yy122);}
178551
-#line 4702 "parse.sql"
178552178143
break;
178553178144
case 169: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
178554
-#line 1052 "parse.y"
178555178145
{ yymsp[-8].minor.yy122 = sqlite3UpsertNew(pParse->db,yymsp[-5].minor.yy14,yymsp[-3].minor.yy454,0,0,yymsp[0].minor.yy122); }
178556
-#line 4707 "parse.sql"
178557178146
break;
178558178147
case 170: /* upsert ::= ON CONFLICT DO NOTHING returning */
178559
-#line 1054 "parse.y"
178560178148
{ yymsp[-4].minor.yy122 = sqlite3UpsertNew(pParse->db,0,0,0,0,0); }
178561
-#line 4712 "parse.sql"
178562178149
break;
178563178150
case 171: /* upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
178564
-#line 1056 "parse.y"
178565178151
{ yymsp[-7].minor.yy122 = sqlite3UpsertNew(pParse->db,0,0,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454,0);}
178566
-#line 4717 "parse.sql"
178567178152
break;
178568178153
case 172: /* returning ::= RETURNING selcollist */
178569
-#line 1058 "parse.y"
178570178154
{sqlite3AddReturning(pParse,yymsp[0].minor.yy14);}
178571
-#line 4722 "parse.sql"
178572178155
break;
178573178156
case 175: /* idlist_opt ::= */
178574
-#line 1070 "parse.y"
178575178157
{yymsp[1].minor.yy132 = 0;}
178576
-#line 4727 "parse.sql"
178577178158
break;
178578178159
case 176: /* idlist_opt ::= LP idlist RP */
178579
-#line 1071 "parse.y"
178580178160
{yymsp[-2].minor.yy132 = yymsp[-1].minor.yy132;}
178581
-#line 4732 "parse.sql"
178582178161
break;
178583178162
case 177: /* idlist ::= idlist COMMA nm */
178584
-#line 1073 "parse.y"
178585178163
{yymsp[-2].minor.yy132 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy132,&yymsp[0].minor.yy0);}
178586
-#line 4737 "parse.sql"
178587178164
break;
178588178165
case 178: /* idlist ::= nm */
178589
-#line 1075 "parse.y"
178590178166
{yymsp[0].minor.yy132 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
178591
-#line 4742 "parse.sql"
178592178167
break;
178593178168
case 179: /* expr ::= LP expr RP */
178594
-#line 1124 "parse.y"
178595178169
{yymsp[-2].minor.yy454 = yymsp[-1].minor.yy454;}
178596
-#line 4747 "parse.sql"
178597178170
break;
178598178171
case 180: /* expr ::= ID|INDEXED|JOIN_KW */
178599
-#line 1125 "parse.y"
178600178172
{yymsp[0].minor.yy454=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
178601
-#line 4752 "parse.sql"
178602178173
break;
178603178174
case 181: /* expr ::= nm DOT nm */
178604
-#line 1126 "parse.y"
178605178175
{
178606178176
Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);
178607178177
Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);
178608178178
yylhsminor.yy454 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
178609178179
}
178610
-#line 4761 "parse.sql"
178611178180
yymsp[-2].minor.yy454 = yylhsminor.yy454;
178612178181
break;
178613178182
case 182: /* expr ::= nm DOT nm DOT nm */
178614
-#line 1131 "parse.y"
178615178183
{
178616178184
Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-4].minor.yy0);
178617178185
Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);
178618178186
Expr *temp3 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);
178619178187
Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
@@ -178620,30 +178188,24 @@
178620178188
if( IN_RENAME_OBJECT ){
178621178189
sqlite3RenameTokenRemap(pParse, 0, temp1);
178622178190
}
178623178191
yylhsminor.yy454 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
178624178192
}
178625
-#line 4776 "parse.sql"
178626178193
yymsp[-4].minor.yy454 = yylhsminor.yy454;
178627178194
break;
178628178195
case 183: /* term ::= NULL|FLOAT|BLOB */
178629178196
case 184: /* term ::= STRING */ yytestcase(yyruleno==184);
178630
-#line 1141 "parse.y"
178631178197
{yymsp[0].minor.yy454=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
178632
-#line 4783 "parse.sql"
178633178198
break;
178634178199
case 185: /* term ::= INTEGER */
178635
-#line 1143 "parse.y"
178636178200
{
178637178201
yylhsminor.yy454 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
178638178202
if( yylhsminor.yy454 ) yylhsminor.yy454->w.iOfst = (int)(yymsp[0].minor.yy0.z - pParse->zTail);
178639178203
}
178640
-#line 4791 "parse.sql"
178641178204
yymsp[0].minor.yy454 = yylhsminor.yy454;
178642178205
break;
178643178206
case 186: /* expr ::= VARIABLE */
178644
-#line 1147 "parse.y"
178645178207
{
178646178208
if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
178647178209
u32 n = yymsp[0].minor.yy0.n;
178648178210
yymsp[0].minor.yy454 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
178649178211
sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy454, n);
@@ -178660,90 +178222,70 @@
178660178222
yymsp[0].minor.yy454 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
178661178223
if( yymsp[0].minor.yy454 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy454->iTable);
178662178224
}
178663178225
}
178664178226
}
178665
-#line 4816 "parse.sql"
178666178227
break;
178667178228
case 187: /* expr ::= expr COLLATE ID|STRING */
178668
-#line 1167 "parse.y"
178669178229
{
178670178230
yymsp[-2].minor.yy454 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy454, &yymsp[0].minor.yy0, 1);
178671178231
}
178672
-#line 4823 "parse.sql"
178673178232
break;
178674178233
case 188: /* expr ::= CAST LP expr AS typetoken RP */
178675
-#line 1171 "parse.y"
178676178234
{
178677178235
yymsp[-5].minor.yy454 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
178678178236
sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy454, yymsp[-3].minor.yy454, 0);
178679178237
}
178680
-#line 4831 "parse.sql"
178681178238
break;
178682178239
case 189: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */
178683
-#line 1178 "parse.y"
178684178240
{
178685178241
yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy14, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy144);
178686178242
}
178687
-#line 4838 "parse.sql"
178688178243
yymsp[-4].minor.yy454 = yylhsminor.yy454;
178689178244
break;
178690178245
case 190: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */
178691
-#line 1181 "parse.y"
178692178246
{
178693178247
yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-4].minor.yy14, &yymsp[-7].minor.yy0, yymsp[-5].minor.yy144);
178694178248
sqlite3ExprAddFunctionOrderBy(pParse, yylhsminor.yy454, yymsp[-1].minor.yy14);
178695178249
}
178696
-#line 4847 "parse.sql"
178697178250
yymsp[-7].minor.yy454 = yylhsminor.yy454;
178698178251
break;
178699178252
case 191: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP */
178700
-#line 1185 "parse.y"
178701178253
{
178702178254
yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
178703178255
}
178704
-#line 4855 "parse.sql"
178705178256
yymsp[-3].minor.yy454 = yylhsminor.yy454;
178706178257
break;
178707178258
case 192: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */
178708
-#line 1249 "parse.y"
178709178259
{
178710178260
yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy14, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy144);
178711178261
sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
178712178262
}
178713
-#line 4864 "parse.sql"
178714178263
yymsp[-5].minor.yy454 = yylhsminor.yy454;
178715178264
break;
178716178265
case 193: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */
178717
-#line 1253 "parse.y"
178718178266
{
178719178267
yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-5].minor.yy14, &yymsp[-8].minor.yy0, yymsp[-6].minor.yy144);
178720178268
sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
178721178269
sqlite3ExprAddFunctionOrderBy(pParse, yylhsminor.yy454, yymsp[-2].minor.yy14);
178722178270
}
178723
-#line 4874 "parse.sql"
178724178271
yymsp[-8].minor.yy454 = yylhsminor.yy454;
178725178272
break;
178726178273
case 194: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */
178727
-#line 1258 "parse.y"
178728178274
{
178729178275
yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
178730178276
sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
178731178277
}
178732
-#line 4883 "parse.sql"
178733178278
yymsp[-4].minor.yy454 = yylhsminor.yy454;
178734178279
break;
178735178280
case 195: /* term ::= CTIME_KW */
178736
-#line 1272 "parse.y"
178737178281
{
178738178282
yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
178739178283
}
178740
-#line 4891 "parse.sql"
178741178284
yymsp[0].minor.yy454 = yylhsminor.yy454;
178742178285
break;
178743178286
case 196: /* expr ::= LP nexprlist COMMA expr RP */
178744
-#line 1276 "parse.y"
178745178287
{
178746178288
ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy14, yymsp[-1].minor.yy454);
178747178289
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
178748178290
if( yymsp[-4].minor.yy454 ){
178749178291
yymsp[-4].minor.yy454->x.pList = pList;
@@ -178752,35 +178294,27 @@
178752178294
}
178753178295
}else{
178754178296
sqlite3ExprListDelete(pParse->db, pList);
178755178297
}
178756178298
}
178757
-#line 4908 "parse.sql"
178758178299
break;
178759178300
case 197: /* expr ::= expr AND expr */
178760
-#line 1289 "parse.y"
178761178301
{yymsp[-2].minor.yy454=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
178762
-#line 4913 "parse.sql"
178763178302
break;
178764178303
case 198: /* expr ::= expr OR expr */
178765178304
case 199: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==199);
178766178305
case 200: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==200);
178767178306
case 201: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==201);
178768178307
case 202: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==202);
178769178308
case 203: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==203);
178770178309
case 204: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==204);
178771
-#line 1290 "parse.y"
178772178310
{yymsp[-2].minor.yy454=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
178773
-#line 4924 "parse.sql"
178774178311
break;
178775178312
case 205: /* likeop ::= NOT LIKE_KW|MATCH */
178776
-#line 1303 "parse.y"
178777178313
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
178778
-#line 4929 "parse.sql"
178779178314
break;
178780178315
case 206: /* expr ::= expr likeop expr */
178781
-#line 1304 "parse.y"
178782178316
{
178783178317
ExprList *pList;
178784178318
int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
178785178319
yymsp[-1].minor.yy0.n &= 0x7fffffff;
178786178320
pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy454);
@@ -178787,14 +178321,12 @@
178787178321
pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy454);
178788178322
yymsp[-2].minor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
178789178323
if( bNot ) yymsp[-2].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy454, 0);
178790178324
if( yymsp[-2].minor.yy454 ) yymsp[-2].minor.yy454->flags |= EP_InfixFunc;
178791178325
}
178792
-#line 4943 "parse.sql"
178793178326
break;
178794178327
case 207: /* expr ::= expr likeop expr ESCAPE expr */
178795
-#line 1314 "parse.y"
178796178328
{
178797178329
ExprList *pList;
178798178330
int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
178799178331
yymsp[-3].minor.yy0.n &= 0x7fffffff;
178800178332
pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
@@ -178802,62 +178334,46 @@
178802178334
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy454);
178803178335
yymsp[-4].minor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
178804178336
if( bNot ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178805178337
if( yymsp[-4].minor.yy454 ) yymsp[-4].minor.yy454->flags |= EP_InfixFunc;
178806178338
}
178807
-#line 4958 "parse.sql"
178808178339
break;
178809178340
case 208: /* expr ::= expr ISNULL|NOTNULL */
178810
-#line 1326 "parse.y"
178811178341
{yymsp[-1].minor.yy454 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy454,0);}
178812
-#line 4963 "parse.sql"
178813178342
break;
178814178343
case 209: /* expr ::= expr NOT NULL */
178815
-#line 1327 "parse.y"
178816178344
{yymsp[-2].minor.yy454 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy454,0);}
178817
-#line 4968 "parse.sql"
178818178345
break;
178819178346
case 210: /* expr ::= expr IS expr */
178820
-#line 1348 "parse.y"
178821178347
{
178822178348
yymsp[-2].minor.yy454 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);
178823178349
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-2].minor.yy454, TK_ISNULL);
178824178350
}
178825
-#line 4976 "parse.sql"
178826178351
break;
178827178352
case 211: /* expr ::= expr IS NOT expr */
178828
-#line 1352 "parse.y"
178829178353
{
178830178354
yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy454,yymsp[0].minor.yy454);
178831178355
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-3].minor.yy454, TK_NOTNULL);
178832178356
}
178833
-#line 4984 "parse.sql"
178834178357
break;
178835178358
case 212: /* expr ::= expr IS NOT DISTINCT FROM expr */
178836
-#line 1356 "parse.y"
178837178359
{
178838178360
yymsp[-5].minor.yy454 = sqlite3PExpr(pParse,TK_IS,yymsp[-5].minor.yy454,yymsp[0].minor.yy454);
178839178361
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-5].minor.yy454, TK_ISNULL);
178840178362
}
178841
-#line 4992 "parse.sql"
178842178363
break;
178843178364
case 213: /* expr ::= expr IS DISTINCT FROM expr */
178844
-#line 1360 "parse.y"
178845178365
{
178846178366
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-4].minor.yy454,yymsp[0].minor.yy454);
178847178367
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-4].minor.yy454, TK_NOTNULL);
178848178368
}
178849
-#line 5000 "parse.sql"
178850178369
break;
178851178370
case 214: /* expr ::= NOT expr */
178852178371
case 215: /* expr ::= BITNOT expr */ yytestcase(yyruleno==215);
178853
-#line 1366 "parse.y"
178854178372
{yymsp[-1].minor.yy454 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy454, 0);/*A-overwrites-B*/}
178855
-#line 5006 "parse.sql"
178856178373
break;
178857178374
case 216: /* expr ::= PLUS|MINUS expr */
178858
-#line 1369 "parse.y"
178859178375
{
178860178376
Expr *p = yymsp[0].minor.yy454;
178861178377
u8 op = yymsp[-1].major + (TK_UPLUS-TK_PLUS);
178862178378
assert( TK_UPLUS>TK_PLUS );
178863178379
assert( TK_UMINUS == TK_MINUS + (TK_UPLUS - TK_PLUS) );
@@ -178867,30 +178383,24 @@
178867178383
}else{
178868178384
yymsp[-1].minor.yy454 = sqlite3PExpr(pParse, op, p, 0);
178869178385
/*A-overwrites-B*/
178870178386
}
178871178387
}
178872
-#line 5023 "parse.sql"
178873178388
break;
178874178389
case 217: /* expr ::= expr PTR expr */
178875
-#line 1383 "parse.y"
178876178390
{
178877178391
ExprList *pList = sqlite3ExprListAppend(pParse, 0, yymsp[-2].minor.yy454);
178878178392
pList = sqlite3ExprListAppend(pParse, pList, yymsp[0].minor.yy454);
178879178393
yylhsminor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
178880178394
}
178881
-#line 5032 "parse.sql"
178882178395
yymsp[-2].minor.yy454 = yylhsminor.yy454;
178883178396
break;
178884178397
case 218: /* between_op ::= BETWEEN */
178885178398
case 221: /* in_op ::= IN */ yytestcase(yyruleno==221);
178886
-#line 1390 "parse.y"
178887178399
{yymsp[0].minor.yy144 = 0;}
178888
-#line 5039 "parse.sql"
178889178400
break;
178890178401
case 220: /* expr ::= expr between_op expr AND expr */
178891
-#line 1392 "parse.y"
178892178402
{
178893178403
ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
178894178404
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy454);
178895178405
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy454, 0);
178896178406
if( yymsp[-4].minor.yy454 ){
@@ -178898,14 +178408,12 @@
178898178408
}else{
178899178409
sqlite3ExprListDelete(pParse->db, pList);
178900178410
}
178901178411
if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178902178412
}
178903
-#line 5054 "parse.sql"
178904178413
break;
178905178414
case 223: /* expr ::= expr in_op LP exprlist RP */
178906
-#line 1407 "parse.y"
178907178415
{
178908178416
if( yymsp[-1].minor.yy14==0 ){
178909178417
/* Expressions of the form
178910178418
**
178911178419
** expr1 IN ()
@@ -178946,52 +178454,42 @@
178946178454
}
178947178455
}
178948178456
if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178949178457
}
178950178458
}
178951
-#line 5102 "parse.sql"
178952178459
break;
178953178460
case 224: /* expr ::= LP select RP */
178954
-#line 1451 "parse.y"
178955178461
{
178956178462
yymsp[-2].minor.yy454 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
178957178463
sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy454, yymsp[-1].minor.yy555);
178958178464
}
178959
-#line 5110 "parse.sql"
178960178465
break;
178961178466
case 225: /* expr ::= expr in_op LP select RP */
178962
-#line 1455 "parse.y"
178963178467
{
178964178468
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy454, 0);
178965178469
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy454, yymsp[-1].minor.yy555);
178966178470
if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178967178471
}
178968
-#line 5119 "parse.sql"
178969178472
break;
178970178473
case 226: /* expr ::= expr in_op nm dbnm paren_exprlist */
178971
-#line 1460 "parse.y"
178972178474
{
178973178475
SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
178974178476
Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
178975178477
if( yymsp[0].minor.yy14 ) sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy14);
178976178478
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy454, 0);
178977178479
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy454, pSelect);
178978178480
if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178979178481
}
178980
-#line 5131 "parse.sql"
178981178482
break;
178982178483
case 227: /* expr ::= EXISTS LP select RP */
178983
-#line 1468 "parse.y"
178984178484
{
178985178485
Expr *p;
178986178486
p = yymsp[-3].minor.yy454 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
178987178487
sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy555);
178988178488
}
178989
-#line 5140 "parse.sql"
178990178489
break;
178991178490
case 228: /* expr ::= CASE case_operand case_exprlist case_else END */
178992
-#line 1476 "parse.y"
178993178491
{
178994178492
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy454, 0);
178995178493
if( yymsp[-4].minor.yy454 ){
178996178494
yymsp[-4].minor.yy454->x.pList = yymsp[-1].minor.yy454 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454) : yymsp[-2].minor.yy14;
178997178495
sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy454);
@@ -178998,627 +178496,446 @@
178998178496
}else{
178999178497
sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy14);
179000178498
sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy454);
179001178499
}
179002178500
}
179003
-#line 5154 "parse.sql"
179004178501
break;
179005178502
case 229: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
179006
-#line 1488 "parse.y"
179007178503
{
179008178504
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, yymsp[-2].minor.yy454);
179009178505
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, yymsp[0].minor.yy454);
179010178506
}
179011
-#line 5162 "parse.sql"
179012178507
break;
179013178508
case 230: /* case_exprlist ::= WHEN expr THEN expr */
179014
-#line 1492 "parse.y"
179015178509
{
179016178510
yymsp[-3].minor.yy14 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
179017178511
yymsp[-3].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy14, yymsp[0].minor.yy454);
179018178512
}
179019
-#line 5170 "parse.sql"
179020178513
break;
179021178514
case 235: /* nexprlist ::= nexprlist COMMA expr */
179022
-#line 1513 "parse.y"
179023178515
{yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy14,yymsp[0].minor.yy454);}
179024
-#line 5175 "parse.sql"
179025178516
break;
179026178517
case 236: /* nexprlist ::= expr */
179027
-#line 1515 "parse.y"
179028178518
{yymsp[0].minor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy454); /*A-overwrites-Y*/}
179029
-#line 5180 "parse.sql"
179030178519
break;
179031178520
case 238: /* paren_exprlist ::= LP exprlist RP */
179032178521
case 243: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==243);
179033
-#line 1523 "parse.y"
179034178522
{yymsp[-2].minor.yy14 = yymsp[-1].minor.yy14;}
179035
-#line 5186 "parse.sql"
179036178523
break;
179037178524
case 239: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
179038
-#line 1530 "parse.y"
179039178525
{
179040178526
sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0,
179041178527
sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy14, yymsp[-10].minor.yy144,
179042178528
&yymsp[-11].minor.yy0, yymsp[0].minor.yy454, SQLITE_SO_ASC, yymsp[-8].minor.yy144, SQLITE_IDXTYPE_APPDEF);
179043178529
if( IN_RENAME_OBJECT && pParse->pNewIndex ){
179044178530
sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
179045178531
}
179046178532
}
179047
-#line 5198 "parse.sql"
179048178533
break;
179049178534
case 240: /* uniqueflag ::= UNIQUE */
179050178535
case 282: /* raisetype ::= ABORT */ yytestcase(yyruleno==282);
179051
-#line 1540 "parse.y"
179052178536
{yymsp[0].minor.yy144 = OE_Abort;}
179053
-#line 5204 "parse.sql"
179054178537
break;
179055178538
case 241: /* uniqueflag ::= */
179056
-#line 1541 "parse.y"
179057178539
{yymsp[1].minor.yy144 = OE_None;}
179058
-#line 5209 "parse.sql"
179059178540
break;
179060178541
case 244: /* eidlist ::= eidlist COMMA nm collate sortorder */
179061
-#line 1591 "parse.y"
179062178542
{
179063178543
yymsp[-4].minor.yy14 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy14, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy144, yymsp[0].minor.yy144);
179064178544
}
179065
-#line 5216 "parse.sql"
179066178545
break;
179067178546
case 245: /* eidlist ::= nm collate sortorder */
179068
-#line 1594 "parse.y"
179069178547
{
179070178548
yymsp[-2].minor.yy14 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy144, yymsp[0].minor.yy144); /*A-overwrites-Y*/
179071178549
}
179072
-#line 5223 "parse.sql"
179073178550
break;
179074178551
case 248: /* cmd ::= DROP INDEX ifexists fullname */
179075
-#line 1605 "parse.y"
179076178552
{sqlite3DropIndex(pParse, yymsp[0].minor.yy203, yymsp[-1].minor.yy144);}
179077
-#line 5228 "parse.sql"
179078178553
break;
179079178554
case 249: /* cmd ::= VACUUM vinto */
179080
-#line 1612 "parse.y"
179081178555
{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy454);}
179082
-#line 5233 "parse.sql"
179083178556
break;
179084178557
case 250: /* cmd ::= VACUUM nm vinto */
179085
-#line 1613 "parse.y"
179086178558
{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy454);}
179087
-#line 5238 "parse.sql"
179088178559
break;
179089178560
case 253: /* cmd ::= PRAGMA nm dbnm */
179090
-#line 1621 "parse.y"
179091178561
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
179092
-#line 5243 "parse.sql"
179093178562
break;
179094178563
case 254: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
179095
-#line 1622 "parse.y"
179096178564
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
179097
-#line 5248 "parse.sql"
179098178565
break;
179099178566
case 255: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
179100
-#line 1623 "parse.y"
179101178567
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
179102
-#line 5253 "parse.sql"
179103178568
break;
179104178569
case 256: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
179105
-#line 1625 "parse.y"
179106178570
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
179107
-#line 5258 "parse.sql"
179108178571
break;
179109178572
case 257: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
179110
-#line 1627 "parse.y"
179111178573
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
179112
-#line 5263 "parse.sql"
179113178574
break;
179114178575
case 260: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
179115
-#line 1643 "parse.y"
179116178576
{
179117178577
Token all;
179118178578
all.z = yymsp[-3].minor.yy0.z;
179119178579
all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
179120178580
sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy427, &all);
179121178581
}
179122
-#line 5273 "parse.sql"
179123178582
break;
179124178583
case 261: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
179125
-#line 1652 "parse.y"
179126178584
{
179127178585
sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy144, yymsp[-4].minor.yy286.a, yymsp[-4].minor.yy286.b, yymsp[-2].minor.yy203, yymsp[0].minor.yy454, yymsp[-10].minor.yy144, yymsp[-8].minor.yy144);
179128178586
yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
179129178587
}
179130
-#line 5281 "parse.sql"
179131178588
break;
179132178589
case 262: /* trigger_time ::= BEFORE|AFTER */
179133
-#line 1658 "parse.y"
179134178590
{ yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-X*/ }
179135
-#line 5286 "parse.sql"
179136178591
break;
179137178592
case 263: /* trigger_time ::= INSTEAD OF */
179138
-#line 1659 "parse.y"
179139178593
{ yymsp[-1].minor.yy144 = TK_INSTEAD;}
179140
-#line 5291 "parse.sql"
179141178594
break;
179142178595
case 264: /* trigger_time ::= */
179143
-#line 1660 "parse.y"
179144178596
{ yymsp[1].minor.yy144 = TK_BEFORE; }
179145
-#line 5296 "parse.sql"
179146178597
break;
179147178598
case 265: /* trigger_event ::= DELETE|INSERT */
179148178599
case 266: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==266);
179149
-#line 1664 "parse.y"
179150178600
{yymsp[0].minor.yy286.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy286.b = 0;}
179151
-#line 5302 "parse.sql"
179152178601
break;
179153178602
case 267: /* trigger_event ::= UPDATE OF idlist */
179154
-#line 1666 "parse.y"
179155178603
{yymsp[-2].minor.yy286.a = TK_UPDATE; yymsp[-2].minor.yy286.b = yymsp[0].minor.yy132;}
179156
-#line 5307 "parse.sql"
179157178604
break;
179158178605
case 268: /* when_clause ::= */
179159178606
case 287: /* key_opt ::= */ yytestcase(yyruleno==287);
179160
-#line 1673 "parse.y"
179161178607
{ yymsp[1].minor.yy454 = 0; }
179162
-#line 5313 "parse.sql"
179163178608
break;
179164178609
case 269: /* when_clause ::= WHEN expr */
179165178610
case 288: /* key_opt ::= KEY expr */ yytestcase(yyruleno==288);
179166
-#line 1674 "parse.y"
179167178611
{ yymsp[-1].minor.yy454 = yymsp[0].minor.yy454; }
179168
-#line 5319 "parse.sql"
179169178612
break;
179170178613
case 270: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
179171
-#line 1678 "parse.y"
179172178614
{
179173178615
assert( yymsp[-2].minor.yy427!=0 );
179174178616
yymsp[-2].minor.yy427->pLast->pNext = yymsp[-1].minor.yy427;
179175178617
yymsp[-2].minor.yy427->pLast = yymsp[-1].minor.yy427;
179176178618
}
179177
-#line 5328 "parse.sql"
179178178619
break;
179179178620
case 271: /* trigger_cmd_list ::= trigger_cmd SEMI */
179180
-#line 1683 "parse.y"
179181178621
{
179182178622
assert( yymsp[-1].minor.yy427!=0 );
179183178623
yymsp[-1].minor.yy427->pLast = yymsp[-1].minor.yy427;
179184178624
}
179185
-#line 5336 "parse.sql"
179186178625
break;
179187178626
case 272: /* trnm ::= nm DOT nm */
179188
-#line 1694 "parse.y"
179189178627
{
179190178628
yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
179191178629
sqlite3ErrorMsg(pParse,
179192178630
"qualified table names are not allowed on INSERT, UPDATE, and DELETE "
179193178631
"statements within triggers");
179194178632
}
179195
-#line 5346 "parse.sql"
179196178633
break;
179197178634
case 273: /* tridxby ::= INDEXED BY nm */
179198
-#line 1706 "parse.y"
179199178635
{
179200178636
sqlite3ErrorMsg(pParse,
179201178637
"the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
179202178638
"within triggers");
179203178639
}
179204
-#line 5355 "parse.sql"
179205178640
break;
179206178641
case 274: /* tridxby ::= NOT INDEXED */
179207
-#line 1711 "parse.y"
179208178642
{
179209178643
sqlite3ErrorMsg(pParse,
179210178644
"the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
179211178645
"within triggers");
179212178646
}
179213
-#line 5364 "parse.sql"
179214178647
break;
179215178648
case 275: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
179216
-#line 1724 "parse.y"
179217178649
{yylhsminor.yy427 = sqlite3TriggerUpdateStep(pParse, &yymsp[-6].minor.yy0, yymsp[-2].minor.yy203, yymsp[-3].minor.yy14, yymsp[-1].minor.yy454, yymsp[-7].minor.yy144, yymsp[-8].minor.yy0.z, yymsp[0].minor.yy168);}
179218
-#line 5369 "parse.sql"
179219178650
yymsp[-8].minor.yy427 = yylhsminor.yy427;
179220178651
break;
179221178652
case 276: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
179222
-#line 1728 "parse.y"
179223178653
{
179224178654
yylhsminor.yy427 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy132,yymsp[-2].minor.yy555,yymsp[-6].minor.yy144,yymsp[-1].minor.yy122,yymsp[-7].minor.yy168,yymsp[0].minor.yy168);/*yylhsminor.yy427-overwrites-yymsp[-6].minor.yy144*/
179225178655
}
179226
-#line 5377 "parse.sql"
179227178656
yymsp[-7].minor.yy427 = yylhsminor.yy427;
179228178657
break;
179229178658
case 277: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
179230
-#line 1733 "parse.y"
179231178659
{yylhsminor.yy427 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy454, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy168);}
179232
-#line 5383 "parse.sql"
179233178660
yymsp[-5].minor.yy427 = yylhsminor.yy427;
179234178661
break;
179235178662
case 278: /* trigger_cmd ::= scanpt select scanpt */
179236
-#line 1737 "parse.y"
179237178663
{yylhsminor.yy427 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy555, yymsp[-2].minor.yy168, yymsp[0].minor.yy168); /*yylhsminor.yy427-overwrites-yymsp[-1].minor.yy555*/}
179238
-#line 5389 "parse.sql"
179239178664
yymsp[-2].minor.yy427 = yylhsminor.yy427;
179240178665
break;
179241178666
case 279: /* expr ::= RAISE LP IGNORE RP */
179242
-#line 1740 "parse.y"
179243178667
{
179244178668
yymsp[-3].minor.yy454 = sqlite3PExpr(pParse, TK_RAISE, 0, 0);
179245178669
if( yymsp[-3].minor.yy454 ){
179246178670
yymsp[-3].minor.yy454->affExpr = OE_Ignore;
179247178671
}
179248178672
}
179249
-#line 5400 "parse.sql"
179250178673
break;
179251178674
case 280: /* expr ::= RAISE LP raisetype COMMA expr RP */
179252
-#line 1746 "parse.y"
179253178675
{
179254178676
yymsp[-5].minor.yy454 = sqlite3PExpr(pParse, TK_RAISE, yymsp[-1].minor.yy454, 0);
179255178677
if( yymsp[-5].minor.yy454 ) {
179256178678
yymsp[-5].minor.yy454->affExpr = (char)yymsp[-3].minor.yy144;
179257178679
}
179258178680
}
179259
-#line 5410 "parse.sql"
179260178681
break;
179261178682
case 281: /* raisetype ::= ROLLBACK */
179262
-#line 1755 "parse.y"
179263178683
{yymsp[0].minor.yy144 = OE_Rollback;}
179264
-#line 5415 "parse.sql"
179265178684
break;
179266178685
case 283: /* raisetype ::= FAIL */
179267
-#line 1757 "parse.y"
179268178686
{yymsp[0].minor.yy144 = OE_Fail;}
179269
-#line 5420 "parse.sql"
179270178687
break;
179271178688
case 284: /* cmd ::= DROP TRIGGER ifexists fullname */
179272
-#line 1762 "parse.y"
179273178689
{
179274178690
sqlite3DropTrigger(pParse,yymsp[0].minor.yy203,yymsp[-1].minor.yy144);
179275178691
}
179276
-#line 5427 "parse.sql"
179277178692
break;
179278178693
case 285: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
179279
-#line 1769 "parse.y"
179280178694
{
179281178695
sqlite3Attach(pParse, yymsp[-3].minor.yy454, yymsp[-1].minor.yy454, yymsp[0].minor.yy454);
179282178696
}
179283
-#line 5434 "parse.sql"
179284178697
break;
179285178698
case 286: /* cmd ::= DETACH database_kw_opt expr */
179286
-#line 1772 "parse.y"
179287178699
{
179288178700
sqlite3Detach(pParse, yymsp[0].minor.yy454);
179289178701
}
179290
-#line 5441 "parse.sql"
179291178702
break;
179292178703
case 289: /* cmd ::= REINDEX */
179293
-#line 1787 "parse.y"
179294178704
{sqlite3Reindex(pParse, 0, 0);}
179295
-#line 5446 "parse.sql"
179296178705
break;
179297178706
case 290: /* cmd ::= REINDEX nm dbnm */
179298
-#line 1788 "parse.y"
179299178707
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
179300
-#line 5451 "parse.sql"
179301178708
break;
179302178709
case 291: /* cmd ::= ANALYZE */
179303
-#line 1793 "parse.y"
179304178710
{sqlite3Analyze(pParse, 0, 0);}
179305
-#line 5456 "parse.sql"
179306178711
break;
179307178712
case 292: /* cmd ::= ANALYZE nm dbnm */
179308
-#line 1794 "parse.y"
179309178713
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
179310
-#line 5461 "parse.sql"
179311178714
break;
179312178715
case 293: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
179313
-#line 1800 "parse.y"
179314178716
{
179315178717
sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy203,&yymsp[0].minor.yy0);
179316178718
}
179317
-#line 5468 "parse.sql"
179318178719
break;
179319178720
case 294: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
179320
-#line 1804 "parse.y"
179321178721
{
179322178722
yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
179323178723
sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
179324178724
}
179325
-#line 5476 "parse.sql"
179326178725
break;
179327178726
case 295: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
179328
-#line 1808 "parse.y"
179329178727
{
179330178728
sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy203, &yymsp[0].minor.yy0);
179331178729
}
179332
-#line 5483 "parse.sql"
179333178730
break;
179334178731
case 296: /* add_column_fullname ::= fullname */
179335
-#line 1812 "parse.y"
179336178732
{
179337178733
disableLookaside(pParse);
179338178734
sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy203);
179339178735
}
179340
-#line 5491 "parse.sql"
179341178736
break;
179342178737
case 297: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
179343
-#line 1816 "parse.y"
179344178738
{
179345178739
sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy203, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
179346178740
}
179347
-#line 5498 "parse.sql"
179348178741
break;
179349178742
case 298: /* cmd ::= create_vtab */
179350
-#line 1828 "parse.y"
179351178743
{sqlite3VtabFinishParse(pParse,0);}
179352
-#line 5503 "parse.sql"
179353178744
break;
179354178745
case 299: /* cmd ::= create_vtab LP vtabarglist RP */
179355
-#line 1829 "parse.y"
179356178746
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
179357
-#line 5508 "parse.sql"
179358178747
break;
179359178748
case 300: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
179360
-#line 1831 "parse.y"
179361178749
{
179362178750
sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy144);
179363178751
}
179364
-#line 5515 "parse.sql"
179365178752
break;
179366178753
case 301: /* vtabarg ::= */
179367
-#line 1836 "parse.y"
179368178754
{sqlite3VtabArgInit(pParse);}
179369
-#line 5520 "parse.sql"
179370178755
break;
179371178756
case 302: /* vtabargtoken ::= ANY */
179372178757
case 303: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==303);
179373178758
case 304: /* lp ::= LP */ yytestcase(yyruleno==304);
179374
-#line 1838 "parse.y"
179375178759
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
179376
-#line 5527 "parse.sql"
179377178760
break;
179378178761
case 305: /* with ::= WITH wqlist */
179379178762
case 306: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==306);
179380
-#line 1855 "parse.y"
179381178763
{ sqlite3WithPush(pParse, yymsp[0].minor.yy59, 1); }
179382
-#line 5533 "parse.sql"
179383178764
break;
179384178765
case 307: /* wqas ::= AS */
179385
-#line 1859 "parse.y"
179386178766
{yymsp[0].minor.yy462 = M10d_Any;}
179387
-#line 5538 "parse.sql"
179388178767
break;
179389178768
case 308: /* wqas ::= AS MATERIALIZED */
179390
-#line 1860 "parse.y"
179391178769
{yymsp[-1].minor.yy462 = M10d_Yes;}
179392
-#line 5543 "parse.sql"
179393178770
break;
179394178771
case 309: /* wqas ::= AS NOT MATERIALIZED */
179395
-#line 1861 "parse.y"
179396178772
{yymsp[-2].minor.yy462 = M10d_No;}
179397
-#line 5548 "parse.sql"
179398178773
break;
179399178774
case 310: /* wqitem ::= withnm eidlist_opt wqas LP select RP */
179400
-#line 1862 "parse.y"
179401178775
{
179402178776
yymsp[-5].minor.yy67 = sqlite3CteNew(pParse, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy14, yymsp[-1].minor.yy555, yymsp[-3].minor.yy462); /*A-overwrites-X*/
179403178777
}
179404
-#line 5555 "parse.sql"
179405178778
break;
179406178779
case 311: /* withnm ::= nm */
179407
-#line 1865 "parse.y"
179408178780
{pParse->bHasWith = 1;}
179409
-#line 5560 "parse.sql"
179410178781
break;
179411178782
case 312: /* wqlist ::= wqitem */
179412
-#line 1866 "parse.y"
179413178783
{
179414178784
yymsp[0].minor.yy59 = sqlite3WithAdd(pParse, 0, yymsp[0].minor.yy67); /*A-overwrites-X*/
179415178785
}
179416
-#line 5567 "parse.sql"
179417178786
break;
179418178787
case 313: /* wqlist ::= wqlist COMMA wqitem */
179419
-#line 1869 "parse.y"
179420178788
{
179421178789
yymsp[-2].minor.yy59 = sqlite3WithAdd(pParse, yymsp[-2].minor.yy59, yymsp[0].minor.yy67);
179422178790
}
179423
-#line 5574 "parse.sql"
179424178791
break;
179425178792
case 314: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
179426
-#line 1884 "parse.y"
179427178793
{
179428178794
assert( yymsp[0].minor.yy211!=0 );
179429178795
sqlite3WindowChain(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy211);
179430178796
yymsp[0].minor.yy211->pNextWin = yymsp[-2].minor.yy211;
179431178797
yylhsminor.yy211 = yymsp[0].minor.yy211;
179432178798
}
179433
-#line 5584 "parse.sql"
179434178799
yymsp[-2].minor.yy211 = yylhsminor.yy211;
179435178800
break;
179436178801
case 315: /* windowdefn ::= nm AS LP window RP */
179437
-#line 1893 "parse.y"
179438178802
{
179439178803
if( ALWAYS(yymsp[-1].minor.yy211) ){
179440178804
yymsp[-1].minor.yy211->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
179441178805
}
179442178806
yylhsminor.yy211 = yymsp[-1].minor.yy211;
179443178807
}
179444
-#line 5595 "parse.sql"
179445178808
yymsp[-4].minor.yy211 = yylhsminor.yy211;
179446178809
break;
179447178810
case 316: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
179448
-#line 1927 "parse.y"
179449178811
{
179450178812
yymsp[-4].minor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy14, yymsp[-1].minor.yy14, 0);
179451178813
}
179452
-#line 5603 "parse.sql"
179453178814
break;
179454178815
case 317: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
179455
-#line 1930 "parse.y"
179456178816
{
179457178817
yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy14, yymsp[-1].minor.yy14, &yymsp[-5].minor.yy0);
179458178818
}
179459
-#line 5610 "parse.sql"
179460178819
yymsp[-5].minor.yy211 = yylhsminor.yy211;
179461178820
break;
179462178821
case 318: /* window ::= ORDER BY sortlist frame_opt */
179463
-#line 1933 "parse.y"
179464178822
{
179465178823
yymsp[-3].minor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, yymsp[-1].minor.yy14, 0);
179466178824
}
179467
-#line 5618 "parse.sql"
179468178825
break;
179469178826
case 319: /* window ::= nm ORDER BY sortlist frame_opt */
179470
-#line 1936 "parse.y"
179471178827
{
179472178828
yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, yymsp[-1].minor.yy14, &yymsp[-4].minor.yy0);
179473178829
}
179474
-#line 5625 "parse.sql"
179475178830
yymsp[-4].minor.yy211 = yylhsminor.yy211;
179476178831
break;
179477178832
case 320: /* window ::= nm frame_opt */
179478
-#line 1940 "parse.y"
179479178833
{
179480178834
yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, 0, &yymsp[-1].minor.yy0);
179481178835
}
179482
-#line 5633 "parse.sql"
179483178836
yymsp[-1].minor.yy211 = yylhsminor.yy211;
179484178837
break;
179485178838
case 321: /* frame_opt ::= */
179486
-#line 1944 "parse.y"
179487178839
{
179488178840
yymsp[1].minor.yy211 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
179489178841
}
179490
-#line 5641 "parse.sql"
179491178842
break;
179492178843
case 322: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
179493
-#line 1947 "parse.y"
179494178844
{
179495178845
yylhsminor.yy211 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy144, yymsp[-1].minor.yy509.eType, yymsp[-1].minor.yy509.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy462);
179496178846
}
179497
-#line 5648 "parse.sql"
179498178847
yymsp[-2].minor.yy211 = yylhsminor.yy211;
179499178848
break;
179500178849
case 323: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
179501
-#line 1951 "parse.y"
179502178850
{
179503178851
yylhsminor.yy211 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy144, yymsp[-3].minor.yy509.eType, yymsp[-3].minor.yy509.pExpr, yymsp[-1].minor.yy509.eType, yymsp[-1].minor.yy509.pExpr, yymsp[0].minor.yy462);
179504178852
}
179505
-#line 5656 "parse.sql"
179506178853
yymsp[-5].minor.yy211 = yylhsminor.yy211;
179507178854
break;
179508178855
case 325: /* frame_bound_s ::= frame_bound */
179509178856
case 327: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==327);
179510
-#line 1957 "parse.y"
179511178857
{yylhsminor.yy509 = yymsp[0].minor.yy509;}
179512
-#line 5663 "parse.sql"
179513178858
yymsp[0].minor.yy509 = yylhsminor.yy509;
179514178859
break;
179515178860
case 326: /* frame_bound_s ::= UNBOUNDED PRECEDING */
179516178861
case 328: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==328);
179517178862
case 330: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==330);
179518
-#line 1958 "parse.y"
179519178863
{yylhsminor.yy509.eType = yymsp[-1].major; yylhsminor.yy509.pExpr = 0;}
179520
-#line 5671 "parse.sql"
179521178864
yymsp[-1].minor.yy509 = yylhsminor.yy509;
179522178865
break;
179523178866
case 329: /* frame_bound ::= expr PRECEDING|FOLLOWING */
179524
-#line 1963 "parse.y"
179525178867
{yylhsminor.yy509.eType = yymsp[0].major; yylhsminor.yy509.pExpr = yymsp[-1].minor.yy454;}
179526
-#line 5677 "parse.sql"
179527178868
yymsp[-1].minor.yy509 = yylhsminor.yy509;
179528178869
break;
179529178870
case 331: /* frame_exclude_opt ::= */
179530
-#line 1967 "parse.y"
179531178871
{yymsp[1].minor.yy462 = 0;}
179532
-#line 5683 "parse.sql"
179533178872
break;
179534178873
case 332: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
179535
-#line 1968 "parse.y"
179536178874
{yymsp[-1].minor.yy462 = yymsp[0].minor.yy462;}
179537
-#line 5688 "parse.sql"
179538178875
break;
179539178876
case 333: /* frame_exclude ::= NO OTHERS */
179540178877
case 334: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==334);
179541
-#line 1971 "parse.y"
179542178878
{yymsp[-1].minor.yy462 = yymsp[-1].major; /*A-overwrites-X*/}
179543
-#line 5694 "parse.sql"
179544178879
break;
179545178880
case 335: /* frame_exclude ::= GROUP|TIES */
179546
-#line 1973 "parse.y"
179547178881
{yymsp[0].minor.yy462 = yymsp[0].major; /*A-overwrites-X*/}
179548
-#line 5699 "parse.sql"
179549178882
break;
179550178883
case 336: /* window_clause ::= WINDOW windowdefn_list */
179551
-#line 1978 "parse.y"
179552178884
{ yymsp[-1].minor.yy211 = yymsp[0].minor.yy211; }
179553
-#line 5704 "parse.sql"
179554178885
break;
179555178886
case 337: /* filter_over ::= filter_clause over_clause */
179556
-#line 1980 "parse.y"
179557178887
{
179558178888
if( yymsp[0].minor.yy211 ){
179559178889
yymsp[0].minor.yy211->pFilter = yymsp[-1].minor.yy454;
179560178890
}else{
179561178891
sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy454);
179562178892
}
179563178893
yylhsminor.yy211 = yymsp[0].minor.yy211;
179564178894
}
179565
-#line 5716 "parse.sql"
179566178895
yymsp[-1].minor.yy211 = yylhsminor.yy211;
179567178896
break;
179568178897
case 338: /* filter_over ::= over_clause */
179569
-#line 1988 "parse.y"
179570178898
{
179571178899
yylhsminor.yy211 = yymsp[0].minor.yy211;
179572178900
}
179573
-#line 5724 "parse.sql"
179574178901
yymsp[0].minor.yy211 = yylhsminor.yy211;
179575178902
break;
179576178903
case 339: /* filter_over ::= filter_clause */
179577
-#line 1991 "parse.y"
179578178904
{
179579178905
yylhsminor.yy211 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
179580178906
if( yylhsminor.yy211 ){
179581178907
yylhsminor.yy211->eFrmType = TK_FILTER;
179582178908
yylhsminor.yy211->pFilter = yymsp[0].minor.yy454;
179583178909
}else{
179584178910
sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy454);
179585178911
}
179586178912
}
179587
-#line 5738 "parse.sql"
179588178913
yymsp[0].minor.yy211 = yylhsminor.yy211;
179589178914
break;
179590178915
case 340: /* over_clause ::= OVER LP window RP */
179591
-#line 2001 "parse.y"
179592178916
{
179593178917
yymsp[-3].minor.yy211 = yymsp[-1].minor.yy211;
179594178918
assert( yymsp[-3].minor.yy211!=0 );
179595178919
}
179596
-#line 5747 "parse.sql"
179597178920
break;
179598178921
case 341: /* over_clause ::= OVER nm */
179599
-#line 2005 "parse.y"
179600178922
{
179601178923
yymsp[-1].minor.yy211 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
179602178924
if( yymsp[-1].minor.yy211 ){
179603178925
yymsp[-1].minor.yy211->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
179604178926
}
179605178927
}
179606
-#line 5757 "parse.sql"
179607178928
break;
179608178929
case 342: /* filter_clause ::= FILTER LP WHERE expr RP */
179609
-#line 2012 "parse.y"
179610178930
{ yymsp[-4].minor.yy454 = yymsp[-1].minor.yy454; }
179611
-#line 5762 "parse.sql"
179612178931
break;
179613178932
case 343: /* term ::= QNUMBER */
179614
-#line 2038 "parse.y"
179615178933
{
179616178934
yylhsminor.yy454=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0);
179617178935
sqlite3DequoteNumber(pParse, yylhsminor.yy454);
179618178936
}
179619
-#line 5770 "parse.sql"
179620178937
yymsp[0].minor.yy454 = yylhsminor.yy454;
179621178938
break;
179622178939
default:
179623178940
/* (344) input ::= cmdlist */ yytestcase(yyruleno==344);
179624178941
/* (345) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==345);
@@ -179742,19 +179059,17 @@
179742179059
){
179743179060
sqlite3ParserARG_FETCH
179744179061
sqlite3ParserCTX_FETCH
179745179062
#define TOKEN yyminor
179746179063
/************ Begin %syntax_error code ****************************************/
179747
-#line 43 "parse.y"
179748179064
179749179065
UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
179750179066
if( TOKEN.z[0] ){
179751179067
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
179752179068
}else{
179753179069
sqlite3ErrorMsg(pParse, "incomplete input");
179754179070
}
179755
-#line 5906 "parse.sql"
179756179071
/************ End %syntax_error code ******************************************/
179757179072
sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
179758179073
sqlite3ParserCTX_STORE
179759179074
}
179760179075
@@ -180022,11 +179337,10 @@
180022179337
#endif
180023179338
}
180024179339
180025179340
/************** End of parse.c ***********************************************/
180026179341
/************** Begin file tokenize.c ****************************************/
180027
-#line 1 "tsrc/tokenize.c"
180028179342
/*
180029179343
** 2001 September 15
180030179344
**
180031179345
** The author disclaims copyright to this source code. In place of
180032179346
** a legal notice, here is a blessing:
@@ -180172,11 +179486,10 @@
180172179486
** named keywordhash.h and then included into this source file by
180173179487
** the #include below.
180174179488
*/
180175179489
/************** Include keywordhash.h in the middle of tokenize.c ************/
180176179490
/************** Begin file keywordhash.h *************************************/
180177
-#line 1 "tsrc/keywordhash.h"
180178179491
/***** This file contains automatically generated code ******
180179179492
**
180180179493
** The code in this file has been automatically generated by
180181179494
**
180182179495
** sqlite/tool/mkkeywordhash.c
@@ -180658,11 +179971,10 @@
180658179971
return TK_ID!=sqlite3KeywordCode((const u8*)zName, nName);
180659179972
}
180660179973
180661179974
/************** End of keywordhash.h *****************************************/
180662179975
/************** Continuing where we left off in tokenize.c *******************/
180663
-#line 149 "tsrc/tokenize.c"
180664179976
180665179977
180666179978
/*
180667179979
** If X is a character that can be used in an identifier then
180668179980
** IdChar(X) will be true. Otherwise it is false.
@@ -181402,11 +180714,10 @@
181402180714
}
181403180715
#endif /* SQLITE_ENABLE_NORMALIZE */
181404180716
181405180717
/************** End of tokenize.c ********************************************/
181406180718
/************** Begin file complete.c ****************************************/
181407
-#line 1 "tsrc/complete.c"
181408180719
/*
181409180720
** 2001 September 15
181410180721
**
181411180722
** The author disclaims copyright to this source code. In place of
181412180723
** a legal notice, here is a blessing:
@@ -181696,11 +181007,10 @@
181696181007
#endif /* SQLITE_OMIT_UTF16 */
181697181008
#endif /* SQLITE_OMIT_COMPLETE */
181698181009
181699181010
/************** End of complete.c ********************************************/
181700181011
/************** Begin file main.c ********************************************/
181701
-#line 1 "tsrc/main.c"
181702181012
/*
181703181013
** 2001 September 15
181704181014
**
181705181015
** The author disclaims copyright to this source code. In place of
181706181016
** a legal notice, here is a blessing:
@@ -181718,11 +181028,10 @@
181718181028
/* #include "sqliteInt.h" */
181719181029
181720181030
#ifdef SQLITE_ENABLE_FTS3
181721181031
/************** Include fts3.h in the middle of main.c ***********************/
181722181032
/************** Begin file fts3.h ********************************************/
181723
-#line 1 "tsrc/fts3.h"
181724181033
/*
181725181034
** 2006 Oct 10
181726181035
**
181727181036
** The author disclaims copyright to this source code. In place of
181728181037
** a legal notice, here is a blessing:
@@ -181748,16 +181057,14 @@
181748181057
} /* extern "C" */
181749181058
#endif /* __cplusplus */
181750181059
181751181060
/************** End of fts3.h ************************************************/
181752181061
/************** Continuing where we left off in main.c ***********************/
181753
-#line 21 "tsrc/main.c"
181754181062
#endif
181755181063
#ifdef SQLITE_ENABLE_RTREE
181756181064
/************** Include rtree.h in the middle of main.c **********************/
181757181065
/************** Begin file rtree.h *******************************************/
181758
-#line 1 "tsrc/rtree.h"
181759181066
/*
181760181067
** 2008 May 26
181761181068
**
181762181069
** The author disclaims copyright to this source code. In place of
181763181070
** a legal notice, here is a blessing:
@@ -181787,16 +181094,14 @@
181787181094
} /* extern "C" */
181788181095
#endif /* __cplusplus */
181789181096
181790181097
/************** End of rtree.h ***********************************************/
181791181098
/************** Continuing where we left off in main.c ***********************/
181792
-#line 24 "tsrc/main.c"
181793181099
#endif
181794181100
#if defined(SQLITE_ENABLE_ICU) || defined(SQLITE_ENABLE_ICU_COLLATIONS)
181795181101
/************** Include sqliteicu.h in the middle of main.c ******************/
181796181102
/************** Begin file sqliteicu.h ***************************************/
181797
-#line 1 "tsrc/sqliteicu.h"
181798181103
/*
181799181104
** 2008 May 26
181800181105
**
181801181106
** The author disclaims copyright to this source code. In place of
181802181107
** a legal notice, here is a blessing:
@@ -181822,11 +181127,10 @@
181822181127
} /* extern "C" */
181823181128
#endif /* __cplusplus */
181824181129
181825181130
/************** End of sqliteicu.h *******************************************/
181826181131
/************** Continuing where we left off in main.c ***********************/
181827
-#line 27 "tsrc/main.c"
181828181132
#endif
181829181133
181830181134
/*
181831181135
** This is an extension initializer that is a no-op and always
181832181136
** succeeds, except that it fails if the fault-simulation is set
@@ -184724,12 +184028,12 @@
184724184028
}
184725184029
oldLimit = db->aLimit[limitId];
184726184030
if( newLimit>=0 ){ /* IMP: R-52476-28732 */
184727184031
if( newLimit>aHardLimit[limitId] ){
184728184032
newLimit = aHardLimit[limitId]; /* IMP: R-51463-25634 */
184729
- }else if( newLimit<1 && limitId==SQLITE_LIMIT_LENGTH ){
184730
- newLimit = 1;
184033
+ }else if( newLimit<SQLITE_MIN_LENGTH && limitId==SQLITE_LIMIT_LENGTH ){
184034
+ newLimit = SQLITE_MIN_LENGTH;
184731184035
}
184732184036
db->aLimit[limitId] = newLimit;
184733184037
}
184734184038
return oldLimit; /* IMP: R-53341-35419 */
184735184039
}
@@ -186873,11 +186177,10 @@
186873186177
}
186874186178
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
186875186179
186876186180
/************** End of main.c ************************************************/
186877186181
/************** Begin file notify.c ******************************************/
186878
-#line 1 "tsrc/notify.c"
186879186182
/*
186880186183
** 2009 March 3
186881186184
**
186882186185
** The author disclaims copyright to this source code. In place of
186883186186
** a legal notice, here is a blessing:
@@ -187212,11 +186515,10 @@
187212186515
}
187213186516
#endif
187214186517
187215186518
/************** End of notify.c **********************************************/
187216186519
/************** Begin file fts3.c ********************************************/
187217
-#line 1 "tsrc/fts3.c"
187218186520
/*
187219186521
** 2006 Oct 10
187220186522
**
187221186523
** The author disclaims copyright to this source code. In place of
187222186524
** a legal notice, here is a blessing:
@@ -187505,11 +186807,10 @@
187505186807
** older data.
187506186808
*/
187507186809
187508186810
/************** Include fts3Int.h in the middle of fts3.c ********************/
187509186811
/************** Begin file fts3Int.h *****************************************/
187510
-#line 1 "tsrc/fts3Int.h"
187511186812
/*
187512186813
** 2009 Nov 12
187513186814
**
187514186815
** The author disclaims copyright to this source code. In place of
187515186816
** a legal notice, here is a blessing:
@@ -187552,11 +186853,10 @@
187552186853
#endif
187553186854
187554186855
/* #include "sqlite3.h" */
187555186856
/************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/
187556186857
/************** Begin file fts3_tokenizer.h **********************************/
187557
-#line 1 "tsrc/fts3_tokenizer.h"
187558186858
/*
187559186859
** 2006 July 10
187560186860
**
187561186861
** The author disclaims copyright to this source code.
187562186862
**
@@ -187717,14 +187017,12 @@
187717187017
187718187018
#endif /* _FTS3_TOKENIZER_H_ */
187719187019
187720187020
/************** End of fts3_tokenizer.h **************************************/
187721187021
/************** Continuing where we left off in fts3Int.h ********************/
187722
-#line 46 "tsrc/fts3Int.h"
187723187022
/************** Include fts3_hash.h in the middle of fts3Int.h ***************/
187724187023
/************** Begin file fts3_hash.h ***************************************/
187725
-#line 1 "tsrc/fts3_hash.h"
187726187024
/*
187727187025
** 2001 September 22
187728187026
**
187729187027
** The author disclaims copyright to this source code. In place of
187730187028
** a legal notice, here is a blessing:
@@ -187836,11 +187134,10 @@
187836187134
187837187135
#endif /* _FTS3_HASH_H_ */
187838187136
187839187137
/************** End of fts3_hash.h *******************************************/
187840187138
/************** Continuing where we left off in fts3Int.h ********************/
187841
-#line 47 "tsrc/fts3Int.h"
187842187139
187843187140
/*
187844187141
** This constant determines the maximum depth of an FTS expression tree
187845187142
** that the library will create and use. FTS uses recursion to perform
187846187143
** various operations on the query tree, so the disadvantage of a large
@@ -188453,11 +187750,10 @@
188453187750
#endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
188454187751
#endif /* _FTSINT_H */
188455187752
188456187753
/************** End of fts3Int.h *********************************************/
188457187754
/************** Continuing where we left off in fts3.c ***********************/
188458
-#line 292 "tsrc/fts3.c"
188459187755
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
188460187756
188461187757
#if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)
188462187758
# define SQLITE_CORE 1
188463187759
#endif
@@ -190509,14 +189805,19 @@
190509189805
190510189806
assert_fts3_nc( p!=0 && *p1!=0 && *p2!=0 );
190511189807
if( *p1==POS_COLUMN ){
190512189808
p1++;
190513189809
p1 += fts3GetVarint32(p1, &iCol1);
189810
+ /* iCol1==0 indicates corruption. Column 0 does not have a POS_COLUMN
189811
+ ** entry, so this is actually end-of-doclist. */
189812
+ if( iCol1==0 ) return 0;
190514189813
}
190515189814
if( *p2==POS_COLUMN ){
190516189815
p2++;
190517189816
p2 += fts3GetVarint32(p2, &iCol2);
189817
+ /* As above, iCol2==0 indicates corruption. */
189818
+ if( iCol2==0 ) return 0;
190518189819
}
190519189820
190520189821
while( 1 ){
190521189822
if( iCol1==iCol2 ){
190522189823
char *pSave = p;
@@ -193683,11 +192984,11 @@
193683192984
for(p=pExpr; p->pLeft; p=p->pLeft){
193684192985
assert( p->pRight->pPhrase->doclist.nList>0 );
193685192986
nTmp += p->pRight->pPhrase->doclist.nList;
193686192987
}
193687192988
nTmp += p->pPhrase->doclist.nList;
193688
- aTmp = sqlite3_malloc64(nTmp*2);
192989
+ aTmp = sqlite3_malloc64(nTmp*2 + FTS3_VARINT_MAX);
193689192990
if( !aTmp ){
193690192991
*pRc = SQLITE_NOMEM;
193691192992
res = 0;
193692192993
}else{
193693192994
char *aPoslist = p->pPhrase->doclist.pList;
@@ -194355,11 +193656,10 @@
194355193656
194356193657
#endif
194357193658
194358193659
/************** End of fts3.c ************************************************/
194359193660
/************** Begin file fts3_aux.c ****************************************/
194360
-#line 1 "tsrc/fts3_aux.c"
194361193661
/*
194362193662
** 2011 Jan 27
194363193663
**
194364193664
** The author disclaims copyright to this source code. In place of
194365193665
** a legal notice, here is a blessing:
@@ -194916,11 +194216,10 @@
194916194216
194917194217
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
194918194218
194919194219
/************** End of fts3_aux.c ********************************************/
194920194220
/************** Begin file fts3_expr.c ***************************************/
194921
-#line 1 "tsrc/fts3_expr.c"
194922194221
/*
194923194222
** 2008 Nov 28
194924194223
**
194925194224
** The author disclaims copyright to this source code. In place of
194926194225
** a legal notice, here is a blessing:
@@ -196213,11 +195512,10 @@
196213195512
#endif
196214195513
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
196215195514
196216195515
/************** End of fts3_expr.c *******************************************/
196217195516
/************** Begin file fts3_hash.c ***************************************/
196218
-#line 1 "tsrc/fts3_hash.c"
196219195517
/*
196220195518
** 2001 September 22
196221195519
**
196222195520
** The author disclaims copyright to this source code. In place of
196223195521
** a legal notice, here is a blessing:
@@ -196600,11 +195898,10 @@
196600195898
196601195899
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
196602195900
196603195901
/************** End of fts3_hash.c *******************************************/
196604195902
/************** Begin file fts3_porter.c *************************************/
196605
-#line 1 "tsrc/fts3_porter.c"
196606195903
/*
196607195904
** 2006 September 30
196608195905
**
196609195906
** The author disclaims copyright to this source code. In place of
196610195907
** a legal notice, here is a blessing:
@@ -197266,11 +196563,10 @@
197266196563
197267196564
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
197268196565
197269196566
/************** End of fts3_porter.c *****************************************/
197270196567
/************** Begin file fts3_tokenizer.c **********************************/
197271
-#line 1 "tsrc/fts3_tokenizer.c"
197272196568
/*
197273196569
** 2007 June 22
197274196570
**
197275196571
** The author disclaims copyright to this source code. In place of
197276196572
** a legal notice, here is a blessing:
@@ -197786,11 +197082,10 @@
197786197082
197787197083
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
197788197084
197789197085
/************** End of fts3_tokenizer.c **************************************/
197790197086
/************** Begin file fts3_tokenizer1.c *********************************/
197791
-#line 1 "tsrc/fts3_tokenizer1.c"
197792197087
/*
197793197088
** 2006 Oct 10
197794197089
**
197795197090
** The author disclaims copyright to this source code. In place of
197796197091
** a legal notice, here is a blessing:
@@ -198024,11 +197319,10 @@
198024197319
198025197320
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
198026197321
198027197322
/************** End of fts3_tokenizer1.c *************************************/
198028197323
/************** Begin file fts3_tokenize_vtab.c ******************************/
198029
-#line 1 "tsrc/fts3_tokenize_vtab.c"
198030197324
/*
198031197325
** 2013 Apr 22
198032197326
**
198033197327
** The author disclaims copyright to this source code. In place of
198034197328
** a legal notice, here is a blessing:
@@ -198487,11 +197781,10 @@
198487197781
198488197782
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
198489197783
198490197784
/************** End of fts3_tokenize_vtab.c **********************************/
198491197785
/************** Begin file fts3_write.c **************************************/
198492
-#line 1 "tsrc/fts3_write.c"
198493197786
/*
198494197787
** 2009 Oct 23
198495197788
**
198496197789
** The author disclaims copyright to this source code. In place of
198497197790
** a legal notice, here is a blessing:
@@ -204325,11 +203618,10 @@
204325203618
204326203619
#endif
204327203620
204328203621
/************** End of fts3_write.c ******************************************/
204329203622
/************** Begin file fts3_snippet.c ************************************/
204330
-#line 1 "tsrc/fts3_snippet.c"
204331203623
/*
204332203624
** 2009 Oct 23
204333203625
**
204334203626
** The author disclaims copyright to this source code. In place of
204335203627
** a legal notice, here is a blessing:
@@ -206085,11 +205377,10 @@
206085205377
206086205378
#endif
206087205379
206088205380
/************** End of fts3_snippet.c ****************************************/
206089205381
/************** Begin file fts3_unicode.c ************************************/
206090
-#line 1 "tsrc/fts3_unicode.c"
206091205382
/*
206092205383
** 2012 May 24
206093205384
**
206094205385
** The author disclaims copyright to this source code. In place of
206095205386
** a legal notice, here is a blessing:
@@ -206486,11 +205777,10 @@
206486205777
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
206487205778
#endif /* ifndef SQLITE_DISABLE_FTS3_UNICODE */
206488205779
206489205780
/************** End of fts3_unicode.c ****************************************/
206490205781
/************** Begin file fts3_unicode2.c ***********************************/
206491
-#line 1 "tsrc/fts3_unicode2.c"
206492205782
/*
206493205783
** 2012-05-25
206494205784
**
206495205785
** The author disclaims copyright to this source code. In place of
206496205786
** a legal notice, here is a blessing:
@@ -206873,11 +206163,10 @@
206873206163
#endif /* defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4) */
206874206164
#endif /* !defined(SQLITE_DISABLE_FTS3_UNICODE) */
206875206165
206876206166
/************** End of fts3_unicode2.c ***************************************/
206877206167
/************** Begin file json.c ********************************************/
206878
-#line 1 "tsrc/json.c"
206879206168
/*
206880206169
** 2015-08-12
206881206170
**
206882206171
** The author disclaims copyright to this source code. In place of
206883206172
** a legal notice, here is a blessing:
@@ -212343,11 +211632,10 @@
212343211632
}
212344211633
#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) && !defined(SQLITE_OMIT_JSON) */
212345211634
212346211635
/************** End of json.c ************************************************/
212347211636
/************** Begin file rtree.c *******************************************/
212348
-#line 1 "tsrc/rtree.c"
212349211637
/*
212350211638
** 2001 September 15
212351211639
**
212352211640
** The author disclaims copyright to this source code. In place of
212353211641
** a legal notice, here is a blessing:
@@ -216632,11 +215920,10 @@
216632215920
216633215921
/* Conditionally include the geopoly code */
216634215922
#ifdef SQLITE_ENABLE_GEOPOLY
216635215923
/************** Include geopoly.c in the middle of rtree.c *******************/
216636215924
/************** Begin file geopoly.c *****************************************/
216637
-#line 1 "tsrc/geopoly.c"
216638215925
/*
216639215926
** 2018-05-25
216640215927
**
216641215928
** The author disclaims copyright to this source code. In place of
216642215929
** a legal notice, here is a blessing:
@@ -218475,11 +217762,10 @@
218475217762
return rc;
218476217763
}
218477217764
218478217765
/************** End of geopoly.c *********************************************/
218479217766
/************** Continuing where we left off in rtree.c **********************/
218480
-#line 4288 "tsrc/rtree.c"
218481217767
#endif
218482217768
218483217769
/*
218484217770
** Register the r-tree module with database handle db. This creates the
218485217771
** virtual table module "rtree" and the debugging/analysis scalar
@@ -218658,11 +217944,10 @@
218658217944
218659217945
#endif
218660217946
218661217947
/************** End of rtree.c ***********************************************/
218662217948
/************** Begin file icu.c *********************************************/
218663
-#line 1 "tsrc/icu.c"
218664217949
/*
218665217950
** 2007 May 6
218666217951
**
218667217952
** The author disclaims copyright to this source code. In place of
218668217953
** a legal notice, here is a blessing:
@@ -219250,11 +218535,10 @@
219250218535
219251218536
#endif
219252218537
219253218538
/************** End of icu.c *************************************************/
219254218539
/************** Begin file fts3_icu.c ****************************************/
219255
-#line 1 "tsrc/fts3_icu.c"
219256218540
/*
219257218541
** 2007 June 22
219258218542
**
219259218543
** The author disclaims copyright to this source code. In place of
219260218544
** a legal notice, here is a blessing:
@@ -219516,11 +218800,10 @@
219516218800
#endif /* defined(SQLITE_ENABLE_ICU) */
219517218801
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
219518218802
219519218803
/************** End of fts3_icu.c ********************************************/
219520218804
/************** Begin file sqlite3rbu.c **************************************/
219521
-#line 1 "tsrc/sqlite3rbu.c"
219522218805
/*
219523218806
** 2014 August 30
219524218807
**
219525218808
** The author disclaims copyright to this source code. In place of
219526218809
** a legal notice, here is a blessing:
@@ -219608,11 +218891,10 @@
219608218891
/* #include "sqlite3.h" */
219609218892
219610218893
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU)
219611218894
/************** Include sqlite3rbu.h in the middle of sqlite3rbu.c ***********/
219612218895
/************** Begin file sqlite3rbu.h **************************************/
219613
-#line 1 "tsrc/sqlite3rbu.h"
219614218896
/*
219615218897
** 2014 August 30
219616218898
**
219617218899
** The author disclaims copyright to this source code. In place of
219618218900
** a legal notice, here is a blessing:
@@ -220245,11 +219527,10 @@
220245219527
220246219528
#endif /* _SQLITE3RBU_H */
220247219529
220248219530
/************** End of sqlite3rbu.h ******************************************/
220249219531
/************** Continuing where we left off in sqlite3rbu.c *****************/
220250
-#line 91 "tsrc/sqlite3rbu.c"
220251219532
220252219533
#if defined(_WIN32_WCE)
220253219534
/* #include "windows.h" */
220254219535
#endif
220255219536
@@ -225606,11 +224887,10 @@
225606224887
225607224888
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU) */
225608224889
225609224890
/************** End of sqlite3rbu.c ******************************************/
225610224891
/************** Begin file dbstat.c ******************************************/
225611
-#line 1 "tsrc/dbstat.c"
225612224892
/*
225613224893
** 2010 July 12
225614224894
**
225615224895
** The author disclaims copyright to this source code. In place of
225616224896
** a legal notice, here is a blessing:
@@ -226516,11 +225796,10 @@
226516225796
SQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3 *db){ return SQLITE_OK; }
226517225797
#endif /* SQLITE_ENABLE_DBSTAT_VTAB */
226518225798
226519225799
/************** End of dbstat.c **********************************************/
226520225800
/************** Begin file dbpage.c ******************************************/
226521
-#line 1 "tsrc/dbpage.c"
226522225801
/*
226523225802
** 2017-10-11
226524225803
**
226525225804
** The author disclaims copyright to this source code. In place of
226526225805
** a legal notice, here is a blessing:
@@ -226999,11 +226278,10 @@
226999226278
SQLITE_PRIVATE int sqlite3DbpageRegister(sqlite3 *db){ return SQLITE_OK; }
227000226279
#endif /* SQLITE_ENABLE_DBSTAT_VTAB */
227001226280
227002226281
/************** End of dbpage.c **********************************************/
227003226282
/************** Begin file sqlite3session.c **********************************/
227004
-#line 1 "tsrc/sqlite3session.c"
227005226283
227006226284
#if defined(SQLITE_ENABLE_SESSION) && defined(SQLITE_ENABLE_PREUPDATE_HOOK)
227007226285
/* #include "sqlite3session.h" */
227008226286
/* #include <assert.h> */
227009226287
/* #include <string.h> */
@@ -233539,11 +232817,10 @@
233539232817
233540232818
#endif /* SQLITE_ENABLE_SESSION && SQLITE_ENABLE_PREUPDATE_HOOK */
233541232819
233542232820
/************** End of sqlite3session.c **************************************/
233543232821
/************** Begin file fts5.c ********************************************/
233544
-#line 1 "tsrc/fts5.c"
233545232822
233546232823
/*
233547232824
** This, the "fts5.c" source file, is a composite file that is itself
233548232825
** assembled from the following files:
233549232826
**
@@ -233577,11 +232854,10 @@
233577232854
/* #include <stdint.h> */
233578232855
#endif
233579232856
#ifdef HAVE_INTTYPES_H
233580232857
/* #include <inttypes.h> */
233581232858
#endif
233582
-#line 1 "fts5.h"
233583232859
/*
233584232860
** 2014 May 31
233585232861
**
233586232862
** The author disclaims copyright to this source code. In place of
233587232863
** a legal notice, here is a blessing:
@@ -234318,11 +233594,10 @@
234318233594
} /* end of the 'extern "C"' block */
234319233595
#endif
234320233596
234321233597
#endif /* _FTS5_H */
234322233598
234323
-#line 1 "fts5Int.h"
234324233599
/*
234325233600
** 2014 May 31
234326233601
**
234327233602
** The author disclaims copyright to this source code. In place of
234328233603
** a legal notice, here is a blessing:
@@ -235258,11 +234533,10 @@
235258234533
** End of interface to code in fts5_unicode2.c.
235259234534
**************************************************************************/
235260234535
235261234536
#endif
235262234537
235263
-#line 1 "fts5parse.h"
235264234538
#define FTS5_OR 1
235265234539
#define FTS5_AND 2
235266234540
#define FTS5_NOT 3
235267234541
#define FTS5_TERM 4
235268234542
#define FTS5_COLON 5
@@ -235275,11 +234549,10 @@
235275234549
#define FTS5_CARET 12
235276234550
#define FTS5_COMMA 13
235277234551
#define FTS5_PLUS 14
235278234552
#define FTS5_STAR 15
235279234553
235280
-#line 1 "fts5parse.c"
235281234554
/* This file is automatically generated by Lemon from input grammar
235282234555
** source file "fts5parse.y".
235283234556
*/
235284234557
/*
235285234558
** 2000-05-29
@@ -235304,11 +234577,10 @@
235304234577
**
235305234578
** The following is the concatenation of all %include directives from the
235306234579
** input grammar file:
235307234580
*/
235308234581
/************ Begin %include sections from the grammar ************************/
235309
-#line 47 "fts5parse.y"
235310234582
235311234583
/* #include "fts5Int.h" */
235312234584
/* #include "fts5parse.h" */
235313234585
235314234586
/*
@@ -235332,11 +234604,10 @@
235332234604
** Alternative datatype for the argument to the malloc() routine passed
235333234605
** into sqlite3ParserAlloc(). The default is size_t.
235334234606
*/
235335234607
#define fts5YYMALLOCARGTYPE u64
235336234608
235337
-#line 58 "fts5parse.sql"
235338234609
/**************** End of %include directives **********************************/
235339234610
/* These constants specify the various numeric values for terminal symbols.
235340234611
***************** Begin token definitions *************************************/
235341234612
#ifndef FTS5_OR
235342234613
#define FTS5_OR 1
@@ -235879,45 +235150,35 @@
235879235150
** inside the C code.
235880235151
*/
235881235152
/********* Begin destructor definitions ***************************************/
235882235153
case 16: /* input */
235883235154
{
235884
-#line 83 "fts5parse.y"
235885235155
(void)pParse;
235886
-#line 606 "fts5parse.sql"
235887235156
}
235888235157
break;
235889235158
case 17: /* expr */
235890235159
case 18: /* cnearset */
235891235160
case 19: /* exprlist */
235892235161
{
235893
-#line 89 "fts5parse.y"
235894235162
sqlite3Fts5ParseNodeFree((fts5yypminor->fts5yy24));
235895
-#line 615 "fts5parse.sql"
235896235163
}
235897235164
break;
235898235165
case 20: /* colset */
235899235166
case 21: /* colsetlist */
235900235167
{
235901
-#line 93 "fts5parse.y"
235902235168
sqlite3_free((fts5yypminor->fts5yy11));
235903
-#line 623 "fts5parse.sql"
235904235169
}
235905235170
break;
235906235171
case 22: /* nearset */
235907235172
case 23: /* nearphrases */
235908235173
{
235909
-#line 148 "fts5parse.y"
235910235174
sqlite3Fts5ParseNearsetFree((fts5yypminor->fts5yy46));
235911
-#line 631 "fts5parse.sql"
235912235175
}
235913235176
break;
235914235177
case 24: /* phrase */
235915235178
{
235916
-#line 183 "fts5parse.y"
235917235179
sqlite3Fts5ParsePhraseFree((fts5yypminor->fts5yy53));
235918
-#line 638 "fts5parse.sql"
235919235180
}
235920235181
break;
235921235182
/********* End destructor definitions *****************************************/
235922235183
default: break; /* If no destructor action specified: do nothing */
235923235184
}
@@ -236148,14 +235409,12 @@
236148235409
#endif
236149235410
while( fts5yypParser->fts5yytos>fts5yypParser->fts5yystack ) fts5yy_pop_parser_stack(fts5yypParser);
236150235411
/* Here code is inserted which will execute if the parser
236151235412
** stack every overflows */
236152235413
/******** Begin %stack_overflow code ******************************************/
236153
-#line 36 "fts5parse.y"
236154235414
236155235415
sqlite3Fts5ParseError(pParse, "fts5: parser stack overflow");
236156
-#line 876 "fts5parse.sql"
236157235416
/******** End %stack_overflow code ********************************************/
236158235417
sqlite3Fts5ParserARG_STORE /* Suppress warning about unused %extra_argument var */
236159235418
sqlite3Fts5ParserCTX_STORE
236160235419
}
236161235420
@@ -236320,202 +235579,148 @@
236320235579
** break;
236321235580
*/
236322235581
/********** Begin reduce actions **********************************************/
236323235582
fts5YYMINORTYPE fts5yylhsminor;
236324235583
case 0: /* input ::= expr */
236325
-#line 82 "fts5parse.y"
236326235584
{ sqlite3Fts5ParseFinished(pParse, fts5yymsp[0].minor.fts5yy24); }
236327
-#line 1047 "fts5parse.sql"
236328235585
break;
236329235586
case 1: /* colset ::= MINUS LCP colsetlist RCP */
236330
-#line 97 "fts5parse.y"
236331235587
{
236332235588
fts5yymsp[-3].minor.fts5yy11 = sqlite3Fts5ParseColsetInvert(pParse, fts5yymsp[-1].minor.fts5yy11);
236333235589
}
236334
-#line 1054 "fts5parse.sql"
236335235590
break;
236336235591
case 2: /* colset ::= LCP colsetlist RCP */
236337
-#line 100 "fts5parse.y"
236338235592
{ fts5yymsp[-2].minor.fts5yy11 = fts5yymsp[-1].minor.fts5yy11; }
236339
-#line 1059 "fts5parse.sql"
236340235593
break;
236341235594
case 3: /* colset ::= STRING */
236342
-#line 101 "fts5parse.y"
236343235595
{
236344235596
fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
236345235597
}
236346
-#line 1066 "fts5parse.sql"
236347235598
fts5yymsp[0].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
236348235599
break;
236349235600
case 4: /* colset ::= MINUS STRING */
236350
-#line 104 "fts5parse.y"
236351235601
{
236352235602
fts5yymsp[-1].minor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
236353235603
fts5yymsp[-1].minor.fts5yy11 = sqlite3Fts5ParseColsetInvert(pParse, fts5yymsp[-1].minor.fts5yy11);
236354235604
}
236355
-#line 1075 "fts5parse.sql"
236356235605
break;
236357235606
case 5: /* colsetlist ::= colsetlist STRING */
236358
-#line 109 "fts5parse.y"
236359235607
{
236360235608
fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, fts5yymsp[-1].minor.fts5yy11, &fts5yymsp[0].minor.fts5yy0); }
236361
-#line 1081 "fts5parse.sql"
236362235609
fts5yymsp[-1].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
236363235610
break;
236364235611
case 6: /* colsetlist ::= STRING */
236365
-#line 111 "fts5parse.y"
236366235612
{
236367235613
fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
236368235614
}
236369
-#line 1089 "fts5parse.sql"
236370235615
fts5yymsp[0].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
236371235616
break;
236372235617
case 7: /* expr ::= expr AND expr */
236373
-#line 115 "fts5parse.y"
236374235618
{
236375235619
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_AND, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
236376235620
}
236377
-#line 1097 "fts5parse.sql"
236378235621
fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236379235622
break;
236380235623
case 8: /* expr ::= expr OR expr */
236381
-#line 118 "fts5parse.y"
236382235624
{
236383235625
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_OR, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
236384235626
}
236385
-#line 1105 "fts5parse.sql"
236386235627
fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236387235628
break;
236388235629
case 9: /* expr ::= expr NOT expr */
236389
-#line 121 "fts5parse.y"
236390235630
{
236391235631
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_NOT, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
236392235632
}
236393
-#line 1113 "fts5parse.sql"
236394235633
fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236395235634
break;
236396235635
case 10: /* expr ::= colset COLON LP expr RP */
236397
-#line 125 "fts5parse.y"
236398235636
{
236399235637
sqlite3Fts5ParseSetColset(pParse, fts5yymsp[-1].minor.fts5yy24, fts5yymsp[-4].minor.fts5yy11);
236400235638
fts5yylhsminor.fts5yy24 = fts5yymsp[-1].minor.fts5yy24;
236401235639
}
236402
-#line 1122 "fts5parse.sql"
236403235640
fts5yymsp[-4].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236404235641
break;
236405235642
case 11: /* expr ::= LP expr RP */
236406
-#line 129 "fts5parse.y"
236407235643
{fts5yymsp[-2].minor.fts5yy24 = fts5yymsp[-1].minor.fts5yy24;}
236408
-#line 1128 "fts5parse.sql"
236409235644
break;
236410235645
case 12: /* expr ::= exprlist */
236411235646
case 13: /* exprlist ::= cnearset */ fts5yytestcase(fts5yyruleno==13);
236412
-#line 130 "fts5parse.y"
236413235647
{fts5yylhsminor.fts5yy24 = fts5yymsp[0].minor.fts5yy24;}
236414
-#line 1134 "fts5parse.sql"
236415235648
fts5yymsp[0].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236416235649
break;
236417235650
case 14: /* exprlist ::= exprlist cnearset */
236418
-#line 133 "fts5parse.y"
236419235651
{
236420235652
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseImplicitAnd(pParse, fts5yymsp[-1].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24);
236421235653
}
236422
-#line 1142 "fts5parse.sql"
236423235654
fts5yymsp[-1].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236424235655
break;
236425235656
case 15: /* cnearset ::= nearset */
236426
-#line 137 "fts5parse.y"
236427235657
{
236428235658
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy46);
236429235659
}
236430
-#line 1150 "fts5parse.sql"
236431235660
fts5yymsp[0].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236432235661
break;
236433235662
case 16: /* cnearset ::= colset COLON nearset */
236434
-#line 140 "fts5parse.y"
236435235663
{
236436235664
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy46);
236437235665
sqlite3Fts5ParseSetColset(pParse, fts5yylhsminor.fts5yy24, fts5yymsp[-2].minor.fts5yy11);
236438235666
}
236439
-#line 1159 "fts5parse.sql"
236440235667
fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236441235668
break;
236442235669
case 17: /* nearset ::= phrase */
236443
-#line 151 "fts5parse.y"
236444235670
{ fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53); }
236445
-#line 1165 "fts5parse.sql"
236446235671
fts5yymsp[0].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
236447235672
break;
236448235673
case 18: /* nearset ::= CARET phrase */
236449
-#line 152 "fts5parse.y"
236450235674
{
236451235675
sqlite3Fts5ParseSetCaret(fts5yymsp[0].minor.fts5yy53);
236452235676
fts5yymsp[-1].minor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53);
236453235677
}
236454
-#line 1174 "fts5parse.sql"
236455235678
break;
236456235679
case 19: /* nearset ::= STRING LP nearphrases neardist_opt RP */
236457
-#line 156 "fts5parse.y"
236458235680
{
236459235681
sqlite3Fts5ParseNear(pParse, &fts5yymsp[-4].minor.fts5yy0);
236460235682
sqlite3Fts5ParseSetDistance(pParse, fts5yymsp[-2].minor.fts5yy46, &fts5yymsp[-1].minor.fts5yy0);
236461235683
fts5yylhsminor.fts5yy46 = fts5yymsp[-2].minor.fts5yy46;
236462235684
}
236463
-#line 1183 "fts5parse.sql"
236464235685
fts5yymsp[-4].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
236465235686
break;
236466235687
case 20: /* nearphrases ::= phrase */
236467
-#line 162 "fts5parse.y"
236468235688
{
236469235689
fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53);
236470235690
}
236471
-#line 1191 "fts5parse.sql"
236472235691
fts5yymsp[0].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
236473235692
break;
236474235693
case 21: /* nearphrases ::= nearphrases phrase */
236475
-#line 165 "fts5parse.y"
236476235694
{
236477235695
fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, fts5yymsp[-1].minor.fts5yy46, fts5yymsp[0].minor.fts5yy53);
236478235696
}
236479
-#line 1199 "fts5parse.sql"
236480235697
fts5yymsp[-1].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
236481235698
break;
236482235699
case 22: /* neardist_opt ::= */
236483
-#line 172 "fts5parse.y"
236484235700
{ fts5yymsp[1].minor.fts5yy0.p = 0; fts5yymsp[1].minor.fts5yy0.n = 0; }
236485
-#line 1205 "fts5parse.sql"
236486235701
break;
236487235702
case 23: /* neardist_opt ::= COMMA STRING */
236488
-#line 173 "fts5parse.y"
236489235703
{ fts5yymsp[-1].minor.fts5yy0 = fts5yymsp[0].minor.fts5yy0; }
236490
-#line 1210 "fts5parse.sql"
236491235704
break;
236492235705
case 24: /* phrase ::= phrase PLUS STRING star_opt */
236493
-#line 185 "fts5parse.y"
236494235706
{
236495235707
fts5yylhsminor.fts5yy53 = sqlite3Fts5ParseTerm(pParse, fts5yymsp[-3].minor.fts5yy53, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy4);
236496235708
}
236497
-#line 1217 "fts5parse.sql"
236498235709
fts5yymsp[-3].minor.fts5yy53 = fts5yylhsminor.fts5yy53;
236499235710
break;
236500235711
case 25: /* phrase ::= STRING star_opt */
236501
-#line 188 "fts5parse.y"
236502235712
{
236503235713
fts5yylhsminor.fts5yy53 = sqlite3Fts5ParseTerm(pParse, 0, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy4);
236504235714
}
236505
-#line 1225 "fts5parse.sql"
236506235715
fts5yymsp[-1].minor.fts5yy53 = fts5yylhsminor.fts5yy53;
236507235716
break;
236508235717
case 26: /* star_opt ::= STAR */
236509
-#line 196 "fts5parse.y"
236510235718
{ fts5yymsp[0].minor.fts5yy4 = 1; }
236511
-#line 1231 "fts5parse.sql"
236512235719
break;
236513235720
case 27: /* star_opt ::= */
236514
-#line 197 "fts5parse.y"
236515235721
{ fts5yymsp[1].minor.fts5yy4 = 0; }
236516
-#line 1236 "fts5parse.sql"
236517235722
break;
236518235723
default:
236519235724
break;
236520235725
/********** End reduce actions ************************************************/
236521235726
};
@@ -236573,17 +235778,15 @@
236573235778
){
236574235779
sqlite3Fts5ParserARG_FETCH
236575235780
sqlite3Fts5ParserCTX_FETCH
236576235781
#define FTS5TOKEN fts5yyminor
236577235782
/************ Begin %syntax_error code ****************************************/
236578
-#line 30 "fts5parse.y"
236579235783
236580235784
UNUSED_PARAM(fts5yymajor); /* Silence a compiler warning */
236581235785
sqlite3Fts5ParseError(
236582235786
pParse, "fts5: syntax error near \"%.*s\"",FTS5TOKEN.n,FTS5TOKEN.p
236583235787
);
236584
-#line 1304 "fts5parse.sql"
236585235788
/************ End %syntax_error code ******************************************/
236586235789
sqlite3Fts5ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
236587235790
sqlite3Fts5ParserCTX_STORE
236588235791
}
236589235792
@@ -236849,11 +236052,10 @@
236849236052
(void)iToken;
236850236053
return 0;
236851236054
#endif
236852236055
}
236853236056
236854
-#line 1 "fts5_aux.c"
236855236057
/*
236856236058
** 2014 May 31
236857236059
**
236858236060
** The author disclaims copyright to this source code. In place of
236859236061
** a legal notice, here is a blessing:
@@ -237672,11 +236874,10 @@
237672236874
}
237673236875
237674236876
return rc;
237675236877
}
237676236878
237677
-#line 1 "fts5_buffer.c"
237678236879
/*
237679236880
** 2014 May 31
237680236881
**
237681236882
** The author disclaims copyright to this source code. In place of
237682236883
** a legal notice, here is a blessing:
@@ -238085,11 +237286,10 @@
238085237286
}
238086237287
sqlite3_free(p);
238087237288
}
238088237289
}
238089237290
238090
-#line 1 "fts5_config.c"
238091237291
/*
238092237292
** 2014 Jun 09
238093237293
**
238094237294
** The author disclaims copyright to this source code. In place of
238095237295
** a legal notice, here is a blessing:
@@ -239201,11 +238401,10 @@
239201238401
va_end(ap);
239202238402
}
239203238403
239204238404
239205238405
239206
-#line 1 "fts5_expr.c"
239207238406
/*
239208238407
** 2014 May 31
239209238408
**
239210238409
** The author disclaims copyright to this source code. In place of
239211238410
** a legal notice, here is a blessing:
@@ -242470,11 +241669,10 @@
242470241669
sqlite3Fts5IndexIterClearTokendata(pT->pIter);
242471241670
}
242472241671
}
242473241672
}
242474241673
242475
-#line 1 "fts5_hash.c"
242476241674
/*
242477241675
** 2014 August 11
242478241676
**
242479241677
** The author disclaims copyright to this source code. In place of
242480241678
** a legal notice, here is a blessing:
@@ -243062,11 +242260,10 @@
243062242260
*ppDoclist = 0;
243063242261
*pnDoclist = 0;
243064242262
}
243065242263
}
243066242264
243067
-#line 1 "fts5_index.c"
243068242265
/*
243069242266
** 2014 May 31
243070242267
**
243071242268
** The author disclaims copyright to this source code. In place of
243072242269
** a legal notice, here is a blessing:
@@ -252140,11 +251337,10 @@
252140251337
fts5StructureInvalidate(p);
252141251338
}
252142251339
return fts5IndexReturn(p);
252143251340
}
252144251341
252145
-#line 1 "fts5_main.c"
252146251342
/*
252147251343
** 2014 Jun 09
252148251344
**
252149251345
** The author disclaims copyright to this source code. In place of
252150251346
** a legal notice, here is a blessing:
@@ -252775,10 +251971,11 @@
252775251971
){
252776251972
/* A MATCH operator or equivalent */
252777251973
if( p->usable==0 || iCol<0 ){
252778251974
/* As there exists an unusable MATCH constraint this is an
252779251975
** unusable plan. Return SQLITE_CONSTRAINT. */
251976
+ idxStr[iIdxStr] = 0;
252780251977
return SQLITE_CONSTRAINT;
252781251978
}else{
252782251979
if( iCol==nCol+1 ){
252783251980
if( bSeenRank ) continue;
252784251981
idxStr[iIdxStr++] = 'r';
@@ -255730,11 +254927,11 @@
255730254927
int nArg, /* Number of args */
255731254928
sqlite3_value **apUnused /* Function arguments */
255732254929
){
255733254930
assert( nArg==0 );
255734254931
UNUSED_PARAM2(nArg, apUnused);
255735
- sqlite3_result_text(pCtx, "fts5: 2024-11-06 12:58:31 5495b12569c318d5020b4b5a625a392ef8e777b81c0200624fbbc2a6b5eddef9", -1, SQLITE_TRANSIENT);
254932
+ sqlite3_result_text(pCtx, "fts5: 2024-11-14 19:34:28 81202d2ab5963fdcf20555b6d0b31cc955ac27f1cd87656faea5c0611c9a2ee8", -1, SQLITE_TRANSIENT);
255736254933
}
255737254934
255738254935
/*
255739254936
** Implementation of fts5_locale(LOCALE, TEXT) function.
255740254937
**
@@ -255983,11 +255180,10 @@
255983255180
SQLITE_PRIVATE int sqlite3Fts5Init(sqlite3 *db){
255984255181
return fts5Init(db);
255985255182
}
255986255183
#endif
255987255184
255988
-#line 1 "fts5_storage.c"
255989255185
/*
255990255186
** 2014 May 31
255991255187
**
255992255188
** The author disclaims copyright to this source code. In place of
255993255189
** a legal notice, here is a blessing:
@@ -257497,11 +256693,10 @@
257497256693
}
257498256694
}
257499256695
return rc;
257500256696
}
257501256697
257502
-#line 1 "fts5_tokenize.c"
257503256698
/*
257504256699
** 2014 May 31
257505256700
**
257506256701
** The author disclaims copyright to this source code. In place of
257507256702
** a legal notice, here is a blessing:
@@ -258854,21 +258049,21 @@
258854258049
char aBuf[32];
258855258050
char *zOut = aBuf;
258856258051
int ii;
258857258052
const unsigned char *zIn = (const unsigned char*)pText;
258858258053
const unsigned char *zEof = &zIn[nText];
258859
- u32 iCode;
258054
+ u32 iCode = 0;
258860258055
int aStart[3]; /* Input offset of each character in aBuf[] */
258861258056
258862258057
UNUSED_PARAM(unusedFlags);
258863258058
258864258059
/* Populate aBuf[] with the characters for the first trigram. */
258865258060
for(ii=0; ii<3; ii++){
258866258061
do {
258867258062
aStart[ii] = zIn - (const unsigned char*)pText;
258063
+ if( zIn>=zEof ) return SQLITE_OK;
258868258064
READ_UTF8(zIn, zEof, iCode);
258869
- if( iCode==0 ) return SQLITE_OK;
258870258065
if( p->bFold ) iCode = sqlite3Fts5UnicodeFold(iCode, p->iFoldParam);
258871258066
}while( iCode==0 );
258872258067
WRITE_UTF8(zOut, iCode);
258873258068
}
258874258069
@@ -258885,12 +258080,15 @@
258885258080
const char *z1;
258886258081
258887258082
/* Read characters from the input up until the first non-diacritic */
258888258083
do {
258889258084
iNext = zIn - (const unsigned char*)pText;
258085
+ if( zIn>=zEof ){
258086
+ iCode = 0;
258087
+ break;
258088
+ }
258890258089
READ_UTF8(zIn, zEof, iCode);
258891
- if( iCode==0 ) break;
258892258090
if( p->bFold ) iCode = sqlite3Fts5UnicodeFold(iCode, p->iFoldParam);
258893258091
}while( iCode==0 );
258894258092
258895258093
/* Pass the current trigram back to fts5 */
258896258094
rc = xToken(pCtx, 0, aBuf, zOut-aBuf, aStart[0], iNext);
@@ -258986,11 +258184,10 @@
258986258184
);
258987258185
}
258988258186
return rc;
258989258187
}
258990258188
258991
-#line 1 "fts5_unicode2.c"
258992258189
/*
258993258190
** 2012-05-25
258994258191
**
258995258192
** The author disclaims copyright to this source code. In place of
258996258193
** a legal notice, here is a blessing:
@@ -259769,11 +258966,10 @@
259769258966
}
259770258967
aAscii[0] = 0; /* 0x00 is never a token character */
259771258968
}
259772258969
259773258970
259774
-#line 1 "fts5_varint.c"
259775258971
/*
259776258972
** 2015 May 30
259777258973
**
259778258974
** The author disclaims copyright to this source code. In place of
259779258975
** a legal notice, here is a blessing:
@@ -260115,11 +259311,10 @@
260115259311
if( iVal<(1 << 21) ) return 3;
260116259312
if( iVal<(1 << 28) ) return 4;
260117259313
return 5;
260118259314
}
260119259315
260120
-#line 1 "fts5_vocab.c"
260121259316
/*
260122259317
** 2015 May 08
260123259318
**
260124259319
** The author disclaims copyright to this source code. In place of
260125259320
** a legal notice, here is a blessing:
@@ -260931,11 +260126,10 @@
260931260126
/* Here ends the fts5.c composite file. */
260932260127
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) */
260933260128
260934260129
/************** End of fts5.c ************************************************/
260935260130
/************** Begin file stmt.c ********************************************/
260936
-#line 1 "tsrc/stmt.c"
260937260131
/*
260938260132
** 2017-05-31
260939260133
**
260940260134
** The author disclaims copyright to this source code. In place of
260941260135
** a legal notice, here is a blessing:
260942260136
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
18 ** separate file. This file contains only code for the core SQLite library.
19 **
20 ** The content in this amalgamation comes from Fossil check-in
21 ** 5495b12569c318d5020b4b5a625a392ef8e7 with changes in files:
22 **
23 **
24 */
25 #ifndef SQLITE_AMALGAMATION
26 #define SQLITE_CORE 1
@@ -27,11 +27,10 @@
27 #define SQLITE_AMALGAMATION 1
28 #ifndef SQLITE_PRIVATE
29 # define SQLITE_PRIVATE static
30 #endif
31 /************** Begin file sqliteInt.h ***************************************/
32 #line 1 "tsrc/sqliteInt.h"
33 /*
34 ** 2001 September 15
35 **
36 ** The author disclaims copyright to this source code. In place of
37 ** a legal notice, here is a blessing:
@@ -88,11 +87,10 @@
88 ** compiler warnings due to subsequent content in this file and other files
89 ** that are included by this file.
90 */
91 /************** Include msvc.h in the middle of sqliteInt.h ******************/
92 /************** Begin file msvc.h ********************************************/
93 #line 1 "tsrc/msvc.h"
94 /*
95 ** 2015 January 12
96 **
97 ** The author disclaims copyright to this source code. In place of
98 ** a legal notice, here is a blessing:
@@ -137,18 +135,16 @@
137
138 #endif /* SQLITE_MSVC_H */
139
140 /************** End of msvc.h ************************************************/
141 /************** Continuing where we left off in sqliteInt.h ******************/
142 #line 60 "tsrc/sqliteInt.h"
143
144 /*
145 ** Special setup for VxWorks
146 */
147 /************** Include vxworks.h in the middle of sqliteInt.h ***************/
148 /************** Begin file vxworks.h *****************************************/
149 #line 1 "tsrc/vxworks.h"
150 /*
151 ** 2015-03-02
152 **
153 ** The author disclaims copyright to this source code. In place of
154 ** a legal notice, here is a blessing:
@@ -180,11 +176,10 @@
180 #define HAVE_LSTAT 1
181 #endif /* defined(_WRS_KERNEL) */
182
183 /************** End of vxworks.h *********************************************/
184 /************** Continuing where we left off in sqliteInt.h ******************/
185 #line 65 "tsrc/sqliteInt.h"
186
187 /*
188 ** These #defines should enable >2GB file support on POSIX if the
189 ** underlying operating system supports it. If the OS lacks
190 ** large file support, or if the OS is windows, these should be no-ops.
@@ -320,11 +315,10 @@
320 ** first in QNX. Also, the _USE_32BIT_TIME_T macro must appear first for
321 ** MinGW.
322 */
323 /************** Include sqlite3.h in the middle of sqliteInt.h ***************/
324 /************** Begin file sqlite3.h *****************************************/
325 #line 1 "tsrc/sqlite3.h"
326 /*
327 ** 2001-09-15
328 **
329 ** The author disclaims copyright to this source code. In place of
330 ** a legal notice, here is a blessing:
@@ -471,11 +465,11 @@
471 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
472 ** [sqlite_version()] and [sqlite_source_id()].
473 */
474 #define SQLITE_VERSION "3.48.0"
475 #define SQLITE_VERSION_NUMBER 3048000
476 #define SQLITE_SOURCE_ID "2024-11-06 12:58:31 5495b12569c318d5020b4b5a625a392ef8e777b81c0200624fbbc2a6b5eddef9"
477
478 /*
479 ** CAPI3REF: Run-Time Library Version Numbers
480 ** KEYWORDS: sqlite3_version sqlite3_sourceid
481 **
@@ -1423,10 +1417,15 @@
1423 ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
1424 ** opcode causes the xFileControl method to swap the file handle with the one
1425 ** pointed to by the pArg argument. This capability is used during testing
1426 ** and only needs to be supported when SQLITE_TEST is defined.
1427 **
 
 
 
 
 
1428 ** <li>[[SQLITE_FCNTL_WAL_BLOCK]]
1429 ** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might
1430 ** be advantageous to block on the next WAL lock if the lock is not immediately
1431 ** available. The WAL subsystem issues this signal during rare
1432 ** circumstances in order to fix a problem with priority inversion.
@@ -1576,10 +1575,11 @@
1576 #define SQLITE_FCNTL_RESERVE_BYTES 38
1577 #define SQLITE_FCNTL_CKPT_START 39
1578 #define SQLITE_FCNTL_EXTERNAL_READER 40
1579 #define SQLITE_FCNTL_CKSM_FILE 41
1580 #define SQLITE_FCNTL_RESET_CACHE 42
 
1581
1582 /* deprecated names */
1583 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1584 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1585 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -2954,14 +2954,18 @@
2954 **
2955 ** ^These functions return the number of rows modified, inserted or
2956 ** deleted by the most recently completed INSERT, UPDATE or DELETE
2957 ** statement on the database connection specified by the only parameter.
2958 ** The two functions are identical except for the type of the return value
2959 ** and that if the number of rows modified by the most recent INSERT, UPDATE
2960 ** or DELETE is greater than the maximum value supported by type "int", then
2961 ** the return value of sqlite3_changes() is undefined. ^Executing any other
2962 ** type of SQL statement does not modify the value returned by these functions.
 
 
 
 
2963 **
2964 ** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
2965 ** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
2966 ** [foreign key actions] or [REPLACE] constraint resolution are not counted.
2967 **
@@ -13908,11 +13912,10 @@
13908 /******** End of fts5.h *********/
13909 #endif /* SQLITE3_H */
13910
13911 /************** End of sqlite3.h *********************************************/
13912 /************** Continuing where we left off in sqliteInt.h ******************/
13913 #line 203 "tsrc/sqliteInt.h"
13914
13915 /*
13916 ** Reuse the STATIC_LRU for mutex access to sqlite3_temp_directory.
13917 */
13918 #define SQLITE_MUTEX_STATIC_TEMPDIR SQLITE_MUTEX_STATIC_VFS1
@@ -13926,11 +13929,10 @@
13926 #define SQLITECONFIG_H 1
13927 #endif
13928
13929 /************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/
13930 /************** Begin file sqliteLimit.h *************************************/
13931 #line 1 "tsrc/sqliteLimit.h"
13932 /*
13933 ** 2007 May 7
13934 **
13935 ** The author disclaims copyright to this source code. In place of
13936 ** a legal notice, here is a blessing:
@@ -13952,10 +13954,11 @@
13952 ** to count the size: 2^31-1 or 2147483647.
13953 */
13954 #ifndef SQLITE_MAX_LENGTH
13955 # define SQLITE_MAX_LENGTH 1000000000
13956 #endif
 
13957
13958 /*
13959 ** This is the maximum number of
13960 **
13961 ** * Columns in a table
@@ -14140,11 +14143,10 @@
14140 # define SQLITE_MAX_TRIGGER_DEPTH 1000
14141 #endif
14142
14143 /************** End of sqliteLimit.h *****************************************/
14144 /************** Continuing where we left off in sqliteInt.h ******************/
14145 #line 219 "tsrc/sqliteInt.h"
14146
14147 /* Disable nuisance warnings on Borland compilers */
14148 #if defined(__BORLANDC__)
14149 #pragma warn -rch /* unreachable code */
14150 #pragma warn -ccc /* Condition is always true or false */
@@ -14558,11 +14560,10 @@
14558 #define likely(X) (X)
14559 #define unlikely(X) (X)
14560
14561 /************** Include hash.h in the middle of sqliteInt.h ******************/
14562 /************** Begin file hash.h ********************************************/
14563 #line 1 "tsrc/hash.h"
14564 /*
14565 ** 2001 September 22
14566 **
14567 ** The author disclaims copyright to this source code. In place of
14568 ** a legal notice, here is a blessing:
@@ -14658,14 +14659,12 @@
14658
14659 #endif /* SQLITE_HASH_H */
14660
14661 /************** End of hash.h ************************************************/
14662 /************** Continuing where we left off in sqliteInt.h ******************/
14663 #line 635 "tsrc/sqliteInt.h"
14664 /************** Include parse.h in the middle of sqliteInt.h *****************/
14665 /************** Begin file parse.h *******************************************/
14666 #line 1 "tsrc/parse.h"
14667 #define TK_SEMI 1
14668 #define TK_EXPLAIN 2
14669 #define TK_QUERY 3
14670 #define TK_PLAN 4
14671 #define TK_BEGIN 5
@@ -14850,11 +14849,10 @@
14850 #define TK_SPACE 184
14851 #define TK_ILLEGAL 185
14852
14853 /************** End of parse.h ***********************************************/
14854 /************** Continuing where we left off in sqliteInt.h ******************/
14855 #line 636 "tsrc/sqliteInt.h"
14856 #include <stdio.h>
14857 #include <stdlib.h>
14858 #include <string.h>
14859 #include <assert.h>
14860 #include <stddef.h>
@@ -15616,11 +15614,10 @@
15616 ** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
15617 ** pointer types (i.e. FuncDef) defined above.
15618 */
15619 /************** Include os.h in the middle of sqliteInt.h ********************/
15620 /************** Begin file os.h **********************************************/
15621 #line 1 "tsrc/os.h"
15622 /*
15623 ** 2001 September 16
15624 **
15625 ** The author disclaims copyright to this source code. In place of
15626 ** a legal notice, here is a blessing:
@@ -15645,11 +15642,10 @@
15645 ** Attempt to automatically detect the operating system and setup the
15646 ** necessary pre-processor macros for it.
15647 */
15648 /************** Include os_setup.h in the middle of os.h *********************/
15649 /************** Begin file os_setup.h ****************************************/
15650 #line 1 "tsrc/os_setup.h"
15651 /*
15652 ** 2013 November 25
15653 **
15654 ** The author disclaims copyright to this source code. In place of
15655 ** a legal notice, here is a blessing:
@@ -15740,11 +15736,10 @@
15740
15741 #endif /* SQLITE_OS_SETUP_H */
15742
15743 /************** End of os_setup.h ********************************************/
15744 /************** Continuing where we left off in os.h *************************/
15745 #line 28 "tsrc/os.h"
15746
15747 /* If the SET_FULLSYNC macro is not defined above, then make it
15748 ** a no-op
15749 */
15750 #ifndef SET_FULLSYNC
@@ -15942,14 +15937,12 @@
15942
15943 #endif /* _SQLITE_OS_H_ */
15944
15945 /************** End of os.h **************************************************/
15946 /************** Continuing where we left off in sqliteInt.h ******************/
15947 #line 1400 "tsrc/sqliteInt.h"
15948 /************** Include pager.h in the middle of sqliteInt.h *****************/
15949 /************** Begin file pager.h *******************************************/
15950 #line 1 "tsrc/pager.h"
15951 /*
15952 ** 2001 September 15
15953 **
15954 ** The author disclaims copyright to this source code. In place of
15955 ** a legal notice, here is a blessing:
@@ -16196,14 +16189,12 @@
16196
16197 #endif /* SQLITE_PAGER_H */
16198
16199 /************** End of pager.h ***********************************************/
16200 /************** Continuing where we left off in sqliteInt.h ******************/
16201 #line 1401 "tsrc/sqliteInt.h"
16202 /************** Include btree.h in the middle of sqliteInt.h *****************/
16203 /************** Begin file btree.h *******************************************/
16204 #line 1 "tsrc/btree.h"
16205 /*
16206 ** 2001 September 15
16207 **
16208 ** The author disclaims copyright to this source code. In place of
16209 ** a legal notice, here is a blessing:
@@ -16627,14 +16618,12 @@
16627
16628 #endif /* SQLITE_BTREE_H */
16629
16630 /************** End of btree.h ***********************************************/
16631 /************** Continuing where we left off in sqliteInt.h ******************/
16632 #line 1402 "tsrc/sqliteInt.h"
16633 /************** Include vdbe.h in the middle of sqliteInt.h ******************/
16634 /************** Begin file vdbe.h ********************************************/
16635 #line 1 "tsrc/vdbe.h"
16636 /*
16637 ** 2001 September 15
16638 **
16639 ** The author disclaims copyright to this source code. In place of
16640 ** a legal notice, here is a blessing:
@@ -16814,11 +16803,10 @@
16814 ** The makefile scans the vdbe.c source file and creates the "opcodes.h"
16815 ** header file that defines a number for each opcode used by the VDBE.
16816 */
16817 /************** Include opcodes.h in the middle of vdbe.h ********************/
16818 /************** Begin file opcodes.h *****************************************/
16819 #line 1 "tsrc/opcodes.h"
16820 /* Automatically generated. Do not edit */
16821 /* See the tool/mkopcodeh.tcl script for details */
16822 #define OP_Savepoint 0
16823 #define OP_AutoCommit 1
16824 #define OP_Transaction 2
@@ -17056,11 +17044,10 @@
17056 */
17057 #define SQLITE_MX_JUMP_OPCODE 64 /* Maximum JUMP opcode */
17058
17059 /************** End of opcodes.h *********************************************/
17060 /************** Continuing where we left off in vdbe.h ***********************/
17061 #line 183 "tsrc/vdbe.h"
17062
17063 /*
17064 ** Additional non-public SQLITE_PREPARE_* flags
17065 */
17066 #define SQLITE_PREPARE_SAVESQL 0x80 /* Preserve SQL text */
@@ -17306,14 +17293,12 @@
17306
17307 #endif /* SQLITE_VDBE_H */
17308
17309 /************** End of vdbe.h ************************************************/
17310 /************** Continuing where we left off in sqliteInt.h ******************/
17311 #line 1403 "tsrc/sqliteInt.h"
17312 /************** Include pcache.h in the middle of sqliteInt.h ****************/
17313 /************** Begin file pcache.h ******************************************/
17314 #line 1 "tsrc/pcache.h"
17315 /*
17316 ** 2008 August 05
17317 **
17318 ** The author disclaims copyright to this source code. In place of
17319 ** a legal notice, here is a blessing:
@@ -17503,14 +17488,12 @@
17503
17504 #endif /* _PCACHE_H_ */
17505
17506 /************** End of pcache.h **********************************************/
17507 /************** Continuing where we left off in sqliteInt.h ******************/
17508 #line 1404 "tsrc/sqliteInt.h"
17509 /************** Include mutex.h in the middle of sqliteInt.h *****************/
17510 /************** Begin file mutex.h *******************************************/
17511 #line 1 "tsrc/mutex.h"
17512 /*
17513 ** 2007 August 28
17514 **
17515 ** The author disclaims copyright to this source code. In place of
17516 ** a legal notice, here is a blessing:
@@ -17581,11 +17564,10 @@
17581 SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
17582 #endif /* defined(SQLITE_MUTEX_OMIT) */
17583
17584 /************** End of mutex.h ***********************************************/
17585 /************** Continuing where we left off in sqliteInt.h ******************/
17586 #line 1405 "tsrc/sqliteInt.h"
17587
17588 /* The SQLITE_EXTRA_DURABLE compile-time option used to set the default
17589 ** synchronous setting to EXTRA. It is no longer supported.
17590 */
17591 #ifdef SQLITE_EXTRA_DURABLE
@@ -21982,11 +21964,10 @@
21982
21983 #endif /* SQLITEINT_H */
21984
21985 /************** End of sqliteInt.h *******************************************/
21986 /************** Begin file os_common.h ***************************************/
21987 #line 1 "tsrc/os_common.h"
21988 /*
21989 ** 2004 May 22
21990 **
21991 ** The author disclaims copyright to this source code. In place of
21992 ** a legal notice, here is a blessing:
@@ -22085,11 +22066,10 @@
22085
22086 #endif /* !defined(_OS_COMMON_H_) */
22087
22088 /************** End of os_common.h *******************************************/
22089 /************** Begin file ctime.c *******************************************/
22090 #line 1 "tsrc/ctime.c"
22091 /* DO NOT EDIT!
22092 ** This file is automatically generated by the script in the canonical
22093 ** SQLite source tree at tool/mkctimec.tcl.
22094 **
22095 ** To modify this header, edit any of the various lists in that script
@@ -22885,11 +22865,10 @@
22885
22886 #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
22887
22888 /************** End of ctime.c ***********************************************/
22889 /************** Begin file global.c ******************************************/
22890 #line 1 "tsrc/global.c"
22891 /*
22892 ** 2008 June 13
22893 **
22894 ** The author disclaims copyright to this source code. In place of
22895 ** a legal notice, here is a blessing:
@@ -23290,11 +23269,10 @@
23290 "TEXT"
23291 };
23292
23293 /************** End of global.c **********************************************/
23294 /************** Begin file status.c ******************************************/
23295 #line 1 "tsrc/status.c"
23296 /*
23297 ** 2008 June 18
23298 **
23299 ** The author disclaims copyright to this source code. In place of
23300 ** a legal notice, here is a blessing:
@@ -23309,11 +23287,10 @@
23309 ** functionality.
23310 */
23311 /* #include "sqliteInt.h" */
23312 /************** Include vdbeInt.h in the middle of status.c ******************/
23313 /************** Begin file vdbeInt.h *****************************************/
23314 #line 1 "tsrc/vdbeInt.h"
23315 /*
23316 ** 2003 September 6
23317 **
23318 ** The author disclaims copyright to this source code. In place of
23319 ** a legal notice, here is a blessing:
@@ -24046,11 +24023,10 @@
24046
24047 #endif /* !defined(SQLITE_VDBEINT_H) */
24048
24049 /************** End of vdbeInt.h *********************************************/
24050 /************** Continuing where we left off in status.c *********************/
24051 #line 18 "tsrc/status.c"
24052
24053 /*
24054 ** Variables in which to record status information.
24055 */
24056 #if SQLITE_PTRSIZE>4
@@ -24431,11 +24407,10 @@
24431 return rc;
24432 }
24433
24434 /************** End of status.c **********************************************/
24435 /************** Begin file date.c ********************************************/
24436 #line 1 "tsrc/date.c"
24437 /*
24438 ** 2003 October 31
24439 **
24440 ** The author disclaims copyright to this source code. In place of
24441 ** a legal notice, here is a blessing:
@@ -26250,11 +26225,10 @@
26250 sqlite3InsertBuiltinFuncs(aDateTimeFuncs, ArraySize(aDateTimeFuncs));
26251 }
26252
26253 /************** End of date.c ************************************************/
26254 /************** Begin file os.c **********************************************/
26255 #line 1 "tsrc/os.c"
26256 /*
26257 ** 2005 November 29
26258 **
26259 ** The author disclaims copyright to this source code. In place of
26260 ** a legal notice, here is a blessing:
@@ -26701,11 +26675,10 @@
26701 return SQLITE_OK;
26702 }
26703
26704 /************** End of os.c **************************************************/
26705 /************** Begin file fault.c *******************************************/
26706 #line 1 "tsrc/fault.c"
26707 /*
26708 ** 2008 Jan 22
26709 **
26710 ** The author disclaims copyright to this source code. In place of
26711 ** a legal notice, here is a blessing:
@@ -26792,11 +26765,10 @@
26792
26793 #endif /* #ifndef SQLITE_UNTESTABLE */
26794
26795 /************** End of fault.c ***********************************************/
26796 /************** Begin file mem0.c ********************************************/
26797 #line 1 "tsrc/mem0.c"
26798 /*
26799 ** 2008 October 28
26800 **
26801 ** The author disclaims copyright to this source code. In place of
26802 ** a legal notice, here is a blessing:
@@ -26855,11 +26827,10 @@
26855
26856 #endif /* SQLITE_ZERO_MALLOC */
26857
26858 /************** End of mem0.c ************************************************/
26859 /************** Begin file mem1.c ********************************************/
26860 #line 1 "tsrc/mem1.c"
26861 /*
26862 ** 2007 August 14
26863 **
26864 ** The author disclaims copyright to this source code. In place of
26865 ** a legal notice, here is a blessing:
@@ -27150,11 +27121,10 @@
27150
27151 #endif /* SQLITE_SYSTEM_MALLOC */
27152
27153 /************** End of mem1.c ************************************************/
27154 /************** Begin file mem2.c ********************************************/
27155 #line 1 "tsrc/mem2.c"
27156 /*
27157 ** 2007 August 15
27158 **
27159 ** The author disclaims copyright to this source code. In place of
27160 ** a legal notice, here is a blessing:
@@ -27682,11 +27652,10 @@
27682
27683 #endif /* SQLITE_MEMDEBUG */
27684
27685 /************** End of mem2.c ************************************************/
27686 /************** Begin file mem3.c ********************************************/
27687 #line 1 "tsrc/mem3.c"
27688 /*
27689 ** 2007 October 14
27690 **
27691 ** The author disclaims copyright to this source code. In place of
27692 ** a legal notice, here is a blessing:
@@ -28373,11 +28342,10 @@
28373
28374 #endif /* SQLITE_ENABLE_MEMSYS3 */
28375
28376 /************** End of mem3.c ************************************************/
28377 /************** Begin file mem5.c ********************************************/
28378 #line 1 "tsrc/mem5.c"
28379 /*
28380 ** 2007 October 14
28381 **
28382 ** The author disclaims copyright to this source code. In place of
28383 ** a legal notice, here is a blessing:
@@ -28962,11 +28930,10 @@
28962
28963 #endif /* SQLITE_ENABLE_MEMSYS5 */
28964
28965 /************** End of mem5.c ************************************************/
28966 /************** Begin file mutex.c *******************************************/
28967 #line 1 "tsrc/mutex.c"
28968 /*
28969 ** 2007 August 14
28970 **
28971 ** The author disclaims copyright to this source code. In place of
28972 ** a legal notice, here is a blessing:
@@ -29340,11 +29307,10 @@
29340
29341 #endif /* !defined(SQLITE_MUTEX_OMIT) */
29342
29343 /************** End of mutex.c ***********************************************/
29344 /************** Begin file mutex_noop.c **************************************/
29345 #line 1 "tsrc/mutex_noop.c"
29346 /*
29347 ** 2008 October 07
29348 **
29349 ** The author disclaims copyright to this source code. In place of
29350 ** a legal notice, here is a blessing:
@@ -29559,11 +29525,10 @@
29559 #endif /* defined(SQLITE_MUTEX_NOOP) */
29560 #endif /* !defined(SQLITE_MUTEX_OMIT) */
29561
29562 /************** End of mutex_noop.c ******************************************/
29563 /************** Begin file mutex_unix.c **************************************/
29564 #line 1 "tsrc/mutex_unix.c"
29565 /*
29566 ** 2007 August 28
29567 **
29568 ** The author disclaims copyright to this source code. In place of
29569 ** a legal notice, here is a blessing:
@@ -29957,11 +29922,10 @@
29957
29958 #endif /* SQLITE_MUTEX_PTHREADS */
29959
29960 /************** End of mutex_unix.c ******************************************/
29961 /************** Begin file mutex_w32.c ***************************************/
29962 #line 1 "tsrc/mutex_w32.c"
29963 /*
29964 ** 2007 August 14
29965 **
29966 ** The author disclaims copyright to this source code. In place of
29967 ** a legal notice, here is a blessing:
@@ -29984,11 +29948,10 @@
29984 /*
29985 ** Include the header file for the Windows VFS.
29986 */
29987 /************** Include os_win.h in the middle of mutex_w32.c ****************/
29988 /************** Begin file os_win.h ******************************************/
29989 #line 1 "tsrc/os_win.h"
29990 /*
29991 ** 2013 November 25
29992 **
29993 ** The author disclaims copyright to this source code. In place of
29994 ** a legal notice, here is a blessing:
@@ -30076,11 +30039,10 @@
30076
30077 #endif /* SQLITE_OS_WIN_H */
30078
30079 /************** End of os_win.h **********************************************/
30080 /************** Continuing where we left off in mutex_w32.c ******************/
30081 #line 26 "tsrc/mutex_w32.c"
30082 #endif
30083
30084 /*
30085 ** The code in this file is only used if we are compiling multithreaded
30086 ** on a Win32 system.
@@ -30454,11 +30416,10 @@
30454
30455 #endif /* SQLITE_MUTEX_W32 */
30456
30457 /************** End of mutex_w32.c *******************************************/
30458 /************** Begin file malloc.c ******************************************/
30459 #line 1 "tsrc/malloc.c"
30460 /*
30461 ** 2001 September 15
30462 **
30463 ** The author disclaims copyright to this source code. In place of
30464 ** a legal notice, here is a blessing:
@@ -31378,11 +31339,10 @@
31378 return 0;
31379 }
31380
31381 /************** End of malloc.c **********************************************/
31382 /************** Begin file printf.c ******************************************/
31383 #line 1 "tsrc/printf.c"
31384 /*
31385 ** The "printf" code that follows dates from the 1980's. It is in
31386 ** the public domain.
31387 **
31388 **************************************************************************
@@ -32828,11 +32788,10 @@
32828 }
32829 }
32830
32831 /************** End of printf.c **********************************************/
32832 /************** Begin file treeview.c ****************************************/
32833 #line 1 "tsrc/treeview.c"
32834 /*
32835 ** 2015-06-08
32836 **
32837 ** The author disclaims copyright to this source code. In place of
32838 ** a legal notice, here is a blessing:
@@ -34160,11 +34119,10 @@
34160
34161 #endif /* SQLITE_DEBUG */
34162
34163 /************** End of treeview.c ********************************************/
34164 /************** Begin file random.c ******************************************/
34165 #line 1 "tsrc/random.c"
34166 /*
34167 ** 2001 September 15
34168 **
34169 ** The author disclaims copyright to this source code. In place of
34170 ** a legal notice, here is a blessing:
@@ -34321,11 +34279,10 @@
34321 }
34322 #endif /* SQLITE_UNTESTABLE */
34323
34324 /************** End of random.c **********************************************/
34325 /************** Begin file threads.c *****************************************/
34326 #line 1 "tsrc/threads.c"
34327 /*
34328 ** 2012 July 21
34329 **
34330 ** The author disclaims copyright to this source code. In place of
34331 ** a legal notice, here is a blessing:
@@ -34599,11 +34556,10 @@
34599 /****************************** End Single-Threaded *************************/
34600 #endif /* SQLITE_MAX_WORKER_THREADS>0 */
34601
34602 /************** End of threads.c *********************************************/
34603 /************** Begin file utf.c *********************************************/
34604 #line 1 "tsrc/utf.c"
34605 /*
34606 ** 2004 April 13
34607 **
34608 ** The author disclaims copyright to this source code. In place of
34609 ** a legal notice, here is a blessing:
@@ -35171,11 +35127,10 @@
35171 #endif /* SQLITE_TEST */
35172 #endif /* SQLITE_OMIT_UTF16 */
35173
35174 /************** End of utf.c *************************************************/
35175 /************** Begin file util.c ********************************************/
35176 #line 1 "tsrc/util.c"
35177 /*
35178 ** 2001 September 15
35179 **
35180 ** The author disclaims copyright to this source code. In place of
35181 ** a legal notice, here is a blessing:
@@ -37023,11 +36978,10 @@
37023 return 0;
37024 }
37025
37026 /************** End of util.c ************************************************/
37027 /************** Begin file hash.c ********************************************/
37028 #line 1 "tsrc/hash.c"
37029 /*
37030 ** 2001 September 22
37031 **
37032 ** The author disclaims copyright to this source code. In place of
37033 ** a legal notice, here is a blessing:
@@ -37297,11 +37251,10 @@
37297 return 0;
37298 }
37299
37300 /************** End of hash.c ************************************************/
37301 /************** Begin file opcodes.c *****************************************/
37302 #line 1 "tsrc/opcodes.c"
37303 /* Automatically generated. Do not edit */
37304 /* See the tool/mkopcodec.tcl script for details. */
37305 #if !defined(SQLITE_OMIT_EXPLAIN) \
37306 || defined(VDBE_PROFILE) \
37307 || defined(SQLITE_DEBUG)
@@ -37507,11 +37460,10 @@
37507 }
37508 #endif
37509
37510 /************** End of opcodes.c *********************************************/
37511 /************** Begin file os_kv.c *******************************************/
37512 #line 1 "tsrc/os_kv.c"
37513 /*
37514 ** 2022-09-06
37515 **
37516 ** The author disclaims copyright to this source code. In place of
37517 ** a legal notice, here is a blessing:
@@ -38490,11 +38442,10 @@
38490 }
38491 #endif
38492
38493 /************** End of os_kv.c ***********************************************/
38494 /************** Begin file os_unix.c *****************************************/
38495 #line 1 "tsrc/os_unix.c"
38496 /*
38497 ** 2004 May 22
38498 **
38499 ** The author disclaims copyright to this source code. In place of
38500 ** a legal notice, here is a blessing:
@@ -42480,10 +42431,15 @@
42480 int rc = osIoctl(pFile->h, F2FS_IOC_ABORT_VOLATILE_WRITE);
42481 return rc ? SQLITE_IOERR_ROLLBACK_ATOMIC : SQLITE_OK;
42482 }
42483 #endif /* __linux__ && SQLITE_ENABLE_BATCH_ATOMIC_WRITE */
42484
 
 
 
 
 
42485 case SQLITE_FCNTL_LOCKSTATE: {
42486 *(int*)pArg = pFile->eFileLock;
42487 return SQLITE_OK;
42488 }
42489 case SQLITE_FCNTL_LAST_ERRNO: {
@@ -46760,11 +46716,10 @@
46760
46761 #endif /* SQLITE_OS_UNIX */
46762
46763 /************** End of os_unix.c *********************************************/
46764 /************** Begin file os_win.c ******************************************/
46765 #line 1 "tsrc/os_win.c"
46766 /*
46767 ** 2004 May 22
46768 **
46769 ** The author disclaims copyright to this source code. In place of
46770 ** a legal notice, here is a blessing:
@@ -50362,10 +50317,15 @@
50362 OSTRACE(("FCNTL oldFile=%p, newFile=%p, rc=SQLITE_OK\n",
50363 hOldFile, pFile->h));
50364 return SQLITE_OK;
50365 }
50366 #endif
 
 
 
 
 
50367 case SQLITE_FCNTL_TEMPFILENAME: {
50368 char *zTFile = 0;
50369 int rc = winGetTempname(pFile->pVfs, &zTFile);
50370 if( rc==SQLITE_OK ){
50371 *(char**)pArg = zTFile;
@@ -52975,11 +52935,10 @@
52975
52976 #endif /* SQLITE_OS_WIN */
52977
52978 /************** End of os_win.c **********************************************/
52979 /************** Begin file memdb.c *******************************************/
52980 #line 1 "tsrc/memdb.c"
52981 /*
52982 ** 2016-09-07
52983 **
52984 ** The author disclaims copyright to this source code. In place of
52985 ** a legal notice, here is a blessing:
@@ -53915,11 +53874,10 @@
53915 }
53916 #endif /* SQLITE_OMIT_DESERIALIZE */
53917
53918 /************** End of memdb.c ***********************************************/
53919 /************** Begin file bitvec.c ******************************************/
53920 #line 1 "tsrc/bitvec.c"
53921 /*
53922 ** 2008 February 16
53923 **
53924 ** The author disclaims copyright to this source code. In place of
53925 ** a legal notice, here is a blessing:
@@ -54330,11 +54288,10 @@
54330 }
54331 #endif /* SQLITE_UNTESTABLE */
54332
54333 /************** End of bitvec.c **********************************************/
54334 /************** Begin file pcache.c ******************************************/
54335 #line 1 "tsrc/pcache.c"
54336 /*
54337 ** 2008 August 05
54338 **
54339 ** The author disclaims copyright to this source code. In place of
54340 ** a legal notice, here is a blessing:
@@ -55270,11 +55227,10 @@
55270 }
55271 #endif
55272
55273 /************** End of pcache.c **********************************************/
55274 /************** Begin file pcache1.c *****************************************/
55275 #line 1 "tsrc/pcache1.c"
55276 /*
55277 ** 2008 November 05
55278 **
55279 ** The author disclaims copyright to this source code. In place of
55280 ** a legal notice, here is a blessing:
@@ -56556,11 +56512,10 @@
56556 }
56557 #endif
56558
56559 /************** End of pcache1.c *********************************************/
56560 /************** Begin file rowset.c ******************************************/
56561 #line 1 "tsrc/rowset.c"
56562 /*
56563 ** 2008 December 3
56564 **
56565 ** The author disclaims copyright to this source code. In place of
56566 ** a legal notice, here is a blessing:
@@ -57062,11 +57017,10 @@
57062 return 0;
57063 }
57064
57065 /************** End of rowset.c **********************************************/
57066 /************** Begin file pager.c *******************************************/
57067 #line 1 "tsrc/pager.c"
57068 /*
57069 ** 2001 September 15
57070 **
57071 ** The author disclaims copyright to this source code. In place of
57072 ** a legal notice, here is a blessing:
@@ -57087,11 +57041,10 @@
57087 */
57088 #ifndef SQLITE_OMIT_DISKIO
57089 /* #include "sqliteInt.h" */
57090 /************** Include wal.h in the middle of pager.c ***********************/
57091 /************** Begin file wal.h *********************************************/
57092 #line 1 "tsrc/wal.h"
57093 /*
57094 ** 2010 February 1
57095 **
57096 ** The author disclaims copyright to this source code. In place of
57097 ** a legal notice, here is a blessing:
@@ -57251,11 +57204,10 @@
57251 #endif /* ifndef SQLITE_OMIT_WAL */
57252 #endif /* SQLITE_WAL_H */
57253
57254 /************** End of wal.h *************************************************/
57255 /************** Continuing where we left off in pager.c **********************/
57256 #line 24 "tsrc/pager.c"
57257
57258
57259 /******************* NOTES ON THE DESIGN OF THE PAGER ************************
57260 **
57261 ** This comment block describes invariants that hold when using a rollback
@@ -65041,11 +64993,10 @@
65041
65042 #endif /* SQLITE_OMIT_DISKIO */
65043
65044 /************** End of pager.c ***********************************************/
65045 /************** Begin file wal.c *********************************************/
65046 #line 1 "tsrc/wal.c"
65047 /*
65048 ** 2010 February 1
65049 **
65050 ** The author disclaims copyright to this source code. In place of
65051 ** a legal notice, here is a blessing:
@@ -69638,11 +69589,10 @@
69638
69639 #endif /* #ifndef SQLITE_OMIT_WAL */
69640
69641 /************** End of wal.c *************************************************/
69642 /************** Begin file btmutex.c *****************************************/
69643 #line 1 "tsrc/btmutex.c"
69644 /*
69645 ** 2007 August 27
69646 **
69647 ** The author disclaims copyright to this source code. In place of
69648 ** a legal notice, here is a blessing:
@@ -69658,11 +69608,10 @@
69658 ** big and we want to break it down some. This packaged seemed like
69659 ** a good breakout.
69660 */
69661 /************** Include btreeInt.h in the middle of btmutex.c ****************/
69662 /************** Begin file btreeInt.h ****************************************/
69663 #line 1 "tsrc/btreeInt.h"
69664 /*
69665 ** 2004 April 6
69666 **
69667 ** The author disclaims copyright to this source code. In place of
69668 ** a legal notice, here is a blessing:
@@ -70396,11 +70345,10 @@
70396 # define get2byteAligned(x) ((x)[0]<<8 | (x)[1])
70397 #endif
70398
70399 /************** End of btreeInt.h ********************************************/
70400 /************** Continuing where we left off in btmutex.c ********************/
70401 #line 19 "tsrc/btmutex.c"
70402 #ifndef SQLITE_OMIT_SHARED_CACHE
70403 #if SQLITE_THREADSAFE
70404
70405 /*
70406 ** Obtain the BtShared mutex associated with B-Tree handle p. Also,
@@ -70691,11 +70639,10 @@
70691
70692 #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */
70693
70694 /************** End of btmutex.c *********************************************/
70695 /************** Begin file btree.c *******************************************/
70696 #line 1 "tsrc/btree.c"
70697 /*
70698 ** 2004 April 6
70699 **
70700 ** The author disclaims copyright to this source code. In place of
70701 ** a legal notice, here is a blessing:
@@ -82186,11 +82133,10 @@
82186 }
82187 #endif
82188
82189 /************** End of btree.c ***********************************************/
82190 /************** Begin file backup.c ******************************************/
82191 #line 1 "tsrc/backup.c"
82192 /*
82193 ** 2009 January 28
82194 **
82195 ** The author disclaims copyright to this source code. In place of
82196 ** a legal notice, here is a blessing:
@@ -82957,11 +82903,10 @@
82957 }
82958 #endif /* SQLITE_OMIT_VACUUM */
82959
82960 /************** End of backup.c **********************************************/
82961 /************** Begin file vdbemem.c *****************************************/
82962 #line 1 "tsrc/vdbemem.c"
82963 /*
82964 ** 2004 May 26
82965 **
82966 ** The author disclaims copyright to this source code. In place of
82967 ** a legal notice, here is a blessing:
@@ -85014,11 +84959,10 @@
85014 return valueBytes(pVal, enc);
85015 }
85016
85017 /************** End of vdbemem.c *********************************************/
85018 /************** Begin file vdbeaux.c *****************************************/
85019 #line 1 "tsrc/vdbeaux.c"
85020 /*
85021 ** 2003 September 6
85022 **
85023 ** The author disclaims copyright to this source code. In place of
85024 ** a legal notice, here is a blessing:
@@ -90566,11 +90510,10 @@
90566 }
90567 #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
90568
90569 /************** End of vdbeaux.c *********************************************/
90570 /************** Begin file vdbeapi.c *****************************************/
90571 #line 1 "tsrc/vdbeapi.c"
90572 /*
90573 ** 2004 May 26
90574 **
90575 ** The author disclaims copyright to this source code. In place of
90576 ** a legal notice, here is a blessing:
@@ -93153,11 +93096,10 @@
93153 }
93154 #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */
93155
93156 /************** End of vdbeapi.c *********************************************/
93157 /************** Begin file vdbetrace.c ***************************************/
93158 #line 1 "tsrc/vdbetrace.c"
93159 /*
93160 ** 2009 November 25
93161 **
93162 ** The author disclaims copyright to this source code. In place of
93163 ** a legal notice, here is a blessing:
@@ -93349,11 +93291,10 @@
93349
93350 #endif /* #ifndef SQLITE_OMIT_TRACE */
93351
93352 /************** End of vdbetrace.c *******************************************/
93353 /************** Begin file vdbe.c ********************************************/
93354 #line 1 "tsrc/vdbe.c"
93355 /*
93356 ** 2001 September 15
93357 **
93358 ** The author disclaims copyright to this source code. In place of
93359 ** a legal notice, here is a blessing:
@@ -93381,11 +93322,10 @@
93381 #if defined(VDBE_PROFILE) \
93382 || defined(SQLITE_PERFORMANCE_TRACE) \
93383 || defined(SQLITE_ENABLE_STMT_SCANSTATUS)
93384 /************** Include hwtime.h in the middle of vdbe.c *********************/
93385 /************** Begin file hwtime.h ******************************************/
93386 #line 1 "tsrc/hwtime.h"
93387 /*
93388 ** 2008 May 27
93389 **
93390 ** The author disclaims copyright to this source code. In place of
93391 ** a legal notice, here is a blessing:
@@ -93470,11 +93410,10 @@
93470
93471 #endif /* !defined(SQLITE_HWTIME_H) */
93472
93473 /************** End of hwtime.h **********************************************/
93474 /************** Continuing where we left off in vdbe.c ***********************/
93475 #line 31 "tsrc/vdbe.c"
93476 #endif
93477
93478 /*
93479 ** Invoke this macro on memory cells just prior to changing the
93480 ** value of the cell. This macro verifies that shallow copies are
@@ -102664,11 +102603,10 @@
102664 }
102665
102666
102667 /************** End of vdbe.c ************************************************/
102668 /************** Begin file vdbeblob.c ****************************************/
102669 #line 1 "tsrc/vdbeblob.c"
102670 /*
102671 ** 2007 May 1
102672 **
102673 ** The author disclaims copyright to this source code. In place of
102674 ** a legal notice, here is a blessing:
@@ -103188,11 +103126,10 @@
103188
103189 #endif /* #ifndef SQLITE_OMIT_INCRBLOB */
103190
103191 /************** End of vdbeblob.c ********************************************/
103192 /************** Begin file vdbesort.c ****************************************/
103193 #line 1 "tsrc/vdbesort.c"
103194 /*
103195 ** 2011-07-09
103196 **
103197 ** The author disclaims copyright to this source code. In place of
103198 ** a legal notice, here is a blessing:
@@ -105959,11 +105896,10 @@
105959 return SQLITE_OK;
105960 }
105961
105962 /************** End of vdbesort.c ********************************************/
105963 /************** Begin file vdbevtab.c ****************************************/
105964 #line 1 "tsrc/vdbevtab.c"
105965 /*
105966 ** 2020-03-23
105967 **
105968 ** The author disclaims copyright to this source code. In place of
105969 ** a legal notice, here is a blessing:
@@ -106409,11 +106345,10 @@
106409 SQLITE_PRIVATE int sqlite3VdbeBytecodeVtabInit(sqlite3 *db){ return SQLITE_OK; }
106410 #endif /* SQLITE_ENABLE_BYTECODE_VTAB */
106411
106412 /************** End of vdbevtab.c ********************************************/
106413 /************** Begin file memjournal.c **************************************/
106414 #line 1 "tsrc/memjournal.c"
106415 /*
106416 ** 2008 October 7
106417 **
106418 ** The author disclaims copyright to this source code. In place of
106419 ** a legal notice, here is a blessing:
@@ -106853,11 +106788,10 @@
106853 return MAX(pVfs->szOsFile, (int)sizeof(MemJournal));
106854 }
106855
106856 /************** End of memjournal.c ******************************************/
106857 /************** Begin file walker.c ******************************************/
106858 #line 1 "tsrc/walker.c"
106859 /*
106860 ** 2008 August 16
106861 **
106862 ** The author disclaims copyright to this source code. In place of
106863 ** a legal notice, here is a blessing:
@@ -107118,11 +107052,10 @@
107118 return WRC_Continue;
107119 }
107120
107121 /************** End of walker.c **********************************************/
107122 /************** Begin file resolve.c *****************************************/
107123 #line 1 "tsrc/resolve.c"
107124 /*
107125 ** 2008 August 18
107126 **
107127 ** The author disclaims copyright to this source code. In place of
107128 ** a legal notice, here is a blessing:
@@ -109440,11 +109373,10 @@
109440 return rc;
109441 }
109442
109443 /************** End of resolve.c *********************************************/
109444 /************** Begin file expr.c ********************************************/
109445 #line 1 "tsrc/expr.c"
109446 /*
109447 ** 2001 September 15
109448 **
109449 ** The author disclaims copyright to this source code. In place of
109450 ** a legal notice, here is a blessing:
@@ -116770,11 +116702,10 @@
116770 }
116771 #endif /* SQLITE_DEBUG */
116772
116773 /************** End of expr.c ************************************************/
116774 /************** Begin file alter.c *******************************************/
116775 #line 1 "tsrc/alter.c"
116776 /*
116777 ** 2005 February 15
116778 **
116779 ** The author disclaims copyright to this source code. In place of
116780 ** a legal notice, here is a blessing:
@@ -119090,11 +119021,10 @@
119090 }
119091 #endif /* SQLITE_ALTER_TABLE */
119092
119093 /************** End of alter.c ***********************************************/
119094 /************** Begin file analyze.c *****************************************/
119095 #line 1 "tsrc/analyze.c"
119096 /*
119097 ** 2005-07-08
119098 **
119099 ** The author disclaims copyright to this source code. In place of
119100 ** a legal notice, here is a blessing:
@@ -121115,11 +121045,10 @@
121115
121116 #endif /* SQLITE_OMIT_ANALYZE */
121117
121118 /************** End of analyze.c *********************************************/
121119 /************** Begin file attach.c ******************************************/
121120 #line 1 "tsrc/attach.c"
121121 /*
121122 ** 2003 April 6
121123 **
121124 ** The author disclaims copyright to this source code. In place of
121125 ** a legal notice, here is a blessing:
@@ -121728,11 +121657,10 @@
121728 }
121729 #endif
121730
121731 /************** End of attach.c **********************************************/
121732 /************** Begin file auth.c ********************************************/
121733 #line 1 "tsrc/auth.c"
121734 /*
121735 ** 2003 January 11
121736 **
121737 ** The author disclaims copyright to this source code. In place of
121738 ** a legal notice, here is a blessing:
@@ -121992,11 +121920,10 @@
121992
121993 #endif /* SQLITE_OMIT_AUTHORIZATION */
121994
121995 /************** End of auth.c ************************************************/
121996 /************** Begin file build.c *******************************************/
121997 #line 1 "tsrc/build.c"
121998 /*
121999 ** 2001 September 15
122000 **
122001 ** The author disclaims copyright to this source code. In place of
122002 ** a legal notice, here is a blessing:
@@ -127763,11 +127690,10 @@
127763 }
127764 #endif /* !defined(SQLITE_OMIT_CTE) */
127765
127766 /************** End of build.c ***********************************************/
127767 /************** Begin file callback.c ****************************************/
127768 #line 1 "tsrc/callback.c"
127769 /*
127770 ** 2005 May 23
127771 **
127772 ** The author disclaims copyright to this source code. In place of
127773 ** a legal notice, here is a blessing:
@@ -128307,11 +128233,10 @@
128307 return p;
128308 }
128309
128310 /************** End of callback.c ********************************************/
128311 /************** Begin file delete.c ******************************************/
128312 #line 1 "tsrc/delete.c"
128313 /*
128314 ** 2001 September 15
128315 **
128316 ** The author disclaims copyright to this source code. In place of
128317 ** a legal notice, here is a blessing:
@@ -129341,11 +129266,10 @@
129341 }
129342 }
129343
129344 /************** End of delete.c **********************************************/
129345 /************** Begin file func.c ********************************************/
129346 #line 1 "tsrc/func.c"
129347 /*
129348 ** 2002 February 23
129349 **
129350 ** The author disclaims copyright to this source code. In place of
129351 ** a legal notice, here is a blessing:
@@ -132188,11 +132112,10 @@
132188 #endif
132189 }
132190
132191 /************** End of func.c ************************************************/
132192 /************** Begin file fkey.c ********************************************/
132193 #line 1 "tsrc/fkey.c"
132194 /*
132195 **
132196 ** The author disclaims copyright to this source code. In place of
132197 ** a legal notice, here is a blessing:
132198 **
@@ -133676,11 +133599,10 @@
133676 }
133677 #endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */
133678
133679 /************** End of fkey.c ************************************************/
133680 /************** Begin file insert.c ******************************************/
133681 #line 1 "tsrc/insert.c"
133682 /*
133683 ** 2001 September 15
133684 **
133685 ** The author disclaims copyright to this source code. In place of
133686 ** a legal notice, here is a blessing:
@@ -137072,11 +136994,10 @@
137072 }
137073 #endif /* SQLITE_OMIT_XFER_OPT */
137074
137075 /************** End of insert.c **********************************************/
137076 /************** Begin file legacy.c ******************************************/
137077 #line 1 "tsrc/legacy.c"
137078 /*
137079 ** 2001 September 15
137080 **
137081 ** The author disclaims copyright to this source code. In place of
137082 ** a legal notice, here is a blessing:
@@ -137217,11 +137138,10 @@
137217 return rc;
137218 }
137219
137220 /************** End of legacy.c **********************************************/
137221 /************** Begin file loadext.c *****************************************/
137222 #line 1 "tsrc/loadext.c"
137223 /*
137224 ** 2006 June 7
137225 **
137226 ** The author disclaims copyright to this source code. In place of
137227 ** a legal notice, here is a blessing:
@@ -137238,11 +137158,10 @@
137238 #ifndef SQLITE_CORE
137239 #define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */
137240 #endif
137241 /************** Include sqlite3ext.h in the middle of loadext.c **************/
137242 /************** Begin file sqlite3ext.h **************************************/
137243 #line 1 "tsrc/sqlite3ext.h"
137244 /*
137245 ** 2006 June 7
137246 **
137247 ** The author disclaims copyright to this source code. In place of
137248 ** a legal notice, here is a blessing:
@@ -137961,11 +137880,10 @@
137961
137962 #endif /* SQLITE3EXT_H */
137963
137964 /************** End of sqlite3ext.h ******************************************/
137965 /************** Continuing where we left off in loadext.c ********************/
137966 #line 20 "tsrc/loadext.c"
137967 /* #include "sqliteInt.h" */
137968
137969 #ifndef SQLITE_OMIT_LOAD_EXTENSION
137970 /*
137971 ** Some API routines are omitted when various features are
@@ -138867,11 +138785,10 @@
138867 }
138868 }
138869
138870 /************** End of loadext.c *********************************************/
138871 /************** Begin file pragma.c ******************************************/
138872 #line 1 "tsrc/pragma.c"
138873 /*
138874 ** 2003 April 6
138875 **
138876 ** The author disclaims copyright to this source code. In place of
138877 ** a legal notice, here is a blessing:
@@ -138900,11 +138817,10 @@
138900 ** lexicographical order to facility a binary search of the pragma name.
138901 ** Do not edit pragma.h directly. Edit and rerun the script in at
138902 ** ../tool/mkpragmatab.tcl. */
138903 /************** Include pragma.h in the middle of pragma.c *******************/
138904 /************** Begin file pragma.h ******************************************/
138905 #line 1 "tsrc/pragma.h"
138906 /* DO NOT EDIT!
138907 ** This file is automatically generated by the script at
138908 ** ../tool/mkpragmatab.tcl. To update the set of pragmas, edit
138909 ** that script and rerun it.
138910 */
@@ -139564,11 +139480,10 @@
139564 };
139565 /* Number of pragmas: 68 on by default, 78 total. */
139566
139567 /************** End of pragma.h **********************************************/
139568 /************** Continuing where we left off in pragma.c *********************/
139569 #line 32 "tsrc/pragma.c"
139570
139571 /*
139572 ** When the 0x10 bit of PRAGMA optimize is set, any ANALYZE commands
139573 ** will be run with an analysis_limit set to the lessor of the value of
139574 ** the following macro or to the actual analysis_limit if it is non-zero,
@@ -142608,11 +142523,10 @@
142608
142609 #endif /* SQLITE_OMIT_PRAGMA */
142610
142611 /************** End of pragma.c **********************************************/
142612 /************** Begin file prepare.c *****************************************/
142613 #line 1 "tsrc/prepare.c"
142614 /*
142615 ** 2005 May 25
142616 **
142617 ** The author disclaims copyright to this source code. In place of
142618 ** a legal notice, here is a blessing:
@@ -143702,11 +143616,10 @@
143702
143703 #endif /* SQLITE_OMIT_UTF16 */
143704
143705 /************** End of prepare.c *********************************************/
143706 /************** Begin file select.c ******************************************/
143707 #line 1 "tsrc/select.c"
143708 /*
143709 ** 2001 September 15
143710 **
143711 ** The author disclaims copyright to this source code. In place of
143712 ** a legal notice, here is a blessing:
@@ -152475,11 +152388,10 @@
152475 return rc;
152476 }
152477
152478 /************** End of select.c **********************************************/
152479 /************** Begin file table.c *******************************************/
152480 #line 1 "tsrc/table.c"
152481 /*
152482 ** 2001 September 15
152483 **
152484 ** The author disclaims copyright to this source code. In place of
152485 ** a legal notice, here is a blessing:
@@ -152677,11 +152589,10 @@
152677
152678 #endif /* SQLITE_OMIT_GET_TABLE */
152679
152680 /************** End of table.c ***********************************************/
152681 /************** Begin file trigger.c *****************************************/
152682 #line 1 "tsrc/trigger.c"
152683 /*
152684 **
152685 ** The author disclaims copyright to this source code. In place of
152686 ** a legal notice, here is a blessing:
152687 **
@@ -154244,11 +154155,10 @@
154244
154245 #endif /* !defined(SQLITE_OMIT_TRIGGER) */
154246
154247 /************** End of trigger.c *********************************************/
154248 /************** Begin file update.c ******************************************/
154249 #line 1 "tsrc/update.c"
154250 /*
154251 ** 2001 September 15
154252 **
154253 ** The author disclaims copyright to this source code. In place of
154254 ** a legal notice, here is a blessing:
@@ -155616,11 +155526,10 @@
155616 }
155617 #endif /* SQLITE_OMIT_VIRTUALTABLE */
155618
155619 /************** End of update.c **********************************************/
155620 /************** Begin file upsert.c ******************************************/
155621 #line 1 "tsrc/upsert.c"
155622 /*
155623 ** 2018-04-12
155624 **
155625 ** The author disclaims copyright to this source code. In place of
155626 ** a legal notice, here is a blessing:
@@ -155949,11 +155858,10 @@
155949
155950 #endif /* SQLITE_OMIT_UPSERT */
155951
155952 /************** End of upsert.c **********************************************/
155953 /************** Begin file vacuum.c ******************************************/
155954 #line 1 "tsrc/vacuum.c"
155955 /*
155956 ** 2003 April 6
155957 **
155958 ** The author disclaims copyright to this source code. In place of
155959 ** a legal notice, here is a blessing:
@@ -156371,11 +156279,10 @@
156371
156372 #endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */
156373
156374 /************** End of vacuum.c **********************************************/
156375 /************** Begin file vtab.c ********************************************/
156376 #line 1 "tsrc/vtab.c"
156377 /*
156378 ** 2006 June 10
156379 **
156380 ** The author disclaims copyright to this source code. In place of
156381 ** a legal notice, here is a blessing:
@@ -157749,11 +157656,10 @@
157749
157750 #endif /* SQLITE_OMIT_VIRTUALTABLE */
157751
157752 /************** End of vtab.c ************************************************/
157753 /************** Begin file wherecode.c ***************************************/
157754 #line 1 "tsrc/wherecode.c"
157755 /*
157756 ** 2015-06-06
157757 **
157758 ** The author disclaims copyright to this source code. In place of
157759 ** a legal notice, here is a blessing:
@@ -157772,11 +157678,10 @@
157772 ** file retains the code that does query planning and analysis.
157773 */
157774 /* #include "sqliteInt.h" */
157775 /************** Include whereInt.h in the middle of wherecode.c **************/
157776 /************** Begin file whereInt.h ****************************************/
157777 #line 1 "tsrc/whereInt.h"
157778 /*
157779 ** 2013-11-12
157780 **
157781 ** The author disclaims copyright to this source code. In place of
157782 ** a legal notice, here is a blessing:
@@ -158429,11 +158334,10 @@
158429
158430 #endif /* !defined(SQLITE_WHEREINT_H) */
158431
158432 /************** End of whereInt.h ********************************************/
158433 /************** Continuing where we left off in wherecode.c ******************/
158434 #line 22 "tsrc/wherecode.c"
158435
158436 #ifndef SQLITE_OMIT_EXPLAIN
158437
158438 /*
158439 ** Return the name of the i-th column of the pIdx index.
@@ -161352,11 +161256,10 @@
161352 pParse->withinRJSubrtn--;
161353 }
161354
161355 /************** End of wherecode.c *******************************************/
161356 /************** Begin file whereexpr.c ***************************************/
161357 #line 1 "tsrc/whereexpr.c"
161358 /*
161359 ** 2015-06-08
161360 **
161361 ** The author disclaims copyright to this source code. In place of
161362 ** a legal notice, here is a blessing:
@@ -163258,11 +163161,10 @@
163258 }
163259 }
163260
163261 /************** End of whereexpr.c *******************************************/
163262 /************** Begin file where.c *******************************************/
163263 #line 1 "tsrc/where.c"
163264 /*
163265 ** 2001 September 15
163266 **
163267 ** The author disclaims copyright to this source code. In place of
163268 ** a legal notice, here is a blessing:
@@ -170759,11 +170661,10 @@
170759 return;
170760 }
170761
170762 /************** End of where.c ***********************************************/
170763 /************** Begin file window.c ******************************************/
170764 #line 1 "tsrc/window.c"
170765 /*
170766 ** 2018 May 08
170767 **
170768 ** The author disclaims copyright to this source code. In place of
170769 ** a legal notice, here is a blessing:
@@ -172432,10 +172333,11 @@
172432 for(pWin=pMWin; pWin; pWin=pWin->pNextWin){
172433 FuncDef *pFunc = pWin->pWFunc;
172434 int regArg;
172435 int nArg = pWin->bExprArgs ? 0 : windowArgCount(pWin);
172436 int i;
 
172437
172438 assert( bInverse==0 || pWin->eStart!=TK_UNBOUNDED );
172439
172440 /* All OVER clauses in the same window function aggregate step must
172441 ** be the same. */
@@ -172447,10 +172349,22 @@
172447 }else{
172448 sqlite3VdbeAddOp3(v, OP_Column, pMWin->iEphCsr, pWin->iArgCol+i, reg+i);
172449 }
172450 }
172451 regArg = reg;
 
 
 
 
 
 
 
 
 
 
 
 
172452
172453 if( pMWin->regStartRowid==0
172454 && (pFunc->funcFlags & SQLITE_FUNC_MINMAX)
172455 && (pWin->eStart!=TK_UNBOUNDED)
172456 ){
@@ -172467,29 +172381,17 @@
172467 sqlite3VdbeAddOp1(v, OP_Delete, pWin->csrApp);
172468 sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);
172469 }
172470 sqlite3VdbeJumpHere(v, addrIsNull);
172471 }else if( pWin->regApp ){
 
172472 assert( pFunc->zName==nth_valueName
172473 || pFunc->zName==first_valueName
172474 );
172475 assert( bInverse==0 || bInverse==1 );
172476 sqlite3VdbeAddOp2(v, OP_AddImm, pWin->regApp+1-bInverse, 1);
172477 }else if( pFunc->xSFunc!=noopStepFunc ){
172478 int addrIf = 0;
172479 if( pWin->pFilter ){
172480 int regTmp;
172481 assert( ExprUseXList(pWin->pOwner) );
172482 assert( pWin->bExprArgs || !nArg ||nArg==pWin->pOwner->x.pList->nExpr );
172483 assert( pWin->bExprArgs || nArg ||pWin->pOwner->x.pList==0 );
172484 regTmp = sqlite3GetTempReg(pParse);
172485 sqlite3VdbeAddOp3(v, OP_Column, csr, pWin->iArgCol+nArg,regTmp);
172486 addrIf = sqlite3VdbeAddOp3(v, OP_IfNot, regTmp, 0, 1);
172487 VdbeCoverage(v);
172488 sqlite3ReleaseTempReg(pParse, regTmp);
172489 }
172490
172491 if( pWin->bExprArgs ){
172492 int iOp = sqlite3VdbeCurrentAddr(v);
172493 int iEnd;
172494
172495 assert( ExprUseXList(pWin->pOwner) );
@@ -172516,12 +172418,13 @@
172516 sqlite3VdbeAppendP4(v, pFunc, P4_FUNCDEF);
172517 sqlite3VdbeChangeP5(v, (u8)nArg);
172518 if( pWin->bExprArgs ){
172519 sqlite3ReleaseTempRange(pParse, regArg, nArg);
172520 }
172521 if( addrIf ) sqlite3VdbeJumpHere(v, addrIf);
172522 }
 
 
172523 }
172524 }
172525
172526 /*
172527 ** Values that may be passed as the second argument to windowCodeOp().
@@ -173869,11 +173772,10 @@
173869
173870 #endif /* SQLITE_OMIT_WINDOWFUNC */
173871
173872 /************** End of window.c **********************************************/
173873 /************** Begin file parse.c *******************************************/
173874 #line 1 "tsrc/parse.c"
173875 /* This file is automatically generated by Lemon from input grammar
173876 ** source file "parse.y".
173877 */
173878 /*
173879 ** 2001-09-15
@@ -173893,11 +173795,10 @@
173893 ** That input file is processed by Lemon to generate a C-language
173894 ** implementation of a parser for the given grammar. You might be reading
173895 ** this comment as part of the translated C-code. Edits should be made
173896 ** to the original parse.y sources.
173897 */
173898 #line 62 "parse.y"
173899
173900 /* #include "sqliteInt.h" */
173901
173902 /*
173903 ** Disable all error recovery processing in the parser push-down
@@ -173977,11 +173878,10 @@
173977 sqlite3ExprListDelete(pParse->db, pOrderBy);
173978 sqlite3ExprDelete(pParse->db, pLimit);
173979 }
173980 #endif /* SQLITE_ENABLE_UPDATE_DELETE_LIMIT */
173981
173982 #line 517 "parse.y"
173983
173984 /*
173985 ** For a compound SELECT statement, make sure p->pPrior->pNext==p for
173986 ** all elements in the list. And make sure list length does not exceed
173987 ** SQLITE_LIMIT_COMPOUND_SELECT.
@@ -174032,11 +173932,10 @@
174032 ** testing.
174033 */
174034 static void *parserStackRealloc(void *pOld, sqlite3_uint64 newSize){
174035 return sqlite3FaultSim(700) ? 0 : sqlite3_realloc(pOld, newSize);
174036 }
174037 #line 1085 "parse.y"
174038
174039
174040 /* Construct a new Expr object from a single token */
174041 static Expr *tokenExpr(Parse *pParse, int op, Token t){
174042 Expr *p = sqlite3DbMallocRawNN(pParse->db, sizeof(Expr)+t.n+1);
@@ -174069,11 +173968,10 @@
174069 }
174070 }
174071 return p;
174072 }
174073
174074 #line 1329 "parse.y"
174075
174076 /* A routine to convert a binary TK_IS or TK_ISNOT expression into a
174077 ** unary TK_ISNULL or TK_NOTNULL expression. */
174078 static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
174079 sqlite3 *db = pParse->db;
@@ -174081,11 +173979,10 @@
174081 pA->op = (u8)op;
174082 sqlite3ExprDelete(db, pA->pRight);
174083 pA->pRight = 0;
174084 }
174085 }
174086 #line 1564 "parse.y"
174087
174088 /* Add a single new term to an ExprList that is used to store a
174089 ** list of identifiers. Report an error if the ID list contains
174090 ** a COLLATE clause or an ASC or DESC keyword, except ignore the
174091 ** error while parsing a legacy schema.
@@ -174105,16 +174002,14 @@
174105 pIdToken->n, pIdToken->z);
174106 }
174107 sqlite3ExprListSetName(pParse, p, pIdToken, 1);
174108 return p;
174109 }
174110 #line 2048 "parse.y"
174111
174112 #if TK_SPAN>255
174113 # error too many tokens in the grammar
174114 #endif
174115 #line 267 "parse.sql"
174116 /**************** End of %include directives **********************************/
174117 /* These constants specify the various numeric values for terminal symbols.
174118 ***************** Begin token definitions *************************************/
174119 #ifndef TK_SEMI
174120 #define TK_SEMI 1
@@ -176295,13 +176190,11 @@
176295 case 240: /* selectnowith */
176296 case 241: /* oneselect */
176297 case 253: /* values */
176298 case 255: /* mvalues */
176299 {
176300 #line 511 "parse.y"
176301 sqlite3SelectDelete(pParse->db, (yypminor->yy555));
176302 #line 2453 "parse.sql"
176303 }
176304 break;
176305 case 217: /* term */
176306 case 218: /* expr */
176307 case 247: /* where_opt */
@@ -176312,13 +176205,11 @@
176312 case 285: /* vinto */
176313 case 292: /* when_clause */
176314 case 297: /* key_opt */
176315 case 314: /* filter_clause */
176316 {
176317 #line 1083 "parse.y"
176318 sqlite3ExprDelete(pParse->db, (yypminor->yy454));
176319 #line 2470 "parse.sql"
176320 }
176321 break;
176322 case 222: /* eidlist_opt */
176323 case 232: /* sortlist */
176324 case 233: /* eidlist */
@@ -176331,82 +176222,64 @@
176331 case 270: /* setlist */
176332 case 279: /* paren_exprlist */
176333 case 281: /* case_exprlist */
176334 case 313: /* part_opt */
176335 {
176336 #line 1562 "parse.y"
176337 sqlite3ExprListDelete(pParse->db, (yypminor->yy14));
176338 #line 2489 "parse.sql"
176339 }
176340 break;
176341 case 239: /* fullname */
176342 case 246: /* from */
176343 case 258: /* seltablist */
176344 case 259: /* stl_prefix */
176345 case 264: /* xfullname */
176346 {
176347 #line 789 "parse.y"
176348 sqlite3SrcListDelete(pParse->db, (yypminor->yy203));
176349 #line 2500 "parse.sql"
176350 }
176351 break;
176352 case 242: /* wqlist */
176353 {
176354 #line 1849 "parse.y"
176355 sqlite3WithDelete(pParse->db, (yypminor->yy59));
176356 #line 2507 "parse.sql"
176357 }
176358 break;
176359 case 252: /* window_clause */
176360 case 309: /* windowdefn_list */
176361 {
176362 #line 1977 "parse.y"
176363 sqlite3WindowListDelete(pParse->db, (yypminor->yy211));
176364 #line 2515 "parse.sql"
176365 }
176366 break;
176367 case 265: /* idlist */
176368 case 272: /* idlist_opt */
176369 {
176370 #line 1068 "parse.y"
176371 sqlite3IdListDelete(pParse->db, (yypminor->yy132));
176372 #line 2523 "parse.sql"
176373 }
176374 break;
176375 case 275: /* filter_over */
176376 case 310: /* windowdefn */
176377 case 311: /* window */
176378 case 312: /* frame_opt */
176379 case 315: /* over_clause */
176380 {
176381 #line 1916 "parse.y"
176382 sqlite3WindowDelete(pParse->db, (yypminor->yy211));
176383 #line 2534 "parse.sql"
176384 }
176385 break;
176386 case 288: /* trigger_cmd_list */
176387 case 293: /* trigger_cmd */
176388 {
176389 #line 1677 "parse.y"
176390 sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy427));
176391 #line 2542 "parse.sql"
176392 }
176393 break;
176394 case 290: /* trigger_event */
176395 {
176396 #line 1663 "parse.y"
176397 sqlite3IdListDelete(pParse->db, (yypminor->yy286).b);
176398 #line 2549 "parse.sql"
176399 }
176400 break;
176401 case 317: /* frame_bound */
176402 case 318: /* frame_bound_s */
176403 case 319: /* frame_bound_e */
176404 {
176405 #line 1921 "parse.y"
176406 sqlite3ExprDelete(pParse->db, (yypminor->yy509).pExpr);
176407 #line 2558 "parse.sql"
176408 }
176409 break;
176410 /********* End destructor definitions *****************************************/
176411 default: break; /* If no destructor action specified: do nothing */
176412 }
@@ -176637,14 +176510,12 @@
176637 #endif
176638 while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
176639 /* Here code is inserted which will execute if the parser
176640 ** stack every overflows */
176641 /******** Begin %stack_overflow code ******************************************/
176642 #line 51 "parse.y"
176643
176644 sqlite3OomFault(pParse->db);
176645 #line 2796 "parse.sql"
176646 /******** End %stack_overflow code ********************************************/
176647 sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument var */
176648 sqlite3ParserCTX_STORE
176649 }
176650
@@ -177571,481 +177442,330 @@
177571 ** break;
177572 */
177573 /********** Begin reduce actions **********************************************/
177574 YYMINORTYPE yylhsminor;
177575 case 0: /* explain ::= EXPLAIN */
177576 #line 155 "parse.y"
177577 { if( pParse->pReprepare==0 ) pParse->explain = 1; }
177578 #line 3729 "parse.sql"
177579 break;
177580 case 1: /* explain ::= EXPLAIN QUERY PLAN */
177581 #line 156 "parse.y"
177582 { if( pParse->pReprepare==0 ) pParse->explain = 2; }
177583 #line 3734 "parse.sql"
177584 break;
177585 case 2: /* cmdx ::= cmd */
177586 #line 158 "parse.y"
177587 { sqlite3FinishCoding(pParse); }
177588 #line 3739 "parse.sql"
177589 break;
177590 case 3: /* cmd ::= BEGIN transtype trans_opt */
177591 #line 163 "parse.y"
177592 {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy144);}
177593 #line 3744 "parse.sql"
177594 break;
177595 case 4: /* transtype ::= */
177596 #line 168 "parse.y"
177597 {yymsp[1].minor.yy144 = TK_DEFERRED;}
177598 #line 3749 "parse.sql"
177599 break;
177600 case 5: /* transtype ::= DEFERRED */
177601 case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
177602 case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
177603 case 324: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==324);
177604 #line 169 "parse.y"
177605 {yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-X*/}
177606 #line 3757 "parse.sql"
177607 break;
177608 case 8: /* cmd ::= COMMIT|END trans_opt */
177609 case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
177610 #line 172 "parse.y"
177611 {sqlite3EndTransaction(pParse,yymsp[-1].major);}
177612 #line 3763 "parse.sql"
177613 break;
177614 case 10: /* cmd ::= SAVEPOINT nm */
177615 #line 177 "parse.y"
177616 {
177617 sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
177618 }
177619 #line 3770 "parse.sql"
177620 break;
177621 case 11: /* cmd ::= RELEASE savepoint_opt nm */
177622 #line 180 "parse.y"
177623 {
177624 sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
177625 }
177626 #line 3777 "parse.sql"
177627 break;
177628 case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
177629 #line 183 "parse.y"
177630 {
177631 sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
177632 }
177633 #line 3784 "parse.sql"
177634 break;
177635 case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
177636 #line 190 "parse.y"
177637 {
177638 sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy144,0,0,yymsp[-2].minor.yy144);
177639 }
177640 #line 3791 "parse.sql"
177641 break;
177642 case 14: /* createkw ::= CREATE */
177643 #line 193 "parse.y"
177644 {disableLookaside(pParse);}
177645 #line 3796 "parse.sql"
177646 break;
177647 case 15: /* ifnotexists ::= */
177648 case 18: /* temp ::= */ yytestcase(yyruleno==18);
177649 case 47: /* autoinc ::= */ yytestcase(yyruleno==47);
177650 case 62: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==62);
177651 case 72: /* defer_subclause_opt ::= */ yytestcase(yyruleno==72);
177652 case 81: /* ifexists ::= */ yytestcase(yyruleno==81);
177653 case 100: /* distinct ::= */ yytestcase(yyruleno==100);
177654 case 246: /* collate ::= */ yytestcase(yyruleno==246);
177655 #line 196 "parse.y"
177656 {yymsp[1].minor.yy144 = 0;}
177657 #line 3808 "parse.sql"
177658 break;
177659 case 16: /* ifnotexists ::= IF NOT EXISTS */
177660 #line 197 "parse.y"
177661 {yymsp[-2].minor.yy144 = 1;}
177662 #line 3813 "parse.sql"
177663 break;
177664 case 17: /* temp ::= TEMP */
177665 #line 200 "parse.y"
177666 {yymsp[0].minor.yy144 = pParse->db->init.busy==0;}
177667 #line 3818 "parse.sql"
177668 break;
177669 case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_option_set */
177670 #line 203 "parse.y"
177671 {
177672 sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy391,0);
177673 }
177674 #line 3825 "parse.sql"
177675 break;
177676 case 20: /* create_table_args ::= AS select */
177677 #line 206 "parse.y"
177678 {
177679 sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy555);
177680 sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy555);
177681 }
177682 #line 3833 "parse.sql"
177683 break;
177684 case 21: /* table_option_set ::= */
177685 #line 212 "parse.y"
177686 {yymsp[1].minor.yy391 = 0;}
177687 #line 3838 "parse.sql"
177688 break;
177689 case 22: /* table_option_set ::= table_option_set COMMA table_option */
177690 #line 214 "parse.y"
177691 {yylhsminor.yy391 = yymsp[-2].minor.yy391|yymsp[0].minor.yy391;}
177692 #line 3843 "parse.sql"
177693 yymsp[-2].minor.yy391 = yylhsminor.yy391;
177694 break;
177695 case 23: /* table_option ::= WITHOUT nm */
177696 #line 215 "parse.y"
177697 {
177698 if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
177699 yymsp[-1].minor.yy391 = TF_WithoutRowid | TF_NoVisibleRowid;
177700 }else{
177701 yymsp[-1].minor.yy391 = 0;
177702 sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
177703 }
177704 }
177705 #line 3856 "parse.sql"
177706 break;
177707 case 24: /* table_option ::= nm */
177708 #line 223 "parse.y"
177709 {
177710 if( yymsp[0].minor.yy0.n==6 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"strict",6)==0 ){
177711 yylhsminor.yy391 = TF_Strict;
177712 }else{
177713 yylhsminor.yy391 = 0;
177714 sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
177715 }
177716 }
177717 #line 3868 "parse.sql"
177718 yymsp[0].minor.yy391 = yylhsminor.yy391;
177719 break;
177720 case 25: /* columnname ::= nm typetoken */
177721 #line 233 "parse.y"
177722 {sqlite3AddColumn(pParse,yymsp[-1].minor.yy0,yymsp[0].minor.yy0);}
177723 #line 3874 "parse.sql"
177724 break;
177725 case 26: /* typetoken ::= */
177726 case 65: /* conslist_opt ::= */ yytestcase(yyruleno==65);
177727 case 106: /* as ::= */ yytestcase(yyruleno==106);
177728 #line 327 "parse.y"
177729 {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
177730 #line 3881 "parse.sql"
177731 break;
177732 case 27: /* typetoken ::= typename LP signed RP */
177733 #line 329 "parse.y"
177734 {
177735 yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
177736 }
177737 #line 3888 "parse.sql"
177738 break;
177739 case 28: /* typetoken ::= typename LP signed COMMA signed RP */
177740 #line 332 "parse.y"
177741 {
177742 yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
177743 }
177744 #line 3895 "parse.sql"
177745 break;
177746 case 29: /* typename ::= typename ID|STRING */
177747 #line 337 "parse.y"
177748 {yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
177749 #line 3900 "parse.sql"
177750 break;
177751 case 30: /* scanpt ::= */
177752 #line 355 "parse.y"
177753 {
177754 assert( yyLookahead!=YYNOCODE );
177755 yymsp[1].minor.yy168 = yyLookaheadToken.z;
177756 }
177757 #line 3908 "parse.sql"
177758 break;
177759 case 31: /* scantok ::= */
177760 #line 359 "parse.y"
177761 {
177762 assert( yyLookahead!=YYNOCODE );
177763 yymsp[1].minor.yy0 = yyLookaheadToken;
177764 }
177765 #line 3916 "parse.sql"
177766 break;
177767 case 32: /* ccons ::= CONSTRAINT nm */
177768 case 67: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==67);
177769 #line 369 "parse.y"
177770 {pParse->constraintName = yymsp[0].minor.yy0;}
177771 #line 3922 "parse.sql"
177772 break;
177773 case 33: /* ccons ::= DEFAULT scantok term */
177774 #line 371 "parse.y"
177775 {sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy454,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
177776 #line 3927 "parse.sql"
177777 break;
177778 case 34: /* ccons ::= DEFAULT LP expr RP */
177779 #line 373 "parse.y"
177780 {sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy454,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
177781 #line 3932 "parse.sql"
177782 break;
177783 case 35: /* ccons ::= DEFAULT PLUS scantok term */
177784 #line 375 "parse.y"
177785 {sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy454,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
177786 #line 3937 "parse.sql"
177787 break;
177788 case 36: /* ccons ::= DEFAULT MINUS scantok term */
177789 #line 376 "parse.y"
177790 {
177791 Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy454, 0);
177792 sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
177793 }
177794 #line 3945 "parse.sql"
177795 break;
177796 case 37: /* ccons ::= DEFAULT scantok ID|INDEXED */
177797 #line 380 "parse.y"
177798 {
177799 Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
177800 if( p ){
177801 sqlite3ExprIdToTrueFalse(p);
177802 testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
177803 }
177804 sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
177805 }
177806 #line 3957 "parse.sql"
177807 break;
177808 case 38: /* ccons ::= NOT NULL onconf */
177809 #line 393 "parse.y"
177810 {sqlite3AddNotNull(pParse, yymsp[0].minor.yy144);}
177811 #line 3962 "parse.sql"
177812 break;
177813 case 39: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
177814 #line 395 "parse.y"
177815 {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy144,yymsp[0].minor.yy144,yymsp[-2].minor.yy144);}
177816 #line 3967 "parse.sql"
177817 break;
177818 case 40: /* ccons ::= UNIQUE onconf */
177819 #line 396 "parse.y"
177820 {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy144,0,0,0,0,
177821 SQLITE_IDXTYPE_UNIQUE);}
177822 #line 3973 "parse.sql"
177823 break;
177824 case 41: /* ccons ::= CHECK LP expr RP */
177825 #line 398 "parse.y"
177826 {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy454,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy0.z);}
177827 #line 3978 "parse.sql"
177828 break;
177829 case 42: /* ccons ::= REFERENCES nm eidlist_opt refargs */
177830 #line 400 "parse.y"
177831 {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy14,yymsp[0].minor.yy144);}
177832 #line 3983 "parse.sql"
177833 break;
177834 case 43: /* ccons ::= defer_subclause */
177835 #line 401 "parse.y"
177836 {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy144);}
177837 #line 3988 "parse.sql"
177838 break;
177839 case 44: /* ccons ::= COLLATE ID|STRING */
177840 #line 402 "parse.y"
177841 {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
177842 #line 3993 "parse.sql"
177843 break;
177844 case 45: /* generated ::= LP expr RP */
177845 #line 405 "parse.y"
177846 {sqlite3AddGenerated(pParse,yymsp[-1].minor.yy454,0);}
177847 #line 3998 "parse.sql"
177848 break;
177849 case 46: /* generated ::= LP expr RP ID */
177850 #line 406 "parse.y"
177851 {sqlite3AddGenerated(pParse,yymsp[-2].minor.yy454,&yymsp[0].minor.yy0);}
177852 #line 4003 "parse.sql"
177853 break;
177854 case 48: /* autoinc ::= AUTOINCR */
177855 #line 411 "parse.y"
177856 {yymsp[0].minor.yy144 = 1;}
177857 #line 4008 "parse.sql"
177858 break;
177859 case 49: /* refargs ::= */
177860 #line 419 "parse.y"
177861 { yymsp[1].minor.yy144 = OE_None*0x0101; /* EV: R-19803-45884 */}
177862 #line 4013 "parse.sql"
177863 break;
177864 case 50: /* refargs ::= refargs refarg */
177865 #line 420 "parse.y"
177866 { yymsp[-1].minor.yy144 = (yymsp[-1].minor.yy144 & ~yymsp[0].minor.yy383.mask) | yymsp[0].minor.yy383.value; }
177867 #line 4018 "parse.sql"
177868 break;
177869 case 51: /* refarg ::= MATCH nm */
177870 #line 422 "parse.y"
177871 { yymsp[-1].minor.yy383.value = 0; yymsp[-1].minor.yy383.mask = 0x000000; }
177872 #line 4023 "parse.sql"
177873 break;
177874 case 52: /* refarg ::= ON INSERT refact */
177875 #line 423 "parse.y"
177876 { yymsp[-2].minor.yy383.value = 0; yymsp[-2].minor.yy383.mask = 0x000000; }
177877 #line 4028 "parse.sql"
177878 break;
177879 case 53: /* refarg ::= ON DELETE refact */
177880 #line 424 "parse.y"
177881 { yymsp[-2].minor.yy383.value = yymsp[0].minor.yy144; yymsp[-2].minor.yy383.mask = 0x0000ff; }
177882 #line 4033 "parse.sql"
177883 break;
177884 case 54: /* refarg ::= ON UPDATE refact */
177885 #line 425 "parse.y"
177886 { yymsp[-2].minor.yy383.value = yymsp[0].minor.yy144<<8; yymsp[-2].minor.yy383.mask = 0x00ff00; }
177887 #line 4038 "parse.sql"
177888 break;
177889 case 55: /* refact ::= SET NULL */
177890 #line 427 "parse.y"
177891 { yymsp[-1].minor.yy144 = OE_SetNull; /* EV: R-33326-45252 */}
177892 #line 4043 "parse.sql"
177893 break;
177894 case 56: /* refact ::= SET DEFAULT */
177895 #line 428 "parse.y"
177896 { yymsp[-1].minor.yy144 = OE_SetDflt; /* EV: R-33326-45252 */}
177897 #line 4048 "parse.sql"
177898 break;
177899 case 57: /* refact ::= CASCADE */
177900 #line 429 "parse.y"
177901 { yymsp[0].minor.yy144 = OE_Cascade; /* EV: R-33326-45252 */}
177902 #line 4053 "parse.sql"
177903 break;
177904 case 58: /* refact ::= RESTRICT */
177905 #line 430 "parse.y"
177906 { yymsp[0].minor.yy144 = OE_Restrict; /* EV: R-33326-45252 */}
177907 #line 4058 "parse.sql"
177908 break;
177909 case 59: /* refact ::= NO ACTION */
177910 #line 431 "parse.y"
177911 { yymsp[-1].minor.yy144 = OE_None; /* EV: R-33326-45252 */}
177912 #line 4063 "parse.sql"
177913 break;
177914 case 60: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
177915 #line 433 "parse.y"
177916 {yymsp[-2].minor.yy144 = 0;}
177917 #line 4068 "parse.sql"
177918 break;
177919 case 61: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
177920 case 76: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==76);
177921 case 173: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==173);
177922 #line 434 "parse.y"
177923 {yymsp[-1].minor.yy144 = yymsp[0].minor.yy144;}
177924 #line 4075 "parse.sql"
177925 break;
177926 case 63: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
177927 case 80: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==80);
177928 case 219: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==219);
177929 case 222: /* in_op ::= NOT IN */ yytestcase(yyruleno==222);
177930 case 247: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==247);
177931 #line 437 "parse.y"
177932 {yymsp[-1].minor.yy144 = 1;}
177933 #line 4084 "parse.sql"
177934 break;
177935 case 64: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
177936 #line 438 "parse.y"
177937 {yymsp[-1].minor.yy144 = 0;}
177938 #line 4089 "parse.sql"
177939 break;
177940 case 66: /* tconscomma ::= COMMA */
177941 #line 444 "parse.y"
177942 {pParse->constraintName.n = 0;}
177943 #line 4094 "parse.sql"
177944 break;
177945 case 68: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
177946 #line 448 "parse.y"
177947 {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy14,yymsp[0].minor.yy144,yymsp[-2].minor.yy144,0);}
177948 #line 4099 "parse.sql"
177949 break;
177950 case 69: /* tcons ::= UNIQUE LP sortlist RP onconf */
177951 #line 450 "parse.y"
177952 {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy14,yymsp[0].minor.yy144,0,0,0,0,
177953 SQLITE_IDXTYPE_UNIQUE);}
177954 #line 4105 "parse.sql"
177955 break;
177956 case 70: /* tcons ::= CHECK LP expr RP onconf */
177957 #line 453 "parse.y"
177958 {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy454,yymsp[-3].minor.yy0.z,yymsp[-1].minor.yy0.z);}
177959 #line 4110 "parse.sql"
177960 break;
177961 case 71: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
177962 #line 455 "parse.y"
177963 {
177964 sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy14, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[-1].minor.yy144);
177965 sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy144);
177966 }
177967 #line 4118 "parse.sql"
177968 break;
177969 case 73: /* onconf ::= */
177970 case 75: /* orconf ::= */ yytestcase(yyruleno==75);
177971 #line 469 "parse.y"
177972 {yymsp[1].minor.yy144 = OE_Default;}
177973 #line 4124 "parse.sql"
177974 break;
177975 case 74: /* onconf ::= ON CONFLICT resolvetype */
177976 #line 470 "parse.y"
177977 {yymsp[-2].minor.yy144 = yymsp[0].minor.yy144;}
177978 #line 4129 "parse.sql"
177979 break;
177980 case 77: /* resolvetype ::= IGNORE */
177981 #line 474 "parse.y"
177982 {yymsp[0].minor.yy144 = OE_Ignore;}
177983 #line 4134 "parse.sql"
177984 break;
177985 case 78: /* resolvetype ::= REPLACE */
177986 case 174: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==174);
177987 #line 475 "parse.y"
177988 {yymsp[0].minor.yy144 = OE_Replace;}
177989 #line 4140 "parse.sql"
177990 break;
177991 case 79: /* cmd ::= DROP TABLE ifexists fullname */
177992 #line 479 "parse.y"
177993 {
177994 sqlite3DropTable(pParse, yymsp[0].minor.yy203, 0, yymsp[-1].minor.yy144);
177995 }
177996 #line 4147 "parse.sql"
177997 break;
177998 case 82: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
177999 #line 490 "parse.y"
178000 {
178001 sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[0].minor.yy555, yymsp[-7].minor.yy144, yymsp[-5].minor.yy144);
178002 }
178003 #line 4154 "parse.sql"
178004 break;
178005 case 83: /* cmd ::= DROP VIEW ifexists fullname */
178006 #line 493 "parse.y"
178007 {
178008 sqlite3DropTable(pParse, yymsp[0].minor.yy203, 1, yymsp[-1].minor.yy144);
178009 }
178010 #line 4161 "parse.sql"
178011 break;
178012 case 84: /* cmd ::= select */
178013 #line 500 "parse.y"
178014 {
178015 SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0, 0};
178016 if( (pParse->db->mDbFlags & DBFLAG_EncodingFixed)!=0
178017 || sqlite3ReadSchema(pParse)==SQLITE_OK
178018 ){
178019 sqlite3Select(pParse, yymsp[0].minor.yy555, &dest);
178020 }
178021 sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy555);
178022 }
178023 #line 4174 "parse.sql"
178024 break;
178025 case 85: /* select ::= WITH wqlist selectnowith */
178026 #line 574 "parse.y"
178027 {yymsp[-2].minor.yy555 = attachWithToSelect(pParse,yymsp[0].minor.yy555,yymsp[-1].minor.yy59);}
178028 #line 4179 "parse.sql"
178029 break;
178030 case 86: /* select ::= WITH RECURSIVE wqlist selectnowith */
178031 #line 576 "parse.y"
178032 {yymsp[-3].minor.yy555 = attachWithToSelect(pParse,yymsp[0].minor.yy555,yymsp[-1].minor.yy59);}
178033 #line 4184 "parse.sql"
178034 break;
178035 case 87: /* select ::= selectnowith */
178036 #line 579 "parse.y"
178037 {
178038 Select *p = yymsp[0].minor.yy555;
178039 if( p ){
178040 parserDoubleLinkSelect(pParse, p);
178041 }
178042 }
178043 #line 4194 "parse.sql"
178044 break;
178045 case 88: /* selectnowith ::= selectnowith multiselect_op oneselect */
178046 #line 588 "parse.y"
178047 {
178048 Select *pRhs = yymsp[0].minor.yy555;
178049 Select *pLhs = yymsp[-2].minor.yy555;
178050 if( pRhs && pRhs->pPrior ){
178051 SrcList *pFrom;
@@ -178064,175 +177784,131 @@
178064 }else{
178065 sqlite3SelectDelete(pParse->db, pLhs);
178066 }
178067 yymsp[-2].minor.yy555 = pRhs;
178068 }
178069 #line 4220 "parse.sql"
178070 break;
178071 case 89: /* multiselect_op ::= UNION */
178072 case 91: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==91);
178073 #line 611 "parse.y"
178074 {yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-OP*/}
178075 #line 4226 "parse.sql"
178076 break;
178077 case 90: /* multiselect_op ::= UNION ALL */
178078 #line 612 "parse.y"
178079 {yymsp[-1].minor.yy144 = TK_ALL;}
178080 #line 4231 "parse.sql"
178081 break;
178082 case 92: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
178083 #line 618 "parse.y"
178084 {
178085 yymsp[-8].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy14,yymsp[-5].minor.yy203,yymsp[-4].minor.yy454,yymsp[-3].minor.yy14,yymsp[-2].minor.yy454,yymsp[-1].minor.yy14,yymsp[-7].minor.yy144,yymsp[0].minor.yy454);
178086 }
178087 #line 4238 "parse.sql"
178088 break;
178089 case 93: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
178090 #line 624 "parse.y"
178091 {
178092 yymsp[-9].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy14,yymsp[-6].minor.yy203,yymsp[-5].minor.yy454,yymsp[-4].minor.yy14,yymsp[-3].minor.yy454,yymsp[-1].minor.yy14,yymsp[-8].minor.yy144,yymsp[0].minor.yy454);
178093 if( yymsp[-9].minor.yy555 ){
178094 yymsp[-9].minor.yy555->pWinDefn = yymsp[-2].minor.yy211;
178095 }else{
178096 sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy211);
178097 }
178098 }
178099 #line 4250 "parse.sql"
178100 break;
178101 case 94: /* values ::= VALUES LP nexprlist RP */
178102 #line 640 "parse.y"
178103 {
178104 yymsp[-3].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy14,0,0,0,0,0,SF_Values,0);
178105 }
178106 #line 4257 "parse.sql"
178107 break;
178108 case 95: /* oneselect ::= mvalues */
178109 #line 647 "parse.y"
178110 {
178111 sqlite3MultiValuesEnd(pParse, yymsp[0].minor.yy555);
178112 }
178113 #line 4264 "parse.sql"
178114 break;
178115 case 96: /* mvalues ::= values COMMA LP nexprlist RP */
178116 case 97: /* mvalues ::= mvalues COMMA LP nexprlist RP */ yytestcase(yyruleno==97);
178117 #line 651 "parse.y"
178118 {
178119 yymsp[-4].minor.yy555 = sqlite3MultiValues(pParse, yymsp[-4].minor.yy555, yymsp[-1].minor.yy14);
178120 }
178121 #line 4272 "parse.sql"
178122 break;
178123 case 98: /* distinct ::= DISTINCT */
178124 #line 662 "parse.y"
178125 {yymsp[0].minor.yy144 = SF_Distinct;}
178126 #line 4277 "parse.sql"
178127 break;
178128 case 99: /* distinct ::= ALL */
178129 #line 663 "parse.y"
178130 {yymsp[0].minor.yy144 = SF_All;}
178131 #line 4282 "parse.sql"
178132 break;
178133 case 101: /* sclp ::= */
178134 case 134: /* orderby_opt ::= */ yytestcase(yyruleno==134);
178135 case 144: /* groupby_opt ::= */ yytestcase(yyruleno==144);
178136 case 234: /* exprlist ::= */ yytestcase(yyruleno==234);
178137 case 237: /* paren_exprlist ::= */ yytestcase(yyruleno==237);
178138 case 242: /* eidlist_opt ::= */ yytestcase(yyruleno==242);
178139 #line 676 "parse.y"
178140 {yymsp[1].minor.yy14 = 0;}
178141 #line 4292 "parse.sql"
178142 break;
178143 case 102: /* selcollist ::= sclp scanpt expr scanpt as */
178144 #line 677 "parse.y"
178145 {
178146 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[-2].minor.yy454);
178147 if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy14, &yymsp[0].minor.yy0, 1);
178148 sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy14,yymsp[-3].minor.yy168,yymsp[-1].minor.yy168);
178149 }
178150 #line 4301 "parse.sql"
178151 break;
178152 case 103: /* selcollist ::= sclp scanpt STAR */
178153 #line 682 "parse.y"
178154 {
178155 Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
178156 sqlite3ExprSetErrorOffset(p, (int)(yymsp[0].minor.yy0.z - pParse->zTail));
178157 yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy14, p);
178158 }
178159 #line 4310 "parse.sql"
178160 break;
178161 case 104: /* selcollist ::= sclp scanpt nm DOT STAR */
178162 #line 687 "parse.y"
178163 {
178164 Expr *pRight, *pLeft, *pDot;
178165 pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
178166 sqlite3ExprSetErrorOffset(pRight, (int)(yymsp[0].minor.yy0.z - pParse->zTail));
178167 pLeft = tokenExpr(pParse, TK_ID, yymsp[-2].minor.yy0);
178168 pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
178169 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, pDot);
178170 }
178171 #line 4322 "parse.sql"
178172 break;
178173 case 105: /* as ::= AS nm */
178174 case 117: /* dbnm ::= DOT nm */ yytestcase(yyruleno==117);
178175 case 258: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==258);
178176 case 259: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==259);
178177 #line 700 "parse.y"
178178 {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
178179 #line 4330 "parse.sql"
178180 break;
178181 case 107: /* from ::= */
178182 case 110: /* stl_prefix ::= */ yytestcase(yyruleno==110);
178183 #line 714 "parse.y"
178184 {yymsp[1].minor.yy203 = 0;}
178185 #line 4336 "parse.sql"
178186 break;
178187 case 108: /* from ::= FROM seltablist */
178188 #line 715 "parse.y"
178189 {
178190 yymsp[-1].minor.yy203 = yymsp[0].minor.yy203;
178191 sqlite3SrcListShiftJoinType(pParse,yymsp[-1].minor.yy203);
178192 }
178193 #line 4344 "parse.sql"
178194 break;
178195 case 109: /* stl_prefix ::= seltablist joinop */
178196 #line 723 "parse.y"
178197 {
178198 if( ALWAYS(yymsp[-1].minor.yy203 && yymsp[-1].minor.yy203->nSrc>0) ) yymsp[-1].minor.yy203->a[yymsp[-1].minor.yy203->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy144;
178199 }
178200 #line 4351 "parse.sql"
178201 break;
178202 case 111: /* seltablist ::= stl_prefix nm dbnm as on_using */
178203 #line 727 "parse.y"
178204 {
178205 yymsp[-4].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-4].minor.yy203,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
178206 }
178207 #line 4358 "parse.sql"
178208 break;
178209 case 112: /* seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
178210 #line 730 "parse.y"
178211 {
178212 yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,0,&yymsp[0].minor.yy269);
178213 sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy203, &yymsp[-1].minor.yy0);
178214 }
178215 #line 4366 "parse.sql"
178216 break;
178217 case 113: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
178218 #line 734 "parse.y"
178219 {
178220 yymsp[-7].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-7].minor.yy203,&yymsp[-6].minor.yy0,&yymsp[-5].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
178221 sqlite3SrcListFuncArgs(pParse, yymsp[-7].minor.yy203, yymsp[-3].minor.yy14);
178222 }
178223 #line 4374 "parse.sql"
178224 break;
178225 case 114: /* seltablist ::= stl_prefix LP select RP as on_using */
178226 #line 739 "parse.y"
178227 {
178228 yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,yymsp[-3].minor.yy555,&yymsp[0].minor.yy269);
178229 }
178230 #line 4381 "parse.sql"
178231 break;
178232 case 115: /* seltablist ::= stl_prefix LP seltablist RP as on_using */
178233 #line 742 "parse.y"
178234 {
178235 if( yymsp[-5].minor.yy203==0 && yymsp[-1].minor.yy0.n==0 && yymsp[0].minor.yy269.pOn==0 && yymsp[0].minor.yy269.pUsing==0 ){
178236 yymsp[-5].minor.yy203 = yymsp[-3].minor.yy203;
178237 }else if( ALWAYS(yymsp[-3].minor.yy203!=0) && yymsp[-3].minor.yy203->nSrc==1 ){
178238 yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
@@ -178269,210 +177945,144 @@
178269 sqlite3SrcListShiftJoinType(pParse,yymsp[-3].minor.yy203);
178270 pSubquery = sqlite3SelectNew(pParse,0,yymsp[-3].minor.yy203,0,0,0,0,SF_NestedFrom,0);
178271 yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,pSubquery,&yymsp[0].minor.yy269);
178272 }
178273 }
178274 #line 4425 "parse.sql"
178275 break;
178276 case 116: /* dbnm ::= */
178277 case 131: /* indexed_opt ::= */ yytestcase(yyruleno==131);
178278 #line 785 "parse.y"
178279 {yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
178280 #line 4431 "parse.sql"
178281 break;
178282 case 118: /* fullname ::= nm */
178283 #line 790 "parse.y"
178284 {
178285 yylhsminor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
178286 if( IN_RENAME_OBJECT && yylhsminor.yy203 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy203->a[0].zName, &yymsp[0].minor.yy0);
178287 }
178288 #line 4439 "parse.sql"
178289 yymsp[0].minor.yy203 = yylhsminor.yy203;
178290 break;
178291 case 119: /* fullname ::= nm DOT nm */
178292 #line 794 "parse.y"
178293 {
178294 yylhsminor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
178295 if( IN_RENAME_OBJECT && yylhsminor.yy203 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy203->a[0].zName, &yymsp[0].minor.yy0);
178296 }
178297 #line 4448 "parse.sql"
178298 yymsp[-2].minor.yy203 = yylhsminor.yy203;
178299 break;
178300 case 120: /* xfullname ::= nm */
178301 #line 802 "parse.y"
178302 {yymsp[0].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
178303 #line 4454 "parse.sql"
178304 break;
178305 case 121: /* xfullname ::= nm DOT nm */
178306 #line 804 "parse.y"
178307 {yymsp[-2].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
178308 #line 4459 "parse.sql"
178309 break;
178310 case 122: /* xfullname ::= nm DOT nm AS nm */
178311 #line 805 "parse.y"
178312 {
178313 yymsp[-4].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
178314 if( yymsp[-4].minor.yy203 ) yymsp[-4].minor.yy203->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
178315 }
178316 #line 4467 "parse.sql"
178317 break;
178318 case 123: /* xfullname ::= nm AS nm */
178319 #line 809 "parse.y"
178320 {
178321 yymsp[-2].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
178322 if( yymsp[-2].minor.yy203 ) yymsp[-2].minor.yy203->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
178323 }
178324 #line 4475 "parse.sql"
178325 break;
178326 case 124: /* joinop ::= COMMA|JOIN */
178327 #line 815 "parse.y"
178328 { yymsp[0].minor.yy144 = JT_INNER; }
178329 #line 4480 "parse.sql"
178330 break;
178331 case 125: /* joinop ::= JOIN_KW JOIN */
178332 #line 817 "parse.y"
178333 {yymsp[-1].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); /*X-overwrites-A*/}
178334 #line 4485 "parse.sql"
178335 break;
178336 case 126: /* joinop ::= JOIN_KW nm JOIN */
178337 #line 819 "parse.y"
178338 {yymsp[-2].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
178339 #line 4490 "parse.sql"
178340 break;
178341 case 127: /* joinop ::= JOIN_KW nm nm JOIN */
178342 #line 821 "parse.y"
178343 {yymsp[-3].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
178344 #line 4495 "parse.sql"
178345 break;
178346 case 128: /* on_using ::= ON expr */
178347 #line 842 "parse.y"
178348 {yymsp[-1].minor.yy269.pOn = yymsp[0].minor.yy454; yymsp[-1].minor.yy269.pUsing = 0;}
178349 #line 4500 "parse.sql"
178350 break;
178351 case 129: /* on_using ::= USING LP idlist RP */
178352 #line 843 "parse.y"
178353 {yymsp[-3].minor.yy269.pOn = 0; yymsp[-3].minor.yy269.pUsing = yymsp[-1].minor.yy132;}
178354 #line 4505 "parse.sql"
178355 break;
178356 case 130: /* on_using ::= */
178357 #line 844 "parse.y"
178358 {yymsp[1].minor.yy269.pOn = 0; yymsp[1].minor.yy269.pUsing = 0;}
178359 #line 4510 "parse.sql"
178360 break;
178361 case 132: /* indexed_by ::= INDEXED BY nm */
178362 #line 860 "parse.y"
178363 {yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
178364 #line 4515 "parse.sql"
178365 break;
178366 case 133: /* indexed_by ::= NOT INDEXED */
178367 #line 861 "parse.y"
178368 {yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
178369 #line 4520 "parse.sql"
178370 break;
178371 case 135: /* orderby_opt ::= ORDER BY sortlist */
178372 case 145: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==145);
178373 #line 874 "parse.y"
178374 {yymsp[-2].minor.yy14 = yymsp[0].minor.yy14;}
178375 #line 4526 "parse.sql"
178376 break;
178377 case 136: /* sortlist ::= sortlist COMMA expr sortorder nulls */
178378 #line 875 "parse.y"
178379 {
178380 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14,yymsp[-2].minor.yy454);
178381 sqlite3ExprListSetSortOrder(yymsp[-4].minor.yy14,yymsp[-1].minor.yy144,yymsp[0].minor.yy144);
178382 }
178383 #line 4534 "parse.sql"
178384 break;
178385 case 137: /* sortlist ::= expr sortorder nulls */
178386 #line 879 "parse.y"
178387 {
178388 yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[-2].minor.yy454); /*A-overwrites-Y*/
178389 sqlite3ExprListSetSortOrder(yymsp[-2].minor.yy14,yymsp[-1].minor.yy144,yymsp[0].minor.yy144);
178390 }
178391 #line 4542 "parse.sql"
178392 break;
178393 case 138: /* sortorder ::= ASC */
178394 #line 886 "parse.y"
178395 {yymsp[0].minor.yy144 = SQLITE_SO_ASC;}
178396 #line 4547 "parse.sql"
178397 break;
178398 case 139: /* sortorder ::= DESC */
178399 #line 887 "parse.y"
178400 {yymsp[0].minor.yy144 = SQLITE_SO_DESC;}
178401 #line 4552 "parse.sql"
178402 break;
178403 case 140: /* sortorder ::= */
178404 case 143: /* nulls ::= */ yytestcase(yyruleno==143);
178405 #line 888 "parse.y"
178406 {yymsp[1].minor.yy144 = SQLITE_SO_UNDEFINED;}
178407 #line 4558 "parse.sql"
178408 break;
178409 case 141: /* nulls ::= NULLS FIRST */
178410 #line 891 "parse.y"
178411 {yymsp[-1].minor.yy144 = SQLITE_SO_ASC;}
178412 #line 4563 "parse.sql"
178413 break;
178414 case 142: /* nulls ::= NULLS LAST */
178415 #line 892 "parse.y"
178416 {yymsp[-1].minor.yy144 = SQLITE_SO_DESC;}
178417 #line 4568 "parse.sql"
178418 break;
178419 case 146: /* having_opt ::= */
178420 case 148: /* limit_opt ::= */ yytestcase(yyruleno==148);
178421 case 153: /* where_opt ::= */ yytestcase(yyruleno==153);
178422 case 155: /* where_opt_ret ::= */ yytestcase(yyruleno==155);
178423 case 232: /* case_else ::= */ yytestcase(yyruleno==232);
178424 case 233: /* case_operand ::= */ yytestcase(yyruleno==233);
178425 case 252: /* vinto ::= */ yytestcase(yyruleno==252);
178426 #line 902 "parse.y"
178427 {yymsp[1].minor.yy454 = 0;}
178428 #line 4579 "parse.sql"
178429 break;
178430 case 147: /* having_opt ::= HAVING expr */
178431 case 154: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==154);
178432 case 156: /* where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==156);
178433 case 231: /* case_else ::= ELSE expr */ yytestcase(yyruleno==231);
178434 case 251: /* vinto ::= INTO expr */ yytestcase(yyruleno==251);
178435 #line 903 "parse.y"
178436 {yymsp[-1].minor.yy454 = yymsp[0].minor.yy454;}
178437 #line 4588 "parse.sql"
178438 break;
178439 case 149: /* limit_opt ::= LIMIT expr */
178440 #line 917 "parse.y"
178441 {yymsp[-1].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy454,0);}
178442 #line 4593 "parse.sql"
178443 break;
178444 case 150: /* limit_opt ::= LIMIT expr OFFSET expr */
178445 #line 919 "parse.y"
178446 {yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
178447 #line 4598 "parse.sql"
178448 break;
178449 case 151: /* limit_opt ::= LIMIT expr COMMA expr */
178450 #line 921 "parse.y"
178451 {yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy454,yymsp[-2].minor.yy454);}
178452 #line 4603 "parse.sql"
178453 break;
178454 case 152: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
178455 #line 939 "parse.y"
178456 {
178457 sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy203, &yymsp[-1].minor.yy0);
178458 sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy203,yymsp[0].minor.yy454,0,0);
178459 }
178460 #line 4611 "parse.sql"
178461 break;
178462 case 157: /* where_opt_ret ::= RETURNING selcollist */
178463 #line 955 "parse.y"
178464 {sqlite3AddReturning(pParse,yymsp[0].minor.yy14); yymsp[-1].minor.yy454 = 0;}
178465 #line 4616 "parse.sql"
178466 break;
178467 case 158: /* where_opt_ret ::= WHERE expr RETURNING selcollist */
178468 #line 957 "parse.y"
178469 {sqlite3AddReturning(pParse,yymsp[0].minor.yy14); yymsp[-3].minor.yy454 = yymsp[-2].minor.yy454;}
178470 #line 4621 "parse.sql"
178471 break;
178472 case 159: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
178473 #line 989 "parse.y"
178474 {
178475 sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy203, &yymsp[-4].minor.yy0);
178476 sqlite3ExprListCheckLength(pParse,yymsp[-2].minor.yy14,"set list");
178477 if( yymsp[-1].minor.yy203 ){
178478 SrcList *pFromClause = yymsp[-1].minor.yy203;
@@ -178486,134 +178096,92 @@
178486 }
178487 yymsp[-5].minor.yy203 = sqlite3SrcListAppendList(pParse, yymsp[-5].minor.yy203, pFromClause);
178488 }
178489 sqlite3Update(pParse,yymsp[-5].minor.yy203,yymsp[-2].minor.yy14,yymsp[0].minor.yy454,yymsp[-6].minor.yy144,0,0,0);
178490 }
178491 #line 4642 "parse.sql"
178492 break;
178493 case 160: /* setlist ::= setlist COMMA nm EQ expr */
178494 #line 1013 "parse.y"
178495 {
178496 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[0].minor.yy454);
178497 sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy14, &yymsp[-2].minor.yy0, 1);
178498 }
178499 #line 4650 "parse.sql"
178500 break;
178501 case 161: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
178502 #line 1017 "parse.y"
178503 {
178504 yymsp[-6].minor.yy14 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy14, yymsp[-3].minor.yy132, yymsp[0].minor.yy454);
178505 }
178506 #line 4657 "parse.sql"
178507 break;
178508 case 162: /* setlist ::= nm EQ expr */
178509 #line 1020 "parse.y"
178510 {
178511 yylhsminor.yy14 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy454);
178512 sqlite3ExprListSetName(pParse, yylhsminor.yy14, &yymsp[-2].minor.yy0, 1);
178513 }
178514 #line 4665 "parse.sql"
178515 yymsp[-2].minor.yy14 = yylhsminor.yy14;
178516 break;
178517 case 163: /* setlist ::= LP idlist RP EQ expr */
178518 #line 1024 "parse.y"
178519 {
178520 yymsp[-4].minor.yy14 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy132, yymsp[0].minor.yy454);
178521 }
178522 #line 4673 "parse.sql"
178523 break;
178524 case 164: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
178525 #line 1031 "parse.y"
178526 {
178527 sqlite3Insert(pParse, yymsp[-3].minor.yy203, yymsp[-1].minor.yy555, yymsp[-2].minor.yy132, yymsp[-5].minor.yy144, yymsp[0].minor.yy122);
178528 }
178529 #line 4680 "parse.sql"
178530 break;
178531 case 165: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
178532 #line 1035 "parse.y"
178533 {
178534 sqlite3Insert(pParse, yymsp[-4].minor.yy203, 0, yymsp[-3].minor.yy132, yymsp[-6].minor.yy144, 0);
178535 }
178536 #line 4687 "parse.sql"
178537 break;
178538 case 166: /* upsert ::= */
178539 #line 1046 "parse.y"
178540 { yymsp[1].minor.yy122 = 0; }
178541 #line 4692 "parse.sql"
178542 break;
178543 case 167: /* upsert ::= RETURNING selcollist */
178544 #line 1047 "parse.y"
178545 { yymsp[-1].minor.yy122 = 0; sqlite3AddReturning(pParse,yymsp[0].minor.yy14); }
178546 #line 4697 "parse.sql"
178547 break;
178548 case 168: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
178549 #line 1050 "parse.y"
178550 { yymsp[-11].minor.yy122 = sqlite3UpsertNew(pParse->db,yymsp[-8].minor.yy14,yymsp[-6].minor.yy454,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454,yymsp[0].minor.yy122);}
178551 #line 4702 "parse.sql"
178552 break;
178553 case 169: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
178554 #line 1052 "parse.y"
178555 { yymsp[-8].minor.yy122 = sqlite3UpsertNew(pParse->db,yymsp[-5].minor.yy14,yymsp[-3].minor.yy454,0,0,yymsp[0].minor.yy122); }
178556 #line 4707 "parse.sql"
178557 break;
178558 case 170: /* upsert ::= ON CONFLICT DO NOTHING returning */
178559 #line 1054 "parse.y"
178560 { yymsp[-4].minor.yy122 = sqlite3UpsertNew(pParse->db,0,0,0,0,0); }
178561 #line 4712 "parse.sql"
178562 break;
178563 case 171: /* upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
178564 #line 1056 "parse.y"
178565 { yymsp[-7].minor.yy122 = sqlite3UpsertNew(pParse->db,0,0,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454,0);}
178566 #line 4717 "parse.sql"
178567 break;
178568 case 172: /* returning ::= RETURNING selcollist */
178569 #line 1058 "parse.y"
178570 {sqlite3AddReturning(pParse,yymsp[0].minor.yy14);}
178571 #line 4722 "parse.sql"
178572 break;
178573 case 175: /* idlist_opt ::= */
178574 #line 1070 "parse.y"
178575 {yymsp[1].minor.yy132 = 0;}
178576 #line 4727 "parse.sql"
178577 break;
178578 case 176: /* idlist_opt ::= LP idlist RP */
178579 #line 1071 "parse.y"
178580 {yymsp[-2].minor.yy132 = yymsp[-1].minor.yy132;}
178581 #line 4732 "parse.sql"
178582 break;
178583 case 177: /* idlist ::= idlist COMMA nm */
178584 #line 1073 "parse.y"
178585 {yymsp[-2].minor.yy132 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy132,&yymsp[0].minor.yy0);}
178586 #line 4737 "parse.sql"
178587 break;
178588 case 178: /* idlist ::= nm */
178589 #line 1075 "parse.y"
178590 {yymsp[0].minor.yy132 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
178591 #line 4742 "parse.sql"
178592 break;
178593 case 179: /* expr ::= LP expr RP */
178594 #line 1124 "parse.y"
178595 {yymsp[-2].minor.yy454 = yymsp[-1].minor.yy454;}
178596 #line 4747 "parse.sql"
178597 break;
178598 case 180: /* expr ::= ID|INDEXED|JOIN_KW */
178599 #line 1125 "parse.y"
178600 {yymsp[0].minor.yy454=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
178601 #line 4752 "parse.sql"
178602 break;
178603 case 181: /* expr ::= nm DOT nm */
178604 #line 1126 "parse.y"
178605 {
178606 Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);
178607 Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);
178608 yylhsminor.yy454 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
178609 }
178610 #line 4761 "parse.sql"
178611 yymsp[-2].minor.yy454 = yylhsminor.yy454;
178612 break;
178613 case 182: /* expr ::= nm DOT nm DOT nm */
178614 #line 1131 "parse.y"
178615 {
178616 Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-4].minor.yy0);
178617 Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);
178618 Expr *temp3 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);
178619 Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
@@ -178620,30 +178188,24 @@
178620 if( IN_RENAME_OBJECT ){
178621 sqlite3RenameTokenRemap(pParse, 0, temp1);
178622 }
178623 yylhsminor.yy454 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
178624 }
178625 #line 4776 "parse.sql"
178626 yymsp[-4].minor.yy454 = yylhsminor.yy454;
178627 break;
178628 case 183: /* term ::= NULL|FLOAT|BLOB */
178629 case 184: /* term ::= STRING */ yytestcase(yyruleno==184);
178630 #line 1141 "parse.y"
178631 {yymsp[0].minor.yy454=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
178632 #line 4783 "parse.sql"
178633 break;
178634 case 185: /* term ::= INTEGER */
178635 #line 1143 "parse.y"
178636 {
178637 yylhsminor.yy454 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
178638 if( yylhsminor.yy454 ) yylhsminor.yy454->w.iOfst = (int)(yymsp[0].minor.yy0.z - pParse->zTail);
178639 }
178640 #line 4791 "parse.sql"
178641 yymsp[0].minor.yy454 = yylhsminor.yy454;
178642 break;
178643 case 186: /* expr ::= VARIABLE */
178644 #line 1147 "parse.y"
178645 {
178646 if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
178647 u32 n = yymsp[0].minor.yy0.n;
178648 yymsp[0].minor.yy454 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
178649 sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy454, n);
@@ -178660,90 +178222,70 @@
178660 yymsp[0].minor.yy454 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
178661 if( yymsp[0].minor.yy454 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy454->iTable);
178662 }
178663 }
178664 }
178665 #line 4816 "parse.sql"
178666 break;
178667 case 187: /* expr ::= expr COLLATE ID|STRING */
178668 #line 1167 "parse.y"
178669 {
178670 yymsp[-2].minor.yy454 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy454, &yymsp[0].minor.yy0, 1);
178671 }
178672 #line 4823 "parse.sql"
178673 break;
178674 case 188: /* expr ::= CAST LP expr AS typetoken RP */
178675 #line 1171 "parse.y"
178676 {
178677 yymsp[-5].minor.yy454 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
178678 sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy454, yymsp[-3].minor.yy454, 0);
178679 }
178680 #line 4831 "parse.sql"
178681 break;
178682 case 189: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */
178683 #line 1178 "parse.y"
178684 {
178685 yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy14, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy144);
178686 }
178687 #line 4838 "parse.sql"
178688 yymsp[-4].minor.yy454 = yylhsminor.yy454;
178689 break;
178690 case 190: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */
178691 #line 1181 "parse.y"
178692 {
178693 yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-4].minor.yy14, &yymsp[-7].minor.yy0, yymsp[-5].minor.yy144);
178694 sqlite3ExprAddFunctionOrderBy(pParse, yylhsminor.yy454, yymsp[-1].minor.yy14);
178695 }
178696 #line 4847 "parse.sql"
178697 yymsp[-7].minor.yy454 = yylhsminor.yy454;
178698 break;
178699 case 191: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP */
178700 #line 1185 "parse.y"
178701 {
178702 yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
178703 }
178704 #line 4855 "parse.sql"
178705 yymsp[-3].minor.yy454 = yylhsminor.yy454;
178706 break;
178707 case 192: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */
178708 #line 1249 "parse.y"
178709 {
178710 yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy14, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy144);
178711 sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
178712 }
178713 #line 4864 "parse.sql"
178714 yymsp[-5].minor.yy454 = yylhsminor.yy454;
178715 break;
178716 case 193: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */
178717 #line 1253 "parse.y"
178718 {
178719 yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-5].minor.yy14, &yymsp[-8].minor.yy0, yymsp[-6].minor.yy144);
178720 sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
178721 sqlite3ExprAddFunctionOrderBy(pParse, yylhsminor.yy454, yymsp[-2].minor.yy14);
178722 }
178723 #line 4874 "parse.sql"
178724 yymsp[-8].minor.yy454 = yylhsminor.yy454;
178725 break;
178726 case 194: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */
178727 #line 1258 "parse.y"
178728 {
178729 yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
178730 sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
178731 }
178732 #line 4883 "parse.sql"
178733 yymsp[-4].minor.yy454 = yylhsminor.yy454;
178734 break;
178735 case 195: /* term ::= CTIME_KW */
178736 #line 1272 "parse.y"
178737 {
178738 yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
178739 }
178740 #line 4891 "parse.sql"
178741 yymsp[0].minor.yy454 = yylhsminor.yy454;
178742 break;
178743 case 196: /* expr ::= LP nexprlist COMMA expr RP */
178744 #line 1276 "parse.y"
178745 {
178746 ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy14, yymsp[-1].minor.yy454);
178747 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
178748 if( yymsp[-4].minor.yy454 ){
178749 yymsp[-4].minor.yy454->x.pList = pList;
@@ -178752,35 +178294,27 @@
178752 }
178753 }else{
178754 sqlite3ExprListDelete(pParse->db, pList);
178755 }
178756 }
178757 #line 4908 "parse.sql"
178758 break;
178759 case 197: /* expr ::= expr AND expr */
178760 #line 1289 "parse.y"
178761 {yymsp[-2].minor.yy454=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
178762 #line 4913 "parse.sql"
178763 break;
178764 case 198: /* expr ::= expr OR expr */
178765 case 199: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==199);
178766 case 200: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==200);
178767 case 201: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==201);
178768 case 202: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==202);
178769 case 203: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==203);
178770 case 204: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==204);
178771 #line 1290 "parse.y"
178772 {yymsp[-2].minor.yy454=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
178773 #line 4924 "parse.sql"
178774 break;
178775 case 205: /* likeop ::= NOT LIKE_KW|MATCH */
178776 #line 1303 "parse.y"
178777 {yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
178778 #line 4929 "parse.sql"
178779 break;
178780 case 206: /* expr ::= expr likeop expr */
178781 #line 1304 "parse.y"
178782 {
178783 ExprList *pList;
178784 int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
178785 yymsp[-1].minor.yy0.n &= 0x7fffffff;
178786 pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy454);
@@ -178787,14 +178321,12 @@
178787 pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy454);
178788 yymsp[-2].minor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
178789 if( bNot ) yymsp[-2].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy454, 0);
178790 if( yymsp[-2].minor.yy454 ) yymsp[-2].minor.yy454->flags |= EP_InfixFunc;
178791 }
178792 #line 4943 "parse.sql"
178793 break;
178794 case 207: /* expr ::= expr likeop expr ESCAPE expr */
178795 #line 1314 "parse.y"
178796 {
178797 ExprList *pList;
178798 int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
178799 yymsp[-3].minor.yy0.n &= 0x7fffffff;
178800 pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
@@ -178802,62 +178334,46 @@
178802 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy454);
178803 yymsp[-4].minor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
178804 if( bNot ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178805 if( yymsp[-4].minor.yy454 ) yymsp[-4].minor.yy454->flags |= EP_InfixFunc;
178806 }
178807 #line 4958 "parse.sql"
178808 break;
178809 case 208: /* expr ::= expr ISNULL|NOTNULL */
178810 #line 1326 "parse.y"
178811 {yymsp[-1].minor.yy454 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy454,0);}
178812 #line 4963 "parse.sql"
178813 break;
178814 case 209: /* expr ::= expr NOT NULL */
178815 #line 1327 "parse.y"
178816 {yymsp[-2].minor.yy454 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy454,0);}
178817 #line 4968 "parse.sql"
178818 break;
178819 case 210: /* expr ::= expr IS expr */
178820 #line 1348 "parse.y"
178821 {
178822 yymsp[-2].minor.yy454 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);
178823 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-2].minor.yy454, TK_ISNULL);
178824 }
178825 #line 4976 "parse.sql"
178826 break;
178827 case 211: /* expr ::= expr IS NOT expr */
178828 #line 1352 "parse.y"
178829 {
178830 yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy454,yymsp[0].minor.yy454);
178831 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-3].minor.yy454, TK_NOTNULL);
178832 }
178833 #line 4984 "parse.sql"
178834 break;
178835 case 212: /* expr ::= expr IS NOT DISTINCT FROM expr */
178836 #line 1356 "parse.y"
178837 {
178838 yymsp[-5].minor.yy454 = sqlite3PExpr(pParse,TK_IS,yymsp[-5].minor.yy454,yymsp[0].minor.yy454);
178839 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-5].minor.yy454, TK_ISNULL);
178840 }
178841 #line 4992 "parse.sql"
178842 break;
178843 case 213: /* expr ::= expr IS DISTINCT FROM expr */
178844 #line 1360 "parse.y"
178845 {
178846 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-4].minor.yy454,yymsp[0].minor.yy454);
178847 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-4].minor.yy454, TK_NOTNULL);
178848 }
178849 #line 5000 "parse.sql"
178850 break;
178851 case 214: /* expr ::= NOT expr */
178852 case 215: /* expr ::= BITNOT expr */ yytestcase(yyruleno==215);
178853 #line 1366 "parse.y"
178854 {yymsp[-1].minor.yy454 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy454, 0);/*A-overwrites-B*/}
178855 #line 5006 "parse.sql"
178856 break;
178857 case 216: /* expr ::= PLUS|MINUS expr */
178858 #line 1369 "parse.y"
178859 {
178860 Expr *p = yymsp[0].minor.yy454;
178861 u8 op = yymsp[-1].major + (TK_UPLUS-TK_PLUS);
178862 assert( TK_UPLUS>TK_PLUS );
178863 assert( TK_UMINUS == TK_MINUS + (TK_UPLUS - TK_PLUS) );
@@ -178867,30 +178383,24 @@
178867 }else{
178868 yymsp[-1].minor.yy454 = sqlite3PExpr(pParse, op, p, 0);
178869 /*A-overwrites-B*/
178870 }
178871 }
178872 #line 5023 "parse.sql"
178873 break;
178874 case 217: /* expr ::= expr PTR expr */
178875 #line 1383 "parse.y"
178876 {
178877 ExprList *pList = sqlite3ExprListAppend(pParse, 0, yymsp[-2].minor.yy454);
178878 pList = sqlite3ExprListAppend(pParse, pList, yymsp[0].minor.yy454);
178879 yylhsminor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
178880 }
178881 #line 5032 "parse.sql"
178882 yymsp[-2].minor.yy454 = yylhsminor.yy454;
178883 break;
178884 case 218: /* between_op ::= BETWEEN */
178885 case 221: /* in_op ::= IN */ yytestcase(yyruleno==221);
178886 #line 1390 "parse.y"
178887 {yymsp[0].minor.yy144 = 0;}
178888 #line 5039 "parse.sql"
178889 break;
178890 case 220: /* expr ::= expr between_op expr AND expr */
178891 #line 1392 "parse.y"
178892 {
178893 ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
178894 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy454);
178895 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy454, 0);
178896 if( yymsp[-4].minor.yy454 ){
@@ -178898,14 +178408,12 @@
178898 }else{
178899 sqlite3ExprListDelete(pParse->db, pList);
178900 }
178901 if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178902 }
178903 #line 5054 "parse.sql"
178904 break;
178905 case 223: /* expr ::= expr in_op LP exprlist RP */
178906 #line 1407 "parse.y"
178907 {
178908 if( yymsp[-1].minor.yy14==0 ){
178909 /* Expressions of the form
178910 **
178911 ** expr1 IN ()
@@ -178946,52 +178454,42 @@
178946 }
178947 }
178948 if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178949 }
178950 }
178951 #line 5102 "parse.sql"
178952 break;
178953 case 224: /* expr ::= LP select RP */
178954 #line 1451 "parse.y"
178955 {
178956 yymsp[-2].minor.yy454 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
178957 sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy454, yymsp[-1].minor.yy555);
178958 }
178959 #line 5110 "parse.sql"
178960 break;
178961 case 225: /* expr ::= expr in_op LP select RP */
178962 #line 1455 "parse.y"
178963 {
178964 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy454, 0);
178965 sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy454, yymsp[-1].minor.yy555);
178966 if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178967 }
178968 #line 5119 "parse.sql"
178969 break;
178970 case 226: /* expr ::= expr in_op nm dbnm paren_exprlist */
178971 #line 1460 "parse.y"
178972 {
178973 SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
178974 Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
178975 if( yymsp[0].minor.yy14 ) sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy14);
178976 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy454, 0);
178977 sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy454, pSelect);
178978 if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178979 }
178980 #line 5131 "parse.sql"
178981 break;
178982 case 227: /* expr ::= EXISTS LP select RP */
178983 #line 1468 "parse.y"
178984 {
178985 Expr *p;
178986 p = yymsp[-3].minor.yy454 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
178987 sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy555);
178988 }
178989 #line 5140 "parse.sql"
178990 break;
178991 case 228: /* expr ::= CASE case_operand case_exprlist case_else END */
178992 #line 1476 "parse.y"
178993 {
178994 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy454, 0);
178995 if( yymsp[-4].minor.yy454 ){
178996 yymsp[-4].minor.yy454->x.pList = yymsp[-1].minor.yy454 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454) : yymsp[-2].minor.yy14;
178997 sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy454);
@@ -178998,627 +178496,446 @@
178998 }else{
178999 sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy14);
179000 sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy454);
179001 }
179002 }
179003 #line 5154 "parse.sql"
179004 break;
179005 case 229: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
179006 #line 1488 "parse.y"
179007 {
179008 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, yymsp[-2].minor.yy454);
179009 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, yymsp[0].minor.yy454);
179010 }
179011 #line 5162 "parse.sql"
179012 break;
179013 case 230: /* case_exprlist ::= WHEN expr THEN expr */
179014 #line 1492 "parse.y"
179015 {
179016 yymsp[-3].minor.yy14 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
179017 yymsp[-3].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy14, yymsp[0].minor.yy454);
179018 }
179019 #line 5170 "parse.sql"
179020 break;
179021 case 235: /* nexprlist ::= nexprlist COMMA expr */
179022 #line 1513 "parse.y"
179023 {yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy14,yymsp[0].minor.yy454);}
179024 #line 5175 "parse.sql"
179025 break;
179026 case 236: /* nexprlist ::= expr */
179027 #line 1515 "parse.y"
179028 {yymsp[0].minor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy454); /*A-overwrites-Y*/}
179029 #line 5180 "parse.sql"
179030 break;
179031 case 238: /* paren_exprlist ::= LP exprlist RP */
179032 case 243: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==243);
179033 #line 1523 "parse.y"
179034 {yymsp[-2].minor.yy14 = yymsp[-1].minor.yy14;}
179035 #line 5186 "parse.sql"
179036 break;
179037 case 239: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
179038 #line 1530 "parse.y"
179039 {
179040 sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0,
179041 sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy14, yymsp[-10].minor.yy144,
179042 &yymsp[-11].minor.yy0, yymsp[0].minor.yy454, SQLITE_SO_ASC, yymsp[-8].minor.yy144, SQLITE_IDXTYPE_APPDEF);
179043 if( IN_RENAME_OBJECT && pParse->pNewIndex ){
179044 sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
179045 }
179046 }
179047 #line 5198 "parse.sql"
179048 break;
179049 case 240: /* uniqueflag ::= UNIQUE */
179050 case 282: /* raisetype ::= ABORT */ yytestcase(yyruleno==282);
179051 #line 1540 "parse.y"
179052 {yymsp[0].minor.yy144 = OE_Abort;}
179053 #line 5204 "parse.sql"
179054 break;
179055 case 241: /* uniqueflag ::= */
179056 #line 1541 "parse.y"
179057 {yymsp[1].minor.yy144 = OE_None;}
179058 #line 5209 "parse.sql"
179059 break;
179060 case 244: /* eidlist ::= eidlist COMMA nm collate sortorder */
179061 #line 1591 "parse.y"
179062 {
179063 yymsp[-4].minor.yy14 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy14, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy144, yymsp[0].minor.yy144);
179064 }
179065 #line 5216 "parse.sql"
179066 break;
179067 case 245: /* eidlist ::= nm collate sortorder */
179068 #line 1594 "parse.y"
179069 {
179070 yymsp[-2].minor.yy14 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy144, yymsp[0].minor.yy144); /*A-overwrites-Y*/
179071 }
179072 #line 5223 "parse.sql"
179073 break;
179074 case 248: /* cmd ::= DROP INDEX ifexists fullname */
179075 #line 1605 "parse.y"
179076 {sqlite3DropIndex(pParse, yymsp[0].minor.yy203, yymsp[-1].minor.yy144);}
179077 #line 5228 "parse.sql"
179078 break;
179079 case 249: /* cmd ::= VACUUM vinto */
179080 #line 1612 "parse.y"
179081 {sqlite3Vacuum(pParse,0,yymsp[0].minor.yy454);}
179082 #line 5233 "parse.sql"
179083 break;
179084 case 250: /* cmd ::= VACUUM nm vinto */
179085 #line 1613 "parse.y"
179086 {sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy454);}
179087 #line 5238 "parse.sql"
179088 break;
179089 case 253: /* cmd ::= PRAGMA nm dbnm */
179090 #line 1621 "parse.y"
179091 {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
179092 #line 5243 "parse.sql"
179093 break;
179094 case 254: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
179095 #line 1622 "parse.y"
179096 {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
179097 #line 5248 "parse.sql"
179098 break;
179099 case 255: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
179100 #line 1623 "parse.y"
179101 {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
179102 #line 5253 "parse.sql"
179103 break;
179104 case 256: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
179105 #line 1625 "parse.y"
179106 {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
179107 #line 5258 "parse.sql"
179108 break;
179109 case 257: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
179110 #line 1627 "parse.y"
179111 {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
179112 #line 5263 "parse.sql"
179113 break;
179114 case 260: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
179115 #line 1643 "parse.y"
179116 {
179117 Token all;
179118 all.z = yymsp[-3].minor.yy0.z;
179119 all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
179120 sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy427, &all);
179121 }
179122 #line 5273 "parse.sql"
179123 break;
179124 case 261: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
179125 #line 1652 "parse.y"
179126 {
179127 sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy144, yymsp[-4].minor.yy286.a, yymsp[-4].minor.yy286.b, yymsp[-2].minor.yy203, yymsp[0].minor.yy454, yymsp[-10].minor.yy144, yymsp[-8].minor.yy144);
179128 yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
179129 }
179130 #line 5281 "parse.sql"
179131 break;
179132 case 262: /* trigger_time ::= BEFORE|AFTER */
179133 #line 1658 "parse.y"
179134 { yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-X*/ }
179135 #line 5286 "parse.sql"
179136 break;
179137 case 263: /* trigger_time ::= INSTEAD OF */
179138 #line 1659 "parse.y"
179139 { yymsp[-1].minor.yy144 = TK_INSTEAD;}
179140 #line 5291 "parse.sql"
179141 break;
179142 case 264: /* trigger_time ::= */
179143 #line 1660 "parse.y"
179144 { yymsp[1].minor.yy144 = TK_BEFORE; }
179145 #line 5296 "parse.sql"
179146 break;
179147 case 265: /* trigger_event ::= DELETE|INSERT */
179148 case 266: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==266);
179149 #line 1664 "parse.y"
179150 {yymsp[0].minor.yy286.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy286.b = 0;}
179151 #line 5302 "parse.sql"
179152 break;
179153 case 267: /* trigger_event ::= UPDATE OF idlist */
179154 #line 1666 "parse.y"
179155 {yymsp[-2].minor.yy286.a = TK_UPDATE; yymsp[-2].minor.yy286.b = yymsp[0].minor.yy132;}
179156 #line 5307 "parse.sql"
179157 break;
179158 case 268: /* when_clause ::= */
179159 case 287: /* key_opt ::= */ yytestcase(yyruleno==287);
179160 #line 1673 "parse.y"
179161 { yymsp[1].minor.yy454 = 0; }
179162 #line 5313 "parse.sql"
179163 break;
179164 case 269: /* when_clause ::= WHEN expr */
179165 case 288: /* key_opt ::= KEY expr */ yytestcase(yyruleno==288);
179166 #line 1674 "parse.y"
179167 { yymsp[-1].minor.yy454 = yymsp[0].minor.yy454; }
179168 #line 5319 "parse.sql"
179169 break;
179170 case 270: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
179171 #line 1678 "parse.y"
179172 {
179173 assert( yymsp[-2].minor.yy427!=0 );
179174 yymsp[-2].minor.yy427->pLast->pNext = yymsp[-1].minor.yy427;
179175 yymsp[-2].minor.yy427->pLast = yymsp[-1].minor.yy427;
179176 }
179177 #line 5328 "parse.sql"
179178 break;
179179 case 271: /* trigger_cmd_list ::= trigger_cmd SEMI */
179180 #line 1683 "parse.y"
179181 {
179182 assert( yymsp[-1].minor.yy427!=0 );
179183 yymsp[-1].minor.yy427->pLast = yymsp[-1].minor.yy427;
179184 }
179185 #line 5336 "parse.sql"
179186 break;
179187 case 272: /* trnm ::= nm DOT nm */
179188 #line 1694 "parse.y"
179189 {
179190 yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
179191 sqlite3ErrorMsg(pParse,
179192 "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
179193 "statements within triggers");
179194 }
179195 #line 5346 "parse.sql"
179196 break;
179197 case 273: /* tridxby ::= INDEXED BY nm */
179198 #line 1706 "parse.y"
179199 {
179200 sqlite3ErrorMsg(pParse,
179201 "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
179202 "within triggers");
179203 }
179204 #line 5355 "parse.sql"
179205 break;
179206 case 274: /* tridxby ::= NOT INDEXED */
179207 #line 1711 "parse.y"
179208 {
179209 sqlite3ErrorMsg(pParse,
179210 "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
179211 "within triggers");
179212 }
179213 #line 5364 "parse.sql"
179214 break;
179215 case 275: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
179216 #line 1724 "parse.y"
179217 {yylhsminor.yy427 = sqlite3TriggerUpdateStep(pParse, &yymsp[-6].minor.yy0, yymsp[-2].minor.yy203, yymsp[-3].minor.yy14, yymsp[-1].minor.yy454, yymsp[-7].minor.yy144, yymsp[-8].minor.yy0.z, yymsp[0].minor.yy168);}
179218 #line 5369 "parse.sql"
179219 yymsp[-8].minor.yy427 = yylhsminor.yy427;
179220 break;
179221 case 276: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
179222 #line 1728 "parse.y"
179223 {
179224 yylhsminor.yy427 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy132,yymsp[-2].minor.yy555,yymsp[-6].minor.yy144,yymsp[-1].minor.yy122,yymsp[-7].minor.yy168,yymsp[0].minor.yy168);/*yylhsminor.yy427-overwrites-yymsp[-6].minor.yy144*/
179225 }
179226 #line 5377 "parse.sql"
179227 yymsp[-7].minor.yy427 = yylhsminor.yy427;
179228 break;
179229 case 277: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
179230 #line 1733 "parse.y"
179231 {yylhsminor.yy427 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy454, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy168);}
179232 #line 5383 "parse.sql"
179233 yymsp[-5].minor.yy427 = yylhsminor.yy427;
179234 break;
179235 case 278: /* trigger_cmd ::= scanpt select scanpt */
179236 #line 1737 "parse.y"
179237 {yylhsminor.yy427 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy555, yymsp[-2].minor.yy168, yymsp[0].minor.yy168); /*yylhsminor.yy427-overwrites-yymsp[-1].minor.yy555*/}
179238 #line 5389 "parse.sql"
179239 yymsp[-2].minor.yy427 = yylhsminor.yy427;
179240 break;
179241 case 279: /* expr ::= RAISE LP IGNORE RP */
179242 #line 1740 "parse.y"
179243 {
179244 yymsp[-3].minor.yy454 = sqlite3PExpr(pParse, TK_RAISE, 0, 0);
179245 if( yymsp[-3].minor.yy454 ){
179246 yymsp[-3].minor.yy454->affExpr = OE_Ignore;
179247 }
179248 }
179249 #line 5400 "parse.sql"
179250 break;
179251 case 280: /* expr ::= RAISE LP raisetype COMMA expr RP */
179252 #line 1746 "parse.y"
179253 {
179254 yymsp[-5].minor.yy454 = sqlite3PExpr(pParse, TK_RAISE, yymsp[-1].minor.yy454, 0);
179255 if( yymsp[-5].minor.yy454 ) {
179256 yymsp[-5].minor.yy454->affExpr = (char)yymsp[-3].minor.yy144;
179257 }
179258 }
179259 #line 5410 "parse.sql"
179260 break;
179261 case 281: /* raisetype ::= ROLLBACK */
179262 #line 1755 "parse.y"
179263 {yymsp[0].minor.yy144 = OE_Rollback;}
179264 #line 5415 "parse.sql"
179265 break;
179266 case 283: /* raisetype ::= FAIL */
179267 #line 1757 "parse.y"
179268 {yymsp[0].minor.yy144 = OE_Fail;}
179269 #line 5420 "parse.sql"
179270 break;
179271 case 284: /* cmd ::= DROP TRIGGER ifexists fullname */
179272 #line 1762 "parse.y"
179273 {
179274 sqlite3DropTrigger(pParse,yymsp[0].minor.yy203,yymsp[-1].minor.yy144);
179275 }
179276 #line 5427 "parse.sql"
179277 break;
179278 case 285: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
179279 #line 1769 "parse.y"
179280 {
179281 sqlite3Attach(pParse, yymsp[-3].minor.yy454, yymsp[-1].minor.yy454, yymsp[0].minor.yy454);
179282 }
179283 #line 5434 "parse.sql"
179284 break;
179285 case 286: /* cmd ::= DETACH database_kw_opt expr */
179286 #line 1772 "parse.y"
179287 {
179288 sqlite3Detach(pParse, yymsp[0].minor.yy454);
179289 }
179290 #line 5441 "parse.sql"
179291 break;
179292 case 289: /* cmd ::= REINDEX */
179293 #line 1787 "parse.y"
179294 {sqlite3Reindex(pParse, 0, 0);}
179295 #line 5446 "parse.sql"
179296 break;
179297 case 290: /* cmd ::= REINDEX nm dbnm */
179298 #line 1788 "parse.y"
179299 {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
179300 #line 5451 "parse.sql"
179301 break;
179302 case 291: /* cmd ::= ANALYZE */
179303 #line 1793 "parse.y"
179304 {sqlite3Analyze(pParse, 0, 0);}
179305 #line 5456 "parse.sql"
179306 break;
179307 case 292: /* cmd ::= ANALYZE nm dbnm */
179308 #line 1794 "parse.y"
179309 {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
179310 #line 5461 "parse.sql"
179311 break;
179312 case 293: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
179313 #line 1800 "parse.y"
179314 {
179315 sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy203,&yymsp[0].minor.yy0);
179316 }
179317 #line 5468 "parse.sql"
179318 break;
179319 case 294: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
179320 #line 1804 "parse.y"
179321 {
179322 yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
179323 sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
179324 }
179325 #line 5476 "parse.sql"
179326 break;
179327 case 295: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
179328 #line 1808 "parse.y"
179329 {
179330 sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy203, &yymsp[0].minor.yy0);
179331 }
179332 #line 5483 "parse.sql"
179333 break;
179334 case 296: /* add_column_fullname ::= fullname */
179335 #line 1812 "parse.y"
179336 {
179337 disableLookaside(pParse);
179338 sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy203);
179339 }
179340 #line 5491 "parse.sql"
179341 break;
179342 case 297: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
179343 #line 1816 "parse.y"
179344 {
179345 sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy203, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
179346 }
179347 #line 5498 "parse.sql"
179348 break;
179349 case 298: /* cmd ::= create_vtab */
179350 #line 1828 "parse.y"
179351 {sqlite3VtabFinishParse(pParse,0);}
179352 #line 5503 "parse.sql"
179353 break;
179354 case 299: /* cmd ::= create_vtab LP vtabarglist RP */
179355 #line 1829 "parse.y"
179356 {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
179357 #line 5508 "parse.sql"
179358 break;
179359 case 300: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
179360 #line 1831 "parse.y"
179361 {
179362 sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy144);
179363 }
179364 #line 5515 "parse.sql"
179365 break;
179366 case 301: /* vtabarg ::= */
179367 #line 1836 "parse.y"
179368 {sqlite3VtabArgInit(pParse);}
179369 #line 5520 "parse.sql"
179370 break;
179371 case 302: /* vtabargtoken ::= ANY */
179372 case 303: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==303);
179373 case 304: /* lp ::= LP */ yytestcase(yyruleno==304);
179374 #line 1838 "parse.y"
179375 {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
179376 #line 5527 "parse.sql"
179377 break;
179378 case 305: /* with ::= WITH wqlist */
179379 case 306: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==306);
179380 #line 1855 "parse.y"
179381 { sqlite3WithPush(pParse, yymsp[0].minor.yy59, 1); }
179382 #line 5533 "parse.sql"
179383 break;
179384 case 307: /* wqas ::= AS */
179385 #line 1859 "parse.y"
179386 {yymsp[0].minor.yy462 = M10d_Any;}
179387 #line 5538 "parse.sql"
179388 break;
179389 case 308: /* wqas ::= AS MATERIALIZED */
179390 #line 1860 "parse.y"
179391 {yymsp[-1].minor.yy462 = M10d_Yes;}
179392 #line 5543 "parse.sql"
179393 break;
179394 case 309: /* wqas ::= AS NOT MATERIALIZED */
179395 #line 1861 "parse.y"
179396 {yymsp[-2].minor.yy462 = M10d_No;}
179397 #line 5548 "parse.sql"
179398 break;
179399 case 310: /* wqitem ::= withnm eidlist_opt wqas LP select RP */
179400 #line 1862 "parse.y"
179401 {
179402 yymsp[-5].minor.yy67 = sqlite3CteNew(pParse, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy14, yymsp[-1].minor.yy555, yymsp[-3].minor.yy462); /*A-overwrites-X*/
179403 }
179404 #line 5555 "parse.sql"
179405 break;
179406 case 311: /* withnm ::= nm */
179407 #line 1865 "parse.y"
179408 {pParse->bHasWith = 1;}
179409 #line 5560 "parse.sql"
179410 break;
179411 case 312: /* wqlist ::= wqitem */
179412 #line 1866 "parse.y"
179413 {
179414 yymsp[0].minor.yy59 = sqlite3WithAdd(pParse, 0, yymsp[0].minor.yy67); /*A-overwrites-X*/
179415 }
179416 #line 5567 "parse.sql"
179417 break;
179418 case 313: /* wqlist ::= wqlist COMMA wqitem */
179419 #line 1869 "parse.y"
179420 {
179421 yymsp[-2].minor.yy59 = sqlite3WithAdd(pParse, yymsp[-2].minor.yy59, yymsp[0].minor.yy67);
179422 }
179423 #line 5574 "parse.sql"
179424 break;
179425 case 314: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
179426 #line 1884 "parse.y"
179427 {
179428 assert( yymsp[0].minor.yy211!=0 );
179429 sqlite3WindowChain(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy211);
179430 yymsp[0].minor.yy211->pNextWin = yymsp[-2].minor.yy211;
179431 yylhsminor.yy211 = yymsp[0].minor.yy211;
179432 }
179433 #line 5584 "parse.sql"
179434 yymsp[-2].minor.yy211 = yylhsminor.yy211;
179435 break;
179436 case 315: /* windowdefn ::= nm AS LP window RP */
179437 #line 1893 "parse.y"
179438 {
179439 if( ALWAYS(yymsp[-1].minor.yy211) ){
179440 yymsp[-1].minor.yy211->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
179441 }
179442 yylhsminor.yy211 = yymsp[-1].minor.yy211;
179443 }
179444 #line 5595 "parse.sql"
179445 yymsp[-4].minor.yy211 = yylhsminor.yy211;
179446 break;
179447 case 316: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
179448 #line 1927 "parse.y"
179449 {
179450 yymsp[-4].minor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy14, yymsp[-1].minor.yy14, 0);
179451 }
179452 #line 5603 "parse.sql"
179453 break;
179454 case 317: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
179455 #line 1930 "parse.y"
179456 {
179457 yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy14, yymsp[-1].minor.yy14, &yymsp[-5].minor.yy0);
179458 }
179459 #line 5610 "parse.sql"
179460 yymsp[-5].minor.yy211 = yylhsminor.yy211;
179461 break;
179462 case 318: /* window ::= ORDER BY sortlist frame_opt */
179463 #line 1933 "parse.y"
179464 {
179465 yymsp[-3].minor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, yymsp[-1].minor.yy14, 0);
179466 }
179467 #line 5618 "parse.sql"
179468 break;
179469 case 319: /* window ::= nm ORDER BY sortlist frame_opt */
179470 #line 1936 "parse.y"
179471 {
179472 yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, yymsp[-1].minor.yy14, &yymsp[-4].minor.yy0);
179473 }
179474 #line 5625 "parse.sql"
179475 yymsp[-4].minor.yy211 = yylhsminor.yy211;
179476 break;
179477 case 320: /* window ::= nm frame_opt */
179478 #line 1940 "parse.y"
179479 {
179480 yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, 0, &yymsp[-1].minor.yy0);
179481 }
179482 #line 5633 "parse.sql"
179483 yymsp[-1].minor.yy211 = yylhsminor.yy211;
179484 break;
179485 case 321: /* frame_opt ::= */
179486 #line 1944 "parse.y"
179487 {
179488 yymsp[1].minor.yy211 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
179489 }
179490 #line 5641 "parse.sql"
179491 break;
179492 case 322: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
179493 #line 1947 "parse.y"
179494 {
179495 yylhsminor.yy211 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy144, yymsp[-1].minor.yy509.eType, yymsp[-1].minor.yy509.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy462);
179496 }
179497 #line 5648 "parse.sql"
179498 yymsp[-2].minor.yy211 = yylhsminor.yy211;
179499 break;
179500 case 323: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
179501 #line 1951 "parse.y"
179502 {
179503 yylhsminor.yy211 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy144, yymsp[-3].minor.yy509.eType, yymsp[-3].minor.yy509.pExpr, yymsp[-1].minor.yy509.eType, yymsp[-1].minor.yy509.pExpr, yymsp[0].minor.yy462);
179504 }
179505 #line 5656 "parse.sql"
179506 yymsp[-5].minor.yy211 = yylhsminor.yy211;
179507 break;
179508 case 325: /* frame_bound_s ::= frame_bound */
179509 case 327: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==327);
179510 #line 1957 "parse.y"
179511 {yylhsminor.yy509 = yymsp[0].minor.yy509;}
179512 #line 5663 "parse.sql"
179513 yymsp[0].minor.yy509 = yylhsminor.yy509;
179514 break;
179515 case 326: /* frame_bound_s ::= UNBOUNDED PRECEDING */
179516 case 328: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==328);
179517 case 330: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==330);
179518 #line 1958 "parse.y"
179519 {yylhsminor.yy509.eType = yymsp[-1].major; yylhsminor.yy509.pExpr = 0;}
179520 #line 5671 "parse.sql"
179521 yymsp[-1].minor.yy509 = yylhsminor.yy509;
179522 break;
179523 case 329: /* frame_bound ::= expr PRECEDING|FOLLOWING */
179524 #line 1963 "parse.y"
179525 {yylhsminor.yy509.eType = yymsp[0].major; yylhsminor.yy509.pExpr = yymsp[-1].minor.yy454;}
179526 #line 5677 "parse.sql"
179527 yymsp[-1].minor.yy509 = yylhsminor.yy509;
179528 break;
179529 case 331: /* frame_exclude_opt ::= */
179530 #line 1967 "parse.y"
179531 {yymsp[1].minor.yy462 = 0;}
179532 #line 5683 "parse.sql"
179533 break;
179534 case 332: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
179535 #line 1968 "parse.y"
179536 {yymsp[-1].minor.yy462 = yymsp[0].minor.yy462;}
179537 #line 5688 "parse.sql"
179538 break;
179539 case 333: /* frame_exclude ::= NO OTHERS */
179540 case 334: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==334);
179541 #line 1971 "parse.y"
179542 {yymsp[-1].minor.yy462 = yymsp[-1].major; /*A-overwrites-X*/}
179543 #line 5694 "parse.sql"
179544 break;
179545 case 335: /* frame_exclude ::= GROUP|TIES */
179546 #line 1973 "parse.y"
179547 {yymsp[0].minor.yy462 = yymsp[0].major; /*A-overwrites-X*/}
179548 #line 5699 "parse.sql"
179549 break;
179550 case 336: /* window_clause ::= WINDOW windowdefn_list */
179551 #line 1978 "parse.y"
179552 { yymsp[-1].minor.yy211 = yymsp[0].minor.yy211; }
179553 #line 5704 "parse.sql"
179554 break;
179555 case 337: /* filter_over ::= filter_clause over_clause */
179556 #line 1980 "parse.y"
179557 {
179558 if( yymsp[0].minor.yy211 ){
179559 yymsp[0].minor.yy211->pFilter = yymsp[-1].minor.yy454;
179560 }else{
179561 sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy454);
179562 }
179563 yylhsminor.yy211 = yymsp[0].minor.yy211;
179564 }
179565 #line 5716 "parse.sql"
179566 yymsp[-1].minor.yy211 = yylhsminor.yy211;
179567 break;
179568 case 338: /* filter_over ::= over_clause */
179569 #line 1988 "parse.y"
179570 {
179571 yylhsminor.yy211 = yymsp[0].minor.yy211;
179572 }
179573 #line 5724 "parse.sql"
179574 yymsp[0].minor.yy211 = yylhsminor.yy211;
179575 break;
179576 case 339: /* filter_over ::= filter_clause */
179577 #line 1991 "parse.y"
179578 {
179579 yylhsminor.yy211 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
179580 if( yylhsminor.yy211 ){
179581 yylhsminor.yy211->eFrmType = TK_FILTER;
179582 yylhsminor.yy211->pFilter = yymsp[0].minor.yy454;
179583 }else{
179584 sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy454);
179585 }
179586 }
179587 #line 5738 "parse.sql"
179588 yymsp[0].minor.yy211 = yylhsminor.yy211;
179589 break;
179590 case 340: /* over_clause ::= OVER LP window RP */
179591 #line 2001 "parse.y"
179592 {
179593 yymsp[-3].minor.yy211 = yymsp[-1].minor.yy211;
179594 assert( yymsp[-3].minor.yy211!=0 );
179595 }
179596 #line 5747 "parse.sql"
179597 break;
179598 case 341: /* over_clause ::= OVER nm */
179599 #line 2005 "parse.y"
179600 {
179601 yymsp[-1].minor.yy211 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
179602 if( yymsp[-1].minor.yy211 ){
179603 yymsp[-1].minor.yy211->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
179604 }
179605 }
179606 #line 5757 "parse.sql"
179607 break;
179608 case 342: /* filter_clause ::= FILTER LP WHERE expr RP */
179609 #line 2012 "parse.y"
179610 { yymsp[-4].minor.yy454 = yymsp[-1].minor.yy454; }
179611 #line 5762 "parse.sql"
179612 break;
179613 case 343: /* term ::= QNUMBER */
179614 #line 2038 "parse.y"
179615 {
179616 yylhsminor.yy454=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0);
179617 sqlite3DequoteNumber(pParse, yylhsminor.yy454);
179618 }
179619 #line 5770 "parse.sql"
179620 yymsp[0].minor.yy454 = yylhsminor.yy454;
179621 break;
179622 default:
179623 /* (344) input ::= cmdlist */ yytestcase(yyruleno==344);
179624 /* (345) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==345);
@@ -179742,19 +179059,17 @@
179742 ){
179743 sqlite3ParserARG_FETCH
179744 sqlite3ParserCTX_FETCH
179745 #define TOKEN yyminor
179746 /************ Begin %syntax_error code ****************************************/
179747 #line 43 "parse.y"
179748
179749 UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
179750 if( TOKEN.z[0] ){
179751 sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
179752 }else{
179753 sqlite3ErrorMsg(pParse, "incomplete input");
179754 }
179755 #line 5906 "parse.sql"
179756 /************ End %syntax_error code ******************************************/
179757 sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
179758 sqlite3ParserCTX_STORE
179759 }
179760
@@ -180022,11 +179337,10 @@
180022 #endif
180023 }
180024
180025 /************** End of parse.c ***********************************************/
180026 /************** Begin file tokenize.c ****************************************/
180027 #line 1 "tsrc/tokenize.c"
180028 /*
180029 ** 2001 September 15
180030 **
180031 ** The author disclaims copyright to this source code. In place of
180032 ** a legal notice, here is a blessing:
@@ -180172,11 +179486,10 @@
180172 ** named keywordhash.h and then included into this source file by
180173 ** the #include below.
180174 */
180175 /************** Include keywordhash.h in the middle of tokenize.c ************/
180176 /************** Begin file keywordhash.h *************************************/
180177 #line 1 "tsrc/keywordhash.h"
180178 /***** This file contains automatically generated code ******
180179 **
180180 ** The code in this file has been automatically generated by
180181 **
180182 ** sqlite/tool/mkkeywordhash.c
@@ -180658,11 +179971,10 @@
180658 return TK_ID!=sqlite3KeywordCode((const u8*)zName, nName);
180659 }
180660
180661 /************** End of keywordhash.h *****************************************/
180662 /************** Continuing where we left off in tokenize.c *******************/
180663 #line 149 "tsrc/tokenize.c"
180664
180665
180666 /*
180667 ** If X is a character that can be used in an identifier then
180668 ** IdChar(X) will be true. Otherwise it is false.
@@ -181402,11 +180714,10 @@
181402 }
181403 #endif /* SQLITE_ENABLE_NORMALIZE */
181404
181405 /************** End of tokenize.c ********************************************/
181406 /************** Begin file complete.c ****************************************/
181407 #line 1 "tsrc/complete.c"
181408 /*
181409 ** 2001 September 15
181410 **
181411 ** The author disclaims copyright to this source code. In place of
181412 ** a legal notice, here is a blessing:
@@ -181696,11 +181007,10 @@
181696 #endif /* SQLITE_OMIT_UTF16 */
181697 #endif /* SQLITE_OMIT_COMPLETE */
181698
181699 /************** End of complete.c ********************************************/
181700 /************** Begin file main.c ********************************************/
181701 #line 1 "tsrc/main.c"
181702 /*
181703 ** 2001 September 15
181704 **
181705 ** The author disclaims copyright to this source code. In place of
181706 ** a legal notice, here is a blessing:
@@ -181718,11 +181028,10 @@
181718 /* #include "sqliteInt.h" */
181719
181720 #ifdef SQLITE_ENABLE_FTS3
181721 /************** Include fts3.h in the middle of main.c ***********************/
181722 /************** Begin file fts3.h ********************************************/
181723 #line 1 "tsrc/fts3.h"
181724 /*
181725 ** 2006 Oct 10
181726 **
181727 ** The author disclaims copyright to this source code. In place of
181728 ** a legal notice, here is a blessing:
@@ -181748,16 +181057,14 @@
181748 } /* extern "C" */
181749 #endif /* __cplusplus */
181750
181751 /************** End of fts3.h ************************************************/
181752 /************** Continuing where we left off in main.c ***********************/
181753 #line 21 "tsrc/main.c"
181754 #endif
181755 #ifdef SQLITE_ENABLE_RTREE
181756 /************** Include rtree.h in the middle of main.c **********************/
181757 /************** Begin file rtree.h *******************************************/
181758 #line 1 "tsrc/rtree.h"
181759 /*
181760 ** 2008 May 26
181761 **
181762 ** The author disclaims copyright to this source code. In place of
181763 ** a legal notice, here is a blessing:
@@ -181787,16 +181094,14 @@
181787 } /* extern "C" */
181788 #endif /* __cplusplus */
181789
181790 /************** End of rtree.h ***********************************************/
181791 /************** Continuing where we left off in main.c ***********************/
181792 #line 24 "tsrc/main.c"
181793 #endif
181794 #if defined(SQLITE_ENABLE_ICU) || defined(SQLITE_ENABLE_ICU_COLLATIONS)
181795 /************** Include sqliteicu.h in the middle of main.c ******************/
181796 /************** Begin file sqliteicu.h ***************************************/
181797 #line 1 "tsrc/sqliteicu.h"
181798 /*
181799 ** 2008 May 26
181800 **
181801 ** The author disclaims copyright to this source code. In place of
181802 ** a legal notice, here is a blessing:
@@ -181822,11 +181127,10 @@
181822 } /* extern "C" */
181823 #endif /* __cplusplus */
181824
181825 /************** End of sqliteicu.h *******************************************/
181826 /************** Continuing where we left off in main.c ***********************/
181827 #line 27 "tsrc/main.c"
181828 #endif
181829
181830 /*
181831 ** This is an extension initializer that is a no-op and always
181832 ** succeeds, except that it fails if the fault-simulation is set
@@ -184724,12 +184028,12 @@
184724 }
184725 oldLimit = db->aLimit[limitId];
184726 if( newLimit>=0 ){ /* IMP: R-52476-28732 */
184727 if( newLimit>aHardLimit[limitId] ){
184728 newLimit = aHardLimit[limitId]; /* IMP: R-51463-25634 */
184729 }else if( newLimit<1 && limitId==SQLITE_LIMIT_LENGTH ){
184730 newLimit = 1;
184731 }
184732 db->aLimit[limitId] = newLimit;
184733 }
184734 return oldLimit; /* IMP: R-53341-35419 */
184735 }
@@ -186873,11 +186177,10 @@
186873 }
186874 #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
186875
186876 /************** End of main.c ************************************************/
186877 /************** Begin file notify.c ******************************************/
186878 #line 1 "tsrc/notify.c"
186879 /*
186880 ** 2009 March 3
186881 **
186882 ** The author disclaims copyright to this source code. In place of
186883 ** a legal notice, here is a blessing:
@@ -187212,11 +186515,10 @@
187212 }
187213 #endif
187214
187215 /************** End of notify.c **********************************************/
187216 /************** Begin file fts3.c ********************************************/
187217 #line 1 "tsrc/fts3.c"
187218 /*
187219 ** 2006 Oct 10
187220 **
187221 ** The author disclaims copyright to this source code. In place of
187222 ** a legal notice, here is a blessing:
@@ -187505,11 +186807,10 @@
187505 ** older data.
187506 */
187507
187508 /************** Include fts3Int.h in the middle of fts3.c ********************/
187509 /************** Begin file fts3Int.h *****************************************/
187510 #line 1 "tsrc/fts3Int.h"
187511 /*
187512 ** 2009 Nov 12
187513 **
187514 ** The author disclaims copyright to this source code. In place of
187515 ** a legal notice, here is a blessing:
@@ -187552,11 +186853,10 @@
187552 #endif
187553
187554 /* #include "sqlite3.h" */
187555 /************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/
187556 /************** Begin file fts3_tokenizer.h **********************************/
187557 #line 1 "tsrc/fts3_tokenizer.h"
187558 /*
187559 ** 2006 July 10
187560 **
187561 ** The author disclaims copyright to this source code.
187562 **
@@ -187717,14 +187017,12 @@
187717
187718 #endif /* _FTS3_TOKENIZER_H_ */
187719
187720 /************** End of fts3_tokenizer.h **************************************/
187721 /************** Continuing where we left off in fts3Int.h ********************/
187722 #line 46 "tsrc/fts3Int.h"
187723 /************** Include fts3_hash.h in the middle of fts3Int.h ***************/
187724 /************** Begin file fts3_hash.h ***************************************/
187725 #line 1 "tsrc/fts3_hash.h"
187726 /*
187727 ** 2001 September 22
187728 **
187729 ** The author disclaims copyright to this source code. In place of
187730 ** a legal notice, here is a blessing:
@@ -187836,11 +187134,10 @@
187836
187837 #endif /* _FTS3_HASH_H_ */
187838
187839 /************** End of fts3_hash.h *******************************************/
187840 /************** Continuing where we left off in fts3Int.h ********************/
187841 #line 47 "tsrc/fts3Int.h"
187842
187843 /*
187844 ** This constant determines the maximum depth of an FTS expression tree
187845 ** that the library will create and use. FTS uses recursion to perform
187846 ** various operations on the query tree, so the disadvantage of a large
@@ -188453,11 +187750,10 @@
188453 #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
188454 #endif /* _FTSINT_H */
188455
188456 /************** End of fts3Int.h *********************************************/
188457 /************** Continuing where we left off in fts3.c ***********************/
188458 #line 292 "tsrc/fts3.c"
188459 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
188460
188461 #if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)
188462 # define SQLITE_CORE 1
188463 #endif
@@ -190509,14 +189805,19 @@
190509
190510 assert_fts3_nc( p!=0 && *p1!=0 && *p2!=0 );
190511 if( *p1==POS_COLUMN ){
190512 p1++;
190513 p1 += fts3GetVarint32(p1, &iCol1);
 
 
 
190514 }
190515 if( *p2==POS_COLUMN ){
190516 p2++;
190517 p2 += fts3GetVarint32(p2, &iCol2);
 
 
190518 }
190519
190520 while( 1 ){
190521 if( iCol1==iCol2 ){
190522 char *pSave = p;
@@ -193683,11 +192984,11 @@
193683 for(p=pExpr; p->pLeft; p=p->pLeft){
193684 assert( p->pRight->pPhrase->doclist.nList>0 );
193685 nTmp += p->pRight->pPhrase->doclist.nList;
193686 }
193687 nTmp += p->pPhrase->doclist.nList;
193688 aTmp = sqlite3_malloc64(nTmp*2);
193689 if( !aTmp ){
193690 *pRc = SQLITE_NOMEM;
193691 res = 0;
193692 }else{
193693 char *aPoslist = p->pPhrase->doclist.pList;
@@ -194355,11 +193656,10 @@
194355
194356 #endif
194357
194358 /************** End of fts3.c ************************************************/
194359 /************** Begin file fts3_aux.c ****************************************/
194360 #line 1 "tsrc/fts3_aux.c"
194361 /*
194362 ** 2011 Jan 27
194363 **
194364 ** The author disclaims copyright to this source code. In place of
194365 ** a legal notice, here is a blessing:
@@ -194916,11 +194216,10 @@
194916
194917 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
194918
194919 /************** End of fts3_aux.c ********************************************/
194920 /************** Begin file fts3_expr.c ***************************************/
194921 #line 1 "tsrc/fts3_expr.c"
194922 /*
194923 ** 2008 Nov 28
194924 **
194925 ** The author disclaims copyright to this source code. In place of
194926 ** a legal notice, here is a blessing:
@@ -196213,11 +195512,10 @@
196213 #endif
196214 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
196215
196216 /************** End of fts3_expr.c *******************************************/
196217 /************** Begin file fts3_hash.c ***************************************/
196218 #line 1 "tsrc/fts3_hash.c"
196219 /*
196220 ** 2001 September 22
196221 **
196222 ** The author disclaims copyright to this source code. In place of
196223 ** a legal notice, here is a blessing:
@@ -196600,11 +195898,10 @@
196600
196601 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
196602
196603 /************** End of fts3_hash.c *******************************************/
196604 /************** Begin file fts3_porter.c *************************************/
196605 #line 1 "tsrc/fts3_porter.c"
196606 /*
196607 ** 2006 September 30
196608 **
196609 ** The author disclaims copyright to this source code. In place of
196610 ** a legal notice, here is a blessing:
@@ -197266,11 +196563,10 @@
197266
197267 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
197268
197269 /************** End of fts3_porter.c *****************************************/
197270 /************** Begin file fts3_tokenizer.c **********************************/
197271 #line 1 "tsrc/fts3_tokenizer.c"
197272 /*
197273 ** 2007 June 22
197274 **
197275 ** The author disclaims copyright to this source code. In place of
197276 ** a legal notice, here is a blessing:
@@ -197786,11 +197082,10 @@
197786
197787 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
197788
197789 /************** End of fts3_tokenizer.c **************************************/
197790 /************** Begin file fts3_tokenizer1.c *********************************/
197791 #line 1 "tsrc/fts3_tokenizer1.c"
197792 /*
197793 ** 2006 Oct 10
197794 **
197795 ** The author disclaims copyright to this source code. In place of
197796 ** a legal notice, here is a blessing:
@@ -198024,11 +197319,10 @@
198024
198025 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
198026
198027 /************** End of fts3_tokenizer1.c *************************************/
198028 /************** Begin file fts3_tokenize_vtab.c ******************************/
198029 #line 1 "tsrc/fts3_tokenize_vtab.c"
198030 /*
198031 ** 2013 Apr 22
198032 **
198033 ** The author disclaims copyright to this source code. In place of
198034 ** a legal notice, here is a blessing:
@@ -198487,11 +197781,10 @@
198487
198488 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
198489
198490 /************** End of fts3_tokenize_vtab.c **********************************/
198491 /************** Begin file fts3_write.c **************************************/
198492 #line 1 "tsrc/fts3_write.c"
198493 /*
198494 ** 2009 Oct 23
198495 **
198496 ** The author disclaims copyright to this source code. In place of
198497 ** a legal notice, here is a blessing:
@@ -204325,11 +203618,10 @@
204325
204326 #endif
204327
204328 /************** End of fts3_write.c ******************************************/
204329 /************** Begin file fts3_snippet.c ************************************/
204330 #line 1 "tsrc/fts3_snippet.c"
204331 /*
204332 ** 2009 Oct 23
204333 **
204334 ** The author disclaims copyright to this source code. In place of
204335 ** a legal notice, here is a blessing:
@@ -206085,11 +205377,10 @@
206085
206086 #endif
206087
206088 /************** End of fts3_snippet.c ****************************************/
206089 /************** Begin file fts3_unicode.c ************************************/
206090 #line 1 "tsrc/fts3_unicode.c"
206091 /*
206092 ** 2012 May 24
206093 **
206094 ** The author disclaims copyright to this source code. In place of
206095 ** a legal notice, here is a blessing:
@@ -206486,11 +205777,10 @@
206486 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
206487 #endif /* ifndef SQLITE_DISABLE_FTS3_UNICODE */
206488
206489 /************** End of fts3_unicode.c ****************************************/
206490 /************** Begin file fts3_unicode2.c ***********************************/
206491 #line 1 "tsrc/fts3_unicode2.c"
206492 /*
206493 ** 2012-05-25
206494 **
206495 ** The author disclaims copyright to this source code. In place of
206496 ** a legal notice, here is a blessing:
@@ -206873,11 +206163,10 @@
206873 #endif /* defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4) */
206874 #endif /* !defined(SQLITE_DISABLE_FTS3_UNICODE) */
206875
206876 /************** End of fts3_unicode2.c ***************************************/
206877 /************** Begin file json.c ********************************************/
206878 #line 1 "tsrc/json.c"
206879 /*
206880 ** 2015-08-12
206881 **
206882 ** The author disclaims copyright to this source code. In place of
206883 ** a legal notice, here is a blessing:
@@ -212343,11 +211632,10 @@
212343 }
212344 #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) && !defined(SQLITE_OMIT_JSON) */
212345
212346 /************** End of json.c ************************************************/
212347 /************** Begin file rtree.c *******************************************/
212348 #line 1 "tsrc/rtree.c"
212349 /*
212350 ** 2001 September 15
212351 **
212352 ** The author disclaims copyright to this source code. In place of
212353 ** a legal notice, here is a blessing:
@@ -216632,11 +215920,10 @@
216632
216633 /* Conditionally include the geopoly code */
216634 #ifdef SQLITE_ENABLE_GEOPOLY
216635 /************** Include geopoly.c in the middle of rtree.c *******************/
216636 /************** Begin file geopoly.c *****************************************/
216637 #line 1 "tsrc/geopoly.c"
216638 /*
216639 ** 2018-05-25
216640 **
216641 ** The author disclaims copyright to this source code. In place of
216642 ** a legal notice, here is a blessing:
@@ -218475,11 +217762,10 @@
218475 return rc;
218476 }
218477
218478 /************** End of geopoly.c *********************************************/
218479 /************** Continuing where we left off in rtree.c **********************/
218480 #line 4288 "tsrc/rtree.c"
218481 #endif
218482
218483 /*
218484 ** Register the r-tree module with database handle db. This creates the
218485 ** virtual table module "rtree" and the debugging/analysis scalar
@@ -218658,11 +217944,10 @@
218658
218659 #endif
218660
218661 /************** End of rtree.c ***********************************************/
218662 /************** Begin file icu.c *********************************************/
218663 #line 1 "tsrc/icu.c"
218664 /*
218665 ** 2007 May 6
218666 **
218667 ** The author disclaims copyright to this source code. In place of
218668 ** a legal notice, here is a blessing:
@@ -219250,11 +218535,10 @@
219250
219251 #endif
219252
219253 /************** End of icu.c *************************************************/
219254 /************** Begin file fts3_icu.c ****************************************/
219255 #line 1 "tsrc/fts3_icu.c"
219256 /*
219257 ** 2007 June 22
219258 **
219259 ** The author disclaims copyright to this source code. In place of
219260 ** a legal notice, here is a blessing:
@@ -219516,11 +218800,10 @@
219516 #endif /* defined(SQLITE_ENABLE_ICU) */
219517 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
219518
219519 /************** End of fts3_icu.c ********************************************/
219520 /************** Begin file sqlite3rbu.c **************************************/
219521 #line 1 "tsrc/sqlite3rbu.c"
219522 /*
219523 ** 2014 August 30
219524 **
219525 ** The author disclaims copyright to this source code. In place of
219526 ** a legal notice, here is a blessing:
@@ -219608,11 +218891,10 @@
219608 /* #include "sqlite3.h" */
219609
219610 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU)
219611 /************** Include sqlite3rbu.h in the middle of sqlite3rbu.c ***********/
219612 /************** Begin file sqlite3rbu.h **************************************/
219613 #line 1 "tsrc/sqlite3rbu.h"
219614 /*
219615 ** 2014 August 30
219616 **
219617 ** The author disclaims copyright to this source code. In place of
219618 ** a legal notice, here is a blessing:
@@ -220245,11 +219527,10 @@
220245
220246 #endif /* _SQLITE3RBU_H */
220247
220248 /************** End of sqlite3rbu.h ******************************************/
220249 /************** Continuing where we left off in sqlite3rbu.c *****************/
220250 #line 91 "tsrc/sqlite3rbu.c"
220251
220252 #if defined(_WIN32_WCE)
220253 /* #include "windows.h" */
220254 #endif
220255
@@ -225606,11 +224887,10 @@
225606
225607 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU) */
225608
225609 /************** End of sqlite3rbu.c ******************************************/
225610 /************** Begin file dbstat.c ******************************************/
225611 #line 1 "tsrc/dbstat.c"
225612 /*
225613 ** 2010 July 12
225614 **
225615 ** The author disclaims copyright to this source code. In place of
225616 ** a legal notice, here is a blessing:
@@ -226516,11 +225796,10 @@
226516 SQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3 *db){ return SQLITE_OK; }
226517 #endif /* SQLITE_ENABLE_DBSTAT_VTAB */
226518
226519 /************** End of dbstat.c **********************************************/
226520 /************** Begin file dbpage.c ******************************************/
226521 #line 1 "tsrc/dbpage.c"
226522 /*
226523 ** 2017-10-11
226524 **
226525 ** The author disclaims copyright to this source code. In place of
226526 ** a legal notice, here is a blessing:
@@ -226999,11 +226278,10 @@
226999 SQLITE_PRIVATE int sqlite3DbpageRegister(sqlite3 *db){ return SQLITE_OK; }
227000 #endif /* SQLITE_ENABLE_DBSTAT_VTAB */
227001
227002 /************** End of dbpage.c **********************************************/
227003 /************** Begin file sqlite3session.c **********************************/
227004 #line 1 "tsrc/sqlite3session.c"
227005
227006 #if defined(SQLITE_ENABLE_SESSION) && defined(SQLITE_ENABLE_PREUPDATE_HOOK)
227007 /* #include "sqlite3session.h" */
227008 /* #include <assert.h> */
227009 /* #include <string.h> */
@@ -233539,11 +232817,10 @@
233539
233540 #endif /* SQLITE_ENABLE_SESSION && SQLITE_ENABLE_PREUPDATE_HOOK */
233541
233542 /************** End of sqlite3session.c **************************************/
233543 /************** Begin file fts5.c ********************************************/
233544 #line 1 "tsrc/fts5.c"
233545
233546 /*
233547 ** This, the "fts5.c" source file, is a composite file that is itself
233548 ** assembled from the following files:
233549 **
@@ -233577,11 +232854,10 @@
233577 /* #include <stdint.h> */
233578 #endif
233579 #ifdef HAVE_INTTYPES_H
233580 /* #include <inttypes.h> */
233581 #endif
233582 #line 1 "fts5.h"
233583 /*
233584 ** 2014 May 31
233585 **
233586 ** The author disclaims copyright to this source code. In place of
233587 ** a legal notice, here is a blessing:
@@ -234318,11 +233594,10 @@
234318 } /* end of the 'extern "C"' block */
234319 #endif
234320
234321 #endif /* _FTS5_H */
234322
234323 #line 1 "fts5Int.h"
234324 /*
234325 ** 2014 May 31
234326 **
234327 ** The author disclaims copyright to this source code. In place of
234328 ** a legal notice, here is a blessing:
@@ -235258,11 +234533,10 @@
235258 ** End of interface to code in fts5_unicode2.c.
235259 **************************************************************************/
235260
235261 #endif
235262
235263 #line 1 "fts5parse.h"
235264 #define FTS5_OR 1
235265 #define FTS5_AND 2
235266 #define FTS5_NOT 3
235267 #define FTS5_TERM 4
235268 #define FTS5_COLON 5
@@ -235275,11 +234549,10 @@
235275 #define FTS5_CARET 12
235276 #define FTS5_COMMA 13
235277 #define FTS5_PLUS 14
235278 #define FTS5_STAR 15
235279
235280 #line 1 "fts5parse.c"
235281 /* This file is automatically generated by Lemon from input grammar
235282 ** source file "fts5parse.y".
235283 */
235284 /*
235285 ** 2000-05-29
@@ -235304,11 +234577,10 @@
235304 **
235305 ** The following is the concatenation of all %include directives from the
235306 ** input grammar file:
235307 */
235308 /************ Begin %include sections from the grammar ************************/
235309 #line 47 "fts5parse.y"
235310
235311 /* #include "fts5Int.h" */
235312 /* #include "fts5parse.h" */
235313
235314 /*
@@ -235332,11 +234604,10 @@
235332 ** Alternative datatype for the argument to the malloc() routine passed
235333 ** into sqlite3ParserAlloc(). The default is size_t.
235334 */
235335 #define fts5YYMALLOCARGTYPE u64
235336
235337 #line 58 "fts5parse.sql"
235338 /**************** End of %include directives **********************************/
235339 /* These constants specify the various numeric values for terminal symbols.
235340 ***************** Begin token definitions *************************************/
235341 #ifndef FTS5_OR
235342 #define FTS5_OR 1
@@ -235879,45 +235150,35 @@
235879 ** inside the C code.
235880 */
235881 /********* Begin destructor definitions ***************************************/
235882 case 16: /* input */
235883 {
235884 #line 83 "fts5parse.y"
235885 (void)pParse;
235886 #line 606 "fts5parse.sql"
235887 }
235888 break;
235889 case 17: /* expr */
235890 case 18: /* cnearset */
235891 case 19: /* exprlist */
235892 {
235893 #line 89 "fts5parse.y"
235894 sqlite3Fts5ParseNodeFree((fts5yypminor->fts5yy24));
235895 #line 615 "fts5parse.sql"
235896 }
235897 break;
235898 case 20: /* colset */
235899 case 21: /* colsetlist */
235900 {
235901 #line 93 "fts5parse.y"
235902 sqlite3_free((fts5yypminor->fts5yy11));
235903 #line 623 "fts5parse.sql"
235904 }
235905 break;
235906 case 22: /* nearset */
235907 case 23: /* nearphrases */
235908 {
235909 #line 148 "fts5parse.y"
235910 sqlite3Fts5ParseNearsetFree((fts5yypminor->fts5yy46));
235911 #line 631 "fts5parse.sql"
235912 }
235913 break;
235914 case 24: /* phrase */
235915 {
235916 #line 183 "fts5parse.y"
235917 sqlite3Fts5ParsePhraseFree((fts5yypminor->fts5yy53));
235918 #line 638 "fts5parse.sql"
235919 }
235920 break;
235921 /********* End destructor definitions *****************************************/
235922 default: break; /* If no destructor action specified: do nothing */
235923 }
@@ -236148,14 +235409,12 @@
236148 #endif
236149 while( fts5yypParser->fts5yytos>fts5yypParser->fts5yystack ) fts5yy_pop_parser_stack(fts5yypParser);
236150 /* Here code is inserted which will execute if the parser
236151 ** stack every overflows */
236152 /******** Begin %stack_overflow code ******************************************/
236153 #line 36 "fts5parse.y"
236154
236155 sqlite3Fts5ParseError(pParse, "fts5: parser stack overflow");
236156 #line 876 "fts5parse.sql"
236157 /******** End %stack_overflow code ********************************************/
236158 sqlite3Fts5ParserARG_STORE /* Suppress warning about unused %extra_argument var */
236159 sqlite3Fts5ParserCTX_STORE
236160 }
236161
@@ -236320,202 +235579,148 @@
236320 ** break;
236321 */
236322 /********** Begin reduce actions **********************************************/
236323 fts5YYMINORTYPE fts5yylhsminor;
236324 case 0: /* input ::= expr */
236325 #line 82 "fts5parse.y"
236326 { sqlite3Fts5ParseFinished(pParse, fts5yymsp[0].minor.fts5yy24); }
236327 #line 1047 "fts5parse.sql"
236328 break;
236329 case 1: /* colset ::= MINUS LCP colsetlist RCP */
236330 #line 97 "fts5parse.y"
236331 {
236332 fts5yymsp[-3].minor.fts5yy11 = sqlite3Fts5ParseColsetInvert(pParse, fts5yymsp[-1].minor.fts5yy11);
236333 }
236334 #line 1054 "fts5parse.sql"
236335 break;
236336 case 2: /* colset ::= LCP colsetlist RCP */
236337 #line 100 "fts5parse.y"
236338 { fts5yymsp[-2].minor.fts5yy11 = fts5yymsp[-1].minor.fts5yy11; }
236339 #line 1059 "fts5parse.sql"
236340 break;
236341 case 3: /* colset ::= STRING */
236342 #line 101 "fts5parse.y"
236343 {
236344 fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
236345 }
236346 #line 1066 "fts5parse.sql"
236347 fts5yymsp[0].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
236348 break;
236349 case 4: /* colset ::= MINUS STRING */
236350 #line 104 "fts5parse.y"
236351 {
236352 fts5yymsp[-1].minor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
236353 fts5yymsp[-1].minor.fts5yy11 = sqlite3Fts5ParseColsetInvert(pParse, fts5yymsp[-1].minor.fts5yy11);
236354 }
236355 #line 1075 "fts5parse.sql"
236356 break;
236357 case 5: /* colsetlist ::= colsetlist STRING */
236358 #line 109 "fts5parse.y"
236359 {
236360 fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, fts5yymsp[-1].minor.fts5yy11, &fts5yymsp[0].minor.fts5yy0); }
236361 #line 1081 "fts5parse.sql"
236362 fts5yymsp[-1].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
236363 break;
236364 case 6: /* colsetlist ::= STRING */
236365 #line 111 "fts5parse.y"
236366 {
236367 fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
236368 }
236369 #line 1089 "fts5parse.sql"
236370 fts5yymsp[0].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
236371 break;
236372 case 7: /* expr ::= expr AND expr */
236373 #line 115 "fts5parse.y"
236374 {
236375 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_AND, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
236376 }
236377 #line 1097 "fts5parse.sql"
236378 fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236379 break;
236380 case 8: /* expr ::= expr OR expr */
236381 #line 118 "fts5parse.y"
236382 {
236383 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_OR, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
236384 }
236385 #line 1105 "fts5parse.sql"
236386 fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236387 break;
236388 case 9: /* expr ::= expr NOT expr */
236389 #line 121 "fts5parse.y"
236390 {
236391 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_NOT, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
236392 }
236393 #line 1113 "fts5parse.sql"
236394 fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236395 break;
236396 case 10: /* expr ::= colset COLON LP expr RP */
236397 #line 125 "fts5parse.y"
236398 {
236399 sqlite3Fts5ParseSetColset(pParse, fts5yymsp[-1].minor.fts5yy24, fts5yymsp[-4].minor.fts5yy11);
236400 fts5yylhsminor.fts5yy24 = fts5yymsp[-1].minor.fts5yy24;
236401 }
236402 #line 1122 "fts5parse.sql"
236403 fts5yymsp[-4].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236404 break;
236405 case 11: /* expr ::= LP expr RP */
236406 #line 129 "fts5parse.y"
236407 {fts5yymsp[-2].minor.fts5yy24 = fts5yymsp[-1].minor.fts5yy24;}
236408 #line 1128 "fts5parse.sql"
236409 break;
236410 case 12: /* expr ::= exprlist */
236411 case 13: /* exprlist ::= cnearset */ fts5yytestcase(fts5yyruleno==13);
236412 #line 130 "fts5parse.y"
236413 {fts5yylhsminor.fts5yy24 = fts5yymsp[0].minor.fts5yy24;}
236414 #line 1134 "fts5parse.sql"
236415 fts5yymsp[0].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236416 break;
236417 case 14: /* exprlist ::= exprlist cnearset */
236418 #line 133 "fts5parse.y"
236419 {
236420 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseImplicitAnd(pParse, fts5yymsp[-1].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24);
236421 }
236422 #line 1142 "fts5parse.sql"
236423 fts5yymsp[-1].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236424 break;
236425 case 15: /* cnearset ::= nearset */
236426 #line 137 "fts5parse.y"
236427 {
236428 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy46);
236429 }
236430 #line 1150 "fts5parse.sql"
236431 fts5yymsp[0].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236432 break;
236433 case 16: /* cnearset ::= colset COLON nearset */
236434 #line 140 "fts5parse.y"
236435 {
236436 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy46);
236437 sqlite3Fts5ParseSetColset(pParse, fts5yylhsminor.fts5yy24, fts5yymsp[-2].minor.fts5yy11);
236438 }
236439 #line 1159 "fts5parse.sql"
236440 fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
236441 break;
236442 case 17: /* nearset ::= phrase */
236443 #line 151 "fts5parse.y"
236444 { fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53); }
236445 #line 1165 "fts5parse.sql"
236446 fts5yymsp[0].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
236447 break;
236448 case 18: /* nearset ::= CARET phrase */
236449 #line 152 "fts5parse.y"
236450 {
236451 sqlite3Fts5ParseSetCaret(fts5yymsp[0].minor.fts5yy53);
236452 fts5yymsp[-1].minor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53);
236453 }
236454 #line 1174 "fts5parse.sql"
236455 break;
236456 case 19: /* nearset ::= STRING LP nearphrases neardist_opt RP */
236457 #line 156 "fts5parse.y"
236458 {
236459 sqlite3Fts5ParseNear(pParse, &fts5yymsp[-4].minor.fts5yy0);
236460 sqlite3Fts5ParseSetDistance(pParse, fts5yymsp[-2].minor.fts5yy46, &fts5yymsp[-1].minor.fts5yy0);
236461 fts5yylhsminor.fts5yy46 = fts5yymsp[-2].minor.fts5yy46;
236462 }
236463 #line 1183 "fts5parse.sql"
236464 fts5yymsp[-4].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
236465 break;
236466 case 20: /* nearphrases ::= phrase */
236467 #line 162 "fts5parse.y"
236468 {
236469 fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53);
236470 }
236471 #line 1191 "fts5parse.sql"
236472 fts5yymsp[0].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
236473 break;
236474 case 21: /* nearphrases ::= nearphrases phrase */
236475 #line 165 "fts5parse.y"
236476 {
236477 fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, fts5yymsp[-1].minor.fts5yy46, fts5yymsp[0].minor.fts5yy53);
236478 }
236479 #line 1199 "fts5parse.sql"
236480 fts5yymsp[-1].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
236481 break;
236482 case 22: /* neardist_opt ::= */
236483 #line 172 "fts5parse.y"
236484 { fts5yymsp[1].minor.fts5yy0.p = 0; fts5yymsp[1].minor.fts5yy0.n = 0; }
236485 #line 1205 "fts5parse.sql"
236486 break;
236487 case 23: /* neardist_opt ::= COMMA STRING */
236488 #line 173 "fts5parse.y"
236489 { fts5yymsp[-1].minor.fts5yy0 = fts5yymsp[0].minor.fts5yy0; }
236490 #line 1210 "fts5parse.sql"
236491 break;
236492 case 24: /* phrase ::= phrase PLUS STRING star_opt */
236493 #line 185 "fts5parse.y"
236494 {
236495 fts5yylhsminor.fts5yy53 = sqlite3Fts5ParseTerm(pParse, fts5yymsp[-3].minor.fts5yy53, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy4);
236496 }
236497 #line 1217 "fts5parse.sql"
236498 fts5yymsp[-3].minor.fts5yy53 = fts5yylhsminor.fts5yy53;
236499 break;
236500 case 25: /* phrase ::= STRING star_opt */
236501 #line 188 "fts5parse.y"
236502 {
236503 fts5yylhsminor.fts5yy53 = sqlite3Fts5ParseTerm(pParse, 0, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy4);
236504 }
236505 #line 1225 "fts5parse.sql"
236506 fts5yymsp[-1].minor.fts5yy53 = fts5yylhsminor.fts5yy53;
236507 break;
236508 case 26: /* star_opt ::= STAR */
236509 #line 196 "fts5parse.y"
236510 { fts5yymsp[0].minor.fts5yy4 = 1; }
236511 #line 1231 "fts5parse.sql"
236512 break;
236513 case 27: /* star_opt ::= */
236514 #line 197 "fts5parse.y"
236515 { fts5yymsp[1].minor.fts5yy4 = 0; }
236516 #line 1236 "fts5parse.sql"
236517 break;
236518 default:
236519 break;
236520 /********** End reduce actions ************************************************/
236521 };
@@ -236573,17 +235778,15 @@
236573 ){
236574 sqlite3Fts5ParserARG_FETCH
236575 sqlite3Fts5ParserCTX_FETCH
236576 #define FTS5TOKEN fts5yyminor
236577 /************ Begin %syntax_error code ****************************************/
236578 #line 30 "fts5parse.y"
236579
236580 UNUSED_PARAM(fts5yymajor); /* Silence a compiler warning */
236581 sqlite3Fts5ParseError(
236582 pParse, "fts5: syntax error near \"%.*s\"",FTS5TOKEN.n,FTS5TOKEN.p
236583 );
236584 #line 1304 "fts5parse.sql"
236585 /************ End %syntax_error code ******************************************/
236586 sqlite3Fts5ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
236587 sqlite3Fts5ParserCTX_STORE
236588 }
236589
@@ -236849,11 +236052,10 @@
236849 (void)iToken;
236850 return 0;
236851 #endif
236852 }
236853
236854 #line 1 "fts5_aux.c"
236855 /*
236856 ** 2014 May 31
236857 **
236858 ** The author disclaims copyright to this source code. In place of
236859 ** a legal notice, here is a blessing:
@@ -237672,11 +236874,10 @@
237672 }
237673
237674 return rc;
237675 }
237676
237677 #line 1 "fts5_buffer.c"
237678 /*
237679 ** 2014 May 31
237680 **
237681 ** The author disclaims copyright to this source code. In place of
237682 ** a legal notice, here is a blessing:
@@ -238085,11 +237286,10 @@
238085 }
238086 sqlite3_free(p);
238087 }
238088 }
238089
238090 #line 1 "fts5_config.c"
238091 /*
238092 ** 2014 Jun 09
238093 **
238094 ** The author disclaims copyright to this source code. In place of
238095 ** a legal notice, here is a blessing:
@@ -239201,11 +238401,10 @@
239201 va_end(ap);
239202 }
239203
239204
239205
239206 #line 1 "fts5_expr.c"
239207 /*
239208 ** 2014 May 31
239209 **
239210 ** The author disclaims copyright to this source code. In place of
239211 ** a legal notice, here is a blessing:
@@ -242470,11 +241669,10 @@
242470 sqlite3Fts5IndexIterClearTokendata(pT->pIter);
242471 }
242472 }
242473 }
242474
242475 #line 1 "fts5_hash.c"
242476 /*
242477 ** 2014 August 11
242478 **
242479 ** The author disclaims copyright to this source code. In place of
242480 ** a legal notice, here is a blessing:
@@ -243062,11 +242260,10 @@
243062 *ppDoclist = 0;
243063 *pnDoclist = 0;
243064 }
243065 }
243066
243067 #line 1 "fts5_index.c"
243068 /*
243069 ** 2014 May 31
243070 **
243071 ** The author disclaims copyright to this source code. In place of
243072 ** a legal notice, here is a blessing:
@@ -252140,11 +251337,10 @@
252140 fts5StructureInvalidate(p);
252141 }
252142 return fts5IndexReturn(p);
252143 }
252144
252145 #line 1 "fts5_main.c"
252146 /*
252147 ** 2014 Jun 09
252148 **
252149 ** The author disclaims copyright to this source code. In place of
252150 ** a legal notice, here is a blessing:
@@ -252775,10 +251971,11 @@
252775 ){
252776 /* A MATCH operator or equivalent */
252777 if( p->usable==0 || iCol<0 ){
252778 /* As there exists an unusable MATCH constraint this is an
252779 ** unusable plan. Return SQLITE_CONSTRAINT. */
 
252780 return SQLITE_CONSTRAINT;
252781 }else{
252782 if( iCol==nCol+1 ){
252783 if( bSeenRank ) continue;
252784 idxStr[iIdxStr++] = 'r';
@@ -255730,11 +254927,11 @@
255730 int nArg, /* Number of args */
255731 sqlite3_value **apUnused /* Function arguments */
255732 ){
255733 assert( nArg==0 );
255734 UNUSED_PARAM2(nArg, apUnused);
255735 sqlite3_result_text(pCtx, "fts5: 2024-11-06 12:58:31 5495b12569c318d5020b4b5a625a392ef8e777b81c0200624fbbc2a6b5eddef9", -1, SQLITE_TRANSIENT);
255736 }
255737
255738 /*
255739 ** Implementation of fts5_locale(LOCALE, TEXT) function.
255740 **
@@ -255983,11 +255180,10 @@
255983 SQLITE_PRIVATE int sqlite3Fts5Init(sqlite3 *db){
255984 return fts5Init(db);
255985 }
255986 #endif
255987
255988 #line 1 "fts5_storage.c"
255989 /*
255990 ** 2014 May 31
255991 **
255992 ** The author disclaims copyright to this source code. In place of
255993 ** a legal notice, here is a blessing:
@@ -257497,11 +256693,10 @@
257497 }
257498 }
257499 return rc;
257500 }
257501
257502 #line 1 "fts5_tokenize.c"
257503 /*
257504 ** 2014 May 31
257505 **
257506 ** The author disclaims copyright to this source code. In place of
257507 ** a legal notice, here is a blessing:
@@ -258854,21 +258049,21 @@
258854 char aBuf[32];
258855 char *zOut = aBuf;
258856 int ii;
258857 const unsigned char *zIn = (const unsigned char*)pText;
258858 const unsigned char *zEof = &zIn[nText];
258859 u32 iCode;
258860 int aStart[3]; /* Input offset of each character in aBuf[] */
258861
258862 UNUSED_PARAM(unusedFlags);
258863
258864 /* Populate aBuf[] with the characters for the first trigram. */
258865 for(ii=0; ii<3; ii++){
258866 do {
258867 aStart[ii] = zIn - (const unsigned char*)pText;
 
258868 READ_UTF8(zIn, zEof, iCode);
258869 if( iCode==0 ) return SQLITE_OK;
258870 if( p->bFold ) iCode = sqlite3Fts5UnicodeFold(iCode, p->iFoldParam);
258871 }while( iCode==0 );
258872 WRITE_UTF8(zOut, iCode);
258873 }
258874
@@ -258885,12 +258080,15 @@
258885 const char *z1;
258886
258887 /* Read characters from the input up until the first non-diacritic */
258888 do {
258889 iNext = zIn - (const unsigned char*)pText;
 
 
 
 
258890 READ_UTF8(zIn, zEof, iCode);
258891 if( iCode==0 ) break;
258892 if( p->bFold ) iCode = sqlite3Fts5UnicodeFold(iCode, p->iFoldParam);
258893 }while( iCode==0 );
258894
258895 /* Pass the current trigram back to fts5 */
258896 rc = xToken(pCtx, 0, aBuf, zOut-aBuf, aStart[0], iNext);
@@ -258986,11 +258184,10 @@
258986 );
258987 }
258988 return rc;
258989 }
258990
258991 #line 1 "fts5_unicode2.c"
258992 /*
258993 ** 2012-05-25
258994 **
258995 ** The author disclaims copyright to this source code. In place of
258996 ** a legal notice, here is a blessing:
@@ -259769,11 +258966,10 @@
259769 }
259770 aAscii[0] = 0; /* 0x00 is never a token character */
259771 }
259772
259773
259774 #line 1 "fts5_varint.c"
259775 /*
259776 ** 2015 May 30
259777 **
259778 ** The author disclaims copyright to this source code. In place of
259779 ** a legal notice, here is a blessing:
@@ -260115,11 +259311,10 @@
260115 if( iVal<(1 << 21) ) return 3;
260116 if( iVal<(1 << 28) ) return 4;
260117 return 5;
260118 }
260119
260120 #line 1 "fts5_vocab.c"
260121 /*
260122 ** 2015 May 08
260123 **
260124 ** The author disclaims copyright to this source code. In place of
260125 ** a legal notice, here is a blessing:
@@ -260931,11 +260126,10 @@
260931 /* Here ends the fts5.c composite file. */
260932 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) */
260933
260934 /************** End of fts5.c ************************************************/
260935 /************** Begin file stmt.c ********************************************/
260936 #line 1 "tsrc/stmt.c"
260937 /*
260938 ** 2017-05-31
260939 **
260940 ** The author disclaims copyright to this source code. In place of
260941 ** a legal notice, here is a blessing:
260942
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
18 ** separate file. This file contains only code for the core SQLite library.
19 **
20 ** The content in this amalgamation comes from Fossil check-in
21 ** 81202d2ab5963fdcf20555b6d0b31cc955ac with changes in files:
22 **
23 **
24 */
25 #ifndef SQLITE_AMALGAMATION
26 #define SQLITE_CORE 1
@@ -27,11 +27,10 @@
27 #define SQLITE_AMALGAMATION 1
28 #ifndef SQLITE_PRIVATE
29 # define SQLITE_PRIVATE static
30 #endif
31 /************** Begin file sqliteInt.h ***************************************/
 
32 /*
33 ** 2001 September 15
34 **
35 ** The author disclaims copyright to this source code. In place of
36 ** a legal notice, here is a blessing:
@@ -88,11 +87,10 @@
87 ** compiler warnings due to subsequent content in this file and other files
88 ** that are included by this file.
89 */
90 /************** Include msvc.h in the middle of sqliteInt.h ******************/
91 /************** Begin file msvc.h ********************************************/
 
92 /*
93 ** 2015 January 12
94 **
95 ** The author disclaims copyright to this source code. In place of
96 ** a legal notice, here is a blessing:
@@ -137,18 +135,16 @@
135
136 #endif /* SQLITE_MSVC_H */
137
138 /************** End of msvc.h ************************************************/
139 /************** Continuing where we left off in sqliteInt.h ******************/
 
140
141 /*
142 ** Special setup for VxWorks
143 */
144 /************** Include vxworks.h in the middle of sqliteInt.h ***************/
145 /************** Begin file vxworks.h *****************************************/
 
146 /*
147 ** 2015-03-02
148 **
149 ** The author disclaims copyright to this source code. In place of
150 ** a legal notice, here is a blessing:
@@ -180,11 +176,10 @@
176 #define HAVE_LSTAT 1
177 #endif /* defined(_WRS_KERNEL) */
178
179 /************** End of vxworks.h *********************************************/
180 /************** Continuing where we left off in sqliteInt.h ******************/
 
181
182 /*
183 ** These #defines should enable >2GB file support on POSIX if the
184 ** underlying operating system supports it. If the OS lacks
185 ** large file support, or if the OS is windows, these should be no-ops.
@@ -320,11 +315,10 @@
315 ** first in QNX. Also, the _USE_32BIT_TIME_T macro must appear first for
316 ** MinGW.
317 */
318 /************** Include sqlite3.h in the middle of sqliteInt.h ***************/
319 /************** Begin file sqlite3.h *****************************************/
 
320 /*
321 ** 2001-09-15
322 **
323 ** The author disclaims copyright to this source code. In place of
324 ** a legal notice, here is a blessing:
@@ -471,11 +465,11 @@
465 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
466 ** [sqlite_version()] and [sqlite_source_id()].
467 */
468 #define SQLITE_VERSION "3.48.0"
469 #define SQLITE_VERSION_NUMBER 3048000
470 #define SQLITE_SOURCE_ID "2024-11-14 19:34:28 81202d2ab5963fdcf20555b6d0b31cc955ac27f1cd87656faea5c0611c9a2ee8"
471
472 /*
473 ** CAPI3REF: Run-Time Library Version Numbers
474 ** KEYWORDS: sqlite3_version sqlite3_sourceid
475 **
@@ -1423,10 +1417,15 @@
1417 ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
1418 ** opcode causes the xFileControl method to swap the file handle with the one
1419 ** pointed to by the pArg argument. This capability is used during testing
1420 ** and only needs to be supported when SQLITE_TEST is defined.
1421 **
1422 ** <li>[[SQLITE_FCNTL_NULL_IO]]
1423 ** The [SQLITE_FCNTL_NULL_IO] opcode sets the low-level file descriptor
1424 ** or file handle for the [sqlite3_file] object such that it will no longer
1425 ** read or write to the database file.
1426 **
1427 ** <li>[[SQLITE_FCNTL_WAL_BLOCK]]
1428 ** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might
1429 ** be advantageous to block on the next WAL lock if the lock is not immediately
1430 ** available. The WAL subsystem issues this signal during rare
1431 ** circumstances in order to fix a problem with priority inversion.
@@ -1576,10 +1575,11 @@
1575 #define SQLITE_FCNTL_RESERVE_BYTES 38
1576 #define SQLITE_FCNTL_CKPT_START 39
1577 #define SQLITE_FCNTL_EXTERNAL_READER 40
1578 #define SQLITE_FCNTL_CKSM_FILE 41
1579 #define SQLITE_FCNTL_RESET_CACHE 42
1580 #define SQLITE_FCNTL_NULL_IO 43
1581
1582 /* deprecated names */
1583 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1584 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1585 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -2954,14 +2954,18 @@
2954 **
2955 ** ^These functions return the number of rows modified, inserted or
2956 ** deleted by the most recently completed INSERT, UPDATE or DELETE
2957 ** statement on the database connection specified by the only parameter.
2958 ** The two functions are identical except for the type of the return value
2959 ** and that if the number of rows modified by the most recent INSERT, UPDATE,
2960 ** or DELETE is greater than the maximum value supported by type "int", then
2961 ** the return value of sqlite3_changes() is undefined. ^Executing any other
2962 ** type of SQL statement does not modify the value returned by these functions.
2963 ** For the purposes of this interface, a CREATE TABLE AS SELECT statement
2964 ** does not count as an INSERT, UPDATE or DELETE statement and hence the rows
2965 ** added to the new table by the CREATE TABLE AS SELECT statement are not
2966 ** counted.
2967 **
2968 ** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
2969 ** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
2970 ** [foreign key actions] or [REPLACE] constraint resolution are not counted.
2971 **
@@ -13908,11 +13912,10 @@
13912 /******** End of fts5.h *********/
13913 #endif /* SQLITE3_H */
13914
13915 /************** End of sqlite3.h *********************************************/
13916 /************** Continuing where we left off in sqliteInt.h ******************/
 
13917
13918 /*
13919 ** Reuse the STATIC_LRU for mutex access to sqlite3_temp_directory.
13920 */
13921 #define SQLITE_MUTEX_STATIC_TEMPDIR SQLITE_MUTEX_STATIC_VFS1
@@ -13926,11 +13929,10 @@
13929 #define SQLITECONFIG_H 1
13930 #endif
13931
13932 /************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/
13933 /************** Begin file sqliteLimit.h *************************************/
 
13934 /*
13935 ** 2007 May 7
13936 **
13937 ** The author disclaims copyright to this source code. In place of
13938 ** a legal notice, here is a blessing:
@@ -13952,10 +13954,11 @@
13954 ** to count the size: 2^31-1 or 2147483647.
13955 */
13956 #ifndef SQLITE_MAX_LENGTH
13957 # define SQLITE_MAX_LENGTH 1000000000
13958 #endif
13959 #define SQLITE_MIN_LENGTH 30 /* Minimum value for the length limit */
13960
13961 /*
13962 ** This is the maximum number of
13963 **
13964 ** * Columns in a table
@@ -14140,11 +14143,10 @@
14143 # define SQLITE_MAX_TRIGGER_DEPTH 1000
14144 #endif
14145
14146 /************** End of sqliteLimit.h *****************************************/
14147 /************** Continuing where we left off in sqliteInt.h ******************/
 
14148
14149 /* Disable nuisance warnings on Borland compilers */
14150 #if defined(__BORLANDC__)
14151 #pragma warn -rch /* unreachable code */
14152 #pragma warn -ccc /* Condition is always true or false */
@@ -14558,11 +14560,10 @@
14560 #define likely(X) (X)
14561 #define unlikely(X) (X)
14562
14563 /************** Include hash.h in the middle of sqliteInt.h ******************/
14564 /************** Begin file hash.h ********************************************/
 
14565 /*
14566 ** 2001 September 22
14567 **
14568 ** The author disclaims copyright to this source code. In place of
14569 ** a legal notice, here is a blessing:
@@ -14658,14 +14659,12 @@
14659
14660 #endif /* SQLITE_HASH_H */
14661
14662 /************** End of hash.h ************************************************/
14663 /************** Continuing where we left off in sqliteInt.h ******************/
 
14664 /************** Include parse.h in the middle of sqliteInt.h *****************/
14665 /************** Begin file parse.h *******************************************/
 
14666 #define TK_SEMI 1
14667 #define TK_EXPLAIN 2
14668 #define TK_QUERY 3
14669 #define TK_PLAN 4
14670 #define TK_BEGIN 5
@@ -14850,11 +14849,10 @@
14849 #define TK_SPACE 184
14850 #define TK_ILLEGAL 185
14851
14852 /************** End of parse.h ***********************************************/
14853 /************** Continuing where we left off in sqliteInt.h ******************/
 
14854 #include <stdio.h>
14855 #include <stdlib.h>
14856 #include <string.h>
14857 #include <assert.h>
14858 #include <stddef.h>
@@ -15616,11 +15614,10 @@
15614 ** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
15615 ** pointer types (i.e. FuncDef) defined above.
15616 */
15617 /************** Include os.h in the middle of sqliteInt.h ********************/
15618 /************** Begin file os.h **********************************************/
 
15619 /*
15620 ** 2001 September 16
15621 **
15622 ** The author disclaims copyright to this source code. In place of
15623 ** a legal notice, here is a blessing:
@@ -15645,11 +15642,10 @@
15642 ** Attempt to automatically detect the operating system and setup the
15643 ** necessary pre-processor macros for it.
15644 */
15645 /************** Include os_setup.h in the middle of os.h *********************/
15646 /************** Begin file os_setup.h ****************************************/
 
15647 /*
15648 ** 2013 November 25
15649 **
15650 ** The author disclaims copyright to this source code. In place of
15651 ** a legal notice, here is a blessing:
@@ -15740,11 +15736,10 @@
15736
15737 #endif /* SQLITE_OS_SETUP_H */
15738
15739 /************** End of os_setup.h ********************************************/
15740 /************** Continuing where we left off in os.h *************************/
 
15741
15742 /* If the SET_FULLSYNC macro is not defined above, then make it
15743 ** a no-op
15744 */
15745 #ifndef SET_FULLSYNC
@@ -15942,14 +15937,12 @@
15937
15938 #endif /* _SQLITE_OS_H_ */
15939
15940 /************** End of os.h **************************************************/
15941 /************** Continuing where we left off in sqliteInt.h ******************/
 
15942 /************** Include pager.h in the middle of sqliteInt.h *****************/
15943 /************** Begin file pager.h *******************************************/
 
15944 /*
15945 ** 2001 September 15
15946 **
15947 ** The author disclaims copyright to this source code. In place of
15948 ** a legal notice, here is a blessing:
@@ -16196,14 +16189,12 @@
16189
16190 #endif /* SQLITE_PAGER_H */
16191
16192 /************** End of pager.h ***********************************************/
16193 /************** Continuing where we left off in sqliteInt.h ******************/
 
16194 /************** Include btree.h in the middle of sqliteInt.h *****************/
16195 /************** Begin file btree.h *******************************************/
 
16196 /*
16197 ** 2001 September 15
16198 **
16199 ** The author disclaims copyright to this source code. In place of
16200 ** a legal notice, here is a blessing:
@@ -16627,14 +16618,12 @@
16618
16619 #endif /* SQLITE_BTREE_H */
16620
16621 /************** End of btree.h ***********************************************/
16622 /************** Continuing where we left off in sqliteInt.h ******************/
 
16623 /************** Include vdbe.h in the middle of sqliteInt.h ******************/
16624 /************** Begin file vdbe.h ********************************************/
 
16625 /*
16626 ** 2001 September 15
16627 **
16628 ** The author disclaims copyright to this source code. In place of
16629 ** a legal notice, here is a blessing:
@@ -16814,11 +16803,10 @@
16803 ** The makefile scans the vdbe.c source file and creates the "opcodes.h"
16804 ** header file that defines a number for each opcode used by the VDBE.
16805 */
16806 /************** Include opcodes.h in the middle of vdbe.h ********************/
16807 /************** Begin file opcodes.h *****************************************/
 
16808 /* Automatically generated. Do not edit */
16809 /* See the tool/mkopcodeh.tcl script for details */
16810 #define OP_Savepoint 0
16811 #define OP_AutoCommit 1
16812 #define OP_Transaction 2
@@ -17056,11 +17044,10 @@
17044 */
17045 #define SQLITE_MX_JUMP_OPCODE 64 /* Maximum JUMP opcode */
17046
17047 /************** End of opcodes.h *********************************************/
17048 /************** Continuing where we left off in vdbe.h ***********************/
 
17049
17050 /*
17051 ** Additional non-public SQLITE_PREPARE_* flags
17052 */
17053 #define SQLITE_PREPARE_SAVESQL 0x80 /* Preserve SQL text */
@@ -17306,14 +17293,12 @@
17293
17294 #endif /* SQLITE_VDBE_H */
17295
17296 /************** End of vdbe.h ************************************************/
17297 /************** Continuing where we left off in sqliteInt.h ******************/
 
17298 /************** Include pcache.h in the middle of sqliteInt.h ****************/
17299 /************** Begin file pcache.h ******************************************/
 
17300 /*
17301 ** 2008 August 05
17302 **
17303 ** The author disclaims copyright to this source code. In place of
17304 ** a legal notice, here is a blessing:
@@ -17503,14 +17488,12 @@
17488
17489 #endif /* _PCACHE_H_ */
17490
17491 /************** End of pcache.h **********************************************/
17492 /************** Continuing where we left off in sqliteInt.h ******************/
 
17493 /************** Include mutex.h in the middle of sqliteInt.h *****************/
17494 /************** Begin file mutex.h *******************************************/
 
17495 /*
17496 ** 2007 August 28
17497 **
17498 ** The author disclaims copyright to this source code. In place of
17499 ** a legal notice, here is a blessing:
@@ -17581,11 +17564,10 @@
17564 SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
17565 #endif /* defined(SQLITE_MUTEX_OMIT) */
17566
17567 /************** End of mutex.h ***********************************************/
17568 /************** Continuing where we left off in sqliteInt.h ******************/
 
17569
17570 /* The SQLITE_EXTRA_DURABLE compile-time option used to set the default
17571 ** synchronous setting to EXTRA. It is no longer supported.
17572 */
17573 #ifdef SQLITE_EXTRA_DURABLE
@@ -21982,11 +21964,10 @@
21964
21965 #endif /* SQLITEINT_H */
21966
21967 /************** End of sqliteInt.h *******************************************/
21968 /************** Begin file os_common.h ***************************************/
 
21969 /*
21970 ** 2004 May 22
21971 **
21972 ** The author disclaims copyright to this source code. In place of
21973 ** a legal notice, here is a blessing:
@@ -22085,11 +22066,10 @@
22066
22067 #endif /* !defined(_OS_COMMON_H_) */
22068
22069 /************** End of os_common.h *******************************************/
22070 /************** Begin file ctime.c *******************************************/
 
22071 /* DO NOT EDIT!
22072 ** This file is automatically generated by the script in the canonical
22073 ** SQLite source tree at tool/mkctimec.tcl.
22074 **
22075 ** To modify this header, edit any of the various lists in that script
@@ -22885,11 +22865,10 @@
22865
22866 #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
22867
22868 /************** End of ctime.c ***********************************************/
22869 /************** Begin file global.c ******************************************/
 
22870 /*
22871 ** 2008 June 13
22872 **
22873 ** The author disclaims copyright to this source code. In place of
22874 ** a legal notice, here is a blessing:
@@ -23290,11 +23269,10 @@
23269 "TEXT"
23270 };
23271
23272 /************** End of global.c **********************************************/
23273 /************** Begin file status.c ******************************************/
 
23274 /*
23275 ** 2008 June 18
23276 **
23277 ** The author disclaims copyright to this source code. In place of
23278 ** a legal notice, here is a blessing:
@@ -23309,11 +23287,10 @@
23287 ** functionality.
23288 */
23289 /* #include "sqliteInt.h" */
23290 /************** Include vdbeInt.h in the middle of status.c ******************/
23291 /************** Begin file vdbeInt.h *****************************************/
 
23292 /*
23293 ** 2003 September 6
23294 **
23295 ** The author disclaims copyright to this source code. In place of
23296 ** a legal notice, here is a blessing:
@@ -24046,11 +24023,10 @@
24023
24024 #endif /* !defined(SQLITE_VDBEINT_H) */
24025
24026 /************** End of vdbeInt.h *********************************************/
24027 /************** Continuing where we left off in status.c *********************/
 
24028
24029 /*
24030 ** Variables in which to record status information.
24031 */
24032 #if SQLITE_PTRSIZE>4
@@ -24431,11 +24407,10 @@
24407 return rc;
24408 }
24409
24410 /************** End of status.c **********************************************/
24411 /************** Begin file date.c ********************************************/
 
24412 /*
24413 ** 2003 October 31
24414 **
24415 ** The author disclaims copyright to this source code. In place of
24416 ** a legal notice, here is a blessing:
@@ -26250,11 +26225,10 @@
26225 sqlite3InsertBuiltinFuncs(aDateTimeFuncs, ArraySize(aDateTimeFuncs));
26226 }
26227
26228 /************** End of date.c ************************************************/
26229 /************** Begin file os.c **********************************************/
 
26230 /*
26231 ** 2005 November 29
26232 **
26233 ** The author disclaims copyright to this source code. In place of
26234 ** a legal notice, here is a blessing:
@@ -26701,11 +26675,10 @@
26675 return SQLITE_OK;
26676 }
26677
26678 /************** End of os.c **************************************************/
26679 /************** Begin file fault.c *******************************************/
 
26680 /*
26681 ** 2008 Jan 22
26682 **
26683 ** The author disclaims copyright to this source code. In place of
26684 ** a legal notice, here is a blessing:
@@ -26792,11 +26765,10 @@
26765
26766 #endif /* #ifndef SQLITE_UNTESTABLE */
26767
26768 /************** End of fault.c ***********************************************/
26769 /************** Begin file mem0.c ********************************************/
 
26770 /*
26771 ** 2008 October 28
26772 **
26773 ** The author disclaims copyright to this source code. In place of
26774 ** a legal notice, here is a blessing:
@@ -26855,11 +26827,10 @@
26827
26828 #endif /* SQLITE_ZERO_MALLOC */
26829
26830 /************** End of mem0.c ************************************************/
26831 /************** Begin file mem1.c ********************************************/
 
26832 /*
26833 ** 2007 August 14
26834 **
26835 ** The author disclaims copyright to this source code. In place of
26836 ** a legal notice, here is a blessing:
@@ -27150,11 +27121,10 @@
27121
27122 #endif /* SQLITE_SYSTEM_MALLOC */
27123
27124 /************** End of mem1.c ************************************************/
27125 /************** Begin file mem2.c ********************************************/
 
27126 /*
27127 ** 2007 August 15
27128 **
27129 ** The author disclaims copyright to this source code. In place of
27130 ** a legal notice, here is a blessing:
@@ -27682,11 +27652,10 @@
27652
27653 #endif /* SQLITE_MEMDEBUG */
27654
27655 /************** End of mem2.c ************************************************/
27656 /************** Begin file mem3.c ********************************************/
 
27657 /*
27658 ** 2007 October 14
27659 **
27660 ** The author disclaims copyright to this source code. In place of
27661 ** a legal notice, here is a blessing:
@@ -28373,11 +28342,10 @@
28342
28343 #endif /* SQLITE_ENABLE_MEMSYS3 */
28344
28345 /************** End of mem3.c ************************************************/
28346 /************** Begin file mem5.c ********************************************/
 
28347 /*
28348 ** 2007 October 14
28349 **
28350 ** The author disclaims copyright to this source code. In place of
28351 ** a legal notice, here is a blessing:
@@ -28962,11 +28930,10 @@
28930
28931 #endif /* SQLITE_ENABLE_MEMSYS5 */
28932
28933 /************** End of mem5.c ************************************************/
28934 /************** Begin file mutex.c *******************************************/
 
28935 /*
28936 ** 2007 August 14
28937 **
28938 ** The author disclaims copyright to this source code. In place of
28939 ** a legal notice, here is a blessing:
@@ -29340,11 +29307,10 @@
29307
29308 #endif /* !defined(SQLITE_MUTEX_OMIT) */
29309
29310 /************** End of mutex.c ***********************************************/
29311 /************** Begin file mutex_noop.c **************************************/
 
29312 /*
29313 ** 2008 October 07
29314 **
29315 ** The author disclaims copyright to this source code. In place of
29316 ** a legal notice, here is a blessing:
@@ -29559,11 +29525,10 @@
29525 #endif /* defined(SQLITE_MUTEX_NOOP) */
29526 #endif /* !defined(SQLITE_MUTEX_OMIT) */
29527
29528 /************** End of mutex_noop.c ******************************************/
29529 /************** Begin file mutex_unix.c **************************************/
 
29530 /*
29531 ** 2007 August 28
29532 **
29533 ** The author disclaims copyright to this source code. In place of
29534 ** a legal notice, here is a blessing:
@@ -29957,11 +29922,10 @@
29922
29923 #endif /* SQLITE_MUTEX_PTHREADS */
29924
29925 /************** End of mutex_unix.c ******************************************/
29926 /************** Begin file mutex_w32.c ***************************************/
 
29927 /*
29928 ** 2007 August 14
29929 **
29930 ** The author disclaims copyright to this source code. In place of
29931 ** a legal notice, here is a blessing:
@@ -29984,11 +29948,10 @@
29948 /*
29949 ** Include the header file for the Windows VFS.
29950 */
29951 /************** Include os_win.h in the middle of mutex_w32.c ****************/
29952 /************** Begin file os_win.h ******************************************/
 
29953 /*
29954 ** 2013 November 25
29955 **
29956 ** The author disclaims copyright to this source code. In place of
29957 ** a legal notice, here is a blessing:
@@ -30076,11 +30039,10 @@
30039
30040 #endif /* SQLITE_OS_WIN_H */
30041
30042 /************** End of os_win.h **********************************************/
30043 /************** Continuing where we left off in mutex_w32.c ******************/
 
30044 #endif
30045
30046 /*
30047 ** The code in this file is only used if we are compiling multithreaded
30048 ** on a Win32 system.
@@ -30454,11 +30416,10 @@
30416
30417 #endif /* SQLITE_MUTEX_W32 */
30418
30419 /************** End of mutex_w32.c *******************************************/
30420 /************** Begin file malloc.c ******************************************/
 
30421 /*
30422 ** 2001 September 15
30423 **
30424 ** The author disclaims copyright to this source code. In place of
30425 ** a legal notice, here is a blessing:
@@ -31378,11 +31339,10 @@
31339 return 0;
31340 }
31341
31342 /************** End of malloc.c **********************************************/
31343 /************** Begin file printf.c ******************************************/
 
31344 /*
31345 ** The "printf" code that follows dates from the 1980's. It is in
31346 ** the public domain.
31347 **
31348 **************************************************************************
@@ -32828,11 +32788,10 @@
32788 }
32789 }
32790
32791 /************** End of printf.c **********************************************/
32792 /************** Begin file treeview.c ****************************************/
 
32793 /*
32794 ** 2015-06-08
32795 **
32796 ** The author disclaims copyright to this source code. In place of
32797 ** a legal notice, here is a blessing:
@@ -34160,11 +34119,10 @@
34119
34120 #endif /* SQLITE_DEBUG */
34121
34122 /************** End of treeview.c ********************************************/
34123 /************** Begin file random.c ******************************************/
 
34124 /*
34125 ** 2001 September 15
34126 **
34127 ** The author disclaims copyright to this source code. In place of
34128 ** a legal notice, here is a blessing:
@@ -34321,11 +34279,10 @@
34279 }
34280 #endif /* SQLITE_UNTESTABLE */
34281
34282 /************** End of random.c **********************************************/
34283 /************** Begin file threads.c *****************************************/
 
34284 /*
34285 ** 2012 July 21
34286 **
34287 ** The author disclaims copyright to this source code. In place of
34288 ** a legal notice, here is a blessing:
@@ -34599,11 +34556,10 @@
34556 /****************************** End Single-Threaded *************************/
34557 #endif /* SQLITE_MAX_WORKER_THREADS>0 */
34558
34559 /************** End of threads.c *********************************************/
34560 /************** Begin file utf.c *********************************************/
 
34561 /*
34562 ** 2004 April 13
34563 **
34564 ** The author disclaims copyright to this source code. In place of
34565 ** a legal notice, here is a blessing:
@@ -35171,11 +35127,10 @@
35127 #endif /* SQLITE_TEST */
35128 #endif /* SQLITE_OMIT_UTF16 */
35129
35130 /************** End of utf.c *************************************************/
35131 /************** Begin file util.c ********************************************/
 
35132 /*
35133 ** 2001 September 15
35134 **
35135 ** The author disclaims copyright to this source code. In place of
35136 ** a legal notice, here is a blessing:
@@ -37023,11 +36978,10 @@
36978 return 0;
36979 }
36980
36981 /************** End of util.c ************************************************/
36982 /************** Begin file hash.c ********************************************/
 
36983 /*
36984 ** 2001 September 22
36985 **
36986 ** The author disclaims copyright to this source code. In place of
36987 ** a legal notice, here is a blessing:
@@ -37297,11 +37251,10 @@
37251 return 0;
37252 }
37253
37254 /************** End of hash.c ************************************************/
37255 /************** Begin file opcodes.c *****************************************/
 
37256 /* Automatically generated. Do not edit */
37257 /* See the tool/mkopcodec.tcl script for details. */
37258 #if !defined(SQLITE_OMIT_EXPLAIN) \
37259 || defined(VDBE_PROFILE) \
37260 || defined(SQLITE_DEBUG)
@@ -37507,11 +37460,10 @@
37460 }
37461 #endif
37462
37463 /************** End of opcodes.c *********************************************/
37464 /************** Begin file os_kv.c *******************************************/
 
37465 /*
37466 ** 2022-09-06
37467 **
37468 ** The author disclaims copyright to this source code. In place of
37469 ** a legal notice, here is a blessing:
@@ -38490,11 +38442,10 @@
38442 }
38443 #endif
38444
38445 /************** End of os_kv.c ***********************************************/
38446 /************** Begin file os_unix.c *****************************************/
 
38447 /*
38448 ** 2004 May 22
38449 **
38450 ** The author disclaims copyright to this source code. In place of
38451 ** a legal notice, here is a blessing:
@@ -42480,10 +42431,15 @@
42431 int rc = osIoctl(pFile->h, F2FS_IOC_ABORT_VOLATILE_WRITE);
42432 return rc ? SQLITE_IOERR_ROLLBACK_ATOMIC : SQLITE_OK;
42433 }
42434 #endif /* __linux__ && SQLITE_ENABLE_BATCH_ATOMIC_WRITE */
42435
42436 case SQLITE_FCNTL_NULL_IO: {
42437 osClose(pFile->h);
42438 pFile->h = -1;
42439 return SQLITE_OK;
42440 }
42441 case SQLITE_FCNTL_LOCKSTATE: {
42442 *(int*)pArg = pFile->eFileLock;
42443 return SQLITE_OK;
42444 }
42445 case SQLITE_FCNTL_LAST_ERRNO: {
@@ -46760,11 +46716,10 @@
46716
46717 #endif /* SQLITE_OS_UNIX */
46718
46719 /************** End of os_unix.c *********************************************/
46720 /************** Begin file os_win.c ******************************************/
 
46721 /*
46722 ** 2004 May 22
46723 **
46724 ** The author disclaims copyright to this source code. In place of
46725 ** a legal notice, here is a blessing:
@@ -50362,10 +50317,15 @@
50317 OSTRACE(("FCNTL oldFile=%p, newFile=%p, rc=SQLITE_OK\n",
50318 hOldFile, pFile->h));
50319 return SQLITE_OK;
50320 }
50321 #endif
50322 case SQLITE_FCNTL_NULL_IO: {
50323 (void)osCloseHandle(pFile->h);
50324 pFile->h = NULL;
50325 return SQLITE_OK;
50326 }
50327 case SQLITE_FCNTL_TEMPFILENAME: {
50328 char *zTFile = 0;
50329 int rc = winGetTempname(pFile->pVfs, &zTFile);
50330 if( rc==SQLITE_OK ){
50331 *(char**)pArg = zTFile;
@@ -52975,11 +52935,10 @@
52935
52936 #endif /* SQLITE_OS_WIN */
52937
52938 /************** End of os_win.c **********************************************/
52939 /************** Begin file memdb.c *******************************************/
 
52940 /*
52941 ** 2016-09-07
52942 **
52943 ** The author disclaims copyright to this source code. In place of
52944 ** a legal notice, here is a blessing:
@@ -53915,11 +53874,10 @@
53874 }
53875 #endif /* SQLITE_OMIT_DESERIALIZE */
53876
53877 /************** End of memdb.c ***********************************************/
53878 /************** Begin file bitvec.c ******************************************/
 
53879 /*
53880 ** 2008 February 16
53881 **
53882 ** The author disclaims copyright to this source code. In place of
53883 ** a legal notice, here is a blessing:
@@ -54330,11 +54288,10 @@
54288 }
54289 #endif /* SQLITE_UNTESTABLE */
54290
54291 /************** End of bitvec.c **********************************************/
54292 /************** Begin file pcache.c ******************************************/
 
54293 /*
54294 ** 2008 August 05
54295 **
54296 ** The author disclaims copyright to this source code. In place of
54297 ** a legal notice, here is a blessing:
@@ -55270,11 +55227,10 @@
55227 }
55228 #endif
55229
55230 /************** End of pcache.c **********************************************/
55231 /************** Begin file pcache1.c *****************************************/
 
55232 /*
55233 ** 2008 November 05
55234 **
55235 ** The author disclaims copyright to this source code. In place of
55236 ** a legal notice, here is a blessing:
@@ -56556,11 +56512,10 @@
56512 }
56513 #endif
56514
56515 /************** End of pcache1.c *********************************************/
56516 /************** Begin file rowset.c ******************************************/
 
56517 /*
56518 ** 2008 December 3
56519 **
56520 ** The author disclaims copyright to this source code. In place of
56521 ** a legal notice, here is a blessing:
@@ -57062,11 +57017,10 @@
57017 return 0;
57018 }
57019
57020 /************** End of rowset.c **********************************************/
57021 /************** Begin file pager.c *******************************************/
 
57022 /*
57023 ** 2001 September 15
57024 **
57025 ** The author disclaims copyright to this source code. In place of
57026 ** a legal notice, here is a blessing:
@@ -57087,11 +57041,10 @@
57041 */
57042 #ifndef SQLITE_OMIT_DISKIO
57043 /* #include "sqliteInt.h" */
57044 /************** Include wal.h in the middle of pager.c ***********************/
57045 /************** Begin file wal.h *********************************************/
 
57046 /*
57047 ** 2010 February 1
57048 **
57049 ** The author disclaims copyright to this source code. In place of
57050 ** a legal notice, here is a blessing:
@@ -57251,11 +57204,10 @@
57204 #endif /* ifndef SQLITE_OMIT_WAL */
57205 #endif /* SQLITE_WAL_H */
57206
57207 /************** End of wal.h *************************************************/
57208 /************** Continuing where we left off in pager.c **********************/
 
57209
57210
57211 /******************* NOTES ON THE DESIGN OF THE PAGER ************************
57212 **
57213 ** This comment block describes invariants that hold when using a rollback
@@ -65041,11 +64993,10 @@
64993
64994 #endif /* SQLITE_OMIT_DISKIO */
64995
64996 /************** End of pager.c ***********************************************/
64997 /************** Begin file wal.c *********************************************/
 
64998 /*
64999 ** 2010 February 1
65000 **
65001 ** The author disclaims copyright to this source code. In place of
65002 ** a legal notice, here is a blessing:
@@ -69638,11 +69589,10 @@
69589
69590 #endif /* #ifndef SQLITE_OMIT_WAL */
69591
69592 /************** End of wal.c *************************************************/
69593 /************** Begin file btmutex.c *****************************************/
 
69594 /*
69595 ** 2007 August 27
69596 **
69597 ** The author disclaims copyright to this source code. In place of
69598 ** a legal notice, here is a blessing:
@@ -69658,11 +69608,10 @@
69608 ** big and we want to break it down some. This packaged seemed like
69609 ** a good breakout.
69610 */
69611 /************** Include btreeInt.h in the middle of btmutex.c ****************/
69612 /************** Begin file btreeInt.h ****************************************/
 
69613 /*
69614 ** 2004 April 6
69615 **
69616 ** The author disclaims copyright to this source code. In place of
69617 ** a legal notice, here is a blessing:
@@ -70396,11 +70345,10 @@
70345 # define get2byteAligned(x) ((x)[0]<<8 | (x)[1])
70346 #endif
70347
70348 /************** End of btreeInt.h ********************************************/
70349 /************** Continuing where we left off in btmutex.c ********************/
 
70350 #ifndef SQLITE_OMIT_SHARED_CACHE
70351 #if SQLITE_THREADSAFE
70352
70353 /*
70354 ** Obtain the BtShared mutex associated with B-Tree handle p. Also,
@@ -70691,11 +70639,10 @@
70639
70640 #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */
70641
70642 /************** End of btmutex.c *********************************************/
70643 /************** Begin file btree.c *******************************************/
 
70644 /*
70645 ** 2004 April 6
70646 **
70647 ** The author disclaims copyright to this source code. In place of
70648 ** a legal notice, here is a blessing:
@@ -82186,11 +82133,10 @@
82133 }
82134 #endif
82135
82136 /************** End of btree.c ***********************************************/
82137 /************** Begin file backup.c ******************************************/
 
82138 /*
82139 ** 2009 January 28
82140 **
82141 ** The author disclaims copyright to this source code. In place of
82142 ** a legal notice, here is a blessing:
@@ -82957,11 +82903,10 @@
82903 }
82904 #endif /* SQLITE_OMIT_VACUUM */
82905
82906 /************** End of backup.c **********************************************/
82907 /************** Begin file vdbemem.c *****************************************/
 
82908 /*
82909 ** 2004 May 26
82910 **
82911 ** The author disclaims copyright to this source code. In place of
82912 ** a legal notice, here is a blessing:
@@ -85014,11 +84959,10 @@
84959 return valueBytes(pVal, enc);
84960 }
84961
84962 /************** End of vdbemem.c *********************************************/
84963 /************** Begin file vdbeaux.c *****************************************/
 
84964 /*
84965 ** 2003 September 6
84966 **
84967 ** The author disclaims copyright to this source code. In place of
84968 ** a legal notice, here is a blessing:
@@ -90566,11 +90510,10 @@
90510 }
90511 #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
90512
90513 /************** End of vdbeaux.c *********************************************/
90514 /************** Begin file vdbeapi.c *****************************************/
 
90515 /*
90516 ** 2004 May 26
90517 **
90518 ** The author disclaims copyright to this source code. In place of
90519 ** a legal notice, here is a blessing:
@@ -93153,11 +93096,10 @@
93096 }
93097 #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */
93098
93099 /************** End of vdbeapi.c *********************************************/
93100 /************** Begin file vdbetrace.c ***************************************/
 
93101 /*
93102 ** 2009 November 25
93103 **
93104 ** The author disclaims copyright to this source code. In place of
93105 ** a legal notice, here is a blessing:
@@ -93349,11 +93291,10 @@
93291
93292 #endif /* #ifndef SQLITE_OMIT_TRACE */
93293
93294 /************** End of vdbetrace.c *******************************************/
93295 /************** Begin file vdbe.c ********************************************/
 
93296 /*
93297 ** 2001 September 15
93298 **
93299 ** The author disclaims copyright to this source code. In place of
93300 ** a legal notice, here is a blessing:
@@ -93381,11 +93322,10 @@
93322 #if defined(VDBE_PROFILE) \
93323 || defined(SQLITE_PERFORMANCE_TRACE) \
93324 || defined(SQLITE_ENABLE_STMT_SCANSTATUS)
93325 /************** Include hwtime.h in the middle of vdbe.c *********************/
93326 /************** Begin file hwtime.h ******************************************/
 
93327 /*
93328 ** 2008 May 27
93329 **
93330 ** The author disclaims copyright to this source code. In place of
93331 ** a legal notice, here is a blessing:
@@ -93470,11 +93410,10 @@
93410
93411 #endif /* !defined(SQLITE_HWTIME_H) */
93412
93413 /************** End of hwtime.h **********************************************/
93414 /************** Continuing where we left off in vdbe.c ***********************/
 
93415 #endif
93416
93417 /*
93418 ** Invoke this macro on memory cells just prior to changing the
93419 ** value of the cell. This macro verifies that shallow copies are
@@ -102664,11 +102603,10 @@
102603 }
102604
102605
102606 /************** End of vdbe.c ************************************************/
102607 /************** Begin file vdbeblob.c ****************************************/
 
102608 /*
102609 ** 2007 May 1
102610 **
102611 ** The author disclaims copyright to this source code. In place of
102612 ** a legal notice, here is a blessing:
@@ -103188,11 +103126,10 @@
103126
103127 #endif /* #ifndef SQLITE_OMIT_INCRBLOB */
103128
103129 /************** End of vdbeblob.c ********************************************/
103130 /************** Begin file vdbesort.c ****************************************/
 
103131 /*
103132 ** 2011-07-09
103133 **
103134 ** The author disclaims copyright to this source code. In place of
103135 ** a legal notice, here is a blessing:
@@ -105959,11 +105896,10 @@
105896 return SQLITE_OK;
105897 }
105898
105899 /************** End of vdbesort.c ********************************************/
105900 /************** Begin file vdbevtab.c ****************************************/
 
105901 /*
105902 ** 2020-03-23
105903 **
105904 ** The author disclaims copyright to this source code. In place of
105905 ** a legal notice, here is a blessing:
@@ -106409,11 +106345,10 @@
106345 SQLITE_PRIVATE int sqlite3VdbeBytecodeVtabInit(sqlite3 *db){ return SQLITE_OK; }
106346 #endif /* SQLITE_ENABLE_BYTECODE_VTAB */
106347
106348 /************** End of vdbevtab.c ********************************************/
106349 /************** Begin file memjournal.c **************************************/
 
106350 /*
106351 ** 2008 October 7
106352 **
106353 ** The author disclaims copyright to this source code. In place of
106354 ** a legal notice, here is a blessing:
@@ -106853,11 +106788,10 @@
106788 return MAX(pVfs->szOsFile, (int)sizeof(MemJournal));
106789 }
106790
106791 /************** End of memjournal.c ******************************************/
106792 /************** Begin file walker.c ******************************************/
 
106793 /*
106794 ** 2008 August 16
106795 **
106796 ** The author disclaims copyright to this source code. In place of
106797 ** a legal notice, here is a blessing:
@@ -107118,11 +107052,10 @@
107052 return WRC_Continue;
107053 }
107054
107055 /************** End of walker.c **********************************************/
107056 /************** Begin file resolve.c *****************************************/
 
107057 /*
107058 ** 2008 August 18
107059 **
107060 ** The author disclaims copyright to this source code. In place of
107061 ** a legal notice, here is a blessing:
@@ -109440,11 +109373,10 @@
109373 return rc;
109374 }
109375
109376 /************** End of resolve.c *********************************************/
109377 /************** Begin file expr.c ********************************************/
 
109378 /*
109379 ** 2001 September 15
109380 **
109381 ** The author disclaims copyright to this source code. In place of
109382 ** a legal notice, here is a blessing:
@@ -116770,11 +116702,10 @@
116702 }
116703 #endif /* SQLITE_DEBUG */
116704
116705 /************** End of expr.c ************************************************/
116706 /************** Begin file alter.c *******************************************/
 
116707 /*
116708 ** 2005 February 15
116709 **
116710 ** The author disclaims copyright to this source code. In place of
116711 ** a legal notice, here is a blessing:
@@ -119090,11 +119021,10 @@
119021 }
119022 #endif /* SQLITE_ALTER_TABLE */
119023
119024 /************** End of alter.c ***********************************************/
119025 /************** Begin file analyze.c *****************************************/
 
119026 /*
119027 ** 2005-07-08
119028 **
119029 ** The author disclaims copyright to this source code. In place of
119030 ** a legal notice, here is a blessing:
@@ -121115,11 +121045,10 @@
121045
121046 #endif /* SQLITE_OMIT_ANALYZE */
121047
121048 /************** End of analyze.c *********************************************/
121049 /************** Begin file attach.c ******************************************/
 
121050 /*
121051 ** 2003 April 6
121052 **
121053 ** The author disclaims copyright to this source code. In place of
121054 ** a legal notice, here is a blessing:
@@ -121728,11 +121657,10 @@
121657 }
121658 #endif
121659
121660 /************** End of attach.c **********************************************/
121661 /************** Begin file auth.c ********************************************/
 
121662 /*
121663 ** 2003 January 11
121664 **
121665 ** The author disclaims copyright to this source code. In place of
121666 ** a legal notice, here is a blessing:
@@ -121992,11 +121920,10 @@
121920
121921 #endif /* SQLITE_OMIT_AUTHORIZATION */
121922
121923 /************** End of auth.c ************************************************/
121924 /************** Begin file build.c *******************************************/
 
121925 /*
121926 ** 2001 September 15
121927 **
121928 ** The author disclaims copyright to this source code. In place of
121929 ** a legal notice, here is a blessing:
@@ -127763,11 +127690,10 @@
127690 }
127691 #endif /* !defined(SQLITE_OMIT_CTE) */
127692
127693 /************** End of build.c ***********************************************/
127694 /************** Begin file callback.c ****************************************/
 
127695 /*
127696 ** 2005 May 23
127697 **
127698 ** The author disclaims copyright to this source code. In place of
127699 ** a legal notice, here is a blessing:
@@ -128307,11 +128233,10 @@
128233 return p;
128234 }
128235
128236 /************** End of callback.c ********************************************/
128237 /************** Begin file delete.c ******************************************/
 
128238 /*
128239 ** 2001 September 15
128240 **
128241 ** The author disclaims copyright to this source code. In place of
128242 ** a legal notice, here is a blessing:
@@ -129341,11 +129266,10 @@
129266 }
129267 }
129268
129269 /************** End of delete.c **********************************************/
129270 /************** Begin file func.c ********************************************/
 
129271 /*
129272 ** 2002 February 23
129273 **
129274 ** The author disclaims copyright to this source code. In place of
129275 ** a legal notice, here is a blessing:
@@ -132188,11 +132112,10 @@
132112 #endif
132113 }
132114
132115 /************** End of func.c ************************************************/
132116 /************** Begin file fkey.c ********************************************/
 
132117 /*
132118 **
132119 ** The author disclaims copyright to this source code. In place of
132120 ** a legal notice, here is a blessing:
132121 **
@@ -133676,11 +133599,10 @@
133599 }
133600 #endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */
133601
133602 /************** End of fkey.c ************************************************/
133603 /************** Begin file insert.c ******************************************/
 
133604 /*
133605 ** 2001 September 15
133606 **
133607 ** The author disclaims copyright to this source code. In place of
133608 ** a legal notice, here is a blessing:
@@ -137072,11 +136994,10 @@
136994 }
136995 #endif /* SQLITE_OMIT_XFER_OPT */
136996
136997 /************** End of insert.c **********************************************/
136998 /************** Begin file legacy.c ******************************************/
 
136999 /*
137000 ** 2001 September 15
137001 **
137002 ** The author disclaims copyright to this source code. In place of
137003 ** a legal notice, here is a blessing:
@@ -137217,11 +137138,10 @@
137138 return rc;
137139 }
137140
137141 /************** End of legacy.c **********************************************/
137142 /************** Begin file loadext.c *****************************************/
 
137143 /*
137144 ** 2006 June 7
137145 **
137146 ** The author disclaims copyright to this source code. In place of
137147 ** a legal notice, here is a blessing:
@@ -137238,11 +137158,10 @@
137158 #ifndef SQLITE_CORE
137159 #define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */
137160 #endif
137161 /************** Include sqlite3ext.h in the middle of loadext.c **************/
137162 /************** Begin file sqlite3ext.h **************************************/
 
137163 /*
137164 ** 2006 June 7
137165 **
137166 ** The author disclaims copyright to this source code. In place of
137167 ** a legal notice, here is a blessing:
@@ -137961,11 +137880,10 @@
137880
137881 #endif /* SQLITE3EXT_H */
137882
137883 /************** End of sqlite3ext.h ******************************************/
137884 /************** Continuing where we left off in loadext.c ********************/
 
137885 /* #include "sqliteInt.h" */
137886
137887 #ifndef SQLITE_OMIT_LOAD_EXTENSION
137888 /*
137889 ** Some API routines are omitted when various features are
@@ -138867,11 +138785,10 @@
138785 }
138786 }
138787
138788 /************** End of loadext.c *********************************************/
138789 /************** Begin file pragma.c ******************************************/
 
138790 /*
138791 ** 2003 April 6
138792 **
138793 ** The author disclaims copyright to this source code. In place of
138794 ** a legal notice, here is a blessing:
@@ -138900,11 +138817,10 @@
138817 ** lexicographical order to facility a binary search of the pragma name.
138818 ** Do not edit pragma.h directly. Edit and rerun the script in at
138819 ** ../tool/mkpragmatab.tcl. */
138820 /************** Include pragma.h in the middle of pragma.c *******************/
138821 /************** Begin file pragma.h ******************************************/
 
138822 /* DO NOT EDIT!
138823 ** This file is automatically generated by the script at
138824 ** ../tool/mkpragmatab.tcl. To update the set of pragmas, edit
138825 ** that script and rerun it.
138826 */
@@ -139564,11 +139480,10 @@
139480 };
139481 /* Number of pragmas: 68 on by default, 78 total. */
139482
139483 /************** End of pragma.h **********************************************/
139484 /************** Continuing where we left off in pragma.c *********************/
 
139485
139486 /*
139487 ** When the 0x10 bit of PRAGMA optimize is set, any ANALYZE commands
139488 ** will be run with an analysis_limit set to the lessor of the value of
139489 ** the following macro or to the actual analysis_limit if it is non-zero,
@@ -142608,11 +142523,10 @@
142523
142524 #endif /* SQLITE_OMIT_PRAGMA */
142525
142526 /************** End of pragma.c **********************************************/
142527 /************** Begin file prepare.c *****************************************/
 
142528 /*
142529 ** 2005 May 25
142530 **
142531 ** The author disclaims copyright to this source code. In place of
142532 ** a legal notice, here is a blessing:
@@ -143702,11 +143616,10 @@
143616
143617 #endif /* SQLITE_OMIT_UTF16 */
143618
143619 /************** End of prepare.c *********************************************/
143620 /************** Begin file select.c ******************************************/
 
143621 /*
143622 ** 2001 September 15
143623 **
143624 ** The author disclaims copyright to this source code. In place of
143625 ** a legal notice, here is a blessing:
@@ -152475,11 +152388,10 @@
152388 return rc;
152389 }
152390
152391 /************** End of select.c **********************************************/
152392 /************** Begin file table.c *******************************************/
 
152393 /*
152394 ** 2001 September 15
152395 **
152396 ** The author disclaims copyright to this source code. In place of
152397 ** a legal notice, here is a blessing:
@@ -152677,11 +152589,10 @@
152589
152590 #endif /* SQLITE_OMIT_GET_TABLE */
152591
152592 /************** End of table.c ***********************************************/
152593 /************** Begin file trigger.c *****************************************/
 
152594 /*
152595 **
152596 ** The author disclaims copyright to this source code. In place of
152597 ** a legal notice, here is a blessing:
152598 **
@@ -154244,11 +154155,10 @@
154155
154156 #endif /* !defined(SQLITE_OMIT_TRIGGER) */
154157
154158 /************** End of trigger.c *********************************************/
154159 /************** Begin file update.c ******************************************/
 
154160 /*
154161 ** 2001 September 15
154162 **
154163 ** The author disclaims copyright to this source code. In place of
154164 ** a legal notice, here is a blessing:
@@ -155616,11 +155526,10 @@
155526 }
155527 #endif /* SQLITE_OMIT_VIRTUALTABLE */
155528
155529 /************** End of update.c **********************************************/
155530 /************** Begin file upsert.c ******************************************/
 
155531 /*
155532 ** 2018-04-12
155533 **
155534 ** The author disclaims copyright to this source code. In place of
155535 ** a legal notice, here is a blessing:
@@ -155949,11 +155858,10 @@
155858
155859 #endif /* SQLITE_OMIT_UPSERT */
155860
155861 /************** End of upsert.c **********************************************/
155862 /************** Begin file vacuum.c ******************************************/
 
155863 /*
155864 ** 2003 April 6
155865 **
155866 ** The author disclaims copyright to this source code. In place of
155867 ** a legal notice, here is a blessing:
@@ -156371,11 +156279,10 @@
156279
156280 #endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */
156281
156282 /************** End of vacuum.c **********************************************/
156283 /************** Begin file vtab.c ********************************************/
 
156284 /*
156285 ** 2006 June 10
156286 **
156287 ** The author disclaims copyright to this source code. In place of
156288 ** a legal notice, here is a blessing:
@@ -157749,11 +157656,10 @@
157656
157657 #endif /* SQLITE_OMIT_VIRTUALTABLE */
157658
157659 /************** End of vtab.c ************************************************/
157660 /************** Begin file wherecode.c ***************************************/
 
157661 /*
157662 ** 2015-06-06
157663 **
157664 ** The author disclaims copyright to this source code. In place of
157665 ** a legal notice, here is a blessing:
@@ -157772,11 +157678,10 @@
157678 ** file retains the code that does query planning and analysis.
157679 */
157680 /* #include "sqliteInt.h" */
157681 /************** Include whereInt.h in the middle of wherecode.c **************/
157682 /************** Begin file whereInt.h ****************************************/
 
157683 /*
157684 ** 2013-11-12
157685 **
157686 ** The author disclaims copyright to this source code. In place of
157687 ** a legal notice, here is a blessing:
@@ -158429,11 +158334,10 @@
158334
158335 #endif /* !defined(SQLITE_WHEREINT_H) */
158336
158337 /************** End of whereInt.h ********************************************/
158338 /************** Continuing where we left off in wherecode.c ******************/
 
158339
158340 #ifndef SQLITE_OMIT_EXPLAIN
158341
158342 /*
158343 ** Return the name of the i-th column of the pIdx index.
@@ -161352,11 +161256,10 @@
161256 pParse->withinRJSubrtn--;
161257 }
161258
161259 /************** End of wherecode.c *******************************************/
161260 /************** Begin file whereexpr.c ***************************************/
 
161261 /*
161262 ** 2015-06-08
161263 **
161264 ** The author disclaims copyright to this source code. In place of
161265 ** a legal notice, here is a blessing:
@@ -163258,11 +163161,10 @@
163161 }
163162 }
163163
163164 /************** End of whereexpr.c *******************************************/
163165 /************** Begin file where.c *******************************************/
 
163166 /*
163167 ** 2001 September 15
163168 **
163169 ** The author disclaims copyright to this source code. In place of
163170 ** a legal notice, here is a blessing:
@@ -170759,11 +170661,10 @@
170661 return;
170662 }
170663
170664 /************** End of where.c ***********************************************/
170665 /************** Begin file window.c ******************************************/
 
170666 /*
170667 ** 2018 May 08
170668 **
170669 ** The author disclaims copyright to this source code. In place of
170670 ** a legal notice, here is a blessing:
@@ -172432,10 +172333,11 @@
172333 for(pWin=pMWin; pWin; pWin=pWin->pNextWin){
172334 FuncDef *pFunc = pWin->pWFunc;
172335 int regArg;
172336 int nArg = pWin->bExprArgs ? 0 : windowArgCount(pWin);
172337 int i;
172338 int addrIf = 0;
172339
172340 assert( bInverse==0 || pWin->eStart!=TK_UNBOUNDED );
172341
172342 /* All OVER clauses in the same window function aggregate step must
172343 ** be the same. */
@@ -172447,10 +172349,22 @@
172349 }else{
172350 sqlite3VdbeAddOp3(v, OP_Column, pMWin->iEphCsr, pWin->iArgCol+i, reg+i);
172351 }
172352 }
172353 regArg = reg;
172354
172355 if( pWin->pFilter ){
172356 int regTmp;
172357 assert( ExprUseXList(pWin->pOwner) );
172358 assert( pWin->bExprArgs || !nArg ||nArg==pWin->pOwner->x.pList->nExpr );
172359 assert( pWin->bExprArgs || nArg ||pWin->pOwner->x.pList==0 );
172360 regTmp = sqlite3GetTempReg(pParse);
172361 sqlite3VdbeAddOp3(v, OP_Column, csr, pWin->iArgCol+nArg,regTmp);
172362 addrIf = sqlite3VdbeAddOp3(v, OP_IfNot, regTmp, 0, 1);
172363 VdbeCoverage(v);
172364 sqlite3ReleaseTempReg(pParse, regTmp);
172365 }
172366
172367 if( pMWin->regStartRowid==0
172368 && (pFunc->funcFlags & SQLITE_FUNC_MINMAX)
172369 && (pWin->eStart!=TK_UNBOUNDED)
172370 ){
@@ -172467,29 +172381,17 @@
172381 sqlite3VdbeAddOp1(v, OP_Delete, pWin->csrApp);
172382 sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);
172383 }
172384 sqlite3VdbeJumpHere(v, addrIsNull);
172385 }else if( pWin->regApp ){
172386 assert( pWin->pFilter==0 );
172387 assert( pFunc->zName==nth_valueName
172388 || pFunc->zName==first_valueName
172389 );
172390 assert( bInverse==0 || bInverse==1 );
172391 sqlite3VdbeAddOp2(v, OP_AddImm, pWin->regApp+1-bInverse, 1);
172392 }else if( pFunc->xSFunc!=noopStepFunc ){
 
 
 
 
 
 
 
 
 
 
 
 
 
172393 if( pWin->bExprArgs ){
172394 int iOp = sqlite3VdbeCurrentAddr(v);
172395 int iEnd;
172396
172397 assert( ExprUseXList(pWin->pOwner) );
@@ -172516,12 +172418,13 @@
172418 sqlite3VdbeAppendP4(v, pFunc, P4_FUNCDEF);
172419 sqlite3VdbeChangeP5(v, (u8)nArg);
172420 if( pWin->bExprArgs ){
172421 sqlite3ReleaseTempRange(pParse, regArg, nArg);
172422 }
 
172423 }
172424
172425 if( addrIf ) sqlite3VdbeJumpHere(v, addrIf);
172426 }
172427 }
172428
172429 /*
172430 ** Values that may be passed as the second argument to windowCodeOp().
@@ -173869,11 +173772,10 @@
173772
173773 #endif /* SQLITE_OMIT_WINDOWFUNC */
173774
173775 /************** End of window.c **********************************************/
173776 /************** Begin file parse.c *******************************************/
 
173777 /* This file is automatically generated by Lemon from input grammar
173778 ** source file "parse.y".
173779 */
173780 /*
173781 ** 2001-09-15
@@ -173893,11 +173795,10 @@
173795 ** That input file is processed by Lemon to generate a C-language
173796 ** implementation of a parser for the given grammar. You might be reading
173797 ** this comment as part of the translated C-code. Edits should be made
173798 ** to the original parse.y sources.
173799 */
 
173800
173801 /* #include "sqliteInt.h" */
173802
173803 /*
173804 ** Disable all error recovery processing in the parser push-down
@@ -173977,11 +173878,10 @@
173878 sqlite3ExprListDelete(pParse->db, pOrderBy);
173879 sqlite3ExprDelete(pParse->db, pLimit);
173880 }
173881 #endif /* SQLITE_ENABLE_UPDATE_DELETE_LIMIT */
173882
 
173883
173884 /*
173885 ** For a compound SELECT statement, make sure p->pPrior->pNext==p for
173886 ** all elements in the list. And make sure list length does not exceed
173887 ** SQLITE_LIMIT_COMPOUND_SELECT.
@@ -174032,11 +173932,10 @@
173932 ** testing.
173933 */
173934 static void *parserStackRealloc(void *pOld, sqlite3_uint64 newSize){
173935 return sqlite3FaultSim(700) ? 0 : sqlite3_realloc(pOld, newSize);
173936 }
 
173937
173938
173939 /* Construct a new Expr object from a single token */
173940 static Expr *tokenExpr(Parse *pParse, int op, Token t){
173941 Expr *p = sqlite3DbMallocRawNN(pParse->db, sizeof(Expr)+t.n+1);
@@ -174069,11 +173968,10 @@
173968 }
173969 }
173970 return p;
173971 }
173972
 
173973
173974 /* A routine to convert a binary TK_IS or TK_ISNOT expression into a
173975 ** unary TK_ISNULL or TK_NOTNULL expression. */
173976 static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
173977 sqlite3 *db = pParse->db;
@@ -174081,11 +173979,10 @@
173979 pA->op = (u8)op;
173980 sqlite3ExprDelete(db, pA->pRight);
173981 pA->pRight = 0;
173982 }
173983 }
 
173984
173985 /* Add a single new term to an ExprList that is used to store a
173986 ** list of identifiers. Report an error if the ID list contains
173987 ** a COLLATE clause or an ASC or DESC keyword, except ignore the
173988 ** error while parsing a legacy schema.
@@ -174105,16 +174002,14 @@
174002 pIdToken->n, pIdToken->z);
174003 }
174004 sqlite3ExprListSetName(pParse, p, pIdToken, 1);
174005 return p;
174006 }
 
174007
174008 #if TK_SPAN>255
174009 # error too many tokens in the grammar
174010 #endif
 
174011 /**************** End of %include directives **********************************/
174012 /* These constants specify the various numeric values for terminal symbols.
174013 ***************** Begin token definitions *************************************/
174014 #ifndef TK_SEMI
174015 #define TK_SEMI 1
@@ -176295,13 +176190,11 @@
176190 case 240: /* selectnowith */
176191 case 241: /* oneselect */
176192 case 253: /* values */
176193 case 255: /* mvalues */
176194 {
 
176195 sqlite3SelectDelete(pParse->db, (yypminor->yy555));
 
176196 }
176197 break;
176198 case 217: /* term */
176199 case 218: /* expr */
176200 case 247: /* where_opt */
@@ -176312,13 +176205,11 @@
176205 case 285: /* vinto */
176206 case 292: /* when_clause */
176207 case 297: /* key_opt */
176208 case 314: /* filter_clause */
176209 {
 
176210 sqlite3ExprDelete(pParse->db, (yypminor->yy454));
 
176211 }
176212 break;
176213 case 222: /* eidlist_opt */
176214 case 232: /* sortlist */
176215 case 233: /* eidlist */
@@ -176331,82 +176222,64 @@
176222 case 270: /* setlist */
176223 case 279: /* paren_exprlist */
176224 case 281: /* case_exprlist */
176225 case 313: /* part_opt */
176226 {
 
176227 sqlite3ExprListDelete(pParse->db, (yypminor->yy14));
 
176228 }
176229 break;
176230 case 239: /* fullname */
176231 case 246: /* from */
176232 case 258: /* seltablist */
176233 case 259: /* stl_prefix */
176234 case 264: /* xfullname */
176235 {
 
176236 sqlite3SrcListDelete(pParse->db, (yypminor->yy203));
 
176237 }
176238 break;
176239 case 242: /* wqlist */
176240 {
 
176241 sqlite3WithDelete(pParse->db, (yypminor->yy59));
 
176242 }
176243 break;
176244 case 252: /* window_clause */
176245 case 309: /* windowdefn_list */
176246 {
 
176247 sqlite3WindowListDelete(pParse->db, (yypminor->yy211));
 
176248 }
176249 break;
176250 case 265: /* idlist */
176251 case 272: /* idlist_opt */
176252 {
 
176253 sqlite3IdListDelete(pParse->db, (yypminor->yy132));
 
176254 }
176255 break;
176256 case 275: /* filter_over */
176257 case 310: /* windowdefn */
176258 case 311: /* window */
176259 case 312: /* frame_opt */
176260 case 315: /* over_clause */
176261 {
 
176262 sqlite3WindowDelete(pParse->db, (yypminor->yy211));
 
176263 }
176264 break;
176265 case 288: /* trigger_cmd_list */
176266 case 293: /* trigger_cmd */
176267 {
 
176268 sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy427));
 
176269 }
176270 break;
176271 case 290: /* trigger_event */
176272 {
 
176273 sqlite3IdListDelete(pParse->db, (yypminor->yy286).b);
 
176274 }
176275 break;
176276 case 317: /* frame_bound */
176277 case 318: /* frame_bound_s */
176278 case 319: /* frame_bound_e */
176279 {
 
176280 sqlite3ExprDelete(pParse->db, (yypminor->yy509).pExpr);
 
176281 }
176282 break;
176283 /********* End destructor definitions *****************************************/
176284 default: break; /* If no destructor action specified: do nothing */
176285 }
@@ -176637,14 +176510,12 @@
176510 #endif
176511 while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
176512 /* Here code is inserted which will execute if the parser
176513 ** stack every overflows */
176514 /******** Begin %stack_overflow code ******************************************/
 
176515
176516 sqlite3OomFault(pParse->db);
 
176517 /******** End %stack_overflow code ********************************************/
176518 sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument var */
176519 sqlite3ParserCTX_STORE
176520 }
176521
@@ -177571,481 +177442,330 @@
177442 ** break;
177443 */
177444 /********** Begin reduce actions **********************************************/
177445 YYMINORTYPE yylhsminor;
177446 case 0: /* explain ::= EXPLAIN */
 
177447 { if( pParse->pReprepare==0 ) pParse->explain = 1; }
 
177448 break;
177449 case 1: /* explain ::= EXPLAIN QUERY PLAN */
 
177450 { if( pParse->pReprepare==0 ) pParse->explain = 2; }
 
177451 break;
177452 case 2: /* cmdx ::= cmd */
 
177453 { sqlite3FinishCoding(pParse); }
 
177454 break;
177455 case 3: /* cmd ::= BEGIN transtype trans_opt */
 
177456 {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy144);}
 
177457 break;
177458 case 4: /* transtype ::= */
 
177459 {yymsp[1].minor.yy144 = TK_DEFERRED;}
 
177460 break;
177461 case 5: /* transtype ::= DEFERRED */
177462 case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
177463 case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
177464 case 324: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==324);
 
177465 {yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-X*/}
 
177466 break;
177467 case 8: /* cmd ::= COMMIT|END trans_opt */
177468 case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
 
177469 {sqlite3EndTransaction(pParse,yymsp[-1].major);}
 
177470 break;
177471 case 10: /* cmd ::= SAVEPOINT nm */
 
177472 {
177473 sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
177474 }
 
177475 break;
177476 case 11: /* cmd ::= RELEASE savepoint_opt nm */
 
177477 {
177478 sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
177479 }
 
177480 break;
177481 case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
 
177482 {
177483 sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
177484 }
 
177485 break;
177486 case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
 
177487 {
177488 sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy144,0,0,yymsp[-2].minor.yy144);
177489 }
 
177490 break;
177491 case 14: /* createkw ::= CREATE */
 
177492 {disableLookaside(pParse);}
 
177493 break;
177494 case 15: /* ifnotexists ::= */
177495 case 18: /* temp ::= */ yytestcase(yyruleno==18);
177496 case 47: /* autoinc ::= */ yytestcase(yyruleno==47);
177497 case 62: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==62);
177498 case 72: /* defer_subclause_opt ::= */ yytestcase(yyruleno==72);
177499 case 81: /* ifexists ::= */ yytestcase(yyruleno==81);
177500 case 100: /* distinct ::= */ yytestcase(yyruleno==100);
177501 case 246: /* collate ::= */ yytestcase(yyruleno==246);
 
177502 {yymsp[1].minor.yy144 = 0;}
 
177503 break;
177504 case 16: /* ifnotexists ::= IF NOT EXISTS */
 
177505 {yymsp[-2].minor.yy144 = 1;}
 
177506 break;
177507 case 17: /* temp ::= TEMP */
 
177508 {yymsp[0].minor.yy144 = pParse->db->init.busy==0;}
 
177509 break;
177510 case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_option_set */
 
177511 {
177512 sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy391,0);
177513 }
 
177514 break;
177515 case 20: /* create_table_args ::= AS select */
 
177516 {
177517 sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy555);
177518 sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy555);
177519 }
 
177520 break;
177521 case 21: /* table_option_set ::= */
 
177522 {yymsp[1].minor.yy391 = 0;}
 
177523 break;
177524 case 22: /* table_option_set ::= table_option_set COMMA table_option */
 
177525 {yylhsminor.yy391 = yymsp[-2].minor.yy391|yymsp[0].minor.yy391;}
 
177526 yymsp[-2].minor.yy391 = yylhsminor.yy391;
177527 break;
177528 case 23: /* table_option ::= WITHOUT nm */
 
177529 {
177530 if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
177531 yymsp[-1].minor.yy391 = TF_WithoutRowid | TF_NoVisibleRowid;
177532 }else{
177533 yymsp[-1].minor.yy391 = 0;
177534 sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
177535 }
177536 }
 
177537 break;
177538 case 24: /* table_option ::= nm */
 
177539 {
177540 if( yymsp[0].minor.yy0.n==6 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"strict",6)==0 ){
177541 yylhsminor.yy391 = TF_Strict;
177542 }else{
177543 yylhsminor.yy391 = 0;
177544 sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
177545 }
177546 }
 
177547 yymsp[0].minor.yy391 = yylhsminor.yy391;
177548 break;
177549 case 25: /* columnname ::= nm typetoken */
 
177550 {sqlite3AddColumn(pParse,yymsp[-1].minor.yy0,yymsp[0].minor.yy0);}
 
177551 break;
177552 case 26: /* typetoken ::= */
177553 case 65: /* conslist_opt ::= */ yytestcase(yyruleno==65);
177554 case 106: /* as ::= */ yytestcase(yyruleno==106);
 
177555 {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
 
177556 break;
177557 case 27: /* typetoken ::= typename LP signed RP */
 
177558 {
177559 yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
177560 }
 
177561 break;
177562 case 28: /* typetoken ::= typename LP signed COMMA signed RP */
 
177563 {
177564 yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
177565 }
 
177566 break;
177567 case 29: /* typename ::= typename ID|STRING */
 
177568 {yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
 
177569 break;
177570 case 30: /* scanpt ::= */
 
177571 {
177572 assert( yyLookahead!=YYNOCODE );
177573 yymsp[1].minor.yy168 = yyLookaheadToken.z;
177574 }
 
177575 break;
177576 case 31: /* scantok ::= */
 
177577 {
177578 assert( yyLookahead!=YYNOCODE );
177579 yymsp[1].minor.yy0 = yyLookaheadToken;
177580 }
 
177581 break;
177582 case 32: /* ccons ::= CONSTRAINT nm */
177583 case 67: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==67);
 
177584 {pParse->constraintName = yymsp[0].minor.yy0;}
 
177585 break;
177586 case 33: /* ccons ::= DEFAULT scantok term */
 
177587 {sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy454,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
 
177588 break;
177589 case 34: /* ccons ::= DEFAULT LP expr RP */
 
177590 {sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy454,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
 
177591 break;
177592 case 35: /* ccons ::= DEFAULT PLUS scantok term */
 
177593 {sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy454,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
 
177594 break;
177595 case 36: /* ccons ::= DEFAULT MINUS scantok term */
 
177596 {
177597 Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy454, 0);
177598 sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
177599 }
 
177600 break;
177601 case 37: /* ccons ::= DEFAULT scantok ID|INDEXED */
 
177602 {
177603 Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
177604 if( p ){
177605 sqlite3ExprIdToTrueFalse(p);
177606 testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
177607 }
177608 sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
177609 }
 
177610 break;
177611 case 38: /* ccons ::= NOT NULL onconf */
 
177612 {sqlite3AddNotNull(pParse, yymsp[0].minor.yy144);}
 
177613 break;
177614 case 39: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
 
177615 {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy144,yymsp[0].minor.yy144,yymsp[-2].minor.yy144);}
 
177616 break;
177617 case 40: /* ccons ::= UNIQUE onconf */
 
177618 {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy144,0,0,0,0,
177619 SQLITE_IDXTYPE_UNIQUE);}
 
177620 break;
177621 case 41: /* ccons ::= CHECK LP expr RP */
 
177622 {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy454,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy0.z);}
 
177623 break;
177624 case 42: /* ccons ::= REFERENCES nm eidlist_opt refargs */
 
177625 {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy14,yymsp[0].minor.yy144);}
 
177626 break;
177627 case 43: /* ccons ::= defer_subclause */
 
177628 {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy144);}
 
177629 break;
177630 case 44: /* ccons ::= COLLATE ID|STRING */
 
177631 {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
 
177632 break;
177633 case 45: /* generated ::= LP expr RP */
 
177634 {sqlite3AddGenerated(pParse,yymsp[-1].minor.yy454,0);}
 
177635 break;
177636 case 46: /* generated ::= LP expr RP ID */
 
177637 {sqlite3AddGenerated(pParse,yymsp[-2].minor.yy454,&yymsp[0].minor.yy0);}
 
177638 break;
177639 case 48: /* autoinc ::= AUTOINCR */
 
177640 {yymsp[0].minor.yy144 = 1;}
 
177641 break;
177642 case 49: /* refargs ::= */
 
177643 { yymsp[1].minor.yy144 = OE_None*0x0101; /* EV: R-19803-45884 */}
 
177644 break;
177645 case 50: /* refargs ::= refargs refarg */
 
177646 { yymsp[-1].minor.yy144 = (yymsp[-1].minor.yy144 & ~yymsp[0].minor.yy383.mask) | yymsp[0].minor.yy383.value; }
 
177647 break;
177648 case 51: /* refarg ::= MATCH nm */
 
177649 { yymsp[-1].minor.yy383.value = 0; yymsp[-1].minor.yy383.mask = 0x000000; }
 
177650 break;
177651 case 52: /* refarg ::= ON INSERT refact */
 
177652 { yymsp[-2].minor.yy383.value = 0; yymsp[-2].minor.yy383.mask = 0x000000; }
 
177653 break;
177654 case 53: /* refarg ::= ON DELETE refact */
 
177655 { yymsp[-2].minor.yy383.value = yymsp[0].minor.yy144; yymsp[-2].minor.yy383.mask = 0x0000ff; }
 
177656 break;
177657 case 54: /* refarg ::= ON UPDATE refact */
 
177658 { yymsp[-2].minor.yy383.value = yymsp[0].minor.yy144<<8; yymsp[-2].minor.yy383.mask = 0x00ff00; }
 
177659 break;
177660 case 55: /* refact ::= SET NULL */
 
177661 { yymsp[-1].minor.yy144 = OE_SetNull; /* EV: R-33326-45252 */}
 
177662 break;
177663 case 56: /* refact ::= SET DEFAULT */
 
177664 { yymsp[-1].minor.yy144 = OE_SetDflt; /* EV: R-33326-45252 */}
 
177665 break;
177666 case 57: /* refact ::= CASCADE */
 
177667 { yymsp[0].minor.yy144 = OE_Cascade; /* EV: R-33326-45252 */}
 
177668 break;
177669 case 58: /* refact ::= RESTRICT */
 
177670 { yymsp[0].minor.yy144 = OE_Restrict; /* EV: R-33326-45252 */}
 
177671 break;
177672 case 59: /* refact ::= NO ACTION */
 
177673 { yymsp[-1].minor.yy144 = OE_None; /* EV: R-33326-45252 */}
 
177674 break;
177675 case 60: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
 
177676 {yymsp[-2].minor.yy144 = 0;}
 
177677 break;
177678 case 61: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
177679 case 76: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==76);
177680 case 173: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==173);
 
177681 {yymsp[-1].minor.yy144 = yymsp[0].minor.yy144;}
 
177682 break;
177683 case 63: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
177684 case 80: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==80);
177685 case 219: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==219);
177686 case 222: /* in_op ::= NOT IN */ yytestcase(yyruleno==222);
177687 case 247: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==247);
 
177688 {yymsp[-1].minor.yy144 = 1;}
 
177689 break;
177690 case 64: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
 
177691 {yymsp[-1].minor.yy144 = 0;}
 
177692 break;
177693 case 66: /* tconscomma ::= COMMA */
 
177694 {pParse->constraintName.n = 0;}
 
177695 break;
177696 case 68: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
 
177697 {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy14,yymsp[0].minor.yy144,yymsp[-2].minor.yy144,0);}
 
177698 break;
177699 case 69: /* tcons ::= UNIQUE LP sortlist RP onconf */
 
177700 {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy14,yymsp[0].minor.yy144,0,0,0,0,
177701 SQLITE_IDXTYPE_UNIQUE);}
 
177702 break;
177703 case 70: /* tcons ::= CHECK LP expr RP onconf */
 
177704 {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy454,yymsp[-3].minor.yy0.z,yymsp[-1].minor.yy0.z);}
 
177705 break;
177706 case 71: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
 
177707 {
177708 sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy14, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[-1].minor.yy144);
177709 sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy144);
177710 }
 
177711 break;
177712 case 73: /* onconf ::= */
177713 case 75: /* orconf ::= */ yytestcase(yyruleno==75);
 
177714 {yymsp[1].minor.yy144 = OE_Default;}
 
177715 break;
177716 case 74: /* onconf ::= ON CONFLICT resolvetype */
 
177717 {yymsp[-2].minor.yy144 = yymsp[0].minor.yy144;}
 
177718 break;
177719 case 77: /* resolvetype ::= IGNORE */
 
177720 {yymsp[0].minor.yy144 = OE_Ignore;}
 
177721 break;
177722 case 78: /* resolvetype ::= REPLACE */
177723 case 174: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==174);
 
177724 {yymsp[0].minor.yy144 = OE_Replace;}
 
177725 break;
177726 case 79: /* cmd ::= DROP TABLE ifexists fullname */
 
177727 {
177728 sqlite3DropTable(pParse, yymsp[0].minor.yy203, 0, yymsp[-1].minor.yy144);
177729 }
 
177730 break;
177731 case 82: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
 
177732 {
177733 sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[0].minor.yy555, yymsp[-7].minor.yy144, yymsp[-5].minor.yy144);
177734 }
 
177735 break;
177736 case 83: /* cmd ::= DROP VIEW ifexists fullname */
 
177737 {
177738 sqlite3DropTable(pParse, yymsp[0].minor.yy203, 1, yymsp[-1].minor.yy144);
177739 }
 
177740 break;
177741 case 84: /* cmd ::= select */
 
177742 {
177743 SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0, 0};
177744 if( (pParse->db->mDbFlags & DBFLAG_EncodingFixed)!=0
177745 || sqlite3ReadSchema(pParse)==SQLITE_OK
177746 ){
177747 sqlite3Select(pParse, yymsp[0].minor.yy555, &dest);
177748 }
177749 sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy555);
177750 }
 
177751 break;
177752 case 85: /* select ::= WITH wqlist selectnowith */
 
177753 {yymsp[-2].minor.yy555 = attachWithToSelect(pParse,yymsp[0].minor.yy555,yymsp[-1].minor.yy59);}
 
177754 break;
177755 case 86: /* select ::= WITH RECURSIVE wqlist selectnowith */
 
177756 {yymsp[-3].minor.yy555 = attachWithToSelect(pParse,yymsp[0].minor.yy555,yymsp[-1].minor.yy59);}
 
177757 break;
177758 case 87: /* select ::= selectnowith */
 
177759 {
177760 Select *p = yymsp[0].minor.yy555;
177761 if( p ){
177762 parserDoubleLinkSelect(pParse, p);
177763 }
177764 }
 
177765 break;
177766 case 88: /* selectnowith ::= selectnowith multiselect_op oneselect */
 
177767 {
177768 Select *pRhs = yymsp[0].minor.yy555;
177769 Select *pLhs = yymsp[-2].minor.yy555;
177770 if( pRhs && pRhs->pPrior ){
177771 SrcList *pFrom;
@@ -178064,175 +177784,131 @@
177784 }else{
177785 sqlite3SelectDelete(pParse->db, pLhs);
177786 }
177787 yymsp[-2].minor.yy555 = pRhs;
177788 }
 
177789 break;
177790 case 89: /* multiselect_op ::= UNION */
177791 case 91: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==91);
 
177792 {yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-OP*/}
 
177793 break;
177794 case 90: /* multiselect_op ::= UNION ALL */
 
177795 {yymsp[-1].minor.yy144 = TK_ALL;}
 
177796 break;
177797 case 92: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
 
177798 {
177799 yymsp[-8].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy14,yymsp[-5].minor.yy203,yymsp[-4].minor.yy454,yymsp[-3].minor.yy14,yymsp[-2].minor.yy454,yymsp[-1].minor.yy14,yymsp[-7].minor.yy144,yymsp[0].minor.yy454);
177800 }
 
177801 break;
177802 case 93: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
 
177803 {
177804 yymsp[-9].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy14,yymsp[-6].minor.yy203,yymsp[-5].minor.yy454,yymsp[-4].minor.yy14,yymsp[-3].minor.yy454,yymsp[-1].minor.yy14,yymsp[-8].minor.yy144,yymsp[0].minor.yy454);
177805 if( yymsp[-9].minor.yy555 ){
177806 yymsp[-9].minor.yy555->pWinDefn = yymsp[-2].minor.yy211;
177807 }else{
177808 sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy211);
177809 }
177810 }
 
177811 break;
177812 case 94: /* values ::= VALUES LP nexprlist RP */
 
177813 {
177814 yymsp[-3].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy14,0,0,0,0,0,SF_Values,0);
177815 }
 
177816 break;
177817 case 95: /* oneselect ::= mvalues */
 
177818 {
177819 sqlite3MultiValuesEnd(pParse, yymsp[0].minor.yy555);
177820 }
 
177821 break;
177822 case 96: /* mvalues ::= values COMMA LP nexprlist RP */
177823 case 97: /* mvalues ::= mvalues COMMA LP nexprlist RP */ yytestcase(yyruleno==97);
 
177824 {
177825 yymsp[-4].minor.yy555 = sqlite3MultiValues(pParse, yymsp[-4].minor.yy555, yymsp[-1].minor.yy14);
177826 }
 
177827 break;
177828 case 98: /* distinct ::= DISTINCT */
 
177829 {yymsp[0].minor.yy144 = SF_Distinct;}
 
177830 break;
177831 case 99: /* distinct ::= ALL */
 
177832 {yymsp[0].minor.yy144 = SF_All;}
 
177833 break;
177834 case 101: /* sclp ::= */
177835 case 134: /* orderby_opt ::= */ yytestcase(yyruleno==134);
177836 case 144: /* groupby_opt ::= */ yytestcase(yyruleno==144);
177837 case 234: /* exprlist ::= */ yytestcase(yyruleno==234);
177838 case 237: /* paren_exprlist ::= */ yytestcase(yyruleno==237);
177839 case 242: /* eidlist_opt ::= */ yytestcase(yyruleno==242);
 
177840 {yymsp[1].minor.yy14 = 0;}
 
177841 break;
177842 case 102: /* selcollist ::= sclp scanpt expr scanpt as */
 
177843 {
177844 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[-2].minor.yy454);
177845 if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy14, &yymsp[0].minor.yy0, 1);
177846 sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy14,yymsp[-3].minor.yy168,yymsp[-1].minor.yy168);
177847 }
 
177848 break;
177849 case 103: /* selcollist ::= sclp scanpt STAR */
 
177850 {
177851 Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
177852 sqlite3ExprSetErrorOffset(p, (int)(yymsp[0].minor.yy0.z - pParse->zTail));
177853 yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy14, p);
177854 }
 
177855 break;
177856 case 104: /* selcollist ::= sclp scanpt nm DOT STAR */
 
177857 {
177858 Expr *pRight, *pLeft, *pDot;
177859 pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
177860 sqlite3ExprSetErrorOffset(pRight, (int)(yymsp[0].minor.yy0.z - pParse->zTail));
177861 pLeft = tokenExpr(pParse, TK_ID, yymsp[-2].minor.yy0);
177862 pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
177863 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, pDot);
177864 }
 
177865 break;
177866 case 105: /* as ::= AS nm */
177867 case 117: /* dbnm ::= DOT nm */ yytestcase(yyruleno==117);
177868 case 258: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==258);
177869 case 259: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==259);
 
177870 {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
 
177871 break;
177872 case 107: /* from ::= */
177873 case 110: /* stl_prefix ::= */ yytestcase(yyruleno==110);
 
177874 {yymsp[1].minor.yy203 = 0;}
 
177875 break;
177876 case 108: /* from ::= FROM seltablist */
 
177877 {
177878 yymsp[-1].minor.yy203 = yymsp[0].minor.yy203;
177879 sqlite3SrcListShiftJoinType(pParse,yymsp[-1].minor.yy203);
177880 }
 
177881 break;
177882 case 109: /* stl_prefix ::= seltablist joinop */
 
177883 {
177884 if( ALWAYS(yymsp[-1].minor.yy203 && yymsp[-1].minor.yy203->nSrc>0) ) yymsp[-1].minor.yy203->a[yymsp[-1].minor.yy203->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy144;
177885 }
 
177886 break;
177887 case 111: /* seltablist ::= stl_prefix nm dbnm as on_using */
 
177888 {
177889 yymsp[-4].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-4].minor.yy203,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
177890 }
 
177891 break;
177892 case 112: /* seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
 
177893 {
177894 yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,0,&yymsp[0].minor.yy269);
177895 sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy203, &yymsp[-1].minor.yy0);
177896 }
 
177897 break;
177898 case 113: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
 
177899 {
177900 yymsp[-7].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-7].minor.yy203,&yymsp[-6].minor.yy0,&yymsp[-5].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
177901 sqlite3SrcListFuncArgs(pParse, yymsp[-7].minor.yy203, yymsp[-3].minor.yy14);
177902 }
 
177903 break;
177904 case 114: /* seltablist ::= stl_prefix LP select RP as on_using */
 
177905 {
177906 yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,yymsp[-3].minor.yy555,&yymsp[0].minor.yy269);
177907 }
 
177908 break;
177909 case 115: /* seltablist ::= stl_prefix LP seltablist RP as on_using */
 
177910 {
177911 if( yymsp[-5].minor.yy203==0 && yymsp[-1].minor.yy0.n==0 && yymsp[0].minor.yy269.pOn==0 && yymsp[0].minor.yy269.pUsing==0 ){
177912 yymsp[-5].minor.yy203 = yymsp[-3].minor.yy203;
177913 }else if( ALWAYS(yymsp[-3].minor.yy203!=0) && yymsp[-3].minor.yy203->nSrc==1 ){
177914 yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
@@ -178269,210 +177945,144 @@
177945 sqlite3SrcListShiftJoinType(pParse,yymsp[-3].minor.yy203);
177946 pSubquery = sqlite3SelectNew(pParse,0,yymsp[-3].minor.yy203,0,0,0,0,SF_NestedFrom,0);
177947 yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,pSubquery,&yymsp[0].minor.yy269);
177948 }
177949 }
 
177950 break;
177951 case 116: /* dbnm ::= */
177952 case 131: /* indexed_opt ::= */ yytestcase(yyruleno==131);
 
177953 {yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
 
177954 break;
177955 case 118: /* fullname ::= nm */
 
177956 {
177957 yylhsminor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
177958 if( IN_RENAME_OBJECT && yylhsminor.yy203 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy203->a[0].zName, &yymsp[0].minor.yy0);
177959 }
 
177960 yymsp[0].minor.yy203 = yylhsminor.yy203;
177961 break;
177962 case 119: /* fullname ::= nm DOT nm */
 
177963 {
177964 yylhsminor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
177965 if( IN_RENAME_OBJECT && yylhsminor.yy203 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy203->a[0].zName, &yymsp[0].minor.yy0);
177966 }
 
177967 yymsp[-2].minor.yy203 = yylhsminor.yy203;
177968 break;
177969 case 120: /* xfullname ::= nm */
 
177970 {yymsp[0].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
 
177971 break;
177972 case 121: /* xfullname ::= nm DOT nm */
 
177973 {yymsp[-2].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
 
177974 break;
177975 case 122: /* xfullname ::= nm DOT nm AS nm */
 
177976 {
177977 yymsp[-4].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
177978 if( yymsp[-4].minor.yy203 ) yymsp[-4].minor.yy203->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
177979 }
 
177980 break;
177981 case 123: /* xfullname ::= nm AS nm */
 
177982 {
177983 yymsp[-2].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
177984 if( yymsp[-2].minor.yy203 ) yymsp[-2].minor.yy203->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
177985 }
 
177986 break;
177987 case 124: /* joinop ::= COMMA|JOIN */
 
177988 { yymsp[0].minor.yy144 = JT_INNER; }
 
177989 break;
177990 case 125: /* joinop ::= JOIN_KW JOIN */
 
177991 {yymsp[-1].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); /*X-overwrites-A*/}
 
177992 break;
177993 case 126: /* joinop ::= JOIN_KW nm JOIN */
 
177994 {yymsp[-2].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
 
177995 break;
177996 case 127: /* joinop ::= JOIN_KW nm nm JOIN */
 
177997 {yymsp[-3].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
 
177998 break;
177999 case 128: /* on_using ::= ON expr */
 
178000 {yymsp[-1].minor.yy269.pOn = yymsp[0].minor.yy454; yymsp[-1].minor.yy269.pUsing = 0;}
 
178001 break;
178002 case 129: /* on_using ::= USING LP idlist RP */
 
178003 {yymsp[-3].minor.yy269.pOn = 0; yymsp[-3].minor.yy269.pUsing = yymsp[-1].minor.yy132;}
 
178004 break;
178005 case 130: /* on_using ::= */
 
178006 {yymsp[1].minor.yy269.pOn = 0; yymsp[1].minor.yy269.pUsing = 0;}
 
178007 break;
178008 case 132: /* indexed_by ::= INDEXED BY nm */
 
178009 {yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
 
178010 break;
178011 case 133: /* indexed_by ::= NOT INDEXED */
 
178012 {yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
 
178013 break;
178014 case 135: /* orderby_opt ::= ORDER BY sortlist */
178015 case 145: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==145);
 
178016 {yymsp[-2].minor.yy14 = yymsp[0].minor.yy14;}
 
178017 break;
178018 case 136: /* sortlist ::= sortlist COMMA expr sortorder nulls */
 
178019 {
178020 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14,yymsp[-2].minor.yy454);
178021 sqlite3ExprListSetSortOrder(yymsp[-4].minor.yy14,yymsp[-1].minor.yy144,yymsp[0].minor.yy144);
178022 }
 
178023 break;
178024 case 137: /* sortlist ::= expr sortorder nulls */
 
178025 {
178026 yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[-2].minor.yy454); /*A-overwrites-Y*/
178027 sqlite3ExprListSetSortOrder(yymsp[-2].minor.yy14,yymsp[-1].minor.yy144,yymsp[0].minor.yy144);
178028 }
 
178029 break;
178030 case 138: /* sortorder ::= ASC */
 
178031 {yymsp[0].minor.yy144 = SQLITE_SO_ASC;}
 
178032 break;
178033 case 139: /* sortorder ::= DESC */
 
178034 {yymsp[0].minor.yy144 = SQLITE_SO_DESC;}
 
178035 break;
178036 case 140: /* sortorder ::= */
178037 case 143: /* nulls ::= */ yytestcase(yyruleno==143);
 
178038 {yymsp[1].minor.yy144 = SQLITE_SO_UNDEFINED;}
 
178039 break;
178040 case 141: /* nulls ::= NULLS FIRST */
 
178041 {yymsp[-1].minor.yy144 = SQLITE_SO_ASC;}
 
178042 break;
178043 case 142: /* nulls ::= NULLS LAST */
 
178044 {yymsp[-1].minor.yy144 = SQLITE_SO_DESC;}
 
178045 break;
178046 case 146: /* having_opt ::= */
178047 case 148: /* limit_opt ::= */ yytestcase(yyruleno==148);
178048 case 153: /* where_opt ::= */ yytestcase(yyruleno==153);
178049 case 155: /* where_opt_ret ::= */ yytestcase(yyruleno==155);
178050 case 232: /* case_else ::= */ yytestcase(yyruleno==232);
178051 case 233: /* case_operand ::= */ yytestcase(yyruleno==233);
178052 case 252: /* vinto ::= */ yytestcase(yyruleno==252);
 
178053 {yymsp[1].minor.yy454 = 0;}
 
178054 break;
178055 case 147: /* having_opt ::= HAVING expr */
178056 case 154: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==154);
178057 case 156: /* where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==156);
178058 case 231: /* case_else ::= ELSE expr */ yytestcase(yyruleno==231);
178059 case 251: /* vinto ::= INTO expr */ yytestcase(yyruleno==251);
 
178060 {yymsp[-1].minor.yy454 = yymsp[0].minor.yy454;}
 
178061 break;
178062 case 149: /* limit_opt ::= LIMIT expr */
 
178063 {yymsp[-1].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy454,0);}
 
178064 break;
178065 case 150: /* limit_opt ::= LIMIT expr OFFSET expr */
 
178066 {yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
 
178067 break;
178068 case 151: /* limit_opt ::= LIMIT expr COMMA expr */
 
178069 {yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy454,yymsp[-2].minor.yy454);}
 
178070 break;
178071 case 152: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
 
178072 {
178073 sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy203, &yymsp[-1].minor.yy0);
178074 sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy203,yymsp[0].minor.yy454,0,0);
178075 }
 
178076 break;
178077 case 157: /* where_opt_ret ::= RETURNING selcollist */
 
178078 {sqlite3AddReturning(pParse,yymsp[0].minor.yy14); yymsp[-1].minor.yy454 = 0;}
 
178079 break;
178080 case 158: /* where_opt_ret ::= WHERE expr RETURNING selcollist */
 
178081 {sqlite3AddReturning(pParse,yymsp[0].minor.yy14); yymsp[-3].minor.yy454 = yymsp[-2].minor.yy454;}
 
178082 break;
178083 case 159: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
 
178084 {
178085 sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy203, &yymsp[-4].minor.yy0);
178086 sqlite3ExprListCheckLength(pParse,yymsp[-2].minor.yy14,"set list");
178087 if( yymsp[-1].minor.yy203 ){
178088 SrcList *pFromClause = yymsp[-1].minor.yy203;
@@ -178486,134 +178096,92 @@
178096 }
178097 yymsp[-5].minor.yy203 = sqlite3SrcListAppendList(pParse, yymsp[-5].minor.yy203, pFromClause);
178098 }
178099 sqlite3Update(pParse,yymsp[-5].minor.yy203,yymsp[-2].minor.yy14,yymsp[0].minor.yy454,yymsp[-6].minor.yy144,0,0,0);
178100 }
 
178101 break;
178102 case 160: /* setlist ::= setlist COMMA nm EQ expr */
 
178103 {
178104 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[0].minor.yy454);
178105 sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy14, &yymsp[-2].minor.yy0, 1);
178106 }
 
178107 break;
178108 case 161: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
 
178109 {
178110 yymsp[-6].minor.yy14 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy14, yymsp[-3].minor.yy132, yymsp[0].minor.yy454);
178111 }
 
178112 break;
178113 case 162: /* setlist ::= nm EQ expr */
 
178114 {
178115 yylhsminor.yy14 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy454);
178116 sqlite3ExprListSetName(pParse, yylhsminor.yy14, &yymsp[-2].minor.yy0, 1);
178117 }
 
178118 yymsp[-2].minor.yy14 = yylhsminor.yy14;
178119 break;
178120 case 163: /* setlist ::= LP idlist RP EQ expr */
 
178121 {
178122 yymsp[-4].minor.yy14 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy132, yymsp[0].minor.yy454);
178123 }
 
178124 break;
178125 case 164: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
 
178126 {
178127 sqlite3Insert(pParse, yymsp[-3].minor.yy203, yymsp[-1].minor.yy555, yymsp[-2].minor.yy132, yymsp[-5].minor.yy144, yymsp[0].minor.yy122);
178128 }
 
178129 break;
178130 case 165: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
 
178131 {
178132 sqlite3Insert(pParse, yymsp[-4].minor.yy203, 0, yymsp[-3].minor.yy132, yymsp[-6].minor.yy144, 0);
178133 }
 
178134 break;
178135 case 166: /* upsert ::= */
 
178136 { yymsp[1].minor.yy122 = 0; }
 
178137 break;
178138 case 167: /* upsert ::= RETURNING selcollist */
 
178139 { yymsp[-1].minor.yy122 = 0; sqlite3AddReturning(pParse,yymsp[0].minor.yy14); }
 
178140 break;
178141 case 168: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
 
178142 { yymsp[-11].minor.yy122 = sqlite3UpsertNew(pParse->db,yymsp[-8].minor.yy14,yymsp[-6].minor.yy454,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454,yymsp[0].minor.yy122);}
 
178143 break;
178144 case 169: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
 
178145 { yymsp[-8].minor.yy122 = sqlite3UpsertNew(pParse->db,yymsp[-5].minor.yy14,yymsp[-3].minor.yy454,0,0,yymsp[0].minor.yy122); }
 
178146 break;
178147 case 170: /* upsert ::= ON CONFLICT DO NOTHING returning */
 
178148 { yymsp[-4].minor.yy122 = sqlite3UpsertNew(pParse->db,0,0,0,0,0); }
 
178149 break;
178150 case 171: /* upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
 
178151 { yymsp[-7].minor.yy122 = sqlite3UpsertNew(pParse->db,0,0,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454,0);}
 
178152 break;
178153 case 172: /* returning ::= RETURNING selcollist */
 
178154 {sqlite3AddReturning(pParse,yymsp[0].minor.yy14);}
 
178155 break;
178156 case 175: /* idlist_opt ::= */
 
178157 {yymsp[1].minor.yy132 = 0;}
 
178158 break;
178159 case 176: /* idlist_opt ::= LP idlist RP */
 
178160 {yymsp[-2].minor.yy132 = yymsp[-1].minor.yy132;}
 
178161 break;
178162 case 177: /* idlist ::= idlist COMMA nm */
 
178163 {yymsp[-2].minor.yy132 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy132,&yymsp[0].minor.yy0);}
 
178164 break;
178165 case 178: /* idlist ::= nm */
 
178166 {yymsp[0].minor.yy132 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
 
178167 break;
178168 case 179: /* expr ::= LP expr RP */
 
178169 {yymsp[-2].minor.yy454 = yymsp[-1].minor.yy454;}
 
178170 break;
178171 case 180: /* expr ::= ID|INDEXED|JOIN_KW */
 
178172 {yymsp[0].minor.yy454=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
 
178173 break;
178174 case 181: /* expr ::= nm DOT nm */
 
178175 {
178176 Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);
178177 Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);
178178 yylhsminor.yy454 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
178179 }
 
178180 yymsp[-2].minor.yy454 = yylhsminor.yy454;
178181 break;
178182 case 182: /* expr ::= nm DOT nm DOT nm */
 
178183 {
178184 Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-4].minor.yy0);
178185 Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);
178186 Expr *temp3 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);
178187 Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
@@ -178620,30 +178188,24 @@
178188 if( IN_RENAME_OBJECT ){
178189 sqlite3RenameTokenRemap(pParse, 0, temp1);
178190 }
178191 yylhsminor.yy454 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
178192 }
 
178193 yymsp[-4].minor.yy454 = yylhsminor.yy454;
178194 break;
178195 case 183: /* term ::= NULL|FLOAT|BLOB */
178196 case 184: /* term ::= STRING */ yytestcase(yyruleno==184);
 
178197 {yymsp[0].minor.yy454=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
 
178198 break;
178199 case 185: /* term ::= INTEGER */
 
178200 {
178201 yylhsminor.yy454 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
178202 if( yylhsminor.yy454 ) yylhsminor.yy454->w.iOfst = (int)(yymsp[0].minor.yy0.z - pParse->zTail);
178203 }
 
178204 yymsp[0].minor.yy454 = yylhsminor.yy454;
178205 break;
178206 case 186: /* expr ::= VARIABLE */
 
178207 {
178208 if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
178209 u32 n = yymsp[0].minor.yy0.n;
178210 yymsp[0].minor.yy454 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
178211 sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy454, n);
@@ -178660,90 +178222,70 @@
178222 yymsp[0].minor.yy454 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
178223 if( yymsp[0].minor.yy454 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy454->iTable);
178224 }
178225 }
178226 }
 
178227 break;
178228 case 187: /* expr ::= expr COLLATE ID|STRING */
 
178229 {
178230 yymsp[-2].minor.yy454 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy454, &yymsp[0].minor.yy0, 1);
178231 }
 
178232 break;
178233 case 188: /* expr ::= CAST LP expr AS typetoken RP */
 
178234 {
178235 yymsp[-5].minor.yy454 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
178236 sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy454, yymsp[-3].minor.yy454, 0);
178237 }
 
178238 break;
178239 case 189: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */
 
178240 {
178241 yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy14, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy144);
178242 }
 
178243 yymsp[-4].minor.yy454 = yylhsminor.yy454;
178244 break;
178245 case 190: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */
 
178246 {
178247 yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-4].minor.yy14, &yymsp[-7].minor.yy0, yymsp[-5].minor.yy144);
178248 sqlite3ExprAddFunctionOrderBy(pParse, yylhsminor.yy454, yymsp[-1].minor.yy14);
178249 }
 
178250 yymsp[-7].minor.yy454 = yylhsminor.yy454;
178251 break;
178252 case 191: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP */
 
178253 {
178254 yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
178255 }
 
178256 yymsp[-3].minor.yy454 = yylhsminor.yy454;
178257 break;
178258 case 192: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */
 
178259 {
178260 yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy14, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy144);
178261 sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
178262 }
 
178263 yymsp[-5].minor.yy454 = yylhsminor.yy454;
178264 break;
178265 case 193: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */
 
178266 {
178267 yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-5].minor.yy14, &yymsp[-8].minor.yy0, yymsp[-6].minor.yy144);
178268 sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
178269 sqlite3ExprAddFunctionOrderBy(pParse, yylhsminor.yy454, yymsp[-2].minor.yy14);
178270 }
 
178271 yymsp[-8].minor.yy454 = yylhsminor.yy454;
178272 break;
178273 case 194: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */
 
178274 {
178275 yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
178276 sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
178277 }
 
178278 yymsp[-4].minor.yy454 = yylhsminor.yy454;
178279 break;
178280 case 195: /* term ::= CTIME_KW */
 
178281 {
178282 yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
178283 }
 
178284 yymsp[0].minor.yy454 = yylhsminor.yy454;
178285 break;
178286 case 196: /* expr ::= LP nexprlist COMMA expr RP */
 
178287 {
178288 ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy14, yymsp[-1].minor.yy454);
178289 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
178290 if( yymsp[-4].minor.yy454 ){
178291 yymsp[-4].minor.yy454->x.pList = pList;
@@ -178752,35 +178294,27 @@
178294 }
178295 }else{
178296 sqlite3ExprListDelete(pParse->db, pList);
178297 }
178298 }
 
178299 break;
178300 case 197: /* expr ::= expr AND expr */
 
178301 {yymsp[-2].minor.yy454=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
 
178302 break;
178303 case 198: /* expr ::= expr OR expr */
178304 case 199: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==199);
178305 case 200: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==200);
178306 case 201: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==201);
178307 case 202: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==202);
178308 case 203: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==203);
178309 case 204: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==204);
 
178310 {yymsp[-2].minor.yy454=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
 
178311 break;
178312 case 205: /* likeop ::= NOT LIKE_KW|MATCH */
 
178313 {yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
 
178314 break;
178315 case 206: /* expr ::= expr likeop expr */
 
178316 {
178317 ExprList *pList;
178318 int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
178319 yymsp[-1].minor.yy0.n &= 0x7fffffff;
178320 pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy454);
@@ -178787,14 +178321,12 @@
178321 pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy454);
178322 yymsp[-2].minor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
178323 if( bNot ) yymsp[-2].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy454, 0);
178324 if( yymsp[-2].minor.yy454 ) yymsp[-2].minor.yy454->flags |= EP_InfixFunc;
178325 }
 
178326 break;
178327 case 207: /* expr ::= expr likeop expr ESCAPE expr */
 
178328 {
178329 ExprList *pList;
178330 int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
178331 yymsp[-3].minor.yy0.n &= 0x7fffffff;
178332 pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
@@ -178802,62 +178334,46 @@
178334 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy454);
178335 yymsp[-4].minor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
178336 if( bNot ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178337 if( yymsp[-4].minor.yy454 ) yymsp[-4].minor.yy454->flags |= EP_InfixFunc;
178338 }
 
178339 break;
178340 case 208: /* expr ::= expr ISNULL|NOTNULL */
 
178341 {yymsp[-1].minor.yy454 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy454,0);}
 
178342 break;
178343 case 209: /* expr ::= expr NOT NULL */
 
178344 {yymsp[-2].minor.yy454 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy454,0);}
 
178345 break;
178346 case 210: /* expr ::= expr IS expr */
 
178347 {
178348 yymsp[-2].minor.yy454 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);
178349 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-2].minor.yy454, TK_ISNULL);
178350 }
 
178351 break;
178352 case 211: /* expr ::= expr IS NOT expr */
 
178353 {
178354 yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy454,yymsp[0].minor.yy454);
178355 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-3].minor.yy454, TK_NOTNULL);
178356 }
 
178357 break;
178358 case 212: /* expr ::= expr IS NOT DISTINCT FROM expr */
 
178359 {
178360 yymsp[-5].minor.yy454 = sqlite3PExpr(pParse,TK_IS,yymsp[-5].minor.yy454,yymsp[0].minor.yy454);
178361 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-5].minor.yy454, TK_ISNULL);
178362 }
 
178363 break;
178364 case 213: /* expr ::= expr IS DISTINCT FROM expr */
 
178365 {
178366 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-4].minor.yy454,yymsp[0].minor.yy454);
178367 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-4].minor.yy454, TK_NOTNULL);
178368 }
 
178369 break;
178370 case 214: /* expr ::= NOT expr */
178371 case 215: /* expr ::= BITNOT expr */ yytestcase(yyruleno==215);
 
178372 {yymsp[-1].minor.yy454 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy454, 0);/*A-overwrites-B*/}
 
178373 break;
178374 case 216: /* expr ::= PLUS|MINUS expr */
 
178375 {
178376 Expr *p = yymsp[0].minor.yy454;
178377 u8 op = yymsp[-1].major + (TK_UPLUS-TK_PLUS);
178378 assert( TK_UPLUS>TK_PLUS );
178379 assert( TK_UMINUS == TK_MINUS + (TK_UPLUS - TK_PLUS) );
@@ -178867,30 +178383,24 @@
178383 }else{
178384 yymsp[-1].minor.yy454 = sqlite3PExpr(pParse, op, p, 0);
178385 /*A-overwrites-B*/
178386 }
178387 }
 
178388 break;
178389 case 217: /* expr ::= expr PTR expr */
 
178390 {
178391 ExprList *pList = sqlite3ExprListAppend(pParse, 0, yymsp[-2].minor.yy454);
178392 pList = sqlite3ExprListAppend(pParse, pList, yymsp[0].minor.yy454);
178393 yylhsminor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
178394 }
 
178395 yymsp[-2].minor.yy454 = yylhsminor.yy454;
178396 break;
178397 case 218: /* between_op ::= BETWEEN */
178398 case 221: /* in_op ::= IN */ yytestcase(yyruleno==221);
 
178399 {yymsp[0].minor.yy144 = 0;}
 
178400 break;
178401 case 220: /* expr ::= expr between_op expr AND expr */
 
178402 {
178403 ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
178404 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy454);
178405 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy454, 0);
178406 if( yymsp[-4].minor.yy454 ){
@@ -178898,14 +178408,12 @@
178408 }else{
178409 sqlite3ExprListDelete(pParse->db, pList);
178410 }
178411 if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178412 }
 
178413 break;
178414 case 223: /* expr ::= expr in_op LP exprlist RP */
 
178415 {
178416 if( yymsp[-1].minor.yy14==0 ){
178417 /* Expressions of the form
178418 **
178419 ** expr1 IN ()
@@ -178946,52 +178454,42 @@
178454 }
178455 }
178456 if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178457 }
178458 }
 
178459 break;
178460 case 224: /* expr ::= LP select RP */
 
178461 {
178462 yymsp[-2].minor.yy454 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
178463 sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy454, yymsp[-1].minor.yy555);
178464 }
 
178465 break;
178466 case 225: /* expr ::= expr in_op LP select RP */
 
178467 {
178468 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy454, 0);
178469 sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy454, yymsp[-1].minor.yy555);
178470 if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178471 }
 
178472 break;
178473 case 226: /* expr ::= expr in_op nm dbnm paren_exprlist */
 
178474 {
178475 SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
178476 Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
178477 if( yymsp[0].minor.yy14 ) sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy14);
178478 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy454, 0);
178479 sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy454, pSelect);
178480 if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
178481 }
 
178482 break;
178483 case 227: /* expr ::= EXISTS LP select RP */
 
178484 {
178485 Expr *p;
178486 p = yymsp[-3].minor.yy454 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
178487 sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy555);
178488 }
 
178489 break;
178490 case 228: /* expr ::= CASE case_operand case_exprlist case_else END */
 
178491 {
178492 yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy454, 0);
178493 if( yymsp[-4].minor.yy454 ){
178494 yymsp[-4].minor.yy454->x.pList = yymsp[-1].minor.yy454 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454) : yymsp[-2].minor.yy14;
178495 sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy454);
@@ -178998,627 +178496,446 @@
178496 }else{
178497 sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy14);
178498 sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy454);
178499 }
178500 }
 
178501 break;
178502 case 229: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
 
178503 {
178504 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, yymsp[-2].minor.yy454);
178505 yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, yymsp[0].minor.yy454);
178506 }
 
178507 break;
178508 case 230: /* case_exprlist ::= WHEN expr THEN expr */
 
178509 {
178510 yymsp[-3].minor.yy14 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
178511 yymsp[-3].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy14, yymsp[0].minor.yy454);
178512 }
 
178513 break;
178514 case 235: /* nexprlist ::= nexprlist COMMA expr */
 
178515 {yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy14,yymsp[0].minor.yy454);}
 
178516 break;
178517 case 236: /* nexprlist ::= expr */
 
178518 {yymsp[0].minor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy454); /*A-overwrites-Y*/}
 
178519 break;
178520 case 238: /* paren_exprlist ::= LP exprlist RP */
178521 case 243: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==243);
 
178522 {yymsp[-2].minor.yy14 = yymsp[-1].minor.yy14;}
 
178523 break;
178524 case 239: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
 
178525 {
178526 sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0,
178527 sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy14, yymsp[-10].minor.yy144,
178528 &yymsp[-11].minor.yy0, yymsp[0].minor.yy454, SQLITE_SO_ASC, yymsp[-8].minor.yy144, SQLITE_IDXTYPE_APPDEF);
178529 if( IN_RENAME_OBJECT && pParse->pNewIndex ){
178530 sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
178531 }
178532 }
 
178533 break;
178534 case 240: /* uniqueflag ::= UNIQUE */
178535 case 282: /* raisetype ::= ABORT */ yytestcase(yyruleno==282);
 
178536 {yymsp[0].minor.yy144 = OE_Abort;}
 
178537 break;
178538 case 241: /* uniqueflag ::= */
 
178539 {yymsp[1].minor.yy144 = OE_None;}
 
178540 break;
178541 case 244: /* eidlist ::= eidlist COMMA nm collate sortorder */
 
178542 {
178543 yymsp[-4].minor.yy14 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy14, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy144, yymsp[0].minor.yy144);
178544 }
 
178545 break;
178546 case 245: /* eidlist ::= nm collate sortorder */
 
178547 {
178548 yymsp[-2].minor.yy14 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy144, yymsp[0].minor.yy144); /*A-overwrites-Y*/
178549 }
 
178550 break;
178551 case 248: /* cmd ::= DROP INDEX ifexists fullname */
 
178552 {sqlite3DropIndex(pParse, yymsp[0].minor.yy203, yymsp[-1].minor.yy144);}
 
178553 break;
178554 case 249: /* cmd ::= VACUUM vinto */
 
178555 {sqlite3Vacuum(pParse,0,yymsp[0].minor.yy454);}
 
178556 break;
178557 case 250: /* cmd ::= VACUUM nm vinto */
 
178558 {sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy454);}
 
178559 break;
178560 case 253: /* cmd ::= PRAGMA nm dbnm */
 
178561 {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
 
178562 break;
178563 case 254: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
 
178564 {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
 
178565 break;
178566 case 255: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
 
178567 {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
 
178568 break;
178569 case 256: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
 
178570 {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
 
178571 break;
178572 case 257: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
 
178573 {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
 
178574 break;
178575 case 260: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
 
178576 {
178577 Token all;
178578 all.z = yymsp[-3].minor.yy0.z;
178579 all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
178580 sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy427, &all);
178581 }
 
178582 break;
178583 case 261: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
 
178584 {
178585 sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy144, yymsp[-4].minor.yy286.a, yymsp[-4].minor.yy286.b, yymsp[-2].minor.yy203, yymsp[0].minor.yy454, yymsp[-10].minor.yy144, yymsp[-8].minor.yy144);
178586 yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
178587 }
 
178588 break;
178589 case 262: /* trigger_time ::= BEFORE|AFTER */
 
178590 { yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-X*/ }
 
178591 break;
178592 case 263: /* trigger_time ::= INSTEAD OF */
 
178593 { yymsp[-1].minor.yy144 = TK_INSTEAD;}
 
178594 break;
178595 case 264: /* trigger_time ::= */
 
178596 { yymsp[1].minor.yy144 = TK_BEFORE; }
 
178597 break;
178598 case 265: /* trigger_event ::= DELETE|INSERT */
178599 case 266: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==266);
 
178600 {yymsp[0].minor.yy286.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy286.b = 0;}
 
178601 break;
178602 case 267: /* trigger_event ::= UPDATE OF idlist */
 
178603 {yymsp[-2].minor.yy286.a = TK_UPDATE; yymsp[-2].minor.yy286.b = yymsp[0].minor.yy132;}
 
178604 break;
178605 case 268: /* when_clause ::= */
178606 case 287: /* key_opt ::= */ yytestcase(yyruleno==287);
 
178607 { yymsp[1].minor.yy454 = 0; }
 
178608 break;
178609 case 269: /* when_clause ::= WHEN expr */
178610 case 288: /* key_opt ::= KEY expr */ yytestcase(yyruleno==288);
 
178611 { yymsp[-1].minor.yy454 = yymsp[0].minor.yy454; }
 
178612 break;
178613 case 270: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
 
178614 {
178615 assert( yymsp[-2].minor.yy427!=0 );
178616 yymsp[-2].minor.yy427->pLast->pNext = yymsp[-1].minor.yy427;
178617 yymsp[-2].minor.yy427->pLast = yymsp[-1].minor.yy427;
178618 }
 
178619 break;
178620 case 271: /* trigger_cmd_list ::= trigger_cmd SEMI */
 
178621 {
178622 assert( yymsp[-1].minor.yy427!=0 );
178623 yymsp[-1].minor.yy427->pLast = yymsp[-1].minor.yy427;
178624 }
 
178625 break;
178626 case 272: /* trnm ::= nm DOT nm */
 
178627 {
178628 yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
178629 sqlite3ErrorMsg(pParse,
178630 "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
178631 "statements within triggers");
178632 }
 
178633 break;
178634 case 273: /* tridxby ::= INDEXED BY nm */
 
178635 {
178636 sqlite3ErrorMsg(pParse,
178637 "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
178638 "within triggers");
178639 }
 
178640 break;
178641 case 274: /* tridxby ::= NOT INDEXED */
 
178642 {
178643 sqlite3ErrorMsg(pParse,
178644 "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
178645 "within triggers");
178646 }
 
178647 break;
178648 case 275: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
 
178649 {yylhsminor.yy427 = sqlite3TriggerUpdateStep(pParse, &yymsp[-6].minor.yy0, yymsp[-2].minor.yy203, yymsp[-3].minor.yy14, yymsp[-1].minor.yy454, yymsp[-7].minor.yy144, yymsp[-8].minor.yy0.z, yymsp[0].minor.yy168);}
 
178650 yymsp[-8].minor.yy427 = yylhsminor.yy427;
178651 break;
178652 case 276: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
 
178653 {
178654 yylhsminor.yy427 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy132,yymsp[-2].minor.yy555,yymsp[-6].minor.yy144,yymsp[-1].minor.yy122,yymsp[-7].minor.yy168,yymsp[0].minor.yy168);/*yylhsminor.yy427-overwrites-yymsp[-6].minor.yy144*/
178655 }
 
178656 yymsp[-7].minor.yy427 = yylhsminor.yy427;
178657 break;
178658 case 277: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
 
178659 {yylhsminor.yy427 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy454, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy168);}
 
178660 yymsp[-5].minor.yy427 = yylhsminor.yy427;
178661 break;
178662 case 278: /* trigger_cmd ::= scanpt select scanpt */
 
178663 {yylhsminor.yy427 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy555, yymsp[-2].minor.yy168, yymsp[0].minor.yy168); /*yylhsminor.yy427-overwrites-yymsp[-1].minor.yy555*/}
 
178664 yymsp[-2].minor.yy427 = yylhsminor.yy427;
178665 break;
178666 case 279: /* expr ::= RAISE LP IGNORE RP */
 
178667 {
178668 yymsp[-3].minor.yy454 = sqlite3PExpr(pParse, TK_RAISE, 0, 0);
178669 if( yymsp[-3].minor.yy454 ){
178670 yymsp[-3].minor.yy454->affExpr = OE_Ignore;
178671 }
178672 }
 
178673 break;
178674 case 280: /* expr ::= RAISE LP raisetype COMMA expr RP */
 
178675 {
178676 yymsp[-5].minor.yy454 = sqlite3PExpr(pParse, TK_RAISE, yymsp[-1].minor.yy454, 0);
178677 if( yymsp[-5].minor.yy454 ) {
178678 yymsp[-5].minor.yy454->affExpr = (char)yymsp[-3].minor.yy144;
178679 }
178680 }
 
178681 break;
178682 case 281: /* raisetype ::= ROLLBACK */
 
178683 {yymsp[0].minor.yy144 = OE_Rollback;}
 
178684 break;
178685 case 283: /* raisetype ::= FAIL */
 
178686 {yymsp[0].minor.yy144 = OE_Fail;}
 
178687 break;
178688 case 284: /* cmd ::= DROP TRIGGER ifexists fullname */
 
178689 {
178690 sqlite3DropTrigger(pParse,yymsp[0].minor.yy203,yymsp[-1].minor.yy144);
178691 }
 
178692 break;
178693 case 285: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
 
178694 {
178695 sqlite3Attach(pParse, yymsp[-3].minor.yy454, yymsp[-1].minor.yy454, yymsp[0].minor.yy454);
178696 }
 
178697 break;
178698 case 286: /* cmd ::= DETACH database_kw_opt expr */
 
178699 {
178700 sqlite3Detach(pParse, yymsp[0].minor.yy454);
178701 }
 
178702 break;
178703 case 289: /* cmd ::= REINDEX */
 
178704 {sqlite3Reindex(pParse, 0, 0);}
 
178705 break;
178706 case 290: /* cmd ::= REINDEX nm dbnm */
 
178707 {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
 
178708 break;
178709 case 291: /* cmd ::= ANALYZE */
 
178710 {sqlite3Analyze(pParse, 0, 0);}
 
178711 break;
178712 case 292: /* cmd ::= ANALYZE nm dbnm */
 
178713 {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
 
178714 break;
178715 case 293: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
 
178716 {
178717 sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy203,&yymsp[0].minor.yy0);
178718 }
 
178719 break;
178720 case 294: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
 
178721 {
178722 yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
178723 sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
178724 }
 
178725 break;
178726 case 295: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
 
178727 {
178728 sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy203, &yymsp[0].minor.yy0);
178729 }
 
178730 break;
178731 case 296: /* add_column_fullname ::= fullname */
 
178732 {
178733 disableLookaside(pParse);
178734 sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy203);
178735 }
 
178736 break;
178737 case 297: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
 
178738 {
178739 sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy203, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
178740 }
 
178741 break;
178742 case 298: /* cmd ::= create_vtab */
 
178743 {sqlite3VtabFinishParse(pParse,0);}
 
178744 break;
178745 case 299: /* cmd ::= create_vtab LP vtabarglist RP */
 
178746 {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
 
178747 break;
178748 case 300: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
 
178749 {
178750 sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy144);
178751 }
 
178752 break;
178753 case 301: /* vtabarg ::= */
 
178754 {sqlite3VtabArgInit(pParse);}
 
178755 break;
178756 case 302: /* vtabargtoken ::= ANY */
178757 case 303: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==303);
178758 case 304: /* lp ::= LP */ yytestcase(yyruleno==304);
 
178759 {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
 
178760 break;
178761 case 305: /* with ::= WITH wqlist */
178762 case 306: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==306);
 
178763 { sqlite3WithPush(pParse, yymsp[0].minor.yy59, 1); }
 
178764 break;
178765 case 307: /* wqas ::= AS */
 
178766 {yymsp[0].minor.yy462 = M10d_Any;}
 
178767 break;
178768 case 308: /* wqas ::= AS MATERIALIZED */
 
178769 {yymsp[-1].minor.yy462 = M10d_Yes;}
 
178770 break;
178771 case 309: /* wqas ::= AS NOT MATERIALIZED */
 
178772 {yymsp[-2].minor.yy462 = M10d_No;}
 
178773 break;
178774 case 310: /* wqitem ::= withnm eidlist_opt wqas LP select RP */
 
178775 {
178776 yymsp[-5].minor.yy67 = sqlite3CteNew(pParse, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy14, yymsp[-1].minor.yy555, yymsp[-3].minor.yy462); /*A-overwrites-X*/
178777 }
 
178778 break;
178779 case 311: /* withnm ::= nm */
 
178780 {pParse->bHasWith = 1;}
 
178781 break;
178782 case 312: /* wqlist ::= wqitem */
 
178783 {
178784 yymsp[0].minor.yy59 = sqlite3WithAdd(pParse, 0, yymsp[0].minor.yy67); /*A-overwrites-X*/
178785 }
 
178786 break;
178787 case 313: /* wqlist ::= wqlist COMMA wqitem */
 
178788 {
178789 yymsp[-2].minor.yy59 = sqlite3WithAdd(pParse, yymsp[-2].minor.yy59, yymsp[0].minor.yy67);
178790 }
 
178791 break;
178792 case 314: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
 
178793 {
178794 assert( yymsp[0].minor.yy211!=0 );
178795 sqlite3WindowChain(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy211);
178796 yymsp[0].minor.yy211->pNextWin = yymsp[-2].minor.yy211;
178797 yylhsminor.yy211 = yymsp[0].minor.yy211;
178798 }
 
178799 yymsp[-2].minor.yy211 = yylhsminor.yy211;
178800 break;
178801 case 315: /* windowdefn ::= nm AS LP window RP */
 
178802 {
178803 if( ALWAYS(yymsp[-1].minor.yy211) ){
178804 yymsp[-1].minor.yy211->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
178805 }
178806 yylhsminor.yy211 = yymsp[-1].minor.yy211;
178807 }
 
178808 yymsp[-4].minor.yy211 = yylhsminor.yy211;
178809 break;
178810 case 316: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
 
178811 {
178812 yymsp[-4].minor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy14, yymsp[-1].minor.yy14, 0);
178813 }
 
178814 break;
178815 case 317: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
 
178816 {
178817 yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy14, yymsp[-1].minor.yy14, &yymsp[-5].minor.yy0);
178818 }
 
178819 yymsp[-5].minor.yy211 = yylhsminor.yy211;
178820 break;
178821 case 318: /* window ::= ORDER BY sortlist frame_opt */
 
178822 {
178823 yymsp[-3].minor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, yymsp[-1].minor.yy14, 0);
178824 }
 
178825 break;
178826 case 319: /* window ::= nm ORDER BY sortlist frame_opt */
 
178827 {
178828 yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, yymsp[-1].minor.yy14, &yymsp[-4].minor.yy0);
178829 }
 
178830 yymsp[-4].minor.yy211 = yylhsminor.yy211;
178831 break;
178832 case 320: /* window ::= nm frame_opt */
 
178833 {
178834 yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, 0, &yymsp[-1].minor.yy0);
178835 }
 
178836 yymsp[-1].minor.yy211 = yylhsminor.yy211;
178837 break;
178838 case 321: /* frame_opt ::= */
 
178839 {
178840 yymsp[1].minor.yy211 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
178841 }
 
178842 break;
178843 case 322: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
 
178844 {
178845 yylhsminor.yy211 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy144, yymsp[-1].minor.yy509.eType, yymsp[-1].minor.yy509.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy462);
178846 }
 
178847 yymsp[-2].minor.yy211 = yylhsminor.yy211;
178848 break;
178849 case 323: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
 
178850 {
178851 yylhsminor.yy211 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy144, yymsp[-3].minor.yy509.eType, yymsp[-3].minor.yy509.pExpr, yymsp[-1].minor.yy509.eType, yymsp[-1].minor.yy509.pExpr, yymsp[0].minor.yy462);
178852 }
 
178853 yymsp[-5].minor.yy211 = yylhsminor.yy211;
178854 break;
178855 case 325: /* frame_bound_s ::= frame_bound */
178856 case 327: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==327);
 
178857 {yylhsminor.yy509 = yymsp[0].minor.yy509;}
 
178858 yymsp[0].minor.yy509 = yylhsminor.yy509;
178859 break;
178860 case 326: /* frame_bound_s ::= UNBOUNDED PRECEDING */
178861 case 328: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==328);
178862 case 330: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==330);
 
178863 {yylhsminor.yy509.eType = yymsp[-1].major; yylhsminor.yy509.pExpr = 0;}
 
178864 yymsp[-1].minor.yy509 = yylhsminor.yy509;
178865 break;
178866 case 329: /* frame_bound ::= expr PRECEDING|FOLLOWING */
 
178867 {yylhsminor.yy509.eType = yymsp[0].major; yylhsminor.yy509.pExpr = yymsp[-1].minor.yy454;}
 
178868 yymsp[-1].minor.yy509 = yylhsminor.yy509;
178869 break;
178870 case 331: /* frame_exclude_opt ::= */
 
178871 {yymsp[1].minor.yy462 = 0;}
 
178872 break;
178873 case 332: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
 
178874 {yymsp[-1].minor.yy462 = yymsp[0].minor.yy462;}
 
178875 break;
178876 case 333: /* frame_exclude ::= NO OTHERS */
178877 case 334: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==334);
 
178878 {yymsp[-1].minor.yy462 = yymsp[-1].major; /*A-overwrites-X*/}
 
178879 break;
178880 case 335: /* frame_exclude ::= GROUP|TIES */
 
178881 {yymsp[0].minor.yy462 = yymsp[0].major; /*A-overwrites-X*/}
 
178882 break;
178883 case 336: /* window_clause ::= WINDOW windowdefn_list */
 
178884 { yymsp[-1].minor.yy211 = yymsp[0].minor.yy211; }
 
178885 break;
178886 case 337: /* filter_over ::= filter_clause over_clause */
 
178887 {
178888 if( yymsp[0].minor.yy211 ){
178889 yymsp[0].minor.yy211->pFilter = yymsp[-1].minor.yy454;
178890 }else{
178891 sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy454);
178892 }
178893 yylhsminor.yy211 = yymsp[0].minor.yy211;
178894 }
 
178895 yymsp[-1].minor.yy211 = yylhsminor.yy211;
178896 break;
178897 case 338: /* filter_over ::= over_clause */
 
178898 {
178899 yylhsminor.yy211 = yymsp[0].minor.yy211;
178900 }
 
178901 yymsp[0].minor.yy211 = yylhsminor.yy211;
178902 break;
178903 case 339: /* filter_over ::= filter_clause */
 
178904 {
178905 yylhsminor.yy211 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
178906 if( yylhsminor.yy211 ){
178907 yylhsminor.yy211->eFrmType = TK_FILTER;
178908 yylhsminor.yy211->pFilter = yymsp[0].minor.yy454;
178909 }else{
178910 sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy454);
178911 }
178912 }
 
178913 yymsp[0].minor.yy211 = yylhsminor.yy211;
178914 break;
178915 case 340: /* over_clause ::= OVER LP window RP */
 
178916 {
178917 yymsp[-3].minor.yy211 = yymsp[-1].minor.yy211;
178918 assert( yymsp[-3].minor.yy211!=0 );
178919 }
 
178920 break;
178921 case 341: /* over_clause ::= OVER nm */
 
178922 {
178923 yymsp[-1].minor.yy211 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
178924 if( yymsp[-1].minor.yy211 ){
178925 yymsp[-1].minor.yy211->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
178926 }
178927 }
 
178928 break;
178929 case 342: /* filter_clause ::= FILTER LP WHERE expr RP */
 
178930 { yymsp[-4].minor.yy454 = yymsp[-1].minor.yy454; }
 
178931 break;
178932 case 343: /* term ::= QNUMBER */
 
178933 {
178934 yylhsminor.yy454=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0);
178935 sqlite3DequoteNumber(pParse, yylhsminor.yy454);
178936 }
 
178937 yymsp[0].minor.yy454 = yylhsminor.yy454;
178938 break;
178939 default:
178940 /* (344) input ::= cmdlist */ yytestcase(yyruleno==344);
178941 /* (345) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==345);
@@ -179742,19 +179059,17 @@
179059 ){
179060 sqlite3ParserARG_FETCH
179061 sqlite3ParserCTX_FETCH
179062 #define TOKEN yyminor
179063 /************ Begin %syntax_error code ****************************************/
 
179064
179065 UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
179066 if( TOKEN.z[0] ){
179067 sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
179068 }else{
179069 sqlite3ErrorMsg(pParse, "incomplete input");
179070 }
 
179071 /************ End %syntax_error code ******************************************/
179072 sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
179073 sqlite3ParserCTX_STORE
179074 }
179075
@@ -180022,11 +179337,10 @@
179337 #endif
179338 }
179339
179340 /************** End of parse.c ***********************************************/
179341 /************** Begin file tokenize.c ****************************************/
 
179342 /*
179343 ** 2001 September 15
179344 **
179345 ** The author disclaims copyright to this source code. In place of
179346 ** a legal notice, here is a blessing:
@@ -180172,11 +179486,10 @@
179486 ** named keywordhash.h and then included into this source file by
179487 ** the #include below.
179488 */
179489 /************** Include keywordhash.h in the middle of tokenize.c ************/
179490 /************** Begin file keywordhash.h *************************************/
 
179491 /***** This file contains automatically generated code ******
179492 **
179493 ** The code in this file has been automatically generated by
179494 **
179495 ** sqlite/tool/mkkeywordhash.c
@@ -180658,11 +179971,10 @@
179971 return TK_ID!=sqlite3KeywordCode((const u8*)zName, nName);
179972 }
179973
179974 /************** End of keywordhash.h *****************************************/
179975 /************** Continuing where we left off in tokenize.c *******************/
 
179976
179977
179978 /*
179979 ** If X is a character that can be used in an identifier then
179980 ** IdChar(X) will be true. Otherwise it is false.
@@ -181402,11 +180714,10 @@
180714 }
180715 #endif /* SQLITE_ENABLE_NORMALIZE */
180716
180717 /************** End of tokenize.c ********************************************/
180718 /************** Begin file complete.c ****************************************/
 
180719 /*
180720 ** 2001 September 15
180721 **
180722 ** The author disclaims copyright to this source code. In place of
180723 ** a legal notice, here is a blessing:
@@ -181696,11 +181007,10 @@
181007 #endif /* SQLITE_OMIT_UTF16 */
181008 #endif /* SQLITE_OMIT_COMPLETE */
181009
181010 /************** End of complete.c ********************************************/
181011 /************** Begin file main.c ********************************************/
 
181012 /*
181013 ** 2001 September 15
181014 **
181015 ** The author disclaims copyright to this source code. In place of
181016 ** a legal notice, here is a blessing:
@@ -181718,11 +181028,10 @@
181028 /* #include "sqliteInt.h" */
181029
181030 #ifdef SQLITE_ENABLE_FTS3
181031 /************** Include fts3.h in the middle of main.c ***********************/
181032 /************** Begin file fts3.h ********************************************/
 
181033 /*
181034 ** 2006 Oct 10
181035 **
181036 ** The author disclaims copyright to this source code. In place of
181037 ** a legal notice, here is a blessing:
@@ -181748,16 +181057,14 @@
181057 } /* extern "C" */
181058 #endif /* __cplusplus */
181059
181060 /************** End of fts3.h ************************************************/
181061 /************** Continuing where we left off in main.c ***********************/
 
181062 #endif
181063 #ifdef SQLITE_ENABLE_RTREE
181064 /************** Include rtree.h in the middle of main.c **********************/
181065 /************** Begin file rtree.h *******************************************/
 
181066 /*
181067 ** 2008 May 26
181068 **
181069 ** The author disclaims copyright to this source code. In place of
181070 ** a legal notice, here is a blessing:
@@ -181787,16 +181094,14 @@
181094 } /* extern "C" */
181095 #endif /* __cplusplus */
181096
181097 /************** End of rtree.h ***********************************************/
181098 /************** Continuing where we left off in main.c ***********************/
 
181099 #endif
181100 #if defined(SQLITE_ENABLE_ICU) || defined(SQLITE_ENABLE_ICU_COLLATIONS)
181101 /************** Include sqliteicu.h in the middle of main.c ******************/
181102 /************** Begin file sqliteicu.h ***************************************/
 
181103 /*
181104 ** 2008 May 26
181105 **
181106 ** The author disclaims copyright to this source code. In place of
181107 ** a legal notice, here is a blessing:
@@ -181822,11 +181127,10 @@
181127 } /* extern "C" */
181128 #endif /* __cplusplus */
181129
181130 /************** End of sqliteicu.h *******************************************/
181131 /************** Continuing where we left off in main.c ***********************/
 
181132 #endif
181133
181134 /*
181135 ** This is an extension initializer that is a no-op and always
181136 ** succeeds, except that it fails if the fault-simulation is set
@@ -184724,12 +184028,12 @@
184028 }
184029 oldLimit = db->aLimit[limitId];
184030 if( newLimit>=0 ){ /* IMP: R-52476-28732 */
184031 if( newLimit>aHardLimit[limitId] ){
184032 newLimit = aHardLimit[limitId]; /* IMP: R-51463-25634 */
184033 }else if( newLimit<SQLITE_MIN_LENGTH && limitId==SQLITE_LIMIT_LENGTH ){
184034 newLimit = SQLITE_MIN_LENGTH;
184035 }
184036 db->aLimit[limitId] = newLimit;
184037 }
184038 return oldLimit; /* IMP: R-53341-35419 */
184039 }
@@ -186873,11 +186177,10 @@
186177 }
186178 #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
186179
186180 /************** End of main.c ************************************************/
186181 /************** Begin file notify.c ******************************************/
 
186182 /*
186183 ** 2009 March 3
186184 **
186185 ** The author disclaims copyright to this source code. In place of
186186 ** a legal notice, here is a blessing:
@@ -187212,11 +186515,10 @@
186515 }
186516 #endif
186517
186518 /************** End of notify.c **********************************************/
186519 /************** Begin file fts3.c ********************************************/
 
186520 /*
186521 ** 2006 Oct 10
186522 **
186523 ** The author disclaims copyright to this source code. In place of
186524 ** a legal notice, here is a blessing:
@@ -187505,11 +186807,10 @@
186807 ** older data.
186808 */
186809
186810 /************** Include fts3Int.h in the middle of fts3.c ********************/
186811 /************** Begin file fts3Int.h *****************************************/
 
186812 /*
186813 ** 2009 Nov 12
186814 **
186815 ** The author disclaims copyright to this source code. In place of
186816 ** a legal notice, here is a blessing:
@@ -187552,11 +186853,10 @@
186853 #endif
186854
186855 /* #include "sqlite3.h" */
186856 /************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/
186857 /************** Begin file fts3_tokenizer.h **********************************/
 
186858 /*
186859 ** 2006 July 10
186860 **
186861 ** The author disclaims copyright to this source code.
186862 **
@@ -187717,14 +187017,12 @@
187017
187018 #endif /* _FTS3_TOKENIZER_H_ */
187019
187020 /************** End of fts3_tokenizer.h **************************************/
187021 /************** Continuing where we left off in fts3Int.h ********************/
 
187022 /************** Include fts3_hash.h in the middle of fts3Int.h ***************/
187023 /************** Begin file fts3_hash.h ***************************************/
 
187024 /*
187025 ** 2001 September 22
187026 **
187027 ** The author disclaims copyright to this source code. In place of
187028 ** a legal notice, here is a blessing:
@@ -187836,11 +187134,10 @@
187134
187135 #endif /* _FTS3_HASH_H_ */
187136
187137 /************** End of fts3_hash.h *******************************************/
187138 /************** Continuing where we left off in fts3Int.h ********************/
 
187139
187140 /*
187141 ** This constant determines the maximum depth of an FTS expression tree
187142 ** that the library will create and use. FTS uses recursion to perform
187143 ** various operations on the query tree, so the disadvantage of a large
@@ -188453,11 +187750,10 @@
187750 #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
187751 #endif /* _FTSINT_H */
187752
187753 /************** End of fts3Int.h *********************************************/
187754 /************** Continuing where we left off in fts3.c ***********************/
 
187755 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
187756
187757 #if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)
187758 # define SQLITE_CORE 1
187759 #endif
@@ -190509,14 +189805,19 @@
189805
189806 assert_fts3_nc( p!=0 && *p1!=0 && *p2!=0 );
189807 if( *p1==POS_COLUMN ){
189808 p1++;
189809 p1 += fts3GetVarint32(p1, &iCol1);
189810 /* iCol1==0 indicates corruption. Column 0 does not have a POS_COLUMN
189811 ** entry, so this is actually end-of-doclist. */
189812 if( iCol1==0 ) return 0;
189813 }
189814 if( *p2==POS_COLUMN ){
189815 p2++;
189816 p2 += fts3GetVarint32(p2, &iCol2);
189817 /* As above, iCol2==0 indicates corruption. */
189818 if( iCol2==0 ) return 0;
189819 }
189820
189821 while( 1 ){
189822 if( iCol1==iCol2 ){
189823 char *pSave = p;
@@ -193683,11 +192984,11 @@
192984 for(p=pExpr; p->pLeft; p=p->pLeft){
192985 assert( p->pRight->pPhrase->doclist.nList>0 );
192986 nTmp += p->pRight->pPhrase->doclist.nList;
192987 }
192988 nTmp += p->pPhrase->doclist.nList;
192989 aTmp = sqlite3_malloc64(nTmp*2 + FTS3_VARINT_MAX);
192990 if( !aTmp ){
192991 *pRc = SQLITE_NOMEM;
192992 res = 0;
192993 }else{
192994 char *aPoslist = p->pPhrase->doclist.pList;
@@ -194355,11 +193656,10 @@
193656
193657 #endif
193658
193659 /************** End of fts3.c ************************************************/
193660 /************** Begin file fts3_aux.c ****************************************/
 
193661 /*
193662 ** 2011 Jan 27
193663 **
193664 ** The author disclaims copyright to this source code. In place of
193665 ** a legal notice, here is a blessing:
@@ -194916,11 +194216,10 @@
194216
194217 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
194218
194219 /************** End of fts3_aux.c ********************************************/
194220 /************** Begin file fts3_expr.c ***************************************/
 
194221 /*
194222 ** 2008 Nov 28
194223 **
194224 ** The author disclaims copyright to this source code. In place of
194225 ** a legal notice, here is a blessing:
@@ -196213,11 +195512,10 @@
195512 #endif
195513 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
195514
195515 /************** End of fts3_expr.c *******************************************/
195516 /************** Begin file fts3_hash.c ***************************************/
 
195517 /*
195518 ** 2001 September 22
195519 **
195520 ** The author disclaims copyright to this source code. In place of
195521 ** a legal notice, here is a blessing:
@@ -196600,11 +195898,10 @@
195898
195899 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
195900
195901 /************** End of fts3_hash.c *******************************************/
195902 /************** Begin file fts3_porter.c *************************************/
 
195903 /*
195904 ** 2006 September 30
195905 **
195906 ** The author disclaims copyright to this source code. In place of
195907 ** a legal notice, here is a blessing:
@@ -197266,11 +196563,10 @@
196563
196564 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
196565
196566 /************** End of fts3_porter.c *****************************************/
196567 /************** Begin file fts3_tokenizer.c **********************************/
 
196568 /*
196569 ** 2007 June 22
196570 **
196571 ** The author disclaims copyright to this source code. In place of
196572 ** a legal notice, here is a blessing:
@@ -197786,11 +197082,10 @@
197082
197083 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
197084
197085 /************** End of fts3_tokenizer.c **************************************/
197086 /************** Begin file fts3_tokenizer1.c *********************************/
 
197087 /*
197088 ** 2006 Oct 10
197089 **
197090 ** The author disclaims copyright to this source code. In place of
197091 ** a legal notice, here is a blessing:
@@ -198024,11 +197319,10 @@
197319
197320 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
197321
197322 /************** End of fts3_tokenizer1.c *************************************/
197323 /************** Begin file fts3_tokenize_vtab.c ******************************/
 
197324 /*
197325 ** 2013 Apr 22
197326 **
197327 ** The author disclaims copyright to this source code. In place of
197328 ** a legal notice, here is a blessing:
@@ -198487,11 +197781,10 @@
197781
197782 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
197783
197784 /************** End of fts3_tokenize_vtab.c **********************************/
197785 /************** Begin file fts3_write.c **************************************/
 
197786 /*
197787 ** 2009 Oct 23
197788 **
197789 ** The author disclaims copyright to this source code. In place of
197790 ** a legal notice, here is a blessing:
@@ -204325,11 +203618,10 @@
203618
203619 #endif
203620
203621 /************** End of fts3_write.c ******************************************/
203622 /************** Begin file fts3_snippet.c ************************************/
 
203623 /*
203624 ** 2009 Oct 23
203625 **
203626 ** The author disclaims copyright to this source code. In place of
203627 ** a legal notice, here is a blessing:
@@ -206085,11 +205377,10 @@
205377
205378 #endif
205379
205380 /************** End of fts3_snippet.c ****************************************/
205381 /************** Begin file fts3_unicode.c ************************************/
 
205382 /*
205383 ** 2012 May 24
205384 **
205385 ** The author disclaims copyright to this source code. In place of
205386 ** a legal notice, here is a blessing:
@@ -206486,11 +205777,10 @@
205777 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
205778 #endif /* ifndef SQLITE_DISABLE_FTS3_UNICODE */
205779
205780 /************** End of fts3_unicode.c ****************************************/
205781 /************** Begin file fts3_unicode2.c ***********************************/
 
205782 /*
205783 ** 2012-05-25
205784 **
205785 ** The author disclaims copyright to this source code. In place of
205786 ** a legal notice, here is a blessing:
@@ -206873,11 +206163,10 @@
206163 #endif /* defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4) */
206164 #endif /* !defined(SQLITE_DISABLE_FTS3_UNICODE) */
206165
206166 /************** End of fts3_unicode2.c ***************************************/
206167 /************** Begin file json.c ********************************************/
 
206168 /*
206169 ** 2015-08-12
206170 **
206171 ** The author disclaims copyright to this source code. In place of
206172 ** a legal notice, here is a blessing:
@@ -212343,11 +211632,10 @@
211632 }
211633 #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) && !defined(SQLITE_OMIT_JSON) */
211634
211635 /************** End of json.c ************************************************/
211636 /************** Begin file rtree.c *******************************************/
 
211637 /*
211638 ** 2001 September 15
211639 **
211640 ** The author disclaims copyright to this source code. In place of
211641 ** a legal notice, here is a blessing:
@@ -216632,11 +215920,10 @@
215920
215921 /* Conditionally include the geopoly code */
215922 #ifdef SQLITE_ENABLE_GEOPOLY
215923 /************** Include geopoly.c in the middle of rtree.c *******************/
215924 /************** Begin file geopoly.c *****************************************/
 
215925 /*
215926 ** 2018-05-25
215927 **
215928 ** The author disclaims copyright to this source code. In place of
215929 ** a legal notice, here is a blessing:
@@ -218475,11 +217762,10 @@
217762 return rc;
217763 }
217764
217765 /************** End of geopoly.c *********************************************/
217766 /************** Continuing where we left off in rtree.c **********************/
 
217767 #endif
217768
217769 /*
217770 ** Register the r-tree module with database handle db. This creates the
217771 ** virtual table module "rtree" and the debugging/analysis scalar
@@ -218658,11 +217944,10 @@
217944
217945 #endif
217946
217947 /************** End of rtree.c ***********************************************/
217948 /************** Begin file icu.c *********************************************/
 
217949 /*
217950 ** 2007 May 6
217951 **
217952 ** The author disclaims copyright to this source code. In place of
217953 ** a legal notice, here is a blessing:
@@ -219250,11 +218535,10 @@
218535
218536 #endif
218537
218538 /************** End of icu.c *************************************************/
218539 /************** Begin file fts3_icu.c ****************************************/
 
218540 /*
218541 ** 2007 June 22
218542 **
218543 ** The author disclaims copyright to this source code. In place of
218544 ** a legal notice, here is a blessing:
@@ -219516,11 +218800,10 @@
218800 #endif /* defined(SQLITE_ENABLE_ICU) */
218801 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
218802
218803 /************** End of fts3_icu.c ********************************************/
218804 /************** Begin file sqlite3rbu.c **************************************/
 
218805 /*
218806 ** 2014 August 30
218807 **
218808 ** The author disclaims copyright to this source code. In place of
218809 ** a legal notice, here is a blessing:
@@ -219608,11 +218891,10 @@
218891 /* #include "sqlite3.h" */
218892
218893 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU)
218894 /************** Include sqlite3rbu.h in the middle of sqlite3rbu.c ***********/
218895 /************** Begin file sqlite3rbu.h **************************************/
 
218896 /*
218897 ** 2014 August 30
218898 **
218899 ** The author disclaims copyright to this source code. In place of
218900 ** a legal notice, here is a blessing:
@@ -220245,11 +219527,10 @@
219527
219528 #endif /* _SQLITE3RBU_H */
219529
219530 /************** End of sqlite3rbu.h ******************************************/
219531 /************** Continuing where we left off in sqlite3rbu.c *****************/
 
219532
219533 #if defined(_WIN32_WCE)
219534 /* #include "windows.h" */
219535 #endif
219536
@@ -225606,11 +224887,10 @@
224887
224888 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU) */
224889
224890 /************** End of sqlite3rbu.c ******************************************/
224891 /************** Begin file dbstat.c ******************************************/
 
224892 /*
224893 ** 2010 July 12
224894 **
224895 ** The author disclaims copyright to this source code. In place of
224896 ** a legal notice, here is a blessing:
@@ -226516,11 +225796,10 @@
225796 SQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3 *db){ return SQLITE_OK; }
225797 #endif /* SQLITE_ENABLE_DBSTAT_VTAB */
225798
225799 /************** End of dbstat.c **********************************************/
225800 /************** Begin file dbpage.c ******************************************/
 
225801 /*
225802 ** 2017-10-11
225803 **
225804 ** The author disclaims copyright to this source code. In place of
225805 ** a legal notice, here is a blessing:
@@ -226999,11 +226278,10 @@
226278 SQLITE_PRIVATE int sqlite3DbpageRegister(sqlite3 *db){ return SQLITE_OK; }
226279 #endif /* SQLITE_ENABLE_DBSTAT_VTAB */
226280
226281 /************** End of dbpage.c **********************************************/
226282 /************** Begin file sqlite3session.c **********************************/
 
226283
226284 #if defined(SQLITE_ENABLE_SESSION) && defined(SQLITE_ENABLE_PREUPDATE_HOOK)
226285 /* #include "sqlite3session.h" */
226286 /* #include <assert.h> */
226287 /* #include <string.h> */
@@ -233539,11 +232817,10 @@
232817
232818 #endif /* SQLITE_ENABLE_SESSION && SQLITE_ENABLE_PREUPDATE_HOOK */
232819
232820 /************** End of sqlite3session.c **************************************/
232821 /************** Begin file fts5.c ********************************************/
 
232822
232823 /*
232824 ** This, the "fts5.c" source file, is a composite file that is itself
232825 ** assembled from the following files:
232826 **
@@ -233577,11 +232854,10 @@
232854 /* #include <stdint.h> */
232855 #endif
232856 #ifdef HAVE_INTTYPES_H
232857 /* #include <inttypes.h> */
232858 #endif
 
232859 /*
232860 ** 2014 May 31
232861 **
232862 ** The author disclaims copyright to this source code. In place of
232863 ** a legal notice, here is a blessing:
@@ -234318,11 +233594,10 @@
233594 } /* end of the 'extern "C"' block */
233595 #endif
233596
233597 #endif /* _FTS5_H */
233598
 
233599 /*
233600 ** 2014 May 31
233601 **
233602 ** The author disclaims copyright to this source code. In place of
233603 ** a legal notice, here is a blessing:
@@ -235258,11 +234533,10 @@
234533 ** End of interface to code in fts5_unicode2.c.
234534 **************************************************************************/
234535
234536 #endif
234537
 
234538 #define FTS5_OR 1
234539 #define FTS5_AND 2
234540 #define FTS5_NOT 3
234541 #define FTS5_TERM 4
234542 #define FTS5_COLON 5
@@ -235275,11 +234549,10 @@
234549 #define FTS5_CARET 12
234550 #define FTS5_COMMA 13
234551 #define FTS5_PLUS 14
234552 #define FTS5_STAR 15
234553
 
234554 /* This file is automatically generated by Lemon from input grammar
234555 ** source file "fts5parse.y".
234556 */
234557 /*
234558 ** 2000-05-29
@@ -235304,11 +234577,10 @@
234577 **
234578 ** The following is the concatenation of all %include directives from the
234579 ** input grammar file:
234580 */
234581 /************ Begin %include sections from the grammar ************************/
 
234582
234583 /* #include "fts5Int.h" */
234584 /* #include "fts5parse.h" */
234585
234586 /*
@@ -235332,11 +234604,10 @@
234604 ** Alternative datatype for the argument to the malloc() routine passed
234605 ** into sqlite3ParserAlloc(). The default is size_t.
234606 */
234607 #define fts5YYMALLOCARGTYPE u64
234608
 
234609 /**************** End of %include directives **********************************/
234610 /* These constants specify the various numeric values for terminal symbols.
234611 ***************** Begin token definitions *************************************/
234612 #ifndef FTS5_OR
234613 #define FTS5_OR 1
@@ -235879,45 +235150,35 @@
235150 ** inside the C code.
235151 */
235152 /********* Begin destructor definitions ***************************************/
235153 case 16: /* input */
235154 {
 
235155 (void)pParse;
 
235156 }
235157 break;
235158 case 17: /* expr */
235159 case 18: /* cnearset */
235160 case 19: /* exprlist */
235161 {
 
235162 sqlite3Fts5ParseNodeFree((fts5yypminor->fts5yy24));
 
235163 }
235164 break;
235165 case 20: /* colset */
235166 case 21: /* colsetlist */
235167 {
 
235168 sqlite3_free((fts5yypminor->fts5yy11));
 
235169 }
235170 break;
235171 case 22: /* nearset */
235172 case 23: /* nearphrases */
235173 {
 
235174 sqlite3Fts5ParseNearsetFree((fts5yypminor->fts5yy46));
 
235175 }
235176 break;
235177 case 24: /* phrase */
235178 {
 
235179 sqlite3Fts5ParsePhraseFree((fts5yypminor->fts5yy53));
 
235180 }
235181 break;
235182 /********* End destructor definitions *****************************************/
235183 default: break; /* If no destructor action specified: do nothing */
235184 }
@@ -236148,14 +235409,12 @@
235409 #endif
235410 while( fts5yypParser->fts5yytos>fts5yypParser->fts5yystack ) fts5yy_pop_parser_stack(fts5yypParser);
235411 /* Here code is inserted which will execute if the parser
235412 ** stack every overflows */
235413 /******** Begin %stack_overflow code ******************************************/
 
235414
235415 sqlite3Fts5ParseError(pParse, "fts5: parser stack overflow");
 
235416 /******** End %stack_overflow code ********************************************/
235417 sqlite3Fts5ParserARG_STORE /* Suppress warning about unused %extra_argument var */
235418 sqlite3Fts5ParserCTX_STORE
235419 }
235420
@@ -236320,202 +235579,148 @@
235579 ** break;
235580 */
235581 /********** Begin reduce actions **********************************************/
235582 fts5YYMINORTYPE fts5yylhsminor;
235583 case 0: /* input ::= expr */
 
235584 { sqlite3Fts5ParseFinished(pParse, fts5yymsp[0].minor.fts5yy24); }
 
235585 break;
235586 case 1: /* colset ::= MINUS LCP colsetlist RCP */
 
235587 {
235588 fts5yymsp[-3].minor.fts5yy11 = sqlite3Fts5ParseColsetInvert(pParse, fts5yymsp[-1].minor.fts5yy11);
235589 }
 
235590 break;
235591 case 2: /* colset ::= LCP colsetlist RCP */
 
235592 { fts5yymsp[-2].minor.fts5yy11 = fts5yymsp[-1].minor.fts5yy11; }
 
235593 break;
235594 case 3: /* colset ::= STRING */
 
235595 {
235596 fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
235597 }
 
235598 fts5yymsp[0].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
235599 break;
235600 case 4: /* colset ::= MINUS STRING */
 
235601 {
235602 fts5yymsp[-1].minor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
235603 fts5yymsp[-1].minor.fts5yy11 = sqlite3Fts5ParseColsetInvert(pParse, fts5yymsp[-1].minor.fts5yy11);
235604 }
 
235605 break;
235606 case 5: /* colsetlist ::= colsetlist STRING */
 
235607 {
235608 fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, fts5yymsp[-1].minor.fts5yy11, &fts5yymsp[0].minor.fts5yy0); }
 
235609 fts5yymsp[-1].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
235610 break;
235611 case 6: /* colsetlist ::= STRING */
 
235612 {
235613 fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
235614 }
 
235615 fts5yymsp[0].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
235616 break;
235617 case 7: /* expr ::= expr AND expr */
 
235618 {
235619 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_AND, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
235620 }
 
235621 fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
235622 break;
235623 case 8: /* expr ::= expr OR expr */
 
235624 {
235625 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_OR, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
235626 }
 
235627 fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
235628 break;
235629 case 9: /* expr ::= expr NOT expr */
 
235630 {
235631 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_NOT, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
235632 }
 
235633 fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
235634 break;
235635 case 10: /* expr ::= colset COLON LP expr RP */
 
235636 {
235637 sqlite3Fts5ParseSetColset(pParse, fts5yymsp[-1].minor.fts5yy24, fts5yymsp[-4].minor.fts5yy11);
235638 fts5yylhsminor.fts5yy24 = fts5yymsp[-1].minor.fts5yy24;
235639 }
 
235640 fts5yymsp[-4].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
235641 break;
235642 case 11: /* expr ::= LP expr RP */
 
235643 {fts5yymsp[-2].minor.fts5yy24 = fts5yymsp[-1].minor.fts5yy24;}
 
235644 break;
235645 case 12: /* expr ::= exprlist */
235646 case 13: /* exprlist ::= cnearset */ fts5yytestcase(fts5yyruleno==13);
 
235647 {fts5yylhsminor.fts5yy24 = fts5yymsp[0].minor.fts5yy24;}
 
235648 fts5yymsp[0].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
235649 break;
235650 case 14: /* exprlist ::= exprlist cnearset */
 
235651 {
235652 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseImplicitAnd(pParse, fts5yymsp[-1].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24);
235653 }
 
235654 fts5yymsp[-1].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
235655 break;
235656 case 15: /* cnearset ::= nearset */
 
235657 {
235658 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy46);
235659 }
 
235660 fts5yymsp[0].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
235661 break;
235662 case 16: /* cnearset ::= colset COLON nearset */
 
235663 {
235664 fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy46);
235665 sqlite3Fts5ParseSetColset(pParse, fts5yylhsminor.fts5yy24, fts5yymsp[-2].minor.fts5yy11);
235666 }
 
235667 fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
235668 break;
235669 case 17: /* nearset ::= phrase */
 
235670 { fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53); }
 
235671 fts5yymsp[0].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
235672 break;
235673 case 18: /* nearset ::= CARET phrase */
 
235674 {
235675 sqlite3Fts5ParseSetCaret(fts5yymsp[0].minor.fts5yy53);
235676 fts5yymsp[-1].minor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53);
235677 }
 
235678 break;
235679 case 19: /* nearset ::= STRING LP nearphrases neardist_opt RP */
 
235680 {
235681 sqlite3Fts5ParseNear(pParse, &fts5yymsp[-4].minor.fts5yy0);
235682 sqlite3Fts5ParseSetDistance(pParse, fts5yymsp[-2].minor.fts5yy46, &fts5yymsp[-1].minor.fts5yy0);
235683 fts5yylhsminor.fts5yy46 = fts5yymsp[-2].minor.fts5yy46;
235684 }
 
235685 fts5yymsp[-4].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
235686 break;
235687 case 20: /* nearphrases ::= phrase */
 
235688 {
235689 fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53);
235690 }
 
235691 fts5yymsp[0].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
235692 break;
235693 case 21: /* nearphrases ::= nearphrases phrase */
 
235694 {
235695 fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, fts5yymsp[-1].minor.fts5yy46, fts5yymsp[0].minor.fts5yy53);
235696 }
 
235697 fts5yymsp[-1].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
235698 break;
235699 case 22: /* neardist_opt ::= */
 
235700 { fts5yymsp[1].minor.fts5yy0.p = 0; fts5yymsp[1].minor.fts5yy0.n = 0; }
 
235701 break;
235702 case 23: /* neardist_opt ::= COMMA STRING */
 
235703 { fts5yymsp[-1].minor.fts5yy0 = fts5yymsp[0].minor.fts5yy0; }
 
235704 break;
235705 case 24: /* phrase ::= phrase PLUS STRING star_opt */
 
235706 {
235707 fts5yylhsminor.fts5yy53 = sqlite3Fts5ParseTerm(pParse, fts5yymsp[-3].minor.fts5yy53, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy4);
235708 }
 
235709 fts5yymsp[-3].minor.fts5yy53 = fts5yylhsminor.fts5yy53;
235710 break;
235711 case 25: /* phrase ::= STRING star_opt */
 
235712 {
235713 fts5yylhsminor.fts5yy53 = sqlite3Fts5ParseTerm(pParse, 0, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy4);
235714 }
 
235715 fts5yymsp[-1].minor.fts5yy53 = fts5yylhsminor.fts5yy53;
235716 break;
235717 case 26: /* star_opt ::= STAR */
 
235718 { fts5yymsp[0].minor.fts5yy4 = 1; }
 
235719 break;
235720 case 27: /* star_opt ::= */
 
235721 { fts5yymsp[1].minor.fts5yy4 = 0; }
 
235722 break;
235723 default:
235724 break;
235725 /********** End reduce actions ************************************************/
235726 };
@@ -236573,17 +235778,15 @@
235778 ){
235779 sqlite3Fts5ParserARG_FETCH
235780 sqlite3Fts5ParserCTX_FETCH
235781 #define FTS5TOKEN fts5yyminor
235782 /************ Begin %syntax_error code ****************************************/
 
235783
235784 UNUSED_PARAM(fts5yymajor); /* Silence a compiler warning */
235785 sqlite3Fts5ParseError(
235786 pParse, "fts5: syntax error near \"%.*s\"",FTS5TOKEN.n,FTS5TOKEN.p
235787 );
 
235788 /************ End %syntax_error code ******************************************/
235789 sqlite3Fts5ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
235790 sqlite3Fts5ParserCTX_STORE
235791 }
235792
@@ -236849,11 +236052,10 @@
236052 (void)iToken;
236053 return 0;
236054 #endif
236055 }
236056
 
236057 /*
236058 ** 2014 May 31
236059 **
236060 ** The author disclaims copyright to this source code. In place of
236061 ** a legal notice, here is a blessing:
@@ -237672,11 +236874,10 @@
236874 }
236875
236876 return rc;
236877 }
236878
 
236879 /*
236880 ** 2014 May 31
236881 **
236882 ** The author disclaims copyright to this source code. In place of
236883 ** a legal notice, here is a blessing:
@@ -238085,11 +237286,10 @@
237286 }
237287 sqlite3_free(p);
237288 }
237289 }
237290
 
237291 /*
237292 ** 2014 Jun 09
237293 **
237294 ** The author disclaims copyright to this source code. In place of
237295 ** a legal notice, here is a blessing:
@@ -239201,11 +238401,10 @@
238401 va_end(ap);
238402 }
238403
238404
238405
 
238406 /*
238407 ** 2014 May 31
238408 **
238409 ** The author disclaims copyright to this source code. In place of
238410 ** a legal notice, here is a blessing:
@@ -242470,11 +241669,10 @@
241669 sqlite3Fts5IndexIterClearTokendata(pT->pIter);
241670 }
241671 }
241672 }
241673
 
241674 /*
241675 ** 2014 August 11
241676 **
241677 ** The author disclaims copyright to this source code. In place of
241678 ** a legal notice, here is a blessing:
@@ -243062,11 +242260,10 @@
242260 *ppDoclist = 0;
242261 *pnDoclist = 0;
242262 }
242263 }
242264
 
242265 /*
242266 ** 2014 May 31
242267 **
242268 ** The author disclaims copyright to this source code. In place of
242269 ** a legal notice, here is a blessing:
@@ -252140,11 +251337,10 @@
251337 fts5StructureInvalidate(p);
251338 }
251339 return fts5IndexReturn(p);
251340 }
251341
 
251342 /*
251343 ** 2014 Jun 09
251344 **
251345 ** The author disclaims copyright to this source code. In place of
251346 ** a legal notice, here is a blessing:
@@ -252775,10 +251971,11 @@
251971 ){
251972 /* A MATCH operator or equivalent */
251973 if( p->usable==0 || iCol<0 ){
251974 /* As there exists an unusable MATCH constraint this is an
251975 ** unusable plan. Return SQLITE_CONSTRAINT. */
251976 idxStr[iIdxStr] = 0;
251977 return SQLITE_CONSTRAINT;
251978 }else{
251979 if( iCol==nCol+1 ){
251980 if( bSeenRank ) continue;
251981 idxStr[iIdxStr++] = 'r';
@@ -255730,11 +254927,11 @@
254927 int nArg, /* Number of args */
254928 sqlite3_value **apUnused /* Function arguments */
254929 ){
254930 assert( nArg==0 );
254931 UNUSED_PARAM2(nArg, apUnused);
254932 sqlite3_result_text(pCtx, "fts5: 2024-11-14 19:34:28 81202d2ab5963fdcf20555b6d0b31cc955ac27f1cd87656faea5c0611c9a2ee8", -1, SQLITE_TRANSIENT);
254933 }
254934
254935 /*
254936 ** Implementation of fts5_locale(LOCALE, TEXT) function.
254937 **
@@ -255983,11 +255180,10 @@
255180 SQLITE_PRIVATE int sqlite3Fts5Init(sqlite3 *db){
255181 return fts5Init(db);
255182 }
255183 #endif
255184
 
255185 /*
255186 ** 2014 May 31
255187 **
255188 ** The author disclaims copyright to this source code. In place of
255189 ** a legal notice, here is a blessing:
@@ -257497,11 +256693,10 @@
256693 }
256694 }
256695 return rc;
256696 }
256697
 
256698 /*
256699 ** 2014 May 31
256700 **
256701 ** The author disclaims copyright to this source code. In place of
256702 ** a legal notice, here is a blessing:
@@ -258854,21 +258049,21 @@
258049 char aBuf[32];
258050 char *zOut = aBuf;
258051 int ii;
258052 const unsigned char *zIn = (const unsigned char*)pText;
258053 const unsigned char *zEof = &zIn[nText];
258054 u32 iCode = 0;
258055 int aStart[3]; /* Input offset of each character in aBuf[] */
258056
258057 UNUSED_PARAM(unusedFlags);
258058
258059 /* Populate aBuf[] with the characters for the first trigram. */
258060 for(ii=0; ii<3; ii++){
258061 do {
258062 aStart[ii] = zIn - (const unsigned char*)pText;
258063 if( zIn>=zEof ) return SQLITE_OK;
258064 READ_UTF8(zIn, zEof, iCode);
 
258065 if( p->bFold ) iCode = sqlite3Fts5UnicodeFold(iCode, p->iFoldParam);
258066 }while( iCode==0 );
258067 WRITE_UTF8(zOut, iCode);
258068 }
258069
@@ -258885,12 +258080,15 @@
258080 const char *z1;
258081
258082 /* Read characters from the input up until the first non-diacritic */
258083 do {
258084 iNext = zIn - (const unsigned char*)pText;
258085 if( zIn>=zEof ){
258086 iCode = 0;
258087 break;
258088 }
258089 READ_UTF8(zIn, zEof, iCode);
 
258090 if( p->bFold ) iCode = sqlite3Fts5UnicodeFold(iCode, p->iFoldParam);
258091 }while( iCode==0 );
258092
258093 /* Pass the current trigram back to fts5 */
258094 rc = xToken(pCtx, 0, aBuf, zOut-aBuf, aStart[0], iNext);
@@ -258986,11 +258184,10 @@
258184 );
258185 }
258186 return rc;
258187 }
258188
 
258189 /*
258190 ** 2012-05-25
258191 **
258192 ** The author disclaims copyright to this source code. In place of
258193 ** a legal notice, here is a blessing:
@@ -259769,11 +258966,10 @@
258966 }
258967 aAscii[0] = 0; /* 0x00 is never a token character */
258968 }
258969
258970
 
258971 /*
258972 ** 2015 May 30
258973 **
258974 ** The author disclaims copyright to this source code. In place of
258975 ** a legal notice, here is a blessing:
@@ -260115,11 +259311,10 @@
259311 if( iVal<(1 << 21) ) return 3;
259312 if( iVal<(1 << 28) ) return 4;
259313 return 5;
259314 }
259315
 
259316 /*
259317 ** 2015 May 08
259318 **
259319 ** The author disclaims copyright to this source code. In place of
259320 ** a legal notice, here is a blessing:
@@ -260931,11 +260126,10 @@
260126 /* Here ends the fts5.c composite file. */
260127 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) */
260128
260129 /************** End of fts5.c ************************************************/
260130 /************** Begin file stmt.c ********************************************/
 
260131 /*
260132 ** 2017-05-31
260133 **
260134 ** The author disclaims copyright to this source code. In place of
260135 ** a legal notice, here is a blessing:
260136
+12 -2
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,11 +146,11 @@
146146
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147
** [sqlite_version()] and [sqlite_source_id()].
148148
*/
149149
#define SQLITE_VERSION "3.48.0"
150150
#define SQLITE_VERSION_NUMBER 3048000
151
-#define SQLITE_SOURCE_ID "2024-11-06 12:58:31 5495b12569c318d5020b4b5a625a392ef8e777b81c0200624fbbc2a6b5eddef9"
151
+#define SQLITE_SOURCE_ID "2024-11-14 19:34:28 81202d2ab5963fdcf20555b6d0b31cc955ac27f1cd87656faea5c0611c9a2ee8"
152152
153153
/*
154154
** CAPI3REF: Run-Time Library Version Numbers
155155
** KEYWORDS: sqlite3_version sqlite3_sourceid
156156
**
@@ -1098,10 +1098,15 @@
10981098
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
10991099
** opcode causes the xFileControl method to swap the file handle with the one
11001100
** pointed to by the pArg argument. This capability is used during testing
11011101
** and only needs to be supported when SQLITE_TEST is defined.
11021102
**
1103
+** <li>[[SQLITE_FCNTL_NULL_IO]]
1104
+** The [SQLITE_FCNTL_NULL_IO] opcode sets the low-level file descriptor
1105
+** or file handle for the [sqlite3_file] object such that it will no longer
1106
+** read or write to the database file.
1107
+**
11031108
** <li>[[SQLITE_FCNTL_WAL_BLOCK]]
11041109
** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might
11051110
** be advantageous to block on the next WAL lock if the lock is not immediately
11061111
** available. The WAL subsystem issues this signal during rare
11071112
** circumstances in order to fix a problem with priority inversion.
@@ -1251,10 +1256,11 @@
12511256
#define SQLITE_FCNTL_RESERVE_BYTES 38
12521257
#define SQLITE_FCNTL_CKPT_START 39
12531258
#define SQLITE_FCNTL_EXTERNAL_READER 40
12541259
#define SQLITE_FCNTL_CKSM_FILE 41
12551260
#define SQLITE_FCNTL_RESET_CACHE 42
1261
+#define SQLITE_FCNTL_NULL_IO 43
12561262
12571263
/* deprecated names */
12581264
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
12591265
#define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
12601266
#define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -2629,14 +2635,18 @@
26292635
**
26302636
** ^These functions return the number of rows modified, inserted or
26312637
** deleted by the most recently completed INSERT, UPDATE or DELETE
26322638
** statement on the database connection specified by the only parameter.
26332639
** The two functions are identical except for the type of the return value
2634
-** and that if the number of rows modified by the most recent INSERT, UPDATE
2640
+** and that if the number of rows modified by the most recent INSERT, UPDATE,
26352641
** or DELETE is greater than the maximum value supported by type "int", then
26362642
** the return value of sqlite3_changes() is undefined. ^Executing any other
26372643
** type of SQL statement does not modify the value returned by these functions.
2644
+** For the purposes of this interface, a CREATE TABLE AS SELECT statement
2645
+** does not count as an INSERT, UPDATE or DELETE statement and hence the rows
2646
+** added to the new table by the CREATE TABLE AS SELECT statement are not
2647
+** counted.
26382648
**
26392649
** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
26402650
** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
26412651
** [foreign key actions] or [REPLACE] constraint resolution are not counted.
26422652
**
26432653
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,11 +146,11 @@
146 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147 ** [sqlite_version()] and [sqlite_source_id()].
148 */
149 #define SQLITE_VERSION "3.48.0"
150 #define SQLITE_VERSION_NUMBER 3048000
151 #define SQLITE_SOURCE_ID "2024-11-06 12:58:31 5495b12569c318d5020b4b5a625a392ef8e777b81c0200624fbbc2a6b5eddef9"
152
153 /*
154 ** CAPI3REF: Run-Time Library Version Numbers
155 ** KEYWORDS: sqlite3_version sqlite3_sourceid
156 **
@@ -1098,10 +1098,15 @@
1098 ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
1099 ** opcode causes the xFileControl method to swap the file handle with the one
1100 ** pointed to by the pArg argument. This capability is used during testing
1101 ** and only needs to be supported when SQLITE_TEST is defined.
1102 **
 
 
 
 
 
1103 ** <li>[[SQLITE_FCNTL_WAL_BLOCK]]
1104 ** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might
1105 ** be advantageous to block on the next WAL lock if the lock is not immediately
1106 ** available. The WAL subsystem issues this signal during rare
1107 ** circumstances in order to fix a problem with priority inversion.
@@ -1251,10 +1256,11 @@
1251 #define SQLITE_FCNTL_RESERVE_BYTES 38
1252 #define SQLITE_FCNTL_CKPT_START 39
1253 #define SQLITE_FCNTL_EXTERNAL_READER 40
1254 #define SQLITE_FCNTL_CKSM_FILE 41
1255 #define SQLITE_FCNTL_RESET_CACHE 42
 
1256
1257 /* deprecated names */
1258 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1259 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1260 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -2629,14 +2635,18 @@
2629 **
2630 ** ^These functions return the number of rows modified, inserted or
2631 ** deleted by the most recently completed INSERT, UPDATE or DELETE
2632 ** statement on the database connection specified by the only parameter.
2633 ** The two functions are identical except for the type of the return value
2634 ** and that if the number of rows modified by the most recent INSERT, UPDATE
2635 ** or DELETE is greater than the maximum value supported by type "int", then
2636 ** the return value of sqlite3_changes() is undefined. ^Executing any other
2637 ** type of SQL statement does not modify the value returned by these functions.
 
 
 
 
2638 **
2639 ** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
2640 ** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
2641 ** [foreign key actions] or [REPLACE] constraint resolution are not counted.
2642 **
2643
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,11 +146,11 @@
146 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147 ** [sqlite_version()] and [sqlite_source_id()].
148 */
149 #define SQLITE_VERSION "3.48.0"
150 #define SQLITE_VERSION_NUMBER 3048000
151 #define SQLITE_SOURCE_ID "2024-11-14 19:34:28 81202d2ab5963fdcf20555b6d0b31cc955ac27f1cd87656faea5c0611c9a2ee8"
152
153 /*
154 ** CAPI3REF: Run-Time Library Version Numbers
155 ** KEYWORDS: sqlite3_version sqlite3_sourceid
156 **
@@ -1098,10 +1098,15 @@
1098 ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
1099 ** opcode causes the xFileControl method to swap the file handle with the one
1100 ** pointed to by the pArg argument. This capability is used during testing
1101 ** and only needs to be supported when SQLITE_TEST is defined.
1102 **
1103 ** <li>[[SQLITE_FCNTL_NULL_IO]]
1104 ** The [SQLITE_FCNTL_NULL_IO] opcode sets the low-level file descriptor
1105 ** or file handle for the [sqlite3_file] object such that it will no longer
1106 ** read or write to the database file.
1107 **
1108 ** <li>[[SQLITE_FCNTL_WAL_BLOCK]]
1109 ** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might
1110 ** be advantageous to block on the next WAL lock if the lock is not immediately
1111 ** available. The WAL subsystem issues this signal during rare
1112 ** circumstances in order to fix a problem with priority inversion.
@@ -1251,10 +1256,11 @@
1256 #define SQLITE_FCNTL_RESERVE_BYTES 38
1257 #define SQLITE_FCNTL_CKPT_START 39
1258 #define SQLITE_FCNTL_EXTERNAL_READER 40
1259 #define SQLITE_FCNTL_CKSM_FILE 41
1260 #define SQLITE_FCNTL_RESET_CACHE 42
1261 #define SQLITE_FCNTL_NULL_IO 43
1262
1263 /* deprecated names */
1264 #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
1265 #define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE
1266 #define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO
@@ -2629,14 +2635,18 @@
2635 **
2636 ** ^These functions return the number of rows modified, inserted or
2637 ** deleted by the most recently completed INSERT, UPDATE or DELETE
2638 ** statement on the database connection specified by the only parameter.
2639 ** The two functions are identical except for the type of the return value
2640 ** and that if the number of rows modified by the most recent INSERT, UPDATE,
2641 ** or DELETE is greater than the maximum value supported by type "int", then
2642 ** the return value of sqlite3_changes() is undefined. ^Executing any other
2643 ** type of SQL statement does not modify the value returned by these functions.
2644 ** For the purposes of this interface, a CREATE TABLE AS SELECT statement
2645 ** does not count as an INSERT, UPDATE or DELETE statement and hence the rows
2646 ** added to the new table by the CREATE TABLE AS SELECT statement are not
2647 ** counted.
2648 **
2649 ** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
2650 ** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
2651 ** [foreign key actions] or [REPLACE] constraint resolution are not counted.
2652 **
2653

Keyboard Shortcuts

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