Fossil SCM

Update the built-in SQLite to a version from the exists-to-join branch in the SQLite source tree, in order to beta-test the exists-to-join optimization. Fossil uses EXISTS operators in the WHERE clause of queries in many places and is therefore a good test case.

drh 2024-06-11 18:44 trunk
Commit b58b30512e88213cfc43a3ac252f41b46cb7b6ce8ffe7b522e991d28df8706be
3 files changed +15 -7 +1623 -1327 +1 -3
+15 -7
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -9408,11 +9408,13 @@
94089408
/* #include "sqlite3ext.h" */
94099409
SQLITE_EXTENSION_INIT1
94109410
#include <stdio.h>
94119411
#include <string.h>
94129412
#include <assert.h>
9413
-#include <stdint.h>
9413
+#ifndef SQLITE_NO_STDINT
9414
+# include <stdint.h>
9415
+#endif
94149416
94159417
#include <zlib.h>
94169418
94179419
#ifndef SQLITE_OMIT_VIRTUALTABLE
94189420
@@ -22458,10 +22460,11 @@
2245822460
}
2245922461
pExplain = pStmt;
2246022462
sqlite3_reset(pExplain);
2246122463
rc = sqlite3_stmt_explain(pExplain, 2);
2246222464
if( rc==SQLITE_OK ){
22465
+ bind_prepared_stmt(pArg, pExplain);
2246322466
while( sqlite3_step(pExplain)==SQLITE_ROW ){
2246422467
const char *zEQPLine = (const char*)sqlite3_column_text(pExplain,3);
2246522468
int iEqpId = sqlite3_column_int(pExplain, 0);
2246622469
int iParentId = sqlite3_column_int(pExplain, 1);
2246722470
if( zEQPLine==0 ) zEQPLine = "";
@@ -22475,10 +22478,11 @@
2247522478
sqlite3_reset(pExplain);
2247622479
rc = sqlite3_stmt_explain(pExplain, 1);
2247722480
if( rc==SQLITE_OK ){
2247822481
pArg->cMode = MODE_Explain;
2247922482
assert( sqlite3_stmt_isexplain(pExplain)==1 );
22483
+ bind_prepared_stmt(pArg, pExplain);
2248022484
explain_data_prepare(pArg, pExplain);
2248122485
exec_prepared_stmt(pArg, pExplain);
2248222486
explain_data_delete(pArg);
2248322487
}
2248422488
}
@@ -27160,10 +27164,11 @@
2716027164
assert(dbCols==0);
2716127165
if( zColDefs==0 ){
2716227166
eputf("%s: empty file\n", sCtx.zFile);
2716327167
import_cleanup(&sCtx);
2716427168
rc = 1;
27169
+ sqlite3_free(zCreate);
2716527170
goto meta_command_exit;
2716627171
}
2716727172
zCreate = sqlite3_mprintf("%z%z\n", zCreate, zColDefs);
2716827173
if( zCreate==0 ){
2716927174
import_cleanup(&sCtx);
@@ -29110,11 +29115,11 @@
2911029115
{"never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT,1, "BOOLEAN" },
2911129116
{"optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS,0,"DISABLE-MASK" },
2911229117
#ifdef YYCOVERAGE
2911329118
{"parser_coverage", SQLITE_TESTCTRL_PARSER_COVERAGE,0,"" },
2911429119
#endif
29115
- {"pending_byte", SQLITE_TESTCTRL_PENDING_BYTE,0, "OFFSET " },
29120
+ {"pending_byte", SQLITE_TESTCTRL_PENDING_BYTE,1, "OFFSET " },
2911629121
{"prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE,0, "" },
2911729122
{"prng_save", SQLITE_TESTCTRL_PRNG_SAVE, 0, "" },
2911829123
{"prng_seed", SQLITE_TESTCTRL_PRNG_SEED, 0, "SEED ?db?" },
2911929124
{"seek_count", SQLITE_TESTCTRL_SEEK_COUNT, 0, "" },
2912029125
{"sorter_mmap", SQLITE_TESTCTRL_SORTER_MMAP, 0, "NMAX" },
@@ -30954,12 +30959,12 @@
3095430959
*/
3095530960
for(i=0; i<nCmd; i++){
3095630961
if( azCmd[i][0]=='.' ){
3095730962
rc = do_meta_command(azCmd[i], &data);
3095830963
if( rc ){
30959
- free(azCmd);
30960
- return rc==2 ? 0 : rc;
30964
+ if( rc==2 ) rc = 0;
30965
+ goto shell_main_exit;
3096130966
}
3096230967
}else{
3096330968
open_db(&data, 0);
3096430969
echo_group_input(&data, azCmd[i]);
3096530970
rc = shell_exec(&data, azCmd[i], &zErrMsg);
@@ -30968,12 +30973,12 @@
3096830973
eputf("Error: %s\n", zErrMsg);
3096930974
}else{
3097030975
eputf("Error: unable to process SQL: %s\n", azCmd[i]);
3097130976
}
3097230977
sqlite3_free(zErrMsg);
30973
- free(azCmd);
30974
- return rc!=0 ? rc : 1;
30978
+ if( rc==0 ) rc = 1;
30979
+ goto shell_main_exit;
3097530980
}
3097630981
}
3097730982
}
3097830983
}else{
3097930984
/* Run commands received from standard input
@@ -31029,10 +31034,11 @@
3102931034
#ifndef SQLITE_OMIT_VIRTUALTABLE
3103031035
if( data.expert.pExpert ){
3103131036
expertFinish(&data, 1, 0);
3103231037
}
3103331038
#endif
31039
+ shell_main_exit:
3103431040
free(azCmd);
3103531041
set_table_name(&data, 0);
3103631042
if( data.db ){
3103731043
session_close_all(&data, -1);
3103831044
close_db(data.db);
@@ -31061,11 +31067,13 @@
3106131067
if( sqlite3_memory_used()>mem_main_enter ){
3106231068
eputf("Memory leaked: %u bytes\n",
3106331069
(unsigned int)(sqlite3_memory_used()-mem_main_enter));
3106431070
}
3106531071
#endif
31066
-#endif /* !SQLITE_SHELL_FIDDLE */
31072
+#else /* SQLITE_SHELL_FIDDLE... */
31073
+ shell_main_exit:
31074
+#endif
3106731075
return rc;
3106831076
}
3106931077
3107031078
3107131079
#ifdef SQLITE_SHELL_FIDDLE
3107231080
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -9408,11 +9408,13 @@
9408 /* #include "sqlite3ext.h" */
9409 SQLITE_EXTENSION_INIT1
9410 #include <stdio.h>
9411 #include <string.h>
9412 #include <assert.h>
9413 #include <stdint.h>
 
 
9414
9415 #include <zlib.h>
9416
9417 #ifndef SQLITE_OMIT_VIRTUALTABLE
9418
@@ -22458,10 +22460,11 @@
22458 }
22459 pExplain = pStmt;
22460 sqlite3_reset(pExplain);
22461 rc = sqlite3_stmt_explain(pExplain, 2);
22462 if( rc==SQLITE_OK ){
 
22463 while( sqlite3_step(pExplain)==SQLITE_ROW ){
22464 const char *zEQPLine = (const char*)sqlite3_column_text(pExplain,3);
22465 int iEqpId = sqlite3_column_int(pExplain, 0);
22466 int iParentId = sqlite3_column_int(pExplain, 1);
22467 if( zEQPLine==0 ) zEQPLine = "";
@@ -22475,10 +22478,11 @@
22475 sqlite3_reset(pExplain);
22476 rc = sqlite3_stmt_explain(pExplain, 1);
22477 if( rc==SQLITE_OK ){
22478 pArg->cMode = MODE_Explain;
22479 assert( sqlite3_stmt_isexplain(pExplain)==1 );
 
22480 explain_data_prepare(pArg, pExplain);
22481 exec_prepared_stmt(pArg, pExplain);
22482 explain_data_delete(pArg);
22483 }
22484 }
@@ -27160,10 +27164,11 @@
27160 assert(dbCols==0);
27161 if( zColDefs==0 ){
27162 eputf("%s: empty file\n", sCtx.zFile);
27163 import_cleanup(&sCtx);
27164 rc = 1;
 
27165 goto meta_command_exit;
27166 }
27167 zCreate = sqlite3_mprintf("%z%z\n", zCreate, zColDefs);
27168 if( zCreate==0 ){
27169 import_cleanup(&sCtx);
@@ -29110,11 +29115,11 @@
29110 {"never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT,1, "BOOLEAN" },
29111 {"optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS,0,"DISABLE-MASK" },
29112 #ifdef YYCOVERAGE
29113 {"parser_coverage", SQLITE_TESTCTRL_PARSER_COVERAGE,0,"" },
29114 #endif
29115 {"pending_byte", SQLITE_TESTCTRL_PENDING_BYTE,0, "OFFSET " },
29116 {"prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE,0, "" },
29117 {"prng_save", SQLITE_TESTCTRL_PRNG_SAVE, 0, "" },
29118 {"prng_seed", SQLITE_TESTCTRL_PRNG_SEED, 0, "SEED ?db?" },
29119 {"seek_count", SQLITE_TESTCTRL_SEEK_COUNT, 0, "" },
29120 {"sorter_mmap", SQLITE_TESTCTRL_SORTER_MMAP, 0, "NMAX" },
@@ -30954,12 +30959,12 @@
30954 */
30955 for(i=0; i<nCmd; i++){
30956 if( azCmd[i][0]=='.' ){
30957 rc = do_meta_command(azCmd[i], &data);
30958 if( rc ){
30959 free(azCmd);
30960 return rc==2 ? 0 : rc;
30961 }
30962 }else{
30963 open_db(&data, 0);
30964 echo_group_input(&data, azCmd[i]);
30965 rc = shell_exec(&data, azCmd[i], &zErrMsg);
@@ -30968,12 +30973,12 @@
30968 eputf("Error: %s\n", zErrMsg);
30969 }else{
30970 eputf("Error: unable to process SQL: %s\n", azCmd[i]);
30971 }
30972 sqlite3_free(zErrMsg);
30973 free(azCmd);
30974 return rc!=0 ? rc : 1;
30975 }
30976 }
30977 }
30978 }else{
30979 /* Run commands received from standard input
@@ -31029,10 +31034,11 @@
31029 #ifndef SQLITE_OMIT_VIRTUALTABLE
31030 if( data.expert.pExpert ){
31031 expertFinish(&data, 1, 0);
31032 }
31033 #endif
 
31034 free(azCmd);
31035 set_table_name(&data, 0);
31036 if( data.db ){
31037 session_close_all(&data, -1);
31038 close_db(data.db);
@@ -31061,11 +31067,13 @@
31061 if( sqlite3_memory_used()>mem_main_enter ){
31062 eputf("Memory leaked: %u bytes\n",
31063 (unsigned int)(sqlite3_memory_used()-mem_main_enter));
31064 }
31065 #endif
31066 #endif /* !SQLITE_SHELL_FIDDLE */
 
 
31067 return rc;
31068 }
31069
31070
31071 #ifdef SQLITE_SHELL_FIDDLE
31072
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -9408,11 +9408,13 @@
9408 /* #include "sqlite3ext.h" */
9409 SQLITE_EXTENSION_INIT1
9410 #include <stdio.h>
9411 #include <string.h>
9412 #include <assert.h>
9413 #ifndef SQLITE_NO_STDINT
9414 # include <stdint.h>
9415 #endif
9416
9417 #include <zlib.h>
9418
9419 #ifndef SQLITE_OMIT_VIRTUALTABLE
9420
@@ -22458,10 +22460,11 @@
22460 }
22461 pExplain = pStmt;
22462 sqlite3_reset(pExplain);
22463 rc = sqlite3_stmt_explain(pExplain, 2);
22464 if( rc==SQLITE_OK ){
22465 bind_prepared_stmt(pArg, pExplain);
22466 while( sqlite3_step(pExplain)==SQLITE_ROW ){
22467 const char *zEQPLine = (const char*)sqlite3_column_text(pExplain,3);
22468 int iEqpId = sqlite3_column_int(pExplain, 0);
22469 int iParentId = sqlite3_column_int(pExplain, 1);
22470 if( zEQPLine==0 ) zEQPLine = "";
@@ -22475,10 +22478,11 @@
22478 sqlite3_reset(pExplain);
22479 rc = sqlite3_stmt_explain(pExplain, 1);
22480 if( rc==SQLITE_OK ){
22481 pArg->cMode = MODE_Explain;
22482 assert( sqlite3_stmt_isexplain(pExplain)==1 );
22483 bind_prepared_stmt(pArg, pExplain);
22484 explain_data_prepare(pArg, pExplain);
22485 exec_prepared_stmt(pArg, pExplain);
22486 explain_data_delete(pArg);
22487 }
22488 }
@@ -27160,10 +27164,11 @@
27164 assert(dbCols==0);
27165 if( zColDefs==0 ){
27166 eputf("%s: empty file\n", sCtx.zFile);
27167 import_cleanup(&sCtx);
27168 rc = 1;
27169 sqlite3_free(zCreate);
27170 goto meta_command_exit;
27171 }
27172 zCreate = sqlite3_mprintf("%z%z\n", zCreate, zColDefs);
27173 if( zCreate==0 ){
27174 import_cleanup(&sCtx);
@@ -29110,11 +29115,11 @@
29115 {"never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT,1, "BOOLEAN" },
29116 {"optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS,0,"DISABLE-MASK" },
29117 #ifdef YYCOVERAGE
29118 {"parser_coverage", SQLITE_TESTCTRL_PARSER_COVERAGE,0,"" },
29119 #endif
29120 {"pending_byte", SQLITE_TESTCTRL_PENDING_BYTE,1, "OFFSET " },
29121 {"prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE,0, "" },
29122 {"prng_save", SQLITE_TESTCTRL_PRNG_SAVE, 0, "" },
29123 {"prng_seed", SQLITE_TESTCTRL_PRNG_SEED, 0, "SEED ?db?" },
29124 {"seek_count", SQLITE_TESTCTRL_SEEK_COUNT, 0, "" },
29125 {"sorter_mmap", SQLITE_TESTCTRL_SORTER_MMAP, 0, "NMAX" },
@@ -30954,12 +30959,12 @@
30959 */
30960 for(i=0; i<nCmd; i++){
30961 if( azCmd[i][0]=='.' ){
30962 rc = do_meta_command(azCmd[i], &data);
30963 if( rc ){
30964 if( rc==2 ) rc = 0;
30965 goto shell_main_exit;
30966 }
30967 }else{
30968 open_db(&data, 0);
30969 echo_group_input(&data, azCmd[i]);
30970 rc = shell_exec(&data, azCmd[i], &zErrMsg);
@@ -30968,12 +30973,12 @@
30973 eputf("Error: %s\n", zErrMsg);
30974 }else{
30975 eputf("Error: unable to process SQL: %s\n", azCmd[i]);
30976 }
30977 sqlite3_free(zErrMsg);
30978 if( rc==0 ) rc = 1;
30979 goto shell_main_exit;
30980 }
30981 }
30982 }
30983 }else{
30984 /* Run commands received from standard input
@@ -31029,10 +31034,11 @@
31034 #ifndef SQLITE_OMIT_VIRTUALTABLE
31035 if( data.expert.pExpert ){
31036 expertFinish(&data, 1, 0);
31037 }
31038 #endif
31039 shell_main_exit:
31040 free(azCmd);
31041 set_table_name(&data, 0);
31042 if( data.db ){
31043 session_close_all(&data, -1);
31044 close_db(data.db);
@@ -31061,11 +31067,13 @@
31067 if( sqlite3_memory_used()>mem_main_enter ){
31068 eputf("Memory leaked: %u bytes\n",
31069 (unsigned int)(sqlite3_memory_used()-mem_main_enter));
31070 }
31071 #endif
31072 #else /* SQLITE_SHELL_FIDDLE... */
31073 shell_main_exit:
31074 #endif
31075 return rc;
31076 }
31077
31078
31079 #ifdef SQLITE_SHELL_FIDDLE
31080
+1623 -1327
--- 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
-** a47c644fef71f3ab3dc584ea917eaab9a8e5.
21
+** 33a3f327855b427ae6ba0057218d043a1417.
2222
*/
2323
#define SQLITE_CORE 1
2424
#define SQLITE_AMALGAMATION 1
2525
#ifndef SQLITE_PRIVATE
2626
# define SQLITE_PRIVATE static
@@ -459,11 +459,11 @@
459459
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
460460
** [sqlite_version()] and [sqlite_source_id()].
461461
*/
462462
#define SQLITE_VERSION "3.47.0"
463463
#define SQLITE_VERSION_NUMBER 3047000
464
-#define SQLITE_SOURCE_ID "2024-05-30 13:27:29 a47c644fef71f3ab3dc584ea917eaab9a8e5b4c9dcb57bdd29747ba32108e85f"
464
+#define SQLITE_SOURCE_ID "2024-06-11 18:22:48 33a3f327855b427ae6ba0057218d043a1417bc9d780728f47f23acdd836e1686"
465465
466466
/*
467467
** CAPI3REF: Run-Time Library Version Numbers
468468
** KEYWORDS: sqlite3_version sqlite3_sourceid
469469
**
@@ -11143,12 +11143,10 @@
1114311143
#endif
1114411144
1114511145
#if defined(__wasi__)
1114611146
# undef SQLITE_WASI
1114711147
# define SQLITE_WASI 1
11148
-# undef SQLITE_OMIT_WAL
11149
-# define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */
1115011148
# ifndef SQLITE_OMIT_LOAD_EXTENSION
1115111149
# define SQLITE_OMIT_LOAD_EXTENSION
1115211150
# endif
1115311151
# ifndef SQLITE_THREADSAFE
1115411152
# define SQLITE_THREADSAFE 0
@@ -14530,136 +14528,136 @@
1453014528
#define TK_EACH 41
1453114529
#define TK_FAIL 42
1453214530
#define TK_OR 43
1453314531
#define TK_AND 44
1453414532
#define TK_IS 45
14535
-#define TK_MATCH 46
14536
-#define TK_LIKE_KW 47
14537
-#define TK_BETWEEN 48
14538
-#define TK_IN 49
14539
-#define TK_ISNULL 50
14540
-#define TK_NOTNULL 51
14541
-#define TK_NE 52
14542
-#define TK_EQ 53
14543
-#define TK_GT 54
14544
-#define TK_LE 55
14545
-#define TK_LT 56
14546
-#define TK_GE 57
14547
-#define TK_ESCAPE 58
14548
-#define TK_ID 59
14549
-#define TK_COLUMNKW 60
14550
-#define TK_DO 61
14551
-#define TK_FOR 62
14552
-#define TK_IGNORE 63
14553
-#define TK_INITIALLY 64
14554
-#define TK_INSTEAD 65
14555
-#define TK_NO 66
14556
-#define TK_KEY 67
14557
-#define TK_OF 68
14558
-#define TK_OFFSET 69
14559
-#define TK_PRAGMA 70
14560
-#define TK_RAISE 71
14561
-#define TK_RECURSIVE 72
14562
-#define TK_REPLACE 73
14563
-#define TK_RESTRICT 74
14564
-#define TK_ROW 75
14565
-#define TK_ROWS 76
14566
-#define TK_TRIGGER 77
14567
-#define TK_VACUUM 78
14568
-#define TK_VIEW 79
14569
-#define TK_VIRTUAL 80
14570
-#define TK_WITH 81
14571
-#define TK_NULLS 82
14572
-#define TK_FIRST 83
14573
-#define TK_LAST 84
14574
-#define TK_CURRENT 85
14575
-#define TK_FOLLOWING 86
14576
-#define TK_PARTITION 87
14577
-#define TK_PRECEDING 88
14578
-#define TK_RANGE 89
14579
-#define TK_UNBOUNDED 90
14580
-#define TK_EXCLUDE 91
14581
-#define TK_GROUPS 92
14582
-#define TK_OTHERS 93
14583
-#define TK_TIES 94
14584
-#define TK_GENERATED 95
14585
-#define TK_ALWAYS 96
14586
-#define TK_MATERIALIZED 97
14587
-#define TK_REINDEX 98
14588
-#define TK_RENAME 99
14589
-#define TK_CTIME_KW 100
14590
-#define TK_ANY 101
14591
-#define TK_BITAND 102
14592
-#define TK_BITOR 103
14593
-#define TK_LSHIFT 104
14594
-#define TK_RSHIFT 105
14595
-#define TK_PLUS 106
14596
-#define TK_MINUS 107
14597
-#define TK_STAR 108
14598
-#define TK_SLASH 109
14599
-#define TK_REM 110
14600
-#define TK_CONCAT 111
14601
-#define TK_PTR 112
14602
-#define TK_COLLATE 113
14603
-#define TK_BITNOT 114
14604
-#define TK_ON 115
14605
-#define TK_INDEXED 116
14606
-#define TK_STRING 117
14607
-#define TK_JOIN_KW 118
14608
-#define TK_CONSTRAINT 119
14609
-#define TK_DEFAULT 120
14610
-#define TK_NULL 121
14611
-#define TK_PRIMARY 122
14612
-#define TK_UNIQUE 123
14613
-#define TK_CHECK 124
14614
-#define TK_REFERENCES 125
14615
-#define TK_AUTOINCR 126
14616
-#define TK_INSERT 127
14617
-#define TK_DELETE 128
14618
-#define TK_UPDATE 129
14619
-#define TK_SET 130
14620
-#define TK_DEFERRABLE 131
14621
-#define TK_FOREIGN 132
14622
-#define TK_DROP 133
14623
-#define TK_UNION 134
14624
-#define TK_ALL 135
14625
-#define TK_EXCEPT 136
14626
-#define TK_INTERSECT 137
14627
-#define TK_SELECT 138
14628
-#define TK_VALUES 139
14629
-#define TK_DISTINCT 140
14630
-#define TK_DOT 141
14631
-#define TK_FROM 142
14632
-#define TK_JOIN 143
14633
-#define TK_USING 144
14634
-#define TK_ORDER 145
14635
-#define TK_GROUP 146
14636
-#define TK_HAVING 147
14637
-#define TK_LIMIT 148
14638
-#define TK_WHERE 149
14639
-#define TK_RETURNING 150
14640
-#define TK_INTO 151
14641
-#define TK_NOTHING 152
14642
-#define TK_FLOAT 153
14643
-#define TK_BLOB 154
14644
-#define TK_INTEGER 155
14645
-#define TK_VARIABLE 156
14646
-#define TK_CASE 157
14647
-#define TK_WHEN 158
14648
-#define TK_THEN 159
14649
-#define TK_ELSE 160
14650
-#define TK_INDEX 161
14651
-#define TK_ALTER 162
14652
-#define TK_ADD 163
14653
-#define TK_WINDOW 164
14654
-#define TK_OVER 165
14655
-#define TK_FILTER 166
14656
-#define TK_COLUMN 167
14657
-#define TK_AGG_FUNCTION 168
14658
-#define TK_AGG_COLUMN 169
14659
-#define TK_TRUEFALSE 170
14660
-#define TK_ISNOT 171
14533
+#define TK_ISNOT 46
14534
+#define TK_MATCH 47
14535
+#define TK_LIKE_KW 48
14536
+#define TK_BETWEEN 49
14537
+#define TK_IN 50
14538
+#define TK_ISNULL 51
14539
+#define TK_NOTNULL 52
14540
+#define TK_NE 53
14541
+#define TK_EQ 54
14542
+#define TK_GT 55
14543
+#define TK_LE 56
14544
+#define TK_LT 57
14545
+#define TK_GE 58
14546
+#define TK_ESCAPE 59
14547
+#define TK_ID 60
14548
+#define TK_COLUMNKW 61
14549
+#define TK_DO 62
14550
+#define TK_FOR 63
14551
+#define TK_IGNORE 64
14552
+#define TK_INITIALLY 65
14553
+#define TK_INSTEAD 66
14554
+#define TK_NO 67
14555
+#define TK_KEY 68
14556
+#define TK_OF 69
14557
+#define TK_OFFSET 70
14558
+#define TK_PRAGMA 71
14559
+#define TK_RAISE 72
14560
+#define TK_RECURSIVE 73
14561
+#define TK_REPLACE 74
14562
+#define TK_RESTRICT 75
14563
+#define TK_ROW 76
14564
+#define TK_ROWS 77
14565
+#define TK_TRIGGER 78
14566
+#define TK_VACUUM 79
14567
+#define TK_VIEW 80
14568
+#define TK_VIRTUAL 81
14569
+#define TK_WITH 82
14570
+#define TK_NULLS 83
14571
+#define TK_FIRST 84
14572
+#define TK_LAST 85
14573
+#define TK_CURRENT 86
14574
+#define TK_FOLLOWING 87
14575
+#define TK_PARTITION 88
14576
+#define TK_PRECEDING 89
14577
+#define TK_RANGE 90
14578
+#define TK_UNBOUNDED 91
14579
+#define TK_EXCLUDE 92
14580
+#define TK_GROUPS 93
14581
+#define TK_OTHERS 94
14582
+#define TK_TIES 95
14583
+#define TK_GENERATED 96
14584
+#define TK_ALWAYS 97
14585
+#define TK_MATERIALIZED 98
14586
+#define TK_REINDEX 99
14587
+#define TK_RENAME 100
14588
+#define TK_CTIME_KW 101
14589
+#define TK_ANY 102
14590
+#define TK_BITAND 103
14591
+#define TK_BITOR 104
14592
+#define TK_LSHIFT 105
14593
+#define TK_RSHIFT 106
14594
+#define TK_PLUS 107
14595
+#define TK_MINUS 108
14596
+#define TK_STAR 109
14597
+#define TK_SLASH 110
14598
+#define TK_REM 111
14599
+#define TK_CONCAT 112
14600
+#define TK_PTR 113
14601
+#define TK_COLLATE 114
14602
+#define TK_BITNOT 115
14603
+#define TK_ON 116
14604
+#define TK_INDEXED 117
14605
+#define TK_STRING 118
14606
+#define TK_JOIN_KW 119
14607
+#define TK_CONSTRAINT 120
14608
+#define TK_DEFAULT 121
14609
+#define TK_NULL 122
14610
+#define TK_PRIMARY 123
14611
+#define TK_UNIQUE 124
14612
+#define TK_CHECK 125
14613
+#define TK_REFERENCES 126
14614
+#define TK_AUTOINCR 127
14615
+#define TK_INSERT 128
14616
+#define TK_DELETE 129
14617
+#define TK_UPDATE 130
14618
+#define TK_SET 131
14619
+#define TK_DEFERRABLE 132
14620
+#define TK_FOREIGN 133
14621
+#define TK_DROP 134
14622
+#define TK_UNION 135
14623
+#define TK_ALL 136
14624
+#define TK_EXCEPT 137
14625
+#define TK_INTERSECT 138
14626
+#define TK_SELECT 139
14627
+#define TK_VALUES 140
14628
+#define TK_DISTINCT 141
14629
+#define TK_DOT 142
14630
+#define TK_FROM 143
14631
+#define TK_JOIN 144
14632
+#define TK_USING 145
14633
+#define TK_ORDER 146
14634
+#define TK_GROUP 147
14635
+#define TK_HAVING 148
14636
+#define TK_LIMIT 149
14637
+#define TK_WHERE 150
14638
+#define TK_RETURNING 151
14639
+#define TK_INTO 152
14640
+#define TK_NOTHING 153
14641
+#define TK_FLOAT 154
14642
+#define TK_BLOB 155
14643
+#define TK_INTEGER 156
14644
+#define TK_VARIABLE 157
14645
+#define TK_CASE 158
14646
+#define TK_WHEN 159
14647
+#define TK_THEN 160
14648
+#define TK_ELSE 161
14649
+#define TK_INDEX 162
14650
+#define TK_ALTER 163
14651
+#define TK_ADD 164
14652
+#define TK_WINDOW 165
14653
+#define TK_OVER 166
14654
+#define TK_FILTER 167
14655
+#define TK_COLUMN 168
14656
+#define TK_AGG_FUNCTION 169
14657
+#define TK_AGG_COLUMN 170
14658
+#define TK_TRUEFALSE 171
1466114659
#define TK_FUNCTION 172
1466214660
#define TK_UPLUS 173
1466314661
#define TK_UMINUS 174
1466414662
#define TK_TRUTH 175
1466514663
#define TK_REGISTER 176
@@ -15169,10 +15167,11 @@
1516915167
** 0x00008000 After all FROM-clause analysis
1517015168
** 0x00010000 Beginning of DELETE/INSERT/UPDATE processing
1517115169
** 0x00020000 Transform DISTINCT into GROUP BY
1517215170
** 0x00040000 SELECT tree dump after all code has been generated
1517315171
** 0x00080000 NOT NULL strength reduction
15172
+** 0x00100000 EXISTS-to-JOIN optimization
1517415173
*/
1517515174
1517615175
/*
1517715176
** Macros for "wheretrace"
1517815177
*/
@@ -16661,20 +16660,20 @@
1666116660
#define OP_IdxGE 45 /* jump, synopsis: key=r[P3@P4] */
1666216661
#define OP_RowSetRead 46 /* jump, synopsis: r[P3]=rowset(P1) */
1666316662
#define OP_RowSetTest 47 /* jump, synopsis: if r[P3] in rowset(P1) goto P2 */
1666416663
#define OP_Program 48 /* jump0 */
1666516664
#define OP_FkIfZero 49 /* jump, synopsis: if fkctr[P1]==0 goto P2 */
16666
-#define OP_IsNull 50 /* jump, same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
16667
-#define OP_NotNull 51 /* jump, same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
16668
-#define OP_Ne 52 /* jump, same as TK_NE, synopsis: IF r[P3]!=r[P1] */
16669
-#define OP_Eq 53 /* jump, same as TK_EQ, synopsis: IF r[P3]==r[P1] */
16670
-#define OP_Gt 54 /* jump, same as TK_GT, synopsis: IF r[P3]>r[P1] */
16671
-#define OP_Le 55 /* jump, same as TK_LE, synopsis: IF r[P3]<=r[P1] */
16672
-#define OP_Lt 56 /* jump, same as TK_LT, synopsis: IF r[P3]<r[P1] */
16673
-#define OP_Ge 57 /* jump, same as TK_GE, synopsis: IF r[P3]>=r[P1] */
16674
-#define OP_ElseEq 58 /* jump, same as TK_ESCAPE */
16675
-#define OP_IfPos 59 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */
16665
+#define OP_IfPos 50 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */
16666
+#define OP_IsNull 51 /* jump, same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
16667
+#define OP_NotNull 52 /* jump, same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
16668
+#define OP_Ne 53 /* jump, same as TK_NE, synopsis: IF r[P3]!=r[P1] */
16669
+#define OP_Eq 54 /* jump, same as TK_EQ, synopsis: IF r[P3]==r[P1] */
16670
+#define OP_Gt 55 /* jump, same as TK_GT, synopsis: IF r[P3]>r[P1] */
16671
+#define OP_Le 56 /* jump, same as TK_LE, synopsis: IF r[P3]<=r[P1] */
16672
+#define OP_Lt 57 /* jump, same as TK_LT, synopsis: IF r[P3]<r[P1] */
16673
+#define OP_Ge 58 /* jump, same as TK_GE, synopsis: IF r[P3]>=r[P1] */
16674
+#define OP_ElseEq 59 /* jump, same as TK_ESCAPE */
1667616675
#define OP_IfNotZero 60 /* jump, synopsis: if r[P1]!=0 then r[P1]--, goto P2 */
1667716676
#define OP_DecrJumpZero 61 /* jump, synopsis: if (--r[P1])==0 goto P2 */
1667816677
#define OP_IncrVacuum 62 /* jump */
1667916678
#define OP_VNext 63 /* jump */
1668016679
#define OP_Filter 64 /* jump, synopsis: if key(P3@P4) not in filter(P1) goto P2 */
@@ -16713,27 +16712,27 @@
1671316712
#define OP_MakeRecord 97 /* synopsis: r[P3]=mkrec(r[P1@P2]) */
1671416713
#define OP_Count 98 /* synopsis: r[P2]=count() */
1671516714
#define OP_ReadCookie 99
1671616715
#define OP_SetCookie 100
1671716716
#define OP_ReopenIdx 101 /* synopsis: root=P2 iDb=P3 */
16718
-#define OP_BitAnd 102 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
16719
-#define OP_BitOr 103 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
16720
-#define OP_ShiftLeft 104 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
16721
-#define OP_ShiftRight 105 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
16722
-#define OP_Add 106 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */
16723
-#define OP_Subtract 107 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */
16724
-#define OP_Multiply 108 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */
16725
-#define OP_Divide 109 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */
16726
-#define OP_Remainder 110 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */
16727
-#define OP_Concat 111 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */
16728
-#define OP_OpenRead 112 /* synopsis: root=P2 iDb=P3 */
16717
+#define OP_OpenRead 102 /* synopsis: root=P2 iDb=P3 */
16718
+#define OP_BitAnd 103 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
16719
+#define OP_BitOr 104 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
16720
+#define OP_ShiftLeft 105 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
16721
+#define OP_ShiftRight 106 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
16722
+#define OP_Add 107 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */
16723
+#define OP_Subtract 108 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */
16724
+#define OP_Multiply 109 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */
16725
+#define OP_Divide 110 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */
16726
+#define OP_Remainder 111 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */
16727
+#define OP_Concat 112 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */
1672916728
#define OP_OpenWrite 113 /* synopsis: root=P2 iDb=P3 */
16730
-#define OP_BitNot 114 /* same as TK_BITNOT, synopsis: r[P2]= ~r[P1] */
16731
-#define OP_OpenDup 115
16729
+#define OP_OpenDup 114
16730
+#define OP_BitNot 115 /* same as TK_BITNOT, synopsis: r[P2]= ~r[P1] */
1673216731
#define OP_OpenAutoindex 116 /* synopsis: nColumn=P2 */
16733
-#define OP_String8 117 /* same as TK_STRING, synopsis: r[P2]='P4' */
16734
-#define OP_OpenEphemeral 118 /* synopsis: nColumn=P2 */
16732
+#define OP_OpenEphemeral 117 /* synopsis: nColumn=P2 */
16733
+#define OP_String8 118 /* same as TK_STRING, synopsis: r[P2]='P4' */
1673516734
#define OP_SorterOpen 119
1673616735
#define OP_SequenceTest 120 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */
1673716736
#define OP_OpenPseudo 121 /* synopsis: P3 columns in r[P2] */
1673816737
#define OP_Close 122
1673916738
#define OP_ColumnsUsed 123
@@ -16764,12 +16763,12 @@
1676416763
#define OP_SqlExec 148
1676516764
#define OP_ParseSchema 149
1676616765
#define OP_LoadAnalysis 150
1676716766
#define OP_DropTable 151
1676816767
#define OP_DropIndex 152
16769
-#define OP_Real 153 /* same as TK_FLOAT, synopsis: r[P2]=P4 */
16770
-#define OP_DropTrigger 154
16768
+#define OP_DropTrigger 153
16769
+#define OP_Real 154 /* same as TK_FLOAT, synopsis: r[P2]=P4 */
1677116770
#define OP_IntegrityCk 155
1677216771
#define OP_RowSetAdd 156 /* synopsis: rowset(P1)=r[P2] */
1677316772
#define OP_Param 157
1677416773
#define OP_FkCounter 158 /* synopsis: fkctr[P1]+=P2 */
1677516774
#define OP_MemMax 159 /* synopsis: r[P1]=max(r[P1],r[P2]) */
@@ -16821,24 +16820,24 @@
1682116820
/* 8 */ 0x81, 0x01, 0x01, 0x81, 0x83, 0x83, 0x01, 0x01,\
1682216821
/* 16 */ 0x03, 0x03, 0x01, 0x12, 0x01, 0xc9, 0xc9, 0xc9,\
1682316822
/* 24 */ 0xc9, 0x01, 0x49, 0x49, 0x49, 0x49, 0xc9, 0x49,\
1682416823
/* 32 */ 0xc1, 0x01, 0x41, 0x41, 0xc1, 0x01, 0x41, 0x41,\
1682516824
/* 40 */ 0x41, 0x41, 0x41, 0x26, 0x26, 0x41, 0x23, 0x0b,\
16826
-/* 48 */ 0x81, 0x01, 0x03, 0x03, 0x0b, 0x0b, 0x0b, 0x0b,\
16827
-/* 56 */ 0x0b, 0x0b, 0x01, 0x03, 0x03, 0x03, 0x01, 0x41,\
16825
+/* 48 */ 0x81, 0x01, 0x03, 0x03, 0x03, 0x0b, 0x0b, 0x0b,\
16826
+/* 56 */ 0x0b, 0x0b, 0x0b, 0x01, 0x03, 0x03, 0x01, 0x41,\
1682816827
/* 64 */ 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, 0x10,\
1682916828
/* 72 */ 0x10, 0x10, 0x00, 0x10, 0x00, 0x10, 0x10, 0x00,\
1683016829
/* 80 */ 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02, 0x02,\
1683116830
/* 88 */ 0x02, 0x00, 0x00, 0x12, 0x1e, 0x20, 0x40, 0x00,\
16832
-/* 96 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x40, 0x26, 0x26,\
16831
+/* 96 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x40, 0x40, 0x26,\
1683316832
/* 104 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26,\
16834
-/* 112 */ 0x40, 0x00, 0x12, 0x40, 0x40, 0x10, 0x40, 0x00,\
16833
+/* 112 */ 0x26, 0x00, 0x40, 0x12, 0x40, 0x40, 0x10, 0x00,\
1683516834
/* 120 */ 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x10,\
1683616835
/* 128 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x50,\
1683716836
/* 136 */ 0x00, 0x40, 0x04, 0x04, 0x00, 0x40, 0x50, 0x40,\
1683816837
/* 144 */ 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\
16839
-/* 152 */ 0x00, 0x10, 0x00, 0x00, 0x06, 0x10, 0x00, 0x04,\
16838
+/* 152 */ 0x00, 0x00, 0x10, 0x00, 0x06, 0x10, 0x00, 0x04,\
1684016839
/* 160 */ 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
1684116840
/* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x50,\
1684216841
/* 176 */ 0x40, 0x00, 0x10, 0x10, 0x02, 0x12, 0x12, 0x00,\
1684316842
/* 184 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}
1684416843
@@ -17895,10 +17894,11 @@
1789517894
/* TH3 expects this value ^^^^^^^^^^ See flatten04.test */
1789617895
#define SQLITE_IndexedExpr 0x01000000 /* Pull exprs from index when able */
1789717896
#define SQLITE_Coroutines 0x02000000 /* Co-routines for subqueries */
1789817897
#define SQLITE_NullUnusedCols 0x04000000 /* NULL unused columns in subqueries */
1789917898
#define SQLITE_OnePass 0x08000000 /* Single-pass DELETE and UPDATE */
17899
+#define SQLITE_ExistsToJoin 0x10000000 /* The EXISTS-to-JOIN optimization */
1790017900
#define SQLITE_AllOpts 0xffffffff /* All optimizations */
1790117901
1790217902
/*
1790317903
** Macros for testing whether or not optimizations are enabled or disabled.
1790417904
*/
@@ -19359,11 +19359,11 @@
1935919359
#define WHERE_WANT_DISTINCT 0x0100 /* All output needs to be distinct */
1936019360
#define WHERE_SORTBYGROUP 0x0200 /* Support sqlite3WhereIsSorted() */
1936119361
#define WHERE_AGG_DISTINCT 0x0400 /* Query is "SELECT agg(DISTINCT ...)" */
1936219362
#define WHERE_ORDERBY_LIMIT 0x0800 /* ORDERBY+LIMIT on the inner loop */
1936319363
#define WHERE_RIGHT_JOIN 0x1000 /* Processing a RIGHT JOIN */
19364
- /* 0x2000 not currently used */
19364
+#define WHERE_KEEP_ALL_JOINS 0x2000 /* Do not do the omit-noop-join opt */
1936519365
#define WHERE_USE_LIMIT 0x4000 /* Use the LIMIT in cost estimates */
1936619366
/* 0x8000 not currently used */
1936719367
1936819368
/* Allowed return values from sqlite3WhereIsDistinct()
1936919369
*/
@@ -19431,11 +19431,11 @@
1943119431
#define NC_UEList 0x000080 /* True if uNC.pEList is used */
1943219432
#define NC_UAggInfo 0x000100 /* True if uNC.pAggInfo is used */
1943319433
#define NC_UUpsert 0x000200 /* True if uNC.pUpsert is used */
1943419434
#define NC_UBaseReg 0x000400 /* True if uNC.iBaseReg is used */
1943519435
#define NC_MinMaxAgg 0x001000 /* min/max aggregates seen. See note above */
19436
-#define NC_Complex 0x002000 /* True if a function or subquery seen */
19436
+/* 0x002000 // available for reuse */
1943719437
#define NC_AllowWin 0x004000 /* Window functions are allowed here */
1943819438
#define NC_HasWin 0x008000 /* One or more window functions seen */
1943919439
#define NC_IsDDL 0x010000 /* Resolving names in a CREATE statement */
1944019440
#define NC_InAggFunc 0x020000 /* True if analyzing arguments to an agg func */
1944119441
#define NC_FromDDL 0x040000 /* SQL text comes from sqlite_schema */
@@ -19798,10 +19798,11 @@
1979819798
u8 okConstFactor; /* OK to factor out constants */
1979919799
u8 disableLookaside; /* Number of times lookaside has been disabled */
1980019800
u8 prepFlags; /* SQLITE_PREPARE_* flags */
1980119801
u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */
1980219802
u8 bHasWith; /* True if statement contains WITH */
19803
+ u8 bHasExists; /* Has a correlated "EXISTS (SELECT ....)" expression */
1980319804
#if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST)
1980419805
u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */
1980519806
#endif
1980619807
#ifdef SQLITE_DEBUG
1980719808
u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */
@@ -21059,11 +21060,11 @@
2105921060
SQLITE_PRIVATE int sqlite3ExprIsConstantOrGroupBy(Parse*, Expr*, ExprList*);
2106021061
SQLITE_PRIVATE int sqlite3ExprIsSingleTableConstraint(Expr*,const SrcList*,int,int);
2106121062
#ifdef SQLITE_ENABLE_CURSOR_HINTS
2106221063
SQLITE_PRIVATE int sqlite3ExprContainsSubquery(Expr*);
2106321064
#endif
21064
-SQLITE_PRIVATE int sqlite3ExprIsInteger(const Expr*, int*);
21065
+SQLITE_PRIVATE int sqlite3ExprIsInteger(const Expr*, int*, Parse*);
2106521066
SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr*);
2106621067
SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);
2106721068
SQLITE_PRIVATE int sqlite3IsRowid(const char*);
2106821069
SQLITE_PRIVATE const char *sqlite3RowidAlias(Table *pTab);
2106921070
SQLITE_PRIVATE void sqlite3GenerateRowDelete(
@@ -24885,12 +24886,12 @@
2488524886
} aXformType[] = {
2488624887
/* 0 */ { 6, "second", 4.6427e+14, 1.0 },
2488724888
/* 1 */ { 6, "minute", 7.7379e+12, 60.0 },
2488824889
/* 2 */ { 4, "hour", 1.2897e+11, 3600.0 },
2488924890
/* 3 */ { 3, "day", 5373485.0, 86400.0 },
24890
- /* 4 */ { 5, "month", 176546.0, 30.0*86400.0 },
24891
- /* 5 */ { 4, "year", 14713.0, 365.0*86400.0 },
24891
+ /* 4 */ { 5, "month", 176546.0, 2592000.0 },
24892
+ /* 5 */ { 4, "year", 14713.0, 31536000.0 },
2489224893
};
2489324894
2489424895
/*
2489524896
** If the DateTime p is raw number, try to figure out if it is
2489624897
** a julian day number of a unix timestamp. Set the p value
@@ -35924,14 +35925,17 @@
3592435925
3592535926
/*
3592635927
** Decode a floating-point value into an approximate decimal
3592735928
** representation.
3592835929
**
35929
-** Round the decimal representation to n significant digits if
35930
-** n is positive. Or round to -n signficant digits after the
35931
-** decimal point if n is negative. No rounding is performed if
35932
-** n is zero.
35930
+** If iRound<=0 then round to -iRound significant digits to the
35931
+** the left of the decimal point, or to a maximum of mxRound total
35932
+** significant digits.
35933
+**
35934
+** If iRound>0 round to min(iRound,mxRound) significant digits total.
35935
+**
35936
+** mxRound must be positive.
3593335937
**
3593435938
** The significant digits of the decimal representation are
3593535939
** stored in p->z[] which is a often (but not always) a pointer
3593635940
** into the middle of p->zBuf[]. There are p->n significant digits.
3593735941
** The p->z[] array is *not* zero-terminated.
@@ -35940,10 +35944,12 @@
3594035944
int i;
3594135945
u64 v;
3594235946
int e, exp = 0;
3594335947
p->isSpecial = 0;
3594435948
p->z = p->zBuf;
35949
+
35950
+ assert( mxRound>0 );
3594535951
3594635952
/* Convert negative numbers to positive. Deal with Infinity, 0.0, and
3594735953
** NaN. */
3594835954
if( r<0.0 ){
3594935955
p->sign = '-';
@@ -37227,20 +37233,20 @@
3722737233
/* 45 */ "IdxGE" OpHelp("key=r[P3@P4]"),
3722837234
/* 46 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
3722937235
/* 47 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
3723037236
/* 48 */ "Program" OpHelp(""),
3723137237
/* 49 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
37232
- /* 50 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
37233
- /* 51 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
37234
- /* 52 */ "Ne" OpHelp("IF r[P3]!=r[P1]"),
37235
- /* 53 */ "Eq" OpHelp("IF r[P3]==r[P1]"),
37236
- /* 54 */ "Gt" OpHelp("IF r[P3]>r[P1]"),
37237
- /* 55 */ "Le" OpHelp("IF r[P3]<=r[P1]"),
37238
- /* 56 */ "Lt" OpHelp("IF r[P3]<r[P1]"),
37239
- /* 57 */ "Ge" OpHelp("IF r[P3]>=r[P1]"),
37240
- /* 58 */ "ElseEq" OpHelp(""),
37241
- /* 59 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
37238
+ /* 50 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
37239
+ /* 51 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
37240
+ /* 52 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
37241
+ /* 53 */ "Ne" OpHelp("IF r[P3]!=r[P1]"),
37242
+ /* 54 */ "Eq" OpHelp("IF r[P3]==r[P1]"),
37243
+ /* 55 */ "Gt" OpHelp("IF r[P3]>r[P1]"),
37244
+ /* 56 */ "Le" OpHelp("IF r[P3]<=r[P1]"),
37245
+ /* 57 */ "Lt" OpHelp("IF r[P3]<r[P1]"),
37246
+ /* 58 */ "Ge" OpHelp("IF r[P3]>=r[P1]"),
37247
+ /* 59 */ "ElseEq" OpHelp(""),
3724237248
/* 60 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]--, goto P2"),
3724337249
/* 61 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
3724437250
/* 62 */ "IncrVacuum" OpHelp(""),
3724537251
/* 63 */ "VNext" OpHelp(""),
3724637252
/* 64 */ "Filter" OpHelp("if key(P3@P4) not in filter(P1) goto P2"),
@@ -37279,27 +37285,27 @@
3727937285
/* 97 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"),
3728037286
/* 98 */ "Count" OpHelp("r[P2]=count()"),
3728137287
/* 99 */ "ReadCookie" OpHelp(""),
3728237288
/* 100 */ "SetCookie" OpHelp(""),
3728337289
/* 101 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
37284
- /* 102 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
37285
- /* 103 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
37286
- /* 104 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
37287
- /* 105 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
37288
- /* 106 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
37289
- /* 107 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
37290
- /* 108 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
37291
- /* 109 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
37292
- /* 110 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
37293
- /* 111 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
37294
- /* 112 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
37290
+ /* 102 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
37291
+ /* 103 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
37292
+ /* 104 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
37293
+ /* 105 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
37294
+ /* 106 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
37295
+ /* 107 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
37296
+ /* 108 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
37297
+ /* 109 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
37298
+ /* 110 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
37299
+ /* 111 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
37300
+ /* 112 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
3729537301
/* 113 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
37296
- /* 114 */ "BitNot" OpHelp("r[P2]= ~r[P1]"),
37297
- /* 115 */ "OpenDup" OpHelp(""),
37302
+ /* 114 */ "OpenDup" OpHelp(""),
37303
+ /* 115 */ "BitNot" OpHelp("r[P2]= ~r[P1]"),
3729837304
/* 116 */ "OpenAutoindex" OpHelp("nColumn=P2"),
37299
- /* 117 */ "String8" OpHelp("r[P2]='P4'"),
37300
- /* 118 */ "OpenEphemeral" OpHelp("nColumn=P2"),
37305
+ /* 117 */ "OpenEphemeral" OpHelp("nColumn=P2"),
37306
+ /* 118 */ "String8" OpHelp("r[P2]='P4'"),
3730137307
/* 119 */ "SorterOpen" OpHelp(""),
3730237308
/* 120 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
3730337309
/* 121 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
3730437310
/* 122 */ "Close" OpHelp(""),
3730537311
/* 123 */ "ColumnsUsed" OpHelp(""),
@@ -37330,12 +37336,12 @@
3733037336
/* 148 */ "SqlExec" OpHelp(""),
3733137337
/* 149 */ "ParseSchema" OpHelp(""),
3733237338
/* 150 */ "LoadAnalysis" OpHelp(""),
3733337339
/* 151 */ "DropTable" OpHelp(""),
3733437340
/* 152 */ "DropIndex" OpHelp(""),
37335
- /* 153 */ "Real" OpHelp("r[P2]=P4"),
37336
- /* 154 */ "DropTrigger" OpHelp(""),
37341
+ /* 153 */ "DropTrigger" OpHelp(""),
37342
+ /* 154 */ "Real" OpHelp("r[P2]=P4"),
3733737343
/* 155 */ "IntegrityCk" OpHelp(""),
3733837344
/* 156 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
3733937345
/* 157 */ "Param" OpHelp(""),
3734037346
/* 158 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
3734137347
/* 159 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
@@ -42345,11 +42351,11 @@
4234542351
}
4234642352
}
4234742353
4234842354
/* Forward declaration */
4234942355
static int unixGetTempname(int nBuf, char *zBuf);
42350
-#ifndef SQLITE_OMIT_WAL
42356
+#if !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL)
4235142357
static int unixFcntlExternalReader(unixFile*, int*);
4235242358
#endif
4235342359
4235442360
/*
4235542361
** Information and control of an open file handle.
@@ -42472,11 +42478,11 @@
4247242478
return proxyFileControl(id,op,pArg);
4247342479
}
4247442480
#endif /* SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) */
4247542481
4247642482
case SQLITE_FCNTL_EXTERNAL_READER: {
42477
-#ifndef SQLITE_OMIT_WAL
42483
+#if !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL)
4247842484
return unixFcntlExternalReader((unixFile*)id, (int*)pArg);
4247942485
#else
4248042486
*(int*)pArg = 0;
4248142487
return SQLITE_OK;
4248242488
#endif
@@ -42645,11 +42651,11 @@
4264542651
#endif
4264642652
}
4264742653
4264842654
#endif /* !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 */
4264942655
42650
-#ifndef SQLITE_OMIT_WAL
42656
+#if !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL)
4265142657
4265242658
/*
4265342659
** Object used to represent an shared memory buffer.
4265442660
**
4265542661
** When multiple threads all reference the same wal-index, each thread
@@ -102134,18 +102140,33 @@
102134102140
}
102135102141
#endif
102136102142
102137102143
/* Opcode: Noop * * * * *
102138102144
**
102139
-** Do nothing. This instruction is often useful as a jump
102140
-** destination.
102145
+** Do nothing. Continue downward to the next opcode.
102141102146
*/
102142
-/*
102143
-** The magic Explain opcode are only inserted when explain==2 (which
102144
-** is to say when the EXPLAIN QUERY PLAN syntax is used.)
102145
-** This opcode records information from the optimizer. It is the
102146
-** the same as a no-op. This opcodesnever appears in a real VM program.
102147
+/* Opcode: Explain P1 P2 P3 P4 *
102148
+**
102149
+** This is the same as OP_Noop during normal query execution. The
102150
+** purpose of this opcode is to hold information about the query
102151
+** plan for the purpose of EXPLAIN QUERY PLAN output.
102152
+**
102153
+** The P4 value is human-readable text that describes the query plan
102154
+** element. Something like "SCAN t1" or "SEARCH t2 USING INDEX t2x1".
102155
+**
102156
+** The P1 value is the ID of the current element and P2 is the parent
102157
+** element for the case of nested query plan elements. If P2 is zero
102158
+** then this element is a top-level element.
102159
+**
102160
+** For loop elements, P3 is the estimated code of each invocation of this
102161
+** element.
102162
+**
102163
+** As with all opcodes, the meanings of the parameters for OP_Explain
102164
+** are subject to change from one release to the next. Applications
102165
+** should not attempt to interpret or use any of the information
102166
+** contined in the OP_Explain opcode. The information provided by this
102167
+** opcode is intended for testing and debugging use only.
102147102168
*/
102148102169
default: { /* This is really OP_Noop, OP_Explain */
102149102170
assert( pOp->opcode==OP_Noop || pOp->opcode==OP_Explain );
102150102171
102151102172
break;
@@ -106970,11 +106991,11 @@
106970106991
** Return TRUE (non-zero) if zTab is a valid name for the schema table pTab.
106971106992
*/
106972106993
static SQLITE_NOINLINE int isValidSchemaTableName(
106973106994
const char *zTab, /* Name as it appears in the SQL */
106974106995
Table *pTab, /* The schema table we are trying to match */
106975
- Schema *pSchema /* non-NULL if a database qualifier is present */
106996
+ const char *zDb /* non-NULL if a database qualifier is present */
106976106997
){
106977106998
const char *zLegacy;
106978106999
assert( pTab!=0 );
106979107000
assert( pTab->tnum==1 );
106980107001
if( sqlite3StrNICmp(zTab, "sqlite_", 7)!=0 ) return 0;
@@ -106981,11 +107002,11 @@
106981107002
zLegacy = pTab->zName;
106982107003
if( strcmp(zLegacy+7, &LEGACY_TEMP_SCHEMA_TABLE[7])==0 ){
106983107004
if( sqlite3StrICmp(zTab+7, &PREFERRED_TEMP_SCHEMA_TABLE[7])==0 ){
106984107005
return 1;
106985107006
}
106986
- if( pSchema==0 ) return 0;
107007
+ if( zDb==0 ) return 0;
106987107008
if( sqlite3StrICmp(zTab+7, &LEGACY_SCHEMA_TABLE[7])==0 ) return 1;
106988107009
if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1;
106989107010
}else{
106990107011
if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1;
106991107012
}
@@ -107164,11 +107185,11 @@
107164107185
if( sqlite3StrICmp(zTab, pItem->zAlias)!=0 ){
107165107186
continue;
107166107187
}
107167107188
}else if( sqlite3StrICmp(zTab, pTab->zName)!=0 ){
107168107189
if( pTab->tnum!=1 ) continue;
107169
- if( !isValidSchemaTableName(zTab, pTab, pSchema) ) continue;
107190
+ if( !isValidSchemaTableName(zTab, pTab, zDb) ) continue;
107170107191
}
107171107192
assert( ExprUseYTab(pExpr) );
107172107193
if( IN_RENAME_OBJECT && pItem->zAlias ){
107173107194
sqlite3RenameTokenRemap(pParse, 0, (void*)&pExpr->y.pTab);
107174107195
}
@@ -108109,10 +108130,11 @@
108109108130
}
108110108131
assert( pNC->nRef>=nRef );
108111108132
if( nRef!=pNC->nRef ){
108112108133
ExprSetProperty(pExpr, EP_VarSelect);
108113108134
pExpr->x.pSelect->selFlags |= SF_Correlated;
108135
+ if( pExpr->op==TK_EXISTS ) pParse->bHasExists = 1;
108114108136
}
108115108137
pNC->ncFlags |= NC_Subquery;
108116108138
}
108117108139
break;
108118108140
}
@@ -108247,11 +108269,11 @@
108247108269
NameContext nc; /* Name context for resolving pE */
108248108270
sqlite3 *db; /* Database connection */
108249108271
int rc; /* Return code from subprocedures */
108250108272
u8 savedSuppErr; /* Saved value of db->suppressErr */
108251108273
108252
- assert( sqlite3ExprIsInteger(pE, &i)==0 );
108274
+ assert( sqlite3ExprIsInteger(pE, &i, 0)==0 );
108253108275
pEList = pSelect->pEList;
108254108276
108255108277
/* Resolve all names in the ORDER BY term expression
108256108278
*/
108257108279
memset(&nc, 0, sizeof(nc));
@@ -108346,11 +108368,11 @@
108346108368
int iCol = -1;
108347108369
Expr *pE, *pDup;
108348108370
if( pItem->fg.done ) continue;
108349108371
pE = sqlite3ExprSkipCollateAndLikely(pItem->pExpr);
108350108372
if( NEVER(pE==0) ) continue;
108351
- if( sqlite3ExprIsInteger(pE, &iCol) ){
108373
+ if( sqlite3ExprIsInteger(pE, &iCol, 0) ){
108352108374
if( iCol<=0 || iCol>pEList->nExpr ){
108353108375
resolveOutOfRangeError(pParse, "ORDER", i+1, pEList->nExpr, pE);
108354108376
return 1;
108355108377
}
108356108378
}else{
@@ -108531,11 +108553,11 @@
108531108553
** copy of the iCol-th result-set expression. */
108532108554
pItem->u.x.iOrderByCol = (u16)iCol;
108533108555
continue;
108534108556
}
108535108557
}
108536
- if( sqlite3ExprIsInteger(pE2, &iCol) ){
108558
+ if( sqlite3ExprIsInteger(pE2, &iCol, 0) ){
108537108559
/* The ORDER BY term is an integer constant. Again, set the column
108538108560
** number so that sqlite3ResolveOrderGroupBy() will convert the
108539108561
** order-by term to a copy of the result-set expression */
108540108562
if( iCol<1 || iCol>0xffff ){
108541108563
resolveOutOfRangeError(pParse, zType, i+1, nResult, pE2);
@@ -111815,12 +111837,16 @@
111815111837
/*
111816111838
** If the expression p codes a constant integer that is small enough
111817111839
** to fit in a 32-bit integer, return 1 and put the value of the integer
111818111840
** in *pValue. If the expression is not an integer or if it is too big
111819111841
** to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
111842
+**
111843
+** If the pParse pointer is provided, then allow the expression p to be
111844
+** a parameter (TK_VARIABLE) that is bound to an integer.
111845
+** But if pParse is NULL, then p must be a pure integer literal.
111820111846
*/
111821
-SQLITE_PRIVATE int sqlite3ExprIsInteger(const Expr *p, int *pValue){
111847
+SQLITE_PRIVATE int sqlite3ExprIsInteger(const Expr *p, int *pValue, Parse *pParse){
111822111848
int rc = 0;
111823111849
if( NEVER(p==0) ) return 0; /* Used to only happen following on OOM */
111824111850
111825111851
/* If an expression is an integer literal that fits in a signed 32-bit
111826111852
** integer, then the EP_IntValue flag will have already been set */
@@ -111831,21 +111857,41 @@
111831111857
*pValue = p->u.iValue;
111832111858
return 1;
111833111859
}
111834111860
switch( p->op ){
111835111861
case TK_UPLUS: {
111836
- rc = sqlite3ExprIsInteger(p->pLeft, pValue);
111862
+ rc = sqlite3ExprIsInteger(p->pLeft, pValue, 0);
111837111863
break;
111838111864
}
111839111865
case TK_UMINUS: {
111840111866
int v = 0;
111841
- if( sqlite3ExprIsInteger(p->pLeft, &v) ){
111867
+ if( sqlite3ExprIsInteger(p->pLeft, &v, 0) ){
111842111868
assert( ((unsigned int)v)!=0x80000000 );
111843111869
*pValue = -v;
111844111870
rc = 1;
111845111871
}
111846111872
break;
111873
+ }
111874
+ case TK_VARIABLE: {
111875
+ sqlite3_value *pVal;
111876
+ if( pParse==0 ) break;
111877
+ if( NEVER(pParse->pVdbe==0) ) break;
111878
+ if( (pParse->db->flags & SQLITE_EnableQPSG)!=0 ) break;
111879
+ sqlite3VdbeSetVarmask(pParse->pVdbe, p->iColumn);
111880
+ pVal = sqlite3VdbeGetBoundValue(pParse->pReprepare, p->iColumn,
111881
+ SQLITE_AFF_BLOB);
111882
+ if( pVal ){
111883
+ if( sqlite3_value_type(pVal)==SQLITE_INTEGER ){
111884
+ sqlite3_int64 vv = sqlite3_value_int64(pVal);
111885
+ if( vv == (vv & 0x7fffffff) ){ /* non-negative numbers only */
111886
+ *pValue = (int)vv;
111887
+ rc = 1;
111888
+ }
111889
+ }
111890
+ sqlite3ValueFree(pVal);
111891
+ }
111892
+ break;
111847111893
}
111848111894
default: break;
111849111895
}
111850111896
return rc;
111851111897
}
@@ -126430,18 +126476,21 @@
126430126476
** Append the contents of SrcList p2 to SrcList p1 and return the resulting
126431126477
** SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2
126432126478
** are deleted by this function.
126433126479
*/
126434126480
SQLITE_PRIVATE SrcList *sqlite3SrcListAppendList(Parse *pParse, SrcList *p1, SrcList *p2){
126435
- assert( p1 && p1->nSrc==1 );
126481
+ assert( p1 );
126436126482
if( p2 ){
126437
- SrcList *pNew = sqlite3SrcListEnlarge(pParse, p1, p2->nSrc, 1);
126483
+ int nOld = p1->nSrc;
126484
+ SrcList *pNew = sqlite3SrcListEnlarge(pParse, p1, p2->nSrc, nOld);
126438126485
if( pNew==0 ){
126439126486
sqlite3SrcListDelete(pParse->db, p2);
126440126487
}else{
126441126488
p1 = pNew;
126442
- memcpy(&p1->a[1], p2->a, p2->nSrc*sizeof(SrcItem));
126489
+ memcpy(&p1->a[nOld], p2->a, p2->nSrc*sizeof(SrcItem));
126490
+ assert( nOld==1 || (p2->nSrc==1 && (p2->a[0].fg.jointype&JT_LTORJ)==0) );
126491
+ assert( p1->nSrc>=2 );
126443126492
sqlite3DbFree(pParse->db, p2);
126444126493
p1->a[0].fg.jointype |= (JT_LTORJ & p1->a[1].fg.jointype);
126445126494
}
126446126495
}
126447126496
return p1;
@@ -131209,10 +131258,11 @@
131209131258
UNUSED_PARAMETER(argc);
131210131259
assert( argc==3 );
131211131260
x = sqlite3_value_double(argv[0]);
131212131261
y = sqlite3_value_int(argv[1]);
131213131262
z = sqlite3_value_int(argv[2]);
131263
+ if( z<=0 ) z = 1;
131214131264
sqlite3FpDecode(&s, x, y, z);
131215131265
if( s.isSpecial==2 ){
131216131266
sqlite3_snprintf(sizeof(zBuf), zBuf, "NaN");
131217131267
}else{
131218131268
sqlite3_snprintf(sizeof(zBuf), zBuf, "%c%.*s/%d", s.sign, s.n, s.z, s.iDP);
@@ -145397,11 +145447,11 @@
145397145447
assert( pLimit->op==TK_LIMIT );
145398145448
assert( pLimit->pLeft!=0 );
145399145449
p->iLimit = iLimit = ++pParse->nMem;
145400145450
v = sqlite3GetVdbe(pParse);
145401145451
assert( v!=0 );
145402
- if( sqlite3ExprIsInteger(pLimit->pLeft, &n) ){
145452
+ if( sqlite3ExprIsInteger(pLimit->pLeft, &n, pParse) ){
145403145453
sqlite3VdbeAddOp2(v, OP_Integer, n, iLimit);
145404145454
VdbeComment((v, "LIMIT counter"));
145405145455
if( n==0 ){
145406145456
sqlite3VdbeGoto(v, iBreak);
145407145457
}else if( n>=0 && p->nSelectRow>sqlite3LogEst((u64)n) ){
@@ -145877,11 +145927,11 @@
145877145927
testcase( rc!=SQLITE_OK );
145878145928
pDelete = p->pPrior;
145879145929
p->pPrior = pPrior;
145880145930
p->nSelectRow = sqlite3LogEstAdd(p->nSelectRow, pPrior->nSelectRow);
145881145931
if( p->pLimit
145882
- && sqlite3ExprIsInteger(p->pLimit->pLeft, &nLimit)
145932
+ && sqlite3ExprIsInteger(p->pLimit->pLeft, &nLimit, pParse)
145883145933
&& nLimit>0 && p->nSelectRow > sqlite3LogEst((u64)nLimit)
145884145934
){
145885145935
p->nSelectRow = sqlite3LogEst((u64)nLimit);
145886145936
}
145887145937
if( addr ){
@@ -150187,10 +150237,162 @@
150187150237
pItem--;
150188150238
if( pItem->pSelect!=0 ) return 0; /* (1c-i) */
150189150239
}
150190150240
return 1;
150191150241
}
150242
+
150243
+/*
150244
+** sqlite3WalkExpr() callback used by exprReferencesTable().
150245
+*/
150246
+static int exprReferencesTableExprCb(Walker *pWalker, Expr *pExpr){
150247
+ if( pExpr->op==TK_COLUMN && pExpr->iTable==pWalker->u.iCur ){
150248
+ pWalker->eCode = 1;
150249
+ }
150250
+ return WRC_Continue;
150251
+}
150252
+
150253
+/*
150254
+** Return true if the expression passed as the first argument refers
150255
+** to cursor number iCur. Otherwise return false.
150256
+*/
150257
+static int exprReferencesTable(Expr *pExpr, int iCur){
150258
+ Walker w;
150259
+ memset(&w, 0, sizeof(w));
150260
+ w.u.iCur = iCur;
150261
+ w.xExprCallback = exprReferencesTableExprCb;
150262
+ w.xSelectCallback = sqlite3SelectWalkNoop;
150263
+ sqlite3WalkExpr(&w, pExpr);
150264
+ return w.eCode;
150265
+}
150266
+
150267
+/*
150268
+** Index pIdx is a UNIQUE index on the table accessed by cursor number
150269
+** iCsr. This function returns a mask of the index columns that are
150270
+** constrained to match a single, non-NULL value by the WHERE clause
150271
+** passed as the 4th argument. For example, if the index is:
150272
+**
150273
+** CREATE UNIQUE INDEX idx ON tbl(a, b, c);
150274
+**
150275
+** and pWhere:
150276
+**
150277
+** WHERE a=? AND c=?
150278
+**
150279
+** then this function returns 5.
150280
+*/
150281
+static u64 findConstIdxTerms(
150282
+ Parse *pParse,
150283
+ int iCsr,
150284
+ Index *pIdx,
150285
+ Expr *pWhere
150286
+){
150287
+ u64 m = 0;
150288
+ if( pWhere->op==TK_AND ){
150289
+ m = findConstIdxTerms(pParse, iCsr, pIdx, pWhere->pLeft);
150290
+ m |= findConstIdxTerms(pParse, iCsr, pIdx, pWhere->pRight);
150291
+ }else if( pWhere->op==TK_EQ ){
150292
+ Expr *pLeft = sqlite3ExprSkipCollateAndLikely(pWhere->pLeft);
150293
+ Expr *pRight = sqlite3ExprSkipCollateAndLikely(pWhere->pRight);
150294
+ if( pRight->op==TK_COLUMN && pRight->iTable==iCsr ){
150295
+ SWAP(Expr*, pLeft, pRight);
150296
+ }
150297
+ if( pLeft->op==TK_COLUMN
150298
+ && pLeft->iTable==iCsr
150299
+ && exprReferencesTable(pRight, iCsr)==0
150300
+ ){
150301
+ if( pIdx ){
150302
+ int ii;
150303
+ for(ii=0; ii<pIdx->nKeyCol; ii++){
150304
+ assert( pIdx->azColl[ii] );
150305
+ if( pLeft->iColumn==pIdx->aiColumn[ii] ){
150306
+ CollSeq *pColl = sqlite3ExprCompareCollSeq(pParse, pWhere);
150307
+ if( pColl && sqlite3StrICmp(pColl->zName, pIdx->azColl[ii])==0 ){
150308
+ m |= ((u64)1 << ii);
150309
+ break;
150310
+ }
150311
+ }
150312
+ }
150313
+ }else{
150314
+ if( pLeft->iColumn<0 ) m = 1;
150315
+ }
150316
+ }
150317
+ }
150318
+ return m;
150319
+}
150320
+
150321
+/*
150322
+** Argument pWhere is the WHERE clause belonging to SELECT statement p. This
150323
+** function attempts to transform expressions of the form:
150324
+**
150325
+** EXISTS (SELECT ...)
150326
+**
150327
+** into joins. For example, given
150328
+**
150329
+** CREATE TABLE sailors(sid INTEGER PRIMARY KEY, name TEXT);
150330
+** CREATE TABLE reserves(sid INT, day DATE, PRIMARY KEY(sid, day));
150331
+**
150332
+** SELECT name FROM sailors AS S WHERE EXISTS (
150333
+** SELECT * FROM reserves AS R WHERE S.sid = R.sid AND R.day = '2022-10-25'
150334
+** );
150335
+**
150336
+** the SELECT statement may be transformed as follows:
150337
+**
150338
+** SELECT name FROM sailors AS S, reserves AS R
150339
+** WHERE S.sid = R.sid AND R.day = '2022-10-25';
150340
+*/
150341
+static void existsToJoin(Parse *pParse, Select *p, Expr *pWhere){
150342
+ if( pWhere && p->pSrc->nSrc>0 && pParse->db->mallocFailed==0 ){
150343
+ if( pWhere->op==TK_AND ){
150344
+ Expr *pRight = pWhere->pRight;
150345
+ existsToJoin(pParse, p, pWhere->pLeft);
150346
+ existsToJoin(pParse, p, pRight);
150347
+ }
150348
+ else if( pWhere->op==TK_EXISTS ){
150349
+ Select *pSub = pWhere->x.pSelect;
150350
+ if( pSub->pSrc->nSrc==1
150351
+ && (pSub->selFlags & (SF_Aggregate|SF_Correlated))==SF_Correlated
150352
+ && pSub->pWhere
150353
+ ){
150354
+ int bTransform = 0; /* True if EXISTS can be made into join */
150355
+ Table *pTab = pSub->pSrc->a[0].pTab;
150356
+ int iCsr = pSub->pSrc->a[0].iCursor;
150357
+ Index *pIdx;
150358
+ if( HasRowid(pTab) && findConstIdxTerms(pParse, iCsr, 0,pSub->pWhere) ){
150359
+ bTransform = 1;
150360
+ }
150361
+ for(pIdx=pTab->pIndex; pIdx && bTransform==0; pIdx=pIdx->pNext){
150362
+ if( pIdx->onError && pIdx->nKeyCol<=63 ){
150363
+ u64 c = findConstIdxTerms(pParse, iCsr, pIdx, pSub->pWhere);
150364
+ if( c==((u64)1 << pIdx->nKeyCol)-1 ){
150365
+ bTransform = 1;
150366
+ }
150367
+ }
150368
+ }
150369
+ if( bTransform ){
150370
+ memset(pWhere, 0, sizeof(*pWhere));
150371
+ pWhere->op = TK_INTEGER;
150372
+ pWhere->u.iValue = 1;
150373
+ ExprSetProperty(pWhere, EP_IntValue);
150374
+
150375
+ assert( p->pWhere!=0 );
150376
+ p->pSrc = sqlite3SrcListAppendList(pParse, p->pSrc, pSub->pSrc);
150377
+ p->pWhere = sqlite3PExpr(pParse, TK_AND, p->pWhere, pSub->pWhere);
150378
+
150379
+ pSub->pWhere = 0;
150380
+ pSub->pSrc = 0;
150381
+ sqlite3ParserAddCleanup(pParse, sqlite3SelectDeleteGeneric, pSub);
150382
+#if TREETRACE_ENABLED
150383
+ if( sqlite3TreeTrace & 0x100000 ){
150384
+ TREETRACE(0x100000,pParse,p,
150385
+ ("After EXISTS-to-JOIN optimization:\n"));
150386
+ sqlite3TreeViewSelect(0, p, 0);
150387
+ }
150388
+#endif
150389
+ }
150390
+ }
150391
+ }
150392
+ }
150393
+}
150192150394
150193150395
/*
150194150396
** Generate code for the SELECT statement given in the p argument.
150195150397
**
150196150398
** The results are returned according to the SelectDest structure.
@@ -150513,10 +150715,17 @@
150513150715
#endif
150514150716
if( p->pNext==0 ) ExplainQueryPlanPop(pParse);
150515150717
return rc;
150516150718
}
150517150719
#endif
150720
+
150721
+ /* If there may be an "EXISTS (SELECT ...)" in the WHERE clause, attempt
150722
+ ** to change it into a join. */
150723
+ if( pParse->bHasExists && OptimizationEnabled(db,SQLITE_ExistsToJoin) ){
150724
+ existsToJoin(pParse, p, p->pWhere);
150725
+ pTabList = p->pSrc;
150726
+ }
150518150727
150519150728
/* Do the WHERE-clause constant propagation optimization if this is
150520150729
** a join. No need to speed time on this operation for non-join queries
150521150730
** as the equivalent optimization will be handled by query planner in
150522150731
** sqlite3WhereBegin().
@@ -151236,11 +151445,15 @@
151236151445
pAggInfo->directMode = 1;
151237151446
sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j);
151238151447
}
151239151448
151240151449
if( iOrderByCol ){
151241
- sqlite3ExprToRegister(p->pEList->a[iOrderByCol-1].pExpr, iAMem+j);
151450
+ Expr *pX = p->pEList->a[iOrderByCol-1].pExpr;
151451
+ Expr *pBase = sqlite3ExprSkipCollateAndLikely(pX);
151452
+ if( ALWAYS(pBase!=0) && pBase->op!=TK_AGG_COLUMN ){
151453
+ sqlite3ExprToRegister(pX, iAMem+j);
151454
+ }
151242151455
}
151243151456
}
151244151457
sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,
151245151458
(char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
151246151459
addr1 = sqlite3VdbeCurrentAddr(v);
@@ -157658,11 +157871,12 @@
157658157871
}
157659157872
#endif
157660157873
zMsg = sqlite3StrAccumFinish(&str);
157661157874
sqlite3ExplainBreakpoint("",zMsg);
157662157875
ret = sqlite3VdbeAddOp4(v, OP_Explain, sqlite3VdbeCurrentAddr(v),
157663
- pParse->addrExplain, 0, zMsg,P4_DYNAMIC);
157876
+ pParse->addrExplain, pLoop->rRun,
157877
+ zMsg, P4_DYNAMIC);
157664157878
}
157665157879
return ret;
157666157880
}
157667157881
157668157882
/*
@@ -158042,10 +158256,151 @@
158042158256
}
158043158257
}
158044158258
return pNew;
158045158259
}
158046158260
158261
+
158262
+#ifndef SQLITE_OMIT_SUBQUERY
158263
+/*
158264
+** Generate code for a single X IN (....) term of the WHERE clause.
158265
+**
158266
+** This is a special-case of codeEqualityTerm() that works for IN operators
158267
+** only. It is broken out into a subroutine because this case is
158268
+** uncommon and by splitting it off into a subroutine, the common case
158269
+** runs faster.
158270
+**
158271
+** The current value for the constraint is left in register iTarget.
158272
+** This routine sets up a loop that will iterate over all values of X.
158273
+*/
158274
+static SQLITE_NOINLINE void codeINTerm(
158275
+ Parse *pParse, /* The parsing context */
158276
+ WhereTerm *pTerm, /* The term of the WHERE clause to be coded */
158277
+ WhereLevel *pLevel, /* The level of the FROM clause we are working on */
158278
+ int iEq, /* Index of the equality term within this level */
158279
+ int bRev, /* True for reverse-order IN operations */
158280
+ int iTarget /* Attempt to leave results in this register */
158281
+){
158282
+ Expr *pX = pTerm->pExpr;
158283
+ int eType = IN_INDEX_NOOP;
158284
+ int iTab;
158285
+ struct InLoop *pIn;
158286
+ WhereLoop *pLoop = pLevel->pWLoop;
158287
+ Vdbe *v = pParse->pVdbe;
158288
+ int i;
158289
+ int nEq = 0;
158290
+ int *aiMap = 0;
158291
+
158292
+ if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0
158293
+ && pLoop->u.btree.pIndex!=0
158294
+ && pLoop->u.btree.pIndex->aSortOrder[iEq]
158295
+ ){
158296
+ testcase( iEq==0 );
158297
+ testcase( bRev );
158298
+ bRev = !bRev;
158299
+ }
158300
+ assert( pX->op==TK_IN );
158301
+
158302
+ for(i=0; i<iEq; i++){
158303
+ if( pLoop->aLTerm[i] && pLoop->aLTerm[i]->pExpr==pX ){
158304
+ disableTerm(pLevel, pTerm);
158305
+ return;
158306
+ }
158307
+ }
158308
+ for(i=iEq;i<pLoop->nLTerm; i++){
158309
+ assert( pLoop->aLTerm[i]!=0 );
158310
+ if( pLoop->aLTerm[i]->pExpr==pX ) nEq++;
158311
+ }
158312
+
158313
+ iTab = 0;
158314
+ if( !ExprUseXSelect(pX) || pX->x.pSelect->pEList->nExpr==1 ){
158315
+ eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, 0, &iTab);
158316
+ }else{
158317
+ Expr *pExpr = pTerm->pExpr;
158318
+ if( pExpr->iTable==0 || !ExprHasProperty(pExpr, EP_Subrtn) ){
158319
+ sqlite3 *db = pParse->db;
158320
+ pX = removeUnindexableInClauseTerms(pParse, iEq, pLoop, pX);
158321
+ if( !db->mallocFailed ){
158322
+ aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*nEq);
158323
+ eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap,&iTab);
158324
+ pExpr->iTable = iTab;
158325
+ }
158326
+ sqlite3ExprDelete(db, pX);
158327
+ }else{
158328
+ int n = sqlite3ExprVectorSize(pX->pLeft);
158329
+ aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*MAX(nEq,n));
158330
+ eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap, &iTab);
158331
+ }
158332
+ pX = pExpr;
158333
+ }
158334
+
158335
+ if( eType==IN_INDEX_INDEX_DESC ){
158336
+ testcase( bRev );
158337
+ bRev = !bRev;
158338
+ }
158339
+ sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iTab, 0);
158340
+ VdbeCoverageIf(v, bRev);
158341
+ VdbeCoverageIf(v, !bRev);
158342
+
158343
+ assert( (pLoop->wsFlags & WHERE_MULTI_OR)==0 );
158344
+ pLoop->wsFlags |= WHERE_IN_ABLE;
158345
+ if( pLevel->u.in.nIn==0 ){
158346
+ pLevel->addrNxt = sqlite3VdbeMakeLabel(pParse);
158347
+ }
158348
+ if( iEq>0 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0 ){
158349
+ pLoop->wsFlags |= WHERE_IN_EARLYOUT;
158350
+ }
158351
+
158352
+ i = pLevel->u.in.nIn;
158353
+ pLevel->u.in.nIn += nEq;
158354
+ pLevel->u.in.aInLoop =
158355
+ sqlite3WhereRealloc(pTerm->pWC->pWInfo,
158356
+ pLevel->u.in.aInLoop,
158357
+ sizeof(pLevel->u.in.aInLoop[0])*pLevel->u.in.nIn);
158358
+ pIn = pLevel->u.in.aInLoop;
158359
+ if( pIn ){
158360
+ int iMap = 0; /* Index in aiMap[] */
158361
+ pIn += i;
158362
+ for(i=iEq;i<pLoop->nLTerm; i++){
158363
+ if( pLoop->aLTerm[i]->pExpr==pX ){
158364
+ int iOut = iTarget + i - iEq;
158365
+ if( eType==IN_INDEX_ROWID ){
158366
+ pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iOut);
158367
+ }else{
158368
+ int iCol = aiMap ? aiMap[iMap++] : 0;
158369
+ pIn->addrInTop = sqlite3VdbeAddOp3(v,OP_Column,iTab, iCol, iOut);
158370
+ }
158371
+ sqlite3VdbeAddOp1(v, OP_IsNull, iOut); VdbeCoverage(v);
158372
+ if( i==iEq ){
158373
+ pIn->iCur = iTab;
158374
+ pIn->eEndLoopOp = bRev ? OP_Prev : OP_Next;
158375
+ if( iEq>0 ){
158376
+ pIn->iBase = iTarget - i;
158377
+ pIn->nPrefix = i;
158378
+ }else{
158379
+ pIn->nPrefix = 0;
158380
+ }
158381
+ }else{
158382
+ pIn->eEndLoopOp = OP_Noop;
158383
+ }
158384
+ pIn++;
158385
+ }
158386
+ }
158387
+ testcase( iEq>0
158388
+ && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0
158389
+ && (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 );
158390
+ if( iEq>0
158391
+ && (pLoop->wsFlags & (WHERE_IN_SEEKSCAN|WHERE_VIRTUALTABLE))==0
158392
+ ){
158393
+ sqlite3VdbeAddOp3(v, OP_SeekHit, pLevel->iIdxCur, 0, iEq);
158394
+ }
158395
+ }else{
158396
+ pLevel->u.in.nIn = 0;
158397
+ }
158398
+ sqlite3DbFree(pParse->db, aiMap);
158399
+}
158400
+#endif
158401
+
158047158402
158048158403
/*
158049158404
** Generate code for a single equality term of the WHERE clause. An equality
158050158405
** term can be either X=expr or X IN (...). pTerm is the term to be
158051158406
** coded.
@@ -158067,138 +158422,24 @@
158067158422
int iEq, /* Index of the equality term within this level */
158068158423
int bRev, /* True for reverse-order IN operations */
158069158424
int iTarget /* Attempt to leave results in this register */
158070158425
){
158071158426
Expr *pX = pTerm->pExpr;
158072
- Vdbe *v = pParse->pVdbe;
158073158427
int iReg; /* Register holding results */
158074158428
158075158429
assert( pLevel->pWLoop->aLTerm[iEq]==pTerm );
158076158430
assert( iTarget>0 );
158077158431
if( pX->op==TK_EQ || pX->op==TK_IS ){
158078158432
iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
158079158433
}else if( pX->op==TK_ISNULL ){
158080158434
iReg = iTarget;
158081
- sqlite3VdbeAddOp2(v, OP_Null, 0, iReg);
158435
+ sqlite3VdbeAddOp2(pParse->pVdbe, OP_Null, 0, iReg);
158082158436
#ifndef SQLITE_OMIT_SUBQUERY
158083158437
}else{
158084
- int eType = IN_INDEX_NOOP;
158085
- int iTab;
158086
- struct InLoop *pIn;
158087
- WhereLoop *pLoop = pLevel->pWLoop;
158088
- int i;
158089
- int nEq = 0;
158090
- int *aiMap = 0;
158091
-
158092
- if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0
158093
- && pLoop->u.btree.pIndex!=0
158094
- && pLoop->u.btree.pIndex->aSortOrder[iEq]
158095
- ){
158096
- testcase( iEq==0 );
158097
- testcase( bRev );
158098
- bRev = !bRev;
158099
- }
158100158438
assert( pX->op==TK_IN );
158101158439
iReg = iTarget;
158102
-
158103
- for(i=0; i<iEq; i++){
158104
- if( pLoop->aLTerm[i] && pLoop->aLTerm[i]->pExpr==pX ){
158105
- disableTerm(pLevel, pTerm);
158106
- return iTarget;
158107
- }
158108
- }
158109
- for(i=iEq;i<pLoop->nLTerm; i++){
158110
- assert( pLoop->aLTerm[i]!=0 );
158111
- if( pLoop->aLTerm[i]->pExpr==pX ) nEq++;
158112
- }
158113
-
158114
- iTab = 0;
158115
- if( !ExprUseXSelect(pX) || pX->x.pSelect->pEList->nExpr==1 ){
158116
- eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, 0, &iTab);
158117
- }else{
158118
- Expr *pExpr = pTerm->pExpr;
158119
- if( pExpr->iTable==0 || !ExprHasProperty(pExpr, EP_Subrtn) ){
158120
- sqlite3 *db = pParse->db;
158121
- pX = removeUnindexableInClauseTerms(pParse, iEq, pLoop, pX);
158122
- if( !db->mallocFailed ){
158123
- aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*nEq);
158124
- eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap,&iTab);
158125
- pExpr->iTable = iTab;
158126
- }
158127
- sqlite3ExprDelete(db, pX);
158128
- }else{
158129
- int n = sqlite3ExprVectorSize(pX->pLeft);
158130
- aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*MAX(nEq,n));
158131
- eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap, &iTab);
158132
- }
158133
- pX = pExpr;
158134
- }
158135
-
158136
- if( eType==IN_INDEX_INDEX_DESC ){
158137
- testcase( bRev );
158138
- bRev = !bRev;
158139
- }
158140
- sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iTab, 0);
158141
- VdbeCoverageIf(v, bRev);
158142
- VdbeCoverageIf(v, !bRev);
158143
-
158144
- assert( (pLoop->wsFlags & WHERE_MULTI_OR)==0 );
158145
- pLoop->wsFlags |= WHERE_IN_ABLE;
158146
- if( pLevel->u.in.nIn==0 ){
158147
- pLevel->addrNxt = sqlite3VdbeMakeLabel(pParse);
158148
- }
158149
- if( iEq>0 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0 ){
158150
- pLoop->wsFlags |= WHERE_IN_EARLYOUT;
158151
- }
158152
-
158153
- i = pLevel->u.in.nIn;
158154
- pLevel->u.in.nIn += nEq;
158155
- pLevel->u.in.aInLoop =
158156
- sqlite3WhereRealloc(pTerm->pWC->pWInfo,
158157
- pLevel->u.in.aInLoop,
158158
- sizeof(pLevel->u.in.aInLoop[0])*pLevel->u.in.nIn);
158159
- pIn = pLevel->u.in.aInLoop;
158160
- if( pIn ){
158161
- int iMap = 0; /* Index in aiMap[] */
158162
- pIn += i;
158163
- for(i=iEq;i<pLoop->nLTerm; i++){
158164
- if( pLoop->aLTerm[i]->pExpr==pX ){
158165
- int iOut = iReg + i - iEq;
158166
- if( eType==IN_INDEX_ROWID ){
158167
- pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iOut);
158168
- }else{
158169
- int iCol = aiMap ? aiMap[iMap++] : 0;
158170
- pIn->addrInTop = sqlite3VdbeAddOp3(v,OP_Column,iTab, iCol, iOut);
158171
- }
158172
- sqlite3VdbeAddOp1(v, OP_IsNull, iOut); VdbeCoverage(v);
158173
- if( i==iEq ){
158174
- pIn->iCur = iTab;
158175
- pIn->eEndLoopOp = bRev ? OP_Prev : OP_Next;
158176
- if( iEq>0 ){
158177
- pIn->iBase = iReg - i;
158178
- pIn->nPrefix = i;
158179
- }else{
158180
- pIn->nPrefix = 0;
158181
- }
158182
- }else{
158183
- pIn->eEndLoopOp = OP_Noop;
158184
- }
158185
- pIn++;
158186
- }
158187
- }
158188
- testcase( iEq>0
158189
- && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0
158190
- && (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 );
158191
- if( iEq>0
158192
- && (pLoop->wsFlags & (WHERE_IN_SEEKSCAN|WHERE_VIRTUALTABLE))==0
158193
- ){
158194
- sqlite3VdbeAddOp3(v, OP_SeekHit, pLevel->iIdxCur, 0, iEq);
158195
- }
158196
- }else{
158197
- pLevel->u.in.nIn = 0;
158198
- }
158199
- sqlite3DbFree(pParse->db, aiMap);
158440
+ codeINTerm(pParse, pTerm, pLevel, iEq, bRev, iTarget);
158200158441
#endif
158201158442
}
158202158443
158203158444
/* As an optimization, try to disable the WHERE clause term that is
158204158445
** driving the index as it will always be true. The correct answer is
@@ -160403,11 +160644,16 @@
160403160644
static int allowedOp(int op){
160404160645
assert( TK_GT>TK_EQ && TK_GT<TK_GE );
160405160646
assert( TK_LT>TK_EQ && TK_LT<TK_GE );
160406160647
assert( TK_LE>TK_EQ && TK_LE<TK_GE );
160407160648
assert( TK_GE==TK_EQ+4 );
160408
- return op==TK_IN || (op>=TK_EQ && op<=TK_GE) || op==TK_ISNULL || op==TK_IS;
160649
+ assert( TK_IN<TK_EQ );
160650
+ assert( TK_IS<TK_EQ );
160651
+ assert( TK_ISNULL<TK_EQ );
160652
+ if( op>TK_GE ) return 0;
160653
+ if( op>=TK_EQ ) return 1;
160654
+ return op==TK_IN || op==TK_ISNULL || op==TK_IS;
160409160655
}
160410160656
160411160657
/*
160412160658
** Commute a comparison operator. Expressions of the form "X op Y"
160413160659
** are converted into "Y op X".
@@ -160436,19 +160682,20 @@
160436160682
** Translate from TK_xx operator to WO_xx bitmask.
160437160683
*/
160438160684
static u16 operatorMask(int op){
160439160685
u16 c;
160440160686
assert( allowedOp(op) );
160441
- if( op==TK_IN ){
160687
+ if( op>=TK_EQ ){
160688
+ assert( (WO_EQ<<(op-TK_EQ)) < 0x7fff );
160689
+ c = (u16)(WO_EQ<<(op-TK_EQ));
160690
+ }else if( op==TK_IN ){
160442160691
c = WO_IN;
160443160692
}else if( op==TK_ISNULL ){
160444160693
c = WO_ISNULL;
160445
- }else if( op==TK_IS ){
160694
+ }else{
160695
+ assert( op==TK_IS );
160446160696
c = WO_IS;
160447
- }else{
160448
- assert( (WO_EQ<<(op-TK_EQ)) < 0x7fff );
160449
- c = (u16)(WO_EQ<<(op-TK_EQ));
160450160697
}
160451160698
assert( op!=TK_ISNULL || c==WO_ISNULL );
160452160699
assert( op!=TK_IN || c==WO_IN );
160453160700
assert( op!=TK_EQ || c==WO_EQ );
160454160701
assert( op!=TK_LT || c==WO_LT );
@@ -160731,10 +160978,17 @@
160731160978
*ppLeft = pCol;
160732160979
return 1;
160733160980
}
160734160981
}
160735160982
}
160983
+ }else if( pExpr->op>=TK_EQ ){
160984
+ /* Comparison operators are a common case. Save a few comparisons for
160985
+ ** that common case by terminating early. */
160986
+ assert( TK_NE < TK_EQ );
160987
+ assert( TK_ISNOT < TK_EQ );
160988
+ assert( TK_NOTNULL < TK_EQ );
160989
+ return 0;
160736160990
}else if( pExpr->op==TK_NE || pExpr->op==TK_ISNOT || pExpr->op==TK_NOTNULL ){
160737160991
int res = 0;
160738160992
Expr *pLeft = pExpr->pLeft;
160739160993
Expr *pRight = pExpr->pRight;
160740160994
assert( pLeft->op!=TK_COLUMN || (ExprUseYTab(pLeft) && pLeft->y.pTab!=0) );
@@ -161872,11 +162126,11 @@
161872162126
Parse *pParse = pWC->pWInfo->pParse;
161873162127
sqlite3 *db = pParse->db;
161874162128
Expr *pNew;
161875162129
int iVal = 0;
161876162130
161877
- if( sqlite3ExprIsInteger(pExpr, &iVal) && iVal>=0 ){
162131
+ if( sqlite3ExprIsInteger(pExpr, &iVal, pParse) && iVal>=0 ){
161878162132
Expr *pVal = sqlite3Expr(db, TK_INTEGER, 0);
161879162133
if( pVal==0 ) return;
161880162134
ExprSetProperty(pVal, EP_IntValue);
161881162135
pVal->u.iValue = iVal;
161882162136
pNew = sqlite3PExpr(pParse, TK_MATCH, 0, pVal);
@@ -163524,10 +163778,24 @@
163524163778
pParse->pIdxPartExpr = saved_pIdxPartExpr;
163525163779
}
163526163780
163527163781
163528163782
#ifndef SQLITE_OMIT_VIRTUALTABLE
163783
+/*
163784
+** Return term iTerm of the WhereClause passed as the first argument. Terms
163785
+** are numbered from 0 upwards, starting with the terms in pWC->a[], then
163786
+** those in pWC->pOuter->a[] (if any), and so on.
163787
+*/
163788
+static WhereTerm *termFromWhereClause(WhereClause *pWC, int iTerm){
163789
+ WhereClause *p;
163790
+ for(p=pWC; p; p=p->pOuter){
163791
+ if( iTerm<p->nTerm ) return &p->a[iTerm];
163792
+ iTerm -= p->nTerm;
163793
+ }
163794
+ return 0;
163795
+}
163796
+
163529163797
/*
163530163798
** Allocate and populate an sqlite3_index_info structure. It is the
163531163799
** responsibility of the caller to eventually release the structure
163532163800
** by passing the pointer returned by this function to freeIndexInfo().
163533163801
*/
@@ -163550,10 +163818,11 @@
163550163818
sqlite3_index_info *pIdxInfo;
163551163819
u16 mNoOmit = 0;
163552163820
const Table *pTab;
163553163821
int eDistinct = 0;
163554163822
ExprList *pOrderBy = pWInfo->pOrderBy;
163823
+ WhereClause *p;
163555163824
163556163825
assert( pSrc!=0 );
163557163826
pTab = pSrc->pTab;
163558163827
assert( pTab!=0 );
163559163828
assert( IsVirtual(pTab) );
@@ -163560,32 +163829,34 @@
163560163829
163561163830
/* Find all WHERE clause constraints referring to this virtual table.
163562163831
** Mark each term with the TERM_OK flag. Set nTerm to the number of
163563163832
** terms found.
163564163833
*/
163565
- for(i=nTerm=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
163566
- pTerm->wtFlags &= ~TERM_OK;
163567
- if( pTerm->leftCursor != pSrc->iCursor ) continue;
163568
- if( pTerm->prereqRight & mUnusable ) continue;
163569
- assert( IsPowerOfTwo(pTerm->eOperator & ~WO_EQUIV) );
163570
- testcase( pTerm->eOperator & WO_IN );
163571
- testcase( pTerm->eOperator & WO_ISNULL );
163572
- testcase( pTerm->eOperator & WO_IS );
163573
- testcase( pTerm->eOperator & WO_ALL );
163574
- if( (pTerm->eOperator & ~(WO_EQUIV))==0 ) continue;
163575
- if( pTerm->wtFlags & TERM_VNULL ) continue;
163576
-
163577
- assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );
163578
- assert( pTerm->u.x.leftColumn>=XN_ROWID );
163579
- assert( pTerm->u.x.leftColumn<pTab->nCol );
163580
- if( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0
163581
- && !constraintCompatibleWithOuterJoin(pTerm,pSrc)
163582
- ){
163583
- continue;
163584
- }
163585
- nTerm++;
163586
- pTerm->wtFlags |= TERM_OK;
163834
+ for(p=pWC, nTerm=0; p; p=p->pOuter){
163835
+ for(i=0, pTerm=p->a; i<p->nTerm; i++, pTerm++){
163836
+ pTerm->wtFlags &= ~TERM_OK;
163837
+ if( pTerm->leftCursor != pSrc->iCursor ) continue;
163838
+ if( pTerm->prereqRight & mUnusable ) continue;
163839
+ assert( IsPowerOfTwo(pTerm->eOperator & ~WO_EQUIV) );
163840
+ testcase( pTerm->eOperator & WO_IN );
163841
+ testcase( pTerm->eOperator & WO_ISNULL );
163842
+ testcase( pTerm->eOperator & WO_IS );
163843
+ testcase( pTerm->eOperator & WO_ALL );
163844
+ if( (pTerm->eOperator & ~(WO_EQUIV))==0 ) continue;
163845
+ if( pTerm->wtFlags & TERM_VNULL ) continue;
163846
+
163847
+ assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );
163848
+ assert( pTerm->u.x.leftColumn>=XN_ROWID );
163849
+ assert( pTerm->u.x.leftColumn<pTab->nCol );
163850
+ if( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0
163851
+ && !constraintCompatibleWithOuterJoin(pTerm,pSrc)
163852
+ ){
163853
+ continue;
163854
+ }
163855
+ nTerm++;
163856
+ pTerm->wtFlags |= TERM_OK;
163857
+ }
163587163858
}
163588163859
163589163860
/* If the ORDER BY clause contains only columns in the current
163590163861
** virtual table then allocate space for the aOrderBy part of
163591163862
** the sqlite3_index_info structure.
@@ -163660,53 +163931,56 @@
163660163931
pIdxInfo->aConstraintUsage = pUsage;
163661163932
pHidden->pWC = pWC;
163662163933
pHidden->pParse = pParse;
163663163934
pHidden->eDistinct = eDistinct;
163664163935
pHidden->mIn = 0;
163665
- for(i=j=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
163666
- u16 op;
163667
- if( (pTerm->wtFlags & TERM_OK)==0 ) continue;
163668
- pIdxCons[j].iColumn = pTerm->u.x.leftColumn;
163669
- pIdxCons[j].iTermOffset = i;
163670
- op = pTerm->eOperator & WO_ALL;
163671
- if( op==WO_IN ){
163672
- if( (pTerm->wtFlags & TERM_SLICE)==0 ){
163673
- pHidden->mIn |= SMASKBIT32(j);
163674
- }
163675
- op = WO_EQ;
163676
- }
163677
- if( op==WO_AUX ){
163678
- pIdxCons[j].op = pTerm->eMatchOp;
163679
- }else if( op & (WO_ISNULL|WO_IS) ){
163680
- if( op==WO_ISNULL ){
163681
- pIdxCons[j].op = SQLITE_INDEX_CONSTRAINT_ISNULL;
163682
- }else{
163683
- pIdxCons[j].op = SQLITE_INDEX_CONSTRAINT_IS;
163684
- }
163685
- }else{
163686
- pIdxCons[j].op = (u8)op;
163687
- /* The direct assignment in the previous line is possible only because
163688
- ** the WO_ and SQLITE_INDEX_CONSTRAINT_ codes are identical. The
163689
- ** following asserts verify this fact. */
163690
- assert( WO_EQ==SQLITE_INDEX_CONSTRAINT_EQ );
163691
- assert( WO_LT==SQLITE_INDEX_CONSTRAINT_LT );
163692
- assert( WO_LE==SQLITE_INDEX_CONSTRAINT_LE );
163693
- assert( WO_GT==SQLITE_INDEX_CONSTRAINT_GT );
163694
- assert( WO_GE==SQLITE_INDEX_CONSTRAINT_GE );
163695
- assert( pTerm->eOperator&(WO_IN|WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_AUX) );
163696
-
163697
- if( op & (WO_LT|WO_LE|WO_GT|WO_GE)
163698
- && sqlite3ExprIsVector(pTerm->pExpr->pRight)
163699
- ){
163700
- testcase( j!=i );
163701
- if( j<16 ) mNoOmit |= (1 << j);
163702
- if( op==WO_LT ) pIdxCons[j].op = WO_LE;
163703
- if( op==WO_GT ) pIdxCons[j].op = WO_GE;
163704
- }
163705
- }
163706
-
163707
- j++;
163936
+ for(p=pWC, i=j=0; p; p=p->pOuter){
163937
+ int nLast = i+p->nTerm;;
163938
+ for(pTerm=p->a; i<nLast; i++, pTerm++){
163939
+ u16 op;
163940
+ if( (pTerm->wtFlags & TERM_OK)==0 ) continue;
163941
+ pIdxCons[j].iColumn = pTerm->u.x.leftColumn;
163942
+ pIdxCons[j].iTermOffset = i;
163943
+ op = pTerm->eOperator & WO_ALL;
163944
+ if( op==WO_IN ){
163945
+ if( (pTerm->wtFlags & TERM_SLICE)==0 ){
163946
+ pHidden->mIn |= SMASKBIT32(j);
163947
+ }
163948
+ op = WO_EQ;
163949
+ }
163950
+ if( op==WO_AUX ){
163951
+ pIdxCons[j].op = pTerm->eMatchOp;
163952
+ }else if( op & (WO_ISNULL|WO_IS) ){
163953
+ if( op==WO_ISNULL ){
163954
+ pIdxCons[j].op = SQLITE_INDEX_CONSTRAINT_ISNULL;
163955
+ }else{
163956
+ pIdxCons[j].op = SQLITE_INDEX_CONSTRAINT_IS;
163957
+ }
163958
+ }else{
163959
+ pIdxCons[j].op = (u8)op;
163960
+ /* The direct assignment in the previous line is possible only because
163961
+ ** the WO_ and SQLITE_INDEX_CONSTRAINT_ codes are identical. The
163962
+ ** following asserts verify this fact. */
163963
+ assert( WO_EQ==SQLITE_INDEX_CONSTRAINT_EQ );
163964
+ assert( WO_LT==SQLITE_INDEX_CONSTRAINT_LT );
163965
+ assert( WO_LE==SQLITE_INDEX_CONSTRAINT_LE );
163966
+ assert( WO_GT==SQLITE_INDEX_CONSTRAINT_GT );
163967
+ assert( WO_GE==SQLITE_INDEX_CONSTRAINT_GE );
163968
+ assert( pTerm->eOperator&(WO_IN|WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_AUX) );
163969
+
163970
+ if( op & (WO_LT|WO_LE|WO_GT|WO_GE)
163971
+ && sqlite3ExprIsVector(pTerm->pExpr->pRight)
163972
+ ){
163973
+ testcase( j!=i );
163974
+ if( j<16 ) mNoOmit |= (1 << j);
163975
+ if( op==WO_LT ) pIdxCons[j].op = WO_LE;
163976
+ if( op==WO_GT ) pIdxCons[j].op = WO_GE;
163977
+ }
163978
+ }
163979
+
163980
+ j++;
163981
+ }
163708163982
}
163709163983
assert( j==nTerm );
163710163984
pIdxInfo->nConstraint = j;
163711163985
for(i=j=0; i<nOrderBy; i++){
163712163986
Expr *pExpr = pOrderBy->a[i].pExpr;
@@ -163721,10 +163995,21 @@
163721163995
pIdxInfo->nOrderBy = j;
163722163996
163723163997
*pmNoOmit = mNoOmit;
163724163998
return pIdxInfo;
163725163999
}
164000
+
164001
+/*
164002
+** Free and zero the sqlite3_index_info.idxStr value if needed.
164003
+*/
164004
+static void freeIdxStr(sqlite3_index_info *pIdxInfo){
164005
+ if( pIdxInfo->needToFreeIdxStr ){
164006
+ sqlite3_free(pIdxInfo->idxStr);
164007
+ pIdxInfo->idxStr = 0;
164008
+ pIdxInfo->needToFreeIdxStr = 0;
164009
+ }
164010
+}
163726164011
163727164012
/*
163728164013
** Free an sqlite3_index_info structure allocated by allocateIndexInfo()
163729164014
** and possibly modified by xBestIndex methods.
163730164015
*/
@@ -163737,10 +164022,11 @@
163737164022
assert( pHidden->pParse->db==db );
163738164023
for(i=0; i<pIdxInfo->nConstraint; i++){
163739164024
sqlite3ValueFree(pHidden->aRhs[i]); /* IMP: R-14553-25174 */
163740164025
pHidden->aRhs[i] = 0;
163741164026
}
164027
+ freeIdxStr(pIdxInfo);
163742164028
sqlite3DbFree(db, pIdxInfo);
163743164029
}
163744164030
163745164031
/*
163746164032
** The table object reference passed as the second argument to this function
@@ -165088,11 +165374,11 @@
165088165374
&& (pTerm->wtFlags & TERM_HIGHTRUTH)==0 /* tag-20200224-1 */
165089165375
){
165090165376
Expr *pRight = pTerm->pExpr->pRight;
165091165377
int k = 0;
165092165378
testcase( pTerm->pExpr->op==TK_IS );
165093
- if( sqlite3ExprIsInteger(pRight, &k) && k>=(-1) && k<=1 ){
165379
+ if( sqlite3ExprIsInteger(pRight, &k, 0) && k>=(-1) && k<=1 ){
165094165380
k = 10;
165095165381
}else{
165096165382
k = 20;
165097165383
}
165098165384
if( iReduce<k ){
@@ -166337,11 +166623,11 @@
166337166623
166338166624
/* Set the usable flag on the subset of constraints identified by
166339166625
** arguments mUsable and mExclude. */
166340166626
pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
166341166627
for(i=0; i<nConstraint; i++, pIdxCons++){
166342
- WhereTerm *pTerm = &pWC->a[pIdxCons->iTermOffset];
166628
+ WhereTerm *pTerm = termFromWhereClause(pWC, pIdxCons->iTermOffset);
166343166629
pIdxCons->usable = 0;
166344166630
if( (pTerm->prereqRight & mUsable)==pTerm->prereqRight
166345166631
&& (pTerm->eOperator & mExclude)==0
166346166632
&& (pbRetryLimit || !isLimitTerm(pTerm))
166347166633
){
@@ -166368,10 +166654,11 @@
166368166654
/* If the xBestIndex method returns SQLITE_CONSTRAINT, that means
166369166655
** that the particular combination of parameters provided is unusable.
166370166656
** Make no entries in the loop table.
166371166657
*/
166372166658
WHERETRACE(0xffffffff, (" ^^^^--- non-viable plan rejected!\n"));
166659
+ freeIdxStr(pIdxInfo);
166373166660
return SQLITE_OK;
166374166661
}
166375166662
return rc;
166376166663
}
166377166664
@@ -166385,22 +166672,21 @@
166385166672
if( (iTerm = pUsage[i].argvIndex - 1)>=0 ){
166386166673
WhereTerm *pTerm;
166387166674
int j = pIdxCons->iTermOffset;
166388166675
if( iTerm>=nConstraint
166389166676
|| j<0
166390
- || j>=pWC->nTerm
166677
+ || (pTerm = termFromWhereClause(pWC, j))==0
166391166678
|| pNew->aLTerm[iTerm]!=0
166392166679
|| pIdxCons->usable==0
166393166680
){
166394166681
sqlite3ErrorMsg(pParse,"%s.xBestIndex malfunction",pSrc->pTab->zName);
166395
- testcase( pIdxInfo->needToFreeIdxStr );
166682
+ freeIdxStr(pIdxInfo);
166396166683
return SQLITE_ERROR;
166397166684
}
166398166685
testcase( iTerm==nConstraint-1 );
166399166686
testcase( j==0 );
166400166687
testcase( j==pWC->nTerm-1 );
166401
- pTerm = &pWC->a[j];
166402166688
pNew->prereq |= pTerm->prereqRight;
166403166689
assert( iTerm<pNew->nLSlot );
166404166690
pNew->aLTerm[iTerm] = pTerm;
166405166691
if( iTerm>mxTerm ) mxTerm = iTerm;
166406166692
testcase( iTerm==15 );
@@ -166441,15 +166727,11 @@
166441166727
** OFFSET term handled as well, the plan is unusable. Similarly,
166442166728
** if there is a LIMIT/OFFSET and there are other unused terms,
166443166729
** the plan cannot be used. In these cases set variable *pbRetryLimit
166444166730
** to true to tell the caller to retry with LIMIT and OFFSET
166445166731
** disabled. */
166446
- if( pIdxInfo->needToFreeIdxStr ){
166447
- sqlite3_free(pIdxInfo->idxStr);
166448
- pIdxInfo->idxStr = 0;
166449
- pIdxInfo->needToFreeIdxStr = 0;
166450
- }
166732
+ freeIdxStr(pIdxInfo);
166451166733
*pbRetryLimit = 1;
166452166734
return SQLITE_OK;
166453166735
}
166454166736
}
166455166737
}
@@ -166458,11 +166740,11 @@
166458166740
for(i=0; i<=mxTerm; i++){
166459166741
if( pNew->aLTerm[i]==0 ){
166460166742
/* The non-zero argvIdx values must be contiguous. Raise an
166461166743
** error if they are not */
166462166744
sqlite3ErrorMsg(pParse,"%s.xBestIndex malfunction",pSrc->pTab->zName);
166463
- testcase( pIdxInfo->needToFreeIdxStr );
166745
+ freeIdxStr(pIdxInfo);
166464166746
return SQLITE_ERROR;
166465166747
}
166466166748
}
166467166749
assert( pNew->nLTerm<=pNew->nLSlot );
166468166750
pNew->u.vtab.idxNum = pIdxInfo->idxNum;
@@ -166513,11 +166795,11 @@
166513166795
HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1];
166514166796
const char *zRet = 0;
166515166797
if( iCons>=0 && iCons<pIdxInfo->nConstraint ){
166516166798
CollSeq *pC = 0;
166517166799
int iTerm = pIdxInfo->aConstraint[iCons].iTermOffset;
166518
- Expr *pX = pHidden->pWC->a[iTerm].pExpr;
166800
+ Expr *pX = termFromWhereClause(pHidden->pWC, iTerm)->pExpr;
166519166801
if( pX->pLeft ){
166520166802
pC = sqlite3ExprCompareCollSeq(pHidden->pParse, pX);
166521166803
}
166522166804
zRet = (pC ? pC->zName : sqlite3StrBINARY);
166523166805
}
@@ -166559,11 +166841,13 @@
166559166841
int rc = SQLITE_OK;
166560166842
if( iCons<0 || iCons>=pIdxInfo->nConstraint ){
166561166843
rc = SQLITE_MISUSE_BKPT; /* EV: R-30545-25046 */
166562166844
}else{
166563166845
if( pH->aRhs[iCons]==0 ){
166564
- WhereTerm *pTerm = &pH->pWC->a[pIdxInfo->aConstraint[iCons].iTermOffset];
166846
+ WhereTerm *pTerm = termFromWhereClause(
166847
+ pH->pWC, pIdxInfo->aConstraint[iCons].iTermOffset
166848
+ );
166565166849
rc = sqlite3ValueFromExpr(
166566166850
pH->pParse->db, pTerm->pExpr->pRight, ENC(pH->pParse->db),
166567166851
SQLITE_AFF_BLOB, &pH->aRhs[iCons]
166568166852
);
166569166853
testcase( rc!=SQLITE_OK );
@@ -166715,13 +166999,12 @@
166715166999
while( rc==SQLITE_OK ){
166716167000
int i;
166717167001
Bitmask mNext = ALLBITS;
166718167002
assert( mNext>0 );
166719167003
for(i=0; i<nConstraint; i++){
166720
- Bitmask mThis = (
166721
- pWC->a[p->aConstraint[i].iTermOffset].prereqRight & ~mPrereq
166722
- );
167004
+ int iTerm = p->aConstraint[i].iTermOffset;
167005
+ Bitmask mThis = termFromWhereClause(pWC, iTerm)->prereqRight & ~mPrereq;
166723167006
if( mThis>mPrev && mThis<mNext ) mNext = mThis;
166724167007
}
166725167008
mPrev = mNext;
166726167009
if( mNext==ALLBITS ) break;
166727167010
if( mNext==mBest || mNext==mBestNoIn ) continue;
@@ -166753,11 +167036,10 @@
166753167036
rc = whereLoopAddVirtualOne(
166754167037
pBuilder, mPrereq, mPrereq, WO_IN, p, mNoOmit, &bIn, 0);
166755167038
}
166756167039
}
166757167040
166758
- if( p->needToFreeIdxStr ) sqlite3_free(p->idxStr);
166759167041
freeIndexInfo(pParse->db, p);
166760167042
WHERETRACE(0x800, ("END %s.addVirtual(), rc=%d\n", pSrc->pTab->zName, rc));
166761167043
return rc;
166762167044
}
166763167045
#endif /* SQLITE_OMIT_VIRTUALTABLE */
@@ -167440,11 +167722,11 @@
167440167722
** For the purposes of SQLite, a star-query is defined as a query
167441167723
** with a large central table that is joined against four or more
167442167724
** smaller tables. The central table is called the "fact" table.
167443167725
** The smaller tables that get joined are "dimension tables".
167444167726
**
167445
-** SIDE EFFECT:
167727
+** SIDE EFFECT: (and really the whole point of this subroutine)
167446167728
**
167447167729
** If pWInfo describes a star-query, then the cost on WhereLoops for the
167448167730
** fact table is reduced. This heuristic helps keep fact tables in
167449167731
** outer loops. Without this heuristic, paths with fact tables in outer
167450167732
** loops tend to get pruned by the mxChoice limit on the number of paths,
@@ -167452,11 +167734,11 @@
167452167734
** adjustment is stored in pWInfo->nOutStarDelta and the cost adjustment
167453167735
** for each WhereLoop is stored in its rStarDelta field.
167454167736
*/
167455167737
static int computeMxChoice(WhereInfo *pWInfo, LogEst nRowEst){
167456167738
int nLoop = pWInfo->nLevel; /* Number of terms in the join */
167457
- if( nRowEst==0 && nLoop>=4 ){
167739
+ if( nRowEst==0 && nLoop>=5 ){
167458167740
/* Check to see if we are dealing with a star schema and if so, reduce
167459167741
** the cost of fact tables relative to dimension tables, as a heuristic
167460167742
** to help keep the fact tables in outer loops.
167461167743
*/
167462167744
int iLoop; /* Counter over join terms */
@@ -168168,10 +168450,14 @@
168168168450
** might move from the right side to the left side of the RIGHT JOIN.
168169168451
** Note: Due to (2), this condition can only arise if the table is
168170168452
** the right-most table of a subquery that was flattened into the
168171168453
** main query and that subquery was the right-hand operand of an
168172168454
** inner join that held an ON or USING clause.
168455
+** 6) The ORDER BY clause has 63 or fewer terms
168456
+** 7) The omit-noop-join optimization is enabled.
168457
+**
168458
+** Items (1), (6), and (7) are checked by the caller.
168173168459
**
168174168460
** For example, given:
168175168461
**
168176168462
** CREATE TABLE t1(ipk INTEGER PRIMARY KEY, v1);
168177168463
** CREATE TABLE t2(ipk INTEGER PRIMARY KEY, v2);
@@ -168582,10 +168868,11 @@
168582168868
/* An ORDER/GROUP BY clause of more than 63 terms cannot be optimized */
168583168869
testcase( pOrderBy && pOrderBy->nExpr==BMS-1 );
168584168870
if( pOrderBy && pOrderBy->nExpr>=BMS ){
168585168871
pOrderBy = 0;
168586168872
wctrlFlags &= ~WHERE_WANT_DISTINCT;
168873
+ wctrlFlags |= WHERE_KEEP_ALL_JOINS; /* Disable omit-noop-join opt */
168587168874
}
168588168875
168589168876
/* The number of tables in the FROM clause is limited by the number of
168590168877
** bits in a Bitmask
168591168878
*/
@@ -168882,14 +169169,14 @@
168882169169
** some C-compiler optimizers from in-lining the
168883169170
** sqlite3WhereCodeOneLoopStart() procedure, and it is important to
168884169171
** in-line sqlite3WhereCodeOneLoopStart() for performance reasons.
168885169172
*/
168886169173
notReady = ~(Bitmask)0;
168887
- if( pWInfo->nLevel>=2
168888
- && pResultSet!=0 /* these two combine to guarantee */
168889
- && 0==(wctrlFlags & WHERE_AGG_DISTINCT) /* condition (1) above */
168890
- && OptimizationEnabled(db, SQLITE_OmitNoopJoin)
169174
+ if( pWInfo->nLevel>=2 /* Must be a join, or this opt8n is pointless */
169175
+ && pResultSet!=0 /* Condition (1) */
169176
+ && 0==(wctrlFlags & (WHERE_AGG_DISTINCT|WHERE_KEEP_ALL_JOINS)) /* (1),(6) */
169177
+ && OptimizationEnabled(db, SQLITE_OmitNoopJoin) /* (7) */
168891169178
){
168892169179
notReady = whereOmitNoopJoin(pWInfo, notReady);
168893169180
nTabList = pWInfo->nLevel;
168894169181
assert( nTabList>0 );
168895169182
}
@@ -170479,11 +170766,11 @@
170479170766
}
170480170767
if( bIntToNull ){
170481170768
int iDummy;
170482170769
Expr *pSub;
170483170770
pSub = sqlite3ExprSkipCollateAndLikely(pDup);
170484
- if( sqlite3ExprIsInteger(pSub, &iDummy) ){
170771
+ if( sqlite3ExprIsInteger(pSub, &iDummy, 0) ){
170485170772
pSub->op = TK_NULL;
170486170773
pSub->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
170487170774
pSub->u.zToken = 0;
170488170775
}
170489170776
}
@@ -172956,136 +173243,136 @@
172956173243
#define TK_EACH 41
172957173244
#define TK_FAIL 42
172958173245
#define TK_OR 43
172959173246
#define TK_AND 44
172960173247
#define TK_IS 45
172961
-#define TK_MATCH 46
172962
-#define TK_LIKE_KW 47
172963
-#define TK_BETWEEN 48
172964
-#define TK_IN 49
172965
-#define TK_ISNULL 50
172966
-#define TK_NOTNULL 51
172967
-#define TK_NE 52
172968
-#define TK_EQ 53
172969
-#define TK_GT 54
172970
-#define TK_LE 55
172971
-#define TK_LT 56
172972
-#define TK_GE 57
172973
-#define TK_ESCAPE 58
172974
-#define TK_ID 59
172975
-#define TK_COLUMNKW 60
172976
-#define TK_DO 61
172977
-#define TK_FOR 62
172978
-#define TK_IGNORE 63
172979
-#define TK_INITIALLY 64
172980
-#define TK_INSTEAD 65
172981
-#define TK_NO 66
172982
-#define TK_KEY 67
172983
-#define TK_OF 68
172984
-#define TK_OFFSET 69
172985
-#define TK_PRAGMA 70
172986
-#define TK_RAISE 71
172987
-#define TK_RECURSIVE 72
172988
-#define TK_REPLACE 73
172989
-#define TK_RESTRICT 74
172990
-#define TK_ROW 75
172991
-#define TK_ROWS 76
172992
-#define TK_TRIGGER 77
172993
-#define TK_VACUUM 78
172994
-#define TK_VIEW 79
172995
-#define TK_VIRTUAL 80
172996
-#define TK_WITH 81
172997
-#define TK_NULLS 82
172998
-#define TK_FIRST 83
172999
-#define TK_LAST 84
173000
-#define TK_CURRENT 85
173001
-#define TK_FOLLOWING 86
173002
-#define TK_PARTITION 87
173003
-#define TK_PRECEDING 88
173004
-#define TK_RANGE 89
173005
-#define TK_UNBOUNDED 90
173006
-#define TK_EXCLUDE 91
173007
-#define TK_GROUPS 92
173008
-#define TK_OTHERS 93
173009
-#define TK_TIES 94
173010
-#define TK_GENERATED 95
173011
-#define TK_ALWAYS 96
173012
-#define TK_MATERIALIZED 97
173013
-#define TK_REINDEX 98
173014
-#define TK_RENAME 99
173015
-#define TK_CTIME_KW 100
173016
-#define TK_ANY 101
173017
-#define TK_BITAND 102
173018
-#define TK_BITOR 103
173019
-#define TK_LSHIFT 104
173020
-#define TK_RSHIFT 105
173021
-#define TK_PLUS 106
173022
-#define TK_MINUS 107
173023
-#define TK_STAR 108
173024
-#define TK_SLASH 109
173025
-#define TK_REM 110
173026
-#define TK_CONCAT 111
173027
-#define TK_PTR 112
173028
-#define TK_COLLATE 113
173029
-#define TK_BITNOT 114
173030
-#define TK_ON 115
173031
-#define TK_INDEXED 116
173032
-#define TK_STRING 117
173033
-#define TK_JOIN_KW 118
173034
-#define TK_CONSTRAINT 119
173035
-#define TK_DEFAULT 120
173036
-#define TK_NULL 121
173037
-#define TK_PRIMARY 122
173038
-#define TK_UNIQUE 123
173039
-#define TK_CHECK 124
173040
-#define TK_REFERENCES 125
173041
-#define TK_AUTOINCR 126
173042
-#define TK_INSERT 127
173043
-#define TK_DELETE 128
173044
-#define TK_UPDATE 129
173045
-#define TK_SET 130
173046
-#define TK_DEFERRABLE 131
173047
-#define TK_FOREIGN 132
173048
-#define TK_DROP 133
173049
-#define TK_UNION 134
173050
-#define TK_ALL 135
173051
-#define TK_EXCEPT 136
173052
-#define TK_INTERSECT 137
173053
-#define TK_SELECT 138
173054
-#define TK_VALUES 139
173055
-#define TK_DISTINCT 140
173056
-#define TK_DOT 141
173057
-#define TK_FROM 142
173058
-#define TK_JOIN 143
173059
-#define TK_USING 144
173060
-#define TK_ORDER 145
173061
-#define TK_GROUP 146
173062
-#define TK_HAVING 147
173063
-#define TK_LIMIT 148
173064
-#define TK_WHERE 149
173065
-#define TK_RETURNING 150
173066
-#define TK_INTO 151
173067
-#define TK_NOTHING 152
173068
-#define TK_FLOAT 153
173069
-#define TK_BLOB 154
173070
-#define TK_INTEGER 155
173071
-#define TK_VARIABLE 156
173072
-#define TK_CASE 157
173073
-#define TK_WHEN 158
173074
-#define TK_THEN 159
173075
-#define TK_ELSE 160
173076
-#define TK_INDEX 161
173077
-#define TK_ALTER 162
173078
-#define TK_ADD 163
173079
-#define TK_WINDOW 164
173080
-#define TK_OVER 165
173081
-#define TK_FILTER 166
173082
-#define TK_COLUMN 167
173083
-#define TK_AGG_FUNCTION 168
173084
-#define TK_AGG_COLUMN 169
173085
-#define TK_TRUEFALSE 170
173086
-#define TK_ISNOT 171
173248
+#define TK_ISNOT 46
173249
+#define TK_MATCH 47
173250
+#define TK_LIKE_KW 48
173251
+#define TK_BETWEEN 49
173252
+#define TK_IN 50
173253
+#define TK_ISNULL 51
173254
+#define TK_NOTNULL 52
173255
+#define TK_NE 53
173256
+#define TK_EQ 54
173257
+#define TK_GT 55
173258
+#define TK_LE 56
173259
+#define TK_LT 57
173260
+#define TK_GE 58
173261
+#define TK_ESCAPE 59
173262
+#define TK_ID 60
173263
+#define TK_COLUMNKW 61
173264
+#define TK_DO 62
173265
+#define TK_FOR 63
173266
+#define TK_IGNORE 64
173267
+#define TK_INITIALLY 65
173268
+#define TK_INSTEAD 66
173269
+#define TK_NO 67
173270
+#define TK_KEY 68
173271
+#define TK_OF 69
173272
+#define TK_OFFSET 70
173273
+#define TK_PRAGMA 71
173274
+#define TK_RAISE 72
173275
+#define TK_RECURSIVE 73
173276
+#define TK_REPLACE 74
173277
+#define TK_RESTRICT 75
173278
+#define TK_ROW 76
173279
+#define TK_ROWS 77
173280
+#define TK_TRIGGER 78
173281
+#define TK_VACUUM 79
173282
+#define TK_VIEW 80
173283
+#define TK_VIRTUAL 81
173284
+#define TK_WITH 82
173285
+#define TK_NULLS 83
173286
+#define TK_FIRST 84
173287
+#define TK_LAST 85
173288
+#define TK_CURRENT 86
173289
+#define TK_FOLLOWING 87
173290
+#define TK_PARTITION 88
173291
+#define TK_PRECEDING 89
173292
+#define TK_RANGE 90
173293
+#define TK_UNBOUNDED 91
173294
+#define TK_EXCLUDE 92
173295
+#define TK_GROUPS 93
173296
+#define TK_OTHERS 94
173297
+#define TK_TIES 95
173298
+#define TK_GENERATED 96
173299
+#define TK_ALWAYS 97
173300
+#define TK_MATERIALIZED 98
173301
+#define TK_REINDEX 99
173302
+#define TK_RENAME 100
173303
+#define TK_CTIME_KW 101
173304
+#define TK_ANY 102
173305
+#define TK_BITAND 103
173306
+#define TK_BITOR 104
173307
+#define TK_LSHIFT 105
173308
+#define TK_RSHIFT 106
173309
+#define TK_PLUS 107
173310
+#define TK_MINUS 108
173311
+#define TK_STAR 109
173312
+#define TK_SLASH 110
173313
+#define TK_REM 111
173314
+#define TK_CONCAT 112
173315
+#define TK_PTR 113
173316
+#define TK_COLLATE 114
173317
+#define TK_BITNOT 115
173318
+#define TK_ON 116
173319
+#define TK_INDEXED 117
173320
+#define TK_STRING 118
173321
+#define TK_JOIN_KW 119
173322
+#define TK_CONSTRAINT 120
173323
+#define TK_DEFAULT 121
173324
+#define TK_NULL 122
173325
+#define TK_PRIMARY 123
173326
+#define TK_UNIQUE 124
173327
+#define TK_CHECK 125
173328
+#define TK_REFERENCES 126
173329
+#define TK_AUTOINCR 127
173330
+#define TK_INSERT 128
173331
+#define TK_DELETE 129
173332
+#define TK_UPDATE 130
173333
+#define TK_SET 131
173334
+#define TK_DEFERRABLE 132
173335
+#define TK_FOREIGN 133
173336
+#define TK_DROP 134
173337
+#define TK_UNION 135
173338
+#define TK_ALL 136
173339
+#define TK_EXCEPT 137
173340
+#define TK_INTERSECT 138
173341
+#define TK_SELECT 139
173342
+#define TK_VALUES 140
173343
+#define TK_DISTINCT 141
173344
+#define TK_DOT 142
173345
+#define TK_FROM 143
173346
+#define TK_JOIN 144
173347
+#define TK_USING 145
173348
+#define TK_ORDER 146
173349
+#define TK_GROUP 147
173350
+#define TK_HAVING 148
173351
+#define TK_LIMIT 149
173352
+#define TK_WHERE 150
173353
+#define TK_RETURNING 151
173354
+#define TK_INTO 152
173355
+#define TK_NOTHING 153
173356
+#define TK_FLOAT 154
173357
+#define TK_BLOB 155
173358
+#define TK_INTEGER 156
173359
+#define TK_VARIABLE 157
173360
+#define TK_CASE 158
173361
+#define TK_WHEN 159
173362
+#define TK_THEN 160
173363
+#define TK_ELSE 161
173364
+#define TK_INDEX 162
173365
+#define TK_ALTER 163
173366
+#define TK_ADD 164
173367
+#define TK_WINDOW 165
173368
+#define TK_OVER 166
173369
+#define TK_FILTER 167
173370
+#define TK_COLUMN 168
173371
+#define TK_AGG_FUNCTION 169
173372
+#define TK_AGG_COLUMN 170
173373
+#define TK_TRUEFALSE 171
173087173374
#define TK_FUNCTION 172
173088173375
#define TK_UPLUS 173
173089173376
#define TK_UMINUS 174
173090173377
#define TK_TRUTH 175
173091173378
#define TK_REGISTER 176
@@ -173162,11 +173449,11 @@
173162173449
#endif
173163173450
/************* Begin control #defines *****************************************/
173164173451
#define YYCODETYPE unsigned short int
173165173452
#define YYNOCODE 322
173166173453
#define YYACTIONTYPE unsigned short int
173167
-#define YYWILDCARD 101
173454
+#define YYWILDCARD 102
173168173455
#define sqlite3ParserTOKENTYPE Token
173169173456
typedef union {
173170173457
int yyinit;
173171173458
sqlite3ParserTOKENTYPE yy0;
173172173459
ExprList* yy14;
@@ -173299,452 +173586,456 @@
173299173586
** yy_reduce_ofst[] For each state, the offset into yy_action for
173300173587
** shifting non-terminals after a reduce.
173301173588
** yy_default[] Default action for each state.
173302173589
**
173303173590
*********** Begin parsing tables **********************************************/
173304
-#define YY_ACTTAB_COUNT (2167)
173591
+#define YY_ACTTAB_COUNT (2207)
173305173592
static const YYACTIONTYPE yy_action[] = {
173306
- /* 0 */ 576, 130, 127, 234, 1622, 550, 576, 1290, 1281, 576,
173307
- /* 10 */ 329, 576, 1300, 214, 576, 130, 127, 234, 578, 413,
173308
- /* 20 */ 578, 392, 1542, 51, 51, 524, 406, 1293, 530, 51,
173309
- /* 30 */ 51, 983, 51, 51, 82, 82, 1107, 61, 61, 984,
173310
- /* 40 */ 1107, 1292, 381, 137, 138, 91, 1228, 1228, 1063, 1066,
173311
- /* 50 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 1577, 413,
173312
- /* 60 */ 288, 288, 7, 288, 288, 423, 1050, 1050, 1064, 1067,
173313
- /* 70 */ 290, 557, 493, 573, 525, 562, 573, 498, 562, 483,
173314
- /* 80 */ 531, 264, 231, 137, 138, 91, 1228, 1228, 1063, 1066,
173315
- /* 90 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 130, 127,
173316
- /* 100 */ 234, 1506, 134, 134, 134, 134, 133, 133, 132, 132,
173317
- /* 110 */ 132, 131, 128, 451, 1204, 1255, 1, 1, 582, 2,
173318
- /* 120 */ 1259, 1571, 421, 1582, 380, 321, 1174, 155, 1174, 1584,
173319
- /* 130 */ 413, 379, 1582, 544, 1341, 331, 112, 570, 570, 570,
173320
- /* 140 */ 294, 1054, 134, 134, 134, 134, 133, 133, 132, 132,
173321
- /* 150 */ 132, 131, 128, 451, 137, 138, 91, 1228, 1228, 1063,
173322
- /* 160 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 288,
173323
- /* 170 */ 288, 1204, 1205, 1204, 257, 288, 288, 511, 508, 507,
173324
- /* 180 */ 139, 456, 573, 214, 562, 448, 447, 506, 573, 1616,
173325
- /* 190 */ 562, 136, 136, 136, 136, 129, 401, 245, 134, 134,
173326
- /* 200 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451,
173327
- /* 210 */ 283, 472, 346, 134, 134, 134, 134, 133, 133, 132,
173328
- /* 220 */ 132, 132, 131, 128, 451, 574, 157, 936, 936, 455,
173329
- /* 230 */ 229, 522, 1236, 413, 1236, 136, 136, 136, 136, 134,
173330
- /* 240 */ 134, 134, 134, 133, 133, 132, 132, 132, 131, 128,
173331
- /* 250 */ 451, 132, 132, 132, 131, 128, 451, 137, 138, 91,
173332
- /* 260 */ 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136,
173333
- /* 270 */ 136, 136, 130, 127, 234, 451, 576, 413, 398, 1249,
173334
- /* 280 */ 182, 93, 94, 134, 134, 134, 134, 133, 133, 132,
173335
- /* 290 */ 132, 132, 131, 128, 451, 382, 388, 1204, 384, 82,
173336
- /* 300 */ 82, 137, 138, 91, 1228, 1228, 1063, 1066, 1053, 1053,
173337
- /* 310 */ 135, 135, 136, 136, 136, 136, 134, 134, 134, 134,
173338
- /* 320 */ 133, 133, 132, 132, 132, 131, 128, 451, 133, 133,
173339
- /* 330 */ 132, 132, 132, 131, 128, 451, 557, 1204, 303, 320,
173340
- /* 340 */ 567, 123, 568, 481, 4, 556, 1149, 1657, 1628, 1657,
173341
- /* 350 */ 45, 130, 127, 234, 1204, 1205, 1204, 1250, 571, 1169,
173342
- /* 360 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131,
173343
- /* 370 */ 128, 451, 1169, 288, 288, 1169, 1019, 576, 423, 1019,
173344
- /* 380 */ 413, 452, 1602, 582, 2, 1259, 573, 44, 562, 96,
173345
- /* 390 */ 321, 111, 155, 565, 1204, 1205, 1204, 523, 523, 1341,
173346
- /* 400 */ 82, 82, 7, 44, 137, 138, 91, 1228, 1228, 1063,
173347
- /* 410 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 296,
173348
- /* 420 */ 1149, 1658, 1040, 1658, 1204, 1147, 320, 567, 121, 121,
173349
- /* 430 */ 344, 467, 332, 344, 288, 288, 122, 557, 452, 577,
173350
- /* 440 */ 452, 1169, 1169, 1028, 320, 567, 439, 573, 212, 562,
173351
- /* 450 */ 1339, 1451, 547, 532, 1169, 1169, 1598, 1169, 1169, 417,
173352
- /* 460 */ 320, 567, 245, 134, 134, 134, 134, 133, 133, 132,
173353
- /* 470 */ 132, 132, 131, 128, 451, 1028, 1028, 1030, 1031, 35,
173354
- /* 480 */ 44, 1204, 1205, 1204, 473, 288, 288, 1328, 413, 1307,
173355
- /* 490 */ 373, 1595, 360, 227, 455, 1204, 197, 1328, 573, 1147,
173356
- /* 500 */ 562, 1333, 1333, 275, 576, 1188, 576, 341, 46, 198,
173357
- /* 510 */ 538, 219, 137, 138, 91, 1228, 1228, 1063, 1066, 1053,
173358
- /* 520 */ 1053, 135, 135, 136, 136, 136, 136, 19, 19, 19,
173359
- /* 530 */ 19, 413, 581, 1204, 1259, 512, 1204, 320, 567, 321,
173360
- /* 540 */ 944, 155, 426, 492, 431, 943, 1204, 489, 1341, 1450,
173361
- /* 550 */ 533, 1277, 1204, 1205, 1204, 137, 138, 91, 1228, 1228,
173362
- /* 560 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173363
- /* 570 */ 575, 134, 134, 134, 134, 133, 133, 132, 132, 132,
173364
- /* 580 */ 131, 128, 451, 288, 288, 529, 288, 288, 373, 1595,
173365
- /* 590 */ 1204, 1205, 1204, 1204, 1205, 1204, 573, 487, 562, 573,
173366
- /* 600 */ 889, 562, 413, 1204, 1205, 1204, 886, 40, 22, 22,
173367
- /* 610 */ 222, 245, 526, 1449, 134, 134, 134, 134, 133, 133,
173368
- /* 620 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228,
173369
- /* 630 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173370
- /* 640 */ 136, 413, 182, 455, 1204, 879, 257, 288, 288, 511,
173371
- /* 650 */ 508, 507, 373, 1595, 1568, 1331, 1331, 576, 889, 506,
173372
- /* 660 */ 573, 44, 562, 560, 378, 137, 138, 91, 1228, 1228,
173373
- /* 670 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173374
- /* 680 */ 82, 82, 423, 576, 375, 134, 134, 134, 134, 133,
173375
- /* 690 */ 133, 132, 132, 132, 131, 128, 451, 298, 288, 288,
173376
- /* 700 */ 461, 1204, 1205, 1204, 1204, 535, 19, 19, 232, 550,
173377
- /* 710 */ 1281, 573, 413, 562, 386, 437, 1187, 536, 320, 567,
173378
- /* 720 */ 364, 433, 1279, 432, 134, 134, 134, 134, 133, 133,
173379
- /* 730 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228,
173380
- /* 740 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173381
- /* 750 */ 136, 413, 213, 949, 1169, 1041, 449, 449, 449, 548,
173382
- /* 760 */ 548, 1204, 1205, 1204, 7, 540, 1570, 1169, 377, 576,
173383
- /* 770 */ 1169, 5, 1204, 1552, 3, 137, 138, 91, 1228, 1228,
173384
- /* 780 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173385
- /* 790 */ 576, 514, 19, 19, 1554, 134, 134, 134, 134, 133,
173386
- /* 800 */ 133, 132, 132, 132, 131, 128, 451, 306, 1204, 434,
173387
- /* 810 */ 1435, 1204, 1435, 19, 19, 274, 291, 372, 517, 367,
173388
- /* 820 */ 516, 262, 413, 539, 551, 551, 1024, 363, 438, 1204,
173389
- /* 830 */ 1205, 1204, 1659, 399, 134, 134, 134, 134, 133, 133,
173390
- /* 840 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228,
173391
- /* 850 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173392
- /* 860 */ 136, 413, 481, 282, 282, 1204, 1205, 1204, 1204, 1205,
173393
- /* 870 */ 1204, 131, 128, 451, 1568, 1568, 573, 1627, 562, 911,
173394
- /* 880 */ 576, 428, 285, 429, 969, 137, 138, 91, 1228, 1228,
173395
- /* 890 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173396
- /* 900 */ 553, 576, 457, 19, 19, 134, 134, 134, 134, 133,
173397
- /* 910 */ 133, 132, 132, 132, 131, 128, 451, 1345, 206, 158,
173398
- /* 920 */ 1040, 1550, 48, 50, 19, 19, 1204, 289, 289, 573,
173399
- /* 930 */ 1105, 562, 413, 1110, 1110, 495, 1125, 1029, 299, 207,
173400
- /* 940 */ 573, 1028, 562, 403, 134, 134, 134, 134, 133, 133,
173401
- /* 950 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228,
173402
- /* 960 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173403
- /* 970 */ 136, 576, 375, 1028, 1028, 1030, 576, 233, 288, 288,
173404
- /* 980 */ 481, 576, 1126, 1204, 1205, 1204, 1569, 1569, 377, 377,
173405
- /* 990 */ 576, 573, 558, 562, 82, 82, 1204, 1127, 481, 82,
173406
- /* 1000 */ 82, 115, 969, 1188, 82, 82, 576, 902, 141, 479,
173407
- /* 1010 */ 971, 442, 1128, 81, 81, 134, 134, 134, 134, 133,
173408
- /* 1020 */ 133, 132, 132, 132, 131, 128, 451, 288, 288, 19,
173409
- /* 1030 */ 19, 316, 498, 922, 576, 413, 317, 1568, 515, 23,
173410
- /* 1040 */ 573, 557, 562, 923, 552, 1575, 903, 472, 346, 7,
173411
- /* 1050 */ 559, 532, 267, 1204, 1205, 1204, 302, 82, 82, 137,
173412
- /* 1060 */ 138, 91, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135,
173413
- /* 1070 */ 136, 136, 136, 136, 304, 576, 387, 1541, 424, 413,
173414
- /* 1080 */ 970, 166, 460, 1204, 215, 47, 1568, 1224, 260, 259,
173415
- /* 1090 */ 258, 487, 410, 409, 445, 1368, 315, 336, 82, 82,
173416
- /* 1100 */ 460, 459, 435, 137, 138, 91, 1228, 1228, 1063, 1066,
173417
- /* 1110 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 134, 134,
173418
- /* 1120 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451,
173419
- /* 1130 */ 448, 447, 576, 358, 49, 446, 850, 851, 852, 1233,
173420
- /* 1140 */ 1204, 1205, 1204, 487, 1235, 1224, 214, 108, 533, 1569,
173421
- /* 1150 */ 498, 377, 1234, 1576, 498, 82, 82, 7, 333, 412,
173422
- /* 1160 */ 335, 576, 134, 134, 134, 134, 133, 133, 132, 132,
173423
- /* 1170 */ 132, 131, 128, 451, 460, 119, 534, 1236, 498, 1236,
173424
- /* 1180 */ 111, 307, 413, 307, 145, 145, 1511, 10, 160, 267,
173425
- /* 1190 */ 324, 343, 450, 1435, 353, 1505, 356, 325, 1569, 1340,
173426
- /* 1200 */ 377, 498, 413, 520, 1511, 1513, 137, 138, 91, 1228,
173427
- /* 1210 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173428
- /* 1220 */ 136, 576, 413, 1336, 1224, 874, 137, 126, 91, 1228,
173429
- /* 1230 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173430
- /* 1240 */ 136, 862, 334, 305, 147, 147, 351, 138, 91, 1228,
173431
- /* 1250 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173432
- /* 1260 */ 136, 398, 1148, 6, 430, 134, 134, 134, 134, 133,
173433
- /* 1270 */ 133, 132, 132, 132, 131, 128, 451, 882, 1511, 576,
173434
- /* 1280 */ 1574, 893, 1224, 874, 7, 134, 134, 134, 134, 133,
173435
- /* 1290 */ 133, 132, 132, 132, 131, 128, 451, 576, 546, 576,
173436
- /* 1300 */ 470, 6, 66, 66, 576, 134, 134, 134, 134, 133,
173437
- /* 1310 */ 133, 132, 132, 132, 131, 128, 451, 545, 1040, 1207,
173438
- /* 1320 */ 67, 67, 21, 21, 576, 413, 1180, 53, 53, 969,
173439
- /* 1330 */ 1282, 419, 328, 1435, 882, 1029, 1435, 1573, 503, 1028,
173440
- /* 1340 */ 1250, 7, 488, 1085, 576, 463, 297, 68, 68, 463,
173441
- /* 1350 */ 297, 91, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135,
173442
- /* 1360 */ 136, 136, 136, 136, 576, 261, 576, 54, 54, 1126,
173443
- /* 1370 */ 576, 1028, 1028, 1030, 576, 209, 238, 1207, 1180, 576,
173444
- /* 1380 */ 471, 1498, 576, 1380, 1127, 287, 231, 69, 69, 70,
173445
- /* 1390 */ 70, 569, 419, 71, 71, 420, 184, 72, 72, 1128,
173446
- /* 1400 */ 576, 1188, 73, 73, 494, 55, 55, 443, 134, 134,
173447
- /* 1410 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451,
173448
- /* 1420 */ 564, 1244, 233, 56, 56, 97, 218, 485, 123, 568,
173449
- /* 1430 */ 576, 4, 576, 983, 418, 576, 227, 576, 161, 576,
173450
- /* 1440 */ 16, 984, 477, 576, 1223, 571, 576, 969, 123, 568,
173451
- /* 1450 */ 363, 4, 576, 57, 57, 59, 59, 9, 60, 60,
173452
- /* 1460 */ 74, 74, 75, 75, 108, 571, 76, 76, 452, 20,
173453
- /* 1470 */ 20, 464, 576, 465, 576, 77, 77, 221, 1379, 125,
173454
- /* 1480 */ 565, 576, 411, 576, 411, 242, 261, 576, 452, 576,
173455
- /* 1490 */ 519, 474, 478, 534, 542, 143, 143, 144, 144, 541,
173456
- /* 1500 */ 565, 466, 411, 411, 78, 78, 62, 62, 576, 1040,
173457
- /* 1510 */ 79, 79, 63, 63, 542, 121, 121, 944, 1144, 543,
173458
- /* 1520 */ 400, 462, 943, 122, 486, 452, 577, 452, 1557, 1040,
173459
- /* 1530 */ 1028, 80, 80, 319, 576, 121, 121, 337, 38, 123,
173460
- /* 1540 */ 568, 1530, 4, 122, 411, 452, 577, 452, 576, 120,
173461
- /* 1550 */ 1028, 117, 576, 528, 576, 418, 571, 64, 64, 293,
173462
- /* 1560 */ 109, 222, 1028, 1028, 1030, 1031, 35, 475, 342, 39,
173463
- /* 1570 */ 111, 170, 170, 901, 900, 171, 171, 87, 87, 452,
173464
- /* 1580 */ 908, 909, 1028, 1028, 1030, 1031, 35, 986, 987, 292,
173465
- /* 1590 */ 300, 565, 1188, 323, 396, 396, 395, 277, 393, 553,
173466
- /* 1600 */ 1092, 859, 244, 1032, 1529, 542, 576, 371, 490, 1021,
173467
- /* 1610 */ 541, 266, 1188, 480, 239, 266, 327, 370, 348, 576,
173468
- /* 1620 */ 1040, 482, 1376, 266, 326, 352, 121, 121, 355, 65,
173469
- /* 1630 */ 65, 1153, 123, 568, 122, 4, 452, 577, 452, 357,
173470
- /* 1640 */ 576, 1028, 83, 83, 576, 347, 576, 111, 1311, 571,
173471
- /* 1650 */ 504, 361, 263, 111, 241, 1366, 359, 165, 1092, 111,
173472
- /* 1660 */ 1324, 1032, 175, 146, 146, 43, 1310, 84, 84, 168,
173473
- /* 1670 */ 168, 1309, 452, 1028, 1028, 1030, 1031, 35, 1601, 1192,
173474
- /* 1680 */ 454, 1308, 240, 292, 565, 366, 376, 1389, 396, 396,
173475
- /* 1690 */ 395, 277, 393, 1434, 1088, 859, 263, 974, 942, 266,
173476
- /* 1700 */ 125, 576, 939, 1188, 125, 1104, 1362, 1104, 239, 576,
173477
- /* 1710 */ 327, 123, 568, 1040, 4, 205, 1374, 414, 326, 121,
173478
- /* 1720 */ 121, 948, 320, 567, 148, 148, 576, 122, 571, 452,
173479
- /* 1730 */ 577, 452, 142, 142, 1028, 563, 1103, 576, 1103, 1589,
173480
- /* 1740 */ 1439, 576, 872, 941, 159, 125, 458, 1289, 241, 169,
173481
- /* 1750 */ 169, 452, 1280, 1268, 1267, 1269, 175, 576, 1609, 43,
173482
- /* 1760 */ 162, 162, 499, 565, 152, 152, 1028, 1028, 1030, 1031,
173483
- /* 1770 */ 35, 576, 280, 167, 1359, 312, 240, 12, 313, 576,
173484
- /* 1780 */ 151, 151, 314, 90, 568, 224, 4, 397, 237, 339,
173485
- /* 1790 */ 509, 576, 1040, 1307, 149, 149, 1188, 1421, 121, 121,
173486
- /* 1800 */ 571, 576, 150, 150, 1416, 576, 122, 1409, 452, 577,
173487
- /* 1810 */ 452, 414, 295, 1028, 86, 86, 320, 567, 340, 576,
173488
- /* 1820 */ 345, 1426, 1425, 452, 88, 88, 301, 576, 85, 85,
173489
- /* 1830 */ 404, 484, 555, 228, 369, 565, 1502, 1501, 210, 1371,
173490
- /* 1840 */ 458, 1372, 52, 52, 211, 1028, 1028, 1030, 1031, 35,
173491
- /* 1850 */ 58, 58, 1370, 1369, 566, 391, 223, 1612, 1244, 270,
173492
- /* 1860 */ 1549, 186, 1547, 1241, 1040, 422, 96, 235, 195, 180,
173493
- /* 1870 */ 121, 121, 92, 220, 1507, 1188, 1422, 95, 122, 188,
173494
- /* 1880 */ 452, 577, 452, 1192, 454, 1028, 468, 292, 190, 191,
173495
- /* 1890 */ 13, 192, 396, 396, 395, 277, 393, 469, 502, 859,
173496
- /* 1900 */ 193, 247, 109, 402, 554, 1428, 1427, 14, 1430, 491,
173497
- /* 1910 */ 476, 199, 239, 405, 327, 1496, 251, 1028, 1028, 1030,
173498
- /* 1920 */ 1031, 35, 326, 102, 497, 281, 253, 203, 1518, 350,
173499
- /* 1930 */ 354, 500, 254, 407, 1270, 255, 518, 123, 568, 436,
173500
- /* 1940 */ 4, 1327, 1318, 104, 1326, 893, 1325, 1188, 229, 1317,
173501
- /* 1950 */ 1297, 440, 241, 1626, 571, 1625, 408, 1296, 368, 1295,
173502
- /* 1960 */ 175, 1624, 1594, 43, 527, 441, 310, 311, 374, 268,
173503
- /* 1970 */ 269, 444, 1580, 1394, 1579, 140, 553, 452, 11, 1393,
173504
- /* 1980 */ 240, 1483, 385, 110, 318, 537, 116, 216, 1350, 565,
173505
- /* 1990 */ 42, 383, 389, 579, 1349, 390, 1198, 276, 278, 279,
173506
- /* 2000 */ 580, 1265, 1260, 415, 416, 172, 185, 1534, 1535, 1533,
173507
- /* 2010 */ 1532, 156, 173, 89, 308, 414, 225, 846, 1040, 453,
173508
- /* 2020 */ 320, 567, 174, 217, 121, 121, 226, 322, 154, 236,
173509
- /* 2030 */ 1102, 1100, 122, 330, 452, 577, 452, 187, 176, 1028,
173510
- /* 2040 */ 1223, 243, 189, 925, 458, 246, 338, 1116, 194, 177,
173511
- /* 2050 */ 178, 425, 98, 196, 179, 427, 99, 100, 101, 1119,
173512
- /* 2060 */ 248, 1115, 163, 249, 24, 250, 1108, 1238, 349, 266,
173513
- /* 2070 */ 200, 1028, 1028, 1030, 1031, 35, 496, 252, 201, 15,
173514
- /* 2080 */ 370, 861, 501, 256, 202, 513, 505, 103, 25, 510,
173515
- /* 2090 */ 362, 26, 891, 105, 365, 309, 904, 164, 27, 521,
173516
- /* 2100 */ 106, 1188, 1185, 1069, 978, 1155, 107, 17, 1154, 181,
173517
- /* 2110 */ 230, 284, 286, 204, 972, 125, 1175, 265, 28, 1171,
173518
- /* 2120 */ 29, 30, 1173, 1179, 1160, 1178, 31, 41, 32, 208,
173519
- /* 2130 */ 549, 33, 111, 113, 1083, 1070, 114, 8, 1068, 1072,
173520
- /* 2140 */ 34, 1073, 561, 1124, 118, 271, 36, 18, 1194, 1033,
173521
- /* 2150 */ 873, 124, 394, 37, 1193, 935, 1256, 572, 183, 153,
173522
- /* 2160 */ 1256, 1256, 272, 1256, 1256, 273, 1617,
173593
+ /* 0 */ 130, 127, 234, 282, 282, 1328, 576, 1307, 460, 289,
173594
+ /* 10 */ 289, 576, 1622, 381, 576, 1328, 573, 576, 562, 413,
173595
+ /* 20 */ 1300, 1542, 573, 481, 562, 524, 460, 459, 558, 82,
173596
+ /* 30 */ 82, 983, 294, 375, 51, 51, 498, 61, 61, 984,
173597
+ /* 40 */ 82, 82, 1577, 137, 138, 91, 7, 1228, 1228, 1063,
173598
+ /* 50 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 413,
173599
+ /* 60 */ 288, 288, 182, 288, 288, 481, 536, 288, 288, 130,
173600
+ /* 70 */ 127, 234, 432, 573, 525, 562, 573, 557, 562, 1290,
173601
+ /* 80 */ 573, 421, 562, 137, 138, 91, 559, 1228, 1228, 1063,
173602
+ /* 90 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 296,
173603
+ /* 100 */ 460, 398, 1249, 134, 134, 134, 134, 133, 133, 132,
173604
+ /* 110 */ 132, 132, 131, 128, 451, 44, 1050, 1050, 1064, 1067,
173605
+ /* 120 */ 1255, 1, 1, 582, 2, 1259, 581, 1174, 1259, 1174,
173606
+ /* 130 */ 321, 413, 155, 321, 1584, 155, 379, 112, 498, 1341,
173607
+ /* 140 */ 456, 299, 1341, 134, 134, 134, 134, 133, 133, 132,
173608
+ /* 150 */ 132, 132, 131, 128, 451, 137, 138, 91, 1105, 1228,
173609
+ /* 160 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173610
+ /* 170 */ 136, 1204, 320, 567, 288, 288, 283, 288, 288, 523,
173611
+ /* 180 */ 523, 1250, 139, 1541, 7, 214, 503, 573, 1169, 562,
173612
+ /* 190 */ 573, 1054, 562, 136, 136, 136, 136, 129, 401, 547,
173613
+ /* 200 */ 487, 1169, 245, 1568, 1169, 245, 133, 133, 132, 132,
173614
+ /* 210 */ 132, 131, 128, 451, 261, 134, 134, 134, 134, 133,
173615
+ /* 220 */ 133, 132, 132, 132, 131, 128, 451, 451, 1204, 1205,
173616
+ /* 230 */ 1204, 130, 127, 234, 455, 413, 182, 455, 130, 127,
173617
+ /* 240 */ 234, 134, 134, 134, 134, 133, 133, 132, 132, 132,
173618
+ /* 250 */ 131, 128, 451, 136, 136, 136, 136, 538, 576, 137,
173619
+ /* 260 */ 138, 91, 261, 1228, 1228, 1063, 1066, 1053, 1053, 135,
173620
+ /* 270 */ 135, 136, 136, 136, 136, 44, 472, 346, 1204, 472,
173621
+ /* 280 */ 346, 51, 51, 418, 93, 157, 134, 134, 134, 134,
173622
+ /* 290 */ 133, 133, 132, 132, 132, 131, 128, 451, 166, 363,
173623
+ /* 300 */ 298, 134, 134, 134, 134, 133, 133, 132, 132, 132,
173624
+ /* 310 */ 131, 128, 451, 1293, 461, 1570, 423, 377, 275, 134,
173625
+ /* 320 */ 134, 134, 134, 133, 133, 132, 132, 132, 131, 128,
173626
+ /* 330 */ 451, 418, 320, 567, 1292, 1204, 1205, 1204, 257, 413,
173627
+ /* 340 */ 483, 511, 508, 507, 94, 132, 132, 132, 131, 128,
173628
+ /* 350 */ 451, 506, 1204, 548, 548, 388, 576, 384, 7, 413,
173629
+ /* 360 */ 550, 229, 522, 137, 138, 91, 530, 1228, 1228, 1063,
173630
+ /* 370 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 51,
173631
+ /* 380 */ 51, 1582, 380, 137, 138, 91, 331, 1228, 1228, 1063,
173632
+ /* 390 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 320,
173633
+ /* 400 */ 567, 288, 288, 320, 567, 1602, 582, 2, 1259, 1204,
173634
+ /* 410 */ 1205, 1204, 1628, 321, 573, 155, 562, 576, 1511, 264,
173635
+ /* 420 */ 231, 520, 1341, 134, 134, 134, 134, 133, 133, 132,
173636
+ /* 430 */ 132, 132, 131, 128, 451, 519, 1511, 1513, 1333, 1333,
173637
+ /* 440 */ 82, 82, 498, 134, 134, 134, 134, 133, 133, 132,
173638
+ /* 450 */ 132, 132, 131, 128, 451, 1435, 257, 288, 288, 511,
173639
+ /* 460 */ 508, 507, 944, 1568, 413, 1019, 1204, 943, 360, 506,
173640
+ /* 470 */ 573, 1598, 562, 44, 575, 551, 551, 557, 1107, 1582,
173641
+ /* 480 */ 544, 576, 1107, 40, 417, 245, 531, 1505, 137, 138,
173642
+ /* 490 */ 91, 219, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135,
173643
+ /* 500 */ 136, 136, 136, 136, 81, 81, 1281, 1204, 413, 553,
173644
+ /* 510 */ 1511, 48, 512, 448, 447, 493, 578, 455, 578, 344,
173645
+ /* 520 */ 45, 1204, 1233, 1204, 1205, 1204, 428, 1235, 158, 882,
173646
+ /* 530 */ 320, 567, 137, 138, 91, 1234, 1228, 1228, 1063, 1066,
173647
+ /* 540 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 134, 134,
173648
+ /* 550 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451,
173649
+ /* 560 */ 1236, 576, 1236, 329, 1204, 1205, 1204, 387, 492, 403,
173650
+ /* 570 */ 1040, 382, 489, 123, 568, 1569, 4, 377, 1204, 1205,
173651
+ /* 580 */ 1204, 570, 570, 570, 82, 82, 882, 1029, 1331, 1331,
173652
+ /* 590 */ 571, 1028, 134, 134, 134, 134, 133, 133, 132, 132,
173653
+ /* 600 */ 132, 131, 128, 451, 288, 288, 1281, 1204, 576, 423,
173654
+ /* 610 */ 576, 1568, 413, 423, 452, 378, 886, 573, 1279, 562,
173655
+ /* 620 */ 46, 557, 532, 1028, 1028, 1030, 565, 130, 127, 234,
173656
+ /* 630 */ 556, 82, 82, 82, 82, 479, 137, 138, 91, 462,
173657
+ /* 640 */ 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136,
173658
+ /* 650 */ 136, 136, 1188, 487, 1506, 1040, 413, 6, 1204, 50,
173659
+ /* 660 */ 879, 121, 121, 948, 1204, 1205, 1204, 358, 557, 122,
173660
+ /* 670 */ 316, 452, 577, 452, 535, 1204, 1028, 439, 303, 212,
173661
+ /* 680 */ 137, 138, 91, 213, 1228, 1228, 1063, 1066, 1053, 1053,
173662
+ /* 690 */ 135, 135, 136, 136, 136, 136, 134, 134, 134, 134,
173663
+ /* 700 */ 133, 133, 132, 132, 132, 131, 128, 451, 1028, 1028,
173664
+ /* 710 */ 1030, 1031, 35, 288, 288, 1204, 1205, 1204, 1040, 1339,
173665
+ /* 720 */ 533, 123, 568, 1569, 4, 377, 573, 1019, 562, 353,
173666
+ /* 730 */ 1277, 356, 1204, 1205, 1204, 1029, 488, 1188, 571, 1028,
173667
+ /* 740 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131,
173668
+ /* 750 */ 128, 451, 576, 343, 288, 288, 449, 449, 449, 971,
173669
+ /* 760 */ 413, 1627, 452, 911, 1187, 288, 288, 573, 464, 562,
173670
+ /* 770 */ 238, 1028, 1028, 1030, 565, 82, 82, 498, 573, 411,
173671
+ /* 780 */ 562, 344, 467, 332, 137, 138, 91, 197, 1228, 1228,
173672
+ /* 790 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173673
+ /* 800 */ 1188, 528, 1169, 1040, 413, 1110, 1110, 495, 1041, 121,
173674
+ /* 810 */ 121, 1204, 317, 540, 862, 1169, 1244, 122, 1169, 452,
173675
+ /* 820 */ 577, 452, 1340, 198, 1028, 1204, 481, 526, 137, 138,
173676
+ /* 830 */ 91, 560, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135,
173677
+ /* 840 */ 136, 136, 136, 136, 134, 134, 134, 134, 133, 133,
173678
+ /* 850 */ 132, 132, 132, 131, 128, 451, 1028, 1028, 1030, 1031,
173679
+ /* 860 */ 35, 1204, 288, 288, 1204, 477, 288, 288, 1204, 1205,
173680
+ /* 870 */ 1204, 539, 481, 437, 470, 573, 1451, 562, 364, 573,
173681
+ /* 880 */ 1153, 562, 1204, 1205, 1204, 1188, 5, 576, 134, 134,
173682
+ /* 890 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451,
173683
+ /* 900 */ 221, 214, 302, 96, 1149, 1657, 232, 1657, 413, 392,
173684
+ /* 910 */ 19, 19, 1024, 949, 406, 373, 1595, 1085, 1204, 1205,
173685
+ /* 920 */ 1204, 1204, 1205, 1204, 1204, 426, 1149, 1658, 413, 1658,
173686
+ /* 930 */ 1659, 399, 137, 138, 91, 3, 1228, 1228, 1063, 1066,
173687
+ /* 940 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 304, 1311,
173688
+ /* 950 */ 514, 1204, 137, 138, 91, 1498, 1228, 1228, 1063, 1066,
173689
+ /* 960 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 434, 131,
173690
+ /* 970 */ 128, 451, 375, 1204, 274, 291, 372, 517, 367, 516,
173691
+ /* 980 */ 262, 1204, 1205, 1204, 1147, 227, 363, 448, 447, 1435,
173692
+ /* 990 */ 1568, 1310, 134, 134, 134, 134, 133, 133, 132, 132,
173693
+ /* 1000 */ 132, 131, 128, 451, 1568, 576, 1147, 487, 1204, 1205,
173694
+ /* 1010 */ 1204, 442, 134, 134, 134, 134, 133, 133, 132, 132,
173695
+ /* 1020 */ 132, 131, 128, 451, 386, 576, 485, 576, 19, 19,
173696
+ /* 1030 */ 1204, 1205, 1204, 1345, 1236, 970, 1236, 574, 47, 936,
173697
+ /* 1040 */ 936, 473, 413, 431, 1552, 573, 1125, 562, 19, 19,
173698
+ /* 1050 */ 19, 19, 49, 336, 850, 851, 852, 111, 1368, 315,
173699
+ /* 1060 */ 429, 576, 413, 433, 341, 306, 137, 138, 91, 115,
173700
+ /* 1070 */ 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136,
173701
+ /* 1080 */ 136, 136, 576, 1309, 82, 82, 137, 138, 91, 529,
173702
+ /* 1090 */ 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136,
173703
+ /* 1100 */ 136, 136, 1569, 222, 377, 19, 19, 305, 1126, 1169,
173704
+ /* 1110 */ 398, 1148, 22, 22, 498, 333, 1569, 335, 377, 576,
173705
+ /* 1120 */ 438, 445, 1169, 1127, 486, 1169, 134, 134, 134, 134,
173706
+ /* 1130 */ 133, 133, 132, 132, 132, 131, 128, 451, 1128, 576,
173707
+ /* 1140 */ 902, 576, 145, 145, 6, 576, 134, 134, 134, 134,
173708
+ /* 1150 */ 133, 133, 132, 132, 132, 131, 128, 451, 214, 1336,
173709
+ /* 1160 */ 922, 576, 19, 19, 19, 19, 1282, 419, 19, 19,
173710
+ /* 1170 */ 923, 412, 515, 141, 576, 1169, 413, 206, 465, 207,
173711
+ /* 1180 */ 903, 215, 1575, 552, 147, 147, 7, 227, 1169, 411,
173712
+ /* 1190 */ 1250, 1169, 120, 307, 117, 307, 413, 66, 66, 334,
173713
+ /* 1200 */ 137, 138, 91, 119, 1228, 1228, 1063, 1066, 1053, 1053,
173714
+ /* 1210 */ 135, 135, 136, 136, 136, 136, 413, 285, 209, 969,
173715
+ /* 1220 */ 137, 138, 91, 471, 1228, 1228, 1063, 1066, 1053, 1053,
173716
+ /* 1230 */ 135, 135, 136, 136, 136, 136, 435, 10, 1450, 267,
173717
+ /* 1240 */ 137, 126, 91, 1435, 1228, 1228, 1063, 1066, 1053, 1053,
173718
+ /* 1250 */ 135, 135, 136, 136, 136, 136, 1435, 1435, 410, 409,
173719
+ /* 1260 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131,
173720
+ /* 1270 */ 128, 451, 576, 969, 576, 1224, 498, 373, 1595, 1554,
173721
+ /* 1280 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131,
173722
+ /* 1290 */ 128, 451, 532, 457, 576, 82, 82, 82, 82, 111,
173723
+ /* 1300 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131,
173724
+ /* 1310 */ 128, 451, 109, 233, 430, 1576, 546, 67, 67, 7,
173725
+ /* 1320 */ 413, 351, 550, 1550, 260, 259, 258, 494, 443, 569,
173726
+ /* 1330 */ 419, 983, 446, 1224, 450, 545, 1207, 576, 969, 984,
173727
+ /* 1340 */ 413, 475, 1449, 1574, 1180, 138, 91, 7, 1228, 1228,
173728
+ /* 1350 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173729
+ /* 1360 */ 21, 21, 267, 576, 300, 1126, 91, 233, 1228, 1228,
173730
+ /* 1370 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173731
+ /* 1380 */ 1127, 373, 1595, 161, 1573, 16, 53, 53, 7, 108,
173732
+ /* 1390 */ 533, 38, 969, 125, 1207, 1128, 1180, 576, 1224, 123,
173733
+ /* 1400 */ 568, 893, 4, 324, 134, 134, 134, 134, 133, 133,
173734
+ /* 1410 */ 132, 132, 132, 131, 128, 451, 571, 564, 534, 576,
173735
+ /* 1420 */ 68, 68, 576, 39, 134, 134, 134, 134, 133, 133,
173736
+ /* 1430 */ 132, 132, 132, 131, 128, 451, 576, 160, 1571, 1223,
173737
+ /* 1440 */ 452, 576, 54, 54, 576, 69, 69, 576, 1366, 576,
173738
+ /* 1450 */ 420, 184, 565, 463, 297, 576, 1224, 463, 297, 70,
173739
+ /* 1460 */ 70, 576, 44, 474, 71, 71, 576, 72, 72, 576,
173740
+ /* 1470 */ 73, 73, 55, 55, 411, 874, 242, 576, 56, 56,
173741
+ /* 1480 */ 576, 1040, 576, 478, 57, 57, 576, 121, 121, 59,
173742
+ /* 1490 */ 59, 23, 60, 60, 411, 122, 319, 452, 577, 452,
173743
+ /* 1500 */ 74, 74, 1028, 75, 75, 76, 76, 411, 290, 20,
173744
+ /* 1510 */ 20, 108, 287, 231, 553, 123, 568, 325, 4, 320,
173745
+ /* 1520 */ 567, 97, 218, 944, 1144, 328, 400, 576, 943, 576,
173746
+ /* 1530 */ 1380, 424, 571, 874, 1028, 1028, 1030, 1031, 35, 293,
173747
+ /* 1540 */ 534, 576, 1104, 576, 1104, 9, 576, 342, 576, 111,
173748
+ /* 1550 */ 77, 77, 143, 143, 576, 205, 452, 222, 1379, 889,
173749
+ /* 1560 */ 576, 901, 900, 1188, 144, 144, 78, 78, 565, 62,
173750
+ /* 1570 */ 62, 79, 79, 323, 1021, 576, 266, 63, 63, 908,
173751
+ /* 1580 */ 909, 1589, 542, 80, 80, 576, 371, 541, 123, 568,
173752
+ /* 1590 */ 480, 4, 266, 482, 244, 266, 370, 1040, 64, 64,
173753
+ /* 1600 */ 576, 466, 576, 121, 121, 571, 1557, 576, 170, 170,
173754
+ /* 1610 */ 576, 122, 576, 452, 577, 452, 576, 889, 1028, 576,
173755
+ /* 1620 */ 165, 576, 111, 171, 171, 87, 87, 337, 1616, 452,
173756
+ /* 1630 */ 65, 65, 1530, 83, 83, 146, 146, 986, 987, 84,
173757
+ /* 1640 */ 84, 565, 168, 168, 148, 148, 1092, 347, 1032, 111,
173758
+ /* 1650 */ 1028, 1028, 1030, 1031, 35, 542, 1103, 576, 1103, 576,
173759
+ /* 1660 */ 543, 123, 568, 504, 4, 263, 576, 361, 1529, 111,
173760
+ /* 1670 */ 1040, 1088, 576, 263, 576, 490, 121, 121, 571, 1188,
173761
+ /* 1680 */ 142, 142, 169, 169, 122, 576, 452, 577, 452, 162,
173762
+ /* 1690 */ 162, 1028, 576, 563, 576, 152, 152, 151, 151, 348,
173763
+ /* 1700 */ 1376, 974, 452, 266, 1092, 942, 1032, 125, 149, 149,
173764
+ /* 1710 */ 939, 576, 125, 576, 565, 150, 150, 86, 86, 872,
173765
+ /* 1720 */ 352, 159, 576, 1028, 1028, 1030, 1031, 35, 542, 941,
173766
+ /* 1730 */ 576, 125, 355, 541, 88, 88, 85, 85, 357, 359,
173767
+ /* 1740 */ 1324, 1308, 366, 1040, 376, 52, 52, 499, 1389, 121,
173768
+ /* 1750 */ 121, 1434, 1188, 58, 58, 1362, 1374, 122, 1439, 452,
173769
+ /* 1760 */ 577, 452, 1289, 167, 1028, 1280, 280, 1268, 1267, 1269,
173770
+ /* 1770 */ 1609, 1359, 312, 313, 12, 314, 397, 1421, 224, 1416,
173771
+ /* 1780 */ 295, 237, 1409, 339, 340, 1426, 301, 345, 484, 228,
173772
+ /* 1790 */ 1371, 1307, 1372, 1370, 1425, 404, 1028, 1028, 1030, 1031,
173773
+ /* 1800 */ 35, 1601, 1192, 454, 509, 369, 292, 1502, 210, 1501,
173774
+ /* 1810 */ 1369, 396, 396, 395, 277, 393, 211, 566, 859, 1612,
173775
+ /* 1820 */ 1244, 123, 568, 391, 4, 1188, 223, 270, 1549, 1547,
173776
+ /* 1830 */ 1241, 239, 186, 327, 422, 96, 195, 220, 571, 235,
173777
+ /* 1840 */ 180, 326, 188, 468, 190, 1507, 191, 192, 92, 193,
173778
+ /* 1850 */ 469, 95, 1422, 13, 502, 247, 1430, 109, 199, 402,
173779
+ /* 1860 */ 476, 405, 452, 1496, 1428, 1427, 14, 491, 251, 102,
173780
+ /* 1870 */ 497, 1518, 241, 281, 565, 253, 203, 354, 500, 254,
173781
+ /* 1880 */ 175, 1270, 407, 43, 350, 518, 1327, 436, 255, 1326,
173782
+ /* 1890 */ 1325, 1318, 104, 893, 1626, 229, 408, 440, 1625, 441,
173783
+ /* 1900 */ 240, 310, 1296, 1040, 311, 1317, 527, 1594, 1297, 121,
173784
+ /* 1910 */ 121, 368, 1295, 1624, 268, 269, 1580, 122, 1579, 452,
173785
+ /* 1920 */ 577, 452, 374, 444, 1028, 1394, 1393, 140, 553, 90,
173786
+ /* 1930 */ 568, 11, 4, 1483, 383, 414, 385, 110, 116, 216,
173787
+ /* 1940 */ 320, 567, 1350, 555, 42, 318, 571, 537, 1349, 389,
173788
+ /* 1950 */ 390, 579, 1198, 276, 279, 278, 1028, 1028, 1030, 1031,
173789
+ /* 1960 */ 35, 580, 415, 1265, 458, 1260, 416, 185, 1534, 172,
173790
+ /* 1970 */ 452, 1535, 173, 156, 308, 846, 1533, 1532, 453, 217,
173791
+ /* 1980 */ 225, 89, 565, 174, 322, 1188, 226, 236, 1102, 154,
173792
+ /* 1990 */ 1100, 330, 176, 187, 1223, 189, 925, 338, 243, 1116,
173793
+ /* 2000 */ 246, 194, 177, 178, 425, 427, 98, 99, 196, 100,
173794
+ /* 2010 */ 101, 1040, 179, 1119, 248, 1115, 249, 121, 121, 24,
173795
+ /* 2020 */ 163, 250, 349, 1108, 266, 122, 1238, 452, 577, 452,
173796
+ /* 2030 */ 1192, 454, 1028, 200, 292, 496, 252, 201, 861, 396,
173797
+ /* 2040 */ 396, 395, 277, 393, 15, 501, 859, 370, 292, 256,
173798
+ /* 2050 */ 202, 554, 505, 396, 396, 395, 277, 393, 103, 239,
173799
+ /* 2060 */ 859, 327, 25, 26, 1028, 1028, 1030, 1031, 35, 326,
173800
+ /* 2070 */ 362, 510, 891, 239, 365, 327, 513, 904, 105, 309,
173801
+ /* 2080 */ 164, 181, 27, 326, 106, 521, 107, 1185, 1069, 1155,
173802
+ /* 2090 */ 17, 1154, 284, 1188, 286, 978, 265, 204, 125, 1171,
173803
+ /* 2100 */ 241, 230, 972, 1175, 28, 1160, 29, 1179, 175, 1173,
173804
+ /* 2110 */ 30, 43, 31, 1178, 241, 32, 41, 549, 8, 33,
173805
+ /* 2120 */ 208, 111, 175, 1083, 1070, 43, 113, 1068, 240, 114,
173806
+ /* 2130 */ 1072, 34, 1073, 561, 1124, 118, 271, 36, 18, 1194,
173807
+ /* 2140 */ 1033, 873, 240, 935, 124, 37, 272, 273, 1617, 572,
173808
+ /* 2150 */ 183, 153, 394, 1193, 1256, 1256, 1256, 1256, 1256, 1256,
173809
+ /* 2160 */ 1256, 1256, 1256, 414, 1256, 1256, 1256, 1256, 320, 567,
173810
+ /* 2170 */ 1256, 1256, 1256, 1256, 1256, 1256, 1256, 414, 1256, 1256,
173811
+ /* 2180 */ 1256, 1256, 320, 567, 1256, 1256, 1256, 1256, 1256, 1256,
173812
+ /* 2190 */ 1256, 1256, 458, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
173813
+ /* 2200 */ 1256, 1256, 1256, 1256, 1256, 1256, 458,
173523173814
};
173524173815
static const YYCODETYPE yy_lookahead[] = {
173525
- /* 0 */ 194, 276, 277, 278, 216, 194, 194, 217, 194, 194,
173526
- /* 10 */ 194, 194, 224, 194, 194, 276, 277, 278, 204, 19,
173527
- /* 20 */ 206, 202, 297, 217, 218, 205, 207, 217, 205, 217,
173528
- /* 30 */ 218, 31, 217, 218, 217, 218, 29, 217, 218, 39,
173529
- /* 40 */ 33, 217, 220, 43, 44, 45, 46, 47, 48, 49,
173530
- /* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 312, 19,
173531
- /* 60 */ 240, 241, 316, 240, 241, 194, 46, 47, 48, 49,
173532
- /* 70 */ 22, 254, 65, 253, 254, 255, 253, 194, 255, 194,
173533
- /* 80 */ 263, 258, 259, 43, 44, 45, 46, 47, 48, 49,
173534
- /* 90 */ 50, 51, 52, 53, 54, 55, 56, 57, 276, 277,
173535
- /* 100 */ 278, 285, 102, 103, 104, 105, 106, 107, 108, 109,
173536
- /* 110 */ 110, 111, 112, 113, 59, 186, 187, 188, 189, 190,
173537
- /* 120 */ 191, 310, 239, 317, 318, 196, 86, 198, 88, 317,
173538
- /* 130 */ 19, 319, 317, 318, 205, 264, 25, 211, 212, 213,
173539
- /* 140 */ 205, 121, 102, 103, 104, 105, 106, 107, 108, 109,
173540
- /* 150 */ 110, 111, 112, 113, 43, 44, 45, 46, 47, 48,
173541
- /* 160 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 240,
173542
- /* 170 */ 241, 116, 117, 118, 119, 240, 241, 122, 123, 124,
173543
- /* 180 */ 69, 298, 253, 194, 255, 106, 107, 132, 253, 141,
173544
- /* 190 */ 255, 54, 55, 56, 57, 58, 207, 268, 102, 103,
173545
- /* 200 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
173546
- /* 210 */ 214, 128, 129, 102, 103, 104, 105, 106, 107, 108,
173547
- /* 220 */ 109, 110, 111, 112, 113, 134, 25, 136, 137, 300,
173548
- /* 230 */ 165, 166, 153, 19, 155, 54, 55, 56, 57, 102,
173549
- /* 240 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
173550
- /* 250 */ 113, 108, 109, 110, 111, 112, 113, 43, 44, 45,
173551
- /* 260 */ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
173552
- /* 270 */ 56, 57, 276, 277, 278, 113, 194, 19, 22, 23,
173553
- /* 280 */ 194, 67, 24, 102, 103, 104, 105, 106, 107, 108,
173554
- /* 290 */ 109, 110, 111, 112, 113, 220, 250, 59, 252, 217,
173555
- /* 300 */ 218, 43, 44, 45, 46, 47, 48, 49, 50, 51,
173556
- /* 310 */ 52, 53, 54, 55, 56, 57, 102, 103, 104, 105,
173557
- /* 320 */ 106, 107, 108, 109, 110, 111, 112, 113, 106, 107,
173558
- /* 330 */ 108, 109, 110, 111, 112, 113, 254, 59, 205, 138,
173559
- /* 340 */ 139, 19, 20, 194, 22, 263, 22, 23, 231, 25,
173560
- /* 350 */ 72, 276, 277, 278, 116, 117, 118, 101, 36, 76,
173561
- /* 360 */ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
173562
- /* 370 */ 112, 113, 89, 240, 241, 92, 73, 194, 194, 73,
173563
- /* 380 */ 19, 59, 188, 189, 190, 191, 253, 81, 255, 151,
173564
- /* 390 */ 196, 25, 198, 71, 116, 117, 118, 311, 312, 205,
173565
- /* 400 */ 217, 218, 316, 81, 43, 44, 45, 46, 47, 48,
173566
- /* 410 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 270,
173567
- /* 420 */ 22, 23, 100, 25, 59, 101, 138, 139, 106, 107,
173568
- /* 430 */ 127, 128, 129, 127, 240, 241, 114, 254, 116, 117,
173569
- /* 440 */ 118, 76, 76, 121, 138, 139, 263, 253, 264, 255,
173570
- /* 450 */ 205, 275, 87, 19, 89, 89, 194, 92, 92, 199,
173571
- /* 460 */ 138, 139, 268, 102, 103, 104, 105, 106, 107, 108,
173572
- /* 470 */ 109, 110, 111, 112, 113, 153, 154, 155, 156, 157,
173573
- /* 480 */ 81, 116, 117, 118, 129, 240, 241, 224, 19, 226,
173574
- /* 490 */ 314, 315, 23, 25, 300, 59, 22, 234, 253, 101,
173575
- /* 500 */ 255, 236, 237, 26, 194, 183, 194, 152, 72, 22,
173576
- /* 510 */ 145, 150, 43, 44, 45, 46, 47, 48, 49, 50,
173577
- /* 520 */ 51, 52, 53, 54, 55, 56, 57, 217, 218, 217,
173578
- /* 530 */ 218, 19, 189, 59, 191, 23, 59, 138, 139, 196,
173579
- /* 540 */ 135, 198, 232, 283, 232, 140, 59, 287, 205, 275,
173580
- /* 550 */ 116, 205, 116, 117, 118, 43, 44, 45, 46, 47,
173581
- /* 560 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
173582
- /* 570 */ 194, 102, 103, 104, 105, 106, 107, 108, 109, 110,
173583
- /* 580 */ 111, 112, 113, 240, 241, 194, 240, 241, 314, 315,
173584
- /* 590 */ 116, 117, 118, 116, 117, 118, 253, 194, 255, 253,
173585
- /* 600 */ 59, 255, 19, 116, 117, 118, 23, 22, 217, 218,
173586
- /* 610 */ 142, 268, 205, 275, 102, 103, 104, 105, 106, 107,
173587
- /* 620 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
173588
- /* 630 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173589
- /* 640 */ 57, 19, 194, 300, 59, 23, 119, 240, 241, 122,
173590
- /* 650 */ 123, 124, 314, 315, 194, 236, 237, 194, 117, 132,
173591
- /* 660 */ 253, 81, 255, 205, 194, 43, 44, 45, 46, 47,
173592
- /* 670 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
173593
- /* 680 */ 217, 218, 194, 194, 194, 102, 103, 104, 105, 106,
173594
- /* 690 */ 107, 108, 109, 110, 111, 112, 113, 294, 240, 241,
173595
- /* 700 */ 120, 116, 117, 118, 59, 194, 217, 218, 194, 194,
173596
- /* 710 */ 194, 253, 19, 255, 194, 19, 23, 254, 138, 139,
173597
- /* 720 */ 24, 232, 206, 233, 102, 103, 104, 105, 106, 107,
173598
- /* 730 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
173599
- /* 740 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173600
- /* 750 */ 57, 19, 264, 108, 76, 23, 211, 212, 213, 311,
173601
- /* 760 */ 312, 116, 117, 118, 316, 87, 306, 89, 308, 194,
173602
- /* 770 */ 92, 22, 59, 194, 22, 43, 44, 45, 46, 47,
173603
- /* 780 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
173604
- /* 790 */ 194, 95, 217, 218, 194, 102, 103, 104, 105, 106,
173605
- /* 800 */ 107, 108, 109, 110, 111, 112, 113, 232, 59, 113,
173606
- /* 810 */ 194, 59, 194, 217, 218, 119, 120, 121, 122, 123,
173607
- /* 820 */ 124, 125, 19, 145, 309, 310, 23, 131, 232, 116,
173608
- /* 830 */ 117, 118, 303, 304, 102, 103, 104, 105, 106, 107,
173609
- /* 840 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
173610
- /* 850 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173611
- /* 860 */ 57, 19, 194, 240, 241, 116, 117, 118, 116, 117,
173612
- /* 870 */ 118, 111, 112, 113, 194, 194, 253, 23, 255, 25,
173613
- /* 880 */ 194, 265, 23, 265, 25, 43, 44, 45, 46, 47,
173614
- /* 890 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
173615
- /* 900 */ 145, 194, 194, 217, 218, 102, 103, 104, 105, 106,
173616
- /* 910 */ 107, 108, 109, 110, 111, 112, 113, 241, 232, 164,
173617
- /* 920 */ 100, 194, 242, 242, 217, 218, 59, 240, 241, 253,
173618
- /* 930 */ 11, 255, 19, 127, 128, 129, 23, 117, 270, 232,
173619
- /* 940 */ 253, 121, 255, 205, 102, 103, 104, 105, 106, 107,
173620
- /* 950 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
173621
- /* 960 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173622
- /* 970 */ 57, 194, 194, 153, 154, 155, 194, 118, 240, 241,
173623
- /* 980 */ 194, 194, 12, 116, 117, 118, 306, 306, 308, 308,
173624
- /* 990 */ 194, 253, 205, 255, 217, 218, 59, 27, 194, 217,
173625
- /* 1000 */ 218, 159, 143, 183, 217, 218, 194, 35, 22, 271,
173626
- /* 1010 */ 143, 233, 42, 217, 218, 102, 103, 104, 105, 106,
173627
- /* 1020 */ 107, 108, 109, 110, 111, 112, 113, 240, 241, 217,
173628
- /* 1030 */ 218, 254, 194, 63, 194, 19, 254, 194, 66, 22,
173629
- /* 1040 */ 253, 254, 255, 73, 232, 312, 74, 128, 129, 316,
173630
- /* 1050 */ 263, 19, 24, 116, 117, 118, 270, 217, 218, 43,
173631
- /* 1060 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
173632
- /* 1070 */ 54, 55, 56, 57, 270, 194, 280, 239, 61, 19,
173633
- /* 1080 */ 143, 23, 194, 59, 24, 242, 194, 59, 127, 128,
173634
- /* 1090 */ 129, 194, 106, 107, 254, 261, 262, 16, 217, 218,
173635
- /* 1100 */ 212, 213, 130, 43, 44, 45, 46, 47, 48, 49,
173636
- /* 1110 */ 50, 51, 52, 53, 54, 55, 56, 57, 102, 103,
173637
- /* 1120 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
173638
- /* 1130 */ 106, 107, 194, 16, 242, 254, 7, 8, 9, 115,
173639
- /* 1140 */ 116, 117, 118, 194, 120, 117, 194, 115, 116, 306,
173640
- /* 1150 */ 194, 308, 128, 312, 194, 217, 218, 316, 77, 207,
173641
- /* 1160 */ 79, 194, 102, 103, 104, 105, 106, 107, 108, 109,
173642
- /* 1170 */ 110, 111, 112, 113, 286, 159, 144, 153, 194, 155,
173643
- /* 1180 */ 25, 229, 19, 231, 217, 218, 194, 22, 22, 24,
173644
- /* 1190 */ 194, 294, 254, 194, 77, 239, 79, 194, 306, 239,
173645
- /* 1200 */ 308, 194, 19, 145, 212, 213, 43, 44, 45, 46,
173646
- /* 1210 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173647
- /* 1220 */ 57, 194, 19, 239, 59, 59, 43, 44, 45, 46,
173648
- /* 1230 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173649
- /* 1240 */ 57, 21, 161, 294, 217, 218, 239, 44, 45, 46,
173650
- /* 1250 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173651
- /* 1260 */ 57, 22, 23, 214, 265, 102, 103, 104, 105, 106,
173652
- /* 1270 */ 107, 108, 109, 110, 111, 112, 113, 59, 286, 194,
173653
- /* 1280 */ 312, 126, 117, 117, 316, 102, 103, 104, 105, 106,
173654
- /* 1290 */ 107, 108, 109, 110, 111, 112, 113, 194, 66, 194,
173655
- /* 1300 */ 80, 214, 217, 218, 194, 102, 103, 104, 105, 106,
173656
- /* 1310 */ 107, 108, 109, 110, 111, 112, 113, 85, 100, 59,
173657
- /* 1320 */ 217, 218, 217, 218, 194, 19, 94, 217, 218, 25,
173658
- /* 1330 */ 209, 210, 194, 194, 116, 117, 194, 312, 19, 121,
173659
- /* 1340 */ 101, 316, 293, 123, 194, 262, 262, 217, 218, 266,
173660
- /* 1350 */ 266, 45, 46, 47, 48, 49, 50, 51, 52, 53,
173661
- /* 1360 */ 54, 55, 56, 57, 194, 46, 194, 217, 218, 12,
173662
- /* 1370 */ 194, 153, 154, 155, 194, 288, 15, 117, 146, 194,
173663
- /* 1380 */ 293, 161, 194, 194, 27, 258, 259, 217, 218, 217,
173664
- /* 1390 */ 218, 209, 210, 217, 218, 301, 302, 217, 218, 42,
173665
- /* 1400 */ 194, 183, 217, 218, 265, 217, 218, 265, 102, 103,
173666
- /* 1410 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
173667
- /* 1420 */ 63, 60, 118, 217, 218, 149, 150, 19, 19, 20,
173668
- /* 1430 */ 194, 22, 194, 31, 115, 194, 25, 194, 22, 194,
173669
- /* 1440 */ 24, 39, 115, 194, 25, 36, 194, 143, 19, 20,
173670
- /* 1450 */ 131, 22, 194, 217, 218, 217, 218, 48, 217, 218,
173671
- /* 1460 */ 217, 218, 217, 218, 115, 36, 217, 218, 59, 217,
173672
- /* 1470 */ 218, 245, 194, 245, 194, 217, 218, 150, 194, 25,
173673
- /* 1480 */ 71, 194, 256, 194, 256, 24, 46, 194, 59, 194,
173674
- /* 1490 */ 108, 245, 245, 144, 85, 217, 218, 217, 218, 90,
173675
- /* 1500 */ 71, 194, 256, 256, 217, 218, 217, 218, 194, 100,
173676
- /* 1510 */ 217, 218, 217, 218, 85, 106, 107, 135, 23, 90,
173677
- /* 1520 */ 25, 271, 140, 114, 116, 116, 117, 118, 194, 100,
173678
- /* 1530 */ 121, 217, 218, 245, 194, 106, 107, 194, 22, 19,
173679
- /* 1540 */ 20, 194, 22, 114, 256, 116, 117, 118, 194, 158,
173680
- /* 1550 */ 121, 160, 194, 19, 194, 115, 36, 217, 218, 99,
173681
- /* 1560 */ 149, 142, 153, 154, 155, 156, 157, 129, 23, 53,
173682
- /* 1570 */ 25, 217, 218, 120, 121, 217, 218, 217, 218, 59,
173683
- /* 1580 */ 7, 8, 153, 154, 155, 156, 157, 83, 84, 5,
173684
- /* 1590 */ 152, 71, 183, 133, 10, 11, 12, 13, 14, 145,
173685
- /* 1600 */ 59, 17, 141, 59, 194, 85, 194, 121, 194, 23,
173686
- /* 1610 */ 90, 25, 183, 23, 30, 25, 32, 131, 194, 194,
173687
- /* 1620 */ 100, 23, 194, 25, 40, 194, 106, 107, 194, 217,
173688
- /* 1630 */ 218, 97, 19, 20, 114, 22, 116, 117, 118, 194,
173689
- /* 1640 */ 194, 121, 217, 218, 194, 23, 194, 25, 227, 36,
173690
- /* 1650 */ 23, 23, 25, 25, 70, 260, 194, 23, 117, 25,
173691
- /* 1660 */ 194, 117, 78, 217, 218, 81, 227, 217, 218, 217,
173692
- /* 1670 */ 218, 227, 59, 153, 154, 155, 156, 157, 0, 1,
173693
- /* 1680 */ 2, 194, 98, 5, 71, 194, 194, 194, 10, 11,
173694
- /* 1690 */ 12, 13, 14, 194, 23, 17, 25, 23, 23, 25,
173695
- /* 1700 */ 25, 194, 23, 183, 25, 153, 194, 155, 30, 194,
173696
- /* 1710 */ 32, 19, 20, 100, 22, 257, 194, 133, 40, 106,
173697
- /* 1720 */ 107, 108, 138, 139, 217, 218, 194, 114, 36, 116,
173698
- /* 1730 */ 117, 118, 217, 218, 121, 237, 153, 194, 155, 321,
173699
- /* 1740 */ 194, 194, 23, 23, 25, 25, 162, 194, 70, 217,
173700
- /* 1750 */ 218, 59, 194, 194, 194, 194, 78, 194, 194, 81,
173701
- /* 1760 */ 217, 218, 290, 71, 217, 218, 153, 154, 155, 156,
173702
- /* 1770 */ 157, 194, 289, 243, 257, 257, 98, 244, 257, 194,
173703
- /* 1780 */ 217, 218, 257, 19, 20, 215, 22, 192, 299, 295,
173704
- /* 1790 */ 221, 194, 100, 226, 217, 218, 183, 273, 106, 107,
173705
- /* 1800 */ 36, 194, 217, 218, 269, 194, 114, 269, 116, 117,
173706
- /* 1810 */ 118, 133, 246, 121, 217, 218, 138, 139, 247, 194,
173707
- /* 1820 */ 246, 273, 273, 59, 217, 218, 247, 194, 217, 218,
173708
- /* 1830 */ 273, 295, 140, 230, 220, 71, 220, 220, 250, 261,
173709
- /* 1840 */ 162, 261, 217, 218, 250, 153, 154, 155, 156, 157,
173710
- /* 1850 */ 217, 218, 261, 261, 282, 246, 244, 197, 60, 141,
173711
- /* 1860 */ 201, 299, 201, 38, 100, 201, 151, 299, 22, 43,
173712
- /* 1870 */ 106, 107, 296, 150, 285, 183, 274, 296, 114, 235,
173713
- /* 1880 */ 116, 117, 118, 1, 2, 121, 18, 5, 238, 238,
173714
- /* 1890 */ 272, 238, 10, 11, 12, 13, 14, 201, 18, 17,
173715
- /* 1900 */ 238, 200, 149, 247, 140, 274, 274, 272, 235, 201,
173716
- /* 1910 */ 247, 235, 30, 247, 32, 247, 200, 153, 154, 155,
173717
- /* 1920 */ 156, 157, 40, 158, 62, 201, 200, 22, 292, 291,
173718
- /* 1930 */ 201, 222, 200, 222, 201, 200, 115, 19, 20, 64,
173719
- /* 1940 */ 22, 219, 228, 22, 219, 126, 219, 183, 165, 228,
173720
- /* 1950 */ 219, 24, 70, 225, 36, 225, 222, 221, 219, 219,
173721
- /* 1960 */ 78, 219, 315, 81, 307, 113, 284, 284, 222, 201,
173722
- /* 1970 */ 91, 82, 320, 267, 320, 148, 145, 59, 22, 267,
173723
- /* 1980 */ 98, 279, 201, 147, 281, 146, 158, 249, 251, 71,
173724
- /* 1990 */ 25, 250, 248, 203, 251, 247, 13, 195, 195, 6,
173725
- /* 2000 */ 193, 193, 193, 305, 305, 208, 302, 214, 214, 214,
173726
- /* 2010 */ 214, 223, 208, 214, 223, 133, 215, 4, 100, 3,
173727
- /* 2020 */ 138, 139, 208, 22, 106, 107, 215, 163, 16, 15,
173728
- /* 2030 */ 23, 23, 114, 139, 116, 117, 118, 151, 130, 121,
173729
- /* 2040 */ 25, 24, 142, 20, 162, 144, 16, 1, 142, 130,
173730
- /* 2050 */ 130, 61, 53, 151, 130, 37, 53, 53, 53, 116,
173731
- /* 2060 */ 34, 1, 5, 141, 22, 115, 68, 75, 161, 25,
173732
- /* 2070 */ 68, 153, 154, 155, 156, 157, 41, 141, 115, 24,
173733
- /* 2080 */ 131, 20, 19, 125, 22, 96, 67, 22, 22, 67,
173734
- /* 2090 */ 23, 22, 59, 22, 24, 67, 28, 23, 34, 22,
173735
- /* 2100 */ 149, 183, 23, 23, 116, 23, 25, 22, 97, 37,
173736
- /* 2110 */ 141, 23, 23, 22, 143, 25, 75, 34, 34, 88,
173737
- /* 2120 */ 34, 34, 86, 75, 23, 93, 34, 22, 34, 25,
173738
- /* 2130 */ 24, 34, 25, 142, 23, 23, 142, 44, 23, 23,
173739
- /* 2140 */ 22, 11, 25, 23, 25, 22, 22, 22, 1, 23,
173740
- /* 2150 */ 23, 22, 15, 22, 1, 135, 322, 25, 25, 23,
173741
- /* 2160 */ 322, 322, 141, 322, 322, 141, 141, 322, 322, 322,
173742
- /* 2170 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173743
- /* 2180 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173744
- /* 2190 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173745
- /* 2200 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173816
+ /* 0 */ 276, 277, 278, 240, 241, 224, 194, 226, 194, 240,
173817
+ /* 10 */ 241, 194, 216, 220, 194, 234, 253, 194, 255, 19,
173818
+ /* 20 */ 224, 297, 253, 194, 255, 205, 212, 213, 205, 217,
173819
+ /* 30 */ 218, 31, 205, 194, 217, 218, 194, 217, 218, 39,
173820
+ /* 40 */ 217, 218, 312, 43, 44, 45, 316, 47, 48, 49,
173821
+ /* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 19,
173822
+ /* 60 */ 240, 241, 194, 240, 241, 194, 254, 240, 241, 276,
173823
+ /* 70 */ 277, 278, 233, 253, 254, 255, 253, 254, 255, 217,
173824
+ /* 80 */ 253, 239, 255, 43, 44, 45, 263, 47, 48, 49,
173825
+ /* 90 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 270,
173826
+ /* 100 */ 286, 22, 23, 103, 104, 105, 106, 107, 108, 109,
173827
+ /* 110 */ 110, 111, 112, 113, 114, 82, 47, 48, 49, 50,
173828
+ /* 120 */ 186, 187, 188, 189, 190, 191, 189, 87, 191, 89,
173829
+ /* 130 */ 196, 19, 198, 196, 317, 198, 319, 25, 194, 205,
173830
+ /* 140 */ 298, 270, 205, 103, 104, 105, 106, 107, 108, 109,
173831
+ /* 150 */ 110, 111, 112, 113, 114, 43, 44, 45, 11, 47,
173832
+ /* 160 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
173833
+ /* 170 */ 58, 60, 139, 140, 240, 241, 214, 240, 241, 311,
173834
+ /* 180 */ 312, 102, 70, 239, 316, 194, 19, 253, 77, 255,
173835
+ /* 190 */ 253, 122, 255, 55, 56, 57, 58, 59, 207, 88,
173836
+ /* 200 */ 194, 90, 268, 194, 93, 268, 107, 108, 109, 110,
173837
+ /* 210 */ 111, 112, 113, 114, 47, 103, 104, 105, 106, 107,
173838
+ /* 220 */ 108, 109, 110, 111, 112, 113, 114, 114, 117, 118,
173839
+ /* 230 */ 119, 276, 277, 278, 300, 19, 194, 300, 276, 277,
173840
+ /* 240 */ 278, 103, 104, 105, 106, 107, 108, 109, 110, 111,
173841
+ /* 250 */ 112, 113, 114, 55, 56, 57, 58, 146, 194, 43,
173842
+ /* 260 */ 44, 45, 47, 47, 48, 49, 50, 51, 52, 53,
173843
+ /* 270 */ 54, 55, 56, 57, 58, 82, 129, 130, 60, 129,
173844
+ /* 280 */ 130, 217, 218, 116, 68, 25, 103, 104, 105, 106,
173845
+ /* 290 */ 107, 108, 109, 110, 111, 112, 113, 114, 23, 132,
173846
+ /* 300 */ 294, 103, 104, 105, 106, 107, 108, 109, 110, 111,
173847
+ /* 310 */ 112, 113, 114, 217, 121, 306, 194, 308, 26, 103,
173848
+ /* 320 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
173849
+ /* 330 */ 114, 116, 139, 140, 217, 117, 118, 119, 120, 19,
173850
+ /* 340 */ 194, 123, 124, 125, 24, 109, 110, 111, 112, 113,
173851
+ /* 350 */ 114, 133, 60, 311, 312, 250, 194, 252, 316, 19,
173852
+ /* 360 */ 194, 166, 167, 43, 44, 45, 205, 47, 48, 49,
173853
+ /* 370 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 217,
173854
+ /* 380 */ 218, 317, 318, 43, 44, 45, 264, 47, 48, 49,
173855
+ /* 390 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 139,
173856
+ /* 400 */ 140, 240, 241, 139, 140, 188, 189, 190, 191, 117,
173857
+ /* 410 */ 118, 119, 231, 196, 253, 198, 255, 194, 194, 258,
173858
+ /* 420 */ 259, 146, 205, 103, 104, 105, 106, 107, 108, 109,
173859
+ /* 430 */ 110, 111, 112, 113, 114, 109, 212, 213, 236, 237,
173860
+ /* 440 */ 217, 218, 194, 103, 104, 105, 106, 107, 108, 109,
173861
+ /* 450 */ 110, 111, 112, 113, 114, 194, 120, 240, 241, 123,
173862
+ /* 460 */ 124, 125, 136, 194, 19, 74, 60, 141, 23, 133,
173863
+ /* 470 */ 253, 194, 255, 82, 194, 309, 310, 254, 29, 317,
173864
+ /* 480 */ 318, 194, 33, 22, 199, 268, 263, 239, 43, 44,
173865
+ /* 490 */ 45, 151, 47, 48, 49, 50, 51, 52, 53, 54,
173866
+ /* 500 */ 55, 56, 57, 58, 217, 218, 194, 60, 19, 146,
173867
+ /* 510 */ 286, 242, 23, 107, 108, 66, 204, 300, 206, 128,
173868
+ /* 520 */ 73, 60, 116, 117, 118, 119, 265, 121, 165, 60,
173869
+ /* 530 */ 139, 140, 43, 44, 45, 129, 47, 48, 49, 50,
173870
+ /* 540 */ 51, 52, 53, 54, 55, 56, 57, 58, 103, 104,
173871
+ /* 550 */ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
173872
+ /* 560 */ 154, 194, 156, 194, 117, 118, 119, 280, 283, 205,
173873
+ /* 570 */ 101, 220, 287, 19, 20, 306, 22, 308, 117, 118,
173874
+ /* 580 */ 119, 211, 212, 213, 217, 218, 117, 118, 236, 237,
173875
+ /* 590 */ 36, 122, 103, 104, 105, 106, 107, 108, 109, 110,
173876
+ /* 600 */ 111, 112, 113, 114, 240, 241, 194, 60, 194, 194,
173877
+ /* 610 */ 194, 194, 19, 194, 60, 194, 23, 253, 206, 255,
173878
+ /* 620 */ 73, 254, 19, 154, 155, 156, 72, 276, 277, 278,
173879
+ /* 630 */ 263, 217, 218, 217, 218, 271, 43, 44, 45, 271,
173880
+ /* 640 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173881
+ /* 650 */ 57, 58, 183, 194, 285, 101, 19, 214, 60, 242,
173882
+ /* 660 */ 23, 107, 108, 109, 117, 118, 119, 16, 254, 115,
173883
+ /* 670 */ 254, 117, 118, 119, 194, 60, 122, 263, 205, 264,
173884
+ /* 680 */ 43, 44, 45, 264, 47, 48, 49, 50, 51, 52,
173885
+ /* 690 */ 53, 54, 55, 56, 57, 58, 103, 104, 105, 106,
173886
+ /* 700 */ 107, 108, 109, 110, 111, 112, 113, 114, 154, 155,
173887
+ /* 710 */ 156, 157, 158, 240, 241, 117, 118, 119, 101, 205,
173888
+ /* 720 */ 117, 19, 20, 306, 22, 308, 253, 74, 255, 78,
173889
+ /* 730 */ 205, 80, 117, 118, 119, 118, 293, 183, 36, 122,
173890
+ /* 740 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
173891
+ /* 750 */ 113, 114, 194, 294, 240, 241, 211, 212, 213, 144,
173892
+ /* 760 */ 19, 23, 60, 25, 23, 240, 241, 253, 245, 255,
173893
+ /* 770 */ 15, 154, 155, 156, 72, 217, 218, 194, 253, 256,
173894
+ /* 780 */ 255, 128, 129, 130, 43, 44, 45, 22, 47, 48,
173895
+ /* 790 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
173896
+ /* 800 */ 183, 19, 77, 101, 19, 128, 129, 130, 23, 107,
173897
+ /* 810 */ 108, 60, 254, 88, 21, 90, 61, 115, 93, 117,
173898
+ /* 820 */ 118, 119, 239, 22, 122, 60, 194, 205, 43, 44,
173899
+ /* 830 */ 45, 205, 47, 48, 49, 50, 51, 52, 53, 54,
173900
+ /* 840 */ 55, 56, 57, 58, 103, 104, 105, 106, 107, 108,
173901
+ /* 850 */ 109, 110, 111, 112, 113, 114, 154, 155, 156, 157,
173902
+ /* 860 */ 158, 60, 240, 241, 60, 116, 240, 241, 117, 118,
173903
+ /* 870 */ 119, 146, 194, 19, 81, 253, 275, 255, 24, 253,
173904
+ /* 880 */ 98, 255, 117, 118, 119, 183, 22, 194, 103, 104,
173905
+ /* 890 */ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
173906
+ /* 900 */ 151, 194, 270, 152, 22, 23, 194, 25, 19, 202,
173907
+ /* 910 */ 217, 218, 23, 109, 207, 314, 315, 124, 117, 118,
173908
+ /* 920 */ 119, 117, 118, 119, 60, 232, 22, 23, 19, 25,
173909
+ /* 930 */ 303, 304, 43, 44, 45, 22, 47, 48, 49, 50,
173910
+ /* 940 */ 51, 52, 53, 54, 55, 56, 57, 58, 270, 227,
173911
+ /* 950 */ 96, 60, 43, 44, 45, 162, 47, 48, 49, 50,
173912
+ /* 960 */ 51, 52, 53, 54, 55, 56, 57, 58, 114, 112,
173913
+ /* 970 */ 113, 114, 194, 60, 120, 121, 122, 123, 124, 125,
173914
+ /* 980 */ 126, 117, 118, 119, 102, 25, 132, 107, 108, 194,
173915
+ /* 990 */ 194, 227, 103, 104, 105, 106, 107, 108, 109, 110,
173916
+ /* 1000 */ 111, 112, 113, 114, 194, 194, 102, 194, 117, 118,
173917
+ /* 1010 */ 119, 233, 103, 104, 105, 106, 107, 108, 109, 110,
173918
+ /* 1020 */ 111, 112, 113, 114, 194, 194, 19, 194, 217, 218,
173919
+ /* 1030 */ 117, 118, 119, 241, 154, 144, 156, 135, 242, 137,
173920
+ /* 1040 */ 138, 130, 19, 232, 194, 253, 23, 255, 217, 218,
173921
+ /* 1050 */ 217, 218, 242, 16, 7, 8, 9, 25, 261, 262,
173922
+ /* 1060 */ 265, 194, 19, 232, 153, 232, 43, 44, 45, 160,
173923
+ /* 1070 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173924
+ /* 1080 */ 57, 58, 194, 227, 217, 218, 43, 44, 45, 194,
173925
+ /* 1090 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173926
+ /* 1100 */ 57, 58, 306, 143, 308, 217, 218, 294, 12, 77,
173927
+ /* 1110 */ 22, 23, 217, 218, 194, 78, 306, 80, 308, 194,
173928
+ /* 1120 */ 232, 254, 90, 27, 117, 93, 103, 104, 105, 106,
173929
+ /* 1130 */ 107, 108, 109, 110, 111, 112, 113, 114, 42, 194,
173930
+ /* 1140 */ 35, 194, 217, 218, 214, 194, 103, 104, 105, 106,
173931
+ /* 1150 */ 107, 108, 109, 110, 111, 112, 113, 114, 194, 239,
173932
+ /* 1160 */ 64, 194, 217, 218, 217, 218, 209, 210, 217, 218,
173933
+ /* 1170 */ 74, 207, 67, 22, 194, 77, 19, 232, 245, 232,
173934
+ /* 1180 */ 75, 24, 312, 232, 217, 218, 316, 25, 90, 256,
173935
+ /* 1190 */ 102, 93, 159, 229, 161, 231, 19, 217, 218, 162,
173936
+ /* 1200 */ 43, 44, 45, 160, 47, 48, 49, 50, 51, 52,
173937
+ /* 1210 */ 53, 54, 55, 56, 57, 58, 19, 23, 288, 25,
173938
+ /* 1220 */ 43, 44, 45, 293, 47, 48, 49, 50, 51, 52,
173939
+ /* 1230 */ 53, 54, 55, 56, 57, 58, 131, 22, 275, 24,
173940
+ /* 1240 */ 43, 44, 45, 194, 47, 48, 49, 50, 51, 52,
173941
+ /* 1250 */ 53, 54, 55, 56, 57, 58, 194, 194, 107, 108,
173942
+ /* 1260 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
173943
+ /* 1270 */ 113, 114, 194, 25, 194, 60, 194, 314, 315, 194,
173944
+ /* 1280 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
173945
+ /* 1290 */ 113, 114, 19, 194, 194, 217, 218, 217, 218, 25,
173946
+ /* 1300 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
173947
+ /* 1310 */ 113, 114, 150, 119, 265, 312, 67, 217, 218, 316,
173948
+ /* 1320 */ 19, 239, 194, 194, 128, 129, 130, 265, 265, 209,
173949
+ /* 1330 */ 210, 31, 254, 118, 254, 86, 60, 194, 144, 39,
173950
+ /* 1340 */ 19, 130, 275, 312, 95, 44, 45, 316, 47, 48,
173951
+ /* 1350 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
173952
+ /* 1360 */ 217, 218, 24, 194, 153, 12, 45, 119, 47, 48,
173953
+ /* 1370 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
173954
+ /* 1380 */ 27, 314, 315, 22, 312, 24, 217, 218, 316, 116,
173955
+ /* 1390 */ 117, 22, 144, 25, 118, 42, 147, 194, 60, 19,
173956
+ /* 1400 */ 20, 127, 22, 194, 103, 104, 105, 106, 107, 108,
173957
+ /* 1410 */ 109, 110, 111, 112, 113, 114, 36, 64, 145, 194,
173958
+ /* 1420 */ 217, 218, 194, 54, 103, 104, 105, 106, 107, 108,
173959
+ /* 1430 */ 109, 110, 111, 112, 113, 114, 194, 22, 310, 25,
173960
+ /* 1440 */ 60, 194, 217, 218, 194, 217, 218, 194, 260, 194,
173961
+ /* 1450 */ 301, 302, 72, 262, 262, 194, 118, 266, 266, 217,
173962
+ /* 1460 */ 218, 194, 82, 245, 217, 218, 194, 217, 218, 194,
173963
+ /* 1470 */ 217, 218, 217, 218, 256, 60, 24, 194, 217, 218,
173964
+ /* 1480 */ 194, 101, 194, 245, 217, 218, 194, 107, 108, 217,
173965
+ /* 1490 */ 218, 22, 217, 218, 256, 115, 245, 117, 118, 119,
173966
+ /* 1500 */ 217, 218, 122, 217, 218, 217, 218, 256, 22, 217,
173967
+ /* 1510 */ 218, 116, 258, 259, 146, 19, 20, 194, 22, 139,
173968
+ /* 1520 */ 140, 150, 151, 136, 23, 194, 25, 194, 141, 194,
173969
+ /* 1530 */ 194, 62, 36, 118, 154, 155, 156, 157, 158, 100,
173970
+ /* 1540 */ 145, 194, 154, 194, 156, 49, 194, 23, 194, 25,
173971
+ /* 1550 */ 217, 218, 217, 218, 194, 257, 60, 143, 194, 60,
173972
+ /* 1560 */ 194, 121, 122, 183, 217, 218, 217, 218, 72, 217,
173973
+ /* 1570 */ 218, 217, 218, 134, 23, 194, 25, 217, 218, 7,
173974
+ /* 1580 */ 8, 321, 86, 217, 218, 194, 122, 91, 19, 20,
173975
+ /* 1590 */ 23, 22, 25, 23, 142, 25, 132, 101, 217, 218,
173976
+ /* 1600 */ 194, 194, 194, 107, 108, 36, 194, 194, 217, 218,
173977
+ /* 1610 */ 194, 115, 194, 117, 118, 119, 194, 118, 122, 194,
173978
+ /* 1620 */ 23, 194, 25, 217, 218, 217, 218, 194, 142, 60,
173979
+ /* 1630 */ 217, 218, 194, 217, 218, 217, 218, 84, 85, 217,
173980
+ /* 1640 */ 218, 72, 217, 218, 217, 218, 60, 23, 60, 25,
173981
+ /* 1650 */ 154, 155, 156, 157, 158, 86, 154, 194, 156, 194,
173982
+ /* 1660 */ 91, 19, 20, 23, 22, 25, 194, 23, 194, 25,
173983
+ /* 1670 */ 101, 23, 194, 25, 194, 194, 107, 108, 36, 183,
173984
+ /* 1680 */ 217, 218, 217, 218, 115, 194, 117, 118, 119, 217,
173985
+ /* 1690 */ 218, 122, 194, 237, 194, 217, 218, 217, 218, 194,
173986
+ /* 1700 */ 194, 23, 60, 25, 118, 23, 118, 25, 217, 218,
173987
+ /* 1710 */ 23, 194, 25, 194, 72, 217, 218, 217, 218, 23,
173988
+ /* 1720 */ 194, 25, 194, 154, 155, 156, 157, 158, 86, 23,
173989
+ /* 1730 */ 194, 25, 194, 91, 217, 218, 217, 218, 194, 194,
173990
+ /* 1740 */ 194, 194, 194, 101, 194, 217, 218, 290, 194, 107,
173991
+ /* 1750 */ 108, 194, 183, 217, 218, 194, 194, 115, 194, 117,
173992
+ /* 1760 */ 118, 119, 194, 243, 122, 194, 289, 194, 194, 194,
173993
+ /* 1770 */ 194, 257, 257, 257, 244, 257, 192, 273, 215, 269,
173994
+ /* 1780 */ 246, 299, 269, 295, 247, 273, 247, 246, 295, 230,
173995
+ /* 1790 */ 261, 226, 261, 261, 273, 273, 154, 155, 156, 157,
173996
+ /* 1800 */ 158, 0, 1, 2, 221, 220, 5, 220, 250, 220,
173997
+ /* 1810 */ 261, 10, 11, 12, 13, 14, 250, 282, 17, 197,
173998
+ /* 1820 */ 61, 19, 20, 246, 22, 183, 244, 142, 201, 201,
173999
+ /* 1830 */ 38, 30, 299, 32, 201, 152, 22, 151, 36, 299,
174000
+ /* 1840 */ 43, 40, 235, 18, 238, 285, 238, 238, 296, 238,
174001
+ /* 1850 */ 201, 296, 274, 272, 18, 200, 235, 150, 235, 247,
174002
+ /* 1860 */ 247, 247, 60, 247, 274, 274, 272, 201, 200, 159,
174003
+ /* 1870 */ 63, 292, 71, 201, 72, 200, 22, 201, 222, 200,
174004
+ /* 1880 */ 79, 201, 222, 82, 291, 116, 219, 65, 200, 219,
174005
+ /* 1890 */ 219, 228, 22, 127, 225, 166, 222, 24, 225, 114,
174006
+ /* 1900 */ 99, 284, 221, 101, 284, 228, 307, 315, 219, 107,
174007
+ /* 1910 */ 108, 219, 219, 219, 201, 92, 320, 115, 320, 117,
174008
+ /* 1920 */ 118, 119, 222, 83, 122, 267, 267, 149, 146, 19,
174009
+ /* 1930 */ 20, 22, 22, 279, 250, 134, 201, 148, 159, 249,
174010
+ /* 1940 */ 139, 140, 251, 141, 25, 281, 36, 147, 251, 248,
174011
+ /* 1950 */ 247, 203, 13, 195, 6, 195, 154, 155, 156, 157,
174012
+ /* 1960 */ 158, 193, 305, 193, 163, 193, 305, 302, 214, 208,
174013
+ /* 1970 */ 60, 214, 208, 223, 223, 4, 214, 214, 3, 22,
174014
+ /* 1980 */ 215, 214, 72, 208, 164, 183, 215, 15, 23, 16,
174015
+ /* 1990 */ 23, 140, 131, 152, 25, 143, 20, 16, 24, 1,
174016
+ /* 2000 */ 145, 143, 131, 131, 62, 37, 54, 54, 152, 54,
174017
+ /* 2010 */ 54, 101, 131, 117, 34, 1, 142, 107, 108, 22,
174018
+ /* 2020 */ 5, 116, 162, 69, 25, 115, 76, 117, 118, 119,
174019
+ /* 2030 */ 1, 2, 122, 69, 5, 41, 142, 116, 20, 10,
174020
+ /* 2040 */ 11, 12, 13, 14, 24, 19, 17, 132, 5, 126,
174021
+ /* 2050 */ 22, 141, 68, 10, 11, 12, 13, 14, 22, 30,
174022
+ /* 2060 */ 17, 32, 22, 22, 154, 155, 156, 157, 158, 40,
174023
+ /* 2070 */ 23, 68, 60, 30, 24, 32, 97, 28, 22, 68,
174024
+ /* 2080 */ 23, 37, 34, 40, 150, 22, 25, 23, 23, 23,
174025
+ /* 2090 */ 22, 98, 23, 183, 23, 117, 34, 22, 25, 89,
174026
+ /* 2100 */ 71, 142, 144, 76, 34, 23, 34, 76, 79, 87,
174027
+ /* 2110 */ 34, 82, 34, 94, 71, 34, 22, 24, 44, 34,
174028
+ /* 2120 */ 25, 25, 79, 23, 23, 82, 143, 23, 99, 143,
174029
+ /* 2130 */ 23, 22, 11, 25, 23, 25, 22, 22, 22, 1,
174030
+ /* 2140 */ 23, 23, 99, 136, 22, 22, 142, 142, 142, 25,
174031
+ /* 2150 */ 25, 23, 15, 1, 322, 322, 322, 322, 322, 322,
174032
+ /* 2160 */ 322, 322, 322, 134, 322, 322, 322, 322, 139, 140,
174033
+ /* 2170 */ 322, 322, 322, 322, 322, 322, 322, 134, 322, 322,
174034
+ /* 2180 */ 322, 322, 139, 140, 322, 322, 322, 322, 322, 322,
174035
+ /* 2190 */ 322, 322, 163, 322, 322, 322, 322, 322, 322, 322,
174036
+ /* 2200 */ 322, 322, 322, 322, 322, 322, 163, 322, 322, 322,
173746174037
/* 2210 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173747174038
/* 2220 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173748174039
/* 2230 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173749174040
/* 2240 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173750174041
/* 2250 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
@@ -173754,123 +174045,127 @@
173754174045
/* 2290 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173755174046
/* 2300 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173756174047
/* 2310 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173757174048
/* 2320 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173758174049
/* 2330 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173759
- /* 2340 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173760
- /* 2350 */ 322, 322, 322,
174050
+ /* 2340 */ 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
174051
+ /* 2350 */ 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
174052
+ /* 2360 */ 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
174053
+ /* 2370 */ 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
174054
+ /* 2380 */ 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
174055
+ /* 2390 */ 186, 186, 186,
173761174056
};
173762174057
#define YY_SHIFT_COUNT (582)
173763174058
#define YY_SHIFT_MIN (0)
173764
-#define YY_SHIFT_MAX (2153)
174059
+#define YY_SHIFT_MAX (2152)
173765174060
static const unsigned short int yy_shift_ofst[] = {
173766
- /* 0 */ 1882, 1678, 1584, 322, 322, 399, 306, 1409, 1429, 1520,
173767
- /* 10 */ 1918, 1918, 1918, 580, 399, 399, 399, 399, 399, 0,
173768
- /* 20 */ 0, 214, 1163, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173769
- /* 30 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1024, 1024,
173770
- /* 40 */ 365, 365, 55, 278, 436, 713, 713, 201, 201, 201,
173771
- /* 50 */ 201, 40, 111, 258, 361, 469, 512, 583, 622, 693,
173772
- /* 60 */ 732, 803, 842, 913, 1016, 1060, 1163, 1163, 1163, 1163,
173773
- /* 70 */ 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163,
173774
- /* 80 */ 1163, 1163, 1163, 1163, 1183, 1163, 1203, 1306, 1306, 1613,
173775
- /* 90 */ 1692, 1764, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173776
- /* 100 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173777
- /* 110 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173778
- /* 120 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173779
- /* 130 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173780
- /* 140 */ 1918, 1918, 137, 181, 181, 181, 181, 181, 181, 181,
173781
- /* 150 */ 96, 222, 143, 477, 713, 1220, 1319, 713, 713, 79,
173782
- /* 160 */ 79, 713, 760, 83, 65, 65, 65, 288, 162, 162,
173783
- /* 170 */ 2167, 2167, 696, 696, 696, 238, 474, 474, 474, 474,
173784
- /* 180 */ 970, 970, 678, 477, 324, 398, 713, 713, 713, 713,
173785
- /* 190 */ 713, 713, 713, 713, 713, 713, 713, 713, 713, 713,
173786
- /* 200 */ 713, 713, 713, 713, 713, 1032, 366, 366, 713, 919,
173787
- /* 210 */ 283, 283, 434, 434, 1260, 1260, 755, 2167, 2167, 2167,
173788
- /* 220 */ 2167, 2167, 2167, 2167, 1218, 820, 820, 487, 527, 585,
173789
- /* 230 */ 645, 749, 867, 937, 752, 713, 713, 713, 713, 713,
173790
- /* 240 */ 713, 713, 713, 713, 713, 303, 713, 713, 713, 713,
173791
- /* 250 */ 713, 713, 713, 713, 713, 713, 713, 713, 972, 972,
173792
- /* 260 */ 972, 713, 713, 713, 859, 713, 713, 713, 1165, 1232,
173793
- /* 270 */ 713, 1357, 713, 713, 713, 713, 713, 713, 713, 713,
173794
- /* 280 */ 806, 7, 91, 1028, 1028, 1028, 1028, 1304, 91, 91,
173795
- /* 290 */ 1382, 986, 1129, 1361, 1327, 1276, 468, 1276, 1408, 1411,
173796
- /* 300 */ 1327, 1327, 1411, 1327, 468, 1408, 1155, 854, 1440, 1402,
173797
- /* 310 */ 1402, 1402, 1349, 1349, 1349, 1349, 1454, 1454, 1391, 1419,
173798
- /* 320 */ 405, 1416, 1798, 1798, 1718, 1718, 1825, 1825, 1718, 1715,
173799
- /* 330 */ 1723, 1846, 1826, 1868, 1868, 1868, 1868, 1718, 1880, 1753,
173800
- /* 340 */ 1723, 1723, 1753, 1846, 1826, 1753, 1826, 1753, 1718, 1880,
173801
- /* 350 */ 1765, 1862, 1718, 1880, 1905, 1718, 1880, 1718, 1880, 1905,
173802
- /* 360 */ 1821, 1821, 1821, 1875, 1921, 1921, 1905, 1821, 1819, 1821,
173803
- /* 370 */ 1875, 1821, 1821, 1783, 1927, 1852, 1852, 1905, 1718, 1879,
173804
- /* 380 */ 1879, 1889, 1889, 1827, 1831, 1956, 1718, 1828, 1827, 1836,
173805
- /* 390 */ 1839, 1753, 1965, 1983, 1983, 1993, 1993, 1993, 2167, 2167,
173806
- /* 400 */ 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167,
173807
- /* 410 */ 2167, 2167, 2167, 20, 1081, 256, 1239, 1117, 961, 1166,
173808
- /* 420 */ 1495, 1460, 1516, 1461, 355, 1438, 1545, 1017, 1586, 1590,
173809
- /* 430 */ 1598, 1622, 1627, 1628, 541, 1453, 1573, 1486, 1634, 1058,
173810
- /* 440 */ 1534, 1541, 1671, 1674, 1504, 1675, 1679, 1552, 1583, 1719,
173811
- /* 450 */ 1720, 1544, 48, 2013, 2016, 2001, 1864, 2014, 2012, 2007,
173812
- /* 460 */ 2008, 1894, 1886, 1908, 2015, 2015, 2017, 1900, 2023, 1901,
173813
- /* 470 */ 2030, 2046, 1906, 1919, 2015, 1920, 1990, 2018, 2015, 1902,
173814
- /* 480 */ 1999, 2003, 2004, 2005, 1924, 1943, 2026, 1922, 2060, 2057,
173815
- /* 490 */ 2042, 1950, 1907, 1998, 2044, 2002, 1992, 2035, 1936, 1963,
173816
- /* 500 */ 2055, 2061, 2063, 1949, 1958, 2062, 2019, 2065, 2066, 2067,
173817
- /* 510 */ 2069, 2022, 2033, 2070, 1989, 2068, 2071, 2028, 2072, 2074,
173818
- /* 520 */ 2064, 1951, 2077, 2079, 2080, 2081, 2082, 2085, 2011, 1969,
173819
- /* 530 */ 2088, 2089, 1988, 2083, 2091, 1971, 2090, 2084, 2086, 2087,
173820
- /* 540 */ 2092, 2031, 2041, 2036, 2093, 2048, 2032, 2094, 2101, 2105,
173821
- /* 550 */ 2106, 2104, 2107, 2097, 1991, 1994, 2111, 2090, 2112, 2115,
173822
- /* 560 */ 2116, 2118, 2117, 2119, 2120, 2123, 2130, 2124, 2125, 2126,
173823
- /* 570 */ 2127, 2129, 2131, 2132, 2020, 2021, 2024, 2025, 2133, 2136,
173824
- /* 580 */ 2137, 2147, 2153,
174061
+ /* 0 */ 2029, 1801, 2043, 1380, 1380, 33, 391, 1496, 1569, 1642,
174062
+ /* 10 */ 702, 702, 702, 193, 33, 33, 33, 33, 33, 0,
174063
+ /* 20 */ 0, 216, 1177, 702, 702, 702, 702, 702, 702, 702,
174064
+ /* 30 */ 702, 702, 702, 702, 702, 702, 702, 702, 406, 406,
174065
+ /* 40 */ 111, 111, 218, 447, 547, 598, 598, 260, 260, 260,
174066
+ /* 50 */ 260, 40, 112, 320, 340, 445, 489, 593, 637, 741,
174067
+ /* 60 */ 785, 889, 909, 1023, 1043, 1157, 1177, 1177, 1177, 1177,
174068
+ /* 70 */ 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177,
174069
+ /* 80 */ 1177, 1177, 1177, 1177, 1197, 1177, 1301, 1321, 1321, 554,
174070
+ /* 90 */ 1802, 1910, 702, 702, 702, 702, 702, 702, 702, 702,
174071
+ /* 100 */ 702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
174072
+ /* 110 */ 702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
174073
+ /* 120 */ 702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
174074
+ /* 130 */ 702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
174075
+ /* 140 */ 702, 702, 138, 198, 198, 198, 198, 198, 198, 198,
174076
+ /* 150 */ 183, 99, 236, 292, 598, 793, 167, 598, 598, 880,
174077
+ /* 160 */ 880, 598, 857, 150, 195, 195, 195, 264, 113, 113,
174078
+ /* 170 */ 2207, 2207, 854, 854, 854, 751, 765, 765, 765, 765,
174079
+ /* 180 */ 1096, 1096, 725, 292, 882, 904, 598, 598, 598, 598,
174080
+ /* 190 */ 598, 598, 598, 598, 598, 598, 598, 598, 598, 598,
174081
+ /* 200 */ 598, 598, 598, 598, 598, 1273, 1032, 1032, 598, 147,
174082
+ /* 210 */ 1098, 1098, 603, 603, 1276, 1276, 363, 2207, 2207, 2207,
174083
+ /* 220 */ 2207, 2207, 2207, 2207, 469, 617, 617, 801, 336, 461,
174084
+ /* 230 */ 804, 864, 615, 891, 913, 598, 598, 598, 598, 598,
174085
+ /* 240 */ 598, 598, 598, 598, 598, 653, 598, 598, 598, 598,
174086
+ /* 250 */ 598, 598, 598, 598, 598, 598, 598, 598, 1105, 1105,
174087
+ /* 260 */ 1105, 598, 598, 598, 1194, 598, 598, 598, 1215, 1249,
174088
+ /* 270 */ 598, 1353, 598, 598, 598, 598, 598, 598, 598, 598,
174089
+ /* 280 */ 677, 449, 902, 1338, 1338, 1338, 1338, 1248, 902, 902,
174090
+ /* 290 */ 326, 1151, 1047, 755, 749, 1371, 960, 1371, 1007, 1162,
174091
+ /* 300 */ 749, 749, 1162, 749, 960, 1007, 1274, 738, 215, 1300,
174092
+ /* 310 */ 1300, 1300, 1395, 1395, 1395, 1395, 1368, 1368, 1033, 1414,
174093
+ /* 320 */ 1387, 1361, 1759, 1759, 1685, 1685, 1792, 1792, 1685, 1683,
174094
+ /* 330 */ 1686, 1814, 1797, 1825, 1825, 1825, 1825, 1685, 1836, 1707,
174095
+ /* 340 */ 1686, 1686, 1707, 1814, 1797, 1707, 1797, 1707, 1685, 1836,
174096
+ /* 350 */ 1710, 1807, 1685, 1836, 1854, 1685, 1836, 1685, 1836, 1854,
174097
+ /* 360 */ 1769, 1769, 1769, 1822, 1870, 1870, 1854, 1769, 1766, 1769,
174098
+ /* 370 */ 1822, 1769, 1769, 1729, 1873, 1785, 1785, 1854, 1685, 1823,
174099
+ /* 380 */ 1823, 1840, 1840, 1778, 1782, 1909, 1685, 1779, 1778, 1789,
174100
+ /* 390 */ 1800, 1707, 1919, 1939, 1939, 1948, 1948, 1948, 2207, 2207,
174101
+ /* 400 */ 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
174102
+ /* 410 */ 2207, 2207, 2207, 69, 1037, 79, 1088, 651, 1196, 1415,
174103
+ /* 420 */ 1501, 1439, 1369, 1452, 911, 1211, 1524, 1469, 1551, 1567,
174104
+ /* 430 */ 1570, 1624, 1640, 1644, 1499, 1440, 1572, 1464, 1597, 275,
174105
+ /* 440 */ 782, 1586, 1648, 1678, 1553, 1682, 1687, 1388, 1502, 1696,
174106
+ /* 450 */ 1706, 1588, 1486, 1971, 1975, 1957, 1820, 1972, 1973, 1965,
174107
+ /* 460 */ 1967, 1851, 1841, 1861, 1969, 1969, 1974, 1852, 1976, 1855,
174108
+ /* 470 */ 1981, 1998, 1858, 1871, 1969, 1872, 1942, 1968, 1969, 1856,
174109
+ /* 480 */ 1952, 1953, 1955, 1956, 1881, 1896, 1980, 1874, 2014, 2015,
174110
+ /* 490 */ 1997, 1905, 1860, 1954, 1999, 1964, 1950, 1994, 1894, 1921,
174111
+ /* 500 */ 2020, 2018, 2026, 1915, 1923, 2028, 1984, 2036, 2040, 2047,
174112
+ /* 510 */ 2041, 2003, 2012, 2050, 1979, 2049, 2056, 2011, 2044, 2057,
174113
+ /* 520 */ 2048, 1934, 2063, 2064, 2065, 2061, 2066, 2068, 1993, 1959,
174114
+ /* 530 */ 2069, 2071, 1978, 2062, 2075, 1958, 2073, 2070, 2072, 2076,
174115
+ /* 540 */ 2078, 2010, 2027, 2022, 2074, 2031, 2019, 2081, 2082, 2094,
174116
+ /* 550 */ 2093, 2095, 2096, 2085, 1983, 1986, 2100, 2073, 2101, 2104,
174117
+ /* 560 */ 2107, 2109, 2108, 2110, 2111, 2114, 2121, 2115, 2116, 2117,
174118
+ /* 570 */ 2118, 2122, 2123, 2124, 2007, 2004, 2005, 2006, 2125, 2128,
174119
+ /* 580 */ 2137, 2138, 2152,
173825174120
};
173826174121
#define YY_REDUCE_COUNT (412)
173827
-#define YY_REDUCE_MIN (-275)
173828
-#define YY_REDUCE_MAX (1814)
174122
+#define YY_REDUCE_MIN (-276)
174123
+#define YY_REDUCE_MAX (1775)
173829174124
static const short yy_reduce_ofst[] = {
173830
- /* 0 */ -71, 194, 343, 787, -180, -177, 738, -194, -188, -185,
173831
- /* 10 */ -183, 82, 183, -65, 133, 245, 346, 407, 458, -178,
173832
- /* 20 */ 75, -275, -4, 310, 312, 489, 575, 596, 463, 686,
173833
- /* 30 */ 707, 777, 782, 812, 840, 796, 881, 938, 888, 992,
173834
- /* 40 */ 86, 448, 952, 680, 681, 843, 892, 623, 687, 623,
173835
- /* 50 */ 687, -261, -261, -261, -261, -261, -261, -261, -261, -261,
173836
- /* 60 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
173837
- /* 70 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
173838
- /* 80 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, 391,
173839
- /* 90 */ 967, 1027, 1085, 1103, 1105, 1110, 1130, 1150, 1170, 1172,
173840
- /* 100 */ 1176, 1180, 1185, 1188, 1206, 1236, 1238, 1241, 1243, 1245,
173841
- /* 110 */ 1249, 1252, 1258, 1278, 1280, 1287, 1289, 1293, 1295, 1314,
173842
- /* 120 */ 1340, 1354, 1358, 1360, 1412, 1425, 1446, 1450, 1452, 1507,
173843
- /* 130 */ 1515, 1532, 1543, 1547, 1563, 1577, 1585, 1597, 1607, 1611,
173844
- /* 140 */ 1625, 1633, -261, -261, -261, -261, -261, -261, -261, -261,
173845
- /* 150 */ -261, -261, -261, -186, -117, 260, 263, 460, 515, -74,
173846
- /* 160 */ 545, -181, -261, 1087, 176, 274, 338, 676, -261, -261,
173847
- /* 170 */ -261, -261, -212, -212, -212, -184, 149, 668, 786, 804,
173848
- /* 180 */ 265, 419, -254, 516, 529, 529, -11, -129, 184, 488,
173849
- /* 190 */ 838, 956, 960, 984, 403, 616, 897, 618, 999, 949,
173850
- /* 200 */ 1139, 1007, 490, 778, 1142, 834, 733, 841, -189, 1049,
173851
- /* 210 */ 968, 1025, 1083, 1084, 1121, 1182, 46, 1094, 1226, 1228,
173852
- /* 220 */ 1246, 1247, 1127, 1288, -210, -190, -176, -115, 117, 262,
173853
- /* 230 */ 376, 470, 511, 514, 520, 579, 600, 708, 727, 996,
173854
- /* 240 */ 1003, 1138, 1189, 1284, 1307, 1250, 1334, 1343, 1347, 1410,
173855
- /* 250 */ 1414, 1424, 1428, 1431, 1434, 1445, 1462, 1466, 1421, 1439,
173856
- /* 260 */ 1444, 1487, 1491, 1492, 1395, 1493, 1499, 1512, 1458, 1418,
173857
- /* 270 */ 1522, 1498, 1546, 376, 1553, 1558, 1559, 1560, 1561, 1564,
173858
- /* 280 */ 1472, 1483, 1530, 1517, 1518, 1521, 1525, 1395, 1530, 1530,
173859
- /* 290 */ 1533, 1570, 1595, 1489, 1524, 1535, 1566, 1538, 1494, 1571,
173860
- /* 300 */ 1548, 1549, 1579, 1557, 1574, 1536, 1569, 1603, 1567, 1614,
173861
- /* 310 */ 1616, 1617, 1578, 1580, 1591, 1592, 1588, 1594, 1572, 1609,
173862
- /* 320 */ 1612, 1660, 1562, 1568, 1659, 1661, 1576, 1581, 1664, 1589,
173863
- /* 330 */ 1602, 1618, 1644, 1650, 1651, 1653, 1662, 1696, 1701, 1656,
173864
- /* 340 */ 1631, 1632, 1663, 1635, 1673, 1666, 1676, 1668, 1708, 1716,
173865
- /* 350 */ 1636, 1638, 1724, 1726, 1709, 1729, 1732, 1733, 1735, 1711,
173866
- /* 360 */ 1722, 1725, 1727, 1714, 1728, 1730, 1734, 1731, 1736, 1739,
173867
- /* 370 */ 1721, 1740, 1742, 1647, 1657, 1682, 1683, 1746, 1768, 1652,
173868
- /* 380 */ 1654, 1706, 1712, 1737, 1741, 1702, 1781, 1703, 1743, 1738,
173869
- /* 390 */ 1744, 1748, 1790, 1802, 1803, 1807, 1808, 1809, 1698, 1699,
173870
- /* 400 */ 1704, 1797, 1793, 1794, 1795, 1796, 1804, 1788, 1791, 1801,
173871
- /* 410 */ 1811, 1799, 1814,
174125
+ /* 0 */ -66, 217, -63, -177, -180, 161, 364, 64, -183, 162,
174126
+ /* 10 */ 223, 367, 414, -173, 473, 514, 525, 622, 626, -207,
174127
+ /* 20 */ 351, -276, -38, 693, 811, 831, 833, 888, -188, 945,
174128
+ /* 30 */ 947, 416, 558, 951, 867, 287, 1078, 1080, -186, 224,
174129
+ /* 40 */ -132, 42, 964, 269, 417, 796, 810, -237, -231, -237,
174130
+ /* 50 */ -231, -45, -45, -45, -45, -45, -45, -45, -45, -45,
174131
+ /* 60 */ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
174132
+ /* 70 */ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
174133
+ /* 80 */ -45, -45, -45, -45, -45, -45, -45, -45, -45, 895,
174134
+ /* 90 */ 925, 967, 980, 1100, 1143, 1169, 1203, 1225, 1228, 1242,
174135
+ /* 100 */ 1247, 1250, 1253, 1255, 1261, 1267, 1272, 1275, 1283, 1286,
174136
+ /* 110 */ 1288, 1292, 1333, 1335, 1347, 1349, 1352, 1354, 1360, 1366,
174137
+ /* 120 */ 1381, 1391, 1406, 1408, 1413, 1416, 1418, 1422, 1425, 1427,
174138
+ /* 130 */ 1463, 1465, 1472, 1478, 1480, 1491, 1498, 1500, 1517, 1519,
174139
+ /* 140 */ 1528, 1536, -45, -45, -45, -45, -45, -45, -45, -45,
174140
+ /* 150 */ -45, -45, -45, 312, -158, 285, -219, 9, 166, 370,
174141
+ /* 160 */ 545, 707, -45, 930, 601, 963, 1067, 792, -45, -45,
174142
+ /* 170 */ -45, -45, -204, -204, -204, 369, -171, -129, 632, 678,
174143
+ /* 180 */ 202, 352, -270, 412, 627, 627, -9, 122, 415, 419,
174144
+ /* 190 */ -56, 248, 583, 920, 6, 261, 459, 795, 1049, 813,
174145
+ /* 200 */ 1062, 1082, -161, 778, 1063, 797, 870, 1003, 1128, 443,
174146
+ /* 210 */ 1031, 1072, 1191, 1192, 957, 1120, 105, 1149, 523, 933,
174147
+ /* 220 */ 1218, 1238, 1254, 1251, -138, 96, 117, 146, 181, 277,
174148
+ /* 230 */ 280, 421, 480, 712, 830, 850, 1085, 1099, 1129, 1209,
174149
+ /* 240 */ 1323, 1331, 1336, 1364, 1407, 368, 1412, 1433, 1438, 1474,
174150
+ /* 250 */ 1481, 1505, 1506, 1526, 1538, 1544, 1545, 1546, 722, 764,
174151
+ /* 260 */ 856, 1547, 1548, 1550, 1188, 1554, 1557, 1561, 1298, 1260,
174152
+ /* 270 */ 1562, 1456, 1564, 280, 1568, 1571, 1573, 1574, 1575, 1576,
174153
+ /* 280 */ 1457, 1477, 1520, 1514, 1515, 1516, 1518, 1188, 1520, 1520,
174154
+ /* 290 */ 1530, 1563, 1584, 1482, 1504, 1510, 1534, 1513, 1488, 1537,
174155
+ /* 300 */ 1512, 1521, 1539, 1522, 1541, 1493, 1583, 1559, 1565, 1585,
174156
+ /* 310 */ 1587, 1589, 1529, 1531, 1532, 1549, 1558, 1566, 1535, 1577,
174157
+ /* 320 */ 1582, 1622, 1533, 1540, 1627, 1628, 1552, 1555, 1633, 1560,
174158
+ /* 330 */ 1578, 1581, 1607, 1606, 1608, 1609, 1611, 1649, 1655, 1612,
174159
+ /* 340 */ 1590, 1591, 1613, 1594, 1621, 1614, 1623, 1616, 1666, 1668,
174160
+ /* 350 */ 1579, 1593, 1672, 1675, 1656, 1676, 1679, 1680, 1688, 1660,
174161
+ /* 360 */ 1667, 1670, 1671, 1663, 1669, 1673, 1674, 1689, 1681, 1692,
174162
+ /* 370 */ 1677, 1693, 1694, 1592, 1599, 1617, 1620, 1700, 1713, 1596,
174163
+ /* 380 */ 1598, 1658, 1659, 1691, 1684, 1654, 1735, 1664, 1697, 1690,
174164
+ /* 390 */ 1701, 1703, 1748, 1758, 1760, 1768, 1770, 1772, 1657, 1661,
174165
+ /* 400 */ 1665, 1761, 1754, 1757, 1762, 1763, 1764, 1750, 1751, 1765,
174166
+ /* 410 */ 1771, 1767, 1775,
173872174167
};
173873174168
static const YYACTIONTYPE yy_default[] = {
173874174169
/* 0 */ 1663, 1663, 1663, 1491, 1254, 1367, 1254, 1254, 1254, 1254,
173875174170
/* 10 */ 1491, 1491, 1491, 1254, 1254, 1254, 1254, 1254, 1254, 1397,
173876174171
/* 20 */ 1397, 1544, 1287, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
@@ -173949,56 +174244,57 @@
173949174244
*/
173950174245
#ifdef YYFALLBACK
173951174246
static const YYCODETYPE yyFallback[] = {
173952174247
0, /* $ => nothing */
173953174248
0, /* SEMI => nothing */
173954
- 59, /* EXPLAIN => ID */
173955
- 59, /* QUERY => ID */
173956
- 59, /* PLAN => ID */
173957
- 59, /* BEGIN => ID */
174249
+ 60, /* EXPLAIN => ID */
174250
+ 60, /* QUERY => ID */
174251
+ 60, /* PLAN => ID */
174252
+ 60, /* BEGIN => ID */
173958174253
0, /* TRANSACTION => nothing */
173959
- 59, /* DEFERRED => ID */
173960
- 59, /* IMMEDIATE => ID */
173961
- 59, /* EXCLUSIVE => ID */
174254
+ 60, /* DEFERRED => ID */
174255
+ 60, /* IMMEDIATE => ID */
174256
+ 60, /* EXCLUSIVE => ID */
173962174257
0, /* COMMIT => nothing */
173963
- 59, /* END => ID */
173964
- 59, /* ROLLBACK => ID */
173965
- 59, /* SAVEPOINT => ID */
173966
- 59, /* RELEASE => ID */
174258
+ 60, /* END => ID */
174259
+ 60, /* ROLLBACK => ID */
174260
+ 60, /* SAVEPOINT => ID */
174261
+ 60, /* RELEASE => ID */
173967174262
0, /* TO => nothing */
173968174263
0, /* TABLE => nothing */
173969174264
0, /* CREATE => nothing */
173970
- 59, /* IF => ID */
174265
+ 60, /* IF => ID */
173971174266
0, /* NOT => nothing */
173972174267
0, /* EXISTS => nothing */
173973
- 59, /* TEMP => ID */
174268
+ 60, /* TEMP => ID */
173974174269
0, /* LP => nothing */
173975174270
0, /* RP => nothing */
173976174271
0, /* AS => nothing */
173977174272
0, /* COMMA => nothing */
173978
- 59, /* WITHOUT => ID */
173979
- 59, /* ABORT => ID */
173980
- 59, /* ACTION => ID */
173981
- 59, /* AFTER => ID */
173982
- 59, /* ANALYZE => ID */
173983
- 59, /* ASC => ID */
173984
- 59, /* ATTACH => ID */
173985
- 59, /* BEFORE => ID */
173986
- 59, /* BY => ID */
173987
- 59, /* CASCADE => ID */
173988
- 59, /* CAST => ID */
173989
- 59, /* CONFLICT => ID */
173990
- 59, /* DATABASE => ID */
173991
- 59, /* DESC => ID */
173992
- 59, /* DETACH => ID */
173993
- 59, /* EACH => ID */
173994
- 59, /* FAIL => ID */
174273
+ 60, /* WITHOUT => ID */
174274
+ 60, /* ABORT => ID */
174275
+ 60, /* ACTION => ID */
174276
+ 60, /* AFTER => ID */
174277
+ 60, /* ANALYZE => ID */
174278
+ 60, /* ASC => ID */
174279
+ 60, /* ATTACH => ID */
174280
+ 60, /* BEFORE => ID */
174281
+ 60, /* BY => ID */
174282
+ 60, /* CASCADE => ID */
174283
+ 60, /* CAST => ID */
174284
+ 60, /* CONFLICT => ID */
174285
+ 60, /* DATABASE => ID */
174286
+ 60, /* DESC => ID */
174287
+ 60, /* DETACH => ID */
174288
+ 60, /* EACH => ID */
174289
+ 60, /* FAIL => ID */
173995174290
0, /* OR => nothing */
173996174291
0, /* AND => nothing */
173997174292
0, /* IS => nothing */
173998
- 59, /* MATCH => ID */
173999
- 59, /* LIKE_KW => ID */
174293
+ 0, /* ISNOT => nothing */
174294
+ 60, /* MATCH => ID */
174295
+ 60, /* LIKE_KW => ID */
174000174296
0, /* BETWEEN => nothing */
174001174297
0, /* IN => nothing */
174002174298
0, /* ISNULL => nothing */
174003174299
0, /* NOTNULL => nothing */
174004174300
0, /* NE => nothing */
@@ -174007,51 +174303,51 @@
174007174303
0, /* LE => nothing */
174008174304
0, /* LT => nothing */
174009174305
0, /* GE => nothing */
174010174306
0, /* ESCAPE => nothing */
174011174307
0, /* ID => nothing */
174012
- 59, /* COLUMNKW => ID */
174013
- 59, /* DO => ID */
174014
- 59, /* FOR => ID */
174015
- 59, /* IGNORE => ID */
174016
- 59, /* INITIALLY => ID */
174017
- 59, /* INSTEAD => ID */
174018
- 59, /* NO => ID */
174019
- 59, /* KEY => ID */
174020
- 59, /* OF => ID */
174021
- 59, /* OFFSET => ID */
174022
- 59, /* PRAGMA => ID */
174023
- 59, /* RAISE => ID */
174024
- 59, /* RECURSIVE => ID */
174025
- 59, /* REPLACE => ID */
174026
- 59, /* RESTRICT => ID */
174027
- 59, /* ROW => ID */
174028
- 59, /* ROWS => ID */
174029
- 59, /* TRIGGER => ID */
174030
- 59, /* VACUUM => ID */
174031
- 59, /* VIEW => ID */
174032
- 59, /* VIRTUAL => ID */
174033
- 59, /* WITH => ID */
174034
- 59, /* NULLS => ID */
174035
- 59, /* FIRST => ID */
174036
- 59, /* LAST => ID */
174037
- 59, /* CURRENT => ID */
174038
- 59, /* FOLLOWING => ID */
174039
- 59, /* PARTITION => ID */
174040
- 59, /* PRECEDING => ID */
174041
- 59, /* RANGE => ID */
174042
- 59, /* UNBOUNDED => ID */
174043
- 59, /* EXCLUDE => ID */
174044
- 59, /* GROUPS => ID */
174045
- 59, /* OTHERS => ID */
174046
- 59, /* TIES => ID */
174047
- 59, /* GENERATED => ID */
174048
- 59, /* ALWAYS => ID */
174049
- 59, /* MATERIALIZED => ID */
174050
- 59, /* REINDEX => ID */
174051
- 59, /* RENAME => ID */
174052
- 59, /* CTIME_KW => ID */
174308
+ 60, /* COLUMNKW => ID */
174309
+ 60, /* DO => ID */
174310
+ 60, /* FOR => ID */
174311
+ 60, /* IGNORE => ID */
174312
+ 60, /* INITIALLY => ID */
174313
+ 60, /* INSTEAD => ID */
174314
+ 60, /* NO => ID */
174315
+ 60, /* KEY => ID */
174316
+ 60, /* OF => ID */
174317
+ 60, /* OFFSET => ID */
174318
+ 60, /* PRAGMA => ID */
174319
+ 60, /* RAISE => ID */
174320
+ 60, /* RECURSIVE => ID */
174321
+ 60, /* REPLACE => ID */
174322
+ 60, /* RESTRICT => ID */
174323
+ 60, /* ROW => ID */
174324
+ 60, /* ROWS => ID */
174325
+ 60, /* TRIGGER => ID */
174326
+ 60, /* VACUUM => ID */
174327
+ 60, /* VIEW => ID */
174328
+ 60, /* VIRTUAL => ID */
174329
+ 60, /* WITH => ID */
174330
+ 60, /* NULLS => ID */
174331
+ 60, /* FIRST => ID */
174332
+ 60, /* LAST => ID */
174333
+ 60, /* CURRENT => ID */
174334
+ 60, /* FOLLOWING => ID */
174335
+ 60, /* PARTITION => ID */
174336
+ 60, /* PRECEDING => ID */
174337
+ 60, /* RANGE => ID */
174338
+ 60, /* UNBOUNDED => ID */
174339
+ 60, /* EXCLUDE => ID */
174340
+ 60, /* GROUPS => ID */
174341
+ 60, /* OTHERS => ID */
174342
+ 60, /* TIES => ID */
174343
+ 60, /* GENERATED => ID */
174344
+ 60, /* ALWAYS => ID */
174345
+ 60, /* MATERIALIZED => ID */
174346
+ 60, /* REINDEX => ID */
174347
+ 60, /* RENAME => ID */
174348
+ 60, /* CTIME_KW => ID */
174053174349
0, /* ANY => nothing */
174054174350
0, /* BITAND => nothing */
174055174351
0, /* BITOR => nothing */
174056174352
0, /* LSHIFT => nothing */
174057174353
0, /* RSHIFT => nothing */
@@ -174118,11 +174414,10 @@
174118174414
0, /* FILTER => nothing */
174119174415
0, /* COLUMN => nothing */
174120174416
0, /* AGG_FUNCTION => nothing */
174121174417
0, /* AGG_COLUMN => nothing */
174122174418
0, /* TRUEFALSE => nothing */
174123
- 0, /* ISNOT => nothing */
174124174419
0, /* FUNCTION => nothing */
174125174420
0, /* UPLUS => nothing */
174126174421
0, /* UMINUS => nothing */
174127174422
0, /* TRUTH => nothing */
174128174423
0, /* REGISTER => nothing */
@@ -174262,136 +174557,136 @@
174262174557
/* 41 */ "EACH",
174263174558
/* 42 */ "FAIL",
174264174559
/* 43 */ "OR",
174265174560
/* 44 */ "AND",
174266174561
/* 45 */ "IS",
174267
- /* 46 */ "MATCH",
174268
- /* 47 */ "LIKE_KW",
174269
- /* 48 */ "BETWEEN",
174270
- /* 49 */ "IN",
174271
- /* 50 */ "ISNULL",
174272
- /* 51 */ "NOTNULL",
174273
- /* 52 */ "NE",
174274
- /* 53 */ "EQ",
174275
- /* 54 */ "GT",
174276
- /* 55 */ "LE",
174277
- /* 56 */ "LT",
174278
- /* 57 */ "GE",
174279
- /* 58 */ "ESCAPE",
174280
- /* 59 */ "ID",
174281
- /* 60 */ "COLUMNKW",
174282
- /* 61 */ "DO",
174283
- /* 62 */ "FOR",
174284
- /* 63 */ "IGNORE",
174285
- /* 64 */ "INITIALLY",
174286
- /* 65 */ "INSTEAD",
174287
- /* 66 */ "NO",
174288
- /* 67 */ "KEY",
174289
- /* 68 */ "OF",
174290
- /* 69 */ "OFFSET",
174291
- /* 70 */ "PRAGMA",
174292
- /* 71 */ "RAISE",
174293
- /* 72 */ "RECURSIVE",
174294
- /* 73 */ "REPLACE",
174295
- /* 74 */ "RESTRICT",
174296
- /* 75 */ "ROW",
174297
- /* 76 */ "ROWS",
174298
- /* 77 */ "TRIGGER",
174299
- /* 78 */ "VACUUM",
174300
- /* 79 */ "VIEW",
174301
- /* 80 */ "VIRTUAL",
174302
- /* 81 */ "WITH",
174303
- /* 82 */ "NULLS",
174304
- /* 83 */ "FIRST",
174305
- /* 84 */ "LAST",
174306
- /* 85 */ "CURRENT",
174307
- /* 86 */ "FOLLOWING",
174308
- /* 87 */ "PARTITION",
174309
- /* 88 */ "PRECEDING",
174310
- /* 89 */ "RANGE",
174311
- /* 90 */ "UNBOUNDED",
174312
- /* 91 */ "EXCLUDE",
174313
- /* 92 */ "GROUPS",
174314
- /* 93 */ "OTHERS",
174315
- /* 94 */ "TIES",
174316
- /* 95 */ "GENERATED",
174317
- /* 96 */ "ALWAYS",
174318
- /* 97 */ "MATERIALIZED",
174319
- /* 98 */ "REINDEX",
174320
- /* 99 */ "RENAME",
174321
- /* 100 */ "CTIME_KW",
174322
- /* 101 */ "ANY",
174323
- /* 102 */ "BITAND",
174324
- /* 103 */ "BITOR",
174325
- /* 104 */ "LSHIFT",
174326
- /* 105 */ "RSHIFT",
174327
- /* 106 */ "PLUS",
174328
- /* 107 */ "MINUS",
174329
- /* 108 */ "STAR",
174330
- /* 109 */ "SLASH",
174331
- /* 110 */ "REM",
174332
- /* 111 */ "CONCAT",
174333
- /* 112 */ "PTR",
174334
- /* 113 */ "COLLATE",
174335
- /* 114 */ "BITNOT",
174336
- /* 115 */ "ON",
174337
- /* 116 */ "INDEXED",
174338
- /* 117 */ "STRING",
174339
- /* 118 */ "JOIN_KW",
174340
- /* 119 */ "CONSTRAINT",
174341
- /* 120 */ "DEFAULT",
174342
- /* 121 */ "NULL",
174343
- /* 122 */ "PRIMARY",
174344
- /* 123 */ "UNIQUE",
174345
- /* 124 */ "CHECK",
174346
- /* 125 */ "REFERENCES",
174347
- /* 126 */ "AUTOINCR",
174348
- /* 127 */ "INSERT",
174349
- /* 128 */ "DELETE",
174350
- /* 129 */ "UPDATE",
174351
- /* 130 */ "SET",
174352
- /* 131 */ "DEFERRABLE",
174353
- /* 132 */ "FOREIGN",
174354
- /* 133 */ "DROP",
174355
- /* 134 */ "UNION",
174356
- /* 135 */ "ALL",
174357
- /* 136 */ "EXCEPT",
174358
- /* 137 */ "INTERSECT",
174359
- /* 138 */ "SELECT",
174360
- /* 139 */ "VALUES",
174361
- /* 140 */ "DISTINCT",
174362
- /* 141 */ "DOT",
174363
- /* 142 */ "FROM",
174364
- /* 143 */ "JOIN",
174365
- /* 144 */ "USING",
174366
- /* 145 */ "ORDER",
174367
- /* 146 */ "GROUP",
174368
- /* 147 */ "HAVING",
174369
- /* 148 */ "LIMIT",
174370
- /* 149 */ "WHERE",
174371
- /* 150 */ "RETURNING",
174372
- /* 151 */ "INTO",
174373
- /* 152 */ "NOTHING",
174374
- /* 153 */ "FLOAT",
174375
- /* 154 */ "BLOB",
174376
- /* 155 */ "INTEGER",
174377
- /* 156 */ "VARIABLE",
174378
- /* 157 */ "CASE",
174379
- /* 158 */ "WHEN",
174380
- /* 159 */ "THEN",
174381
- /* 160 */ "ELSE",
174382
- /* 161 */ "INDEX",
174383
- /* 162 */ "ALTER",
174384
- /* 163 */ "ADD",
174385
- /* 164 */ "WINDOW",
174386
- /* 165 */ "OVER",
174387
- /* 166 */ "FILTER",
174388
- /* 167 */ "COLUMN",
174389
- /* 168 */ "AGG_FUNCTION",
174390
- /* 169 */ "AGG_COLUMN",
174391
- /* 170 */ "TRUEFALSE",
174392
- /* 171 */ "ISNOT",
174562
+ /* 46 */ "ISNOT",
174563
+ /* 47 */ "MATCH",
174564
+ /* 48 */ "LIKE_KW",
174565
+ /* 49 */ "BETWEEN",
174566
+ /* 50 */ "IN",
174567
+ /* 51 */ "ISNULL",
174568
+ /* 52 */ "NOTNULL",
174569
+ /* 53 */ "NE",
174570
+ /* 54 */ "EQ",
174571
+ /* 55 */ "GT",
174572
+ /* 56 */ "LE",
174573
+ /* 57 */ "LT",
174574
+ /* 58 */ "GE",
174575
+ /* 59 */ "ESCAPE",
174576
+ /* 60 */ "ID",
174577
+ /* 61 */ "COLUMNKW",
174578
+ /* 62 */ "DO",
174579
+ /* 63 */ "FOR",
174580
+ /* 64 */ "IGNORE",
174581
+ /* 65 */ "INITIALLY",
174582
+ /* 66 */ "INSTEAD",
174583
+ /* 67 */ "NO",
174584
+ /* 68 */ "KEY",
174585
+ /* 69 */ "OF",
174586
+ /* 70 */ "OFFSET",
174587
+ /* 71 */ "PRAGMA",
174588
+ /* 72 */ "RAISE",
174589
+ /* 73 */ "RECURSIVE",
174590
+ /* 74 */ "REPLACE",
174591
+ /* 75 */ "RESTRICT",
174592
+ /* 76 */ "ROW",
174593
+ /* 77 */ "ROWS",
174594
+ /* 78 */ "TRIGGER",
174595
+ /* 79 */ "VACUUM",
174596
+ /* 80 */ "VIEW",
174597
+ /* 81 */ "VIRTUAL",
174598
+ /* 82 */ "WITH",
174599
+ /* 83 */ "NULLS",
174600
+ /* 84 */ "FIRST",
174601
+ /* 85 */ "LAST",
174602
+ /* 86 */ "CURRENT",
174603
+ /* 87 */ "FOLLOWING",
174604
+ /* 88 */ "PARTITION",
174605
+ /* 89 */ "PRECEDING",
174606
+ /* 90 */ "RANGE",
174607
+ /* 91 */ "UNBOUNDED",
174608
+ /* 92 */ "EXCLUDE",
174609
+ /* 93 */ "GROUPS",
174610
+ /* 94 */ "OTHERS",
174611
+ /* 95 */ "TIES",
174612
+ /* 96 */ "GENERATED",
174613
+ /* 97 */ "ALWAYS",
174614
+ /* 98 */ "MATERIALIZED",
174615
+ /* 99 */ "REINDEX",
174616
+ /* 100 */ "RENAME",
174617
+ /* 101 */ "CTIME_KW",
174618
+ /* 102 */ "ANY",
174619
+ /* 103 */ "BITAND",
174620
+ /* 104 */ "BITOR",
174621
+ /* 105 */ "LSHIFT",
174622
+ /* 106 */ "RSHIFT",
174623
+ /* 107 */ "PLUS",
174624
+ /* 108 */ "MINUS",
174625
+ /* 109 */ "STAR",
174626
+ /* 110 */ "SLASH",
174627
+ /* 111 */ "REM",
174628
+ /* 112 */ "CONCAT",
174629
+ /* 113 */ "PTR",
174630
+ /* 114 */ "COLLATE",
174631
+ /* 115 */ "BITNOT",
174632
+ /* 116 */ "ON",
174633
+ /* 117 */ "INDEXED",
174634
+ /* 118 */ "STRING",
174635
+ /* 119 */ "JOIN_KW",
174636
+ /* 120 */ "CONSTRAINT",
174637
+ /* 121 */ "DEFAULT",
174638
+ /* 122 */ "NULL",
174639
+ /* 123 */ "PRIMARY",
174640
+ /* 124 */ "UNIQUE",
174641
+ /* 125 */ "CHECK",
174642
+ /* 126 */ "REFERENCES",
174643
+ /* 127 */ "AUTOINCR",
174644
+ /* 128 */ "INSERT",
174645
+ /* 129 */ "DELETE",
174646
+ /* 130 */ "UPDATE",
174647
+ /* 131 */ "SET",
174648
+ /* 132 */ "DEFERRABLE",
174649
+ /* 133 */ "FOREIGN",
174650
+ /* 134 */ "DROP",
174651
+ /* 135 */ "UNION",
174652
+ /* 136 */ "ALL",
174653
+ /* 137 */ "EXCEPT",
174654
+ /* 138 */ "INTERSECT",
174655
+ /* 139 */ "SELECT",
174656
+ /* 140 */ "VALUES",
174657
+ /* 141 */ "DISTINCT",
174658
+ /* 142 */ "DOT",
174659
+ /* 143 */ "FROM",
174660
+ /* 144 */ "JOIN",
174661
+ /* 145 */ "USING",
174662
+ /* 146 */ "ORDER",
174663
+ /* 147 */ "GROUP",
174664
+ /* 148 */ "HAVING",
174665
+ /* 149 */ "LIMIT",
174666
+ /* 150 */ "WHERE",
174667
+ /* 151 */ "RETURNING",
174668
+ /* 152 */ "INTO",
174669
+ /* 153 */ "NOTHING",
174670
+ /* 154 */ "FLOAT",
174671
+ /* 155 */ "BLOB",
174672
+ /* 156 */ "INTEGER",
174673
+ /* 157 */ "VARIABLE",
174674
+ /* 158 */ "CASE",
174675
+ /* 159 */ "WHEN",
174676
+ /* 160 */ "THEN",
174677
+ /* 161 */ "ELSE",
174678
+ /* 162 */ "INDEX",
174679
+ /* 163 */ "ALTER",
174680
+ /* 164 */ "ADD",
174681
+ /* 165 */ "WINDOW",
174682
+ /* 166 */ "OVER",
174683
+ /* 167 */ "FILTER",
174684
+ /* 168 */ "COLUMN",
174685
+ /* 169 */ "AGG_FUNCTION",
174686
+ /* 170 */ "AGG_COLUMN",
174687
+ /* 171 */ "TRUEFALSE",
174393174688
/* 172 */ "FUNCTION",
174394174689
/* 173 */ "UPLUS",
174395174690
/* 174 */ "UMINUS",
174396174691
/* 175 */ "TRUTH",
174397174692
/* 176 */ "REGISTER",
@@ -236537,11 +236832,11 @@
236537236832
if( pConfig ){
236538236833
int i;
236539236834
if( pConfig->t.pTok ){
236540236835
pConfig->t.pTokApi->xDelete(pConfig->t.pTok);
236541236836
}
236542
- sqlite3_free(pConfig->t.azArg);
236837
+ sqlite3_free((char*)pConfig->t.azArg);
236543236838
sqlite3_free(pConfig->zDb);
236544236839
sqlite3_free(pConfig->zName);
236545236840
for(i=0; i<pConfig->nCol; i++){
236546236841
sqlite3_free(pConfig->azCol[i]);
236547236842
}
@@ -250352,15 +250647,15 @@
250352250647
** A > or >= against the rowid: ">"
250353250648
**
250354250649
** This function ensures that there is at most one "r" or "=". And that if
250355250650
** there exists an "=" then there is no "<" or ">".
250356250651
**
250652
+** If an unusable MATCH operator is present in the WHERE clause, then
250653
+** SQLITE_CONSTRAINT is returned.
250654
+**
250357250655
** Costs are assigned as follows:
250358250656
**
250359
-** a) If an unusable MATCH operator is present in the WHERE clause, the
250360
-** cost is unconditionally set to 1e50 (a really big number).
250361
-**
250362250657
** a) If a MATCH operator is present, the cost depends on the other
250363250658
** constraints also present. As follows:
250364250659
**
250365250660
** * No other constraints: cost=1000.0
250366250661
** * One rowid range constraint: cost=750.0
@@ -250388,11 +250683,11 @@
250388250683
int iCons = 0;
250389250684
250390250685
int bSeenEq = 0;
250391250686
int bSeenGt = 0;
250392250687
int bSeenLt = 0;
250393
- int bSeenMatch = 0;
250688
+ int nSeenMatch = 0;
250394250689
int bSeenRank = 0;
250395250690
250396250691
250397250692
assert( SQLITE_INDEX_CONSTRAINT_EQ<SQLITE_INDEX_CONSTRAINT_MATCH );
250398250693
assert( SQLITE_INDEX_CONSTRAINT_GT<SQLITE_INDEX_CONSTRAINT_MATCH );
@@ -250419,22 +250714,19 @@
250419250714
|| (p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol>=nCol)
250420250715
){
250421250716
/* A MATCH operator or equivalent */
250422250717
if( p->usable==0 || iCol<0 ){
250423250718
/* As there exists an unusable MATCH constraint this is an
250424
- ** unusable plan. Set a prohibitively high cost. */
250425
- pInfo->estimatedCost = 1e50;
250426
- assert( iIdxStr < pInfo->nConstraint*6 + 1 );
250427
- idxStr[iIdxStr] = 0;
250428
- return SQLITE_OK;
250719
+ ** unusable plan. Return SQLITE_CONSTRAINT. */
250720
+ return SQLITE_CONSTRAINT;
250429250721
}else{
250430250722
if( iCol==nCol+1 ){
250431250723
if( bSeenRank ) continue;
250432250724
idxStr[iIdxStr++] = 'r';
250433250725
bSeenRank = 1;
250434250726
}else if( iCol>=0 ){
250435
- bSeenMatch = 1;
250727
+ nSeenMatch++;
250436250728
idxStr[iIdxStr++] = 'M';
250437250729
sqlite3_snprintf(6, &idxStr[iIdxStr], "%d", iCol);
250438250730
idxStr += strlen(&idxStr[iIdxStr]);
250439250731
assert( idxStr[iIdxStr]=='\0' );
250440250732
}
@@ -250447,11 +250739,11 @@
250447250739
idxStr[iIdxStr++] = p->op==FTS5_PATTERN_LIKE ? 'L' : 'G';
250448250740
sqlite3_snprintf(6, &idxStr[iIdxStr], "%d", iCol);
250449250741
idxStr += strlen(&idxStr[iIdxStr]);
250450250742
pInfo->aConstraintUsage[i].argvIndex = ++iCons;
250451250743
assert( idxStr[iIdxStr]=='\0' );
250452
- bSeenMatch = 1;
250744
+ nSeenMatch++;
250453250745
}else if( bSeenEq==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol<0 ){
250454250746
idxStr[iIdxStr++] = '=';
250455250747
bSeenEq = 1;
250456250748
pInfo->aConstraintUsage[i].argvIndex = ++iCons;
250457250749
}
@@ -250484,11 +250776,11 @@
250484250776
**
250485250777
** Note that tokendata=1 tables cannot currently handle "ORDER BY rowid DESC".
250486250778
*/
250487250779
if( pInfo->nOrderBy==1 ){
250488250780
int iSort = pInfo->aOrderBy[0].iColumn;
250489
- if( iSort==(pConfig->nCol+1) && bSeenMatch ){
250781
+ if( iSort==(pConfig->nCol+1) && nSeenMatch>0 ){
250490250782
idxFlags |= FTS5_BI_ORDER_RANK;
250491250783
}else if( iSort==-1 && (!pInfo->aOrderBy[0].desc || !pConfig->bTokendata) ){
250492250784
idxFlags |= FTS5_BI_ORDER_ROWID;
250493250785
}
250494250786
if( BitFlagTest(idxFlags, FTS5_BI_ORDER_RANK|FTS5_BI_ORDER_ROWID) ){
@@ -250499,18 +250791,21 @@
250499250791
}
250500250792
}
250501250793
250502250794
/* Calculate the estimated cost based on the flags set in idxFlags. */
250503250795
if( bSeenEq ){
250504
- pInfo->estimatedCost = bSeenMatch ? 100.0 : 10.0;
250505
- if( bSeenMatch==0 ) fts5SetUniqueFlag(pInfo);
250796
+ pInfo->estimatedCost = nSeenMatch ? 1000.0 : 10.0;
250797
+ if( nSeenMatch==0 ) fts5SetUniqueFlag(pInfo);
250506250798
}else if( bSeenLt && bSeenGt ){
250507
- pInfo->estimatedCost = bSeenMatch ? 500.0 : 250000.0;
250799
+ pInfo->estimatedCost = nSeenMatch ? 5000.0 : 250000.0;
250508250800
}else if( bSeenLt || bSeenGt ){
250509
- pInfo->estimatedCost = bSeenMatch ? 750.0 : 750000.0;
250801
+ pInfo->estimatedCost = nSeenMatch ? 7500.0 : 750000.0;
250510250802
}else{
250511
- pInfo->estimatedCost = bSeenMatch ? 1000.0 : 1000000.0;
250803
+ pInfo->estimatedCost = nSeenMatch ? 10000.0 : 1000000.0;
250804
+ }
250805
+ for(i=1; i<nSeenMatch; i++){
250806
+ pInfo->estimatedCost *= 0.4;
250512250807
}
250513250808
250514250809
pInfo->idxNum = idxFlags;
250515250810
return SQLITE_OK;
250516250811
}
@@ -251522,10 +251817,11 @@
251522251817
"'delete' may not be used with a contentless_delete=1 table"
251523251818
);
251524251819
rc = SQLITE_ERROR;
251525251820
}else{
251526251821
rc = fts5SpecialDelete(pTab, apVal);
251822
+ bUpdateOrDelete = 1;
251527251823
}
251528251824
}else{
251529251825
rc = fts5SpecialInsert(pTab, z, apVal[2 + pConfig->nCol + 1]);
251530251826
}
251531251827
}else{
@@ -252775,11 +253071,11 @@
252775253071
int nArg, /* Number of args */
252776253072
sqlite3_value **apUnused /* Function arguments */
252777253073
){
252778253074
assert( nArg==0 );
252779253075
UNUSED_PARAM2(nArg, apUnused);
252780
- sqlite3_result_text(pCtx, "fts5: 2024-05-30 11:14:16 ee92fa8366b743266b17c692499087c0d11b9302d096c3dfb4e6356b467e939e", -1, SQLITE_TRANSIENT);
253076
+ sqlite3_result_text(pCtx, "fts5: 2024-06-11 17:37:36 5f25a9518a675efbd0525cc2f5595ee7bc7122be7cfecdf6b20c909185dea370", -1, SQLITE_TRANSIENT);
252781253077
}
252782253078
252783253079
/*
252784253080
** Return true if zName is the extension on one of the shadow tables used
252785253081
** by this module.
252786253082
--- 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 ** a47c644fef71f3ab3dc584ea917eaab9a8e5.
22 */
23 #define SQLITE_CORE 1
24 #define SQLITE_AMALGAMATION 1
25 #ifndef SQLITE_PRIVATE
26 # define SQLITE_PRIVATE static
@@ -459,11 +459,11 @@
459 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
460 ** [sqlite_version()] and [sqlite_source_id()].
461 */
462 #define SQLITE_VERSION "3.47.0"
463 #define SQLITE_VERSION_NUMBER 3047000
464 #define SQLITE_SOURCE_ID "2024-05-30 13:27:29 a47c644fef71f3ab3dc584ea917eaab9a8e5b4c9dcb57bdd29747ba32108e85f"
465
466 /*
467 ** CAPI3REF: Run-Time Library Version Numbers
468 ** KEYWORDS: sqlite3_version sqlite3_sourceid
469 **
@@ -11143,12 +11143,10 @@
11143 #endif
11144
11145 #if defined(__wasi__)
11146 # undef SQLITE_WASI
11147 # define SQLITE_WASI 1
11148 # undef SQLITE_OMIT_WAL
11149 # define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */
11150 # ifndef SQLITE_OMIT_LOAD_EXTENSION
11151 # define SQLITE_OMIT_LOAD_EXTENSION
11152 # endif
11153 # ifndef SQLITE_THREADSAFE
11154 # define SQLITE_THREADSAFE 0
@@ -14530,136 +14528,136 @@
14530 #define TK_EACH 41
14531 #define TK_FAIL 42
14532 #define TK_OR 43
14533 #define TK_AND 44
14534 #define TK_IS 45
14535 #define TK_MATCH 46
14536 #define TK_LIKE_KW 47
14537 #define TK_BETWEEN 48
14538 #define TK_IN 49
14539 #define TK_ISNULL 50
14540 #define TK_NOTNULL 51
14541 #define TK_NE 52
14542 #define TK_EQ 53
14543 #define TK_GT 54
14544 #define TK_LE 55
14545 #define TK_LT 56
14546 #define TK_GE 57
14547 #define TK_ESCAPE 58
14548 #define TK_ID 59
14549 #define TK_COLUMNKW 60
14550 #define TK_DO 61
14551 #define TK_FOR 62
14552 #define TK_IGNORE 63
14553 #define TK_INITIALLY 64
14554 #define TK_INSTEAD 65
14555 #define TK_NO 66
14556 #define TK_KEY 67
14557 #define TK_OF 68
14558 #define TK_OFFSET 69
14559 #define TK_PRAGMA 70
14560 #define TK_RAISE 71
14561 #define TK_RECURSIVE 72
14562 #define TK_REPLACE 73
14563 #define TK_RESTRICT 74
14564 #define TK_ROW 75
14565 #define TK_ROWS 76
14566 #define TK_TRIGGER 77
14567 #define TK_VACUUM 78
14568 #define TK_VIEW 79
14569 #define TK_VIRTUAL 80
14570 #define TK_WITH 81
14571 #define TK_NULLS 82
14572 #define TK_FIRST 83
14573 #define TK_LAST 84
14574 #define TK_CURRENT 85
14575 #define TK_FOLLOWING 86
14576 #define TK_PARTITION 87
14577 #define TK_PRECEDING 88
14578 #define TK_RANGE 89
14579 #define TK_UNBOUNDED 90
14580 #define TK_EXCLUDE 91
14581 #define TK_GROUPS 92
14582 #define TK_OTHERS 93
14583 #define TK_TIES 94
14584 #define TK_GENERATED 95
14585 #define TK_ALWAYS 96
14586 #define TK_MATERIALIZED 97
14587 #define TK_REINDEX 98
14588 #define TK_RENAME 99
14589 #define TK_CTIME_KW 100
14590 #define TK_ANY 101
14591 #define TK_BITAND 102
14592 #define TK_BITOR 103
14593 #define TK_LSHIFT 104
14594 #define TK_RSHIFT 105
14595 #define TK_PLUS 106
14596 #define TK_MINUS 107
14597 #define TK_STAR 108
14598 #define TK_SLASH 109
14599 #define TK_REM 110
14600 #define TK_CONCAT 111
14601 #define TK_PTR 112
14602 #define TK_COLLATE 113
14603 #define TK_BITNOT 114
14604 #define TK_ON 115
14605 #define TK_INDEXED 116
14606 #define TK_STRING 117
14607 #define TK_JOIN_KW 118
14608 #define TK_CONSTRAINT 119
14609 #define TK_DEFAULT 120
14610 #define TK_NULL 121
14611 #define TK_PRIMARY 122
14612 #define TK_UNIQUE 123
14613 #define TK_CHECK 124
14614 #define TK_REFERENCES 125
14615 #define TK_AUTOINCR 126
14616 #define TK_INSERT 127
14617 #define TK_DELETE 128
14618 #define TK_UPDATE 129
14619 #define TK_SET 130
14620 #define TK_DEFERRABLE 131
14621 #define TK_FOREIGN 132
14622 #define TK_DROP 133
14623 #define TK_UNION 134
14624 #define TK_ALL 135
14625 #define TK_EXCEPT 136
14626 #define TK_INTERSECT 137
14627 #define TK_SELECT 138
14628 #define TK_VALUES 139
14629 #define TK_DISTINCT 140
14630 #define TK_DOT 141
14631 #define TK_FROM 142
14632 #define TK_JOIN 143
14633 #define TK_USING 144
14634 #define TK_ORDER 145
14635 #define TK_GROUP 146
14636 #define TK_HAVING 147
14637 #define TK_LIMIT 148
14638 #define TK_WHERE 149
14639 #define TK_RETURNING 150
14640 #define TK_INTO 151
14641 #define TK_NOTHING 152
14642 #define TK_FLOAT 153
14643 #define TK_BLOB 154
14644 #define TK_INTEGER 155
14645 #define TK_VARIABLE 156
14646 #define TK_CASE 157
14647 #define TK_WHEN 158
14648 #define TK_THEN 159
14649 #define TK_ELSE 160
14650 #define TK_INDEX 161
14651 #define TK_ALTER 162
14652 #define TK_ADD 163
14653 #define TK_WINDOW 164
14654 #define TK_OVER 165
14655 #define TK_FILTER 166
14656 #define TK_COLUMN 167
14657 #define TK_AGG_FUNCTION 168
14658 #define TK_AGG_COLUMN 169
14659 #define TK_TRUEFALSE 170
14660 #define TK_ISNOT 171
14661 #define TK_FUNCTION 172
14662 #define TK_UPLUS 173
14663 #define TK_UMINUS 174
14664 #define TK_TRUTH 175
14665 #define TK_REGISTER 176
@@ -15169,10 +15167,11 @@
15169 ** 0x00008000 After all FROM-clause analysis
15170 ** 0x00010000 Beginning of DELETE/INSERT/UPDATE processing
15171 ** 0x00020000 Transform DISTINCT into GROUP BY
15172 ** 0x00040000 SELECT tree dump after all code has been generated
15173 ** 0x00080000 NOT NULL strength reduction
 
15174 */
15175
15176 /*
15177 ** Macros for "wheretrace"
15178 */
@@ -16661,20 +16660,20 @@
16661 #define OP_IdxGE 45 /* jump, synopsis: key=r[P3@P4] */
16662 #define OP_RowSetRead 46 /* jump, synopsis: r[P3]=rowset(P1) */
16663 #define OP_RowSetTest 47 /* jump, synopsis: if r[P3] in rowset(P1) goto P2 */
16664 #define OP_Program 48 /* jump0 */
16665 #define OP_FkIfZero 49 /* jump, synopsis: if fkctr[P1]==0 goto P2 */
16666 #define OP_IsNull 50 /* jump, same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
16667 #define OP_NotNull 51 /* jump, same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
16668 #define OP_Ne 52 /* jump, same as TK_NE, synopsis: IF r[P3]!=r[P1] */
16669 #define OP_Eq 53 /* jump, same as TK_EQ, synopsis: IF r[P3]==r[P1] */
16670 #define OP_Gt 54 /* jump, same as TK_GT, synopsis: IF r[P3]>r[P1] */
16671 #define OP_Le 55 /* jump, same as TK_LE, synopsis: IF r[P3]<=r[P1] */
16672 #define OP_Lt 56 /* jump, same as TK_LT, synopsis: IF r[P3]<r[P1] */
16673 #define OP_Ge 57 /* jump, same as TK_GE, synopsis: IF r[P3]>=r[P1] */
16674 #define OP_ElseEq 58 /* jump, same as TK_ESCAPE */
16675 #define OP_IfPos 59 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */
16676 #define OP_IfNotZero 60 /* jump, synopsis: if r[P1]!=0 then r[P1]--, goto P2 */
16677 #define OP_DecrJumpZero 61 /* jump, synopsis: if (--r[P1])==0 goto P2 */
16678 #define OP_IncrVacuum 62 /* jump */
16679 #define OP_VNext 63 /* jump */
16680 #define OP_Filter 64 /* jump, synopsis: if key(P3@P4) not in filter(P1) goto P2 */
@@ -16713,27 +16712,27 @@
16713 #define OP_MakeRecord 97 /* synopsis: r[P3]=mkrec(r[P1@P2]) */
16714 #define OP_Count 98 /* synopsis: r[P2]=count() */
16715 #define OP_ReadCookie 99
16716 #define OP_SetCookie 100
16717 #define OP_ReopenIdx 101 /* synopsis: root=P2 iDb=P3 */
16718 #define OP_BitAnd 102 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
16719 #define OP_BitOr 103 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
16720 #define OP_ShiftLeft 104 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
16721 #define OP_ShiftRight 105 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
16722 #define OP_Add 106 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */
16723 #define OP_Subtract 107 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */
16724 #define OP_Multiply 108 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */
16725 #define OP_Divide 109 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */
16726 #define OP_Remainder 110 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */
16727 #define OP_Concat 111 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */
16728 #define OP_OpenRead 112 /* synopsis: root=P2 iDb=P3 */
16729 #define OP_OpenWrite 113 /* synopsis: root=P2 iDb=P3 */
16730 #define OP_BitNot 114 /* same as TK_BITNOT, synopsis: r[P2]= ~r[P1] */
16731 #define OP_OpenDup 115
16732 #define OP_OpenAutoindex 116 /* synopsis: nColumn=P2 */
16733 #define OP_String8 117 /* same as TK_STRING, synopsis: r[P2]='P4' */
16734 #define OP_OpenEphemeral 118 /* synopsis: nColumn=P2 */
16735 #define OP_SorterOpen 119
16736 #define OP_SequenceTest 120 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */
16737 #define OP_OpenPseudo 121 /* synopsis: P3 columns in r[P2] */
16738 #define OP_Close 122
16739 #define OP_ColumnsUsed 123
@@ -16764,12 +16763,12 @@
16764 #define OP_SqlExec 148
16765 #define OP_ParseSchema 149
16766 #define OP_LoadAnalysis 150
16767 #define OP_DropTable 151
16768 #define OP_DropIndex 152
16769 #define OP_Real 153 /* same as TK_FLOAT, synopsis: r[P2]=P4 */
16770 #define OP_DropTrigger 154
16771 #define OP_IntegrityCk 155
16772 #define OP_RowSetAdd 156 /* synopsis: rowset(P1)=r[P2] */
16773 #define OP_Param 157
16774 #define OP_FkCounter 158 /* synopsis: fkctr[P1]+=P2 */
16775 #define OP_MemMax 159 /* synopsis: r[P1]=max(r[P1],r[P2]) */
@@ -16821,24 +16820,24 @@
16821 /* 8 */ 0x81, 0x01, 0x01, 0x81, 0x83, 0x83, 0x01, 0x01,\
16822 /* 16 */ 0x03, 0x03, 0x01, 0x12, 0x01, 0xc9, 0xc9, 0xc9,\
16823 /* 24 */ 0xc9, 0x01, 0x49, 0x49, 0x49, 0x49, 0xc9, 0x49,\
16824 /* 32 */ 0xc1, 0x01, 0x41, 0x41, 0xc1, 0x01, 0x41, 0x41,\
16825 /* 40 */ 0x41, 0x41, 0x41, 0x26, 0x26, 0x41, 0x23, 0x0b,\
16826 /* 48 */ 0x81, 0x01, 0x03, 0x03, 0x0b, 0x0b, 0x0b, 0x0b,\
16827 /* 56 */ 0x0b, 0x0b, 0x01, 0x03, 0x03, 0x03, 0x01, 0x41,\
16828 /* 64 */ 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, 0x10,\
16829 /* 72 */ 0x10, 0x10, 0x00, 0x10, 0x00, 0x10, 0x10, 0x00,\
16830 /* 80 */ 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02, 0x02,\
16831 /* 88 */ 0x02, 0x00, 0x00, 0x12, 0x1e, 0x20, 0x40, 0x00,\
16832 /* 96 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x40, 0x26, 0x26,\
16833 /* 104 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26,\
16834 /* 112 */ 0x40, 0x00, 0x12, 0x40, 0x40, 0x10, 0x40, 0x00,\
16835 /* 120 */ 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x10,\
16836 /* 128 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x50,\
16837 /* 136 */ 0x00, 0x40, 0x04, 0x04, 0x00, 0x40, 0x50, 0x40,\
16838 /* 144 */ 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\
16839 /* 152 */ 0x00, 0x10, 0x00, 0x00, 0x06, 0x10, 0x00, 0x04,\
16840 /* 160 */ 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
16841 /* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x50,\
16842 /* 176 */ 0x40, 0x00, 0x10, 0x10, 0x02, 0x12, 0x12, 0x00,\
16843 /* 184 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}
16844
@@ -17895,10 +17894,11 @@
17895 /* TH3 expects this value ^^^^^^^^^^ See flatten04.test */
17896 #define SQLITE_IndexedExpr 0x01000000 /* Pull exprs from index when able */
17897 #define SQLITE_Coroutines 0x02000000 /* Co-routines for subqueries */
17898 #define SQLITE_NullUnusedCols 0x04000000 /* NULL unused columns in subqueries */
17899 #define SQLITE_OnePass 0x08000000 /* Single-pass DELETE and UPDATE */
 
17900 #define SQLITE_AllOpts 0xffffffff /* All optimizations */
17901
17902 /*
17903 ** Macros for testing whether or not optimizations are enabled or disabled.
17904 */
@@ -19359,11 +19359,11 @@
19359 #define WHERE_WANT_DISTINCT 0x0100 /* All output needs to be distinct */
19360 #define WHERE_SORTBYGROUP 0x0200 /* Support sqlite3WhereIsSorted() */
19361 #define WHERE_AGG_DISTINCT 0x0400 /* Query is "SELECT agg(DISTINCT ...)" */
19362 #define WHERE_ORDERBY_LIMIT 0x0800 /* ORDERBY+LIMIT on the inner loop */
19363 #define WHERE_RIGHT_JOIN 0x1000 /* Processing a RIGHT JOIN */
19364 /* 0x2000 not currently used */
19365 #define WHERE_USE_LIMIT 0x4000 /* Use the LIMIT in cost estimates */
19366 /* 0x8000 not currently used */
19367
19368 /* Allowed return values from sqlite3WhereIsDistinct()
19369 */
@@ -19431,11 +19431,11 @@
19431 #define NC_UEList 0x000080 /* True if uNC.pEList is used */
19432 #define NC_UAggInfo 0x000100 /* True if uNC.pAggInfo is used */
19433 #define NC_UUpsert 0x000200 /* True if uNC.pUpsert is used */
19434 #define NC_UBaseReg 0x000400 /* True if uNC.iBaseReg is used */
19435 #define NC_MinMaxAgg 0x001000 /* min/max aggregates seen. See note above */
19436 #define NC_Complex 0x002000 /* True if a function or subquery seen */
19437 #define NC_AllowWin 0x004000 /* Window functions are allowed here */
19438 #define NC_HasWin 0x008000 /* One or more window functions seen */
19439 #define NC_IsDDL 0x010000 /* Resolving names in a CREATE statement */
19440 #define NC_InAggFunc 0x020000 /* True if analyzing arguments to an agg func */
19441 #define NC_FromDDL 0x040000 /* SQL text comes from sqlite_schema */
@@ -19798,10 +19798,11 @@
19798 u8 okConstFactor; /* OK to factor out constants */
19799 u8 disableLookaside; /* Number of times lookaside has been disabled */
19800 u8 prepFlags; /* SQLITE_PREPARE_* flags */
19801 u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */
19802 u8 bHasWith; /* True if statement contains WITH */
 
19803 #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST)
19804 u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */
19805 #endif
19806 #ifdef SQLITE_DEBUG
19807 u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */
@@ -21059,11 +21060,11 @@
21059 SQLITE_PRIVATE int sqlite3ExprIsConstantOrGroupBy(Parse*, Expr*, ExprList*);
21060 SQLITE_PRIVATE int sqlite3ExprIsSingleTableConstraint(Expr*,const SrcList*,int,int);
21061 #ifdef SQLITE_ENABLE_CURSOR_HINTS
21062 SQLITE_PRIVATE int sqlite3ExprContainsSubquery(Expr*);
21063 #endif
21064 SQLITE_PRIVATE int sqlite3ExprIsInteger(const Expr*, int*);
21065 SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr*);
21066 SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);
21067 SQLITE_PRIVATE int sqlite3IsRowid(const char*);
21068 SQLITE_PRIVATE const char *sqlite3RowidAlias(Table *pTab);
21069 SQLITE_PRIVATE void sqlite3GenerateRowDelete(
@@ -24885,12 +24886,12 @@
24885 } aXformType[] = {
24886 /* 0 */ { 6, "second", 4.6427e+14, 1.0 },
24887 /* 1 */ { 6, "minute", 7.7379e+12, 60.0 },
24888 /* 2 */ { 4, "hour", 1.2897e+11, 3600.0 },
24889 /* 3 */ { 3, "day", 5373485.0, 86400.0 },
24890 /* 4 */ { 5, "month", 176546.0, 30.0*86400.0 },
24891 /* 5 */ { 4, "year", 14713.0, 365.0*86400.0 },
24892 };
24893
24894 /*
24895 ** If the DateTime p is raw number, try to figure out if it is
24896 ** a julian day number of a unix timestamp. Set the p value
@@ -35924,14 +35925,17 @@
35924
35925 /*
35926 ** Decode a floating-point value into an approximate decimal
35927 ** representation.
35928 **
35929 ** Round the decimal representation to n significant digits if
35930 ** n is positive. Or round to -n signficant digits after the
35931 ** decimal point if n is negative. No rounding is performed if
35932 ** n is zero.
 
 
 
35933 **
35934 ** The significant digits of the decimal representation are
35935 ** stored in p->z[] which is a often (but not always) a pointer
35936 ** into the middle of p->zBuf[]. There are p->n significant digits.
35937 ** The p->z[] array is *not* zero-terminated.
@@ -35940,10 +35944,12 @@
35940 int i;
35941 u64 v;
35942 int e, exp = 0;
35943 p->isSpecial = 0;
35944 p->z = p->zBuf;
 
 
35945
35946 /* Convert negative numbers to positive. Deal with Infinity, 0.0, and
35947 ** NaN. */
35948 if( r<0.0 ){
35949 p->sign = '-';
@@ -37227,20 +37233,20 @@
37227 /* 45 */ "IdxGE" OpHelp("key=r[P3@P4]"),
37228 /* 46 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
37229 /* 47 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
37230 /* 48 */ "Program" OpHelp(""),
37231 /* 49 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
37232 /* 50 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
37233 /* 51 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
37234 /* 52 */ "Ne" OpHelp("IF r[P3]!=r[P1]"),
37235 /* 53 */ "Eq" OpHelp("IF r[P3]==r[P1]"),
37236 /* 54 */ "Gt" OpHelp("IF r[P3]>r[P1]"),
37237 /* 55 */ "Le" OpHelp("IF r[P3]<=r[P1]"),
37238 /* 56 */ "Lt" OpHelp("IF r[P3]<r[P1]"),
37239 /* 57 */ "Ge" OpHelp("IF r[P3]>=r[P1]"),
37240 /* 58 */ "ElseEq" OpHelp(""),
37241 /* 59 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
37242 /* 60 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]--, goto P2"),
37243 /* 61 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
37244 /* 62 */ "IncrVacuum" OpHelp(""),
37245 /* 63 */ "VNext" OpHelp(""),
37246 /* 64 */ "Filter" OpHelp("if key(P3@P4) not in filter(P1) goto P2"),
@@ -37279,27 +37285,27 @@
37279 /* 97 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"),
37280 /* 98 */ "Count" OpHelp("r[P2]=count()"),
37281 /* 99 */ "ReadCookie" OpHelp(""),
37282 /* 100 */ "SetCookie" OpHelp(""),
37283 /* 101 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
37284 /* 102 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
37285 /* 103 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
37286 /* 104 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
37287 /* 105 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
37288 /* 106 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
37289 /* 107 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
37290 /* 108 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
37291 /* 109 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
37292 /* 110 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
37293 /* 111 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
37294 /* 112 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
37295 /* 113 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
37296 /* 114 */ "BitNot" OpHelp("r[P2]= ~r[P1]"),
37297 /* 115 */ "OpenDup" OpHelp(""),
37298 /* 116 */ "OpenAutoindex" OpHelp("nColumn=P2"),
37299 /* 117 */ "String8" OpHelp("r[P2]='P4'"),
37300 /* 118 */ "OpenEphemeral" OpHelp("nColumn=P2"),
37301 /* 119 */ "SorterOpen" OpHelp(""),
37302 /* 120 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
37303 /* 121 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
37304 /* 122 */ "Close" OpHelp(""),
37305 /* 123 */ "ColumnsUsed" OpHelp(""),
@@ -37330,12 +37336,12 @@
37330 /* 148 */ "SqlExec" OpHelp(""),
37331 /* 149 */ "ParseSchema" OpHelp(""),
37332 /* 150 */ "LoadAnalysis" OpHelp(""),
37333 /* 151 */ "DropTable" OpHelp(""),
37334 /* 152 */ "DropIndex" OpHelp(""),
37335 /* 153 */ "Real" OpHelp("r[P2]=P4"),
37336 /* 154 */ "DropTrigger" OpHelp(""),
37337 /* 155 */ "IntegrityCk" OpHelp(""),
37338 /* 156 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
37339 /* 157 */ "Param" OpHelp(""),
37340 /* 158 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
37341 /* 159 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
@@ -42345,11 +42351,11 @@
42345 }
42346 }
42347
42348 /* Forward declaration */
42349 static int unixGetTempname(int nBuf, char *zBuf);
42350 #ifndef SQLITE_OMIT_WAL
42351 static int unixFcntlExternalReader(unixFile*, int*);
42352 #endif
42353
42354 /*
42355 ** Information and control of an open file handle.
@@ -42472,11 +42478,11 @@
42472 return proxyFileControl(id,op,pArg);
42473 }
42474 #endif /* SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) */
42475
42476 case SQLITE_FCNTL_EXTERNAL_READER: {
42477 #ifndef SQLITE_OMIT_WAL
42478 return unixFcntlExternalReader((unixFile*)id, (int*)pArg);
42479 #else
42480 *(int*)pArg = 0;
42481 return SQLITE_OK;
42482 #endif
@@ -42645,11 +42651,11 @@
42645 #endif
42646 }
42647
42648 #endif /* !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 */
42649
42650 #ifndef SQLITE_OMIT_WAL
42651
42652 /*
42653 ** Object used to represent an shared memory buffer.
42654 **
42655 ** When multiple threads all reference the same wal-index, each thread
@@ -102134,18 +102140,33 @@
102134 }
102135 #endif
102136
102137 /* Opcode: Noop * * * * *
102138 **
102139 ** Do nothing. This instruction is often useful as a jump
102140 ** destination.
102141 */
102142 /*
102143 ** The magic Explain opcode are only inserted when explain==2 (which
102144 ** is to say when the EXPLAIN QUERY PLAN syntax is used.)
102145 ** This opcode records information from the optimizer. It is the
102146 ** the same as a no-op. This opcodesnever appears in a real VM program.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102147 */
102148 default: { /* This is really OP_Noop, OP_Explain */
102149 assert( pOp->opcode==OP_Noop || pOp->opcode==OP_Explain );
102150
102151 break;
@@ -106970,11 +106991,11 @@
106970 ** Return TRUE (non-zero) if zTab is a valid name for the schema table pTab.
106971 */
106972 static SQLITE_NOINLINE int isValidSchemaTableName(
106973 const char *zTab, /* Name as it appears in the SQL */
106974 Table *pTab, /* The schema table we are trying to match */
106975 Schema *pSchema /* non-NULL if a database qualifier is present */
106976 ){
106977 const char *zLegacy;
106978 assert( pTab!=0 );
106979 assert( pTab->tnum==1 );
106980 if( sqlite3StrNICmp(zTab, "sqlite_", 7)!=0 ) return 0;
@@ -106981,11 +107002,11 @@
106981 zLegacy = pTab->zName;
106982 if( strcmp(zLegacy+7, &LEGACY_TEMP_SCHEMA_TABLE[7])==0 ){
106983 if( sqlite3StrICmp(zTab+7, &PREFERRED_TEMP_SCHEMA_TABLE[7])==0 ){
106984 return 1;
106985 }
106986 if( pSchema==0 ) return 0;
106987 if( sqlite3StrICmp(zTab+7, &LEGACY_SCHEMA_TABLE[7])==0 ) return 1;
106988 if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1;
106989 }else{
106990 if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1;
106991 }
@@ -107164,11 +107185,11 @@
107164 if( sqlite3StrICmp(zTab, pItem->zAlias)!=0 ){
107165 continue;
107166 }
107167 }else if( sqlite3StrICmp(zTab, pTab->zName)!=0 ){
107168 if( pTab->tnum!=1 ) continue;
107169 if( !isValidSchemaTableName(zTab, pTab, pSchema) ) continue;
107170 }
107171 assert( ExprUseYTab(pExpr) );
107172 if( IN_RENAME_OBJECT && pItem->zAlias ){
107173 sqlite3RenameTokenRemap(pParse, 0, (void*)&pExpr->y.pTab);
107174 }
@@ -108109,10 +108130,11 @@
108109 }
108110 assert( pNC->nRef>=nRef );
108111 if( nRef!=pNC->nRef ){
108112 ExprSetProperty(pExpr, EP_VarSelect);
108113 pExpr->x.pSelect->selFlags |= SF_Correlated;
 
108114 }
108115 pNC->ncFlags |= NC_Subquery;
108116 }
108117 break;
108118 }
@@ -108247,11 +108269,11 @@
108247 NameContext nc; /* Name context for resolving pE */
108248 sqlite3 *db; /* Database connection */
108249 int rc; /* Return code from subprocedures */
108250 u8 savedSuppErr; /* Saved value of db->suppressErr */
108251
108252 assert( sqlite3ExprIsInteger(pE, &i)==0 );
108253 pEList = pSelect->pEList;
108254
108255 /* Resolve all names in the ORDER BY term expression
108256 */
108257 memset(&nc, 0, sizeof(nc));
@@ -108346,11 +108368,11 @@
108346 int iCol = -1;
108347 Expr *pE, *pDup;
108348 if( pItem->fg.done ) continue;
108349 pE = sqlite3ExprSkipCollateAndLikely(pItem->pExpr);
108350 if( NEVER(pE==0) ) continue;
108351 if( sqlite3ExprIsInteger(pE, &iCol) ){
108352 if( iCol<=0 || iCol>pEList->nExpr ){
108353 resolveOutOfRangeError(pParse, "ORDER", i+1, pEList->nExpr, pE);
108354 return 1;
108355 }
108356 }else{
@@ -108531,11 +108553,11 @@
108531 ** copy of the iCol-th result-set expression. */
108532 pItem->u.x.iOrderByCol = (u16)iCol;
108533 continue;
108534 }
108535 }
108536 if( sqlite3ExprIsInteger(pE2, &iCol) ){
108537 /* The ORDER BY term is an integer constant. Again, set the column
108538 ** number so that sqlite3ResolveOrderGroupBy() will convert the
108539 ** order-by term to a copy of the result-set expression */
108540 if( iCol<1 || iCol>0xffff ){
108541 resolveOutOfRangeError(pParse, zType, i+1, nResult, pE2);
@@ -111815,12 +111837,16 @@
111815 /*
111816 ** If the expression p codes a constant integer that is small enough
111817 ** to fit in a 32-bit integer, return 1 and put the value of the integer
111818 ** in *pValue. If the expression is not an integer or if it is too big
111819 ** to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
 
 
 
 
111820 */
111821 SQLITE_PRIVATE int sqlite3ExprIsInteger(const Expr *p, int *pValue){
111822 int rc = 0;
111823 if( NEVER(p==0) ) return 0; /* Used to only happen following on OOM */
111824
111825 /* If an expression is an integer literal that fits in a signed 32-bit
111826 ** integer, then the EP_IntValue flag will have already been set */
@@ -111831,21 +111857,41 @@
111831 *pValue = p->u.iValue;
111832 return 1;
111833 }
111834 switch( p->op ){
111835 case TK_UPLUS: {
111836 rc = sqlite3ExprIsInteger(p->pLeft, pValue);
111837 break;
111838 }
111839 case TK_UMINUS: {
111840 int v = 0;
111841 if( sqlite3ExprIsInteger(p->pLeft, &v) ){
111842 assert( ((unsigned int)v)!=0x80000000 );
111843 *pValue = -v;
111844 rc = 1;
111845 }
111846 break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111847 }
111848 default: break;
111849 }
111850 return rc;
111851 }
@@ -126430,18 +126476,21 @@
126430 ** Append the contents of SrcList p2 to SrcList p1 and return the resulting
126431 ** SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2
126432 ** are deleted by this function.
126433 */
126434 SQLITE_PRIVATE SrcList *sqlite3SrcListAppendList(Parse *pParse, SrcList *p1, SrcList *p2){
126435 assert( p1 && p1->nSrc==1 );
126436 if( p2 ){
126437 SrcList *pNew = sqlite3SrcListEnlarge(pParse, p1, p2->nSrc, 1);
 
126438 if( pNew==0 ){
126439 sqlite3SrcListDelete(pParse->db, p2);
126440 }else{
126441 p1 = pNew;
126442 memcpy(&p1->a[1], p2->a, p2->nSrc*sizeof(SrcItem));
 
 
126443 sqlite3DbFree(pParse->db, p2);
126444 p1->a[0].fg.jointype |= (JT_LTORJ & p1->a[1].fg.jointype);
126445 }
126446 }
126447 return p1;
@@ -131209,10 +131258,11 @@
131209 UNUSED_PARAMETER(argc);
131210 assert( argc==3 );
131211 x = sqlite3_value_double(argv[0]);
131212 y = sqlite3_value_int(argv[1]);
131213 z = sqlite3_value_int(argv[2]);
 
131214 sqlite3FpDecode(&s, x, y, z);
131215 if( s.isSpecial==2 ){
131216 sqlite3_snprintf(sizeof(zBuf), zBuf, "NaN");
131217 }else{
131218 sqlite3_snprintf(sizeof(zBuf), zBuf, "%c%.*s/%d", s.sign, s.n, s.z, s.iDP);
@@ -145397,11 +145447,11 @@
145397 assert( pLimit->op==TK_LIMIT );
145398 assert( pLimit->pLeft!=0 );
145399 p->iLimit = iLimit = ++pParse->nMem;
145400 v = sqlite3GetVdbe(pParse);
145401 assert( v!=0 );
145402 if( sqlite3ExprIsInteger(pLimit->pLeft, &n) ){
145403 sqlite3VdbeAddOp2(v, OP_Integer, n, iLimit);
145404 VdbeComment((v, "LIMIT counter"));
145405 if( n==0 ){
145406 sqlite3VdbeGoto(v, iBreak);
145407 }else if( n>=0 && p->nSelectRow>sqlite3LogEst((u64)n) ){
@@ -145877,11 +145927,11 @@
145877 testcase( rc!=SQLITE_OK );
145878 pDelete = p->pPrior;
145879 p->pPrior = pPrior;
145880 p->nSelectRow = sqlite3LogEstAdd(p->nSelectRow, pPrior->nSelectRow);
145881 if( p->pLimit
145882 && sqlite3ExprIsInteger(p->pLimit->pLeft, &nLimit)
145883 && nLimit>0 && p->nSelectRow > sqlite3LogEst((u64)nLimit)
145884 ){
145885 p->nSelectRow = sqlite3LogEst((u64)nLimit);
145886 }
145887 if( addr ){
@@ -150187,10 +150237,162 @@
150187 pItem--;
150188 if( pItem->pSelect!=0 ) return 0; /* (1c-i) */
150189 }
150190 return 1;
150191 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150192
150193 /*
150194 ** Generate code for the SELECT statement given in the p argument.
150195 **
150196 ** The results are returned according to the SelectDest structure.
@@ -150513,10 +150715,17 @@
150513 #endif
150514 if( p->pNext==0 ) ExplainQueryPlanPop(pParse);
150515 return rc;
150516 }
150517 #endif
 
 
 
 
 
 
 
150518
150519 /* Do the WHERE-clause constant propagation optimization if this is
150520 ** a join. No need to speed time on this operation for non-join queries
150521 ** as the equivalent optimization will be handled by query planner in
150522 ** sqlite3WhereBegin().
@@ -151236,11 +151445,15 @@
151236 pAggInfo->directMode = 1;
151237 sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j);
151238 }
151239
151240 if( iOrderByCol ){
151241 sqlite3ExprToRegister(p->pEList->a[iOrderByCol-1].pExpr, iAMem+j);
 
 
 
 
151242 }
151243 }
151244 sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,
151245 (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
151246 addr1 = sqlite3VdbeCurrentAddr(v);
@@ -157658,11 +157871,12 @@
157658 }
157659 #endif
157660 zMsg = sqlite3StrAccumFinish(&str);
157661 sqlite3ExplainBreakpoint("",zMsg);
157662 ret = sqlite3VdbeAddOp4(v, OP_Explain, sqlite3VdbeCurrentAddr(v),
157663 pParse->addrExplain, 0, zMsg,P4_DYNAMIC);
 
157664 }
157665 return ret;
157666 }
157667
157668 /*
@@ -158042,10 +158256,151 @@
158042 }
158043 }
158044 return pNew;
158045 }
158046
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158047
158048 /*
158049 ** Generate code for a single equality term of the WHERE clause. An equality
158050 ** term can be either X=expr or X IN (...). pTerm is the term to be
158051 ** coded.
@@ -158067,138 +158422,24 @@
158067 int iEq, /* Index of the equality term within this level */
158068 int bRev, /* True for reverse-order IN operations */
158069 int iTarget /* Attempt to leave results in this register */
158070 ){
158071 Expr *pX = pTerm->pExpr;
158072 Vdbe *v = pParse->pVdbe;
158073 int iReg; /* Register holding results */
158074
158075 assert( pLevel->pWLoop->aLTerm[iEq]==pTerm );
158076 assert( iTarget>0 );
158077 if( pX->op==TK_EQ || pX->op==TK_IS ){
158078 iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
158079 }else if( pX->op==TK_ISNULL ){
158080 iReg = iTarget;
158081 sqlite3VdbeAddOp2(v, OP_Null, 0, iReg);
158082 #ifndef SQLITE_OMIT_SUBQUERY
158083 }else{
158084 int eType = IN_INDEX_NOOP;
158085 int iTab;
158086 struct InLoop *pIn;
158087 WhereLoop *pLoop = pLevel->pWLoop;
158088 int i;
158089 int nEq = 0;
158090 int *aiMap = 0;
158091
158092 if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0
158093 && pLoop->u.btree.pIndex!=0
158094 && pLoop->u.btree.pIndex->aSortOrder[iEq]
158095 ){
158096 testcase( iEq==0 );
158097 testcase( bRev );
158098 bRev = !bRev;
158099 }
158100 assert( pX->op==TK_IN );
158101 iReg = iTarget;
158102
158103 for(i=0; i<iEq; i++){
158104 if( pLoop->aLTerm[i] && pLoop->aLTerm[i]->pExpr==pX ){
158105 disableTerm(pLevel, pTerm);
158106 return iTarget;
158107 }
158108 }
158109 for(i=iEq;i<pLoop->nLTerm; i++){
158110 assert( pLoop->aLTerm[i]!=0 );
158111 if( pLoop->aLTerm[i]->pExpr==pX ) nEq++;
158112 }
158113
158114 iTab = 0;
158115 if( !ExprUseXSelect(pX) || pX->x.pSelect->pEList->nExpr==1 ){
158116 eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, 0, &iTab);
158117 }else{
158118 Expr *pExpr = pTerm->pExpr;
158119 if( pExpr->iTable==0 || !ExprHasProperty(pExpr, EP_Subrtn) ){
158120 sqlite3 *db = pParse->db;
158121 pX = removeUnindexableInClauseTerms(pParse, iEq, pLoop, pX);
158122 if( !db->mallocFailed ){
158123 aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*nEq);
158124 eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap,&iTab);
158125 pExpr->iTable = iTab;
158126 }
158127 sqlite3ExprDelete(db, pX);
158128 }else{
158129 int n = sqlite3ExprVectorSize(pX->pLeft);
158130 aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*MAX(nEq,n));
158131 eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap, &iTab);
158132 }
158133 pX = pExpr;
158134 }
158135
158136 if( eType==IN_INDEX_INDEX_DESC ){
158137 testcase( bRev );
158138 bRev = !bRev;
158139 }
158140 sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iTab, 0);
158141 VdbeCoverageIf(v, bRev);
158142 VdbeCoverageIf(v, !bRev);
158143
158144 assert( (pLoop->wsFlags & WHERE_MULTI_OR)==0 );
158145 pLoop->wsFlags |= WHERE_IN_ABLE;
158146 if( pLevel->u.in.nIn==0 ){
158147 pLevel->addrNxt = sqlite3VdbeMakeLabel(pParse);
158148 }
158149 if( iEq>0 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0 ){
158150 pLoop->wsFlags |= WHERE_IN_EARLYOUT;
158151 }
158152
158153 i = pLevel->u.in.nIn;
158154 pLevel->u.in.nIn += nEq;
158155 pLevel->u.in.aInLoop =
158156 sqlite3WhereRealloc(pTerm->pWC->pWInfo,
158157 pLevel->u.in.aInLoop,
158158 sizeof(pLevel->u.in.aInLoop[0])*pLevel->u.in.nIn);
158159 pIn = pLevel->u.in.aInLoop;
158160 if( pIn ){
158161 int iMap = 0; /* Index in aiMap[] */
158162 pIn += i;
158163 for(i=iEq;i<pLoop->nLTerm; i++){
158164 if( pLoop->aLTerm[i]->pExpr==pX ){
158165 int iOut = iReg + i - iEq;
158166 if( eType==IN_INDEX_ROWID ){
158167 pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iOut);
158168 }else{
158169 int iCol = aiMap ? aiMap[iMap++] : 0;
158170 pIn->addrInTop = sqlite3VdbeAddOp3(v,OP_Column,iTab, iCol, iOut);
158171 }
158172 sqlite3VdbeAddOp1(v, OP_IsNull, iOut); VdbeCoverage(v);
158173 if( i==iEq ){
158174 pIn->iCur = iTab;
158175 pIn->eEndLoopOp = bRev ? OP_Prev : OP_Next;
158176 if( iEq>0 ){
158177 pIn->iBase = iReg - i;
158178 pIn->nPrefix = i;
158179 }else{
158180 pIn->nPrefix = 0;
158181 }
158182 }else{
158183 pIn->eEndLoopOp = OP_Noop;
158184 }
158185 pIn++;
158186 }
158187 }
158188 testcase( iEq>0
158189 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0
158190 && (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 );
158191 if( iEq>0
158192 && (pLoop->wsFlags & (WHERE_IN_SEEKSCAN|WHERE_VIRTUALTABLE))==0
158193 ){
158194 sqlite3VdbeAddOp3(v, OP_SeekHit, pLevel->iIdxCur, 0, iEq);
158195 }
158196 }else{
158197 pLevel->u.in.nIn = 0;
158198 }
158199 sqlite3DbFree(pParse->db, aiMap);
158200 #endif
158201 }
158202
158203 /* As an optimization, try to disable the WHERE clause term that is
158204 ** driving the index as it will always be true. The correct answer is
@@ -160403,11 +160644,16 @@
160403 static int allowedOp(int op){
160404 assert( TK_GT>TK_EQ && TK_GT<TK_GE );
160405 assert( TK_LT>TK_EQ && TK_LT<TK_GE );
160406 assert( TK_LE>TK_EQ && TK_LE<TK_GE );
160407 assert( TK_GE==TK_EQ+4 );
160408 return op==TK_IN || (op>=TK_EQ && op<=TK_GE) || op==TK_ISNULL || op==TK_IS;
 
 
 
 
 
160409 }
160410
160411 /*
160412 ** Commute a comparison operator. Expressions of the form "X op Y"
160413 ** are converted into "Y op X".
@@ -160436,19 +160682,20 @@
160436 ** Translate from TK_xx operator to WO_xx bitmask.
160437 */
160438 static u16 operatorMask(int op){
160439 u16 c;
160440 assert( allowedOp(op) );
160441 if( op==TK_IN ){
 
 
 
160442 c = WO_IN;
160443 }else if( op==TK_ISNULL ){
160444 c = WO_ISNULL;
160445 }else if( op==TK_IS ){
 
160446 c = WO_IS;
160447 }else{
160448 assert( (WO_EQ<<(op-TK_EQ)) < 0x7fff );
160449 c = (u16)(WO_EQ<<(op-TK_EQ));
160450 }
160451 assert( op!=TK_ISNULL || c==WO_ISNULL );
160452 assert( op!=TK_IN || c==WO_IN );
160453 assert( op!=TK_EQ || c==WO_EQ );
160454 assert( op!=TK_LT || c==WO_LT );
@@ -160731,10 +160978,17 @@
160731 *ppLeft = pCol;
160732 return 1;
160733 }
160734 }
160735 }
 
 
 
 
 
 
 
160736 }else if( pExpr->op==TK_NE || pExpr->op==TK_ISNOT || pExpr->op==TK_NOTNULL ){
160737 int res = 0;
160738 Expr *pLeft = pExpr->pLeft;
160739 Expr *pRight = pExpr->pRight;
160740 assert( pLeft->op!=TK_COLUMN || (ExprUseYTab(pLeft) && pLeft->y.pTab!=0) );
@@ -161872,11 +162126,11 @@
161872 Parse *pParse = pWC->pWInfo->pParse;
161873 sqlite3 *db = pParse->db;
161874 Expr *pNew;
161875 int iVal = 0;
161876
161877 if( sqlite3ExprIsInteger(pExpr, &iVal) && iVal>=0 ){
161878 Expr *pVal = sqlite3Expr(db, TK_INTEGER, 0);
161879 if( pVal==0 ) return;
161880 ExprSetProperty(pVal, EP_IntValue);
161881 pVal->u.iValue = iVal;
161882 pNew = sqlite3PExpr(pParse, TK_MATCH, 0, pVal);
@@ -163524,10 +163778,24 @@
163524 pParse->pIdxPartExpr = saved_pIdxPartExpr;
163525 }
163526
163527
163528 #ifndef SQLITE_OMIT_VIRTUALTABLE
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163529 /*
163530 ** Allocate and populate an sqlite3_index_info structure. It is the
163531 ** responsibility of the caller to eventually release the structure
163532 ** by passing the pointer returned by this function to freeIndexInfo().
163533 */
@@ -163550,10 +163818,11 @@
163550 sqlite3_index_info *pIdxInfo;
163551 u16 mNoOmit = 0;
163552 const Table *pTab;
163553 int eDistinct = 0;
163554 ExprList *pOrderBy = pWInfo->pOrderBy;
 
163555
163556 assert( pSrc!=0 );
163557 pTab = pSrc->pTab;
163558 assert( pTab!=0 );
163559 assert( IsVirtual(pTab) );
@@ -163560,32 +163829,34 @@
163560
163561 /* Find all WHERE clause constraints referring to this virtual table.
163562 ** Mark each term with the TERM_OK flag. Set nTerm to the number of
163563 ** terms found.
163564 */
163565 for(i=nTerm=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
163566 pTerm->wtFlags &= ~TERM_OK;
163567 if( pTerm->leftCursor != pSrc->iCursor ) continue;
163568 if( pTerm->prereqRight & mUnusable ) continue;
163569 assert( IsPowerOfTwo(pTerm->eOperator & ~WO_EQUIV) );
163570 testcase( pTerm->eOperator & WO_IN );
163571 testcase( pTerm->eOperator & WO_ISNULL );
163572 testcase( pTerm->eOperator & WO_IS );
163573 testcase( pTerm->eOperator & WO_ALL );
163574 if( (pTerm->eOperator & ~(WO_EQUIV))==0 ) continue;
163575 if( pTerm->wtFlags & TERM_VNULL ) continue;
163576
163577 assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );
163578 assert( pTerm->u.x.leftColumn>=XN_ROWID );
163579 assert( pTerm->u.x.leftColumn<pTab->nCol );
163580 if( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0
163581 && !constraintCompatibleWithOuterJoin(pTerm,pSrc)
163582 ){
163583 continue;
163584 }
163585 nTerm++;
163586 pTerm->wtFlags |= TERM_OK;
 
 
163587 }
163588
163589 /* If the ORDER BY clause contains only columns in the current
163590 ** virtual table then allocate space for the aOrderBy part of
163591 ** the sqlite3_index_info structure.
@@ -163660,53 +163931,56 @@
163660 pIdxInfo->aConstraintUsage = pUsage;
163661 pHidden->pWC = pWC;
163662 pHidden->pParse = pParse;
163663 pHidden->eDistinct = eDistinct;
163664 pHidden->mIn = 0;
163665 for(i=j=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
163666 u16 op;
163667 if( (pTerm->wtFlags & TERM_OK)==0 ) continue;
163668 pIdxCons[j].iColumn = pTerm->u.x.leftColumn;
163669 pIdxCons[j].iTermOffset = i;
163670 op = pTerm->eOperator & WO_ALL;
163671 if( op==WO_IN ){
163672 if( (pTerm->wtFlags & TERM_SLICE)==0 ){
163673 pHidden->mIn |= SMASKBIT32(j);
163674 }
163675 op = WO_EQ;
163676 }
163677 if( op==WO_AUX ){
163678 pIdxCons[j].op = pTerm->eMatchOp;
163679 }else if( op & (WO_ISNULL|WO_IS) ){
163680 if( op==WO_ISNULL ){
163681 pIdxCons[j].op = SQLITE_INDEX_CONSTRAINT_ISNULL;
163682 }else{
163683 pIdxCons[j].op = SQLITE_INDEX_CONSTRAINT_IS;
163684 }
163685 }else{
163686 pIdxCons[j].op = (u8)op;
163687 /* The direct assignment in the previous line is possible only because
163688 ** the WO_ and SQLITE_INDEX_CONSTRAINT_ codes are identical. The
163689 ** following asserts verify this fact. */
163690 assert( WO_EQ==SQLITE_INDEX_CONSTRAINT_EQ );
163691 assert( WO_LT==SQLITE_INDEX_CONSTRAINT_LT );
163692 assert( WO_LE==SQLITE_INDEX_CONSTRAINT_LE );
163693 assert( WO_GT==SQLITE_INDEX_CONSTRAINT_GT );
163694 assert( WO_GE==SQLITE_INDEX_CONSTRAINT_GE );
163695 assert( pTerm->eOperator&(WO_IN|WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_AUX) );
163696
163697 if( op & (WO_LT|WO_LE|WO_GT|WO_GE)
163698 && sqlite3ExprIsVector(pTerm->pExpr->pRight)
163699 ){
163700 testcase( j!=i );
163701 if( j<16 ) mNoOmit |= (1 << j);
163702 if( op==WO_LT ) pIdxCons[j].op = WO_LE;
163703 if( op==WO_GT ) pIdxCons[j].op = WO_GE;
163704 }
163705 }
163706
163707 j++;
 
 
 
163708 }
163709 assert( j==nTerm );
163710 pIdxInfo->nConstraint = j;
163711 for(i=j=0; i<nOrderBy; i++){
163712 Expr *pExpr = pOrderBy->a[i].pExpr;
@@ -163721,10 +163995,21 @@
163721 pIdxInfo->nOrderBy = j;
163722
163723 *pmNoOmit = mNoOmit;
163724 return pIdxInfo;
163725 }
 
 
 
 
 
 
 
 
 
 
 
163726
163727 /*
163728 ** Free an sqlite3_index_info structure allocated by allocateIndexInfo()
163729 ** and possibly modified by xBestIndex methods.
163730 */
@@ -163737,10 +164022,11 @@
163737 assert( pHidden->pParse->db==db );
163738 for(i=0; i<pIdxInfo->nConstraint; i++){
163739 sqlite3ValueFree(pHidden->aRhs[i]); /* IMP: R-14553-25174 */
163740 pHidden->aRhs[i] = 0;
163741 }
 
163742 sqlite3DbFree(db, pIdxInfo);
163743 }
163744
163745 /*
163746 ** The table object reference passed as the second argument to this function
@@ -165088,11 +165374,11 @@
165088 && (pTerm->wtFlags & TERM_HIGHTRUTH)==0 /* tag-20200224-1 */
165089 ){
165090 Expr *pRight = pTerm->pExpr->pRight;
165091 int k = 0;
165092 testcase( pTerm->pExpr->op==TK_IS );
165093 if( sqlite3ExprIsInteger(pRight, &k) && k>=(-1) && k<=1 ){
165094 k = 10;
165095 }else{
165096 k = 20;
165097 }
165098 if( iReduce<k ){
@@ -166337,11 +166623,11 @@
166337
166338 /* Set the usable flag on the subset of constraints identified by
166339 ** arguments mUsable and mExclude. */
166340 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
166341 for(i=0; i<nConstraint; i++, pIdxCons++){
166342 WhereTerm *pTerm = &pWC->a[pIdxCons->iTermOffset];
166343 pIdxCons->usable = 0;
166344 if( (pTerm->prereqRight & mUsable)==pTerm->prereqRight
166345 && (pTerm->eOperator & mExclude)==0
166346 && (pbRetryLimit || !isLimitTerm(pTerm))
166347 ){
@@ -166368,10 +166654,11 @@
166368 /* If the xBestIndex method returns SQLITE_CONSTRAINT, that means
166369 ** that the particular combination of parameters provided is unusable.
166370 ** Make no entries in the loop table.
166371 */
166372 WHERETRACE(0xffffffff, (" ^^^^--- non-viable plan rejected!\n"));
 
166373 return SQLITE_OK;
166374 }
166375 return rc;
166376 }
166377
@@ -166385,22 +166672,21 @@
166385 if( (iTerm = pUsage[i].argvIndex - 1)>=0 ){
166386 WhereTerm *pTerm;
166387 int j = pIdxCons->iTermOffset;
166388 if( iTerm>=nConstraint
166389 || j<0
166390 || j>=pWC->nTerm
166391 || pNew->aLTerm[iTerm]!=0
166392 || pIdxCons->usable==0
166393 ){
166394 sqlite3ErrorMsg(pParse,"%s.xBestIndex malfunction",pSrc->pTab->zName);
166395 testcase( pIdxInfo->needToFreeIdxStr );
166396 return SQLITE_ERROR;
166397 }
166398 testcase( iTerm==nConstraint-1 );
166399 testcase( j==0 );
166400 testcase( j==pWC->nTerm-1 );
166401 pTerm = &pWC->a[j];
166402 pNew->prereq |= pTerm->prereqRight;
166403 assert( iTerm<pNew->nLSlot );
166404 pNew->aLTerm[iTerm] = pTerm;
166405 if( iTerm>mxTerm ) mxTerm = iTerm;
166406 testcase( iTerm==15 );
@@ -166441,15 +166727,11 @@
166441 ** OFFSET term handled as well, the plan is unusable. Similarly,
166442 ** if there is a LIMIT/OFFSET and there are other unused terms,
166443 ** the plan cannot be used. In these cases set variable *pbRetryLimit
166444 ** to true to tell the caller to retry with LIMIT and OFFSET
166445 ** disabled. */
166446 if( pIdxInfo->needToFreeIdxStr ){
166447 sqlite3_free(pIdxInfo->idxStr);
166448 pIdxInfo->idxStr = 0;
166449 pIdxInfo->needToFreeIdxStr = 0;
166450 }
166451 *pbRetryLimit = 1;
166452 return SQLITE_OK;
166453 }
166454 }
166455 }
@@ -166458,11 +166740,11 @@
166458 for(i=0; i<=mxTerm; i++){
166459 if( pNew->aLTerm[i]==0 ){
166460 /* The non-zero argvIdx values must be contiguous. Raise an
166461 ** error if they are not */
166462 sqlite3ErrorMsg(pParse,"%s.xBestIndex malfunction",pSrc->pTab->zName);
166463 testcase( pIdxInfo->needToFreeIdxStr );
166464 return SQLITE_ERROR;
166465 }
166466 }
166467 assert( pNew->nLTerm<=pNew->nLSlot );
166468 pNew->u.vtab.idxNum = pIdxInfo->idxNum;
@@ -166513,11 +166795,11 @@
166513 HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1];
166514 const char *zRet = 0;
166515 if( iCons>=0 && iCons<pIdxInfo->nConstraint ){
166516 CollSeq *pC = 0;
166517 int iTerm = pIdxInfo->aConstraint[iCons].iTermOffset;
166518 Expr *pX = pHidden->pWC->a[iTerm].pExpr;
166519 if( pX->pLeft ){
166520 pC = sqlite3ExprCompareCollSeq(pHidden->pParse, pX);
166521 }
166522 zRet = (pC ? pC->zName : sqlite3StrBINARY);
166523 }
@@ -166559,11 +166841,13 @@
166559 int rc = SQLITE_OK;
166560 if( iCons<0 || iCons>=pIdxInfo->nConstraint ){
166561 rc = SQLITE_MISUSE_BKPT; /* EV: R-30545-25046 */
166562 }else{
166563 if( pH->aRhs[iCons]==0 ){
166564 WhereTerm *pTerm = &pH->pWC->a[pIdxInfo->aConstraint[iCons].iTermOffset];
 
 
166565 rc = sqlite3ValueFromExpr(
166566 pH->pParse->db, pTerm->pExpr->pRight, ENC(pH->pParse->db),
166567 SQLITE_AFF_BLOB, &pH->aRhs[iCons]
166568 );
166569 testcase( rc!=SQLITE_OK );
@@ -166715,13 +166999,12 @@
166715 while( rc==SQLITE_OK ){
166716 int i;
166717 Bitmask mNext = ALLBITS;
166718 assert( mNext>0 );
166719 for(i=0; i<nConstraint; i++){
166720 Bitmask mThis = (
166721 pWC->a[p->aConstraint[i].iTermOffset].prereqRight & ~mPrereq
166722 );
166723 if( mThis>mPrev && mThis<mNext ) mNext = mThis;
166724 }
166725 mPrev = mNext;
166726 if( mNext==ALLBITS ) break;
166727 if( mNext==mBest || mNext==mBestNoIn ) continue;
@@ -166753,11 +167036,10 @@
166753 rc = whereLoopAddVirtualOne(
166754 pBuilder, mPrereq, mPrereq, WO_IN, p, mNoOmit, &bIn, 0);
166755 }
166756 }
166757
166758 if( p->needToFreeIdxStr ) sqlite3_free(p->idxStr);
166759 freeIndexInfo(pParse->db, p);
166760 WHERETRACE(0x800, ("END %s.addVirtual(), rc=%d\n", pSrc->pTab->zName, rc));
166761 return rc;
166762 }
166763 #endif /* SQLITE_OMIT_VIRTUALTABLE */
@@ -167440,11 +167722,11 @@
167440 ** For the purposes of SQLite, a star-query is defined as a query
167441 ** with a large central table that is joined against four or more
167442 ** smaller tables. The central table is called the "fact" table.
167443 ** The smaller tables that get joined are "dimension tables".
167444 **
167445 ** SIDE EFFECT:
167446 **
167447 ** If pWInfo describes a star-query, then the cost on WhereLoops for the
167448 ** fact table is reduced. This heuristic helps keep fact tables in
167449 ** outer loops. Without this heuristic, paths with fact tables in outer
167450 ** loops tend to get pruned by the mxChoice limit on the number of paths,
@@ -167452,11 +167734,11 @@
167452 ** adjustment is stored in pWInfo->nOutStarDelta and the cost adjustment
167453 ** for each WhereLoop is stored in its rStarDelta field.
167454 */
167455 static int computeMxChoice(WhereInfo *pWInfo, LogEst nRowEst){
167456 int nLoop = pWInfo->nLevel; /* Number of terms in the join */
167457 if( nRowEst==0 && nLoop>=4 ){
167458 /* Check to see if we are dealing with a star schema and if so, reduce
167459 ** the cost of fact tables relative to dimension tables, as a heuristic
167460 ** to help keep the fact tables in outer loops.
167461 */
167462 int iLoop; /* Counter over join terms */
@@ -168168,10 +168450,14 @@
168168 ** might move from the right side to the left side of the RIGHT JOIN.
168169 ** Note: Due to (2), this condition can only arise if the table is
168170 ** the right-most table of a subquery that was flattened into the
168171 ** main query and that subquery was the right-hand operand of an
168172 ** inner join that held an ON or USING clause.
 
 
 
 
168173 **
168174 ** For example, given:
168175 **
168176 ** CREATE TABLE t1(ipk INTEGER PRIMARY KEY, v1);
168177 ** CREATE TABLE t2(ipk INTEGER PRIMARY KEY, v2);
@@ -168582,10 +168868,11 @@
168582 /* An ORDER/GROUP BY clause of more than 63 terms cannot be optimized */
168583 testcase( pOrderBy && pOrderBy->nExpr==BMS-1 );
168584 if( pOrderBy && pOrderBy->nExpr>=BMS ){
168585 pOrderBy = 0;
168586 wctrlFlags &= ~WHERE_WANT_DISTINCT;
 
168587 }
168588
168589 /* The number of tables in the FROM clause is limited by the number of
168590 ** bits in a Bitmask
168591 */
@@ -168882,14 +169169,14 @@
168882 ** some C-compiler optimizers from in-lining the
168883 ** sqlite3WhereCodeOneLoopStart() procedure, and it is important to
168884 ** in-line sqlite3WhereCodeOneLoopStart() for performance reasons.
168885 */
168886 notReady = ~(Bitmask)0;
168887 if( pWInfo->nLevel>=2
168888 && pResultSet!=0 /* these two combine to guarantee */
168889 && 0==(wctrlFlags & WHERE_AGG_DISTINCT) /* condition (1) above */
168890 && OptimizationEnabled(db, SQLITE_OmitNoopJoin)
168891 ){
168892 notReady = whereOmitNoopJoin(pWInfo, notReady);
168893 nTabList = pWInfo->nLevel;
168894 assert( nTabList>0 );
168895 }
@@ -170479,11 +170766,11 @@
170479 }
170480 if( bIntToNull ){
170481 int iDummy;
170482 Expr *pSub;
170483 pSub = sqlite3ExprSkipCollateAndLikely(pDup);
170484 if( sqlite3ExprIsInteger(pSub, &iDummy) ){
170485 pSub->op = TK_NULL;
170486 pSub->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
170487 pSub->u.zToken = 0;
170488 }
170489 }
@@ -172956,136 +173243,136 @@
172956 #define TK_EACH 41
172957 #define TK_FAIL 42
172958 #define TK_OR 43
172959 #define TK_AND 44
172960 #define TK_IS 45
172961 #define TK_MATCH 46
172962 #define TK_LIKE_KW 47
172963 #define TK_BETWEEN 48
172964 #define TK_IN 49
172965 #define TK_ISNULL 50
172966 #define TK_NOTNULL 51
172967 #define TK_NE 52
172968 #define TK_EQ 53
172969 #define TK_GT 54
172970 #define TK_LE 55
172971 #define TK_LT 56
172972 #define TK_GE 57
172973 #define TK_ESCAPE 58
172974 #define TK_ID 59
172975 #define TK_COLUMNKW 60
172976 #define TK_DO 61
172977 #define TK_FOR 62
172978 #define TK_IGNORE 63
172979 #define TK_INITIALLY 64
172980 #define TK_INSTEAD 65
172981 #define TK_NO 66
172982 #define TK_KEY 67
172983 #define TK_OF 68
172984 #define TK_OFFSET 69
172985 #define TK_PRAGMA 70
172986 #define TK_RAISE 71
172987 #define TK_RECURSIVE 72
172988 #define TK_REPLACE 73
172989 #define TK_RESTRICT 74
172990 #define TK_ROW 75
172991 #define TK_ROWS 76
172992 #define TK_TRIGGER 77
172993 #define TK_VACUUM 78
172994 #define TK_VIEW 79
172995 #define TK_VIRTUAL 80
172996 #define TK_WITH 81
172997 #define TK_NULLS 82
172998 #define TK_FIRST 83
172999 #define TK_LAST 84
173000 #define TK_CURRENT 85
173001 #define TK_FOLLOWING 86
173002 #define TK_PARTITION 87
173003 #define TK_PRECEDING 88
173004 #define TK_RANGE 89
173005 #define TK_UNBOUNDED 90
173006 #define TK_EXCLUDE 91
173007 #define TK_GROUPS 92
173008 #define TK_OTHERS 93
173009 #define TK_TIES 94
173010 #define TK_GENERATED 95
173011 #define TK_ALWAYS 96
173012 #define TK_MATERIALIZED 97
173013 #define TK_REINDEX 98
173014 #define TK_RENAME 99
173015 #define TK_CTIME_KW 100
173016 #define TK_ANY 101
173017 #define TK_BITAND 102
173018 #define TK_BITOR 103
173019 #define TK_LSHIFT 104
173020 #define TK_RSHIFT 105
173021 #define TK_PLUS 106
173022 #define TK_MINUS 107
173023 #define TK_STAR 108
173024 #define TK_SLASH 109
173025 #define TK_REM 110
173026 #define TK_CONCAT 111
173027 #define TK_PTR 112
173028 #define TK_COLLATE 113
173029 #define TK_BITNOT 114
173030 #define TK_ON 115
173031 #define TK_INDEXED 116
173032 #define TK_STRING 117
173033 #define TK_JOIN_KW 118
173034 #define TK_CONSTRAINT 119
173035 #define TK_DEFAULT 120
173036 #define TK_NULL 121
173037 #define TK_PRIMARY 122
173038 #define TK_UNIQUE 123
173039 #define TK_CHECK 124
173040 #define TK_REFERENCES 125
173041 #define TK_AUTOINCR 126
173042 #define TK_INSERT 127
173043 #define TK_DELETE 128
173044 #define TK_UPDATE 129
173045 #define TK_SET 130
173046 #define TK_DEFERRABLE 131
173047 #define TK_FOREIGN 132
173048 #define TK_DROP 133
173049 #define TK_UNION 134
173050 #define TK_ALL 135
173051 #define TK_EXCEPT 136
173052 #define TK_INTERSECT 137
173053 #define TK_SELECT 138
173054 #define TK_VALUES 139
173055 #define TK_DISTINCT 140
173056 #define TK_DOT 141
173057 #define TK_FROM 142
173058 #define TK_JOIN 143
173059 #define TK_USING 144
173060 #define TK_ORDER 145
173061 #define TK_GROUP 146
173062 #define TK_HAVING 147
173063 #define TK_LIMIT 148
173064 #define TK_WHERE 149
173065 #define TK_RETURNING 150
173066 #define TK_INTO 151
173067 #define TK_NOTHING 152
173068 #define TK_FLOAT 153
173069 #define TK_BLOB 154
173070 #define TK_INTEGER 155
173071 #define TK_VARIABLE 156
173072 #define TK_CASE 157
173073 #define TK_WHEN 158
173074 #define TK_THEN 159
173075 #define TK_ELSE 160
173076 #define TK_INDEX 161
173077 #define TK_ALTER 162
173078 #define TK_ADD 163
173079 #define TK_WINDOW 164
173080 #define TK_OVER 165
173081 #define TK_FILTER 166
173082 #define TK_COLUMN 167
173083 #define TK_AGG_FUNCTION 168
173084 #define TK_AGG_COLUMN 169
173085 #define TK_TRUEFALSE 170
173086 #define TK_ISNOT 171
173087 #define TK_FUNCTION 172
173088 #define TK_UPLUS 173
173089 #define TK_UMINUS 174
173090 #define TK_TRUTH 175
173091 #define TK_REGISTER 176
@@ -173162,11 +173449,11 @@
173162 #endif
173163 /************* Begin control #defines *****************************************/
173164 #define YYCODETYPE unsigned short int
173165 #define YYNOCODE 322
173166 #define YYACTIONTYPE unsigned short int
173167 #define YYWILDCARD 101
173168 #define sqlite3ParserTOKENTYPE Token
173169 typedef union {
173170 int yyinit;
173171 sqlite3ParserTOKENTYPE yy0;
173172 ExprList* yy14;
@@ -173299,452 +173586,456 @@
173299 ** yy_reduce_ofst[] For each state, the offset into yy_action for
173300 ** shifting non-terminals after a reduce.
173301 ** yy_default[] Default action for each state.
173302 **
173303 *********** Begin parsing tables **********************************************/
173304 #define YY_ACTTAB_COUNT (2167)
173305 static const YYACTIONTYPE yy_action[] = {
173306 /* 0 */ 576, 130, 127, 234, 1622, 550, 576, 1290, 1281, 576,
173307 /* 10 */ 329, 576, 1300, 214, 576, 130, 127, 234, 578, 413,
173308 /* 20 */ 578, 392, 1542, 51, 51, 524, 406, 1293, 530, 51,
173309 /* 30 */ 51, 983, 51, 51, 82, 82, 1107, 61, 61, 984,
173310 /* 40 */ 1107, 1292, 381, 137, 138, 91, 1228, 1228, 1063, 1066,
173311 /* 50 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 1577, 413,
173312 /* 60 */ 288, 288, 7, 288, 288, 423, 1050, 1050, 1064, 1067,
173313 /* 70 */ 290, 557, 493, 573, 525, 562, 573, 498, 562, 483,
173314 /* 80 */ 531, 264, 231, 137, 138, 91, 1228, 1228, 1063, 1066,
173315 /* 90 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 130, 127,
173316 /* 100 */ 234, 1506, 134, 134, 134, 134, 133, 133, 132, 132,
173317 /* 110 */ 132, 131, 128, 451, 1204, 1255, 1, 1, 582, 2,
173318 /* 120 */ 1259, 1571, 421, 1582, 380, 321, 1174, 155, 1174, 1584,
173319 /* 130 */ 413, 379, 1582, 544, 1341, 331, 112, 570, 570, 570,
173320 /* 140 */ 294, 1054, 134, 134, 134, 134, 133, 133, 132, 132,
173321 /* 150 */ 132, 131, 128, 451, 137, 138, 91, 1228, 1228, 1063,
173322 /* 160 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 288,
173323 /* 170 */ 288, 1204, 1205, 1204, 257, 288, 288, 511, 508, 507,
173324 /* 180 */ 139, 456, 573, 214, 562, 448, 447, 506, 573, 1616,
173325 /* 190 */ 562, 136, 136, 136, 136, 129, 401, 245, 134, 134,
173326 /* 200 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451,
173327 /* 210 */ 283, 472, 346, 134, 134, 134, 134, 133, 133, 132,
173328 /* 220 */ 132, 132, 131, 128, 451, 574, 157, 936, 936, 455,
173329 /* 230 */ 229, 522, 1236, 413, 1236, 136, 136, 136, 136, 134,
173330 /* 240 */ 134, 134, 134, 133, 133, 132, 132, 132, 131, 128,
173331 /* 250 */ 451, 132, 132, 132, 131, 128, 451, 137, 138, 91,
173332 /* 260 */ 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136,
173333 /* 270 */ 136, 136, 130, 127, 234, 451, 576, 413, 398, 1249,
173334 /* 280 */ 182, 93, 94, 134, 134, 134, 134, 133, 133, 132,
173335 /* 290 */ 132, 132, 131, 128, 451, 382, 388, 1204, 384, 82,
173336 /* 300 */ 82, 137, 138, 91, 1228, 1228, 1063, 1066, 1053, 1053,
173337 /* 310 */ 135, 135, 136, 136, 136, 136, 134, 134, 134, 134,
173338 /* 320 */ 133, 133, 132, 132, 132, 131, 128, 451, 133, 133,
173339 /* 330 */ 132, 132, 132, 131, 128, 451, 557, 1204, 303, 320,
173340 /* 340 */ 567, 123, 568, 481, 4, 556, 1149, 1657, 1628, 1657,
173341 /* 350 */ 45, 130, 127, 234, 1204, 1205, 1204, 1250, 571, 1169,
173342 /* 360 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131,
173343 /* 370 */ 128, 451, 1169, 288, 288, 1169, 1019, 576, 423, 1019,
173344 /* 380 */ 413, 452, 1602, 582, 2, 1259, 573, 44, 562, 96,
173345 /* 390 */ 321, 111, 155, 565, 1204, 1205, 1204, 523, 523, 1341,
173346 /* 400 */ 82, 82, 7, 44, 137, 138, 91, 1228, 1228, 1063,
173347 /* 410 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 296,
173348 /* 420 */ 1149, 1658, 1040, 1658, 1204, 1147, 320, 567, 121, 121,
173349 /* 430 */ 344, 467, 332, 344, 288, 288, 122, 557, 452, 577,
173350 /* 440 */ 452, 1169, 1169, 1028, 320, 567, 439, 573, 212, 562,
173351 /* 450 */ 1339, 1451, 547, 532, 1169, 1169, 1598, 1169, 1169, 417,
173352 /* 460 */ 320, 567, 245, 134, 134, 134, 134, 133, 133, 132,
173353 /* 470 */ 132, 132, 131, 128, 451, 1028, 1028, 1030, 1031, 35,
173354 /* 480 */ 44, 1204, 1205, 1204, 473, 288, 288, 1328, 413, 1307,
173355 /* 490 */ 373, 1595, 360, 227, 455, 1204, 197, 1328, 573, 1147,
173356 /* 500 */ 562, 1333, 1333, 275, 576, 1188, 576, 341, 46, 198,
173357 /* 510 */ 538, 219, 137, 138, 91, 1228, 1228, 1063, 1066, 1053,
173358 /* 520 */ 1053, 135, 135, 136, 136, 136, 136, 19, 19, 19,
173359 /* 530 */ 19, 413, 581, 1204, 1259, 512, 1204, 320, 567, 321,
173360 /* 540 */ 944, 155, 426, 492, 431, 943, 1204, 489, 1341, 1450,
173361 /* 550 */ 533, 1277, 1204, 1205, 1204, 137, 138, 91, 1228, 1228,
173362 /* 560 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173363 /* 570 */ 575, 134, 134, 134, 134, 133, 133, 132, 132, 132,
173364 /* 580 */ 131, 128, 451, 288, 288, 529, 288, 288, 373, 1595,
173365 /* 590 */ 1204, 1205, 1204, 1204, 1205, 1204, 573, 487, 562, 573,
173366 /* 600 */ 889, 562, 413, 1204, 1205, 1204, 886, 40, 22, 22,
173367 /* 610 */ 222, 245, 526, 1449, 134, 134, 134, 134, 133, 133,
173368 /* 620 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228,
173369 /* 630 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173370 /* 640 */ 136, 413, 182, 455, 1204, 879, 257, 288, 288, 511,
173371 /* 650 */ 508, 507, 373, 1595, 1568, 1331, 1331, 576, 889, 506,
173372 /* 660 */ 573, 44, 562, 560, 378, 137, 138, 91, 1228, 1228,
173373 /* 670 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173374 /* 680 */ 82, 82, 423, 576, 375, 134, 134, 134, 134, 133,
173375 /* 690 */ 133, 132, 132, 132, 131, 128, 451, 298, 288, 288,
173376 /* 700 */ 461, 1204, 1205, 1204, 1204, 535, 19, 19, 232, 550,
173377 /* 710 */ 1281, 573, 413, 562, 386, 437, 1187, 536, 320, 567,
173378 /* 720 */ 364, 433, 1279, 432, 134, 134, 134, 134, 133, 133,
173379 /* 730 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228,
173380 /* 740 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173381 /* 750 */ 136, 413, 213, 949, 1169, 1041, 449, 449, 449, 548,
173382 /* 760 */ 548, 1204, 1205, 1204, 7, 540, 1570, 1169, 377, 576,
173383 /* 770 */ 1169, 5, 1204, 1552, 3, 137, 138, 91, 1228, 1228,
173384 /* 780 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173385 /* 790 */ 576, 514, 19, 19, 1554, 134, 134, 134, 134, 133,
173386 /* 800 */ 133, 132, 132, 132, 131, 128, 451, 306, 1204, 434,
173387 /* 810 */ 1435, 1204, 1435, 19, 19, 274, 291, 372, 517, 367,
173388 /* 820 */ 516, 262, 413, 539, 551, 551, 1024, 363, 438, 1204,
173389 /* 830 */ 1205, 1204, 1659, 399, 134, 134, 134, 134, 133, 133,
173390 /* 840 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228,
173391 /* 850 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173392 /* 860 */ 136, 413, 481, 282, 282, 1204, 1205, 1204, 1204, 1205,
173393 /* 870 */ 1204, 131, 128, 451, 1568, 1568, 573, 1627, 562, 911,
173394 /* 880 */ 576, 428, 285, 429, 969, 137, 138, 91, 1228, 1228,
173395 /* 890 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173396 /* 900 */ 553, 576, 457, 19, 19, 134, 134, 134, 134, 133,
173397 /* 910 */ 133, 132, 132, 132, 131, 128, 451, 1345, 206, 158,
173398 /* 920 */ 1040, 1550, 48, 50, 19, 19, 1204, 289, 289, 573,
173399 /* 930 */ 1105, 562, 413, 1110, 1110, 495, 1125, 1029, 299, 207,
173400 /* 940 */ 573, 1028, 562, 403, 134, 134, 134, 134, 133, 133,
173401 /* 950 */ 132, 132, 132, 131, 128, 451, 137, 138, 91, 1228,
173402 /* 960 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173403 /* 970 */ 136, 576, 375, 1028, 1028, 1030, 576, 233, 288, 288,
173404 /* 980 */ 481, 576, 1126, 1204, 1205, 1204, 1569, 1569, 377, 377,
173405 /* 990 */ 576, 573, 558, 562, 82, 82, 1204, 1127, 481, 82,
173406 /* 1000 */ 82, 115, 969, 1188, 82, 82, 576, 902, 141, 479,
173407 /* 1010 */ 971, 442, 1128, 81, 81, 134, 134, 134, 134, 133,
173408 /* 1020 */ 133, 132, 132, 132, 131, 128, 451, 288, 288, 19,
173409 /* 1030 */ 19, 316, 498, 922, 576, 413, 317, 1568, 515, 23,
173410 /* 1040 */ 573, 557, 562, 923, 552, 1575, 903, 472, 346, 7,
173411 /* 1050 */ 559, 532, 267, 1204, 1205, 1204, 302, 82, 82, 137,
173412 /* 1060 */ 138, 91, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135,
173413 /* 1070 */ 136, 136, 136, 136, 304, 576, 387, 1541, 424, 413,
173414 /* 1080 */ 970, 166, 460, 1204, 215, 47, 1568, 1224, 260, 259,
173415 /* 1090 */ 258, 487, 410, 409, 445, 1368, 315, 336, 82, 82,
173416 /* 1100 */ 460, 459, 435, 137, 138, 91, 1228, 1228, 1063, 1066,
173417 /* 1110 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 134, 134,
173418 /* 1120 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451,
173419 /* 1130 */ 448, 447, 576, 358, 49, 446, 850, 851, 852, 1233,
173420 /* 1140 */ 1204, 1205, 1204, 487, 1235, 1224, 214, 108, 533, 1569,
173421 /* 1150 */ 498, 377, 1234, 1576, 498, 82, 82, 7, 333, 412,
173422 /* 1160 */ 335, 576, 134, 134, 134, 134, 133, 133, 132, 132,
173423 /* 1170 */ 132, 131, 128, 451, 460, 119, 534, 1236, 498, 1236,
173424 /* 1180 */ 111, 307, 413, 307, 145, 145, 1511, 10, 160, 267,
173425 /* 1190 */ 324, 343, 450, 1435, 353, 1505, 356, 325, 1569, 1340,
173426 /* 1200 */ 377, 498, 413, 520, 1511, 1513, 137, 138, 91, 1228,
173427 /* 1210 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173428 /* 1220 */ 136, 576, 413, 1336, 1224, 874, 137, 126, 91, 1228,
173429 /* 1230 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173430 /* 1240 */ 136, 862, 334, 305, 147, 147, 351, 138, 91, 1228,
173431 /* 1250 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173432 /* 1260 */ 136, 398, 1148, 6, 430, 134, 134, 134, 134, 133,
173433 /* 1270 */ 133, 132, 132, 132, 131, 128, 451, 882, 1511, 576,
173434 /* 1280 */ 1574, 893, 1224, 874, 7, 134, 134, 134, 134, 133,
173435 /* 1290 */ 133, 132, 132, 132, 131, 128, 451, 576, 546, 576,
173436 /* 1300 */ 470, 6, 66, 66, 576, 134, 134, 134, 134, 133,
173437 /* 1310 */ 133, 132, 132, 132, 131, 128, 451, 545, 1040, 1207,
173438 /* 1320 */ 67, 67, 21, 21, 576, 413, 1180, 53, 53, 969,
173439 /* 1330 */ 1282, 419, 328, 1435, 882, 1029, 1435, 1573, 503, 1028,
173440 /* 1340 */ 1250, 7, 488, 1085, 576, 463, 297, 68, 68, 463,
173441 /* 1350 */ 297, 91, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135,
173442 /* 1360 */ 136, 136, 136, 136, 576, 261, 576, 54, 54, 1126,
173443 /* 1370 */ 576, 1028, 1028, 1030, 576, 209, 238, 1207, 1180, 576,
173444 /* 1380 */ 471, 1498, 576, 1380, 1127, 287, 231, 69, 69, 70,
173445 /* 1390 */ 70, 569, 419, 71, 71, 420, 184, 72, 72, 1128,
173446 /* 1400 */ 576, 1188, 73, 73, 494, 55, 55, 443, 134, 134,
173447 /* 1410 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451,
173448 /* 1420 */ 564, 1244, 233, 56, 56, 97, 218, 485, 123, 568,
173449 /* 1430 */ 576, 4, 576, 983, 418, 576, 227, 576, 161, 576,
173450 /* 1440 */ 16, 984, 477, 576, 1223, 571, 576, 969, 123, 568,
173451 /* 1450 */ 363, 4, 576, 57, 57, 59, 59, 9, 60, 60,
173452 /* 1460 */ 74, 74, 75, 75, 108, 571, 76, 76, 452, 20,
173453 /* 1470 */ 20, 464, 576, 465, 576, 77, 77, 221, 1379, 125,
173454 /* 1480 */ 565, 576, 411, 576, 411, 242, 261, 576, 452, 576,
173455 /* 1490 */ 519, 474, 478, 534, 542, 143, 143, 144, 144, 541,
173456 /* 1500 */ 565, 466, 411, 411, 78, 78, 62, 62, 576, 1040,
173457 /* 1510 */ 79, 79, 63, 63, 542, 121, 121, 944, 1144, 543,
173458 /* 1520 */ 400, 462, 943, 122, 486, 452, 577, 452, 1557, 1040,
173459 /* 1530 */ 1028, 80, 80, 319, 576, 121, 121, 337, 38, 123,
173460 /* 1540 */ 568, 1530, 4, 122, 411, 452, 577, 452, 576, 120,
173461 /* 1550 */ 1028, 117, 576, 528, 576, 418, 571, 64, 64, 293,
173462 /* 1560 */ 109, 222, 1028, 1028, 1030, 1031, 35, 475, 342, 39,
173463 /* 1570 */ 111, 170, 170, 901, 900, 171, 171, 87, 87, 452,
173464 /* 1580 */ 908, 909, 1028, 1028, 1030, 1031, 35, 986, 987, 292,
173465 /* 1590 */ 300, 565, 1188, 323, 396, 396, 395, 277, 393, 553,
173466 /* 1600 */ 1092, 859, 244, 1032, 1529, 542, 576, 371, 490, 1021,
173467 /* 1610 */ 541, 266, 1188, 480, 239, 266, 327, 370, 348, 576,
173468 /* 1620 */ 1040, 482, 1376, 266, 326, 352, 121, 121, 355, 65,
173469 /* 1630 */ 65, 1153, 123, 568, 122, 4, 452, 577, 452, 357,
173470 /* 1640 */ 576, 1028, 83, 83, 576, 347, 576, 111, 1311, 571,
173471 /* 1650 */ 504, 361, 263, 111, 241, 1366, 359, 165, 1092, 111,
173472 /* 1660 */ 1324, 1032, 175, 146, 146, 43, 1310, 84, 84, 168,
173473 /* 1670 */ 168, 1309, 452, 1028, 1028, 1030, 1031, 35, 1601, 1192,
173474 /* 1680 */ 454, 1308, 240, 292, 565, 366, 376, 1389, 396, 396,
173475 /* 1690 */ 395, 277, 393, 1434, 1088, 859, 263, 974, 942, 266,
173476 /* 1700 */ 125, 576, 939, 1188, 125, 1104, 1362, 1104, 239, 576,
173477 /* 1710 */ 327, 123, 568, 1040, 4, 205, 1374, 414, 326, 121,
173478 /* 1720 */ 121, 948, 320, 567, 148, 148, 576, 122, 571, 452,
173479 /* 1730 */ 577, 452, 142, 142, 1028, 563, 1103, 576, 1103, 1589,
173480 /* 1740 */ 1439, 576, 872, 941, 159, 125, 458, 1289, 241, 169,
173481 /* 1750 */ 169, 452, 1280, 1268, 1267, 1269, 175, 576, 1609, 43,
173482 /* 1760 */ 162, 162, 499, 565, 152, 152, 1028, 1028, 1030, 1031,
173483 /* 1770 */ 35, 576, 280, 167, 1359, 312, 240, 12, 313, 576,
173484 /* 1780 */ 151, 151, 314, 90, 568, 224, 4, 397, 237, 339,
173485 /* 1790 */ 509, 576, 1040, 1307, 149, 149, 1188, 1421, 121, 121,
173486 /* 1800 */ 571, 576, 150, 150, 1416, 576, 122, 1409, 452, 577,
173487 /* 1810 */ 452, 414, 295, 1028, 86, 86, 320, 567, 340, 576,
173488 /* 1820 */ 345, 1426, 1425, 452, 88, 88, 301, 576, 85, 85,
173489 /* 1830 */ 404, 484, 555, 228, 369, 565, 1502, 1501, 210, 1371,
173490 /* 1840 */ 458, 1372, 52, 52, 211, 1028, 1028, 1030, 1031, 35,
173491 /* 1850 */ 58, 58, 1370, 1369, 566, 391, 223, 1612, 1244, 270,
173492 /* 1860 */ 1549, 186, 1547, 1241, 1040, 422, 96, 235, 195, 180,
173493 /* 1870 */ 121, 121, 92, 220, 1507, 1188, 1422, 95, 122, 188,
173494 /* 1880 */ 452, 577, 452, 1192, 454, 1028, 468, 292, 190, 191,
173495 /* 1890 */ 13, 192, 396, 396, 395, 277, 393, 469, 502, 859,
173496 /* 1900 */ 193, 247, 109, 402, 554, 1428, 1427, 14, 1430, 491,
173497 /* 1910 */ 476, 199, 239, 405, 327, 1496, 251, 1028, 1028, 1030,
173498 /* 1920 */ 1031, 35, 326, 102, 497, 281, 253, 203, 1518, 350,
173499 /* 1930 */ 354, 500, 254, 407, 1270, 255, 518, 123, 568, 436,
173500 /* 1940 */ 4, 1327, 1318, 104, 1326, 893, 1325, 1188, 229, 1317,
173501 /* 1950 */ 1297, 440, 241, 1626, 571, 1625, 408, 1296, 368, 1295,
173502 /* 1960 */ 175, 1624, 1594, 43, 527, 441, 310, 311, 374, 268,
173503 /* 1970 */ 269, 444, 1580, 1394, 1579, 140, 553, 452, 11, 1393,
173504 /* 1980 */ 240, 1483, 385, 110, 318, 537, 116, 216, 1350, 565,
173505 /* 1990 */ 42, 383, 389, 579, 1349, 390, 1198, 276, 278, 279,
173506 /* 2000 */ 580, 1265, 1260, 415, 416, 172, 185, 1534, 1535, 1533,
173507 /* 2010 */ 1532, 156, 173, 89, 308, 414, 225, 846, 1040, 453,
173508 /* 2020 */ 320, 567, 174, 217, 121, 121, 226, 322, 154, 236,
173509 /* 2030 */ 1102, 1100, 122, 330, 452, 577, 452, 187, 176, 1028,
173510 /* 2040 */ 1223, 243, 189, 925, 458, 246, 338, 1116, 194, 177,
173511 /* 2050 */ 178, 425, 98, 196, 179, 427, 99, 100, 101, 1119,
173512 /* 2060 */ 248, 1115, 163, 249, 24, 250, 1108, 1238, 349, 266,
173513 /* 2070 */ 200, 1028, 1028, 1030, 1031, 35, 496, 252, 201, 15,
173514 /* 2080 */ 370, 861, 501, 256, 202, 513, 505, 103, 25, 510,
173515 /* 2090 */ 362, 26, 891, 105, 365, 309, 904, 164, 27, 521,
173516 /* 2100 */ 106, 1188, 1185, 1069, 978, 1155, 107, 17, 1154, 181,
173517 /* 2110 */ 230, 284, 286, 204, 972, 125, 1175, 265, 28, 1171,
173518 /* 2120 */ 29, 30, 1173, 1179, 1160, 1178, 31, 41, 32, 208,
173519 /* 2130 */ 549, 33, 111, 113, 1083, 1070, 114, 8, 1068, 1072,
173520 /* 2140 */ 34, 1073, 561, 1124, 118, 271, 36, 18, 1194, 1033,
173521 /* 2150 */ 873, 124, 394, 37, 1193, 935, 1256, 572, 183, 153,
173522 /* 2160 */ 1256, 1256, 272, 1256, 1256, 273, 1617,
 
 
 
 
173523 };
173524 static const YYCODETYPE yy_lookahead[] = {
173525 /* 0 */ 194, 276, 277, 278, 216, 194, 194, 217, 194, 194,
173526 /* 10 */ 194, 194, 224, 194, 194, 276, 277, 278, 204, 19,
173527 /* 20 */ 206, 202, 297, 217, 218, 205, 207, 217, 205, 217,
173528 /* 30 */ 218, 31, 217, 218, 217, 218, 29, 217, 218, 39,
173529 /* 40 */ 33, 217, 220, 43, 44, 45, 46, 47, 48, 49,
173530 /* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 312, 19,
173531 /* 60 */ 240, 241, 316, 240, 241, 194, 46, 47, 48, 49,
173532 /* 70 */ 22, 254, 65, 253, 254, 255, 253, 194, 255, 194,
173533 /* 80 */ 263, 258, 259, 43, 44, 45, 46, 47, 48, 49,
173534 /* 90 */ 50, 51, 52, 53, 54, 55, 56, 57, 276, 277,
173535 /* 100 */ 278, 285, 102, 103, 104, 105, 106, 107, 108, 109,
173536 /* 110 */ 110, 111, 112, 113, 59, 186, 187, 188, 189, 190,
173537 /* 120 */ 191, 310, 239, 317, 318, 196, 86, 198, 88, 317,
173538 /* 130 */ 19, 319, 317, 318, 205, 264, 25, 211, 212, 213,
173539 /* 140 */ 205, 121, 102, 103, 104, 105, 106, 107, 108, 109,
173540 /* 150 */ 110, 111, 112, 113, 43, 44, 45, 46, 47, 48,
173541 /* 160 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 240,
173542 /* 170 */ 241, 116, 117, 118, 119, 240, 241, 122, 123, 124,
173543 /* 180 */ 69, 298, 253, 194, 255, 106, 107, 132, 253, 141,
173544 /* 190 */ 255, 54, 55, 56, 57, 58, 207, 268, 102, 103,
173545 /* 200 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
173546 /* 210 */ 214, 128, 129, 102, 103, 104, 105, 106, 107, 108,
173547 /* 220 */ 109, 110, 111, 112, 113, 134, 25, 136, 137, 300,
173548 /* 230 */ 165, 166, 153, 19, 155, 54, 55, 56, 57, 102,
173549 /* 240 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
173550 /* 250 */ 113, 108, 109, 110, 111, 112, 113, 43, 44, 45,
173551 /* 260 */ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
173552 /* 270 */ 56, 57, 276, 277, 278, 113, 194, 19, 22, 23,
173553 /* 280 */ 194, 67, 24, 102, 103, 104, 105, 106, 107, 108,
173554 /* 290 */ 109, 110, 111, 112, 113, 220, 250, 59, 252, 217,
173555 /* 300 */ 218, 43, 44, 45, 46, 47, 48, 49, 50, 51,
173556 /* 310 */ 52, 53, 54, 55, 56, 57, 102, 103, 104, 105,
173557 /* 320 */ 106, 107, 108, 109, 110, 111, 112, 113, 106, 107,
173558 /* 330 */ 108, 109, 110, 111, 112, 113, 254, 59, 205, 138,
173559 /* 340 */ 139, 19, 20, 194, 22, 263, 22, 23, 231, 25,
173560 /* 350 */ 72, 276, 277, 278, 116, 117, 118, 101, 36, 76,
173561 /* 360 */ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
173562 /* 370 */ 112, 113, 89, 240, 241, 92, 73, 194, 194, 73,
173563 /* 380 */ 19, 59, 188, 189, 190, 191, 253, 81, 255, 151,
173564 /* 390 */ 196, 25, 198, 71, 116, 117, 118, 311, 312, 205,
173565 /* 400 */ 217, 218, 316, 81, 43, 44, 45, 46, 47, 48,
173566 /* 410 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 270,
173567 /* 420 */ 22, 23, 100, 25, 59, 101, 138, 139, 106, 107,
173568 /* 430 */ 127, 128, 129, 127, 240, 241, 114, 254, 116, 117,
173569 /* 440 */ 118, 76, 76, 121, 138, 139, 263, 253, 264, 255,
173570 /* 450 */ 205, 275, 87, 19, 89, 89, 194, 92, 92, 199,
173571 /* 460 */ 138, 139, 268, 102, 103, 104, 105, 106, 107, 108,
173572 /* 470 */ 109, 110, 111, 112, 113, 153, 154, 155, 156, 157,
173573 /* 480 */ 81, 116, 117, 118, 129, 240, 241, 224, 19, 226,
173574 /* 490 */ 314, 315, 23, 25, 300, 59, 22, 234, 253, 101,
173575 /* 500 */ 255, 236, 237, 26, 194, 183, 194, 152, 72, 22,
173576 /* 510 */ 145, 150, 43, 44, 45, 46, 47, 48, 49, 50,
173577 /* 520 */ 51, 52, 53, 54, 55, 56, 57, 217, 218, 217,
173578 /* 530 */ 218, 19, 189, 59, 191, 23, 59, 138, 139, 196,
173579 /* 540 */ 135, 198, 232, 283, 232, 140, 59, 287, 205, 275,
173580 /* 550 */ 116, 205, 116, 117, 118, 43, 44, 45, 46, 47,
173581 /* 560 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
173582 /* 570 */ 194, 102, 103, 104, 105, 106, 107, 108, 109, 110,
173583 /* 580 */ 111, 112, 113, 240, 241, 194, 240, 241, 314, 315,
173584 /* 590 */ 116, 117, 118, 116, 117, 118, 253, 194, 255, 253,
173585 /* 600 */ 59, 255, 19, 116, 117, 118, 23, 22, 217, 218,
173586 /* 610 */ 142, 268, 205, 275, 102, 103, 104, 105, 106, 107,
173587 /* 620 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
173588 /* 630 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173589 /* 640 */ 57, 19, 194, 300, 59, 23, 119, 240, 241, 122,
173590 /* 650 */ 123, 124, 314, 315, 194, 236, 237, 194, 117, 132,
173591 /* 660 */ 253, 81, 255, 205, 194, 43, 44, 45, 46, 47,
173592 /* 670 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
173593 /* 680 */ 217, 218, 194, 194, 194, 102, 103, 104, 105, 106,
173594 /* 690 */ 107, 108, 109, 110, 111, 112, 113, 294, 240, 241,
173595 /* 700 */ 120, 116, 117, 118, 59, 194, 217, 218, 194, 194,
173596 /* 710 */ 194, 253, 19, 255, 194, 19, 23, 254, 138, 139,
173597 /* 720 */ 24, 232, 206, 233, 102, 103, 104, 105, 106, 107,
173598 /* 730 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
173599 /* 740 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173600 /* 750 */ 57, 19, 264, 108, 76, 23, 211, 212, 213, 311,
173601 /* 760 */ 312, 116, 117, 118, 316, 87, 306, 89, 308, 194,
173602 /* 770 */ 92, 22, 59, 194, 22, 43, 44, 45, 46, 47,
173603 /* 780 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
173604 /* 790 */ 194, 95, 217, 218, 194, 102, 103, 104, 105, 106,
173605 /* 800 */ 107, 108, 109, 110, 111, 112, 113, 232, 59, 113,
173606 /* 810 */ 194, 59, 194, 217, 218, 119, 120, 121, 122, 123,
173607 /* 820 */ 124, 125, 19, 145, 309, 310, 23, 131, 232, 116,
173608 /* 830 */ 117, 118, 303, 304, 102, 103, 104, 105, 106, 107,
173609 /* 840 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
173610 /* 850 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173611 /* 860 */ 57, 19, 194, 240, 241, 116, 117, 118, 116, 117,
173612 /* 870 */ 118, 111, 112, 113, 194, 194, 253, 23, 255, 25,
173613 /* 880 */ 194, 265, 23, 265, 25, 43, 44, 45, 46, 47,
173614 /* 890 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
173615 /* 900 */ 145, 194, 194, 217, 218, 102, 103, 104, 105, 106,
173616 /* 910 */ 107, 108, 109, 110, 111, 112, 113, 241, 232, 164,
173617 /* 920 */ 100, 194, 242, 242, 217, 218, 59, 240, 241, 253,
173618 /* 930 */ 11, 255, 19, 127, 128, 129, 23, 117, 270, 232,
173619 /* 940 */ 253, 121, 255, 205, 102, 103, 104, 105, 106, 107,
173620 /* 950 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
173621 /* 960 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173622 /* 970 */ 57, 194, 194, 153, 154, 155, 194, 118, 240, 241,
173623 /* 980 */ 194, 194, 12, 116, 117, 118, 306, 306, 308, 308,
173624 /* 990 */ 194, 253, 205, 255, 217, 218, 59, 27, 194, 217,
173625 /* 1000 */ 218, 159, 143, 183, 217, 218, 194, 35, 22, 271,
173626 /* 1010 */ 143, 233, 42, 217, 218, 102, 103, 104, 105, 106,
173627 /* 1020 */ 107, 108, 109, 110, 111, 112, 113, 240, 241, 217,
173628 /* 1030 */ 218, 254, 194, 63, 194, 19, 254, 194, 66, 22,
173629 /* 1040 */ 253, 254, 255, 73, 232, 312, 74, 128, 129, 316,
173630 /* 1050 */ 263, 19, 24, 116, 117, 118, 270, 217, 218, 43,
173631 /* 1060 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
173632 /* 1070 */ 54, 55, 56, 57, 270, 194, 280, 239, 61, 19,
173633 /* 1080 */ 143, 23, 194, 59, 24, 242, 194, 59, 127, 128,
173634 /* 1090 */ 129, 194, 106, 107, 254, 261, 262, 16, 217, 218,
173635 /* 1100 */ 212, 213, 130, 43, 44, 45, 46, 47, 48, 49,
173636 /* 1110 */ 50, 51, 52, 53, 54, 55, 56, 57, 102, 103,
173637 /* 1120 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
173638 /* 1130 */ 106, 107, 194, 16, 242, 254, 7, 8, 9, 115,
173639 /* 1140 */ 116, 117, 118, 194, 120, 117, 194, 115, 116, 306,
173640 /* 1150 */ 194, 308, 128, 312, 194, 217, 218, 316, 77, 207,
173641 /* 1160 */ 79, 194, 102, 103, 104, 105, 106, 107, 108, 109,
173642 /* 1170 */ 110, 111, 112, 113, 286, 159, 144, 153, 194, 155,
173643 /* 1180 */ 25, 229, 19, 231, 217, 218, 194, 22, 22, 24,
173644 /* 1190 */ 194, 294, 254, 194, 77, 239, 79, 194, 306, 239,
173645 /* 1200 */ 308, 194, 19, 145, 212, 213, 43, 44, 45, 46,
173646 /* 1210 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173647 /* 1220 */ 57, 194, 19, 239, 59, 59, 43, 44, 45, 46,
173648 /* 1230 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173649 /* 1240 */ 57, 21, 161, 294, 217, 218, 239, 44, 45, 46,
173650 /* 1250 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173651 /* 1260 */ 57, 22, 23, 214, 265, 102, 103, 104, 105, 106,
173652 /* 1270 */ 107, 108, 109, 110, 111, 112, 113, 59, 286, 194,
173653 /* 1280 */ 312, 126, 117, 117, 316, 102, 103, 104, 105, 106,
173654 /* 1290 */ 107, 108, 109, 110, 111, 112, 113, 194, 66, 194,
173655 /* 1300 */ 80, 214, 217, 218, 194, 102, 103, 104, 105, 106,
173656 /* 1310 */ 107, 108, 109, 110, 111, 112, 113, 85, 100, 59,
173657 /* 1320 */ 217, 218, 217, 218, 194, 19, 94, 217, 218, 25,
173658 /* 1330 */ 209, 210, 194, 194, 116, 117, 194, 312, 19, 121,
173659 /* 1340 */ 101, 316, 293, 123, 194, 262, 262, 217, 218, 266,
173660 /* 1350 */ 266, 45, 46, 47, 48, 49, 50, 51, 52, 53,
173661 /* 1360 */ 54, 55, 56, 57, 194, 46, 194, 217, 218, 12,
173662 /* 1370 */ 194, 153, 154, 155, 194, 288, 15, 117, 146, 194,
173663 /* 1380 */ 293, 161, 194, 194, 27, 258, 259, 217, 218, 217,
173664 /* 1390 */ 218, 209, 210, 217, 218, 301, 302, 217, 218, 42,
173665 /* 1400 */ 194, 183, 217, 218, 265, 217, 218, 265, 102, 103,
173666 /* 1410 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
173667 /* 1420 */ 63, 60, 118, 217, 218, 149, 150, 19, 19, 20,
173668 /* 1430 */ 194, 22, 194, 31, 115, 194, 25, 194, 22, 194,
173669 /* 1440 */ 24, 39, 115, 194, 25, 36, 194, 143, 19, 20,
173670 /* 1450 */ 131, 22, 194, 217, 218, 217, 218, 48, 217, 218,
173671 /* 1460 */ 217, 218, 217, 218, 115, 36, 217, 218, 59, 217,
173672 /* 1470 */ 218, 245, 194, 245, 194, 217, 218, 150, 194, 25,
173673 /* 1480 */ 71, 194, 256, 194, 256, 24, 46, 194, 59, 194,
173674 /* 1490 */ 108, 245, 245, 144, 85, 217, 218, 217, 218, 90,
173675 /* 1500 */ 71, 194, 256, 256, 217, 218, 217, 218, 194, 100,
173676 /* 1510 */ 217, 218, 217, 218, 85, 106, 107, 135, 23, 90,
173677 /* 1520 */ 25, 271, 140, 114, 116, 116, 117, 118, 194, 100,
173678 /* 1530 */ 121, 217, 218, 245, 194, 106, 107, 194, 22, 19,
173679 /* 1540 */ 20, 194, 22, 114, 256, 116, 117, 118, 194, 158,
173680 /* 1550 */ 121, 160, 194, 19, 194, 115, 36, 217, 218, 99,
173681 /* 1560 */ 149, 142, 153, 154, 155, 156, 157, 129, 23, 53,
173682 /* 1570 */ 25, 217, 218, 120, 121, 217, 218, 217, 218, 59,
173683 /* 1580 */ 7, 8, 153, 154, 155, 156, 157, 83, 84, 5,
173684 /* 1590 */ 152, 71, 183, 133, 10, 11, 12, 13, 14, 145,
173685 /* 1600 */ 59, 17, 141, 59, 194, 85, 194, 121, 194, 23,
173686 /* 1610 */ 90, 25, 183, 23, 30, 25, 32, 131, 194, 194,
173687 /* 1620 */ 100, 23, 194, 25, 40, 194, 106, 107, 194, 217,
173688 /* 1630 */ 218, 97, 19, 20, 114, 22, 116, 117, 118, 194,
173689 /* 1640 */ 194, 121, 217, 218, 194, 23, 194, 25, 227, 36,
173690 /* 1650 */ 23, 23, 25, 25, 70, 260, 194, 23, 117, 25,
173691 /* 1660 */ 194, 117, 78, 217, 218, 81, 227, 217, 218, 217,
173692 /* 1670 */ 218, 227, 59, 153, 154, 155, 156, 157, 0, 1,
173693 /* 1680 */ 2, 194, 98, 5, 71, 194, 194, 194, 10, 11,
173694 /* 1690 */ 12, 13, 14, 194, 23, 17, 25, 23, 23, 25,
173695 /* 1700 */ 25, 194, 23, 183, 25, 153, 194, 155, 30, 194,
173696 /* 1710 */ 32, 19, 20, 100, 22, 257, 194, 133, 40, 106,
173697 /* 1720 */ 107, 108, 138, 139, 217, 218, 194, 114, 36, 116,
173698 /* 1730 */ 117, 118, 217, 218, 121, 237, 153, 194, 155, 321,
173699 /* 1740 */ 194, 194, 23, 23, 25, 25, 162, 194, 70, 217,
173700 /* 1750 */ 218, 59, 194, 194, 194, 194, 78, 194, 194, 81,
173701 /* 1760 */ 217, 218, 290, 71, 217, 218, 153, 154, 155, 156,
173702 /* 1770 */ 157, 194, 289, 243, 257, 257, 98, 244, 257, 194,
173703 /* 1780 */ 217, 218, 257, 19, 20, 215, 22, 192, 299, 295,
173704 /* 1790 */ 221, 194, 100, 226, 217, 218, 183, 273, 106, 107,
173705 /* 1800 */ 36, 194, 217, 218, 269, 194, 114, 269, 116, 117,
173706 /* 1810 */ 118, 133, 246, 121, 217, 218, 138, 139, 247, 194,
173707 /* 1820 */ 246, 273, 273, 59, 217, 218, 247, 194, 217, 218,
173708 /* 1830 */ 273, 295, 140, 230, 220, 71, 220, 220, 250, 261,
173709 /* 1840 */ 162, 261, 217, 218, 250, 153, 154, 155, 156, 157,
173710 /* 1850 */ 217, 218, 261, 261, 282, 246, 244, 197, 60, 141,
173711 /* 1860 */ 201, 299, 201, 38, 100, 201, 151, 299, 22, 43,
173712 /* 1870 */ 106, 107, 296, 150, 285, 183, 274, 296, 114, 235,
173713 /* 1880 */ 116, 117, 118, 1, 2, 121, 18, 5, 238, 238,
173714 /* 1890 */ 272, 238, 10, 11, 12, 13, 14, 201, 18, 17,
173715 /* 1900 */ 238, 200, 149, 247, 140, 274, 274, 272, 235, 201,
173716 /* 1910 */ 247, 235, 30, 247, 32, 247, 200, 153, 154, 155,
173717 /* 1920 */ 156, 157, 40, 158, 62, 201, 200, 22, 292, 291,
173718 /* 1930 */ 201, 222, 200, 222, 201, 200, 115, 19, 20, 64,
173719 /* 1940 */ 22, 219, 228, 22, 219, 126, 219, 183, 165, 228,
173720 /* 1950 */ 219, 24, 70, 225, 36, 225, 222, 221, 219, 219,
173721 /* 1960 */ 78, 219, 315, 81, 307, 113, 284, 284, 222, 201,
173722 /* 1970 */ 91, 82, 320, 267, 320, 148, 145, 59, 22, 267,
173723 /* 1980 */ 98, 279, 201, 147, 281, 146, 158, 249, 251, 71,
173724 /* 1990 */ 25, 250, 248, 203, 251, 247, 13, 195, 195, 6,
173725 /* 2000 */ 193, 193, 193, 305, 305, 208, 302, 214, 214, 214,
173726 /* 2010 */ 214, 223, 208, 214, 223, 133, 215, 4, 100, 3,
173727 /* 2020 */ 138, 139, 208, 22, 106, 107, 215, 163, 16, 15,
173728 /* 2030 */ 23, 23, 114, 139, 116, 117, 118, 151, 130, 121,
173729 /* 2040 */ 25, 24, 142, 20, 162, 144, 16, 1, 142, 130,
173730 /* 2050 */ 130, 61, 53, 151, 130, 37, 53, 53, 53, 116,
173731 /* 2060 */ 34, 1, 5, 141, 22, 115, 68, 75, 161, 25,
173732 /* 2070 */ 68, 153, 154, 155, 156, 157, 41, 141, 115, 24,
173733 /* 2080 */ 131, 20, 19, 125, 22, 96, 67, 22, 22, 67,
173734 /* 2090 */ 23, 22, 59, 22, 24, 67, 28, 23, 34, 22,
173735 /* 2100 */ 149, 183, 23, 23, 116, 23, 25, 22, 97, 37,
173736 /* 2110 */ 141, 23, 23, 22, 143, 25, 75, 34, 34, 88,
173737 /* 2120 */ 34, 34, 86, 75, 23, 93, 34, 22, 34, 25,
173738 /* 2130 */ 24, 34, 25, 142, 23, 23, 142, 44, 23, 23,
173739 /* 2140 */ 22, 11, 25, 23, 25, 22, 22, 22, 1, 23,
173740 /* 2150 */ 23, 22, 15, 22, 1, 135, 322, 25, 25, 23,
173741 /* 2160 */ 322, 322, 141, 322, 322, 141, 141, 322, 322, 322,
173742 /* 2170 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173743 /* 2180 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173744 /* 2190 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173745 /* 2200 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173746 /* 2210 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173747 /* 2220 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173748 /* 2230 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173749 /* 2240 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173750 /* 2250 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
@@ -173754,123 +174045,127 @@
173754 /* 2290 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173755 /* 2300 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173756 /* 2310 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173757 /* 2320 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173758 /* 2330 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173759 /* 2340 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
173760 /* 2350 */ 322, 322, 322,
 
 
 
 
173761 };
173762 #define YY_SHIFT_COUNT (582)
173763 #define YY_SHIFT_MIN (0)
173764 #define YY_SHIFT_MAX (2153)
173765 static const unsigned short int yy_shift_ofst[] = {
173766 /* 0 */ 1882, 1678, 1584, 322, 322, 399, 306, 1409, 1429, 1520,
173767 /* 10 */ 1918, 1918, 1918, 580, 399, 399, 399, 399, 399, 0,
173768 /* 20 */ 0, 214, 1163, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173769 /* 30 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1024, 1024,
173770 /* 40 */ 365, 365, 55, 278, 436, 713, 713, 201, 201, 201,
173771 /* 50 */ 201, 40, 111, 258, 361, 469, 512, 583, 622, 693,
173772 /* 60 */ 732, 803, 842, 913, 1016, 1060, 1163, 1163, 1163, 1163,
173773 /* 70 */ 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163,
173774 /* 80 */ 1163, 1163, 1163, 1163, 1183, 1163, 1203, 1306, 1306, 1613,
173775 /* 90 */ 1692, 1764, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173776 /* 100 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173777 /* 110 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173778 /* 120 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173779 /* 130 */ 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918,
173780 /* 140 */ 1918, 1918, 137, 181, 181, 181, 181, 181, 181, 181,
173781 /* 150 */ 96, 222, 143, 477, 713, 1220, 1319, 713, 713, 79,
173782 /* 160 */ 79, 713, 760, 83, 65, 65, 65, 288, 162, 162,
173783 /* 170 */ 2167, 2167, 696, 696, 696, 238, 474, 474, 474, 474,
173784 /* 180 */ 970, 970, 678, 477, 324, 398, 713, 713, 713, 713,
173785 /* 190 */ 713, 713, 713, 713, 713, 713, 713, 713, 713, 713,
173786 /* 200 */ 713, 713, 713, 713, 713, 1032, 366, 366, 713, 919,
173787 /* 210 */ 283, 283, 434, 434, 1260, 1260, 755, 2167, 2167, 2167,
173788 /* 220 */ 2167, 2167, 2167, 2167, 1218, 820, 820, 487, 527, 585,
173789 /* 230 */ 645, 749, 867, 937, 752, 713, 713, 713, 713, 713,
173790 /* 240 */ 713, 713, 713, 713, 713, 303, 713, 713, 713, 713,
173791 /* 250 */ 713, 713, 713, 713, 713, 713, 713, 713, 972, 972,
173792 /* 260 */ 972, 713, 713, 713, 859, 713, 713, 713, 1165, 1232,
173793 /* 270 */ 713, 1357, 713, 713, 713, 713, 713, 713, 713, 713,
173794 /* 280 */ 806, 7, 91, 1028, 1028, 1028, 1028, 1304, 91, 91,
173795 /* 290 */ 1382, 986, 1129, 1361, 1327, 1276, 468, 1276, 1408, 1411,
173796 /* 300 */ 1327, 1327, 1411, 1327, 468, 1408, 1155, 854, 1440, 1402,
173797 /* 310 */ 1402, 1402, 1349, 1349, 1349, 1349, 1454, 1454, 1391, 1419,
173798 /* 320 */ 405, 1416, 1798, 1798, 1718, 1718, 1825, 1825, 1718, 1715,
173799 /* 330 */ 1723, 1846, 1826, 1868, 1868, 1868, 1868, 1718, 1880, 1753,
173800 /* 340 */ 1723, 1723, 1753, 1846, 1826, 1753, 1826, 1753, 1718, 1880,
173801 /* 350 */ 1765, 1862, 1718, 1880, 1905, 1718, 1880, 1718, 1880, 1905,
173802 /* 360 */ 1821, 1821, 1821, 1875, 1921, 1921, 1905, 1821, 1819, 1821,
173803 /* 370 */ 1875, 1821, 1821, 1783, 1927, 1852, 1852, 1905, 1718, 1879,
173804 /* 380 */ 1879, 1889, 1889, 1827, 1831, 1956, 1718, 1828, 1827, 1836,
173805 /* 390 */ 1839, 1753, 1965, 1983, 1983, 1993, 1993, 1993, 2167, 2167,
173806 /* 400 */ 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167,
173807 /* 410 */ 2167, 2167, 2167, 20, 1081, 256, 1239, 1117, 961, 1166,
173808 /* 420 */ 1495, 1460, 1516, 1461, 355, 1438, 1545, 1017, 1586, 1590,
173809 /* 430 */ 1598, 1622, 1627, 1628, 541, 1453, 1573, 1486, 1634, 1058,
173810 /* 440 */ 1534, 1541, 1671, 1674, 1504, 1675, 1679, 1552, 1583, 1719,
173811 /* 450 */ 1720, 1544, 48, 2013, 2016, 2001, 1864, 2014, 2012, 2007,
173812 /* 460 */ 2008, 1894, 1886, 1908, 2015, 2015, 2017, 1900, 2023, 1901,
173813 /* 470 */ 2030, 2046, 1906, 1919, 2015, 1920, 1990, 2018, 2015, 1902,
173814 /* 480 */ 1999, 2003, 2004, 2005, 1924, 1943, 2026, 1922, 2060, 2057,
173815 /* 490 */ 2042, 1950, 1907, 1998, 2044, 2002, 1992, 2035, 1936, 1963,
173816 /* 500 */ 2055, 2061, 2063, 1949, 1958, 2062, 2019, 2065, 2066, 2067,
173817 /* 510 */ 2069, 2022, 2033, 2070, 1989, 2068, 2071, 2028, 2072, 2074,
173818 /* 520 */ 2064, 1951, 2077, 2079, 2080, 2081, 2082, 2085, 2011, 1969,
173819 /* 530 */ 2088, 2089, 1988, 2083, 2091, 1971, 2090, 2084, 2086, 2087,
173820 /* 540 */ 2092, 2031, 2041, 2036, 2093, 2048, 2032, 2094, 2101, 2105,
173821 /* 550 */ 2106, 2104, 2107, 2097, 1991, 1994, 2111, 2090, 2112, 2115,
173822 /* 560 */ 2116, 2118, 2117, 2119, 2120, 2123, 2130, 2124, 2125, 2126,
173823 /* 570 */ 2127, 2129, 2131, 2132, 2020, 2021, 2024, 2025, 2133, 2136,
173824 /* 580 */ 2137, 2147, 2153,
173825 };
173826 #define YY_REDUCE_COUNT (412)
173827 #define YY_REDUCE_MIN (-275)
173828 #define YY_REDUCE_MAX (1814)
173829 static const short yy_reduce_ofst[] = {
173830 /* 0 */ -71, 194, 343, 787, -180, -177, 738, -194, -188, -185,
173831 /* 10 */ -183, 82, 183, -65, 133, 245, 346, 407, 458, -178,
173832 /* 20 */ 75, -275, -4, 310, 312, 489, 575, 596, 463, 686,
173833 /* 30 */ 707, 777, 782, 812, 840, 796, 881, 938, 888, 992,
173834 /* 40 */ 86, 448, 952, 680, 681, 843, 892, 623, 687, 623,
173835 /* 50 */ 687, -261, -261, -261, -261, -261, -261, -261, -261, -261,
173836 /* 60 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
173837 /* 70 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
173838 /* 80 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, 391,
173839 /* 90 */ 967, 1027, 1085, 1103, 1105, 1110, 1130, 1150, 1170, 1172,
173840 /* 100 */ 1176, 1180, 1185, 1188, 1206, 1236, 1238, 1241, 1243, 1245,
173841 /* 110 */ 1249, 1252, 1258, 1278, 1280, 1287, 1289, 1293, 1295, 1314,
173842 /* 120 */ 1340, 1354, 1358, 1360, 1412, 1425, 1446, 1450, 1452, 1507,
173843 /* 130 */ 1515, 1532, 1543, 1547, 1563, 1577, 1585, 1597, 1607, 1611,
173844 /* 140 */ 1625, 1633, -261, -261, -261, -261, -261, -261, -261, -261,
173845 /* 150 */ -261, -261, -261, -186, -117, 260, 263, 460, 515, -74,
173846 /* 160 */ 545, -181, -261, 1087, 176, 274, 338, 676, -261, -261,
173847 /* 170 */ -261, -261, -212, -212, -212, -184, 149, 668, 786, 804,
173848 /* 180 */ 265, 419, -254, 516, 529, 529, -11, -129, 184, 488,
173849 /* 190 */ 838, 956, 960, 984, 403, 616, 897, 618, 999, 949,
173850 /* 200 */ 1139, 1007, 490, 778, 1142, 834, 733, 841, -189, 1049,
173851 /* 210 */ 968, 1025, 1083, 1084, 1121, 1182, 46, 1094, 1226, 1228,
173852 /* 220 */ 1246, 1247, 1127, 1288, -210, -190, -176, -115, 117, 262,
173853 /* 230 */ 376, 470, 511, 514, 520, 579, 600, 708, 727, 996,
173854 /* 240 */ 1003, 1138, 1189, 1284, 1307, 1250, 1334, 1343, 1347, 1410,
173855 /* 250 */ 1414, 1424, 1428, 1431, 1434, 1445, 1462, 1466, 1421, 1439,
173856 /* 260 */ 1444, 1487, 1491, 1492, 1395, 1493, 1499, 1512, 1458, 1418,
173857 /* 270 */ 1522, 1498, 1546, 376, 1553, 1558, 1559, 1560, 1561, 1564,
173858 /* 280 */ 1472, 1483, 1530, 1517, 1518, 1521, 1525, 1395, 1530, 1530,
173859 /* 290 */ 1533, 1570, 1595, 1489, 1524, 1535, 1566, 1538, 1494, 1571,
173860 /* 300 */ 1548, 1549, 1579, 1557, 1574, 1536, 1569, 1603, 1567, 1614,
173861 /* 310 */ 1616, 1617, 1578, 1580, 1591, 1592, 1588, 1594, 1572, 1609,
173862 /* 320 */ 1612, 1660, 1562, 1568, 1659, 1661, 1576, 1581, 1664, 1589,
173863 /* 330 */ 1602, 1618, 1644, 1650, 1651, 1653, 1662, 1696, 1701, 1656,
173864 /* 340 */ 1631, 1632, 1663, 1635, 1673, 1666, 1676, 1668, 1708, 1716,
173865 /* 350 */ 1636, 1638, 1724, 1726, 1709, 1729, 1732, 1733, 1735, 1711,
173866 /* 360 */ 1722, 1725, 1727, 1714, 1728, 1730, 1734, 1731, 1736, 1739,
173867 /* 370 */ 1721, 1740, 1742, 1647, 1657, 1682, 1683, 1746, 1768, 1652,
173868 /* 380 */ 1654, 1706, 1712, 1737, 1741, 1702, 1781, 1703, 1743, 1738,
173869 /* 390 */ 1744, 1748, 1790, 1802, 1803, 1807, 1808, 1809, 1698, 1699,
173870 /* 400 */ 1704, 1797, 1793, 1794, 1795, 1796, 1804, 1788, 1791, 1801,
173871 /* 410 */ 1811, 1799, 1814,
173872 };
173873 static const YYACTIONTYPE yy_default[] = {
173874 /* 0 */ 1663, 1663, 1663, 1491, 1254, 1367, 1254, 1254, 1254, 1254,
173875 /* 10 */ 1491, 1491, 1491, 1254, 1254, 1254, 1254, 1254, 1254, 1397,
173876 /* 20 */ 1397, 1544, 1287, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
@@ -173949,56 +174244,57 @@
173949 */
173950 #ifdef YYFALLBACK
173951 static const YYCODETYPE yyFallback[] = {
173952 0, /* $ => nothing */
173953 0, /* SEMI => nothing */
173954 59, /* EXPLAIN => ID */
173955 59, /* QUERY => ID */
173956 59, /* PLAN => ID */
173957 59, /* BEGIN => ID */
173958 0, /* TRANSACTION => nothing */
173959 59, /* DEFERRED => ID */
173960 59, /* IMMEDIATE => ID */
173961 59, /* EXCLUSIVE => ID */
173962 0, /* COMMIT => nothing */
173963 59, /* END => ID */
173964 59, /* ROLLBACK => ID */
173965 59, /* SAVEPOINT => ID */
173966 59, /* RELEASE => ID */
173967 0, /* TO => nothing */
173968 0, /* TABLE => nothing */
173969 0, /* CREATE => nothing */
173970 59, /* IF => ID */
173971 0, /* NOT => nothing */
173972 0, /* EXISTS => nothing */
173973 59, /* TEMP => ID */
173974 0, /* LP => nothing */
173975 0, /* RP => nothing */
173976 0, /* AS => nothing */
173977 0, /* COMMA => nothing */
173978 59, /* WITHOUT => ID */
173979 59, /* ABORT => ID */
173980 59, /* ACTION => ID */
173981 59, /* AFTER => ID */
173982 59, /* ANALYZE => ID */
173983 59, /* ASC => ID */
173984 59, /* ATTACH => ID */
173985 59, /* BEFORE => ID */
173986 59, /* BY => ID */
173987 59, /* CASCADE => ID */
173988 59, /* CAST => ID */
173989 59, /* CONFLICT => ID */
173990 59, /* DATABASE => ID */
173991 59, /* DESC => ID */
173992 59, /* DETACH => ID */
173993 59, /* EACH => ID */
173994 59, /* FAIL => ID */
173995 0, /* OR => nothing */
173996 0, /* AND => nothing */
173997 0, /* IS => nothing */
173998 59, /* MATCH => ID */
173999 59, /* LIKE_KW => ID */
 
174000 0, /* BETWEEN => nothing */
174001 0, /* IN => nothing */
174002 0, /* ISNULL => nothing */
174003 0, /* NOTNULL => nothing */
174004 0, /* NE => nothing */
@@ -174007,51 +174303,51 @@
174007 0, /* LE => nothing */
174008 0, /* LT => nothing */
174009 0, /* GE => nothing */
174010 0, /* ESCAPE => nothing */
174011 0, /* ID => nothing */
174012 59, /* COLUMNKW => ID */
174013 59, /* DO => ID */
174014 59, /* FOR => ID */
174015 59, /* IGNORE => ID */
174016 59, /* INITIALLY => ID */
174017 59, /* INSTEAD => ID */
174018 59, /* NO => ID */
174019 59, /* KEY => ID */
174020 59, /* OF => ID */
174021 59, /* OFFSET => ID */
174022 59, /* PRAGMA => ID */
174023 59, /* RAISE => ID */
174024 59, /* RECURSIVE => ID */
174025 59, /* REPLACE => ID */
174026 59, /* RESTRICT => ID */
174027 59, /* ROW => ID */
174028 59, /* ROWS => ID */
174029 59, /* TRIGGER => ID */
174030 59, /* VACUUM => ID */
174031 59, /* VIEW => ID */
174032 59, /* VIRTUAL => ID */
174033 59, /* WITH => ID */
174034 59, /* NULLS => ID */
174035 59, /* FIRST => ID */
174036 59, /* LAST => ID */
174037 59, /* CURRENT => ID */
174038 59, /* FOLLOWING => ID */
174039 59, /* PARTITION => ID */
174040 59, /* PRECEDING => ID */
174041 59, /* RANGE => ID */
174042 59, /* UNBOUNDED => ID */
174043 59, /* EXCLUDE => ID */
174044 59, /* GROUPS => ID */
174045 59, /* OTHERS => ID */
174046 59, /* TIES => ID */
174047 59, /* GENERATED => ID */
174048 59, /* ALWAYS => ID */
174049 59, /* MATERIALIZED => ID */
174050 59, /* REINDEX => ID */
174051 59, /* RENAME => ID */
174052 59, /* CTIME_KW => ID */
174053 0, /* ANY => nothing */
174054 0, /* BITAND => nothing */
174055 0, /* BITOR => nothing */
174056 0, /* LSHIFT => nothing */
174057 0, /* RSHIFT => nothing */
@@ -174118,11 +174414,10 @@
174118 0, /* FILTER => nothing */
174119 0, /* COLUMN => nothing */
174120 0, /* AGG_FUNCTION => nothing */
174121 0, /* AGG_COLUMN => nothing */
174122 0, /* TRUEFALSE => nothing */
174123 0, /* ISNOT => nothing */
174124 0, /* FUNCTION => nothing */
174125 0, /* UPLUS => nothing */
174126 0, /* UMINUS => nothing */
174127 0, /* TRUTH => nothing */
174128 0, /* REGISTER => nothing */
@@ -174262,136 +174557,136 @@
174262 /* 41 */ "EACH",
174263 /* 42 */ "FAIL",
174264 /* 43 */ "OR",
174265 /* 44 */ "AND",
174266 /* 45 */ "IS",
174267 /* 46 */ "MATCH",
174268 /* 47 */ "LIKE_KW",
174269 /* 48 */ "BETWEEN",
174270 /* 49 */ "IN",
174271 /* 50 */ "ISNULL",
174272 /* 51 */ "NOTNULL",
174273 /* 52 */ "NE",
174274 /* 53 */ "EQ",
174275 /* 54 */ "GT",
174276 /* 55 */ "LE",
174277 /* 56 */ "LT",
174278 /* 57 */ "GE",
174279 /* 58 */ "ESCAPE",
174280 /* 59 */ "ID",
174281 /* 60 */ "COLUMNKW",
174282 /* 61 */ "DO",
174283 /* 62 */ "FOR",
174284 /* 63 */ "IGNORE",
174285 /* 64 */ "INITIALLY",
174286 /* 65 */ "INSTEAD",
174287 /* 66 */ "NO",
174288 /* 67 */ "KEY",
174289 /* 68 */ "OF",
174290 /* 69 */ "OFFSET",
174291 /* 70 */ "PRAGMA",
174292 /* 71 */ "RAISE",
174293 /* 72 */ "RECURSIVE",
174294 /* 73 */ "REPLACE",
174295 /* 74 */ "RESTRICT",
174296 /* 75 */ "ROW",
174297 /* 76 */ "ROWS",
174298 /* 77 */ "TRIGGER",
174299 /* 78 */ "VACUUM",
174300 /* 79 */ "VIEW",
174301 /* 80 */ "VIRTUAL",
174302 /* 81 */ "WITH",
174303 /* 82 */ "NULLS",
174304 /* 83 */ "FIRST",
174305 /* 84 */ "LAST",
174306 /* 85 */ "CURRENT",
174307 /* 86 */ "FOLLOWING",
174308 /* 87 */ "PARTITION",
174309 /* 88 */ "PRECEDING",
174310 /* 89 */ "RANGE",
174311 /* 90 */ "UNBOUNDED",
174312 /* 91 */ "EXCLUDE",
174313 /* 92 */ "GROUPS",
174314 /* 93 */ "OTHERS",
174315 /* 94 */ "TIES",
174316 /* 95 */ "GENERATED",
174317 /* 96 */ "ALWAYS",
174318 /* 97 */ "MATERIALIZED",
174319 /* 98 */ "REINDEX",
174320 /* 99 */ "RENAME",
174321 /* 100 */ "CTIME_KW",
174322 /* 101 */ "ANY",
174323 /* 102 */ "BITAND",
174324 /* 103 */ "BITOR",
174325 /* 104 */ "LSHIFT",
174326 /* 105 */ "RSHIFT",
174327 /* 106 */ "PLUS",
174328 /* 107 */ "MINUS",
174329 /* 108 */ "STAR",
174330 /* 109 */ "SLASH",
174331 /* 110 */ "REM",
174332 /* 111 */ "CONCAT",
174333 /* 112 */ "PTR",
174334 /* 113 */ "COLLATE",
174335 /* 114 */ "BITNOT",
174336 /* 115 */ "ON",
174337 /* 116 */ "INDEXED",
174338 /* 117 */ "STRING",
174339 /* 118 */ "JOIN_KW",
174340 /* 119 */ "CONSTRAINT",
174341 /* 120 */ "DEFAULT",
174342 /* 121 */ "NULL",
174343 /* 122 */ "PRIMARY",
174344 /* 123 */ "UNIQUE",
174345 /* 124 */ "CHECK",
174346 /* 125 */ "REFERENCES",
174347 /* 126 */ "AUTOINCR",
174348 /* 127 */ "INSERT",
174349 /* 128 */ "DELETE",
174350 /* 129 */ "UPDATE",
174351 /* 130 */ "SET",
174352 /* 131 */ "DEFERRABLE",
174353 /* 132 */ "FOREIGN",
174354 /* 133 */ "DROP",
174355 /* 134 */ "UNION",
174356 /* 135 */ "ALL",
174357 /* 136 */ "EXCEPT",
174358 /* 137 */ "INTERSECT",
174359 /* 138 */ "SELECT",
174360 /* 139 */ "VALUES",
174361 /* 140 */ "DISTINCT",
174362 /* 141 */ "DOT",
174363 /* 142 */ "FROM",
174364 /* 143 */ "JOIN",
174365 /* 144 */ "USING",
174366 /* 145 */ "ORDER",
174367 /* 146 */ "GROUP",
174368 /* 147 */ "HAVING",
174369 /* 148 */ "LIMIT",
174370 /* 149 */ "WHERE",
174371 /* 150 */ "RETURNING",
174372 /* 151 */ "INTO",
174373 /* 152 */ "NOTHING",
174374 /* 153 */ "FLOAT",
174375 /* 154 */ "BLOB",
174376 /* 155 */ "INTEGER",
174377 /* 156 */ "VARIABLE",
174378 /* 157 */ "CASE",
174379 /* 158 */ "WHEN",
174380 /* 159 */ "THEN",
174381 /* 160 */ "ELSE",
174382 /* 161 */ "INDEX",
174383 /* 162 */ "ALTER",
174384 /* 163 */ "ADD",
174385 /* 164 */ "WINDOW",
174386 /* 165 */ "OVER",
174387 /* 166 */ "FILTER",
174388 /* 167 */ "COLUMN",
174389 /* 168 */ "AGG_FUNCTION",
174390 /* 169 */ "AGG_COLUMN",
174391 /* 170 */ "TRUEFALSE",
174392 /* 171 */ "ISNOT",
174393 /* 172 */ "FUNCTION",
174394 /* 173 */ "UPLUS",
174395 /* 174 */ "UMINUS",
174396 /* 175 */ "TRUTH",
174397 /* 176 */ "REGISTER",
@@ -236537,11 +236832,11 @@
236537 if( pConfig ){
236538 int i;
236539 if( pConfig->t.pTok ){
236540 pConfig->t.pTokApi->xDelete(pConfig->t.pTok);
236541 }
236542 sqlite3_free(pConfig->t.azArg);
236543 sqlite3_free(pConfig->zDb);
236544 sqlite3_free(pConfig->zName);
236545 for(i=0; i<pConfig->nCol; i++){
236546 sqlite3_free(pConfig->azCol[i]);
236547 }
@@ -250352,15 +250647,15 @@
250352 ** A > or >= against the rowid: ">"
250353 **
250354 ** This function ensures that there is at most one "r" or "=". And that if
250355 ** there exists an "=" then there is no "<" or ">".
250356 **
 
 
 
250357 ** Costs are assigned as follows:
250358 **
250359 ** a) If an unusable MATCH operator is present in the WHERE clause, the
250360 ** cost is unconditionally set to 1e50 (a really big number).
250361 **
250362 ** a) If a MATCH operator is present, the cost depends on the other
250363 ** constraints also present. As follows:
250364 **
250365 ** * No other constraints: cost=1000.0
250366 ** * One rowid range constraint: cost=750.0
@@ -250388,11 +250683,11 @@
250388 int iCons = 0;
250389
250390 int bSeenEq = 0;
250391 int bSeenGt = 0;
250392 int bSeenLt = 0;
250393 int bSeenMatch = 0;
250394 int bSeenRank = 0;
250395
250396
250397 assert( SQLITE_INDEX_CONSTRAINT_EQ<SQLITE_INDEX_CONSTRAINT_MATCH );
250398 assert( SQLITE_INDEX_CONSTRAINT_GT<SQLITE_INDEX_CONSTRAINT_MATCH );
@@ -250419,22 +250714,19 @@
250419 || (p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol>=nCol)
250420 ){
250421 /* A MATCH operator or equivalent */
250422 if( p->usable==0 || iCol<0 ){
250423 /* As there exists an unusable MATCH constraint this is an
250424 ** unusable plan. Set a prohibitively high cost. */
250425 pInfo->estimatedCost = 1e50;
250426 assert( iIdxStr < pInfo->nConstraint*6 + 1 );
250427 idxStr[iIdxStr] = 0;
250428 return SQLITE_OK;
250429 }else{
250430 if( iCol==nCol+1 ){
250431 if( bSeenRank ) continue;
250432 idxStr[iIdxStr++] = 'r';
250433 bSeenRank = 1;
250434 }else if( iCol>=0 ){
250435 bSeenMatch = 1;
250436 idxStr[iIdxStr++] = 'M';
250437 sqlite3_snprintf(6, &idxStr[iIdxStr], "%d", iCol);
250438 idxStr += strlen(&idxStr[iIdxStr]);
250439 assert( idxStr[iIdxStr]=='\0' );
250440 }
@@ -250447,11 +250739,11 @@
250447 idxStr[iIdxStr++] = p->op==FTS5_PATTERN_LIKE ? 'L' : 'G';
250448 sqlite3_snprintf(6, &idxStr[iIdxStr], "%d", iCol);
250449 idxStr += strlen(&idxStr[iIdxStr]);
250450 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
250451 assert( idxStr[iIdxStr]=='\0' );
250452 bSeenMatch = 1;
250453 }else if( bSeenEq==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol<0 ){
250454 idxStr[iIdxStr++] = '=';
250455 bSeenEq = 1;
250456 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
250457 }
@@ -250484,11 +250776,11 @@
250484 **
250485 ** Note that tokendata=1 tables cannot currently handle "ORDER BY rowid DESC".
250486 */
250487 if( pInfo->nOrderBy==1 ){
250488 int iSort = pInfo->aOrderBy[0].iColumn;
250489 if( iSort==(pConfig->nCol+1) && bSeenMatch ){
250490 idxFlags |= FTS5_BI_ORDER_RANK;
250491 }else if( iSort==-1 && (!pInfo->aOrderBy[0].desc || !pConfig->bTokendata) ){
250492 idxFlags |= FTS5_BI_ORDER_ROWID;
250493 }
250494 if( BitFlagTest(idxFlags, FTS5_BI_ORDER_RANK|FTS5_BI_ORDER_ROWID) ){
@@ -250499,18 +250791,21 @@
250499 }
250500 }
250501
250502 /* Calculate the estimated cost based on the flags set in idxFlags. */
250503 if( bSeenEq ){
250504 pInfo->estimatedCost = bSeenMatch ? 100.0 : 10.0;
250505 if( bSeenMatch==0 ) fts5SetUniqueFlag(pInfo);
250506 }else if( bSeenLt && bSeenGt ){
250507 pInfo->estimatedCost = bSeenMatch ? 500.0 : 250000.0;
250508 }else if( bSeenLt || bSeenGt ){
250509 pInfo->estimatedCost = bSeenMatch ? 750.0 : 750000.0;
250510 }else{
250511 pInfo->estimatedCost = bSeenMatch ? 1000.0 : 1000000.0;
 
 
 
250512 }
250513
250514 pInfo->idxNum = idxFlags;
250515 return SQLITE_OK;
250516 }
@@ -251522,10 +251817,11 @@
251522 "'delete' may not be used with a contentless_delete=1 table"
251523 );
251524 rc = SQLITE_ERROR;
251525 }else{
251526 rc = fts5SpecialDelete(pTab, apVal);
 
251527 }
251528 }else{
251529 rc = fts5SpecialInsert(pTab, z, apVal[2 + pConfig->nCol + 1]);
251530 }
251531 }else{
@@ -252775,11 +253071,11 @@
252775 int nArg, /* Number of args */
252776 sqlite3_value **apUnused /* Function arguments */
252777 ){
252778 assert( nArg==0 );
252779 UNUSED_PARAM2(nArg, apUnused);
252780 sqlite3_result_text(pCtx, "fts5: 2024-05-30 11:14:16 ee92fa8366b743266b17c692499087c0d11b9302d096c3dfb4e6356b467e939e", -1, SQLITE_TRANSIENT);
252781 }
252782
252783 /*
252784 ** Return true if zName is the extension on one of the shadow tables used
252785 ** by this module.
252786
--- 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 ** 33a3f327855b427ae6ba0057218d043a1417.
22 */
23 #define SQLITE_CORE 1
24 #define SQLITE_AMALGAMATION 1
25 #ifndef SQLITE_PRIVATE
26 # define SQLITE_PRIVATE static
@@ -459,11 +459,11 @@
459 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
460 ** [sqlite_version()] and [sqlite_source_id()].
461 */
462 #define SQLITE_VERSION "3.47.0"
463 #define SQLITE_VERSION_NUMBER 3047000
464 #define SQLITE_SOURCE_ID "2024-06-11 18:22:48 33a3f327855b427ae6ba0057218d043a1417bc9d780728f47f23acdd836e1686"
465
466 /*
467 ** CAPI3REF: Run-Time Library Version Numbers
468 ** KEYWORDS: sqlite3_version sqlite3_sourceid
469 **
@@ -11143,12 +11143,10 @@
11143 #endif
11144
11145 #if defined(__wasi__)
11146 # undef SQLITE_WASI
11147 # define SQLITE_WASI 1
 
 
11148 # ifndef SQLITE_OMIT_LOAD_EXTENSION
11149 # define SQLITE_OMIT_LOAD_EXTENSION
11150 # endif
11151 # ifndef SQLITE_THREADSAFE
11152 # define SQLITE_THREADSAFE 0
@@ -14530,136 +14528,136 @@
14528 #define TK_EACH 41
14529 #define TK_FAIL 42
14530 #define TK_OR 43
14531 #define TK_AND 44
14532 #define TK_IS 45
14533 #define TK_ISNOT 46
14534 #define TK_MATCH 47
14535 #define TK_LIKE_KW 48
14536 #define TK_BETWEEN 49
14537 #define TK_IN 50
14538 #define TK_ISNULL 51
14539 #define TK_NOTNULL 52
14540 #define TK_NE 53
14541 #define TK_EQ 54
14542 #define TK_GT 55
14543 #define TK_LE 56
14544 #define TK_LT 57
14545 #define TK_GE 58
14546 #define TK_ESCAPE 59
14547 #define TK_ID 60
14548 #define TK_COLUMNKW 61
14549 #define TK_DO 62
14550 #define TK_FOR 63
14551 #define TK_IGNORE 64
14552 #define TK_INITIALLY 65
14553 #define TK_INSTEAD 66
14554 #define TK_NO 67
14555 #define TK_KEY 68
14556 #define TK_OF 69
14557 #define TK_OFFSET 70
14558 #define TK_PRAGMA 71
14559 #define TK_RAISE 72
14560 #define TK_RECURSIVE 73
14561 #define TK_REPLACE 74
14562 #define TK_RESTRICT 75
14563 #define TK_ROW 76
14564 #define TK_ROWS 77
14565 #define TK_TRIGGER 78
14566 #define TK_VACUUM 79
14567 #define TK_VIEW 80
14568 #define TK_VIRTUAL 81
14569 #define TK_WITH 82
14570 #define TK_NULLS 83
14571 #define TK_FIRST 84
14572 #define TK_LAST 85
14573 #define TK_CURRENT 86
14574 #define TK_FOLLOWING 87
14575 #define TK_PARTITION 88
14576 #define TK_PRECEDING 89
14577 #define TK_RANGE 90
14578 #define TK_UNBOUNDED 91
14579 #define TK_EXCLUDE 92
14580 #define TK_GROUPS 93
14581 #define TK_OTHERS 94
14582 #define TK_TIES 95
14583 #define TK_GENERATED 96
14584 #define TK_ALWAYS 97
14585 #define TK_MATERIALIZED 98
14586 #define TK_REINDEX 99
14587 #define TK_RENAME 100
14588 #define TK_CTIME_KW 101
14589 #define TK_ANY 102
14590 #define TK_BITAND 103
14591 #define TK_BITOR 104
14592 #define TK_LSHIFT 105
14593 #define TK_RSHIFT 106
14594 #define TK_PLUS 107
14595 #define TK_MINUS 108
14596 #define TK_STAR 109
14597 #define TK_SLASH 110
14598 #define TK_REM 111
14599 #define TK_CONCAT 112
14600 #define TK_PTR 113
14601 #define TK_COLLATE 114
14602 #define TK_BITNOT 115
14603 #define TK_ON 116
14604 #define TK_INDEXED 117
14605 #define TK_STRING 118
14606 #define TK_JOIN_KW 119
14607 #define TK_CONSTRAINT 120
14608 #define TK_DEFAULT 121
14609 #define TK_NULL 122
14610 #define TK_PRIMARY 123
14611 #define TK_UNIQUE 124
14612 #define TK_CHECK 125
14613 #define TK_REFERENCES 126
14614 #define TK_AUTOINCR 127
14615 #define TK_INSERT 128
14616 #define TK_DELETE 129
14617 #define TK_UPDATE 130
14618 #define TK_SET 131
14619 #define TK_DEFERRABLE 132
14620 #define TK_FOREIGN 133
14621 #define TK_DROP 134
14622 #define TK_UNION 135
14623 #define TK_ALL 136
14624 #define TK_EXCEPT 137
14625 #define TK_INTERSECT 138
14626 #define TK_SELECT 139
14627 #define TK_VALUES 140
14628 #define TK_DISTINCT 141
14629 #define TK_DOT 142
14630 #define TK_FROM 143
14631 #define TK_JOIN 144
14632 #define TK_USING 145
14633 #define TK_ORDER 146
14634 #define TK_GROUP 147
14635 #define TK_HAVING 148
14636 #define TK_LIMIT 149
14637 #define TK_WHERE 150
14638 #define TK_RETURNING 151
14639 #define TK_INTO 152
14640 #define TK_NOTHING 153
14641 #define TK_FLOAT 154
14642 #define TK_BLOB 155
14643 #define TK_INTEGER 156
14644 #define TK_VARIABLE 157
14645 #define TK_CASE 158
14646 #define TK_WHEN 159
14647 #define TK_THEN 160
14648 #define TK_ELSE 161
14649 #define TK_INDEX 162
14650 #define TK_ALTER 163
14651 #define TK_ADD 164
14652 #define TK_WINDOW 165
14653 #define TK_OVER 166
14654 #define TK_FILTER 167
14655 #define TK_COLUMN 168
14656 #define TK_AGG_FUNCTION 169
14657 #define TK_AGG_COLUMN 170
14658 #define TK_TRUEFALSE 171
14659 #define TK_FUNCTION 172
14660 #define TK_UPLUS 173
14661 #define TK_UMINUS 174
14662 #define TK_TRUTH 175
14663 #define TK_REGISTER 176
@@ -15169,10 +15167,11 @@
15167 ** 0x00008000 After all FROM-clause analysis
15168 ** 0x00010000 Beginning of DELETE/INSERT/UPDATE processing
15169 ** 0x00020000 Transform DISTINCT into GROUP BY
15170 ** 0x00040000 SELECT tree dump after all code has been generated
15171 ** 0x00080000 NOT NULL strength reduction
15172 ** 0x00100000 EXISTS-to-JOIN optimization
15173 */
15174
15175 /*
15176 ** Macros for "wheretrace"
15177 */
@@ -16661,20 +16660,20 @@
16660 #define OP_IdxGE 45 /* jump, synopsis: key=r[P3@P4] */
16661 #define OP_RowSetRead 46 /* jump, synopsis: r[P3]=rowset(P1) */
16662 #define OP_RowSetTest 47 /* jump, synopsis: if r[P3] in rowset(P1) goto P2 */
16663 #define OP_Program 48 /* jump0 */
16664 #define OP_FkIfZero 49 /* jump, synopsis: if fkctr[P1]==0 goto P2 */
16665 #define OP_IfPos 50 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */
16666 #define OP_IsNull 51 /* jump, same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
16667 #define OP_NotNull 52 /* jump, same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
16668 #define OP_Ne 53 /* jump, same as TK_NE, synopsis: IF r[P3]!=r[P1] */
16669 #define OP_Eq 54 /* jump, same as TK_EQ, synopsis: IF r[P3]==r[P1] */
16670 #define OP_Gt 55 /* jump, same as TK_GT, synopsis: IF r[P3]>r[P1] */
16671 #define OP_Le 56 /* jump, same as TK_LE, synopsis: IF r[P3]<=r[P1] */
16672 #define OP_Lt 57 /* jump, same as TK_LT, synopsis: IF r[P3]<r[P1] */
16673 #define OP_Ge 58 /* jump, same as TK_GE, synopsis: IF r[P3]>=r[P1] */
16674 #define OP_ElseEq 59 /* jump, same as TK_ESCAPE */
16675 #define OP_IfNotZero 60 /* jump, synopsis: if r[P1]!=0 then r[P1]--, goto P2 */
16676 #define OP_DecrJumpZero 61 /* jump, synopsis: if (--r[P1])==0 goto P2 */
16677 #define OP_IncrVacuum 62 /* jump */
16678 #define OP_VNext 63 /* jump */
16679 #define OP_Filter 64 /* jump, synopsis: if key(P3@P4) not in filter(P1) goto P2 */
@@ -16713,27 +16712,27 @@
16712 #define OP_MakeRecord 97 /* synopsis: r[P3]=mkrec(r[P1@P2]) */
16713 #define OP_Count 98 /* synopsis: r[P2]=count() */
16714 #define OP_ReadCookie 99
16715 #define OP_SetCookie 100
16716 #define OP_ReopenIdx 101 /* synopsis: root=P2 iDb=P3 */
16717 #define OP_OpenRead 102 /* synopsis: root=P2 iDb=P3 */
16718 #define OP_BitAnd 103 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
16719 #define OP_BitOr 104 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
16720 #define OP_ShiftLeft 105 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
16721 #define OP_ShiftRight 106 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
16722 #define OP_Add 107 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */
16723 #define OP_Subtract 108 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */
16724 #define OP_Multiply 109 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */
16725 #define OP_Divide 110 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */
16726 #define OP_Remainder 111 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */
16727 #define OP_Concat 112 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */
16728 #define OP_OpenWrite 113 /* synopsis: root=P2 iDb=P3 */
16729 #define OP_OpenDup 114
16730 #define OP_BitNot 115 /* same as TK_BITNOT, synopsis: r[P2]= ~r[P1] */
16731 #define OP_OpenAutoindex 116 /* synopsis: nColumn=P2 */
16732 #define OP_OpenEphemeral 117 /* synopsis: nColumn=P2 */
16733 #define OP_String8 118 /* same as TK_STRING, synopsis: r[P2]='P4' */
16734 #define OP_SorterOpen 119
16735 #define OP_SequenceTest 120 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */
16736 #define OP_OpenPseudo 121 /* synopsis: P3 columns in r[P2] */
16737 #define OP_Close 122
16738 #define OP_ColumnsUsed 123
@@ -16764,12 +16763,12 @@
16763 #define OP_SqlExec 148
16764 #define OP_ParseSchema 149
16765 #define OP_LoadAnalysis 150
16766 #define OP_DropTable 151
16767 #define OP_DropIndex 152
16768 #define OP_DropTrigger 153
16769 #define OP_Real 154 /* same as TK_FLOAT, synopsis: r[P2]=P4 */
16770 #define OP_IntegrityCk 155
16771 #define OP_RowSetAdd 156 /* synopsis: rowset(P1)=r[P2] */
16772 #define OP_Param 157
16773 #define OP_FkCounter 158 /* synopsis: fkctr[P1]+=P2 */
16774 #define OP_MemMax 159 /* synopsis: r[P1]=max(r[P1],r[P2]) */
@@ -16821,24 +16820,24 @@
16820 /* 8 */ 0x81, 0x01, 0x01, 0x81, 0x83, 0x83, 0x01, 0x01,\
16821 /* 16 */ 0x03, 0x03, 0x01, 0x12, 0x01, 0xc9, 0xc9, 0xc9,\
16822 /* 24 */ 0xc9, 0x01, 0x49, 0x49, 0x49, 0x49, 0xc9, 0x49,\
16823 /* 32 */ 0xc1, 0x01, 0x41, 0x41, 0xc1, 0x01, 0x41, 0x41,\
16824 /* 40 */ 0x41, 0x41, 0x41, 0x26, 0x26, 0x41, 0x23, 0x0b,\
16825 /* 48 */ 0x81, 0x01, 0x03, 0x03, 0x03, 0x0b, 0x0b, 0x0b,\
16826 /* 56 */ 0x0b, 0x0b, 0x0b, 0x01, 0x03, 0x03, 0x01, 0x41,\
16827 /* 64 */ 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, 0x10,\
16828 /* 72 */ 0x10, 0x10, 0x00, 0x10, 0x00, 0x10, 0x10, 0x00,\
16829 /* 80 */ 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02, 0x02,\
16830 /* 88 */ 0x02, 0x00, 0x00, 0x12, 0x1e, 0x20, 0x40, 0x00,\
16831 /* 96 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x40, 0x40, 0x26,\
16832 /* 104 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26,\
16833 /* 112 */ 0x26, 0x00, 0x40, 0x12, 0x40, 0x40, 0x10, 0x00,\
16834 /* 120 */ 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x10,\
16835 /* 128 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x50,\
16836 /* 136 */ 0x00, 0x40, 0x04, 0x04, 0x00, 0x40, 0x50, 0x40,\
16837 /* 144 */ 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\
16838 /* 152 */ 0x00, 0x00, 0x10, 0x00, 0x06, 0x10, 0x00, 0x04,\
16839 /* 160 */ 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
16840 /* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x50,\
16841 /* 176 */ 0x40, 0x00, 0x10, 0x10, 0x02, 0x12, 0x12, 0x00,\
16842 /* 184 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}
16843
@@ -17895,10 +17894,11 @@
17894 /* TH3 expects this value ^^^^^^^^^^ See flatten04.test */
17895 #define SQLITE_IndexedExpr 0x01000000 /* Pull exprs from index when able */
17896 #define SQLITE_Coroutines 0x02000000 /* Co-routines for subqueries */
17897 #define SQLITE_NullUnusedCols 0x04000000 /* NULL unused columns in subqueries */
17898 #define SQLITE_OnePass 0x08000000 /* Single-pass DELETE and UPDATE */
17899 #define SQLITE_ExistsToJoin 0x10000000 /* The EXISTS-to-JOIN optimization */
17900 #define SQLITE_AllOpts 0xffffffff /* All optimizations */
17901
17902 /*
17903 ** Macros for testing whether or not optimizations are enabled or disabled.
17904 */
@@ -19359,11 +19359,11 @@
19359 #define WHERE_WANT_DISTINCT 0x0100 /* All output needs to be distinct */
19360 #define WHERE_SORTBYGROUP 0x0200 /* Support sqlite3WhereIsSorted() */
19361 #define WHERE_AGG_DISTINCT 0x0400 /* Query is "SELECT agg(DISTINCT ...)" */
19362 #define WHERE_ORDERBY_LIMIT 0x0800 /* ORDERBY+LIMIT on the inner loop */
19363 #define WHERE_RIGHT_JOIN 0x1000 /* Processing a RIGHT JOIN */
19364 #define WHERE_KEEP_ALL_JOINS 0x2000 /* Do not do the omit-noop-join opt */
19365 #define WHERE_USE_LIMIT 0x4000 /* Use the LIMIT in cost estimates */
19366 /* 0x8000 not currently used */
19367
19368 /* Allowed return values from sqlite3WhereIsDistinct()
19369 */
@@ -19431,11 +19431,11 @@
19431 #define NC_UEList 0x000080 /* True if uNC.pEList is used */
19432 #define NC_UAggInfo 0x000100 /* True if uNC.pAggInfo is used */
19433 #define NC_UUpsert 0x000200 /* True if uNC.pUpsert is used */
19434 #define NC_UBaseReg 0x000400 /* True if uNC.iBaseReg is used */
19435 #define NC_MinMaxAgg 0x001000 /* min/max aggregates seen. See note above */
19436 /* 0x002000 // available for reuse */
19437 #define NC_AllowWin 0x004000 /* Window functions are allowed here */
19438 #define NC_HasWin 0x008000 /* One or more window functions seen */
19439 #define NC_IsDDL 0x010000 /* Resolving names in a CREATE statement */
19440 #define NC_InAggFunc 0x020000 /* True if analyzing arguments to an agg func */
19441 #define NC_FromDDL 0x040000 /* SQL text comes from sqlite_schema */
@@ -19798,10 +19798,11 @@
19798 u8 okConstFactor; /* OK to factor out constants */
19799 u8 disableLookaside; /* Number of times lookaside has been disabled */
19800 u8 prepFlags; /* SQLITE_PREPARE_* flags */
19801 u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */
19802 u8 bHasWith; /* True if statement contains WITH */
19803 u8 bHasExists; /* Has a correlated "EXISTS (SELECT ....)" expression */
19804 #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST)
19805 u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */
19806 #endif
19807 #ifdef SQLITE_DEBUG
19808 u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */
@@ -21059,11 +21060,11 @@
21060 SQLITE_PRIVATE int sqlite3ExprIsConstantOrGroupBy(Parse*, Expr*, ExprList*);
21061 SQLITE_PRIVATE int sqlite3ExprIsSingleTableConstraint(Expr*,const SrcList*,int,int);
21062 #ifdef SQLITE_ENABLE_CURSOR_HINTS
21063 SQLITE_PRIVATE int sqlite3ExprContainsSubquery(Expr*);
21064 #endif
21065 SQLITE_PRIVATE int sqlite3ExprIsInteger(const Expr*, int*, Parse*);
21066 SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr*);
21067 SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);
21068 SQLITE_PRIVATE int sqlite3IsRowid(const char*);
21069 SQLITE_PRIVATE const char *sqlite3RowidAlias(Table *pTab);
21070 SQLITE_PRIVATE void sqlite3GenerateRowDelete(
@@ -24885,12 +24886,12 @@
24886 } aXformType[] = {
24887 /* 0 */ { 6, "second", 4.6427e+14, 1.0 },
24888 /* 1 */ { 6, "minute", 7.7379e+12, 60.0 },
24889 /* 2 */ { 4, "hour", 1.2897e+11, 3600.0 },
24890 /* 3 */ { 3, "day", 5373485.0, 86400.0 },
24891 /* 4 */ { 5, "month", 176546.0, 2592000.0 },
24892 /* 5 */ { 4, "year", 14713.0, 31536000.0 },
24893 };
24894
24895 /*
24896 ** If the DateTime p is raw number, try to figure out if it is
24897 ** a julian day number of a unix timestamp. Set the p value
@@ -35924,14 +35925,17 @@
35925
35926 /*
35927 ** Decode a floating-point value into an approximate decimal
35928 ** representation.
35929 **
35930 ** If iRound<=0 then round to -iRound significant digits to the
35931 ** the left of the decimal point, or to a maximum of mxRound total
35932 ** significant digits.
35933 **
35934 ** If iRound>0 round to min(iRound,mxRound) significant digits total.
35935 **
35936 ** mxRound must be positive.
35937 **
35938 ** The significant digits of the decimal representation are
35939 ** stored in p->z[] which is a often (but not always) a pointer
35940 ** into the middle of p->zBuf[]. There are p->n significant digits.
35941 ** The p->z[] array is *not* zero-terminated.
@@ -35940,10 +35944,12 @@
35944 int i;
35945 u64 v;
35946 int e, exp = 0;
35947 p->isSpecial = 0;
35948 p->z = p->zBuf;
35949
35950 assert( mxRound>0 );
35951
35952 /* Convert negative numbers to positive. Deal with Infinity, 0.0, and
35953 ** NaN. */
35954 if( r<0.0 ){
35955 p->sign = '-';
@@ -37227,20 +37233,20 @@
37233 /* 45 */ "IdxGE" OpHelp("key=r[P3@P4]"),
37234 /* 46 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
37235 /* 47 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
37236 /* 48 */ "Program" OpHelp(""),
37237 /* 49 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
37238 /* 50 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
37239 /* 51 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
37240 /* 52 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
37241 /* 53 */ "Ne" OpHelp("IF r[P3]!=r[P1]"),
37242 /* 54 */ "Eq" OpHelp("IF r[P3]==r[P1]"),
37243 /* 55 */ "Gt" OpHelp("IF r[P3]>r[P1]"),
37244 /* 56 */ "Le" OpHelp("IF r[P3]<=r[P1]"),
37245 /* 57 */ "Lt" OpHelp("IF r[P3]<r[P1]"),
37246 /* 58 */ "Ge" OpHelp("IF r[P3]>=r[P1]"),
37247 /* 59 */ "ElseEq" OpHelp(""),
37248 /* 60 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]--, goto P2"),
37249 /* 61 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
37250 /* 62 */ "IncrVacuum" OpHelp(""),
37251 /* 63 */ "VNext" OpHelp(""),
37252 /* 64 */ "Filter" OpHelp("if key(P3@P4) not in filter(P1) goto P2"),
@@ -37279,27 +37285,27 @@
37285 /* 97 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"),
37286 /* 98 */ "Count" OpHelp("r[P2]=count()"),
37287 /* 99 */ "ReadCookie" OpHelp(""),
37288 /* 100 */ "SetCookie" OpHelp(""),
37289 /* 101 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
37290 /* 102 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
37291 /* 103 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
37292 /* 104 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
37293 /* 105 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
37294 /* 106 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
37295 /* 107 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
37296 /* 108 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
37297 /* 109 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
37298 /* 110 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
37299 /* 111 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
37300 /* 112 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
37301 /* 113 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
37302 /* 114 */ "OpenDup" OpHelp(""),
37303 /* 115 */ "BitNot" OpHelp("r[P2]= ~r[P1]"),
37304 /* 116 */ "OpenAutoindex" OpHelp("nColumn=P2"),
37305 /* 117 */ "OpenEphemeral" OpHelp("nColumn=P2"),
37306 /* 118 */ "String8" OpHelp("r[P2]='P4'"),
37307 /* 119 */ "SorterOpen" OpHelp(""),
37308 /* 120 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
37309 /* 121 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
37310 /* 122 */ "Close" OpHelp(""),
37311 /* 123 */ "ColumnsUsed" OpHelp(""),
@@ -37330,12 +37336,12 @@
37336 /* 148 */ "SqlExec" OpHelp(""),
37337 /* 149 */ "ParseSchema" OpHelp(""),
37338 /* 150 */ "LoadAnalysis" OpHelp(""),
37339 /* 151 */ "DropTable" OpHelp(""),
37340 /* 152 */ "DropIndex" OpHelp(""),
37341 /* 153 */ "DropTrigger" OpHelp(""),
37342 /* 154 */ "Real" OpHelp("r[P2]=P4"),
37343 /* 155 */ "IntegrityCk" OpHelp(""),
37344 /* 156 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
37345 /* 157 */ "Param" OpHelp(""),
37346 /* 158 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
37347 /* 159 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
@@ -42345,11 +42351,11 @@
42351 }
42352 }
42353
42354 /* Forward declaration */
42355 static int unixGetTempname(int nBuf, char *zBuf);
42356 #if !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL)
42357 static int unixFcntlExternalReader(unixFile*, int*);
42358 #endif
42359
42360 /*
42361 ** Information and control of an open file handle.
@@ -42472,11 +42478,11 @@
42478 return proxyFileControl(id,op,pArg);
42479 }
42480 #endif /* SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) */
42481
42482 case SQLITE_FCNTL_EXTERNAL_READER: {
42483 #if !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL)
42484 return unixFcntlExternalReader((unixFile*)id, (int*)pArg);
42485 #else
42486 *(int*)pArg = 0;
42487 return SQLITE_OK;
42488 #endif
@@ -42645,11 +42651,11 @@
42651 #endif
42652 }
42653
42654 #endif /* !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 */
42655
42656 #if !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL)
42657
42658 /*
42659 ** Object used to represent an shared memory buffer.
42660 **
42661 ** When multiple threads all reference the same wal-index, each thread
@@ -102134,18 +102140,33 @@
102140 }
102141 #endif
102142
102143 /* Opcode: Noop * * * * *
102144 **
102145 ** Do nothing. Continue downward to the next opcode.
 
102146 */
102147 /* Opcode: Explain P1 P2 P3 P4 *
102148 **
102149 ** This is the same as OP_Noop during normal query execution. The
102150 ** purpose of this opcode is to hold information about the query
102151 ** plan for the purpose of EXPLAIN QUERY PLAN output.
102152 **
102153 ** The P4 value is human-readable text that describes the query plan
102154 ** element. Something like "SCAN t1" or "SEARCH t2 USING INDEX t2x1".
102155 **
102156 ** The P1 value is the ID of the current element and P2 is the parent
102157 ** element for the case of nested query plan elements. If P2 is zero
102158 ** then this element is a top-level element.
102159 **
102160 ** For loop elements, P3 is the estimated code of each invocation of this
102161 ** element.
102162 **
102163 ** As with all opcodes, the meanings of the parameters for OP_Explain
102164 ** are subject to change from one release to the next. Applications
102165 ** should not attempt to interpret or use any of the information
102166 ** contined in the OP_Explain opcode. The information provided by this
102167 ** opcode is intended for testing and debugging use only.
102168 */
102169 default: { /* This is really OP_Noop, OP_Explain */
102170 assert( pOp->opcode==OP_Noop || pOp->opcode==OP_Explain );
102171
102172 break;
@@ -106970,11 +106991,11 @@
106991 ** Return TRUE (non-zero) if zTab is a valid name for the schema table pTab.
106992 */
106993 static SQLITE_NOINLINE int isValidSchemaTableName(
106994 const char *zTab, /* Name as it appears in the SQL */
106995 Table *pTab, /* The schema table we are trying to match */
106996 const char *zDb /* non-NULL if a database qualifier is present */
106997 ){
106998 const char *zLegacy;
106999 assert( pTab!=0 );
107000 assert( pTab->tnum==1 );
107001 if( sqlite3StrNICmp(zTab, "sqlite_", 7)!=0 ) return 0;
@@ -106981,11 +107002,11 @@
107002 zLegacy = pTab->zName;
107003 if( strcmp(zLegacy+7, &LEGACY_TEMP_SCHEMA_TABLE[7])==0 ){
107004 if( sqlite3StrICmp(zTab+7, &PREFERRED_TEMP_SCHEMA_TABLE[7])==0 ){
107005 return 1;
107006 }
107007 if( zDb==0 ) return 0;
107008 if( sqlite3StrICmp(zTab+7, &LEGACY_SCHEMA_TABLE[7])==0 ) return 1;
107009 if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1;
107010 }else{
107011 if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1;
107012 }
@@ -107164,11 +107185,11 @@
107185 if( sqlite3StrICmp(zTab, pItem->zAlias)!=0 ){
107186 continue;
107187 }
107188 }else if( sqlite3StrICmp(zTab, pTab->zName)!=0 ){
107189 if( pTab->tnum!=1 ) continue;
107190 if( !isValidSchemaTableName(zTab, pTab, zDb) ) continue;
107191 }
107192 assert( ExprUseYTab(pExpr) );
107193 if( IN_RENAME_OBJECT && pItem->zAlias ){
107194 sqlite3RenameTokenRemap(pParse, 0, (void*)&pExpr->y.pTab);
107195 }
@@ -108109,10 +108130,11 @@
108130 }
108131 assert( pNC->nRef>=nRef );
108132 if( nRef!=pNC->nRef ){
108133 ExprSetProperty(pExpr, EP_VarSelect);
108134 pExpr->x.pSelect->selFlags |= SF_Correlated;
108135 if( pExpr->op==TK_EXISTS ) pParse->bHasExists = 1;
108136 }
108137 pNC->ncFlags |= NC_Subquery;
108138 }
108139 break;
108140 }
@@ -108247,11 +108269,11 @@
108269 NameContext nc; /* Name context for resolving pE */
108270 sqlite3 *db; /* Database connection */
108271 int rc; /* Return code from subprocedures */
108272 u8 savedSuppErr; /* Saved value of db->suppressErr */
108273
108274 assert( sqlite3ExprIsInteger(pE, &i, 0)==0 );
108275 pEList = pSelect->pEList;
108276
108277 /* Resolve all names in the ORDER BY term expression
108278 */
108279 memset(&nc, 0, sizeof(nc));
@@ -108346,11 +108368,11 @@
108368 int iCol = -1;
108369 Expr *pE, *pDup;
108370 if( pItem->fg.done ) continue;
108371 pE = sqlite3ExprSkipCollateAndLikely(pItem->pExpr);
108372 if( NEVER(pE==0) ) continue;
108373 if( sqlite3ExprIsInteger(pE, &iCol, 0) ){
108374 if( iCol<=0 || iCol>pEList->nExpr ){
108375 resolveOutOfRangeError(pParse, "ORDER", i+1, pEList->nExpr, pE);
108376 return 1;
108377 }
108378 }else{
@@ -108531,11 +108553,11 @@
108553 ** copy of the iCol-th result-set expression. */
108554 pItem->u.x.iOrderByCol = (u16)iCol;
108555 continue;
108556 }
108557 }
108558 if( sqlite3ExprIsInteger(pE2, &iCol, 0) ){
108559 /* The ORDER BY term is an integer constant. Again, set the column
108560 ** number so that sqlite3ResolveOrderGroupBy() will convert the
108561 ** order-by term to a copy of the result-set expression */
108562 if( iCol<1 || iCol>0xffff ){
108563 resolveOutOfRangeError(pParse, zType, i+1, nResult, pE2);
@@ -111815,12 +111837,16 @@
111837 /*
111838 ** If the expression p codes a constant integer that is small enough
111839 ** to fit in a 32-bit integer, return 1 and put the value of the integer
111840 ** in *pValue. If the expression is not an integer or if it is too big
111841 ** to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
111842 **
111843 ** If the pParse pointer is provided, then allow the expression p to be
111844 ** a parameter (TK_VARIABLE) that is bound to an integer.
111845 ** But if pParse is NULL, then p must be a pure integer literal.
111846 */
111847 SQLITE_PRIVATE int sqlite3ExprIsInteger(const Expr *p, int *pValue, Parse *pParse){
111848 int rc = 0;
111849 if( NEVER(p==0) ) return 0; /* Used to only happen following on OOM */
111850
111851 /* If an expression is an integer literal that fits in a signed 32-bit
111852 ** integer, then the EP_IntValue flag will have already been set */
@@ -111831,21 +111857,41 @@
111857 *pValue = p->u.iValue;
111858 return 1;
111859 }
111860 switch( p->op ){
111861 case TK_UPLUS: {
111862 rc = sqlite3ExprIsInteger(p->pLeft, pValue, 0);
111863 break;
111864 }
111865 case TK_UMINUS: {
111866 int v = 0;
111867 if( sqlite3ExprIsInteger(p->pLeft, &v, 0) ){
111868 assert( ((unsigned int)v)!=0x80000000 );
111869 *pValue = -v;
111870 rc = 1;
111871 }
111872 break;
111873 }
111874 case TK_VARIABLE: {
111875 sqlite3_value *pVal;
111876 if( pParse==0 ) break;
111877 if( NEVER(pParse->pVdbe==0) ) break;
111878 if( (pParse->db->flags & SQLITE_EnableQPSG)!=0 ) break;
111879 sqlite3VdbeSetVarmask(pParse->pVdbe, p->iColumn);
111880 pVal = sqlite3VdbeGetBoundValue(pParse->pReprepare, p->iColumn,
111881 SQLITE_AFF_BLOB);
111882 if( pVal ){
111883 if( sqlite3_value_type(pVal)==SQLITE_INTEGER ){
111884 sqlite3_int64 vv = sqlite3_value_int64(pVal);
111885 if( vv == (vv & 0x7fffffff) ){ /* non-negative numbers only */
111886 *pValue = (int)vv;
111887 rc = 1;
111888 }
111889 }
111890 sqlite3ValueFree(pVal);
111891 }
111892 break;
111893 }
111894 default: break;
111895 }
111896 return rc;
111897 }
@@ -126430,18 +126476,21 @@
126476 ** Append the contents of SrcList p2 to SrcList p1 and return the resulting
126477 ** SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2
126478 ** are deleted by this function.
126479 */
126480 SQLITE_PRIVATE SrcList *sqlite3SrcListAppendList(Parse *pParse, SrcList *p1, SrcList *p2){
126481 assert( p1 );
126482 if( p2 ){
126483 int nOld = p1->nSrc;
126484 SrcList *pNew = sqlite3SrcListEnlarge(pParse, p1, p2->nSrc, nOld);
126485 if( pNew==0 ){
126486 sqlite3SrcListDelete(pParse->db, p2);
126487 }else{
126488 p1 = pNew;
126489 memcpy(&p1->a[nOld], p2->a, p2->nSrc*sizeof(SrcItem));
126490 assert( nOld==1 || (p2->nSrc==1 && (p2->a[0].fg.jointype&JT_LTORJ)==0) );
126491 assert( p1->nSrc>=2 );
126492 sqlite3DbFree(pParse->db, p2);
126493 p1->a[0].fg.jointype |= (JT_LTORJ & p1->a[1].fg.jointype);
126494 }
126495 }
126496 return p1;
@@ -131209,10 +131258,11 @@
131258 UNUSED_PARAMETER(argc);
131259 assert( argc==3 );
131260 x = sqlite3_value_double(argv[0]);
131261 y = sqlite3_value_int(argv[1]);
131262 z = sqlite3_value_int(argv[2]);
131263 if( z<=0 ) z = 1;
131264 sqlite3FpDecode(&s, x, y, z);
131265 if( s.isSpecial==2 ){
131266 sqlite3_snprintf(sizeof(zBuf), zBuf, "NaN");
131267 }else{
131268 sqlite3_snprintf(sizeof(zBuf), zBuf, "%c%.*s/%d", s.sign, s.n, s.z, s.iDP);
@@ -145397,11 +145447,11 @@
145447 assert( pLimit->op==TK_LIMIT );
145448 assert( pLimit->pLeft!=0 );
145449 p->iLimit = iLimit = ++pParse->nMem;
145450 v = sqlite3GetVdbe(pParse);
145451 assert( v!=0 );
145452 if( sqlite3ExprIsInteger(pLimit->pLeft, &n, pParse) ){
145453 sqlite3VdbeAddOp2(v, OP_Integer, n, iLimit);
145454 VdbeComment((v, "LIMIT counter"));
145455 if( n==0 ){
145456 sqlite3VdbeGoto(v, iBreak);
145457 }else if( n>=0 && p->nSelectRow>sqlite3LogEst((u64)n) ){
@@ -145877,11 +145927,11 @@
145927 testcase( rc!=SQLITE_OK );
145928 pDelete = p->pPrior;
145929 p->pPrior = pPrior;
145930 p->nSelectRow = sqlite3LogEstAdd(p->nSelectRow, pPrior->nSelectRow);
145931 if( p->pLimit
145932 && sqlite3ExprIsInteger(p->pLimit->pLeft, &nLimit, pParse)
145933 && nLimit>0 && p->nSelectRow > sqlite3LogEst((u64)nLimit)
145934 ){
145935 p->nSelectRow = sqlite3LogEst((u64)nLimit);
145936 }
145937 if( addr ){
@@ -150187,10 +150237,162 @@
150237 pItem--;
150238 if( pItem->pSelect!=0 ) return 0; /* (1c-i) */
150239 }
150240 return 1;
150241 }
150242
150243 /*
150244 ** sqlite3WalkExpr() callback used by exprReferencesTable().
150245 */
150246 static int exprReferencesTableExprCb(Walker *pWalker, Expr *pExpr){
150247 if( pExpr->op==TK_COLUMN && pExpr->iTable==pWalker->u.iCur ){
150248 pWalker->eCode = 1;
150249 }
150250 return WRC_Continue;
150251 }
150252
150253 /*
150254 ** Return true if the expression passed as the first argument refers
150255 ** to cursor number iCur. Otherwise return false.
150256 */
150257 static int exprReferencesTable(Expr *pExpr, int iCur){
150258 Walker w;
150259 memset(&w, 0, sizeof(w));
150260 w.u.iCur = iCur;
150261 w.xExprCallback = exprReferencesTableExprCb;
150262 w.xSelectCallback = sqlite3SelectWalkNoop;
150263 sqlite3WalkExpr(&w, pExpr);
150264 return w.eCode;
150265 }
150266
150267 /*
150268 ** Index pIdx is a UNIQUE index on the table accessed by cursor number
150269 ** iCsr. This function returns a mask of the index columns that are
150270 ** constrained to match a single, non-NULL value by the WHERE clause
150271 ** passed as the 4th argument. For example, if the index is:
150272 **
150273 ** CREATE UNIQUE INDEX idx ON tbl(a, b, c);
150274 **
150275 ** and pWhere:
150276 **
150277 ** WHERE a=? AND c=?
150278 **
150279 ** then this function returns 5.
150280 */
150281 static u64 findConstIdxTerms(
150282 Parse *pParse,
150283 int iCsr,
150284 Index *pIdx,
150285 Expr *pWhere
150286 ){
150287 u64 m = 0;
150288 if( pWhere->op==TK_AND ){
150289 m = findConstIdxTerms(pParse, iCsr, pIdx, pWhere->pLeft);
150290 m |= findConstIdxTerms(pParse, iCsr, pIdx, pWhere->pRight);
150291 }else if( pWhere->op==TK_EQ ){
150292 Expr *pLeft = sqlite3ExprSkipCollateAndLikely(pWhere->pLeft);
150293 Expr *pRight = sqlite3ExprSkipCollateAndLikely(pWhere->pRight);
150294 if( pRight->op==TK_COLUMN && pRight->iTable==iCsr ){
150295 SWAP(Expr*, pLeft, pRight);
150296 }
150297 if( pLeft->op==TK_COLUMN
150298 && pLeft->iTable==iCsr
150299 && exprReferencesTable(pRight, iCsr)==0
150300 ){
150301 if( pIdx ){
150302 int ii;
150303 for(ii=0; ii<pIdx->nKeyCol; ii++){
150304 assert( pIdx->azColl[ii] );
150305 if( pLeft->iColumn==pIdx->aiColumn[ii] ){
150306 CollSeq *pColl = sqlite3ExprCompareCollSeq(pParse, pWhere);
150307 if( pColl && sqlite3StrICmp(pColl->zName, pIdx->azColl[ii])==0 ){
150308 m |= ((u64)1 << ii);
150309 break;
150310 }
150311 }
150312 }
150313 }else{
150314 if( pLeft->iColumn<0 ) m = 1;
150315 }
150316 }
150317 }
150318 return m;
150319 }
150320
150321 /*
150322 ** Argument pWhere is the WHERE clause belonging to SELECT statement p. This
150323 ** function attempts to transform expressions of the form:
150324 **
150325 ** EXISTS (SELECT ...)
150326 **
150327 ** into joins. For example, given
150328 **
150329 ** CREATE TABLE sailors(sid INTEGER PRIMARY KEY, name TEXT);
150330 ** CREATE TABLE reserves(sid INT, day DATE, PRIMARY KEY(sid, day));
150331 **
150332 ** SELECT name FROM sailors AS S WHERE EXISTS (
150333 ** SELECT * FROM reserves AS R WHERE S.sid = R.sid AND R.day = '2022-10-25'
150334 ** );
150335 **
150336 ** the SELECT statement may be transformed as follows:
150337 **
150338 ** SELECT name FROM sailors AS S, reserves AS R
150339 ** WHERE S.sid = R.sid AND R.day = '2022-10-25';
150340 */
150341 static void existsToJoin(Parse *pParse, Select *p, Expr *pWhere){
150342 if( pWhere && p->pSrc->nSrc>0 && pParse->db->mallocFailed==0 ){
150343 if( pWhere->op==TK_AND ){
150344 Expr *pRight = pWhere->pRight;
150345 existsToJoin(pParse, p, pWhere->pLeft);
150346 existsToJoin(pParse, p, pRight);
150347 }
150348 else if( pWhere->op==TK_EXISTS ){
150349 Select *pSub = pWhere->x.pSelect;
150350 if( pSub->pSrc->nSrc==1
150351 && (pSub->selFlags & (SF_Aggregate|SF_Correlated))==SF_Correlated
150352 && pSub->pWhere
150353 ){
150354 int bTransform = 0; /* True if EXISTS can be made into join */
150355 Table *pTab = pSub->pSrc->a[0].pTab;
150356 int iCsr = pSub->pSrc->a[0].iCursor;
150357 Index *pIdx;
150358 if( HasRowid(pTab) && findConstIdxTerms(pParse, iCsr, 0,pSub->pWhere) ){
150359 bTransform = 1;
150360 }
150361 for(pIdx=pTab->pIndex; pIdx && bTransform==0; pIdx=pIdx->pNext){
150362 if( pIdx->onError && pIdx->nKeyCol<=63 ){
150363 u64 c = findConstIdxTerms(pParse, iCsr, pIdx, pSub->pWhere);
150364 if( c==((u64)1 << pIdx->nKeyCol)-1 ){
150365 bTransform = 1;
150366 }
150367 }
150368 }
150369 if( bTransform ){
150370 memset(pWhere, 0, sizeof(*pWhere));
150371 pWhere->op = TK_INTEGER;
150372 pWhere->u.iValue = 1;
150373 ExprSetProperty(pWhere, EP_IntValue);
150374
150375 assert( p->pWhere!=0 );
150376 p->pSrc = sqlite3SrcListAppendList(pParse, p->pSrc, pSub->pSrc);
150377 p->pWhere = sqlite3PExpr(pParse, TK_AND, p->pWhere, pSub->pWhere);
150378
150379 pSub->pWhere = 0;
150380 pSub->pSrc = 0;
150381 sqlite3ParserAddCleanup(pParse, sqlite3SelectDeleteGeneric, pSub);
150382 #if TREETRACE_ENABLED
150383 if( sqlite3TreeTrace & 0x100000 ){
150384 TREETRACE(0x100000,pParse,p,
150385 ("After EXISTS-to-JOIN optimization:\n"));
150386 sqlite3TreeViewSelect(0, p, 0);
150387 }
150388 #endif
150389 }
150390 }
150391 }
150392 }
150393 }
150394
150395 /*
150396 ** Generate code for the SELECT statement given in the p argument.
150397 **
150398 ** The results are returned according to the SelectDest structure.
@@ -150513,10 +150715,17 @@
150715 #endif
150716 if( p->pNext==0 ) ExplainQueryPlanPop(pParse);
150717 return rc;
150718 }
150719 #endif
150720
150721 /* If there may be an "EXISTS (SELECT ...)" in the WHERE clause, attempt
150722 ** to change it into a join. */
150723 if( pParse->bHasExists && OptimizationEnabled(db,SQLITE_ExistsToJoin) ){
150724 existsToJoin(pParse, p, p->pWhere);
150725 pTabList = p->pSrc;
150726 }
150727
150728 /* Do the WHERE-clause constant propagation optimization if this is
150729 ** a join. No need to speed time on this operation for non-join queries
150730 ** as the equivalent optimization will be handled by query planner in
150731 ** sqlite3WhereBegin().
@@ -151236,11 +151445,15 @@
151445 pAggInfo->directMode = 1;
151446 sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j);
151447 }
151448
151449 if( iOrderByCol ){
151450 Expr *pX = p->pEList->a[iOrderByCol-1].pExpr;
151451 Expr *pBase = sqlite3ExprSkipCollateAndLikely(pX);
151452 if( ALWAYS(pBase!=0) && pBase->op!=TK_AGG_COLUMN ){
151453 sqlite3ExprToRegister(pX, iAMem+j);
151454 }
151455 }
151456 }
151457 sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,
151458 (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
151459 addr1 = sqlite3VdbeCurrentAddr(v);
@@ -157658,11 +157871,12 @@
157871 }
157872 #endif
157873 zMsg = sqlite3StrAccumFinish(&str);
157874 sqlite3ExplainBreakpoint("",zMsg);
157875 ret = sqlite3VdbeAddOp4(v, OP_Explain, sqlite3VdbeCurrentAddr(v),
157876 pParse->addrExplain, pLoop->rRun,
157877 zMsg, P4_DYNAMIC);
157878 }
157879 return ret;
157880 }
157881
157882 /*
@@ -158042,10 +158256,151 @@
158256 }
158257 }
158258 return pNew;
158259 }
158260
158261
158262 #ifndef SQLITE_OMIT_SUBQUERY
158263 /*
158264 ** Generate code for a single X IN (....) term of the WHERE clause.
158265 **
158266 ** This is a special-case of codeEqualityTerm() that works for IN operators
158267 ** only. It is broken out into a subroutine because this case is
158268 ** uncommon and by splitting it off into a subroutine, the common case
158269 ** runs faster.
158270 **
158271 ** The current value for the constraint is left in register iTarget.
158272 ** This routine sets up a loop that will iterate over all values of X.
158273 */
158274 static SQLITE_NOINLINE void codeINTerm(
158275 Parse *pParse, /* The parsing context */
158276 WhereTerm *pTerm, /* The term of the WHERE clause to be coded */
158277 WhereLevel *pLevel, /* The level of the FROM clause we are working on */
158278 int iEq, /* Index of the equality term within this level */
158279 int bRev, /* True for reverse-order IN operations */
158280 int iTarget /* Attempt to leave results in this register */
158281 ){
158282 Expr *pX = pTerm->pExpr;
158283 int eType = IN_INDEX_NOOP;
158284 int iTab;
158285 struct InLoop *pIn;
158286 WhereLoop *pLoop = pLevel->pWLoop;
158287 Vdbe *v = pParse->pVdbe;
158288 int i;
158289 int nEq = 0;
158290 int *aiMap = 0;
158291
158292 if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0
158293 && pLoop->u.btree.pIndex!=0
158294 && pLoop->u.btree.pIndex->aSortOrder[iEq]
158295 ){
158296 testcase( iEq==0 );
158297 testcase( bRev );
158298 bRev = !bRev;
158299 }
158300 assert( pX->op==TK_IN );
158301
158302 for(i=0; i<iEq; i++){
158303 if( pLoop->aLTerm[i] && pLoop->aLTerm[i]->pExpr==pX ){
158304 disableTerm(pLevel, pTerm);
158305 return;
158306 }
158307 }
158308 for(i=iEq;i<pLoop->nLTerm; i++){
158309 assert( pLoop->aLTerm[i]!=0 );
158310 if( pLoop->aLTerm[i]->pExpr==pX ) nEq++;
158311 }
158312
158313 iTab = 0;
158314 if( !ExprUseXSelect(pX) || pX->x.pSelect->pEList->nExpr==1 ){
158315 eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, 0, &iTab);
158316 }else{
158317 Expr *pExpr = pTerm->pExpr;
158318 if( pExpr->iTable==0 || !ExprHasProperty(pExpr, EP_Subrtn) ){
158319 sqlite3 *db = pParse->db;
158320 pX = removeUnindexableInClauseTerms(pParse, iEq, pLoop, pX);
158321 if( !db->mallocFailed ){
158322 aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*nEq);
158323 eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap,&iTab);
158324 pExpr->iTable = iTab;
158325 }
158326 sqlite3ExprDelete(db, pX);
158327 }else{
158328 int n = sqlite3ExprVectorSize(pX->pLeft);
158329 aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*MAX(nEq,n));
158330 eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap, &iTab);
158331 }
158332 pX = pExpr;
158333 }
158334
158335 if( eType==IN_INDEX_INDEX_DESC ){
158336 testcase( bRev );
158337 bRev = !bRev;
158338 }
158339 sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iTab, 0);
158340 VdbeCoverageIf(v, bRev);
158341 VdbeCoverageIf(v, !bRev);
158342
158343 assert( (pLoop->wsFlags & WHERE_MULTI_OR)==0 );
158344 pLoop->wsFlags |= WHERE_IN_ABLE;
158345 if( pLevel->u.in.nIn==0 ){
158346 pLevel->addrNxt = sqlite3VdbeMakeLabel(pParse);
158347 }
158348 if( iEq>0 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0 ){
158349 pLoop->wsFlags |= WHERE_IN_EARLYOUT;
158350 }
158351
158352 i = pLevel->u.in.nIn;
158353 pLevel->u.in.nIn += nEq;
158354 pLevel->u.in.aInLoop =
158355 sqlite3WhereRealloc(pTerm->pWC->pWInfo,
158356 pLevel->u.in.aInLoop,
158357 sizeof(pLevel->u.in.aInLoop[0])*pLevel->u.in.nIn);
158358 pIn = pLevel->u.in.aInLoop;
158359 if( pIn ){
158360 int iMap = 0; /* Index in aiMap[] */
158361 pIn += i;
158362 for(i=iEq;i<pLoop->nLTerm; i++){
158363 if( pLoop->aLTerm[i]->pExpr==pX ){
158364 int iOut = iTarget + i - iEq;
158365 if( eType==IN_INDEX_ROWID ){
158366 pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iOut);
158367 }else{
158368 int iCol = aiMap ? aiMap[iMap++] : 0;
158369 pIn->addrInTop = sqlite3VdbeAddOp3(v,OP_Column,iTab, iCol, iOut);
158370 }
158371 sqlite3VdbeAddOp1(v, OP_IsNull, iOut); VdbeCoverage(v);
158372 if( i==iEq ){
158373 pIn->iCur = iTab;
158374 pIn->eEndLoopOp = bRev ? OP_Prev : OP_Next;
158375 if( iEq>0 ){
158376 pIn->iBase = iTarget - i;
158377 pIn->nPrefix = i;
158378 }else{
158379 pIn->nPrefix = 0;
158380 }
158381 }else{
158382 pIn->eEndLoopOp = OP_Noop;
158383 }
158384 pIn++;
158385 }
158386 }
158387 testcase( iEq>0
158388 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0
158389 && (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 );
158390 if( iEq>0
158391 && (pLoop->wsFlags & (WHERE_IN_SEEKSCAN|WHERE_VIRTUALTABLE))==0
158392 ){
158393 sqlite3VdbeAddOp3(v, OP_SeekHit, pLevel->iIdxCur, 0, iEq);
158394 }
158395 }else{
158396 pLevel->u.in.nIn = 0;
158397 }
158398 sqlite3DbFree(pParse->db, aiMap);
158399 }
158400 #endif
158401
158402
158403 /*
158404 ** Generate code for a single equality term of the WHERE clause. An equality
158405 ** term can be either X=expr or X IN (...). pTerm is the term to be
158406 ** coded.
@@ -158067,138 +158422,24 @@
158422 int iEq, /* Index of the equality term within this level */
158423 int bRev, /* True for reverse-order IN operations */
158424 int iTarget /* Attempt to leave results in this register */
158425 ){
158426 Expr *pX = pTerm->pExpr;
 
158427 int iReg; /* Register holding results */
158428
158429 assert( pLevel->pWLoop->aLTerm[iEq]==pTerm );
158430 assert( iTarget>0 );
158431 if( pX->op==TK_EQ || pX->op==TK_IS ){
158432 iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
158433 }else if( pX->op==TK_ISNULL ){
158434 iReg = iTarget;
158435 sqlite3VdbeAddOp2(pParse->pVdbe, OP_Null, 0, iReg);
158436 #ifndef SQLITE_OMIT_SUBQUERY
158437 }else{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158438 assert( pX->op==TK_IN );
158439 iReg = iTarget;
158440 codeINTerm(pParse, pTerm, pLevel, iEq, bRev, iTarget);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158441 #endif
158442 }
158443
158444 /* As an optimization, try to disable the WHERE clause term that is
158445 ** driving the index as it will always be true. The correct answer is
@@ -160403,11 +160644,16 @@
160644 static int allowedOp(int op){
160645 assert( TK_GT>TK_EQ && TK_GT<TK_GE );
160646 assert( TK_LT>TK_EQ && TK_LT<TK_GE );
160647 assert( TK_LE>TK_EQ && TK_LE<TK_GE );
160648 assert( TK_GE==TK_EQ+4 );
160649 assert( TK_IN<TK_EQ );
160650 assert( TK_IS<TK_EQ );
160651 assert( TK_ISNULL<TK_EQ );
160652 if( op>TK_GE ) return 0;
160653 if( op>=TK_EQ ) return 1;
160654 return op==TK_IN || op==TK_ISNULL || op==TK_IS;
160655 }
160656
160657 /*
160658 ** Commute a comparison operator. Expressions of the form "X op Y"
160659 ** are converted into "Y op X".
@@ -160436,19 +160682,20 @@
160682 ** Translate from TK_xx operator to WO_xx bitmask.
160683 */
160684 static u16 operatorMask(int op){
160685 u16 c;
160686 assert( allowedOp(op) );
160687 if( op>=TK_EQ ){
160688 assert( (WO_EQ<<(op-TK_EQ)) < 0x7fff );
160689 c = (u16)(WO_EQ<<(op-TK_EQ));
160690 }else if( op==TK_IN ){
160691 c = WO_IN;
160692 }else if( op==TK_ISNULL ){
160693 c = WO_ISNULL;
160694 }else{
160695 assert( op==TK_IS );
160696 c = WO_IS;
 
 
 
160697 }
160698 assert( op!=TK_ISNULL || c==WO_ISNULL );
160699 assert( op!=TK_IN || c==WO_IN );
160700 assert( op!=TK_EQ || c==WO_EQ );
160701 assert( op!=TK_LT || c==WO_LT );
@@ -160731,10 +160978,17 @@
160978 *ppLeft = pCol;
160979 return 1;
160980 }
160981 }
160982 }
160983 }else if( pExpr->op>=TK_EQ ){
160984 /* Comparison operators are a common case. Save a few comparisons for
160985 ** that common case by terminating early. */
160986 assert( TK_NE < TK_EQ );
160987 assert( TK_ISNOT < TK_EQ );
160988 assert( TK_NOTNULL < TK_EQ );
160989 return 0;
160990 }else if( pExpr->op==TK_NE || pExpr->op==TK_ISNOT || pExpr->op==TK_NOTNULL ){
160991 int res = 0;
160992 Expr *pLeft = pExpr->pLeft;
160993 Expr *pRight = pExpr->pRight;
160994 assert( pLeft->op!=TK_COLUMN || (ExprUseYTab(pLeft) && pLeft->y.pTab!=0) );
@@ -161872,11 +162126,11 @@
162126 Parse *pParse = pWC->pWInfo->pParse;
162127 sqlite3 *db = pParse->db;
162128 Expr *pNew;
162129 int iVal = 0;
162130
162131 if( sqlite3ExprIsInteger(pExpr, &iVal, pParse) && iVal>=0 ){
162132 Expr *pVal = sqlite3Expr(db, TK_INTEGER, 0);
162133 if( pVal==0 ) return;
162134 ExprSetProperty(pVal, EP_IntValue);
162135 pVal->u.iValue = iVal;
162136 pNew = sqlite3PExpr(pParse, TK_MATCH, 0, pVal);
@@ -163524,10 +163778,24 @@
163778 pParse->pIdxPartExpr = saved_pIdxPartExpr;
163779 }
163780
163781
163782 #ifndef SQLITE_OMIT_VIRTUALTABLE
163783 /*
163784 ** Return term iTerm of the WhereClause passed as the first argument. Terms
163785 ** are numbered from 0 upwards, starting with the terms in pWC->a[], then
163786 ** those in pWC->pOuter->a[] (if any), and so on.
163787 */
163788 static WhereTerm *termFromWhereClause(WhereClause *pWC, int iTerm){
163789 WhereClause *p;
163790 for(p=pWC; p; p=p->pOuter){
163791 if( iTerm<p->nTerm ) return &p->a[iTerm];
163792 iTerm -= p->nTerm;
163793 }
163794 return 0;
163795 }
163796
163797 /*
163798 ** Allocate and populate an sqlite3_index_info structure. It is the
163799 ** responsibility of the caller to eventually release the structure
163800 ** by passing the pointer returned by this function to freeIndexInfo().
163801 */
@@ -163550,10 +163818,11 @@
163818 sqlite3_index_info *pIdxInfo;
163819 u16 mNoOmit = 0;
163820 const Table *pTab;
163821 int eDistinct = 0;
163822 ExprList *pOrderBy = pWInfo->pOrderBy;
163823 WhereClause *p;
163824
163825 assert( pSrc!=0 );
163826 pTab = pSrc->pTab;
163827 assert( pTab!=0 );
163828 assert( IsVirtual(pTab) );
@@ -163560,32 +163829,34 @@
163829
163830 /* Find all WHERE clause constraints referring to this virtual table.
163831 ** Mark each term with the TERM_OK flag. Set nTerm to the number of
163832 ** terms found.
163833 */
163834 for(p=pWC, nTerm=0; p; p=p->pOuter){
163835 for(i=0, pTerm=p->a; i<p->nTerm; i++, pTerm++){
163836 pTerm->wtFlags &= ~TERM_OK;
163837 if( pTerm->leftCursor != pSrc->iCursor ) continue;
163838 if( pTerm->prereqRight & mUnusable ) continue;
163839 assert( IsPowerOfTwo(pTerm->eOperator & ~WO_EQUIV) );
163840 testcase( pTerm->eOperator & WO_IN );
163841 testcase( pTerm->eOperator & WO_ISNULL );
163842 testcase( pTerm->eOperator & WO_IS );
163843 testcase( pTerm->eOperator & WO_ALL );
163844 if( (pTerm->eOperator & ~(WO_EQUIV))==0 ) continue;
163845 if( pTerm->wtFlags & TERM_VNULL ) continue;
163846
163847 assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );
163848 assert( pTerm->u.x.leftColumn>=XN_ROWID );
163849 assert( pTerm->u.x.leftColumn<pTab->nCol );
163850 if( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0
163851 && !constraintCompatibleWithOuterJoin(pTerm,pSrc)
163852 ){
163853 continue;
163854 }
163855 nTerm++;
163856 pTerm->wtFlags |= TERM_OK;
163857 }
163858 }
163859
163860 /* If the ORDER BY clause contains only columns in the current
163861 ** virtual table then allocate space for the aOrderBy part of
163862 ** the sqlite3_index_info structure.
@@ -163660,53 +163931,56 @@
163931 pIdxInfo->aConstraintUsage = pUsage;
163932 pHidden->pWC = pWC;
163933 pHidden->pParse = pParse;
163934 pHidden->eDistinct = eDistinct;
163935 pHidden->mIn = 0;
163936 for(p=pWC, i=j=0; p; p=p->pOuter){
163937 int nLast = i+p->nTerm;;
163938 for(pTerm=p->a; i<nLast; i++, pTerm++){
163939 u16 op;
163940 if( (pTerm->wtFlags & TERM_OK)==0 ) continue;
163941 pIdxCons[j].iColumn = pTerm->u.x.leftColumn;
163942 pIdxCons[j].iTermOffset = i;
163943 op = pTerm->eOperator & WO_ALL;
163944 if( op==WO_IN ){
163945 if( (pTerm->wtFlags & TERM_SLICE)==0 ){
163946 pHidden->mIn |= SMASKBIT32(j);
163947 }
163948 op = WO_EQ;
163949 }
163950 if( op==WO_AUX ){
163951 pIdxCons[j].op = pTerm->eMatchOp;
163952 }else if( op & (WO_ISNULL|WO_IS) ){
163953 if( op==WO_ISNULL ){
163954 pIdxCons[j].op = SQLITE_INDEX_CONSTRAINT_ISNULL;
163955 }else{
163956 pIdxCons[j].op = SQLITE_INDEX_CONSTRAINT_IS;
163957 }
163958 }else{
163959 pIdxCons[j].op = (u8)op;
163960 /* The direct assignment in the previous line is possible only because
163961 ** the WO_ and SQLITE_INDEX_CONSTRAINT_ codes are identical. The
163962 ** following asserts verify this fact. */
163963 assert( WO_EQ==SQLITE_INDEX_CONSTRAINT_EQ );
163964 assert( WO_LT==SQLITE_INDEX_CONSTRAINT_LT );
163965 assert( WO_LE==SQLITE_INDEX_CONSTRAINT_LE );
163966 assert( WO_GT==SQLITE_INDEX_CONSTRAINT_GT );
163967 assert( WO_GE==SQLITE_INDEX_CONSTRAINT_GE );
163968 assert( pTerm->eOperator&(WO_IN|WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_AUX) );
163969
163970 if( op & (WO_LT|WO_LE|WO_GT|WO_GE)
163971 && sqlite3ExprIsVector(pTerm->pExpr->pRight)
163972 ){
163973 testcase( j!=i );
163974 if( j<16 ) mNoOmit |= (1 << j);
163975 if( op==WO_LT ) pIdxCons[j].op = WO_LE;
163976 if( op==WO_GT ) pIdxCons[j].op = WO_GE;
163977 }
163978 }
163979
163980 j++;
163981 }
163982 }
163983 assert( j==nTerm );
163984 pIdxInfo->nConstraint = j;
163985 for(i=j=0; i<nOrderBy; i++){
163986 Expr *pExpr = pOrderBy->a[i].pExpr;
@@ -163721,10 +163995,21 @@
163995 pIdxInfo->nOrderBy = j;
163996
163997 *pmNoOmit = mNoOmit;
163998 return pIdxInfo;
163999 }
164000
164001 /*
164002 ** Free and zero the sqlite3_index_info.idxStr value if needed.
164003 */
164004 static void freeIdxStr(sqlite3_index_info *pIdxInfo){
164005 if( pIdxInfo->needToFreeIdxStr ){
164006 sqlite3_free(pIdxInfo->idxStr);
164007 pIdxInfo->idxStr = 0;
164008 pIdxInfo->needToFreeIdxStr = 0;
164009 }
164010 }
164011
164012 /*
164013 ** Free an sqlite3_index_info structure allocated by allocateIndexInfo()
164014 ** and possibly modified by xBestIndex methods.
164015 */
@@ -163737,10 +164022,11 @@
164022 assert( pHidden->pParse->db==db );
164023 for(i=0; i<pIdxInfo->nConstraint; i++){
164024 sqlite3ValueFree(pHidden->aRhs[i]); /* IMP: R-14553-25174 */
164025 pHidden->aRhs[i] = 0;
164026 }
164027 freeIdxStr(pIdxInfo);
164028 sqlite3DbFree(db, pIdxInfo);
164029 }
164030
164031 /*
164032 ** The table object reference passed as the second argument to this function
@@ -165088,11 +165374,11 @@
165374 && (pTerm->wtFlags & TERM_HIGHTRUTH)==0 /* tag-20200224-1 */
165375 ){
165376 Expr *pRight = pTerm->pExpr->pRight;
165377 int k = 0;
165378 testcase( pTerm->pExpr->op==TK_IS );
165379 if( sqlite3ExprIsInteger(pRight, &k, 0) && k>=(-1) && k<=1 ){
165380 k = 10;
165381 }else{
165382 k = 20;
165383 }
165384 if( iReduce<k ){
@@ -166337,11 +166623,11 @@
166623
166624 /* Set the usable flag on the subset of constraints identified by
166625 ** arguments mUsable and mExclude. */
166626 pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
166627 for(i=0; i<nConstraint; i++, pIdxCons++){
166628 WhereTerm *pTerm = termFromWhereClause(pWC, pIdxCons->iTermOffset);
166629 pIdxCons->usable = 0;
166630 if( (pTerm->prereqRight & mUsable)==pTerm->prereqRight
166631 && (pTerm->eOperator & mExclude)==0
166632 && (pbRetryLimit || !isLimitTerm(pTerm))
166633 ){
@@ -166368,10 +166654,11 @@
166654 /* If the xBestIndex method returns SQLITE_CONSTRAINT, that means
166655 ** that the particular combination of parameters provided is unusable.
166656 ** Make no entries in the loop table.
166657 */
166658 WHERETRACE(0xffffffff, (" ^^^^--- non-viable plan rejected!\n"));
166659 freeIdxStr(pIdxInfo);
166660 return SQLITE_OK;
166661 }
166662 return rc;
166663 }
166664
@@ -166385,22 +166672,21 @@
166672 if( (iTerm = pUsage[i].argvIndex - 1)>=0 ){
166673 WhereTerm *pTerm;
166674 int j = pIdxCons->iTermOffset;
166675 if( iTerm>=nConstraint
166676 || j<0
166677 || (pTerm = termFromWhereClause(pWC, j))==0
166678 || pNew->aLTerm[iTerm]!=0
166679 || pIdxCons->usable==0
166680 ){
166681 sqlite3ErrorMsg(pParse,"%s.xBestIndex malfunction",pSrc->pTab->zName);
166682 freeIdxStr(pIdxInfo);
166683 return SQLITE_ERROR;
166684 }
166685 testcase( iTerm==nConstraint-1 );
166686 testcase( j==0 );
166687 testcase( j==pWC->nTerm-1 );
 
166688 pNew->prereq |= pTerm->prereqRight;
166689 assert( iTerm<pNew->nLSlot );
166690 pNew->aLTerm[iTerm] = pTerm;
166691 if( iTerm>mxTerm ) mxTerm = iTerm;
166692 testcase( iTerm==15 );
@@ -166441,15 +166727,11 @@
166727 ** OFFSET term handled as well, the plan is unusable. Similarly,
166728 ** if there is a LIMIT/OFFSET and there are other unused terms,
166729 ** the plan cannot be used. In these cases set variable *pbRetryLimit
166730 ** to true to tell the caller to retry with LIMIT and OFFSET
166731 ** disabled. */
166732 freeIdxStr(pIdxInfo);
 
 
 
 
166733 *pbRetryLimit = 1;
166734 return SQLITE_OK;
166735 }
166736 }
166737 }
@@ -166458,11 +166740,11 @@
166740 for(i=0; i<=mxTerm; i++){
166741 if( pNew->aLTerm[i]==0 ){
166742 /* The non-zero argvIdx values must be contiguous. Raise an
166743 ** error if they are not */
166744 sqlite3ErrorMsg(pParse,"%s.xBestIndex malfunction",pSrc->pTab->zName);
166745 freeIdxStr(pIdxInfo);
166746 return SQLITE_ERROR;
166747 }
166748 }
166749 assert( pNew->nLTerm<=pNew->nLSlot );
166750 pNew->u.vtab.idxNum = pIdxInfo->idxNum;
@@ -166513,11 +166795,11 @@
166795 HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1];
166796 const char *zRet = 0;
166797 if( iCons>=0 && iCons<pIdxInfo->nConstraint ){
166798 CollSeq *pC = 0;
166799 int iTerm = pIdxInfo->aConstraint[iCons].iTermOffset;
166800 Expr *pX = termFromWhereClause(pHidden->pWC, iTerm)->pExpr;
166801 if( pX->pLeft ){
166802 pC = sqlite3ExprCompareCollSeq(pHidden->pParse, pX);
166803 }
166804 zRet = (pC ? pC->zName : sqlite3StrBINARY);
166805 }
@@ -166559,11 +166841,13 @@
166841 int rc = SQLITE_OK;
166842 if( iCons<0 || iCons>=pIdxInfo->nConstraint ){
166843 rc = SQLITE_MISUSE_BKPT; /* EV: R-30545-25046 */
166844 }else{
166845 if( pH->aRhs[iCons]==0 ){
166846 WhereTerm *pTerm = termFromWhereClause(
166847 pH->pWC, pIdxInfo->aConstraint[iCons].iTermOffset
166848 );
166849 rc = sqlite3ValueFromExpr(
166850 pH->pParse->db, pTerm->pExpr->pRight, ENC(pH->pParse->db),
166851 SQLITE_AFF_BLOB, &pH->aRhs[iCons]
166852 );
166853 testcase( rc!=SQLITE_OK );
@@ -166715,13 +166999,12 @@
166999 while( rc==SQLITE_OK ){
167000 int i;
167001 Bitmask mNext = ALLBITS;
167002 assert( mNext>0 );
167003 for(i=0; i<nConstraint; i++){
167004 int iTerm = p->aConstraint[i].iTermOffset;
167005 Bitmask mThis = termFromWhereClause(pWC, iTerm)->prereqRight & ~mPrereq;
 
167006 if( mThis>mPrev && mThis<mNext ) mNext = mThis;
167007 }
167008 mPrev = mNext;
167009 if( mNext==ALLBITS ) break;
167010 if( mNext==mBest || mNext==mBestNoIn ) continue;
@@ -166753,11 +167036,10 @@
167036 rc = whereLoopAddVirtualOne(
167037 pBuilder, mPrereq, mPrereq, WO_IN, p, mNoOmit, &bIn, 0);
167038 }
167039 }
167040
 
167041 freeIndexInfo(pParse->db, p);
167042 WHERETRACE(0x800, ("END %s.addVirtual(), rc=%d\n", pSrc->pTab->zName, rc));
167043 return rc;
167044 }
167045 #endif /* SQLITE_OMIT_VIRTUALTABLE */
@@ -167440,11 +167722,11 @@
167722 ** For the purposes of SQLite, a star-query is defined as a query
167723 ** with a large central table that is joined against four or more
167724 ** smaller tables. The central table is called the "fact" table.
167725 ** The smaller tables that get joined are "dimension tables".
167726 **
167727 ** SIDE EFFECT: (and really the whole point of this subroutine)
167728 **
167729 ** If pWInfo describes a star-query, then the cost on WhereLoops for the
167730 ** fact table is reduced. This heuristic helps keep fact tables in
167731 ** outer loops. Without this heuristic, paths with fact tables in outer
167732 ** loops tend to get pruned by the mxChoice limit on the number of paths,
@@ -167452,11 +167734,11 @@
167734 ** adjustment is stored in pWInfo->nOutStarDelta and the cost adjustment
167735 ** for each WhereLoop is stored in its rStarDelta field.
167736 */
167737 static int computeMxChoice(WhereInfo *pWInfo, LogEst nRowEst){
167738 int nLoop = pWInfo->nLevel; /* Number of terms in the join */
167739 if( nRowEst==0 && nLoop>=5 ){
167740 /* Check to see if we are dealing with a star schema and if so, reduce
167741 ** the cost of fact tables relative to dimension tables, as a heuristic
167742 ** to help keep the fact tables in outer loops.
167743 */
167744 int iLoop; /* Counter over join terms */
@@ -168168,10 +168450,14 @@
168450 ** might move from the right side to the left side of the RIGHT JOIN.
168451 ** Note: Due to (2), this condition can only arise if the table is
168452 ** the right-most table of a subquery that was flattened into the
168453 ** main query and that subquery was the right-hand operand of an
168454 ** inner join that held an ON or USING clause.
168455 ** 6) The ORDER BY clause has 63 or fewer terms
168456 ** 7) The omit-noop-join optimization is enabled.
168457 **
168458 ** Items (1), (6), and (7) are checked by the caller.
168459 **
168460 ** For example, given:
168461 **
168462 ** CREATE TABLE t1(ipk INTEGER PRIMARY KEY, v1);
168463 ** CREATE TABLE t2(ipk INTEGER PRIMARY KEY, v2);
@@ -168582,10 +168868,11 @@
168868 /* An ORDER/GROUP BY clause of more than 63 terms cannot be optimized */
168869 testcase( pOrderBy && pOrderBy->nExpr==BMS-1 );
168870 if( pOrderBy && pOrderBy->nExpr>=BMS ){
168871 pOrderBy = 0;
168872 wctrlFlags &= ~WHERE_WANT_DISTINCT;
168873 wctrlFlags |= WHERE_KEEP_ALL_JOINS; /* Disable omit-noop-join opt */
168874 }
168875
168876 /* The number of tables in the FROM clause is limited by the number of
168877 ** bits in a Bitmask
168878 */
@@ -168882,14 +169169,14 @@
169169 ** some C-compiler optimizers from in-lining the
169170 ** sqlite3WhereCodeOneLoopStart() procedure, and it is important to
169171 ** in-line sqlite3WhereCodeOneLoopStart() for performance reasons.
169172 */
169173 notReady = ~(Bitmask)0;
169174 if( pWInfo->nLevel>=2 /* Must be a join, or this opt8n is pointless */
169175 && pResultSet!=0 /* Condition (1) */
169176 && 0==(wctrlFlags & (WHERE_AGG_DISTINCT|WHERE_KEEP_ALL_JOINS)) /* (1),(6) */
169177 && OptimizationEnabled(db, SQLITE_OmitNoopJoin) /* (7) */
169178 ){
169179 notReady = whereOmitNoopJoin(pWInfo, notReady);
169180 nTabList = pWInfo->nLevel;
169181 assert( nTabList>0 );
169182 }
@@ -170479,11 +170766,11 @@
170766 }
170767 if( bIntToNull ){
170768 int iDummy;
170769 Expr *pSub;
170770 pSub = sqlite3ExprSkipCollateAndLikely(pDup);
170771 if( sqlite3ExprIsInteger(pSub, &iDummy, 0) ){
170772 pSub->op = TK_NULL;
170773 pSub->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
170774 pSub->u.zToken = 0;
170775 }
170776 }
@@ -172956,136 +173243,136 @@
173243 #define TK_EACH 41
173244 #define TK_FAIL 42
173245 #define TK_OR 43
173246 #define TK_AND 44
173247 #define TK_IS 45
173248 #define TK_ISNOT 46
173249 #define TK_MATCH 47
173250 #define TK_LIKE_KW 48
173251 #define TK_BETWEEN 49
173252 #define TK_IN 50
173253 #define TK_ISNULL 51
173254 #define TK_NOTNULL 52
173255 #define TK_NE 53
173256 #define TK_EQ 54
173257 #define TK_GT 55
173258 #define TK_LE 56
173259 #define TK_LT 57
173260 #define TK_GE 58
173261 #define TK_ESCAPE 59
173262 #define TK_ID 60
173263 #define TK_COLUMNKW 61
173264 #define TK_DO 62
173265 #define TK_FOR 63
173266 #define TK_IGNORE 64
173267 #define TK_INITIALLY 65
173268 #define TK_INSTEAD 66
173269 #define TK_NO 67
173270 #define TK_KEY 68
173271 #define TK_OF 69
173272 #define TK_OFFSET 70
173273 #define TK_PRAGMA 71
173274 #define TK_RAISE 72
173275 #define TK_RECURSIVE 73
173276 #define TK_REPLACE 74
173277 #define TK_RESTRICT 75
173278 #define TK_ROW 76
173279 #define TK_ROWS 77
173280 #define TK_TRIGGER 78
173281 #define TK_VACUUM 79
173282 #define TK_VIEW 80
173283 #define TK_VIRTUAL 81
173284 #define TK_WITH 82
173285 #define TK_NULLS 83
173286 #define TK_FIRST 84
173287 #define TK_LAST 85
173288 #define TK_CURRENT 86
173289 #define TK_FOLLOWING 87
173290 #define TK_PARTITION 88
173291 #define TK_PRECEDING 89
173292 #define TK_RANGE 90
173293 #define TK_UNBOUNDED 91
173294 #define TK_EXCLUDE 92
173295 #define TK_GROUPS 93
173296 #define TK_OTHERS 94
173297 #define TK_TIES 95
173298 #define TK_GENERATED 96
173299 #define TK_ALWAYS 97
173300 #define TK_MATERIALIZED 98
173301 #define TK_REINDEX 99
173302 #define TK_RENAME 100
173303 #define TK_CTIME_KW 101
173304 #define TK_ANY 102
173305 #define TK_BITAND 103
173306 #define TK_BITOR 104
173307 #define TK_LSHIFT 105
173308 #define TK_RSHIFT 106
173309 #define TK_PLUS 107
173310 #define TK_MINUS 108
173311 #define TK_STAR 109
173312 #define TK_SLASH 110
173313 #define TK_REM 111
173314 #define TK_CONCAT 112
173315 #define TK_PTR 113
173316 #define TK_COLLATE 114
173317 #define TK_BITNOT 115
173318 #define TK_ON 116
173319 #define TK_INDEXED 117
173320 #define TK_STRING 118
173321 #define TK_JOIN_KW 119
173322 #define TK_CONSTRAINT 120
173323 #define TK_DEFAULT 121
173324 #define TK_NULL 122
173325 #define TK_PRIMARY 123
173326 #define TK_UNIQUE 124
173327 #define TK_CHECK 125
173328 #define TK_REFERENCES 126
173329 #define TK_AUTOINCR 127
173330 #define TK_INSERT 128
173331 #define TK_DELETE 129
173332 #define TK_UPDATE 130
173333 #define TK_SET 131
173334 #define TK_DEFERRABLE 132
173335 #define TK_FOREIGN 133
173336 #define TK_DROP 134
173337 #define TK_UNION 135
173338 #define TK_ALL 136
173339 #define TK_EXCEPT 137
173340 #define TK_INTERSECT 138
173341 #define TK_SELECT 139
173342 #define TK_VALUES 140
173343 #define TK_DISTINCT 141
173344 #define TK_DOT 142
173345 #define TK_FROM 143
173346 #define TK_JOIN 144
173347 #define TK_USING 145
173348 #define TK_ORDER 146
173349 #define TK_GROUP 147
173350 #define TK_HAVING 148
173351 #define TK_LIMIT 149
173352 #define TK_WHERE 150
173353 #define TK_RETURNING 151
173354 #define TK_INTO 152
173355 #define TK_NOTHING 153
173356 #define TK_FLOAT 154
173357 #define TK_BLOB 155
173358 #define TK_INTEGER 156
173359 #define TK_VARIABLE 157
173360 #define TK_CASE 158
173361 #define TK_WHEN 159
173362 #define TK_THEN 160
173363 #define TK_ELSE 161
173364 #define TK_INDEX 162
173365 #define TK_ALTER 163
173366 #define TK_ADD 164
173367 #define TK_WINDOW 165
173368 #define TK_OVER 166
173369 #define TK_FILTER 167
173370 #define TK_COLUMN 168
173371 #define TK_AGG_FUNCTION 169
173372 #define TK_AGG_COLUMN 170
173373 #define TK_TRUEFALSE 171
173374 #define TK_FUNCTION 172
173375 #define TK_UPLUS 173
173376 #define TK_UMINUS 174
173377 #define TK_TRUTH 175
173378 #define TK_REGISTER 176
@@ -173162,11 +173449,11 @@
173449 #endif
173450 /************* Begin control #defines *****************************************/
173451 #define YYCODETYPE unsigned short int
173452 #define YYNOCODE 322
173453 #define YYACTIONTYPE unsigned short int
173454 #define YYWILDCARD 102
173455 #define sqlite3ParserTOKENTYPE Token
173456 typedef union {
173457 int yyinit;
173458 sqlite3ParserTOKENTYPE yy0;
173459 ExprList* yy14;
@@ -173299,452 +173586,456 @@
173586 ** yy_reduce_ofst[] For each state, the offset into yy_action for
173587 ** shifting non-terminals after a reduce.
173588 ** yy_default[] Default action for each state.
173589 **
173590 *********** Begin parsing tables **********************************************/
173591 #define YY_ACTTAB_COUNT (2207)
173592 static const YYACTIONTYPE yy_action[] = {
173593 /* 0 */ 130, 127, 234, 282, 282, 1328, 576, 1307, 460, 289,
173594 /* 10 */ 289, 576, 1622, 381, 576, 1328, 573, 576, 562, 413,
173595 /* 20 */ 1300, 1542, 573, 481, 562, 524, 460, 459, 558, 82,
173596 /* 30 */ 82, 983, 294, 375, 51, 51, 498, 61, 61, 984,
173597 /* 40 */ 82, 82, 1577, 137, 138, 91, 7, 1228, 1228, 1063,
173598 /* 50 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 413,
173599 /* 60 */ 288, 288, 182, 288, 288, 481, 536, 288, 288, 130,
173600 /* 70 */ 127, 234, 432, 573, 525, 562, 573, 557, 562, 1290,
173601 /* 80 */ 573, 421, 562, 137, 138, 91, 559, 1228, 1228, 1063,
173602 /* 90 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 296,
173603 /* 100 */ 460, 398, 1249, 134, 134, 134, 134, 133, 133, 132,
173604 /* 110 */ 132, 132, 131, 128, 451, 44, 1050, 1050, 1064, 1067,
173605 /* 120 */ 1255, 1, 1, 582, 2, 1259, 581, 1174, 1259, 1174,
173606 /* 130 */ 321, 413, 155, 321, 1584, 155, 379, 112, 498, 1341,
173607 /* 140 */ 456, 299, 1341, 134, 134, 134, 134, 133, 133, 132,
173608 /* 150 */ 132, 132, 131, 128, 451, 137, 138, 91, 1105, 1228,
173609 /* 160 */ 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136,
173610 /* 170 */ 136, 1204, 320, 567, 288, 288, 283, 288, 288, 523,
173611 /* 180 */ 523, 1250, 139, 1541, 7, 214, 503, 573, 1169, 562,
173612 /* 190 */ 573, 1054, 562, 136, 136, 136, 136, 129, 401, 547,
173613 /* 200 */ 487, 1169, 245, 1568, 1169, 245, 133, 133, 132, 132,
173614 /* 210 */ 132, 131, 128, 451, 261, 134, 134, 134, 134, 133,
173615 /* 220 */ 133, 132, 132, 132, 131, 128, 451, 451, 1204, 1205,
173616 /* 230 */ 1204, 130, 127, 234, 455, 413, 182, 455, 130, 127,
173617 /* 240 */ 234, 134, 134, 134, 134, 133, 133, 132, 132, 132,
173618 /* 250 */ 131, 128, 451, 136, 136, 136, 136, 538, 576, 137,
173619 /* 260 */ 138, 91, 261, 1228, 1228, 1063, 1066, 1053, 1053, 135,
173620 /* 270 */ 135, 136, 136, 136, 136, 44, 472, 346, 1204, 472,
173621 /* 280 */ 346, 51, 51, 418, 93, 157, 134, 134, 134, 134,
173622 /* 290 */ 133, 133, 132, 132, 132, 131, 128, 451, 166, 363,
173623 /* 300 */ 298, 134, 134, 134, 134, 133, 133, 132, 132, 132,
173624 /* 310 */ 131, 128, 451, 1293, 461, 1570, 423, 377, 275, 134,
173625 /* 320 */ 134, 134, 134, 133, 133, 132, 132, 132, 131, 128,
173626 /* 330 */ 451, 418, 320, 567, 1292, 1204, 1205, 1204, 257, 413,
173627 /* 340 */ 483, 511, 508, 507, 94, 132, 132, 132, 131, 128,
173628 /* 350 */ 451, 506, 1204, 548, 548, 388, 576, 384, 7, 413,
173629 /* 360 */ 550, 229, 522, 137, 138, 91, 530, 1228, 1228, 1063,
173630 /* 370 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 51,
173631 /* 380 */ 51, 1582, 380, 137, 138, 91, 331, 1228, 1228, 1063,
173632 /* 390 */ 1066, 1053, 1053, 135, 135, 136, 136, 136, 136, 320,
173633 /* 400 */ 567, 288, 288, 320, 567, 1602, 582, 2, 1259, 1204,
173634 /* 410 */ 1205, 1204, 1628, 321, 573, 155, 562, 576, 1511, 264,
173635 /* 420 */ 231, 520, 1341, 134, 134, 134, 134, 133, 133, 132,
173636 /* 430 */ 132, 132, 131, 128, 451, 519, 1511, 1513, 1333, 1333,
173637 /* 440 */ 82, 82, 498, 134, 134, 134, 134, 133, 133, 132,
173638 /* 450 */ 132, 132, 131, 128, 451, 1435, 257, 288, 288, 511,
173639 /* 460 */ 508, 507, 944, 1568, 413, 1019, 1204, 943, 360, 506,
173640 /* 470 */ 573, 1598, 562, 44, 575, 551, 551, 557, 1107, 1582,
173641 /* 480 */ 544, 576, 1107, 40, 417, 245, 531, 1505, 137, 138,
173642 /* 490 */ 91, 219, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135,
173643 /* 500 */ 136, 136, 136, 136, 81, 81, 1281, 1204, 413, 553,
173644 /* 510 */ 1511, 48, 512, 448, 447, 493, 578, 455, 578, 344,
173645 /* 520 */ 45, 1204, 1233, 1204, 1205, 1204, 428, 1235, 158, 882,
173646 /* 530 */ 320, 567, 137, 138, 91, 1234, 1228, 1228, 1063, 1066,
173647 /* 540 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 134, 134,
173648 /* 550 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451,
173649 /* 560 */ 1236, 576, 1236, 329, 1204, 1205, 1204, 387, 492, 403,
173650 /* 570 */ 1040, 382, 489, 123, 568, 1569, 4, 377, 1204, 1205,
173651 /* 580 */ 1204, 570, 570, 570, 82, 82, 882, 1029, 1331, 1331,
173652 /* 590 */ 571, 1028, 134, 134, 134, 134, 133, 133, 132, 132,
173653 /* 600 */ 132, 131, 128, 451, 288, 288, 1281, 1204, 576, 423,
173654 /* 610 */ 576, 1568, 413, 423, 452, 378, 886, 573, 1279, 562,
173655 /* 620 */ 46, 557, 532, 1028, 1028, 1030, 565, 130, 127, 234,
173656 /* 630 */ 556, 82, 82, 82, 82, 479, 137, 138, 91, 462,
173657 /* 640 */ 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136,
173658 /* 650 */ 136, 136, 1188, 487, 1506, 1040, 413, 6, 1204, 50,
173659 /* 660 */ 879, 121, 121, 948, 1204, 1205, 1204, 358, 557, 122,
173660 /* 670 */ 316, 452, 577, 452, 535, 1204, 1028, 439, 303, 212,
173661 /* 680 */ 137, 138, 91, 213, 1228, 1228, 1063, 1066, 1053, 1053,
173662 /* 690 */ 135, 135, 136, 136, 136, 136, 134, 134, 134, 134,
173663 /* 700 */ 133, 133, 132, 132, 132, 131, 128, 451, 1028, 1028,
173664 /* 710 */ 1030, 1031, 35, 288, 288, 1204, 1205, 1204, 1040, 1339,
173665 /* 720 */ 533, 123, 568, 1569, 4, 377, 573, 1019, 562, 353,
173666 /* 730 */ 1277, 356, 1204, 1205, 1204, 1029, 488, 1188, 571, 1028,
173667 /* 740 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131,
173668 /* 750 */ 128, 451, 576, 343, 288, 288, 449, 449, 449, 971,
173669 /* 760 */ 413, 1627, 452, 911, 1187, 288, 288, 573, 464, 562,
173670 /* 770 */ 238, 1028, 1028, 1030, 565, 82, 82, 498, 573, 411,
173671 /* 780 */ 562, 344, 467, 332, 137, 138, 91, 197, 1228, 1228,
173672 /* 790 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173673 /* 800 */ 1188, 528, 1169, 1040, 413, 1110, 1110, 495, 1041, 121,
173674 /* 810 */ 121, 1204, 317, 540, 862, 1169, 1244, 122, 1169, 452,
173675 /* 820 */ 577, 452, 1340, 198, 1028, 1204, 481, 526, 137, 138,
173676 /* 830 */ 91, 560, 1228, 1228, 1063, 1066, 1053, 1053, 135, 135,
173677 /* 840 */ 136, 136, 136, 136, 134, 134, 134, 134, 133, 133,
173678 /* 850 */ 132, 132, 132, 131, 128, 451, 1028, 1028, 1030, 1031,
173679 /* 860 */ 35, 1204, 288, 288, 1204, 477, 288, 288, 1204, 1205,
173680 /* 870 */ 1204, 539, 481, 437, 470, 573, 1451, 562, 364, 573,
173681 /* 880 */ 1153, 562, 1204, 1205, 1204, 1188, 5, 576, 134, 134,
173682 /* 890 */ 134, 134, 133, 133, 132, 132, 132, 131, 128, 451,
173683 /* 900 */ 221, 214, 302, 96, 1149, 1657, 232, 1657, 413, 392,
173684 /* 910 */ 19, 19, 1024, 949, 406, 373, 1595, 1085, 1204, 1205,
173685 /* 920 */ 1204, 1204, 1205, 1204, 1204, 426, 1149, 1658, 413, 1658,
173686 /* 930 */ 1659, 399, 137, 138, 91, 3, 1228, 1228, 1063, 1066,
173687 /* 940 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 304, 1311,
173688 /* 950 */ 514, 1204, 137, 138, 91, 1498, 1228, 1228, 1063, 1066,
173689 /* 960 */ 1053, 1053, 135, 135, 136, 136, 136, 136, 434, 131,
173690 /* 970 */ 128, 451, 375, 1204, 274, 291, 372, 517, 367, 516,
173691 /* 980 */ 262, 1204, 1205, 1204, 1147, 227, 363, 448, 447, 1435,
173692 /* 990 */ 1568, 1310, 134, 134, 134, 134, 133, 133, 132, 132,
173693 /* 1000 */ 132, 131, 128, 451, 1568, 576, 1147, 487, 1204, 1205,
173694 /* 1010 */ 1204, 442, 134, 134, 134, 134, 133, 133, 132, 132,
173695 /* 1020 */ 132, 131, 128, 451, 386, 576, 485, 576, 19, 19,
173696 /* 1030 */ 1204, 1205, 1204, 1345, 1236, 970, 1236, 574, 47, 936,
173697 /* 1040 */ 936, 473, 413, 431, 1552, 573, 1125, 562, 19, 19,
173698 /* 1050 */ 19, 19, 49, 336, 850, 851, 852, 111, 1368, 315,
173699 /* 1060 */ 429, 576, 413, 433, 341, 306, 137, 138, 91, 115,
173700 /* 1070 */ 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136,
173701 /* 1080 */ 136, 136, 576, 1309, 82, 82, 137, 138, 91, 529,
173702 /* 1090 */ 1228, 1228, 1063, 1066, 1053, 1053, 135, 135, 136, 136,
173703 /* 1100 */ 136, 136, 1569, 222, 377, 19, 19, 305, 1126, 1169,
173704 /* 1110 */ 398, 1148, 22, 22, 498, 333, 1569, 335, 377, 576,
173705 /* 1120 */ 438, 445, 1169, 1127, 486, 1169, 134, 134, 134, 134,
173706 /* 1130 */ 133, 133, 132, 132, 132, 131, 128, 451, 1128, 576,
173707 /* 1140 */ 902, 576, 145, 145, 6, 576, 134, 134, 134, 134,
173708 /* 1150 */ 133, 133, 132, 132, 132, 131, 128, 451, 214, 1336,
173709 /* 1160 */ 922, 576, 19, 19, 19, 19, 1282, 419, 19, 19,
173710 /* 1170 */ 923, 412, 515, 141, 576, 1169, 413, 206, 465, 207,
173711 /* 1180 */ 903, 215, 1575, 552, 147, 147, 7, 227, 1169, 411,
173712 /* 1190 */ 1250, 1169, 120, 307, 117, 307, 413, 66, 66, 334,
173713 /* 1200 */ 137, 138, 91, 119, 1228, 1228, 1063, 1066, 1053, 1053,
173714 /* 1210 */ 135, 135, 136, 136, 136, 136, 413, 285, 209, 969,
173715 /* 1220 */ 137, 138, 91, 471, 1228, 1228, 1063, 1066, 1053, 1053,
173716 /* 1230 */ 135, 135, 136, 136, 136, 136, 435, 10, 1450, 267,
173717 /* 1240 */ 137, 126, 91, 1435, 1228, 1228, 1063, 1066, 1053, 1053,
173718 /* 1250 */ 135, 135, 136, 136, 136, 136, 1435, 1435, 410, 409,
173719 /* 1260 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131,
173720 /* 1270 */ 128, 451, 576, 969, 576, 1224, 498, 373, 1595, 1554,
173721 /* 1280 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131,
173722 /* 1290 */ 128, 451, 532, 457, 576, 82, 82, 82, 82, 111,
173723 /* 1300 */ 134, 134, 134, 134, 133, 133, 132, 132, 132, 131,
173724 /* 1310 */ 128, 451, 109, 233, 430, 1576, 546, 67, 67, 7,
173725 /* 1320 */ 413, 351, 550, 1550, 260, 259, 258, 494, 443, 569,
173726 /* 1330 */ 419, 983, 446, 1224, 450, 545, 1207, 576, 969, 984,
173727 /* 1340 */ 413, 475, 1449, 1574, 1180, 138, 91, 7, 1228, 1228,
173728 /* 1350 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173729 /* 1360 */ 21, 21, 267, 576, 300, 1126, 91, 233, 1228, 1228,
173730 /* 1370 */ 1063, 1066, 1053, 1053, 135, 135, 136, 136, 136, 136,
173731 /* 1380 */ 1127, 373, 1595, 161, 1573, 16, 53, 53, 7, 108,
173732 /* 1390 */ 533, 38, 969, 125, 1207, 1128, 1180, 576, 1224, 123,
173733 /* 1400 */ 568, 893, 4, 324, 134, 134, 134, 134, 133, 133,
173734 /* 1410 */ 132, 132, 132, 131, 128, 451, 571, 564, 534, 576,
173735 /* 1420 */ 68, 68, 576, 39, 134, 134, 134, 134, 133, 133,
173736 /* 1430 */ 132, 132, 132, 131, 128, 451, 576, 160, 1571, 1223,
173737 /* 1440 */ 452, 576, 54, 54, 576, 69, 69, 576, 1366, 576,
173738 /* 1450 */ 420, 184, 565, 463, 297, 576, 1224, 463, 297, 70,
173739 /* 1460 */ 70, 576, 44, 474, 71, 71, 576, 72, 72, 576,
173740 /* 1470 */ 73, 73, 55, 55, 411, 874, 242, 576, 56, 56,
173741 /* 1480 */ 576, 1040, 576, 478, 57, 57, 576, 121, 121, 59,
173742 /* 1490 */ 59, 23, 60, 60, 411, 122, 319, 452, 577, 452,
173743 /* 1500 */ 74, 74, 1028, 75, 75, 76, 76, 411, 290, 20,
173744 /* 1510 */ 20, 108, 287, 231, 553, 123, 568, 325, 4, 320,
173745 /* 1520 */ 567, 97, 218, 944, 1144, 328, 400, 576, 943, 576,
173746 /* 1530 */ 1380, 424, 571, 874, 1028, 1028, 1030, 1031, 35, 293,
173747 /* 1540 */ 534, 576, 1104, 576, 1104, 9, 576, 342, 576, 111,
173748 /* 1550 */ 77, 77, 143, 143, 576, 205, 452, 222, 1379, 889,
173749 /* 1560 */ 576, 901, 900, 1188, 144, 144, 78, 78, 565, 62,
173750 /* 1570 */ 62, 79, 79, 323, 1021, 576, 266, 63, 63, 908,
173751 /* 1580 */ 909, 1589, 542, 80, 80, 576, 371, 541, 123, 568,
173752 /* 1590 */ 480, 4, 266, 482, 244, 266, 370, 1040, 64, 64,
173753 /* 1600 */ 576, 466, 576, 121, 121, 571, 1557, 576, 170, 170,
173754 /* 1610 */ 576, 122, 576, 452, 577, 452, 576, 889, 1028, 576,
173755 /* 1620 */ 165, 576, 111, 171, 171, 87, 87, 337, 1616, 452,
173756 /* 1630 */ 65, 65, 1530, 83, 83, 146, 146, 986, 987, 84,
173757 /* 1640 */ 84, 565, 168, 168, 148, 148, 1092, 347, 1032, 111,
173758 /* 1650 */ 1028, 1028, 1030, 1031, 35, 542, 1103, 576, 1103, 576,
173759 /* 1660 */ 543, 123, 568, 504, 4, 263, 576, 361, 1529, 111,
173760 /* 1670 */ 1040, 1088, 576, 263, 576, 490, 121, 121, 571, 1188,
173761 /* 1680 */ 142, 142, 169, 169, 122, 576, 452, 577, 452, 162,
173762 /* 1690 */ 162, 1028, 576, 563, 576, 152, 152, 151, 151, 348,
173763 /* 1700 */ 1376, 974, 452, 266, 1092, 942, 1032, 125, 149, 149,
173764 /* 1710 */ 939, 576, 125, 576, 565, 150, 150, 86, 86, 872,
173765 /* 1720 */ 352, 159, 576, 1028, 1028, 1030, 1031, 35, 542, 941,
173766 /* 1730 */ 576, 125, 355, 541, 88, 88, 85, 85, 357, 359,
173767 /* 1740 */ 1324, 1308, 366, 1040, 376, 52, 52, 499, 1389, 121,
173768 /* 1750 */ 121, 1434, 1188, 58, 58, 1362, 1374, 122, 1439, 452,
173769 /* 1760 */ 577, 452, 1289, 167, 1028, 1280, 280, 1268, 1267, 1269,
173770 /* 1770 */ 1609, 1359, 312, 313, 12, 314, 397, 1421, 224, 1416,
173771 /* 1780 */ 295, 237, 1409, 339, 340, 1426, 301, 345, 484, 228,
173772 /* 1790 */ 1371, 1307, 1372, 1370, 1425, 404, 1028, 1028, 1030, 1031,
173773 /* 1800 */ 35, 1601, 1192, 454, 509, 369, 292, 1502, 210, 1501,
173774 /* 1810 */ 1369, 396, 396, 395, 277, 393, 211, 566, 859, 1612,
173775 /* 1820 */ 1244, 123, 568, 391, 4, 1188, 223, 270, 1549, 1547,
173776 /* 1830 */ 1241, 239, 186, 327, 422, 96, 195, 220, 571, 235,
173777 /* 1840 */ 180, 326, 188, 468, 190, 1507, 191, 192, 92, 193,
173778 /* 1850 */ 469, 95, 1422, 13, 502, 247, 1430, 109, 199, 402,
173779 /* 1860 */ 476, 405, 452, 1496, 1428, 1427, 14, 491, 251, 102,
173780 /* 1870 */ 497, 1518, 241, 281, 565, 253, 203, 354, 500, 254,
173781 /* 1880 */ 175, 1270, 407, 43, 350, 518, 1327, 436, 255, 1326,
173782 /* 1890 */ 1325, 1318, 104, 893, 1626, 229, 408, 440, 1625, 441,
173783 /* 1900 */ 240, 310, 1296, 1040, 311, 1317, 527, 1594, 1297, 121,
173784 /* 1910 */ 121, 368, 1295, 1624, 268, 269, 1580, 122, 1579, 452,
173785 /* 1920 */ 577, 452, 374, 444, 1028, 1394, 1393, 140, 553, 90,
173786 /* 1930 */ 568, 11, 4, 1483, 383, 414, 385, 110, 116, 216,
173787 /* 1940 */ 320, 567, 1350, 555, 42, 318, 571, 537, 1349, 389,
173788 /* 1950 */ 390, 579, 1198, 276, 279, 278, 1028, 1028, 1030, 1031,
173789 /* 1960 */ 35, 580, 415, 1265, 458, 1260, 416, 185, 1534, 172,
173790 /* 1970 */ 452, 1535, 173, 156, 308, 846, 1533, 1532, 453, 217,
173791 /* 1980 */ 225, 89, 565, 174, 322, 1188, 226, 236, 1102, 154,
173792 /* 1990 */ 1100, 330, 176, 187, 1223, 189, 925, 338, 243, 1116,
173793 /* 2000 */ 246, 194, 177, 178, 425, 427, 98, 99, 196, 100,
173794 /* 2010 */ 101, 1040, 179, 1119, 248, 1115, 249, 121, 121, 24,
173795 /* 2020 */ 163, 250, 349, 1108, 266, 122, 1238, 452, 577, 452,
173796 /* 2030 */ 1192, 454, 1028, 200, 292, 496, 252, 201, 861, 396,
173797 /* 2040 */ 396, 395, 277, 393, 15, 501, 859, 370, 292, 256,
173798 /* 2050 */ 202, 554, 505, 396, 396, 395, 277, 393, 103, 239,
173799 /* 2060 */ 859, 327, 25, 26, 1028, 1028, 1030, 1031, 35, 326,
173800 /* 2070 */ 362, 510, 891, 239, 365, 327, 513, 904, 105, 309,
173801 /* 2080 */ 164, 181, 27, 326, 106, 521, 107, 1185, 1069, 1155,
173802 /* 2090 */ 17, 1154, 284, 1188, 286, 978, 265, 204, 125, 1171,
173803 /* 2100 */ 241, 230, 972, 1175, 28, 1160, 29, 1179, 175, 1173,
173804 /* 2110 */ 30, 43, 31, 1178, 241, 32, 41, 549, 8, 33,
173805 /* 2120 */ 208, 111, 175, 1083, 1070, 43, 113, 1068, 240, 114,
173806 /* 2130 */ 1072, 34, 1073, 561, 1124, 118, 271, 36, 18, 1194,
173807 /* 2140 */ 1033, 873, 240, 935, 124, 37, 272, 273, 1617, 572,
173808 /* 2150 */ 183, 153, 394, 1193, 1256, 1256, 1256, 1256, 1256, 1256,
173809 /* 2160 */ 1256, 1256, 1256, 414, 1256, 1256, 1256, 1256, 320, 567,
173810 /* 2170 */ 1256, 1256, 1256, 1256, 1256, 1256, 1256, 414, 1256, 1256,
173811 /* 2180 */ 1256, 1256, 320, 567, 1256, 1256, 1256, 1256, 1256, 1256,
173812 /* 2190 */ 1256, 1256, 458, 1256, 1256, 1256, 1256, 1256, 1256, 1256,
173813 /* 2200 */ 1256, 1256, 1256, 1256, 1256, 1256, 458,
173814 };
173815 static const YYCODETYPE yy_lookahead[] = {
173816 /* 0 */ 276, 277, 278, 240, 241, 224, 194, 226, 194, 240,
173817 /* 10 */ 241, 194, 216, 220, 194, 234, 253, 194, 255, 19,
173818 /* 20 */ 224, 297, 253, 194, 255, 205, 212, 213, 205, 217,
173819 /* 30 */ 218, 31, 205, 194, 217, 218, 194, 217, 218, 39,
173820 /* 40 */ 217, 218, 312, 43, 44, 45, 316, 47, 48, 49,
173821 /* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 19,
173822 /* 60 */ 240, 241, 194, 240, 241, 194, 254, 240, 241, 276,
173823 /* 70 */ 277, 278, 233, 253, 254, 255, 253, 254, 255, 217,
173824 /* 80 */ 253, 239, 255, 43, 44, 45, 263, 47, 48, 49,
173825 /* 90 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 270,
173826 /* 100 */ 286, 22, 23, 103, 104, 105, 106, 107, 108, 109,
173827 /* 110 */ 110, 111, 112, 113, 114, 82, 47, 48, 49, 50,
173828 /* 120 */ 186, 187, 188, 189, 190, 191, 189, 87, 191, 89,
173829 /* 130 */ 196, 19, 198, 196, 317, 198, 319, 25, 194, 205,
173830 /* 140 */ 298, 270, 205, 103, 104, 105, 106, 107, 108, 109,
173831 /* 150 */ 110, 111, 112, 113, 114, 43, 44, 45, 11, 47,
173832 /* 160 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
173833 /* 170 */ 58, 60, 139, 140, 240, 241, 214, 240, 241, 311,
173834 /* 180 */ 312, 102, 70, 239, 316, 194, 19, 253, 77, 255,
173835 /* 190 */ 253, 122, 255, 55, 56, 57, 58, 59, 207, 88,
173836 /* 200 */ 194, 90, 268, 194, 93, 268, 107, 108, 109, 110,
173837 /* 210 */ 111, 112, 113, 114, 47, 103, 104, 105, 106, 107,
173838 /* 220 */ 108, 109, 110, 111, 112, 113, 114, 114, 117, 118,
173839 /* 230 */ 119, 276, 277, 278, 300, 19, 194, 300, 276, 277,
173840 /* 240 */ 278, 103, 104, 105, 106, 107, 108, 109, 110, 111,
173841 /* 250 */ 112, 113, 114, 55, 56, 57, 58, 146, 194, 43,
173842 /* 260 */ 44, 45, 47, 47, 48, 49, 50, 51, 52, 53,
173843 /* 270 */ 54, 55, 56, 57, 58, 82, 129, 130, 60, 129,
173844 /* 280 */ 130, 217, 218, 116, 68, 25, 103, 104, 105, 106,
173845 /* 290 */ 107, 108, 109, 110, 111, 112, 113, 114, 23, 132,
173846 /* 300 */ 294, 103, 104, 105, 106, 107, 108, 109, 110, 111,
173847 /* 310 */ 112, 113, 114, 217, 121, 306, 194, 308, 26, 103,
173848 /* 320 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
173849 /* 330 */ 114, 116, 139, 140, 217, 117, 118, 119, 120, 19,
173850 /* 340 */ 194, 123, 124, 125, 24, 109, 110, 111, 112, 113,
173851 /* 350 */ 114, 133, 60, 311, 312, 250, 194, 252, 316, 19,
173852 /* 360 */ 194, 166, 167, 43, 44, 45, 205, 47, 48, 49,
173853 /* 370 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 217,
173854 /* 380 */ 218, 317, 318, 43, 44, 45, 264, 47, 48, 49,
173855 /* 390 */ 50, 51, 52, 53, 54, 55, 56, 57, 58, 139,
173856 /* 400 */ 140, 240, 241, 139, 140, 188, 189, 190, 191, 117,
173857 /* 410 */ 118, 119, 231, 196, 253, 198, 255, 194, 194, 258,
173858 /* 420 */ 259, 146, 205, 103, 104, 105, 106, 107, 108, 109,
173859 /* 430 */ 110, 111, 112, 113, 114, 109, 212, 213, 236, 237,
173860 /* 440 */ 217, 218, 194, 103, 104, 105, 106, 107, 108, 109,
173861 /* 450 */ 110, 111, 112, 113, 114, 194, 120, 240, 241, 123,
173862 /* 460 */ 124, 125, 136, 194, 19, 74, 60, 141, 23, 133,
173863 /* 470 */ 253, 194, 255, 82, 194, 309, 310, 254, 29, 317,
173864 /* 480 */ 318, 194, 33, 22, 199, 268, 263, 239, 43, 44,
173865 /* 490 */ 45, 151, 47, 48, 49, 50, 51, 52, 53, 54,
173866 /* 500 */ 55, 56, 57, 58, 217, 218, 194, 60, 19, 146,
173867 /* 510 */ 286, 242, 23, 107, 108, 66, 204, 300, 206, 128,
173868 /* 520 */ 73, 60, 116, 117, 118, 119, 265, 121, 165, 60,
173869 /* 530 */ 139, 140, 43, 44, 45, 129, 47, 48, 49, 50,
173870 /* 540 */ 51, 52, 53, 54, 55, 56, 57, 58, 103, 104,
173871 /* 550 */ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
173872 /* 560 */ 154, 194, 156, 194, 117, 118, 119, 280, 283, 205,
173873 /* 570 */ 101, 220, 287, 19, 20, 306, 22, 308, 117, 118,
173874 /* 580 */ 119, 211, 212, 213, 217, 218, 117, 118, 236, 237,
173875 /* 590 */ 36, 122, 103, 104, 105, 106, 107, 108, 109, 110,
173876 /* 600 */ 111, 112, 113, 114, 240, 241, 194, 60, 194, 194,
173877 /* 610 */ 194, 194, 19, 194, 60, 194, 23, 253, 206, 255,
173878 /* 620 */ 73, 254, 19, 154, 155, 156, 72, 276, 277, 278,
173879 /* 630 */ 263, 217, 218, 217, 218, 271, 43, 44, 45, 271,
173880 /* 640 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173881 /* 650 */ 57, 58, 183, 194, 285, 101, 19, 214, 60, 242,
173882 /* 660 */ 23, 107, 108, 109, 117, 118, 119, 16, 254, 115,
173883 /* 670 */ 254, 117, 118, 119, 194, 60, 122, 263, 205, 264,
173884 /* 680 */ 43, 44, 45, 264, 47, 48, 49, 50, 51, 52,
173885 /* 690 */ 53, 54, 55, 56, 57, 58, 103, 104, 105, 106,
173886 /* 700 */ 107, 108, 109, 110, 111, 112, 113, 114, 154, 155,
173887 /* 710 */ 156, 157, 158, 240, 241, 117, 118, 119, 101, 205,
173888 /* 720 */ 117, 19, 20, 306, 22, 308, 253, 74, 255, 78,
173889 /* 730 */ 205, 80, 117, 118, 119, 118, 293, 183, 36, 122,
173890 /* 740 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
173891 /* 750 */ 113, 114, 194, 294, 240, 241, 211, 212, 213, 144,
173892 /* 760 */ 19, 23, 60, 25, 23, 240, 241, 253, 245, 255,
173893 /* 770 */ 15, 154, 155, 156, 72, 217, 218, 194, 253, 256,
173894 /* 780 */ 255, 128, 129, 130, 43, 44, 45, 22, 47, 48,
173895 /* 790 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
173896 /* 800 */ 183, 19, 77, 101, 19, 128, 129, 130, 23, 107,
173897 /* 810 */ 108, 60, 254, 88, 21, 90, 61, 115, 93, 117,
173898 /* 820 */ 118, 119, 239, 22, 122, 60, 194, 205, 43, 44,
173899 /* 830 */ 45, 205, 47, 48, 49, 50, 51, 52, 53, 54,
173900 /* 840 */ 55, 56, 57, 58, 103, 104, 105, 106, 107, 108,
173901 /* 850 */ 109, 110, 111, 112, 113, 114, 154, 155, 156, 157,
173902 /* 860 */ 158, 60, 240, 241, 60, 116, 240, 241, 117, 118,
173903 /* 870 */ 119, 146, 194, 19, 81, 253, 275, 255, 24, 253,
173904 /* 880 */ 98, 255, 117, 118, 119, 183, 22, 194, 103, 104,
173905 /* 890 */ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
173906 /* 900 */ 151, 194, 270, 152, 22, 23, 194, 25, 19, 202,
173907 /* 910 */ 217, 218, 23, 109, 207, 314, 315, 124, 117, 118,
173908 /* 920 */ 119, 117, 118, 119, 60, 232, 22, 23, 19, 25,
173909 /* 930 */ 303, 304, 43, 44, 45, 22, 47, 48, 49, 50,
173910 /* 940 */ 51, 52, 53, 54, 55, 56, 57, 58, 270, 227,
173911 /* 950 */ 96, 60, 43, 44, 45, 162, 47, 48, 49, 50,
173912 /* 960 */ 51, 52, 53, 54, 55, 56, 57, 58, 114, 112,
173913 /* 970 */ 113, 114, 194, 60, 120, 121, 122, 123, 124, 125,
173914 /* 980 */ 126, 117, 118, 119, 102, 25, 132, 107, 108, 194,
173915 /* 990 */ 194, 227, 103, 104, 105, 106, 107, 108, 109, 110,
173916 /* 1000 */ 111, 112, 113, 114, 194, 194, 102, 194, 117, 118,
173917 /* 1010 */ 119, 233, 103, 104, 105, 106, 107, 108, 109, 110,
173918 /* 1020 */ 111, 112, 113, 114, 194, 194, 19, 194, 217, 218,
173919 /* 1030 */ 117, 118, 119, 241, 154, 144, 156, 135, 242, 137,
173920 /* 1040 */ 138, 130, 19, 232, 194, 253, 23, 255, 217, 218,
173921 /* 1050 */ 217, 218, 242, 16, 7, 8, 9, 25, 261, 262,
173922 /* 1060 */ 265, 194, 19, 232, 153, 232, 43, 44, 45, 160,
173923 /* 1070 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173924 /* 1080 */ 57, 58, 194, 227, 217, 218, 43, 44, 45, 194,
173925 /* 1090 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
173926 /* 1100 */ 57, 58, 306, 143, 308, 217, 218, 294, 12, 77,
173927 /* 1110 */ 22, 23, 217, 218, 194, 78, 306, 80, 308, 194,
173928 /* 1120 */ 232, 254, 90, 27, 117, 93, 103, 104, 105, 106,
173929 /* 1130 */ 107, 108, 109, 110, 111, 112, 113, 114, 42, 194,
173930 /* 1140 */ 35, 194, 217, 218, 214, 194, 103, 104, 105, 106,
173931 /* 1150 */ 107, 108, 109, 110, 111, 112, 113, 114, 194, 239,
173932 /* 1160 */ 64, 194, 217, 218, 217, 218, 209, 210, 217, 218,
173933 /* 1170 */ 74, 207, 67, 22, 194, 77, 19, 232, 245, 232,
173934 /* 1180 */ 75, 24, 312, 232, 217, 218, 316, 25, 90, 256,
173935 /* 1190 */ 102, 93, 159, 229, 161, 231, 19, 217, 218, 162,
173936 /* 1200 */ 43, 44, 45, 160, 47, 48, 49, 50, 51, 52,
173937 /* 1210 */ 53, 54, 55, 56, 57, 58, 19, 23, 288, 25,
173938 /* 1220 */ 43, 44, 45, 293, 47, 48, 49, 50, 51, 52,
173939 /* 1230 */ 53, 54, 55, 56, 57, 58, 131, 22, 275, 24,
173940 /* 1240 */ 43, 44, 45, 194, 47, 48, 49, 50, 51, 52,
173941 /* 1250 */ 53, 54, 55, 56, 57, 58, 194, 194, 107, 108,
173942 /* 1260 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
173943 /* 1270 */ 113, 114, 194, 25, 194, 60, 194, 314, 315, 194,
173944 /* 1280 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
173945 /* 1290 */ 113, 114, 19, 194, 194, 217, 218, 217, 218, 25,
173946 /* 1300 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
173947 /* 1310 */ 113, 114, 150, 119, 265, 312, 67, 217, 218, 316,
173948 /* 1320 */ 19, 239, 194, 194, 128, 129, 130, 265, 265, 209,
173949 /* 1330 */ 210, 31, 254, 118, 254, 86, 60, 194, 144, 39,
173950 /* 1340 */ 19, 130, 275, 312, 95, 44, 45, 316, 47, 48,
173951 /* 1350 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
173952 /* 1360 */ 217, 218, 24, 194, 153, 12, 45, 119, 47, 48,
173953 /* 1370 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
173954 /* 1380 */ 27, 314, 315, 22, 312, 24, 217, 218, 316, 116,
173955 /* 1390 */ 117, 22, 144, 25, 118, 42, 147, 194, 60, 19,
173956 /* 1400 */ 20, 127, 22, 194, 103, 104, 105, 106, 107, 108,
173957 /* 1410 */ 109, 110, 111, 112, 113, 114, 36, 64, 145, 194,
173958 /* 1420 */ 217, 218, 194, 54, 103, 104, 105, 106, 107, 108,
173959 /* 1430 */ 109, 110, 111, 112, 113, 114, 194, 22, 310, 25,
173960 /* 1440 */ 60, 194, 217, 218, 194, 217, 218, 194, 260, 194,
173961 /* 1450 */ 301, 302, 72, 262, 262, 194, 118, 266, 266, 217,
173962 /* 1460 */ 218, 194, 82, 245, 217, 218, 194, 217, 218, 194,
173963 /* 1470 */ 217, 218, 217, 218, 256, 60, 24, 194, 217, 218,
173964 /* 1480 */ 194, 101, 194, 245, 217, 218, 194, 107, 108, 217,
173965 /* 1490 */ 218, 22, 217, 218, 256, 115, 245, 117, 118, 119,
173966 /* 1500 */ 217, 218, 122, 217, 218, 217, 218, 256, 22, 217,
173967 /* 1510 */ 218, 116, 258, 259, 146, 19, 20, 194, 22, 139,
173968 /* 1520 */ 140, 150, 151, 136, 23, 194, 25, 194, 141, 194,
173969 /* 1530 */ 194, 62, 36, 118, 154, 155, 156, 157, 158, 100,
173970 /* 1540 */ 145, 194, 154, 194, 156, 49, 194, 23, 194, 25,
173971 /* 1550 */ 217, 218, 217, 218, 194, 257, 60, 143, 194, 60,
173972 /* 1560 */ 194, 121, 122, 183, 217, 218, 217, 218, 72, 217,
173973 /* 1570 */ 218, 217, 218, 134, 23, 194, 25, 217, 218, 7,
173974 /* 1580 */ 8, 321, 86, 217, 218, 194, 122, 91, 19, 20,
173975 /* 1590 */ 23, 22, 25, 23, 142, 25, 132, 101, 217, 218,
173976 /* 1600 */ 194, 194, 194, 107, 108, 36, 194, 194, 217, 218,
173977 /* 1610 */ 194, 115, 194, 117, 118, 119, 194, 118, 122, 194,
173978 /* 1620 */ 23, 194, 25, 217, 218, 217, 218, 194, 142, 60,
173979 /* 1630 */ 217, 218, 194, 217, 218, 217, 218, 84, 85, 217,
173980 /* 1640 */ 218, 72, 217, 218, 217, 218, 60, 23, 60, 25,
173981 /* 1650 */ 154, 155, 156, 157, 158, 86, 154, 194, 156, 194,
173982 /* 1660 */ 91, 19, 20, 23, 22, 25, 194, 23, 194, 25,
173983 /* 1670 */ 101, 23, 194, 25, 194, 194, 107, 108, 36, 183,
173984 /* 1680 */ 217, 218, 217, 218, 115, 194, 117, 118, 119, 217,
173985 /* 1690 */ 218, 122, 194, 237, 194, 217, 218, 217, 218, 194,
173986 /* 1700 */ 194, 23, 60, 25, 118, 23, 118, 25, 217, 218,
173987 /* 1710 */ 23, 194, 25, 194, 72, 217, 218, 217, 218, 23,
173988 /* 1720 */ 194, 25, 194, 154, 155, 156, 157, 158, 86, 23,
173989 /* 1730 */ 194, 25, 194, 91, 217, 218, 217, 218, 194, 194,
173990 /* 1740 */ 194, 194, 194, 101, 194, 217, 218, 290, 194, 107,
173991 /* 1750 */ 108, 194, 183, 217, 218, 194, 194, 115, 194, 117,
173992 /* 1760 */ 118, 119, 194, 243, 122, 194, 289, 194, 194, 194,
173993 /* 1770 */ 194, 257, 257, 257, 244, 257, 192, 273, 215, 269,
173994 /* 1780 */ 246, 299, 269, 295, 247, 273, 247, 246, 295, 230,
173995 /* 1790 */ 261, 226, 261, 261, 273, 273, 154, 155, 156, 157,
173996 /* 1800 */ 158, 0, 1, 2, 221, 220, 5, 220, 250, 220,
173997 /* 1810 */ 261, 10, 11, 12, 13, 14, 250, 282, 17, 197,
173998 /* 1820 */ 61, 19, 20, 246, 22, 183, 244, 142, 201, 201,
173999 /* 1830 */ 38, 30, 299, 32, 201, 152, 22, 151, 36, 299,
174000 /* 1840 */ 43, 40, 235, 18, 238, 285, 238, 238, 296, 238,
174001 /* 1850 */ 201, 296, 274, 272, 18, 200, 235, 150, 235, 247,
174002 /* 1860 */ 247, 247, 60, 247, 274, 274, 272, 201, 200, 159,
174003 /* 1870 */ 63, 292, 71, 201, 72, 200, 22, 201, 222, 200,
174004 /* 1880 */ 79, 201, 222, 82, 291, 116, 219, 65, 200, 219,
174005 /* 1890 */ 219, 228, 22, 127, 225, 166, 222, 24, 225, 114,
174006 /* 1900 */ 99, 284, 221, 101, 284, 228, 307, 315, 219, 107,
174007 /* 1910 */ 108, 219, 219, 219, 201, 92, 320, 115, 320, 117,
174008 /* 1920 */ 118, 119, 222, 83, 122, 267, 267, 149, 146, 19,
174009 /* 1930 */ 20, 22, 22, 279, 250, 134, 201, 148, 159, 249,
174010 /* 1940 */ 139, 140, 251, 141, 25, 281, 36, 147, 251, 248,
174011 /* 1950 */ 247, 203, 13, 195, 6, 195, 154, 155, 156, 157,
174012 /* 1960 */ 158, 193, 305, 193, 163, 193, 305, 302, 214, 208,
174013 /* 1970 */ 60, 214, 208, 223, 223, 4, 214, 214, 3, 22,
174014 /* 1980 */ 215, 214, 72, 208, 164, 183, 215, 15, 23, 16,
174015 /* 1990 */ 23, 140, 131, 152, 25, 143, 20, 16, 24, 1,
174016 /* 2000 */ 145, 143, 131, 131, 62, 37, 54, 54, 152, 54,
174017 /* 2010 */ 54, 101, 131, 117, 34, 1, 142, 107, 108, 22,
174018 /* 2020 */ 5, 116, 162, 69, 25, 115, 76, 117, 118, 119,
174019 /* 2030 */ 1, 2, 122, 69, 5, 41, 142, 116, 20, 10,
174020 /* 2040 */ 11, 12, 13, 14, 24, 19, 17, 132, 5, 126,
174021 /* 2050 */ 22, 141, 68, 10, 11, 12, 13, 14, 22, 30,
174022 /* 2060 */ 17, 32, 22, 22, 154, 155, 156, 157, 158, 40,
174023 /* 2070 */ 23, 68, 60, 30, 24, 32, 97, 28, 22, 68,
174024 /* 2080 */ 23, 37, 34, 40, 150, 22, 25, 23, 23, 23,
174025 /* 2090 */ 22, 98, 23, 183, 23, 117, 34, 22, 25, 89,
174026 /* 2100 */ 71, 142, 144, 76, 34, 23, 34, 76, 79, 87,
174027 /* 2110 */ 34, 82, 34, 94, 71, 34, 22, 24, 44, 34,
174028 /* 2120 */ 25, 25, 79, 23, 23, 82, 143, 23, 99, 143,
174029 /* 2130 */ 23, 22, 11, 25, 23, 25, 22, 22, 22, 1,
174030 /* 2140 */ 23, 23, 99, 136, 22, 22, 142, 142, 142, 25,
174031 /* 2150 */ 25, 23, 15, 1, 322, 322, 322, 322, 322, 322,
174032 /* 2160 */ 322, 322, 322, 134, 322, 322, 322, 322, 139, 140,
174033 /* 2170 */ 322, 322, 322, 322, 322, 322, 322, 134, 322, 322,
174034 /* 2180 */ 322, 322, 139, 140, 322, 322, 322, 322, 322, 322,
174035 /* 2190 */ 322, 322, 163, 322, 322, 322, 322, 322, 322, 322,
174036 /* 2200 */ 322, 322, 322, 322, 322, 322, 163, 322, 322, 322,
174037 /* 2210 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
174038 /* 2220 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
174039 /* 2230 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
174040 /* 2240 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
174041 /* 2250 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
@@ -173754,123 +174045,127 @@
174045 /* 2290 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
174046 /* 2300 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
174047 /* 2310 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
174048 /* 2320 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
174049 /* 2330 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
174050 /* 2340 */ 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
174051 /* 2350 */ 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
174052 /* 2360 */ 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
174053 /* 2370 */ 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
174054 /* 2380 */ 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
174055 /* 2390 */ 186, 186, 186,
174056 };
174057 #define YY_SHIFT_COUNT (582)
174058 #define YY_SHIFT_MIN (0)
174059 #define YY_SHIFT_MAX (2152)
174060 static const unsigned short int yy_shift_ofst[] = {
174061 /* 0 */ 2029, 1801, 2043, 1380, 1380, 33, 391, 1496, 1569, 1642,
174062 /* 10 */ 702, 702, 702, 193, 33, 33, 33, 33, 33, 0,
174063 /* 20 */ 0, 216, 1177, 702, 702, 702, 702, 702, 702, 702,
174064 /* 30 */ 702, 702, 702, 702, 702, 702, 702, 702, 406, 406,
174065 /* 40 */ 111, 111, 218, 447, 547, 598, 598, 260, 260, 260,
174066 /* 50 */ 260, 40, 112, 320, 340, 445, 489, 593, 637, 741,
174067 /* 60 */ 785, 889, 909, 1023, 1043, 1157, 1177, 1177, 1177, 1177,
174068 /* 70 */ 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177,
174069 /* 80 */ 1177, 1177, 1177, 1177, 1197, 1177, 1301, 1321, 1321, 554,
174070 /* 90 */ 1802, 1910, 702, 702, 702, 702, 702, 702, 702, 702,
174071 /* 100 */ 702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
174072 /* 110 */ 702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
174073 /* 120 */ 702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
174074 /* 130 */ 702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
174075 /* 140 */ 702, 702, 138, 198, 198, 198, 198, 198, 198, 198,
174076 /* 150 */ 183, 99, 236, 292, 598, 793, 167, 598, 598, 880,
174077 /* 160 */ 880, 598, 857, 150, 195, 195, 195, 264, 113, 113,
174078 /* 170 */ 2207, 2207, 854, 854, 854, 751, 765, 765, 765, 765,
174079 /* 180 */ 1096, 1096, 725, 292, 882, 904, 598, 598, 598, 598,
174080 /* 190 */ 598, 598, 598, 598, 598, 598, 598, 598, 598, 598,
174081 /* 200 */ 598, 598, 598, 598, 598, 1273, 1032, 1032, 598, 147,
174082 /* 210 */ 1098, 1098, 603, 603, 1276, 1276, 363, 2207, 2207, 2207,
174083 /* 220 */ 2207, 2207, 2207, 2207, 469, 617, 617, 801, 336, 461,
174084 /* 230 */ 804, 864, 615, 891, 913, 598, 598, 598, 598, 598,
174085 /* 240 */ 598, 598, 598, 598, 598, 653, 598, 598, 598, 598,
174086 /* 250 */ 598, 598, 598, 598, 598, 598, 598, 598, 1105, 1105,
174087 /* 260 */ 1105, 598, 598, 598, 1194, 598, 598, 598, 1215, 1249,
174088 /* 270 */ 598, 1353, 598, 598, 598, 598, 598, 598, 598, 598,
174089 /* 280 */ 677, 449, 902, 1338, 1338, 1338, 1338, 1248, 902, 902,
174090 /* 290 */ 326, 1151, 1047, 755, 749, 1371, 960, 1371, 1007, 1162,
174091 /* 300 */ 749, 749, 1162, 749, 960, 1007, 1274, 738, 215, 1300,
174092 /* 310 */ 1300, 1300, 1395, 1395, 1395, 1395, 1368, 1368, 1033, 1414,
174093 /* 320 */ 1387, 1361, 1759, 1759, 1685, 1685, 1792, 1792, 1685, 1683,
174094 /* 330 */ 1686, 1814, 1797, 1825, 1825, 1825, 1825, 1685, 1836, 1707,
174095 /* 340 */ 1686, 1686, 1707, 1814, 1797, 1707, 1797, 1707, 1685, 1836,
174096 /* 350 */ 1710, 1807, 1685, 1836, 1854, 1685, 1836, 1685, 1836, 1854,
174097 /* 360 */ 1769, 1769, 1769, 1822, 1870, 1870, 1854, 1769, 1766, 1769,
174098 /* 370 */ 1822, 1769, 1769, 1729, 1873, 1785, 1785, 1854, 1685, 1823,
174099 /* 380 */ 1823, 1840, 1840, 1778, 1782, 1909, 1685, 1779, 1778, 1789,
174100 /* 390 */ 1800, 1707, 1919, 1939, 1939, 1948, 1948, 1948, 2207, 2207,
174101 /* 400 */ 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,
174102 /* 410 */ 2207, 2207, 2207, 69, 1037, 79, 1088, 651, 1196, 1415,
174103 /* 420 */ 1501, 1439, 1369, 1452, 911, 1211, 1524, 1469, 1551, 1567,
174104 /* 430 */ 1570, 1624, 1640, 1644, 1499, 1440, 1572, 1464, 1597, 275,
174105 /* 440 */ 782, 1586, 1648, 1678, 1553, 1682, 1687, 1388, 1502, 1696,
174106 /* 450 */ 1706, 1588, 1486, 1971, 1975, 1957, 1820, 1972, 1973, 1965,
174107 /* 460 */ 1967, 1851, 1841, 1861, 1969, 1969, 1974, 1852, 1976, 1855,
174108 /* 470 */ 1981, 1998, 1858, 1871, 1969, 1872, 1942, 1968, 1969, 1856,
174109 /* 480 */ 1952, 1953, 1955, 1956, 1881, 1896, 1980, 1874, 2014, 2015,
174110 /* 490 */ 1997, 1905, 1860, 1954, 1999, 1964, 1950, 1994, 1894, 1921,
174111 /* 500 */ 2020, 2018, 2026, 1915, 1923, 2028, 1984, 2036, 2040, 2047,
174112 /* 510 */ 2041, 2003, 2012, 2050, 1979, 2049, 2056, 2011, 2044, 2057,
174113 /* 520 */ 2048, 1934, 2063, 2064, 2065, 2061, 2066, 2068, 1993, 1959,
174114 /* 530 */ 2069, 2071, 1978, 2062, 2075, 1958, 2073, 2070, 2072, 2076,
174115 /* 540 */ 2078, 2010, 2027, 2022, 2074, 2031, 2019, 2081, 2082, 2094,
174116 /* 550 */ 2093, 2095, 2096, 2085, 1983, 1986, 2100, 2073, 2101, 2104,
174117 /* 560 */ 2107, 2109, 2108, 2110, 2111, 2114, 2121, 2115, 2116, 2117,
174118 /* 570 */ 2118, 2122, 2123, 2124, 2007, 2004, 2005, 2006, 2125, 2128,
174119 /* 580 */ 2137, 2138, 2152,
174120 };
174121 #define YY_REDUCE_COUNT (412)
174122 #define YY_REDUCE_MIN (-276)
174123 #define YY_REDUCE_MAX (1775)
174124 static const short yy_reduce_ofst[] = {
174125 /* 0 */ -66, 217, -63, -177, -180, 161, 364, 64, -183, 162,
174126 /* 10 */ 223, 367, 414, -173, 473, 514, 525, 622, 626, -207,
174127 /* 20 */ 351, -276, -38, 693, 811, 831, 833, 888, -188, 945,
174128 /* 30 */ 947, 416, 558, 951, 867, 287, 1078, 1080, -186, 224,
174129 /* 40 */ -132, 42, 964, 269, 417, 796, 810, -237, -231, -237,
174130 /* 50 */ -231, -45, -45, -45, -45, -45, -45, -45, -45, -45,
174131 /* 60 */ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
174132 /* 70 */ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
174133 /* 80 */ -45, -45, -45, -45, -45, -45, -45, -45, -45, 895,
174134 /* 90 */ 925, 967, 980, 1100, 1143, 1169, 1203, 1225, 1228, 1242,
174135 /* 100 */ 1247, 1250, 1253, 1255, 1261, 1267, 1272, 1275, 1283, 1286,
174136 /* 110 */ 1288, 1292, 1333, 1335, 1347, 1349, 1352, 1354, 1360, 1366,
174137 /* 120 */ 1381, 1391, 1406, 1408, 1413, 1416, 1418, 1422, 1425, 1427,
174138 /* 130 */ 1463, 1465, 1472, 1478, 1480, 1491, 1498, 1500, 1517, 1519,
174139 /* 140 */ 1528, 1536, -45, -45, -45, -45, -45, -45, -45, -45,
174140 /* 150 */ -45, -45, -45, 312, -158, 285, -219, 9, 166, 370,
174141 /* 160 */ 545, 707, -45, 930, 601, 963, 1067, 792, -45, -45,
174142 /* 170 */ -45, -45, -204, -204, -204, 369, -171, -129, 632, 678,
174143 /* 180 */ 202, 352, -270, 412, 627, 627, -9, 122, 415, 419,
174144 /* 190 */ -56, 248, 583, 920, 6, 261, 459, 795, 1049, 813,
174145 /* 200 */ 1062, 1082, -161, 778, 1063, 797, 870, 1003, 1128, 443,
174146 /* 210 */ 1031, 1072, 1191, 1192, 957, 1120, 105, 1149, 523, 933,
174147 /* 220 */ 1218, 1238, 1254, 1251, -138, 96, 117, 146, 181, 277,
174148 /* 230 */ 280, 421, 480, 712, 830, 850, 1085, 1099, 1129, 1209,
174149 /* 240 */ 1323, 1331, 1336, 1364, 1407, 368, 1412, 1433, 1438, 1474,
174150 /* 250 */ 1481, 1505, 1506, 1526, 1538, 1544, 1545, 1546, 722, 764,
174151 /* 260 */ 856, 1547, 1548, 1550, 1188, 1554, 1557, 1561, 1298, 1260,
174152 /* 270 */ 1562, 1456, 1564, 280, 1568, 1571, 1573, 1574, 1575, 1576,
174153 /* 280 */ 1457, 1477, 1520, 1514, 1515, 1516, 1518, 1188, 1520, 1520,
174154 /* 290 */ 1530, 1563, 1584, 1482, 1504, 1510, 1534, 1513, 1488, 1537,
174155 /* 300 */ 1512, 1521, 1539, 1522, 1541, 1493, 1583, 1559, 1565, 1585,
174156 /* 310 */ 1587, 1589, 1529, 1531, 1532, 1549, 1558, 1566, 1535, 1577,
174157 /* 320 */ 1582, 1622, 1533, 1540, 1627, 1628, 1552, 1555, 1633, 1560,
174158 /* 330 */ 1578, 1581, 1607, 1606, 1608, 1609, 1611, 1649, 1655, 1612,
174159 /* 340 */ 1590, 1591, 1613, 1594, 1621, 1614, 1623, 1616, 1666, 1668,
174160 /* 350 */ 1579, 1593, 1672, 1675, 1656, 1676, 1679, 1680, 1688, 1660,
174161 /* 360 */ 1667, 1670, 1671, 1663, 1669, 1673, 1674, 1689, 1681, 1692,
174162 /* 370 */ 1677, 1693, 1694, 1592, 1599, 1617, 1620, 1700, 1713, 1596,
174163 /* 380 */ 1598, 1658, 1659, 1691, 1684, 1654, 1735, 1664, 1697, 1690,
174164 /* 390 */ 1701, 1703, 1748, 1758, 1760, 1768, 1770, 1772, 1657, 1661,
174165 /* 400 */ 1665, 1761, 1754, 1757, 1762, 1763, 1764, 1750, 1751, 1765,
174166 /* 410 */ 1771, 1767, 1775,
174167 };
174168 static const YYACTIONTYPE yy_default[] = {
174169 /* 0 */ 1663, 1663, 1663, 1491, 1254, 1367, 1254, 1254, 1254, 1254,
174170 /* 10 */ 1491, 1491, 1491, 1254, 1254, 1254, 1254, 1254, 1254, 1397,
174171 /* 20 */ 1397, 1544, 1287, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
@@ -173949,56 +174244,57 @@
174244 */
174245 #ifdef YYFALLBACK
174246 static const YYCODETYPE yyFallback[] = {
174247 0, /* $ => nothing */
174248 0, /* SEMI => nothing */
174249 60, /* EXPLAIN => ID */
174250 60, /* QUERY => ID */
174251 60, /* PLAN => ID */
174252 60, /* BEGIN => ID */
174253 0, /* TRANSACTION => nothing */
174254 60, /* DEFERRED => ID */
174255 60, /* IMMEDIATE => ID */
174256 60, /* EXCLUSIVE => ID */
174257 0, /* COMMIT => nothing */
174258 60, /* END => ID */
174259 60, /* ROLLBACK => ID */
174260 60, /* SAVEPOINT => ID */
174261 60, /* RELEASE => ID */
174262 0, /* TO => nothing */
174263 0, /* TABLE => nothing */
174264 0, /* CREATE => nothing */
174265 60, /* IF => ID */
174266 0, /* NOT => nothing */
174267 0, /* EXISTS => nothing */
174268 60, /* TEMP => ID */
174269 0, /* LP => nothing */
174270 0, /* RP => nothing */
174271 0, /* AS => nothing */
174272 0, /* COMMA => nothing */
174273 60, /* WITHOUT => ID */
174274 60, /* ABORT => ID */
174275 60, /* ACTION => ID */
174276 60, /* AFTER => ID */
174277 60, /* ANALYZE => ID */
174278 60, /* ASC => ID */
174279 60, /* ATTACH => ID */
174280 60, /* BEFORE => ID */
174281 60, /* BY => ID */
174282 60, /* CASCADE => ID */
174283 60, /* CAST => ID */
174284 60, /* CONFLICT => ID */
174285 60, /* DATABASE => ID */
174286 60, /* DESC => ID */
174287 60, /* DETACH => ID */
174288 60, /* EACH => ID */
174289 60, /* FAIL => ID */
174290 0, /* OR => nothing */
174291 0, /* AND => nothing */
174292 0, /* IS => nothing */
174293 0, /* ISNOT => nothing */
174294 60, /* MATCH => ID */
174295 60, /* LIKE_KW => ID */
174296 0, /* BETWEEN => nothing */
174297 0, /* IN => nothing */
174298 0, /* ISNULL => nothing */
174299 0, /* NOTNULL => nothing */
174300 0, /* NE => nothing */
@@ -174007,51 +174303,51 @@
174303 0, /* LE => nothing */
174304 0, /* LT => nothing */
174305 0, /* GE => nothing */
174306 0, /* ESCAPE => nothing */
174307 0, /* ID => nothing */
174308 60, /* COLUMNKW => ID */
174309 60, /* DO => ID */
174310 60, /* FOR => ID */
174311 60, /* IGNORE => ID */
174312 60, /* INITIALLY => ID */
174313 60, /* INSTEAD => ID */
174314 60, /* NO => ID */
174315 60, /* KEY => ID */
174316 60, /* OF => ID */
174317 60, /* OFFSET => ID */
174318 60, /* PRAGMA => ID */
174319 60, /* RAISE => ID */
174320 60, /* RECURSIVE => ID */
174321 60, /* REPLACE => ID */
174322 60, /* RESTRICT => ID */
174323 60, /* ROW => ID */
174324 60, /* ROWS => ID */
174325 60, /* TRIGGER => ID */
174326 60, /* VACUUM => ID */
174327 60, /* VIEW => ID */
174328 60, /* VIRTUAL => ID */
174329 60, /* WITH => ID */
174330 60, /* NULLS => ID */
174331 60, /* FIRST => ID */
174332 60, /* LAST => ID */
174333 60, /* CURRENT => ID */
174334 60, /* FOLLOWING => ID */
174335 60, /* PARTITION => ID */
174336 60, /* PRECEDING => ID */
174337 60, /* RANGE => ID */
174338 60, /* UNBOUNDED => ID */
174339 60, /* EXCLUDE => ID */
174340 60, /* GROUPS => ID */
174341 60, /* OTHERS => ID */
174342 60, /* TIES => ID */
174343 60, /* GENERATED => ID */
174344 60, /* ALWAYS => ID */
174345 60, /* MATERIALIZED => ID */
174346 60, /* REINDEX => ID */
174347 60, /* RENAME => ID */
174348 60, /* CTIME_KW => ID */
174349 0, /* ANY => nothing */
174350 0, /* BITAND => nothing */
174351 0, /* BITOR => nothing */
174352 0, /* LSHIFT => nothing */
174353 0, /* RSHIFT => nothing */
@@ -174118,11 +174414,10 @@
174414 0, /* FILTER => nothing */
174415 0, /* COLUMN => nothing */
174416 0, /* AGG_FUNCTION => nothing */
174417 0, /* AGG_COLUMN => nothing */
174418 0, /* TRUEFALSE => nothing */
 
174419 0, /* FUNCTION => nothing */
174420 0, /* UPLUS => nothing */
174421 0, /* UMINUS => nothing */
174422 0, /* TRUTH => nothing */
174423 0, /* REGISTER => nothing */
@@ -174262,136 +174557,136 @@
174557 /* 41 */ "EACH",
174558 /* 42 */ "FAIL",
174559 /* 43 */ "OR",
174560 /* 44 */ "AND",
174561 /* 45 */ "IS",
174562 /* 46 */ "ISNOT",
174563 /* 47 */ "MATCH",
174564 /* 48 */ "LIKE_KW",
174565 /* 49 */ "BETWEEN",
174566 /* 50 */ "IN",
174567 /* 51 */ "ISNULL",
174568 /* 52 */ "NOTNULL",
174569 /* 53 */ "NE",
174570 /* 54 */ "EQ",
174571 /* 55 */ "GT",
174572 /* 56 */ "LE",
174573 /* 57 */ "LT",
174574 /* 58 */ "GE",
174575 /* 59 */ "ESCAPE",
174576 /* 60 */ "ID",
174577 /* 61 */ "COLUMNKW",
174578 /* 62 */ "DO",
174579 /* 63 */ "FOR",
174580 /* 64 */ "IGNORE",
174581 /* 65 */ "INITIALLY",
174582 /* 66 */ "INSTEAD",
174583 /* 67 */ "NO",
174584 /* 68 */ "KEY",
174585 /* 69 */ "OF",
174586 /* 70 */ "OFFSET",
174587 /* 71 */ "PRAGMA",
174588 /* 72 */ "RAISE",
174589 /* 73 */ "RECURSIVE",
174590 /* 74 */ "REPLACE",
174591 /* 75 */ "RESTRICT",
174592 /* 76 */ "ROW",
174593 /* 77 */ "ROWS",
174594 /* 78 */ "TRIGGER",
174595 /* 79 */ "VACUUM",
174596 /* 80 */ "VIEW",
174597 /* 81 */ "VIRTUAL",
174598 /* 82 */ "WITH",
174599 /* 83 */ "NULLS",
174600 /* 84 */ "FIRST",
174601 /* 85 */ "LAST",
174602 /* 86 */ "CURRENT",
174603 /* 87 */ "FOLLOWING",
174604 /* 88 */ "PARTITION",
174605 /* 89 */ "PRECEDING",
174606 /* 90 */ "RANGE",
174607 /* 91 */ "UNBOUNDED",
174608 /* 92 */ "EXCLUDE",
174609 /* 93 */ "GROUPS",
174610 /* 94 */ "OTHERS",
174611 /* 95 */ "TIES",
174612 /* 96 */ "GENERATED",
174613 /* 97 */ "ALWAYS",
174614 /* 98 */ "MATERIALIZED",
174615 /* 99 */ "REINDEX",
174616 /* 100 */ "RENAME",
174617 /* 101 */ "CTIME_KW",
174618 /* 102 */ "ANY",
174619 /* 103 */ "BITAND",
174620 /* 104 */ "BITOR",
174621 /* 105 */ "LSHIFT",
174622 /* 106 */ "RSHIFT",
174623 /* 107 */ "PLUS",
174624 /* 108 */ "MINUS",
174625 /* 109 */ "STAR",
174626 /* 110 */ "SLASH",
174627 /* 111 */ "REM",
174628 /* 112 */ "CONCAT",
174629 /* 113 */ "PTR",
174630 /* 114 */ "COLLATE",
174631 /* 115 */ "BITNOT",
174632 /* 116 */ "ON",
174633 /* 117 */ "INDEXED",
174634 /* 118 */ "STRING",
174635 /* 119 */ "JOIN_KW",
174636 /* 120 */ "CONSTRAINT",
174637 /* 121 */ "DEFAULT",
174638 /* 122 */ "NULL",
174639 /* 123 */ "PRIMARY",
174640 /* 124 */ "UNIQUE",
174641 /* 125 */ "CHECK",
174642 /* 126 */ "REFERENCES",
174643 /* 127 */ "AUTOINCR",
174644 /* 128 */ "INSERT",
174645 /* 129 */ "DELETE",
174646 /* 130 */ "UPDATE",
174647 /* 131 */ "SET",
174648 /* 132 */ "DEFERRABLE",
174649 /* 133 */ "FOREIGN",
174650 /* 134 */ "DROP",
174651 /* 135 */ "UNION",
174652 /* 136 */ "ALL",
174653 /* 137 */ "EXCEPT",
174654 /* 138 */ "INTERSECT",
174655 /* 139 */ "SELECT",
174656 /* 140 */ "VALUES",
174657 /* 141 */ "DISTINCT",
174658 /* 142 */ "DOT",
174659 /* 143 */ "FROM",
174660 /* 144 */ "JOIN",
174661 /* 145 */ "USING",
174662 /* 146 */ "ORDER",
174663 /* 147 */ "GROUP",
174664 /* 148 */ "HAVING",
174665 /* 149 */ "LIMIT",
174666 /* 150 */ "WHERE",
174667 /* 151 */ "RETURNING",
174668 /* 152 */ "INTO",
174669 /* 153 */ "NOTHING",
174670 /* 154 */ "FLOAT",
174671 /* 155 */ "BLOB",
174672 /* 156 */ "INTEGER",
174673 /* 157 */ "VARIABLE",
174674 /* 158 */ "CASE",
174675 /* 159 */ "WHEN",
174676 /* 160 */ "THEN",
174677 /* 161 */ "ELSE",
174678 /* 162 */ "INDEX",
174679 /* 163 */ "ALTER",
174680 /* 164 */ "ADD",
174681 /* 165 */ "WINDOW",
174682 /* 166 */ "OVER",
174683 /* 167 */ "FILTER",
174684 /* 168 */ "COLUMN",
174685 /* 169 */ "AGG_FUNCTION",
174686 /* 170 */ "AGG_COLUMN",
174687 /* 171 */ "TRUEFALSE",
174688 /* 172 */ "FUNCTION",
174689 /* 173 */ "UPLUS",
174690 /* 174 */ "UMINUS",
174691 /* 175 */ "TRUTH",
174692 /* 176 */ "REGISTER",
@@ -236537,11 +236832,11 @@
236832 if( pConfig ){
236833 int i;
236834 if( pConfig->t.pTok ){
236835 pConfig->t.pTokApi->xDelete(pConfig->t.pTok);
236836 }
236837 sqlite3_free((char*)pConfig->t.azArg);
236838 sqlite3_free(pConfig->zDb);
236839 sqlite3_free(pConfig->zName);
236840 for(i=0; i<pConfig->nCol; i++){
236841 sqlite3_free(pConfig->azCol[i]);
236842 }
@@ -250352,15 +250647,15 @@
250647 ** A > or >= against the rowid: ">"
250648 **
250649 ** This function ensures that there is at most one "r" or "=". And that if
250650 ** there exists an "=" then there is no "<" or ">".
250651 **
250652 ** If an unusable MATCH operator is present in the WHERE clause, then
250653 ** SQLITE_CONSTRAINT is returned.
250654 **
250655 ** Costs are assigned as follows:
250656 **
 
 
 
250657 ** a) If a MATCH operator is present, the cost depends on the other
250658 ** constraints also present. As follows:
250659 **
250660 ** * No other constraints: cost=1000.0
250661 ** * One rowid range constraint: cost=750.0
@@ -250388,11 +250683,11 @@
250683 int iCons = 0;
250684
250685 int bSeenEq = 0;
250686 int bSeenGt = 0;
250687 int bSeenLt = 0;
250688 int nSeenMatch = 0;
250689 int bSeenRank = 0;
250690
250691
250692 assert( SQLITE_INDEX_CONSTRAINT_EQ<SQLITE_INDEX_CONSTRAINT_MATCH );
250693 assert( SQLITE_INDEX_CONSTRAINT_GT<SQLITE_INDEX_CONSTRAINT_MATCH );
@@ -250419,22 +250714,19 @@
250714 || (p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol>=nCol)
250715 ){
250716 /* A MATCH operator or equivalent */
250717 if( p->usable==0 || iCol<0 ){
250718 /* As there exists an unusable MATCH constraint this is an
250719 ** unusable plan. Return SQLITE_CONSTRAINT. */
250720 return SQLITE_CONSTRAINT;
 
 
 
250721 }else{
250722 if( iCol==nCol+1 ){
250723 if( bSeenRank ) continue;
250724 idxStr[iIdxStr++] = 'r';
250725 bSeenRank = 1;
250726 }else if( iCol>=0 ){
250727 nSeenMatch++;
250728 idxStr[iIdxStr++] = 'M';
250729 sqlite3_snprintf(6, &idxStr[iIdxStr], "%d", iCol);
250730 idxStr += strlen(&idxStr[iIdxStr]);
250731 assert( idxStr[iIdxStr]=='\0' );
250732 }
@@ -250447,11 +250739,11 @@
250739 idxStr[iIdxStr++] = p->op==FTS5_PATTERN_LIKE ? 'L' : 'G';
250740 sqlite3_snprintf(6, &idxStr[iIdxStr], "%d", iCol);
250741 idxStr += strlen(&idxStr[iIdxStr]);
250742 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
250743 assert( idxStr[iIdxStr]=='\0' );
250744 nSeenMatch++;
250745 }else if( bSeenEq==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol<0 ){
250746 idxStr[iIdxStr++] = '=';
250747 bSeenEq = 1;
250748 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
250749 }
@@ -250484,11 +250776,11 @@
250776 **
250777 ** Note that tokendata=1 tables cannot currently handle "ORDER BY rowid DESC".
250778 */
250779 if( pInfo->nOrderBy==1 ){
250780 int iSort = pInfo->aOrderBy[0].iColumn;
250781 if( iSort==(pConfig->nCol+1) && nSeenMatch>0 ){
250782 idxFlags |= FTS5_BI_ORDER_RANK;
250783 }else if( iSort==-1 && (!pInfo->aOrderBy[0].desc || !pConfig->bTokendata) ){
250784 idxFlags |= FTS5_BI_ORDER_ROWID;
250785 }
250786 if( BitFlagTest(idxFlags, FTS5_BI_ORDER_RANK|FTS5_BI_ORDER_ROWID) ){
@@ -250499,18 +250791,21 @@
250791 }
250792 }
250793
250794 /* Calculate the estimated cost based on the flags set in idxFlags. */
250795 if( bSeenEq ){
250796 pInfo->estimatedCost = nSeenMatch ? 1000.0 : 10.0;
250797 if( nSeenMatch==0 ) fts5SetUniqueFlag(pInfo);
250798 }else if( bSeenLt && bSeenGt ){
250799 pInfo->estimatedCost = nSeenMatch ? 5000.0 : 250000.0;
250800 }else if( bSeenLt || bSeenGt ){
250801 pInfo->estimatedCost = nSeenMatch ? 7500.0 : 750000.0;
250802 }else{
250803 pInfo->estimatedCost = nSeenMatch ? 10000.0 : 1000000.0;
250804 }
250805 for(i=1; i<nSeenMatch; i++){
250806 pInfo->estimatedCost *= 0.4;
250807 }
250808
250809 pInfo->idxNum = idxFlags;
250810 return SQLITE_OK;
250811 }
@@ -251522,10 +251817,11 @@
251817 "'delete' may not be used with a contentless_delete=1 table"
251818 );
251819 rc = SQLITE_ERROR;
251820 }else{
251821 rc = fts5SpecialDelete(pTab, apVal);
251822 bUpdateOrDelete = 1;
251823 }
251824 }else{
251825 rc = fts5SpecialInsert(pTab, z, apVal[2 + pConfig->nCol + 1]);
251826 }
251827 }else{
@@ -252775,11 +253071,11 @@
253071 int nArg, /* Number of args */
253072 sqlite3_value **apUnused /* Function arguments */
253073 ){
253074 assert( nArg==0 );
253075 UNUSED_PARAM2(nArg, apUnused);
253076 sqlite3_result_text(pCtx, "fts5: 2024-06-11 17:37:36 5f25a9518a675efbd0525cc2f5595ee7bc7122be7cfecdf6b20c909185dea370", -1, SQLITE_TRANSIENT);
253077 }
253078
253079 /*
253080 ** Return true if zName is the extension on one of the shadow tables used
253081 ** by this module.
253082
--- 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.47.0"
150150
#define SQLITE_VERSION_NUMBER 3047000
151
-#define SQLITE_SOURCE_ID "2024-05-30 13:27:29 a47c644fef71f3ab3dc584ea917eaab9a8e5b4c9dcb57bdd29747ba32108e85f"
151
+#define SQLITE_SOURCE_ID "2024-06-11 18:22:48 33a3f327855b427ae6ba0057218d043a1417bc9d780728f47f23acdd836e1686"
152152
153153
/*
154154
** CAPI3REF: Run-Time Library Version Numbers
155155
** KEYWORDS: sqlite3_version sqlite3_sourceid
156156
**
@@ -10830,12 +10830,10 @@
1083010830
#endif
1083110831
1083210832
#if defined(__wasi__)
1083310833
# undef SQLITE_WASI
1083410834
# define SQLITE_WASI 1
10835
-# undef SQLITE_OMIT_WAL
10836
-# define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */
1083710835
# ifndef SQLITE_OMIT_LOAD_EXTENSION
1083810836
# define SQLITE_OMIT_LOAD_EXTENSION
1083910837
# endif
1084010838
# ifndef SQLITE_THREADSAFE
1084110839
# define SQLITE_THREADSAFE 0
1084210840
--- 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.47.0"
150 #define SQLITE_VERSION_NUMBER 3047000
151 #define SQLITE_SOURCE_ID "2024-05-30 13:27:29 a47c644fef71f3ab3dc584ea917eaab9a8e5b4c9dcb57bdd29747ba32108e85f"
152
153 /*
154 ** CAPI3REF: Run-Time Library Version Numbers
155 ** KEYWORDS: sqlite3_version sqlite3_sourceid
156 **
@@ -10830,12 +10830,10 @@
10830 #endif
10831
10832 #if defined(__wasi__)
10833 # undef SQLITE_WASI
10834 # define SQLITE_WASI 1
10835 # undef SQLITE_OMIT_WAL
10836 # define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */
10837 # ifndef SQLITE_OMIT_LOAD_EXTENSION
10838 # define SQLITE_OMIT_LOAD_EXTENSION
10839 # endif
10840 # ifndef SQLITE_THREADSAFE
10841 # define SQLITE_THREADSAFE 0
10842
--- 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.47.0"
150 #define SQLITE_VERSION_NUMBER 3047000
151 #define SQLITE_SOURCE_ID "2024-06-11 18:22:48 33a3f327855b427ae6ba0057218d043a1417bc9d780728f47f23acdd836e1686"
152
153 /*
154 ** CAPI3REF: Run-Time Library Version Numbers
155 ** KEYWORDS: sqlite3_version sqlite3_sourceid
156 **
@@ -10830,12 +10830,10 @@
10830 #endif
10831
10832 #if defined(__wasi__)
10833 # undef SQLITE_WASI
10834 # define SQLITE_WASI 1
 
 
10835 # ifndef SQLITE_OMIT_LOAD_EXTENSION
10836 # define SQLITE_OMIT_LOAD_EXTENSION
10837 # endif
10838 # ifndef SQLITE_THREADSAFE
10839 # define SQLITE_THREADSAFE 0
10840

Keyboard Shortcuts

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