Fossil SCM

Update the built-in SQLite amalgamation to the latest 3.7.8 beta.

drh 2011-09-16 19:48 trunk
Commit 4db5bd1111f21a2208b1a22f6dad88ea8d5f72b1
2 files changed +296 -805 +1 -1
+296 -805
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -24,11 +24,10 @@
2424
#endif
2525
#ifndef SQLITE_API
2626
# define SQLITE_API
2727
#endif
2828
/************** Begin file sqliteInt.h ***************************************/
29
-#line 1 "tsrc/sqliteInt.h"
3029
/*
3130
** 2001 September 15
3231
**
3332
** The author disclaims copyright to this source code. In place of
3433
** a legal notice, here is a blessing:
@@ -79,11 +78,10 @@
7978
#include "config.h"
8079
#endif
8180
8281
/************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/
8382
/************** Begin file sqliteLimit.h *************************************/
84
-#line 1 "tsrc/sqliteLimit.h"
8583
/*
8684
** 2007 May 7
8785
**
8886
** The author disclaims copyright to this source code. In place of
8987
** a legal notice, here is a blessing:
@@ -291,11 +289,10 @@
291289
# define SQLITE_MAX_TRIGGER_DEPTH 1000
292290
#endif
293291
294292
/************** End of sqliteLimit.h *****************************************/
295293
/************** Continuing where we left off in sqliteInt.h ******************/
296
-#line 54 "tsrc/sqliteInt.h"
297294
298295
/* Disable nuisance warnings on Borland compilers */
299296
#if defined(__BORLANDC__)
300297
#pragma warn -rch /* unreachable code */
301298
#pragma warn -ccc /* Condition is always true or false */
@@ -548,11 +545,10 @@
548545
# define unlikely(X) !!(X)
549546
#endif
550547
551548
/************** Include sqlite3.h in the middle of sqliteInt.h ***************/
552549
/************** Begin file sqlite3.h *****************************************/
553
-#line 1 "tsrc/sqlite3.h"
554550
/*
555551
** 2001 September 15
556552
**
557553
** The author disclaims copyright to this source code. In place of
558554
** a legal notice, here is a blessing:
@@ -660,11 +656,11 @@
660656
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
661657
** [sqlite_version()] and [sqlite_source_id()].
662658
*/
663659
#define SQLITE_VERSION "3.7.8"
664660
#define SQLITE_VERSION_NUMBER 3007008
665
-#define SQLITE_SOURCE_ID "2011-09-14 13:41:40 a1f3aeeb0988c848d40ce8f6da6e902935a997e2"
661
+#define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8"
666662
667663
/*
668664
** CAPI3REF: Run-Time Library Version Numbers
669665
** KEYWORDS: sqlite3_version, sqlite3_sourceid
670666
**
@@ -7309,14 +7305,12 @@
73097305
#endif /* ifndef _SQLITE3RTREE_H_ */
73107306
73117307
73127308
/************** End of sqlite3.h *********************************************/
73137309
/************** Continuing where we left off in sqliteInt.h ******************/
7314
-#line 309 "tsrc/sqliteInt.h"
73157310
/************** Include hash.h in the middle of sqliteInt.h ******************/
73167311
/************** Begin file hash.h ********************************************/
7317
-#line 1 "tsrc/hash.h"
73187312
/*
73197313
** 2001 September 22
73207314
**
73217315
** The author disclaims copyright to this source code. In place of
73227316
** a legal notice, here is a blessing:
@@ -7412,14 +7406,12 @@
74127406
74137407
#endif /* _SQLITE_HASH_H_ */
74147408
74157409
/************** End of hash.h ************************************************/
74167410
/************** Continuing where we left off in sqliteInt.h ******************/
7417
-#line 310 "tsrc/sqliteInt.h"
74187411
/************** Include parse.h in the middle of sqliteInt.h *****************/
74197412
/************** Begin file parse.h *******************************************/
7420
-#line 1 "tsrc/parse.h"
74217413
#define TK_SEMI 1
74227414
#define TK_EXPLAIN 2
74237415
#define TK_QUERY 3
74247416
#define TK_PLAN 4
74257417
#define TK_BEGIN 5
@@ -7576,11 +7568,10 @@
75767568
#define TK_UMINUS 156
75777569
#define TK_UPLUS 157
75787570
75797571
/************** End of parse.h ***********************************************/
75807572
/************** Continuing where we left off in sqliteInt.h ******************/
7581
-#line 311 "tsrc/sqliteInt.h"
75827573
#include <stdio.h>
75837574
#include <stdlib.h>
75847575
#include <string.h>
75857576
#include <assert.h>
75867577
#include <stddef.h>
@@ -7920,11 +7911,10 @@
79207911
** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
79217912
** pointer types (i.e. FuncDef) defined above.
79227913
*/
79237914
/************** Include btree.h in the middle of sqliteInt.h *****************/
79247915
/************** Begin file btree.h *******************************************/
7925
-#line 1 "tsrc/btree.h"
79267916
/*
79277917
** 2001 September 15
79287918
**
79297919
** The author disclaims copyright to this source code. In place of
79307920
** a legal notice, here is a blessing:
@@ -8165,14 +8155,12 @@
81658155
81668156
#endif /* _BTREE_H_ */
81678157
81688158
/************** End of btree.h ***********************************************/
81698159
/************** Continuing where we left off in sqliteInt.h ******************/
8170
-#line 653 "tsrc/sqliteInt.h"
81718160
/************** Include vdbe.h in the middle of sqliteInt.h ******************/
81728161
/************** Begin file vdbe.h ********************************************/
8173
-#line 1 "tsrc/vdbe.h"
81748162
/*
81758163
** 2001 September 15
81768164
**
81778165
** The author disclaims copyright to this source code. In place of
81788166
** a legal notice, here is a blessing:
@@ -8333,11 +8321,10 @@
83338321
** The makefile scans the vdbe.c source file and creates the "opcodes.h"
83348322
** header file that defines a number for each opcode used by the VDBE.
83358323
*/
83368324
/************** Include opcodes.h in the middle of vdbe.h ********************/
83378325
/************** Begin file opcodes.h *****************************************/
8338
-#line 1 "tsrc/opcodes.h"
83398326
/* Automatically generated. Do not edit */
83408327
/* See the mkopcodeh.awk script for details */
83418328
#define OP_Goto 1
83428329
#define OP_Gosub 2
83438330
#define OP_Return 3
@@ -8387,108 +8374,109 @@
83878374
#define OP_Jump 25
83888375
#define OP_And 69 /* same as TK_AND */
83898376
#define OP_Or 68 /* same as TK_OR */
83908377
#define OP_Not 19 /* same as TK_NOT */
83918378
#define OP_BitNot 93 /* same as TK_BITNOT */
8392
-#define OP_If 26
8393
-#define OP_IfNot 27
8379
+#define OP_Once 26
8380
+#define OP_If 27
8381
+#define OP_IfNot 28
83948382
#define OP_IsNull 73 /* same as TK_ISNULL */
83958383
#define OP_NotNull 74 /* same as TK_NOTNULL */
8396
-#define OP_Column 28
8397
-#define OP_Affinity 29
8398
-#define OP_MakeRecord 30
8399
-#define OP_Count 31
8400
-#define OP_Savepoint 32
8401
-#define OP_AutoCommit 33
8402
-#define OP_Transaction 34
8403
-#define OP_ReadCookie 35
8404
-#define OP_SetCookie 36
8405
-#define OP_VerifyCookie 37
8406
-#define OP_OpenRead 38
8407
-#define OP_OpenWrite 39
8408
-#define OP_OpenAutoindex 40
8409
-#define OP_OpenEphemeral 41
8410
-#define OP_SorterOpen 42
8411
-#define OP_OpenPseudo 43
8412
-#define OP_Close 44
8413
-#define OP_SeekLt 45
8414
-#define OP_SeekLe 46
8415
-#define OP_SeekGe 47
8416
-#define OP_SeekGt 48
8417
-#define OP_Seek 49
8418
-#define OP_NotFound 50
8419
-#define OP_Found 51
8420
-#define OP_IsUnique 52
8421
-#define OP_NotExists 53
8422
-#define OP_Sequence 54
8423
-#define OP_NewRowid 55
8424
-#define OP_Insert 56
8425
-#define OP_InsertInt 57
8426
-#define OP_Delete 58
8427
-#define OP_ResetCount 59
8428
-#define OP_SorterCompare 60
8429
-#define OP_SorterData 61
8430
-#define OP_RowKey 62
8431
-#define OP_RowData 63
8432
-#define OP_Rowid 64
8433
-#define OP_NullRow 65
8434
-#define OP_Last 66
8435
-#define OP_SorterSort 67
8436
-#define OP_Sort 70
8437
-#define OP_Rewind 71
8438
-#define OP_SorterNext 72
8439
-#define OP_Prev 81
8440
-#define OP_Next 92
8441
-#define OP_SorterInsert 95
8442
-#define OP_IdxInsert 96
8443
-#define OP_IdxDelete 97
8444
-#define OP_IdxRowid 98
8445
-#define OP_IdxLT 99
8446
-#define OP_IdxGE 100
8447
-#define OP_Destroy 101
8448
-#define OP_Clear 102
8449
-#define OP_CreateIndex 103
8450
-#define OP_CreateTable 104
8451
-#define OP_ParseSchema 105
8452
-#define OP_LoadAnalysis 106
8453
-#define OP_DropTable 107
8454
-#define OP_DropIndex 108
8455
-#define OP_DropTrigger 109
8456
-#define OP_IntegrityCk 110
8457
-#define OP_RowSetAdd 111
8458
-#define OP_RowSetRead 112
8459
-#define OP_RowSetTest 113
8460
-#define OP_Program 114
8461
-#define OP_Param 115
8462
-#define OP_FkCounter 116
8463
-#define OP_FkIfZero 117
8464
-#define OP_MemMax 118
8465
-#define OP_IfPos 119
8466
-#define OP_IfNeg 120
8467
-#define OP_IfZero 121
8468
-#define OP_AggStep 122
8469
-#define OP_AggFinal 123
8470
-#define OP_Checkpoint 124
8471
-#define OP_JournalMode 125
8472
-#define OP_Vacuum 126
8473
-#define OP_IncrVacuum 127
8474
-#define OP_Expire 128
8475
-#define OP_TableLock 129
8476
-#define OP_VBegin 131
8477
-#define OP_VCreate 132
8478
-#define OP_VDestroy 133
8479
-#define OP_VOpen 134
8480
-#define OP_VFilter 135
8481
-#define OP_VColumn 136
8482
-#define OP_VNext 137
8483
-#define OP_VRename 138
8484
-#define OP_VUpdate 139
8485
-#define OP_Pagecount 140
8486
-#define OP_MaxPgcnt 146
8487
-#define OP_Trace 147
8488
-#define OP_Noop 148
8489
-#define OP_Explain 149
8384
+#define OP_Column 29
8385
+#define OP_Affinity 30
8386
+#define OP_MakeRecord 31
8387
+#define OP_Count 32
8388
+#define OP_Savepoint 33
8389
+#define OP_AutoCommit 34
8390
+#define OP_Transaction 35
8391
+#define OP_ReadCookie 36
8392
+#define OP_SetCookie 37
8393
+#define OP_VerifyCookie 38
8394
+#define OP_OpenRead 39
8395
+#define OP_OpenWrite 40
8396
+#define OP_OpenAutoindex 41
8397
+#define OP_OpenEphemeral 42
8398
+#define OP_SorterOpen 43
8399
+#define OP_OpenPseudo 44
8400
+#define OP_Close 45
8401
+#define OP_SeekLt 46
8402
+#define OP_SeekLe 47
8403
+#define OP_SeekGe 48
8404
+#define OP_SeekGt 49
8405
+#define OP_Seek 50
8406
+#define OP_NotFound 51
8407
+#define OP_Found 52
8408
+#define OP_IsUnique 53
8409
+#define OP_NotExists 54
8410
+#define OP_Sequence 55
8411
+#define OP_NewRowid 56
8412
+#define OP_Insert 57
8413
+#define OP_InsertInt 58
8414
+#define OP_Delete 59
8415
+#define OP_ResetCount 60
8416
+#define OP_SorterCompare 61
8417
+#define OP_SorterData 62
8418
+#define OP_RowKey 63
8419
+#define OP_RowData 64
8420
+#define OP_Rowid 65
8421
+#define OP_NullRow 66
8422
+#define OP_Last 67
8423
+#define OP_SorterSort 70
8424
+#define OP_Sort 71
8425
+#define OP_Rewind 72
8426
+#define OP_SorterNext 81
8427
+#define OP_Prev 92
8428
+#define OP_Next 95
8429
+#define OP_SorterInsert 96
8430
+#define OP_IdxInsert 97
8431
+#define OP_IdxDelete 98
8432
+#define OP_IdxRowid 99
8433
+#define OP_IdxLT 100
8434
+#define OP_IdxGE 101
8435
+#define OP_Destroy 102
8436
+#define OP_Clear 103
8437
+#define OP_CreateIndex 104
8438
+#define OP_CreateTable 105
8439
+#define OP_ParseSchema 106
8440
+#define OP_LoadAnalysis 107
8441
+#define OP_DropTable 108
8442
+#define OP_DropIndex 109
8443
+#define OP_DropTrigger 110
8444
+#define OP_IntegrityCk 111
8445
+#define OP_RowSetAdd 112
8446
+#define OP_RowSetRead 113
8447
+#define OP_RowSetTest 114
8448
+#define OP_Program 115
8449
+#define OP_Param 116
8450
+#define OP_FkCounter 117
8451
+#define OP_FkIfZero 118
8452
+#define OP_MemMax 119
8453
+#define OP_IfPos 120
8454
+#define OP_IfNeg 121
8455
+#define OP_IfZero 122
8456
+#define OP_AggStep 123
8457
+#define OP_AggFinal 124
8458
+#define OP_Checkpoint 125
8459
+#define OP_JournalMode 126
8460
+#define OP_Vacuum 127
8461
+#define OP_IncrVacuum 128
8462
+#define OP_Expire 129
8463
+#define OP_TableLock 131
8464
+#define OP_VBegin 132
8465
+#define OP_VCreate 133
8466
+#define OP_VDestroy 134
8467
+#define OP_VOpen 135
8468
+#define OP_VFilter 136
8469
+#define OP_VColumn 137
8470
+#define OP_VNext 138
8471
+#define OP_VRename 139
8472
+#define OP_VUpdate 140
8473
+#define OP_Pagecount 146
8474
+#define OP_MaxPgcnt 147
8475
+#define OP_Trace 148
8476
+#define OP_Noop 149
8477
+#define OP_Explain 150
84908478
84918479
84928480
/* Properties such as "out2" or "jump" that are specified in
84938481
** comments following the "case" for each opcode in the vdbe.c
84948482
** are encoded into bitvectors as follows:
@@ -8502,30 +8490,29 @@
85028490
#define OPFLG_OUT3 0x0040 /* out3: P3 is an output */
85038491
#define OPFLG_INITIALIZER {\
85048492
/* 0 */ 0x00, 0x01, 0x05, 0x04, 0x04, 0x10, 0x00, 0x02,\
85058493
/* 8 */ 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x24, 0x24,\
85068494
/* 16 */ 0x00, 0x00, 0x00, 0x24, 0x04, 0x05, 0x04, 0x00,\
8507
-/* 24 */ 0x00, 0x01, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02,\
8508
-/* 32 */ 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00,\
8509
-/* 40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11,\
8510
-/* 48 */ 0x11, 0x08, 0x11, 0x11, 0x11, 0x11, 0x02, 0x02,\
8511
-/* 56 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
8512
-/* 64 */ 0x02, 0x00, 0x01, 0x01, 0x4c, 0x4c, 0x01, 0x01,\
8495
+/* 24 */ 0x00, 0x01, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00,\
8496
+/* 32 */ 0x02, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00,\
8497
+/* 40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11,\
8498
+/* 48 */ 0x11, 0x11, 0x08, 0x11, 0x11, 0x11, 0x11, 0x02,\
8499
+/* 56 */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
8500
+/* 64 */ 0x00, 0x02, 0x00, 0x01, 0x4c, 0x4c, 0x01, 0x01,\
85138501
/* 72 */ 0x01, 0x05, 0x05, 0x15, 0x15, 0x15, 0x15, 0x15,\
85148502
/* 80 */ 0x15, 0x01, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c,\
8515
-/* 88 */ 0x4c, 0x4c, 0x4c, 0x4c, 0x01, 0x24, 0x02, 0x08,\
8516
-/* 96 */ 0x08, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00, 0x02,\
8517
-/* 104 */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,\
8518
-/* 112 */ 0x45, 0x15, 0x01, 0x02, 0x00, 0x01, 0x08, 0x05,\
8519
-/* 120 */ 0x05, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01,\
8520
-/* 128 */ 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01,\
8521
-/* 136 */ 0x00, 0x01, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04,\
8522
-/* 144 */ 0x04, 0x04, 0x02, 0x00, 0x00, 0x00,}
8503
+/* 88 */ 0x4c, 0x4c, 0x4c, 0x4c, 0x01, 0x24, 0x02, 0x01,\
8504
+/* 96 */ 0x08, 0x08, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00,\
8505
+/* 104 */ 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
8506
+/* 112 */ 0x0c, 0x45, 0x15, 0x01, 0x02, 0x00, 0x01, 0x08,\
8507
+/* 120 */ 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00,\
8508
+/* 128 */ 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\
8509
+/* 136 */ 0x01, 0x00, 0x01, 0x00, 0x00, 0x04, 0x04, 0x04,\
8510
+/* 144 */ 0x04, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00,}
85238511
85248512
/************** End of opcodes.h *********************************************/
85258513
/************** Continuing where we left off in vdbe.h ***********************/
8526
-#line 164 "tsrc/vdbe.h"
85278514
85288515
/*
85298516
** Prototypes for the VDBE interface. See comments on the implementation
85308517
** for a description of what each of these routines does.
85318518
*/
@@ -8541,11 +8528,11 @@
85418528
SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1);
85428529
SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2);
85438530
SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3);
85448531
SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5);
85458532
SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr);
8546
-SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr, int N);
8533
+SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr);
85478534
SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);
85488535
SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int);
85498536
SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int);
85508537
SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*);
85518538
SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*);
@@ -8596,14 +8583,12 @@
85968583
85978584
#endif
85988585
85998586
/************** End of vdbe.h ************************************************/
86008587
/************** Continuing where we left off in sqliteInt.h ******************/
8601
-#line 654 "tsrc/sqliteInt.h"
86028588
/************** Include pager.h in the middle of sqliteInt.h *****************/
86038589
/************** Begin file pager.h *******************************************/
8604
-#line 1 "tsrc/pager.h"
86058590
/*
86068591
** 2001 September 15
86078592
**
86088593
** The author disclaims copyright to this source code. In place of
86098594
** a legal notice, here is a blessing:
@@ -8785,14 +8770,12 @@
87858770
87868771
#endif /* _PAGER_H_ */
87878772
87888773
/************** End of pager.h ***********************************************/
87898774
/************** Continuing where we left off in sqliteInt.h ******************/
8790
-#line 655 "tsrc/sqliteInt.h"
87918775
/************** Include pcache.h in the middle of sqliteInt.h ****************/
87928776
/************** Begin file pcache.h ******************************************/
8793
-#line 1 "tsrc/pcache.h"
87948777
/*
87958778
** 2008 August 05
87968779
**
87978780
** The author disclaims copyright to this source code. In place of
87988781
** a legal notice, here is a blessing:
@@ -8947,15 +8930,13 @@
89478930
89488931
#endif /* _PCACHE_H_ */
89498932
89508933
/************** End of pcache.h **********************************************/
89518934
/************** Continuing where we left off in sqliteInt.h ******************/
8952
-#line 656 "tsrc/sqliteInt.h"
89538935
89548936
/************** Include os.h in the middle of sqliteInt.h ********************/
89558937
/************** Begin file os.h **********************************************/
8956
-#line 1 "tsrc/os.h"
89578938
/*
89588939
** 2001 September 16
89598940
**
89608941
** The author disclaims copyright to this source code. In place of
89618942
** a legal notice, here is a blessing:
@@ -9234,14 +9215,12 @@
92349215
92359216
#endif /* _SQLITE_OS_H_ */
92369217
92379218
/************** End of os.h **************************************************/
92389219
/************** Continuing where we left off in sqliteInt.h ******************/
9239
-#line 658 "tsrc/sqliteInt.h"
92409220
/************** Include mutex.h in the middle of sqliteInt.h *****************/
92419221
/************** Begin file mutex.h *******************************************/
9242
-#line 1 "tsrc/mutex.h"
92439222
/*
92449223
** 2007 August 28
92459224
**
92469225
** The author disclaims copyright to this source code. In place of
92479226
** a legal notice, here is a blessing:
@@ -9312,11 +9291,10 @@
93129291
#define sqlite3MutexEnd()
93139292
#endif /* defined(SQLITE_MUTEX_OMIT) */
93149293
93159294
/************** End of mutex.h ***********************************************/
93169295
/************** Continuing where we left off in sqliteInt.h ******************/
9317
-#line 659 "tsrc/sqliteInt.h"
93189296
93199297
93209298
/*
93219299
** Each database file to be accessed by the system is an instance
93229300
** of the following structure. There are normally two of these structures
@@ -10509,11 +10487,12 @@
1050910487
char *zDatabase; /* Name of database holding this table */
1051010488
char *zName; /* Name of the table */
1051110489
char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */
1051210490
Table *pTab; /* An SQL table corresponding to zName */
1051310491
Select *pSelect; /* A SELECT statement used in place of a table name */
10514
- u8 isPopulated; /* Temporary table associated with SELECT is populated */
10492
+ int addrFillSub; /* Address of subroutine to manifest a subquery */
10493
+ int regReturn; /* Register holding return address of addrFillSub */
1051510494
u8 jointype; /* Type of join between this able and the previous */
1051610495
u8 notIndexed; /* True if there is a NOT INDEXED clause */
1051710496
u8 isCorrelated; /* True if sub-query is correlated */
1051810497
#ifndef SQLITE_OMIT_EXPLAIN
1051910498
u8 iSelectId; /* If pSelect!=0, the id of the sub-select in EQP */
@@ -11915,11 +11894,10 @@
1191511894
1191611895
#endif /* _SQLITEINT_H_ */
1191711896
1191811897
/************** End of sqliteInt.h *******************************************/
1191911898
/************** Begin file global.c ******************************************/
11920
-#line 1 "tsrc/global.c"
1192111899
/*
1192211900
** 2008 June 13
1192311901
**
1192411902
** The author disclaims copyright to this source code. In place of
1192511903
** a legal notice, here is a blessing:
@@ -12138,11 +12116,10 @@
1213812116
*/
1213912117
SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER;
1214012118
1214112119
/************** End of global.c **********************************************/
1214212120
/************** Begin file ctime.c *******************************************/
12143
-#line 1 "tsrc/ctime.c"
1214412121
/*
1214512122
** 2010 February 23
1214612123
**
1214712124
** The author disclaims copyright to this source code. In place of
1214812125
** a legal notice, here is a blessing:
@@ -12543,11 +12520,10 @@
1254312520
1254412521
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
1254512522
1254612523
/************** End of ctime.c ***********************************************/
1254712524
/************** Begin file status.c ******************************************/
12548
-#line 1 "tsrc/status.c"
1254912525
/*
1255012526
** 2008 June 18
1255112527
**
1255212528
** The author disclaims copyright to this source code. In place of
1255312529
** a legal notice, here is a blessing:
@@ -12561,11 +12537,10 @@
1256112537
** This module implements the sqlite3_status() interface and related
1256212538
** functionality.
1256312539
*/
1256412540
/************** Include vdbeInt.h in the middle of status.c ******************/
1256512541
/************** Begin file vdbeInt.h *****************************************/
12566
-#line 1 "tsrc/vdbeInt.h"
1256712542
/*
1256812543
** 2003 September 6
1256912544
**
1257012545
** The author disclaims copyright to this source code. In place of
1257112546
** a legal notice, here is a blessing:
@@ -13013,11 +12988,10 @@
1301312988
1301412989
#endif /* !defined(_VDBEINT_H_) */
1301512990
1301612991
/************** End of vdbeInt.h *********************************************/
1301712992
/************** Continuing where we left off in status.c *********************/
13018
-#line 18 "tsrc/status.c"
1301912993
1302012994
/*
1302112995
** Variables in which to record status information.
1302212996
*/
1302312997
typedef struct sqlite3StatType sqlite3StatType;
@@ -13227,11 +13201,10 @@
1322713201
return rc;
1322813202
}
1322913203
1323013204
/************** End of status.c **********************************************/
1323113205
/************** Begin file date.c ********************************************/
13232
-#line 1 "tsrc/date.c"
1323313206
/*
1323413207
** 2003 October 31
1323513208
**
1323613209
** The author disclaims copyright to this source code. In place of
1323713210
** a legal notice, here is a blessing:
@@ -14355,11 +14328,10 @@
1435514328
}
1435614329
}
1435714330
1435814331
/************** End of date.c ************************************************/
1435914332
/************** Begin file os.c **********************************************/
14360
-#line 1 "tsrc/os.c"
1436114333
/*
1436214334
** 2005 November 29
1436314335
**
1436414336
** The author disclaims copyright to this source code. In place of
1436514337
** a legal notice, here is a blessing:
@@ -14689,11 +14661,10 @@
1468914661
return SQLITE_OK;
1469014662
}
1469114663
1469214664
/************** End of os.c **************************************************/
1469314665
/************** Begin file fault.c *******************************************/
14694
-#line 1 "tsrc/fault.c"
1469514666
/*
1469614667
** 2008 Jan 22
1469714668
**
1469814669
** The author disclaims copyright to this source code. In place of
1469914670
** a legal notice, here is a blessing:
@@ -14779,11 +14750,10 @@
1477914750
1478014751
#endif /* #ifndef SQLITE_OMIT_BUILTIN_TEST */
1478114752
1478214753
/************** End of fault.c ***********************************************/
1478314754
/************** Begin file mem0.c ********************************************/
14784
-#line 1 "tsrc/mem0.c"
1478514755
/*
1478614756
** 2008 October 28
1478714757
**
1478814758
** The author disclaims copyright to this source code. In place of
1478914759
** a legal notice, here is a blessing:
@@ -14841,11 +14811,10 @@
1484114811
1484214812
#endif /* SQLITE_ZERO_MALLOC */
1484314813
1484414814
/************** End of mem0.c ************************************************/
1484514815
/************** Begin file mem1.c ********************************************/
14846
-#line 1 "tsrc/mem1.c"
1484714816
/*
1484814817
** 2007 August 14
1484914818
**
1485014819
** The author disclaims copyright to this source code. In place of
1485114820
** a legal notice, here is a blessing:
@@ -14994,11 +14963,10 @@
1499414963
1499514964
#endif /* SQLITE_SYSTEM_MALLOC */
1499614965
1499714966
/************** End of mem1.c ************************************************/
1499814967
/************** Begin file mem2.c ********************************************/
14999
-#line 1 "tsrc/mem2.c"
1500014968
/*
1500114969
** 2007 August 15
1500214970
**
1500314971
** The author disclaims copyright to this source code. In place of
1500414972
** a legal notice, here is a blessing:
@@ -15525,11 +15493,10 @@
1552515493
1552615494
#endif /* SQLITE_MEMDEBUG */
1552715495
1552815496
/************** End of mem2.c ************************************************/
1552915497
/************** Begin file mem3.c ********************************************/
15530
-#line 1 "tsrc/mem3.c"
1553115498
/*
1553215499
** 2007 October 14
1553315500
**
1553415501
** The author disclaims copyright to this source code. In place of
1553515502
** a legal notice, here is a blessing:
@@ -16215,11 +16182,10 @@
1621516182
1621616183
#endif /* SQLITE_ENABLE_MEMSYS3 */
1621716184
1621816185
/************** End of mem3.c ************************************************/
1621916186
/************** Begin file mem5.c ********************************************/
16220
-#line 1 "tsrc/mem5.c"
1622116187
/*
1622216188
** 2007 October 14
1622316189
**
1622416190
** The author disclaims copyright to this source code. In place of
1622516191
** a legal notice, here is a blessing:
@@ -16799,11 +16765,10 @@
1679916765
1680016766
#endif /* SQLITE_ENABLE_MEMSYS5 */
1680116767
1680216768
/************** End of mem5.c ************************************************/
1680316769
/************** Begin file mutex.c *******************************************/
16804
-#line 1 "tsrc/mutex.c"
1680516770
/*
1680616771
** 2007 August 14
1680716772
**
1680816773
** The author disclaims copyright to this source code. In place of
1680916774
** a legal notice, here is a blessing:
@@ -16955,11 +16920,10 @@
1695516920
1695616921
#endif /* SQLITE_MUTEX_OMIT */
1695716922
1695816923
/************** End of mutex.c ***********************************************/
1695916924
/************** Begin file mutex_noop.c **************************************/
16960
-#line 1 "tsrc/mutex_noop.c"
1696116925
/*
1696216926
** 2008 October 07
1696316927
**
1696416928
** The author disclaims copyright to this source code. In place of
1696516929
** a legal notice, here is a blessing:
@@ -17164,11 +17128,10 @@
1716417128
#endif /* SQLITE_MUTEX_NOOP */
1716517129
#endif /* SQLITE_MUTEX_OMIT */
1716617130
1716717131
/************** End of mutex_noop.c ******************************************/
1716817132
/************** Begin file mutex_os2.c ***************************************/
17169
-#line 1 "tsrc/mutex_os2.c"
1717017133
/*
1717117134
** 2007 August 28
1717217135
**
1717317136
** The author disclaims copyright to this source code. In place of
1717417137
** a legal notice, here is a blessing:
@@ -17441,11 +17404,10 @@
1744117404
}
1744217405
#endif /* SQLITE_MUTEX_OS2 */
1744317406
1744417407
/************** End of mutex_os2.c *******************************************/
1744517408
/************** Begin file mutex_unix.c **************************************/
17446
-#line 1 "tsrc/mutex_unix.c"
1744717409
/*
1744817410
** 2007 August 28
1744917411
**
1745017412
** The author disclaims copyright to this source code. In place of
1745117413
** a legal notice, here is a blessing:
@@ -17795,11 +17757,10 @@
1779517757
1779617758
#endif /* SQLITE_MUTEX_PTHREAD */
1779717759
1779817760
/************** End of mutex_unix.c ******************************************/
1779917761
/************** Begin file mutex_w32.c ***************************************/
17800
-#line 1 "tsrc/mutex_w32.c"
1780117762
/*
1780217763
** 2007 August 14
1780317764
**
1780417765
** The author disclaims copyright to this source code. In place of
1780517766
** a legal notice, here is a blessing:
@@ -18130,11 +18091,10 @@
1813018091
}
1813118092
#endif /* SQLITE_MUTEX_W32 */
1813218093
1813318094
/************** End of mutex_w32.c *******************************************/
1813418095
/************** Begin file malloc.c ******************************************/
18135
-#line 1 "tsrc/malloc.c"
1813618096
/*
1813718097
** 2001 September 15
1813818098
**
1813918099
** The author disclaims copyright to this source code. In place of
1814018100
** a legal notice, here is a blessing:
@@ -18910,11 +18870,10 @@
1891018870
return rc & (db ? db->errMask : 0xff);
1891118871
}
1891218872
1891318873
/************** End of malloc.c **********************************************/
1891418874
/************** Begin file printf.c ******************************************/
18915
-#line 1 "tsrc/printf.c"
1891618875
/*
1891718876
** The "printf" code that follows dates from the 1980's. It is in
1891818877
** the public domain. The original comments are included here for
1891918878
** completeness. They are very out-of-date but might be useful as
1892018879
** an historical reference. Most of the "enhancements" have been backed
@@ -19942,11 +19901,10 @@
1994219901
}
1994319902
#endif
1994419903
1994519904
/************** End of printf.c **********************************************/
1994619905
/************** Begin file random.c ******************************************/
19947
-#line 1 "tsrc/random.c"
1994819906
/*
1994919907
** 2001 September 15
1995019908
**
1995119909
** The author disclaims copyright to this source code. In place of
1995219910
** a legal notice, here is a blessing:
@@ -20090,11 +20048,10 @@
2009020048
}
2009120049
#endif /* SQLITE_OMIT_BUILTIN_TEST */
2009220050
2009320051
/************** End of random.c **********************************************/
2009420052
/************** Begin file utf.c *********************************************/
20095
-#line 1 "tsrc/utf.c"
2009620053
/*
2009720054
** 2004 April 13
2009820055
**
2009920056
** The author disclaims copyright to this source code. In place of
2010020057
** a legal notice, here is a blessing:
@@ -20652,11 +20609,10 @@
2065220609
#endif /* SQLITE_TEST */
2065320610
#endif /* SQLITE_OMIT_UTF16 */
2065420611
2065520612
/************** End of utf.c *************************************************/
2065620613
/************** Begin file util.c ********************************************/
20657
-#line 1 "tsrc/util.c"
2065820614
/*
2065920615
** 2001 September 15
2066020616
**
2066120617
** The author disclaims copyright to this source code. In place of
2066220618
** a legal notice, here is a blessing:
@@ -21835,11 +21791,10 @@
2183521791
}
2183621792
#endif
2183721793
2183821794
/************** End of util.c ************************************************/
2183921795
/************** Begin file hash.c ********************************************/
21840
-#line 1 "tsrc/hash.c"
2184121796
/*
2184221797
** 2001 September 22
2184321798
**
2184421799
** The author disclaims copyright to this source code. In place of
2184521800
** a legal notice, here is a blessing:
@@ -22115,11 +22070,10 @@
2211522070
return 0;
2211622071
}
2211722072
2211822073
/************** End of hash.c ************************************************/
2211922074
/************** Begin file opcodes.c *****************************************/
22120
-#line 1 "tsrc/opcodes.c"
2212122075
/* Automatically generated. Do not edit */
2212222076
/* See the mkopcodec.awk script for details. */
2212322077
#if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
2212422078
SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
2212522079
static const char *const azName[] = { "?",
@@ -22146,66 +22100,66 @@
2214622100
/* 21 */ "MustBeInt",
2214722101
/* 22 */ "RealAffinity",
2214822102
/* 23 */ "Permutation",
2214922103
/* 24 */ "Compare",
2215022104
/* 25 */ "Jump",
22151
- /* 26 */ "If",
22152
- /* 27 */ "IfNot",
22153
- /* 28 */ "Column",
22154
- /* 29 */ "Affinity",
22155
- /* 30 */ "MakeRecord",
22156
- /* 31 */ "Count",
22157
- /* 32 */ "Savepoint",
22158
- /* 33 */ "AutoCommit",
22159
- /* 34 */ "Transaction",
22160
- /* 35 */ "ReadCookie",
22161
- /* 36 */ "SetCookie",
22162
- /* 37 */ "VerifyCookie",
22163
- /* 38 */ "OpenRead",
22164
- /* 39 */ "OpenWrite",
22165
- /* 40 */ "OpenAutoindex",
22166
- /* 41 */ "OpenEphemeral",
22167
- /* 42 */ "SorterOpen",
22168
- /* 43 */ "OpenPseudo",
22169
- /* 44 */ "Close",
22170
- /* 45 */ "SeekLt",
22171
- /* 46 */ "SeekLe",
22172
- /* 47 */ "SeekGe",
22173
- /* 48 */ "SeekGt",
22174
- /* 49 */ "Seek",
22175
- /* 50 */ "NotFound",
22176
- /* 51 */ "Found",
22177
- /* 52 */ "IsUnique",
22178
- /* 53 */ "NotExists",
22179
- /* 54 */ "Sequence",
22180
- /* 55 */ "NewRowid",
22181
- /* 56 */ "Insert",
22182
- /* 57 */ "InsertInt",
22183
- /* 58 */ "Delete",
22184
- /* 59 */ "ResetCount",
22185
- /* 60 */ "SorterCompare",
22186
- /* 61 */ "SorterData",
22187
- /* 62 */ "RowKey",
22188
- /* 63 */ "RowData",
22189
- /* 64 */ "Rowid",
22190
- /* 65 */ "NullRow",
22191
- /* 66 */ "Last",
22192
- /* 67 */ "SorterSort",
22105
+ /* 26 */ "Once",
22106
+ /* 27 */ "If",
22107
+ /* 28 */ "IfNot",
22108
+ /* 29 */ "Column",
22109
+ /* 30 */ "Affinity",
22110
+ /* 31 */ "MakeRecord",
22111
+ /* 32 */ "Count",
22112
+ /* 33 */ "Savepoint",
22113
+ /* 34 */ "AutoCommit",
22114
+ /* 35 */ "Transaction",
22115
+ /* 36 */ "ReadCookie",
22116
+ /* 37 */ "SetCookie",
22117
+ /* 38 */ "VerifyCookie",
22118
+ /* 39 */ "OpenRead",
22119
+ /* 40 */ "OpenWrite",
22120
+ /* 41 */ "OpenAutoindex",
22121
+ /* 42 */ "OpenEphemeral",
22122
+ /* 43 */ "SorterOpen",
22123
+ /* 44 */ "OpenPseudo",
22124
+ /* 45 */ "Close",
22125
+ /* 46 */ "SeekLt",
22126
+ /* 47 */ "SeekLe",
22127
+ /* 48 */ "SeekGe",
22128
+ /* 49 */ "SeekGt",
22129
+ /* 50 */ "Seek",
22130
+ /* 51 */ "NotFound",
22131
+ /* 52 */ "Found",
22132
+ /* 53 */ "IsUnique",
22133
+ /* 54 */ "NotExists",
22134
+ /* 55 */ "Sequence",
22135
+ /* 56 */ "NewRowid",
22136
+ /* 57 */ "Insert",
22137
+ /* 58 */ "InsertInt",
22138
+ /* 59 */ "Delete",
22139
+ /* 60 */ "ResetCount",
22140
+ /* 61 */ "SorterCompare",
22141
+ /* 62 */ "SorterData",
22142
+ /* 63 */ "RowKey",
22143
+ /* 64 */ "RowData",
22144
+ /* 65 */ "Rowid",
22145
+ /* 66 */ "NullRow",
22146
+ /* 67 */ "Last",
2219322147
/* 68 */ "Or",
2219422148
/* 69 */ "And",
22195
- /* 70 */ "Sort",
22196
- /* 71 */ "Rewind",
22197
- /* 72 */ "SorterNext",
22149
+ /* 70 */ "SorterSort",
22150
+ /* 71 */ "Sort",
22151
+ /* 72 */ "Rewind",
2219822152
/* 73 */ "IsNull",
2219922153
/* 74 */ "NotNull",
2220022154
/* 75 */ "Ne",
2220122155
/* 76 */ "Eq",
2220222156
/* 77 */ "Gt",
2220322157
/* 78 */ "Le",
2220422158
/* 79 */ "Lt",
2220522159
/* 80 */ "Ge",
22206
- /* 81 */ "Prev",
22160
+ /* 81 */ "SorterNext",
2220722161
/* 82 */ "BitAnd",
2220822162
/* 83 */ "BitOr",
2220922163
/* 84 */ "ShiftLeft",
2221022164
/* 85 */ "ShiftRight",
2221122165
/* 86 */ "Add",
@@ -22212,76 +22166,76 @@
2221222166
/* 87 */ "Subtract",
2221322167
/* 88 */ "Multiply",
2221422168
/* 89 */ "Divide",
2221522169
/* 90 */ "Remainder",
2221622170
/* 91 */ "Concat",
22217
- /* 92 */ "Next",
22171
+ /* 92 */ "Prev",
2221822172
/* 93 */ "BitNot",
2221922173
/* 94 */ "String8",
22220
- /* 95 */ "SorterInsert",
22221
- /* 96 */ "IdxInsert",
22222
- /* 97 */ "IdxDelete",
22223
- /* 98 */ "IdxRowid",
22224
- /* 99 */ "IdxLT",
22225
- /* 100 */ "IdxGE",
22226
- /* 101 */ "Destroy",
22227
- /* 102 */ "Clear",
22228
- /* 103 */ "CreateIndex",
22229
- /* 104 */ "CreateTable",
22230
- /* 105 */ "ParseSchema",
22231
- /* 106 */ "LoadAnalysis",
22232
- /* 107 */ "DropTable",
22233
- /* 108 */ "DropIndex",
22234
- /* 109 */ "DropTrigger",
22235
- /* 110 */ "IntegrityCk",
22236
- /* 111 */ "RowSetAdd",
22237
- /* 112 */ "RowSetRead",
22238
- /* 113 */ "RowSetTest",
22239
- /* 114 */ "Program",
22240
- /* 115 */ "Param",
22241
- /* 116 */ "FkCounter",
22242
- /* 117 */ "FkIfZero",
22243
- /* 118 */ "MemMax",
22244
- /* 119 */ "IfPos",
22245
- /* 120 */ "IfNeg",
22246
- /* 121 */ "IfZero",
22247
- /* 122 */ "AggStep",
22248
- /* 123 */ "AggFinal",
22249
- /* 124 */ "Checkpoint",
22250
- /* 125 */ "JournalMode",
22251
- /* 126 */ "Vacuum",
22252
- /* 127 */ "IncrVacuum",
22253
- /* 128 */ "Expire",
22254
- /* 129 */ "TableLock",
22174
+ /* 95 */ "Next",
22175
+ /* 96 */ "SorterInsert",
22176
+ /* 97 */ "IdxInsert",
22177
+ /* 98 */ "IdxDelete",
22178
+ /* 99 */ "IdxRowid",
22179
+ /* 100 */ "IdxLT",
22180
+ /* 101 */ "IdxGE",
22181
+ /* 102 */ "Destroy",
22182
+ /* 103 */ "Clear",
22183
+ /* 104 */ "CreateIndex",
22184
+ /* 105 */ "CreateTable",
22185
+ /* 106 */ "ParseSchema",
22186
+ /* 107 */ "LoadAnalysis",
22187
+ /* 108 */ "DropTable",
22188
+ /* 109 */ "DropIndex",
22189
+ /* 110 */ "DropTrigger",
22190
+ /* 111 */ "IntegrityCk",
22191
+ /* 112 */ "RowSetAdd",
22192
+ /* 113 */ "RowSetRead",
22193
+ /* 114 */ "RowSetTest",
22194
+ /* 115 */ "Program",
22195
+ /* 116 */ "Param",
22196
+ /* 117 */ "FkCounter",
22197
+ /* 118 */ "FkIfZero",
22198
+ /* 119 */ "MemMax",
22199
+ /* 120 */ "IfPos",
22200
+ /* 121 */ "IfNeg",
22201
+ /* 122 */ "IfZero",
22202
+ /* 123 */ "AggStep",
22203
+ /* 124 */ "AggFinal",
22204
+ /* 125 */ "Checkpoint",
22205
+ /* 126 */ "JournalMode",
22206
+ /* 127 */ "Vacuum",
22207
+ /* 128 */ "IncrVacuum",
22208
+ /* 129 */ "Expire",
2225522209
/* 130 */ "Real",
22256
- /* 131 */ "VBegin",
22257
- /* 132 */ "VCreate",
22258
- /* 133 */ "VDestroy",
22259
- /* 134 */ "VOpen",
22260
- /* 135 */ "VFilter",
22261
- /* 136 */ "VColumn",
22262
- /* 137 */ "VNext",
22263
- /* 138 */ "VRename",
22264
- /* 139 */ "VUpdate",
22265
- /* 140 */ "Pagecount",
22210
+ /* 131 */ "TableLock",
22211
+ /* 132 */ "VBegin",
22212
+ /* 133 */ "VCreate",
22213
+ /* 134 */ "VDestroy",
22214
+ /* 135 */ "VOpen",
22215
+ /* 136 */ "VFilter",
22216
+ /* 137 */ "VColumn",
22217
+ /* 138 */ "VNext",
22218
+ /* 139 */ "VRename",
22219
+ /* 140 */ "VUpdate",
2226622220
/* 141 */ "ToText",
2226722221
/* 142 */ "ToBlob",
2226822222
/* 143 */ "ToNumeric",
2226922223
/* 144 */ "ToInt",
2227022224
/* 145 */ "ToReal",
22271
- /* 146 */ "MaxPgcnt",
22272
- /* 147 */ "Trace",
22273
- /* 148 */ "Noop",
22274
- /* 149 */ "Explain",
22225
+ /* 146 */ "Pagecount",
22226
+ /* 147 */ "MaxPgcnt",
22227
+ /* 148 */ "Trace",
22228
+ /* 149 */ "Noop",
22229
+ /* 150 */ "Explain",
2227522230
};
2227622231
return azName[i];
2227722232
}
2227822233
#endif
2227922234
2228022235
/************** End of opcodes.c *********************************************/
2228122236
/************** Begin file os_os2.c ******************************************/
22282
-#line 1 "tsrc/os_os2.c"
2228322237
/*
2228422238
** 2006 Feb 14
2228522239
**
2228622240
** The author disclaims copyright to this source code. In place of
2228722241
** a legal notice, here is a blessing:
@@ -22334,11 +22288,10 @@
2233422288
/*
2233522289
** Include code that is common to all os_*.c files
2233622290
*/
2233722291
/************** Include os_common.h in the middle of os_os2.c ****************/
2233822292
/************** Begin file os_common.h ***************************************/
22339
-#line 1 "tsrc/os_common.h"
2234022293
/*
2234122294
** 2004 May 22
2234222295
**
2234322296
** The author disclaims copyright to this source code. In place of
2234422297
** a legal notice, here is a blessing:
@@ -22388,11 +22341,10 @@
2238822341
** hwtime.h contains inline assembler code for implementing
2238922342
** high-performance timing routines.
2239022343
*/
2239122344
/************** Include hwtime.h in the middle of os_common.h ****************/
2239222345
/************** Begin file hwtime.h ******************************************/
22393
-#line 1 "tsrc/hwtime.h"
2239422346
/*
2239522347
** 2008 May 27
2239622348
**
2239722349
** The author disclaims copyright to this source code. In place of
2239822350
** a legal notice, here is a blessing:
@@ -22477,11 +22429,10 @@
2247722429
2247822430
#endif /* !defined(_HWTIME_H_) */
2247922431
2248022432
/************** End of hwtime.h **********************************************/
2248122433
/************** Continuing where we left off in os_common.h ******************/
22482
-#line 53 "tsrc/os_common.h"
2248322434
2248422435
static sqlite_uint64 g_start;
2248522436
static sqlite_uint64 g_elapsed;
2248622437
#define TIMER_START g_start=sqlite3Hwtime()
2248722438
#define TIMER_END g_elapsed=sqlite3Hwtime()-g_start
@@ -22544,11 +22495,10 @@
2254422495
2254522496
#endif /* !defined(_OS_COMMON_H_) */
2254622497
2254722498
/************** End of os_common.h *******************************************/
2254822499
/************** Continuing where we left off in os_os2.c *********************/
22549
-#line 57 "tsrc/os_os2.c"
2255022500
2255122501
/* Forward references */
2255222502
typedef struct os2File os2File; /* The file structure */
2255322503
typedef struct os2ShmNode os2ShmNode; /* A shared descritive memory node */
2255422504
typedef struct os2ShmLink os2ShmLink; /* A connection to shared-memory */
@@ -24416,11 +24366,10 @@
2441624366
2441724367
#endif /* SQLITE_OS_OS2 */
2441824368
2441924369
/************** End of os_os2.c **********************************************/
2442024370
/************** Begin file os_unix.c *****************************************/
24421
-#line 1 "tsrc/os_unix.c"
2442224371
/*
2442324372
** 2004 May 22
2442424373
**
2442524374
** The author disclaims copyright to this source code. In place of
2442624375
** a legal notice, here is a blessing:
@@ -24681,11 +24630,10 @@
2468124630
/*
2468224631
** Include code that is common to all os_*.c files
2468324632
*/
2468424633
/************** Include os_common.h in the middle of os_unix.c ***************/
2468524634
/************** Begin file os_common.h ***************************************/
24686
-#line 1 "tsrc/os_common.h"
2468724635
/*
2468824636
** 2004 May 22
2468924637
**
2469024638
** The author disclaims copyright to this source code. In place of
2469124639
** a legal notice, here is a blessing:
@@ -24735,11 +24683,10 @@
2473524683
** hwtime.h contains inline assembler code for implementing
2473624684
** high-performance timing routines.
2473724685
*/
2473824686
/************** Include hwtime.h in the middle of os_common.h ****************/
2473924687
/************** Begin file hwtime.h ******************************************/
24740
-#line 1 "tsrc/hwtime.h"
2474124688
/*
2474224689
** 2008 May 27
2474324690
**
2474424691
** The author disclaims copyright to this source code. In place of
2474524692
** a legal notice, here is a blessing:
@@ -24824,11 +24771,10 @@
2482424771
2482524772
#endif /* !defined(_HWTIME_H_) */
2482624773
2482724774
/************** End of hwtime.h **********************************************/
2482824775
/************** Continuing where we left off in os_common.h ******************/
24829
-#line 53 "tsrc/os_common.h"
2483024776
2483124777
static sqlite_uint64 g_start;
2483224778
static sqlite_uint64 g_elapsed;
2483324779
#define TIMER_START g_start=sqlite3Hwtime()
2483424780
#define TIMER_END g_elapsed=sqlite3Hwtime()-g_start
@@ -24891,11 +24837,10 @@
2489124837
2489224838
#endif /* !defined(_OS_COMMON_H_) */
2489324839
2489424840
/************** End of os_common.h *******************************************/
2489524841
/************** Continuing where we left off in os_unix.c ********************/
24896
-#line 265 "tsrc/os_unix.c"
2489724842
2489824843
/*
2489924844
** Define various macros that are missing from some systems.
2490024845
*/
2490124846
#ifndef O_LARGEFILE
@@ -31401,11 +31346,10 @@
3140131346
3140231347
#endif /* SQLITE_OS_UNIX */
3140331348
3140431349
/************** End of os_unix.c *********************************************/
3140531350
/************** Begin file os_win.c ******************************************/
31406
-#line 1 "tsrc/os_win.c"
3140731351
/*
3140831352
** 2004 May 22
3140931353
**
3141031354
** The author disclaims copyright to this source code. In place of
3141131355
** a legal notice, here is a blessing:
@@ -31463,11 +31407,10 @@
3146331407
/*
3146431408
** Include code that is common to all os_*.c files
3146531409
*/
3146631410
/************** Include os_common.h in the middle of os_win.c ****************/
3146731411
/************** Begin file os_common.h ***************************************/
31468
-#line 1 "tsrc/os_common.h"
3146931412
/*
3147031413
** 2004 May 22
3147131414
**
3147231415
** The author disclaims copyright to this source code. In place of
3147331416
** a legal notice, here is a blessing:
@@ -31517,11 +31460,10 @@
3151731460
** hwtime.h contains inline assembler code for implementing
3151831461
** high-performance timing routines.
3151931462
*/
3152031463
/************** Include hwtime.h in the middle of os_common.h ****************/
3152131464
/************** Begin file hwtime.h ******************************************/
31522
-#line 1 "tsrc/hwtime.h"
3152331465
/*
3152431466
** 2008 May 27
3152531467
**
3152631468
** The author disclaims copyright to this source code. In place of
3152731469
** a legal notice, here is a blessing:
@@ -31606,11 +31548,10 @@
3160631548
3160731549
#endif /* !defined(_HWTIME_H_) */
3160831550
3160931551
/************** End of hwtime.h **********************************************/
3161031552
/************** Continuing where we left off in os_common.h ******************/
31611
-#line 53 "tsrc/os_common.h"
3161231553
3161331554
static sqlite_uint64 g_start;
3161431555
static sqlite_uint64 g_elapsed;
3161531556
#define TIMER_START g_start=sqlite3Hwtime()
3161631557
#define TIMER_END g_elapsed=sqlite3Hwtime()-g_start
@@ -31673,11 +31614,10 @@
3167331614
3167431615
#endif /* !defined(_OS_COMMON_H_) */
3167531616
3167631617
/************** End of os_common.h *******************************************/
3167731618
/************** Continuing where we left off in os_win.c *********************/
31678
-#line 62 "tsrc/os_win.c"
3167931619
3168031620
/*
3168131621
** Some microsoft compilers lack this definition.
3168231622
*/
3168331623
#ifndef INVALID_FILE_ATTRIBUTES
@@ -34809,11 +34749,10 @@
3480934749
3481034750
#endif /* SQLITE_OS_WIN */
3481134751
3481234752
/************** End of os_win.c **********************************************/
3481334753
/************** Begin file bitvec.c ******************************************/
34814
-#line 1 "tsrc/bitvec.c"
3481534754
/*
3481634755
** 2008 February 16
3481734756
**
3481834757
** The author disclaims copyright to this source code. In place of
3481934758
** a legal notice, here is a blessing:
@@ -35220,11 +35159,10 @@
3522035159
}
3522135160
#endif /* SQLITE_OMIT_BUILTIN_TEST */
3522235161
3522335162
/************** End of bitvec.c **********************************************/
3522435163
/************** Begin file pcache.c ******************************************/
35225
-#line 1 "tsrc/pcache.c"
3522635164
/*
3522735165
** 2008 August 05
3522835166
**
3522935167
** The author disclaims copyright to this source code. In place of
3523035168
** a legal notice, here is a blessing:
@@ -35817,11 +35755,10 @@
3581735755
}
3581835756
#endif
3581935757
3582035758
/************** End of pcache.c **********************************************/
3582135759
/************** Begin file pcache1.c *****************************************/
35822
-#line 1 "tsrc/pcache1.c"
3582335760
/*
3582435761
** 2008 November 05
3582535762
**
3582635763
** The author disclaims copyright to this source code. In place of
3582735764
** a legal notice, here is a blessing:
@@ -37034,11 +36971,10 @@
3703436971
}
3703536972
#endif
3703636973
3703736974
/************** End of pcache1.c *********************************************/
3703836975
/************** Begin file rowset.c ******************************************/
37039
-#line 1 "tsrc/rowset.c"
3704036976
/*
3704136977
** 2008 December 3
3704236978
**
3704336979
** The author disclaims copyright to this source code. In place of
3704436980
** a legal notice, here is a blessing:
@@ -37459,11 +37395,10 @@
3745937395
return 0;
3746037396
}
3746137397
3746237398
/************** End of rowset.c **********************************************/
3746337399
/************** Begin file pager.c *******************************************/
37464
-#line 1 "tsrc/pager.c"
3746537400
/*
3746637401
** 2001 September 15
3746737402
**
3746837403
** The author disclaims copyright to this source code. In place of
3746937404
** a legal notice, here is a blessing:
@@ -37483,11 +37418,10 @@
3748337418
** another is writing.
3748437419
*/
3748537420
#ifndef SQLITE_OMIT_DISKIO
3748637421
/************** Include wal.h in the middle of pager.c ***********************/
3748737422
/************** Begin file wal.h *********************************************/
37488
-#line 1 "tsrc/wal.h"
3748937423
/*
3749037424
** 2010 February 1
3749137425
**
3749237426
** The author disclaims copyright to this source code. In place of
3749337427
** a legal notice, here is a blessing:
@@ -37608,11 +37542,10 @@
3760837542
#endif /* ifndef SQLITE_OMIT_WAL */
3760937543
#endif /* _WAL_H_ */
3761037544
3761137545
/************** End of wal.h *************************************************/
3761237546
/************** Continuing where we left off in pager.c **********************/
37613
-#line 24 "tsrc/pager.c"
3761437547
3761537548
3761637549
/******************* NOTES ON THE DESIGN OF THE PAGER ************************
3761737550
**
3761837551
** This comment block describes invariants that hold when using a rollback
@@ -44422,11 +44355,10 @@
4442244355
4442344356
#endif /* SQLITE_OMIT_DISKIO */
4442444357
4442544358
/************** End of pager.c ***********************************************/
4442644359
/************** Begin file wal.c *********************************************/
44427
-#line 1 "tsrc/wal.c"
4442844360
/*
4442944361
** 2010 February 1
4443044362
**
4443144363
** The author disclaims copyright to this source code. In place of
4443244364
** a legal notice, here is a blessing:
@@ -47377,11 +47309,10 @@
4737747309
4737847310
#endif /* #ifndef SQLITE_OMIT_WAL */
4737947311
4738047312
/************** End of wal.c *************************************************/
4738147313
/************** Begin file btmutex.c *****************************************/
47382
-#line 1 "tsrc/btmutex.c"
4738347314
/*
4738447315
** 2007 August 27
4738547316
**
4738647317
** The author disclaims copyright to this source code. In place of
4738747318
** a legal notice, here is a blessing:
@@ -47397,11 +47328,10 @@
4739747328
** big and we want to break it down some. This packaged seemed like
4739847329
** a good breakout.
4739947330
*/
4740047331
/************** Include btreeInt.h in the middle of btmutex.c ****************/
4740147332
/************** Begin file btreeInt.h ****************************************/
47402
-#line 1 "tsrc/btreeInt.h"
4740347333
/*
4740447334
** 2004 April 6
4740547335
**
4740647336
** The author disclaims copyright to this source code. In place of
4740747337
** a legal notice, here is a blessing:
@@ -48043,11 +47973,10 @@
4804347973
#define get4byte sqlite3Get4byte
4804447974
#define put4byte sqlite3Put4byte
4804547975
4804647976
/************** End of btreeInt.h ********************************************/
4804747977
/************** Continuing where we left off in btmutex.c ********************/
48048
-#line 19 "tsrc/btmutex.c"
4804947978
#ifndef SQLITE_OMIT_SHARED_CACHE
4805047979
#if SQLITE_THREADSAFE
4805147980
4805247981
/*
4805347982
** Obtain the BtShared mutex associated with B-Tree handle p. Also,
@@ -48316,11 +48245,10 @@
4831648245
#endif /* if SQLITE_THREADSAFE */
4831748246
#endif /* ifndef SQLITE_OMIT_SHARED_CACHE */
4831848247
4831948248
/************** End of btmutex.c *********************************************/
4832048249
/************** Begin file btree.c *******************************************/
48321
-#line 1 "tsrc/btree.c"
4832248250
/*
4832348251
** 2004 April 6
4832448252
**
4832548253
** The author disclaims copyright to this source code. In place of
4832648254
** a legal notice, here is a blessing:
@@ -48982,11 +48910,11 @@
4898248910
assert( nKey==(i64)(int)nKey );
4898348911
pIdxKey = sqlite3VdbeAllocUnpackedRecord(
4898448912
pCur->pKeyInfo, aSpace, sizeof(aSpace), &pFree
4898548913
);
4898648914
if( pIdxKey==0 ) return SQLITE_NOMEM;
48987
- sqlite3VdbeRecordUnpack(pCur->pKeyInfo, nKey, pKey, pIdxKey);
48915
+ sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey, pIdxKey);
4898848916
}else{
4898948917
pIdxKey = 0;
4899048918
}
4899148919
rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes);
4899248920
if( pFree ){
@@ -56504,11 +56432,10 @@
5650456432
return rc;
5650556433
}
5650656434
5650756435
/************** End of btree.c ***********************************************/
5650856436
/************** Begin file backup.c ******************************************/
56509
-#line 1 "tsrc/backup.c"
5651056437
/*
5651156438
** 2009 January 28
5651256439
**
5651356440
** The author disclaims copyright to this source code. In place of
5651456441
** a legal notice, here is a blessing:
@@ -57211,11 +57138,10 @@
5721157138
}
5721257139
#endif /* SQLITE_OMIT_VACUUM */
5721357140
5721457141
/************** End of backup.c **********************************************/
5721557142
/************** Begin file vdbemem.c *****************************************/
57216
-#line 1 "tsrc/vdbemem.c"
5721757143
/*
5721857144
** 2004 May 26
5721957145
**
5722057146
** The author disclaims copyright to this source code. In place of
5722157147
** a legal notice, here is a blessing:
@@ -58366,11 +58292,10 @@
5836658292
return 0;
5836758293
}
5836858294
5836958295
/************** End of vdbemem.c *********************************************/
5837058296
/************** Begin file vdbeaux.c *****************************************/
58371
-#line 1 "tsrc/vdbeaux.c"
5837258297
/*
5837358298
** 2003 September 6
5837458299
**
5837558300
** The author disclaims copyright to this source code. In place of
5837658301
** a legal notice, here is a blessing:
@@ -59037,22 +58962,19 @@
5903758962
p->pNext = pVdbe->pProgram;
5903858963
pVdbe->pProgram = p;
5903958964
}
5904058965
5904158966
/*
59042
-** Change N opcodes starting at addr to No-ops.
58967
+** Change the opcode at addr into OP_Noop
5904358968
*/
59044
-SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr, int N){
58969
+SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
5904558970
if( p->aOp ){
5904658971
VdbeOp *pOp = &p->aOp[addr];
5904758972
sqlite3 *db = p->db;
59048
- while( N-- ){
59049
- freeP4(db, pOp->p4type, pOp->p4.p);
59050
- memset(pOp, 0, sizeof(pOp[0]));
59051
- pOp->opcode = OP_Noop;
59052
- pOp++;
59053
- }
58973
+ freeP4(db, pOp->p4type, pOp->p4.p);
58974
+ memset(pOp, 0, sizeof(pOp[0]));
58975
+ pOp->opcode = OP_Noop;
5905458976
}
5905558977
}
5905658978
5905758979
/*
5905858980
** Change the value of the P4 operand for a specific instruction.
@@ -59204,11 +59126,11 @@
5920459126
** check the value of p->nOp-1 before continuing.
5920559127
*/
5920659128
SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){
5920759129
/* C89 specifies that the constant "dummy" will be initialized to all
5920859130
** zeros, which is correct. MSVC generates a warning, nevertheless. */
59209
- static const VdbeOp dummy; /* Ignore the MSVC warning about no initializer */
59131
+ static VdbeOp dummy; /* Ignore the MSVC warning about no initializer */
5921059132
assert( p->magic==VDBE_MAGIC_INIT );
5921159133
if( addr<0 ){
5921259134
#ifdef SQLITE_OMIT_TRACE
5921359135
if( p->nOp==0 ) return (VdbeOp*)&dummy;
5921459136
#endif
@@ -61609,11 +61531,10 @@
6160961531
}
6161061532
}
6161161533
6161261534
/************** End of vdbeaux.c *********************************************/
6161361535
/************** Begin file vdbeapi.c *****************************************/
61614
-#line 1 "tsrc/vdbeapi.c"
6161561536
/*
6161661537
** 2004 May 26
6161761538
**
6161861539
** The author disclaims copyright to this source code. In place of
6161961540
** a legal notice, here is a blessing:
@@ -62917,11 +62838,10 @@
6291762838
return v;
6291862839
}
6291962840
6292062841
/************** End of vdbeapi.c *********************************************/
6292162842
/************** Begin file vdbetrace.c ***************************************/
62922
-#line 1 "tsrc/vdbetrace.c"
6292362843
/*
6292462844
** 2009 November 25
6292562845
**
6292662846
** The author disclaims copyright to this source code. In place of
6292762847
** a legal notice, here is a blessing:
@@ -63073,11 +62993,10 @@
6307362993
6307462994
#endif /* #ifndef SQLITE_OMIT_TRACE */
6307562995
6307662996
/************** End of vdbetrace.c *******************************************/
6307762997
/************** Begin file vdbe.c ********************************************/
63078
-#line 1 "tsrc/vdbe.c"
6307962998
/*
6308062999
** 2001 September 15
6308163000
**
6308263001
** The author disclaims copyright to this source code. In place of
6308363002
** a legal notice, here is a blessing:
@@ -63543,11 +63462,10 @@
6354363462
** hwtime.h contains inline assembler code for implementing
6354463463
** high-performance timing routines.
6354563464
*/
6354663465
/************** Include hwtime.h in the middle of vdbe.c *********************/
6354763466
/************** Begin file hwtime.h ******************************************/
63548
-#line 1 "tsrc/hwtime.h"
6354963467
/*
6355063468
** 2008 May 27
6355163469
**
6355263470
** The author disclaims copyright to this source code. In place of
6355363471
** a legal notice, here is a blessing:
@@ -63632,11 +63550,10 @@
6363263550
6363363551
#endif /* !defined(_HWTIME_H_) */
6363463552
6363563553
/************** End of hwtime.h **********************************************/
6363663554
/************** Continuing where we left off in vdbe.c ***********************/
63637
-#line 471 "tsrc/vdbe.c"
6363863555
6363963556
#endif
6364063557
6364163558
/*
6364263559
** The CHECK_FOR_INTERRUPT macro defined here looks to see if the
@@ -65627,10 +65544,20 @@
6562765544
sqlite3VdbeMemSetInt64(pOut, ~sqlite3VdbeIntValue(pIn1));
6562865545
}
6562965546
break;
6563065547
}
6563165548
65549
+/* Opcode: Once P1 P2 * * *
65550
+**
65551
+** Jump to P2 if the value in register P1 is a not null or zero. If
65552
+** the value is NULL or zero, fall through and change the P1 register
65553
+** to an integer 1.
65554
+**
65555
+** When P1 is not used otherwise in a program, this opcode falls through
65556
+** once and jumps on all subsequent invocations. It is the equivalent
65557
+** of "OP_If P1 P2", followed by "OP_Integer 1 P1".
65558
+*/
6563265559
/* Opcode: If P1 P2 P3 * *
6563365560
**
6563465561
** Jump to P2 if the value in register P1 is true. The value
6563565562
** is considered true if it is numeric and non-zero. If the value
6563665563
** in P1 is NULL then take the jump if P3 is true.
@@ -65639,10 +65566,11 @@
6563965566
**
6564065567
** Jump to P2 if the value in register P1 is False. The value
6564165568
** is considered true if it has a numeric value of zero. If the value
6564265569
** in P1 is NULL then take the jump if P3 is true.
6564365570
*/
65571
+case OP_Once: /* jump, in1 */
6564465572
case OP_If: /* jump, in1 */
6564565573
case OP_IfNot: { /* jump, in1 */
6564665574
#if 0 /* local variables moved into u.al */
6564765575
int c;
6564865576
#endif /* local variables moved into u.al */
@@ -65657,10 +65585,16 @@
6565765585
#endif
6565865586
if( pOp->opcode==OP_IfNot ) u.al.c = !u.al.c;
6565965587
}
6566065588
if( u.al.c ){
6566165589
pc = pOp->p2-1;
65590
+ }else if( pOp->opcode==OP_Once ){
65591
+ assert( (pIn1->flags & (MEM_Agg|MEM_Dyn|MEM_RowSet|MEM_Frame))==0 );
65592
+ memAboutToChange(p, pIn1);
65593
+ pIn1->flags = MEM_Int;
65594
+ pIn1->u.i = 1;
65595
+ REGISTER_TRACE(pOp->p1, pIn1);
6566265596
}
6566365597
break;
6566465598
}
6566565599
6566665600
/* Opcode: IsNull P1 P2 * * *
@@ -69860,11 +69794,10 @@
6986069794
goto vdbe_error_halt;
6986169795
}
6986269796
6986369797
/************** End of vdbe.c ************************************************/
6986469798
/************** Begin file vdbeblob.c ****************************************/
69865
-#line 1 "tsrc/vdbeblob.c"
6986669799
/*
6986769800
** 2007 May 1
6986869801
**
6986969802
** The author disclaims copyright to this source code. In place of
6987069803
** a legal notice, here is a blessing:
@@ -70134,21 +70067,21 @@
7013470067
/* Make sure a mutex is held on the table to be accessed */
7013570068
sqlite3VdbeUsesBtree(v, iDb);
7013670069
7013770070
/* Configure the OP_TableLock instruction */
7013870071
#ifdef SQLITE_OMIT_SHARED_CACHE
70139
- sqlite3VdbeChangeToNoop(v, 2, 1);
70072
+ sqlite3VdbeChangeToNoop(v, 2);
7014070073
#else
7014170074
sqlite3VdbeChangeP1(v, 2, iDb);
7014270075
sqlite3VdbeChangeP2(v, 2, pTab->tnum);
7014370076
sqlite3VdbeChangeP3(v, 2, flags);
7014470077
sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT);
7014570078
#endif
7014670079
7014770080
/* Remove either the OP_OpenWrite or OpenRead. Set the P2
7014870081
** parameter of the other to pTab->tnum. */
70149
- sqlite3VdbeChangeToNoop(v, 4 - flags, 1);
70082
+ sqlite3VdbeChangeToNoop(v, 4 - flags);
7015070083
sqlite3VdbeChangeP2(v, 3 + flags, pTab->tnum);
7015170084
sqlite3VdbeChangeP3(v, 3 + flags, iDb);
7015270085
7015370086
/* Configure the number of columns. Configure the cursor to
7015470087
** think that the table has one more column than it really
@@ -70331,11 +70264,10 @@
7033170264
7033270265
#endif /* #ifndef SQLITE_OMIT_INCRBLOB */
7033370266
7033470267
/************** End of vdbeblob.c ********************************************/
7033570268
/************** Begin file vdbesort.c ****************************************/
70336
-#line 1 "tsrc/vdbesort.c"
7033770269
/*
7033870270
** 2011 July 9
7033970271
**
7034070272
** The author disclaims copyright to this source code. In place of
7034170273
** a legal notice, here is a blessing:
@@ -70492,12 +70424,16 @@
7049270424
int rc; /* Return Code */
7049370425
int nRead; /* Number of bytes read */
7049470426
int nRec = 0; /* Size of record in bytes */
7049570427
int iOff = 0; /* Size of serialized size varint in bytes */
7049670428
70497
- nRead = pIter->iEof - pIter->iReadOff;
70498
- if( nRead>5 ) nRead = 5;
70429
+ assert( pIter->iEof>=pIter->iReadOff );
70430
+ if( pIter->iEof-pIter->iReadOff>5 ){
70431
+ nRead = 5;
70432
+ }else{
70433
+ nRead = (int)(pIter->iEof - pIter->iReadOff);
70434
+ }
7049970435
if( nRead<=0 ){
7050070436
/* This is an EOF condition */
7050170437
vdbeSorterIterZero(db, pIter);
7050270438
return SQLITE_OK;
7050370439
}
@@ -71211,11 +71147,10 @@
7121171147
7121271148
#endif /* #ifndef SQLITE_OMIT_MERGE_SORT */
7121371149
7121471150
/************** End of vdbesort.c ********************************************/
7121571151
/************** Begin file journal.c *****************************************/
71216
-#line 1 "tsrc/journal.c"
7121771152
/*
7121871153
** 2007 August 22
7121971154
**
7122071155
** The author disclaims copyright to this source code. In place of
7122171156
** a legal notice, here is a blessing:
@@ -71452,11 +71387,10 @@
7145271387
}
7145371388
#endif
7145471389
7145571390
/************** End of journal.c *********************************************/
7145671391
/************** Begin file memjournal.c **************************************/
71457
-#line 1 "tsrc/memjournal.c"
7145871392
/*
7145971393
** 2008 October 7
7146071394
**
7146171395
** The author disclaims copyright to this source code. In place of
7146271396
** a legal notice, here is a blessing:
@@ -71714,11 +71648,10 @@
7171471648
return sizeof(MemJournal);
7171571649
}
7171671650
7171771651
/************** End of memjournal.c ******************************************/
7171871652
/************** Begin file walker.c ******************************************/
71719
-#line 1 "tsrc/walker.c"
7172071653
/*
7172171654
** 2008 August 16
7172271655
**
7172371656
** The author disclaims copyright to this source code. In place of
7172471657
** a legal notice, here is a blessing:
@@ -71853,11 +71786,10 @@
7185371786
return rc & WRC_Abort;
7185471787
}
7185571788
7185671789
/************** End of walker.c **********************************************/
7185771790
/************** Begin file resolve.c *****************************************/
71858
-#line 1 "tsrc/resolve.c"
7185971791
/*
7186071792
** 2008 August 18
7186171793
**
7186271794
** The author disclaims copyright to this source code. In place of
7186371795
** a legal notice, here is a blessing:
@@ -73074,11 +73006,10 @@
7307473006
sqlite3WalkSelect(&w, p);
7307573007
}
7307673008
7307773009
/************** End of resolve.c *********************************************/
7307873010
/************** Begin file expr.c ********************************************/
73079
-#line 1 "tsrc/expr.c"
7308073011
/*
7308173012
** 2001 September 15
7308273013
**
7308373014
** The author disclaims copyright to this source code. In place of
7308473015
** a legal notice, here is a blessing:
@@ -73977,11 +73908,12 @@
7397773908
pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase);
7397873909
pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
7397973910
pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);
7398073911
pNewItem->jointype = pOldItem->jointype;
7398173912
pNewItem->iCursor = pOldItem->iCursor;
73982
- pNewItem->isPopulated = pOldItem->isPopulated;
73913
+ pNewItem->addrFillSub = pOldItem->addrFillSub;
73914
+ pNewItem->regReturn = pOldItem->regReturn;
7398373915
pNewItem->isCorrelated = pOldItem->isCorrelated;
7398473916
pNewItem->zIndex = sqlite3DbStrDup(db, pOldItem->zIndex);
7398573917
pNewItem->notIndexed = pOldItem->notIndexed;
7398673918
pNewItem->pIndex = pOldItem->pIndex;
7398773919
pTab = pNewItem->pTab = pOldItem->pTab;
@@ -74537,12 +74469,11 @@
7453774469
assert(v);
7453874470
if( iCol<0 ){
7453974471
int iMem = ++pParse->nMem;
7454074472
int iAddr;
7454174473
74542
- iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem);
74543
- sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem);
74474
+ iAddr = sqlite3VdbeAddOp1(v, OP_Once, iMem);
7454474475
7454574476
sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
7454674477
eType = IN_INDEX_ROWID;
7454774478
7454874479
sqlite3VdbeJumpHere(v, iAddr);
@@ -74569,12 +74500,11 @@
7456974500
int iMem = ++pParse->nMem;
7457074501
int iAddr;
7457174502
char *pKey;
7457274503
7457374504
pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx);
74574
- iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem);
74575
- sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem);
74505
+ iAddr = sqlite3VdbeAddOp1(v, OP_Once, iMem);
7457674506
7457774507
sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb,
7457874508
pKey,P4_KEYINFO_HANDOFF);
7457974509
VdbeComment((v, "%s", pIdx->zName));
7458074510
eType = IN_INDEX_INDEX;
@@ -74655,10 +74585,11 @@
7465574585
){
7465674586
int testAddr = 0; /* One-time test address */
7465774587
int rReg = 0; /* Register storing resulting */
7465874588
Vdbe *v = sqlite3GetVdbe(pParse);
7465974589
if( NEVER(v==0) ) return 0;
74590
+ assert( sqlite3VdbeCurrentAddr(v)>0 );
7466074591
sqlite3ExprCachePush(pParse);
7466174592
7466274593
/* This code must be run in its entirety every time it is encountered
7466374594
** if any of the following is true:
7466474595
**
@@ -74669,12 +74600,11 @@
7466974600
** If all of the above are false, then we can run this code just once
7467074601
** save the results, and reuse the same result on subsequent invocations.
7467174602
*/
7467274603
if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){
7467374604
int mem = ++pParse->nMem;
74674
- sqlite3VdbeAddOp1(v, OP_If, mem);
74675
- testAddr = sqlite3VdbeAddOp2(v, OP_Integer, 1, mem);
74605
+ testAddr = sqlite3VdbeAddOp1(v, OP_Once, mem);
7467674606
assert( testAddr>0 || pParse->db->mallocFailed );
7467774607
}
7467874608
7467974609
#ifndef SQLITE_OMIT_EXPLAIN
7468074610
if( pParse->explain==2 ){
@@ -74770,11 +74700,11 @@
7477074700
** disable the test that was generated above that makes sure
7477174701
** this code only executes once. Because for a non-constant
7477274702
** expression we need to rerun this code each time.
7477374703
*/
7477474704
if( testAddr && !sqlite3ExprIsConstant(pE2) ){
74775
- sqlite3VdbeChangeToNoop(v, testAddr-1, 2);
74705
+ sqlite3VdbeChangeToNoop(v, testAddr);
7477674706
testAddr = 0;
7477774707
}
7477874708
7477974709
/* Evaluate the expression and insert it into the temp table */
7478074710
if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
@@ -74841,11 +74771,11 @@
7484174771
break;
7484274772
}
7484374773
}
7484474774
7484574775
if( testAddr ){
74846
- sqlite3VdbeJumpHere(v, testAddr-1);
74776
+ sqlite3VdbeJumpHere(v, testAddr);
7484774777
}
7484874778
sqlite3ExprCachePop(pParse, 1);
7484974779
7485074780
return rReg;
7485174781
}
@@ -76835,11 +76765,10 @@
7683576765
}
7683676766
}
7683776767
7683876768
/************** End of expr.c ************************************************/
7683976769
/************** Begin file alter.c *******************************************/
76840
-#line 1 "tsrc/alter.c"
7684176770
/*
7684276771
** 2005 February 15
7684376772
**
7684476773
** The author disclaims copyright to this source code. In place of
7684576774
** a legal notice, here is a blessing:
@@ -77664,11 +77593,10 @@
7766477593
}
7766577594
#endif /* SQLITE_ALTER_TABLE */
7766677595
7766777596
/************** End of alter.c ***********************************************/
7766877597
/************** Begin file analyze.c *****************************************/
77669
-#line 1 "tsrc/analyze.c"
7767077598
/*
7767177599
** 2005 July 8
7767277600
**
7767377601
** The author disclaims copyright to this source code. In place of
7767477602
** a legal notice, here is a blessing:
@@ -78386,11 +78314,10 @@
7838678314
7838778315
#endif /* SQLITE_OMIT_ANALYZE */
7838878316
7838978317
/************** End of analyze.c *********************************************/
7839078318
/************** Begin file attach.c ******************************************/
78391
-#line 1 "tsrc/attach.c"
7839278319
/*
7839378320
** 2003 April 6
7839478321
**
7839578322
** The author disclaims copyright to this source code. In place of
7839678323
** a legal notice, here is a blessing:
@@ -78946,11 +78873,10 @@
7894678873
}
7894778874
#endif
7894878875
7894978876
/************** End of attach.c **********************************************/
7895078877
/************** Begin file auth.c ********************************************/
78951
-#line 1 "tsrc/auth.c"
7895278878
/*
7895378879
** 2003 January 11
7895478880
**
7895578881
** The author disclaims copyright to this source code. In place of
7895678882
** a legal notice, here is a blessing:
@@ -79198,11 +79124,10 @@
7919879124
7919979125
#endif /* SQLITE_OMIT_AUTHORIZATION */
7920079126
7920179127
/************** End of auth.c ************************************************/
7920279128
/************** Begin file build.c *******************************************/
79203
-#line 1 "tsrc/build.c"
7920479129
/*
7920579130
** 2001 September 15
7920679131
**
7920779132
** The author disclaims copyright to this source code. In place of
7920879133
** a legal notice, here is a blessing:
@@ -83002,11 +82927,10 @@
8300282927
return pKey;
8300382928
}
8300482929
8300582930
/************** End of build.c ***********************************************/
8300682931
/************** Begin file callback.c ****************************************/
83007
-#line 1 "tsrc/callback.c"
8300882932
/*
8300982933
** 2005 May 23
8301082934
**
8301182935
** The author disclaims copyright to this source code. In place of
8301282936
** a legal notice, here is a blessing:
@@ -83462,11 +83386,10 @@
8346283386
return p;
8346383387
}
8346483388
8346583389
/************** End of callback.c ********************************************/
8346683390
/************** Begin file delete.c ******************************************/
83467
-#line 1 "tsrc/delete.c"
8346883391
/*
8346983392
** 2001 September 15
8347083393
**
8347183394
** The author disclaims copyright to this source code. In place of
8347283395
** a legal notice, here is a blessing:
@@ -84117,11 +84040,10 @@
8411784040
return regBase;
8411884041
}
8411984042
8412084043
/************** End of delete.c **********************************************/
8412184044
/************** Begin file func.c ********************************************/
84122
-#line 1 "tsrc/func.c"
8412384045
/*
8412484046
** 2002 February 23
8412584047
**
8412684048
** The author disclaims copyright to this source code. In place of
8412784049
** a legal notice, here is a blessing:
@@ -85726,11 +85648,10 @@
8572685648
#endif
8572785649
}
8572885650
8572985651
/************** End of func.c ************************************************/
8573085652
/************** Begin file fkey.c ********************************************/
85731
-#line 1 "tsrc/fkey.c"
8573285653
/*
8573385654
**
8573485655
** The author disclaims copyright to this source code. In place of
8573585656
** a legal notice, here is a blessing:
8573685657
**
@@ -86947,11 +86868,10 @@
8694786868
}
8694886869
#endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */
8694986870
8695086871
/************** End of fkey.c ************************************************/
8695186872
/************** Begin file insert.c ******************************************/
86952
-#line 1 "tsrc/insert.c"
8695386873
/*
8695486874
** 2001 September 15
8695586875
**
8695686876
** The author disclaims copyright to this source code. In place of
8695786877
** a legal notice, here is a blessing:
@@ -88793,11 +88713,10 @@
8879388713
}
8879488714
#endif /* SQLITE_OMIT_XFER_OPT */
8879588715
8879688716
/************** End of insert.c **********************************************/
8879788717
/************** Begin file legacy.c ******************************************/
88798
-#line 1 "tsrc/legacy.c"
8879988718
/*
8880088719
** 2001 September 15
8880188720
**
8880288721
** The author disclaims copyright to this source code. In place of
8880388722
** a legal notice, here is a blessing:
@@ -88941,11 +88860,10 @@
8894188860
return rc;
8894288861
}
8894388862
8894488863
/************** End of legacy.c **********************************************/
8894588864
/************** Begin file loadext.c *****************************************/
88946
-#line 1 "tsrc/loadext.c"
8894788865
/*
8894888866
** 2006 June 7
8894988867
**
8895088868
** The author disclaims copyright to this source code. In place of
8895188869
** a legal notice, here is a blessing:
@@ -88962,11 +88880,10 @@
8896288880
#ifndef SQLITE_CORE
8896388881
#define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */
8896488882
#endif
8896588883
/************** Include sqlite3ext.h in the middle of loadext.c **************/
8896688884
/************** Begin file sqlite3ext.h **************************************/
88967
-#line 1 "tsrc/sqlite3ext.h"
8896888885
/*
8896988886
** 2006 June 7
8897088887
**
8897188888
** The author disclaims copyright to this source code. In place of
8897288889
** a legal notice, here is a blessing:
@@ -89391,11 +89308,10 @@
8939189308
8939289309
#endif /* _SQLITE3EXT_H_ */
8939389310
8939489311
/************** End of sqlite3ext.h ******************************************/
8939589312
/************** Continuing where we left off in loadext.c ********************/
89396
-#line 20 "tsrc/loadext.c"
8939789313
/* #include <string.h> */
8939889314
8939989315
#ifndef SQLITE_OMIT_LOAD_EXTENSION
8940089316
8940189317
/*
@@ -90031,11 +89947,10 @@
9003189947
}
9003289948
}
9003389949
9003489950
/************** End of loadext.c *********************************************/
9003589951
/************** Begin file pragma.c ******************************************/
90036
-#line 1 "tsrc/pragma.c"
9003789952
/*
9003889953
** 2003 April 6
9003989954
**
9004089955
** The author disclaims copyright to this source code. In place of
9004189956
** a legal notice, here is a blessing:
@@ -91560,11 +91475,10 @@
9156091475
9156191476
#endif /* SQLITE_OMIT_PRAGMA */
9156291477
9156391478
/************** End of pragma.c **********************************************/
9156491479
/************** Begin file prepare.c *****************************************/
91565
-#line 1 "tsrc/prepare.c"
9156691480
/*
9156791481
** 2005 May 25
9156891482
**
9156991483
** The author disclaims copyright to this source code. In place of
9157091484
** a legal notice, here is a blessing:
@@ -92421,11 +92335,10 @@
9242192335
9242292336
#endif /* SQLITE_OMIT_UTF16 */
9242392337
9242492338
/************** End of prepare.c *********************************************/
9242592339
/************** Begin file select.c ******************************************/
92426
-#line 1 "tsrc/select.c"
9242792340
/*
9242892341
** 2001 September 15
9242992342
**
9243092343
** The author disclaims copyright to this source code. In place of
9243192344
** a legal notice, here is a blessing:
@@ -92512,10 +92425,12 @@
9251292425
pNew->addrOpenEphm[2] = -1;
9251392426
if( db->mallocFailed ) {
9251492427
clearSelect(db, pNew);
9251592428
if( pNew!=&standin ) sqlite3DbFree(db, pNew);
9251692429
pNew = 0;
92430
+ }else{
92431
+ assert( pNew->pSrc!=0 || pParse->nErr>0 );
9251792432
}
9251892433
return pNew;
9251992434
}
9252092435
9252192436
/*
@@ -96224,11 +96139,15 @@
9622496139
struct SrcList_item *pItem = &pTabList->a[i];
9622596140
SelectDest dest;
9622696141
Select *pSub = pItem->pSelect;
9622796142
int isAggSub;
9622896143
96229
- if( pSub==0 || pItem->isPopulated ) continue;
96144
+ if( pSub==0 ) continue;
96145
+ if( pItem->addrFillSub ){
96146
+ sqlite3VdbeAddOp2(v, OP_Gosub, pItem->regReturn, pItem->addrFillSub);
96147
+ continue;
96148
+ }
9623096149
9623196150
/* Increment Parse.nHeight by the height of the largest expression
9623296151
** tree refered to by this, the parent select. The child select
9623396152
** may contain expression trees of at most
9623496153
** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit
@@ -96235,25 +96154,48 @@
9623596154
** more conservative than necessary, but much easier than enforcing
9623696155
** an exact limit.
9623796156
*/
9623896157
pParse->nHeight += sqlite3SelectExprHeight(p);
9623996158
96240
- /* Check to see if the subquery can be absorbed into the parent. */
9624196159
isAggSub = (pSub->selFlags & SF_Aggregate)!=0;
9624296160
if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){
96161
+ /* This subquery can be absorbed into its parent. */
9624396162
if( isAggSub ){
9624496163
isAgg = 1;
9624596164
p->selFlags |= SF_Aggregate;
9624696165
}
9624796166
i = -1;
9624896167
}else{
96168
+ /* Generate a subroutine that will fill an ephemeral table with
96169
+ ** the content of this subquery. pItem->addrFillSub will point
96170
+ ** to the address of the generated subroutine. pItem->regReturn
96171
+ ** is a register allocated to hold the subroutine return address
96172
+ */
96173
+ int topAddr;
96174
+ int onceAddr = 0;
96175
+ int retAddr;
96176
+ assert( pItem->addrFillSub==0 );
96177
+ pItem->regReturn = ++pParse->nMem;
96178
+ topAddr = sqlite3VdbeAddOp2(v, OP_Integer, 0, pItem->regReturn);
96179
+ pItem->addrFillSub = topAddr+1;
96180
+ VdbeNoopComment((v, "materialize %s", pItem->pTab->zName));
96181
+ if( pItem->isCorrelated==0 && pParse->pTriggerTab==0 ){
96182
+ /* If the subquery is no correlated and if we are not inside of
96183
+ ** a trigger, then we only need to compute the value of the subquery
96184
+ ** once. */
96185
+ int regOnce = ++pParse->nMem;
96186
+ onceAddr = sqlite3VdbeAddOp1(v, OP_Once, regOnce);
96187
+ }
9624996188
sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor);
96250
- assert( pItem->isPopulated==0 );
9625196189
explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId);
9625296190
sqlite3Select(pParse, pSub, &dest);
96253
- pItem->isPopulated = 1;
9625496191
pItem->pTab->nRowEst = (unsigned)pSub->nSelectRow;
96192
+ if( onceAddr ) sqlite3VdbeJumpHere(v, onceAddr);
96193
+ retAddr = sqlite3VdbeAddOp1(v, OP_Return, pItem->regReturn);
96194
+ VdbeComment((v, "end %s", pItem->pTab->zName));
96195
+ sqlite3VdbeChangeP1(v, topAddr, retAddr);
96196
+
9625596197
}
9625696198
if( /*pParse->nErr ||*/ db->mallocFailed ){
9625796199
goto select_end;
9625896200
}
9625996201
pParse->nHeight -= sqlite3SelectExprHeight(p);
@@ -96390,11 +96332,11 @@
9639096332
/* If sorting index that was created by a prior OP_OpenEphemeral
9639196333
** instruction ended up not being needed, then change the OP_OpenEphemeral
9639296334
** into an OP_Noop.
9639396335
*/
9639496336
if( addrSortIndex>=0 && pOrderBy==0 ){
96395
- sqlite3VdbeChangeToNoop(v, addrSortIndex, 1);
96337
+ sqlite3VdbeChangeToNoop(v, addrSortIndex);
9639696338
p->addrOpenEphm[2] = -1;
9639796339
}
9639896340
9639996341
if( pWInfo->eDistinct ){
9640096342
VdbeOp *pOp; /* No longer required OpenEphemeral instr. */
@@ -96673,11 +96615,11 @@
9667396615
*/
9667496616
if( groupBySort ){
9667596617
sqlite3VdbeAddOp2(v, OP_SorterNext, sAggInfo.sortingIdx, addrTopOfLoop);
9667696618
}else{
9667796619
sqlite3WhereEnd(pWInfo);
96678
- sqlite3VdbeChangeToNoop(v, addrSortingIdx, 1);
96620
+ sqlite3VdbeChangeToNoop(v, addrSortingIdx);
9667996621
}
9668096622
9668196623
/* Output the final row of result
9668296624
*/
9668396625
sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow);
@@ -96981,11 +96923,10 @@
9698196923
*****************************************************************************/
9698296924
#endif /* defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */
9698396925
9698496926
/************** End of select.c **********************************************/
9698596927
/************** Begin file table.c *******************************************/
96986
-#line 1 "tsrc/table.c"
9698796928
/*
9698896929
** 2001 September 15
9698996930
**
9699096931
** The author disclaims copyright to this source code. In place of
9699196932
** a legal notice, here is a blessing:
@@ -97181,11 +97122,10 @@
9718197122
9718297123
#endif /* SQLITE_OMIT_GET_TABLE */
9718397124
9718497125
/************** End of table.c ***********************************************/
9718597126
/************** Begin file trigger.c *****************************************/
97186
-#line 1 "tsrc/trigger.c"
9718797127
/*
9718897128
**
9718997129
** The author disclaims copyright to this source code. In place of
9719097130
** a legal notice, here is a blessing:
9719197131
**
@@ -98307,11 +98247,10 @@
9830798247
9830898248
#endif /* !defined(SQLITE_OMIT_TRIGGER) */
9830998249
9831098250
/************** End of trigger.c *********************************************/
9831198251
/************** Begin file update.c ******************************************/
98312
-#line 1 "tsrc/update.c"
9831398252
/*
9831498253
** 2001 September 15
9831598254
**
9831698255
** The author disclaims copyright to this source code. In place of
9831798256
** a legal notice, here is a blessing:
@@ -98980,11 +98919,10 @@
9898098919
}
9898198920
#endif /* SQLITE_OMIT_VIRTUALTABLE */
9898298921
9898398922
/************** End of update.c **********************************************/
9898498923
/************** Begin file vacuum.c ******************************************/
98985
-#line 1 "tsrc/vacuum.c"
9898698924
/*
9898798925
** 2003 April 6
9898898926
**
9898998927
** The author disclaims copyright to this source code. In place of
9899098928
** a legal notice, here is a blessing:
@@ -99327,11 +99265,10 @@
9932799265
9932899266
#endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */
9932999267
9933099268
/************** End of vacuum.c **********************************************/
9933199269
/************** Begin file vtab.c ********************************************/
99332
-#line 1 "tsrc/vtab.c"
9933399270
/*
9933499271
** 2006 June 10
9933599272
**
9933699273
** The author disclaims copyright to this source code. In place of
9933799274
** a legal notice, here is a blessing:
@@ -100396,11 +100333,10 @@
100396100333
100397100334
#endif /* SQLITE_OMIT_VIRTUALTABLE */
100398100335
100399100336
/************** End of vtab.c ************************************************/
100400100337
/************** Begin file where.c *******************************************/
100401
-#line 1 "tsrc/where.c"
100402100338
/*
100403100339
** 2001 September 15
100404100340
**
100405100341
** The author disclaims copyright to this source code. In place of
100406100342
** a legal notice, here is a blessing:
@@ -100865,15 +100801,23 @@
100865100801
return mask;
100866100802
}
100867100803
static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){
100868100804
Bitmask mask = 0;
100869100805
while( pS ){
100806
+ SrcList *pSrc = pS->pSrc;
100870100807
mask |= exprListTableUsage(pMaskSet, pS->pEList);
100871100808
mask |= exprListTableUsage(pMaskSet, pS->pGroupBy);
100872100809
mask |= exprListTableUsage(pMaskSet, pS->pOrderBy);
100873100810
mask |= exprTableUsage(pMaskSet, pS->pWhere);
100874100811
mask |= exprTableUsage(pMaskSet, pS->pHaving);
100812
+ if( ALWAYS(pSrc!=0) ){
100813
+ int i;
100814
+ for(i=0; i<pSrc->nSrc; i++){
100815
+ mask |= exprSelectTableUsage(pMaskSet, pSrc->a[i].pSelect);
100816
+ mask |= exprTableUsage(pMaskSet, pSrc->a[i].pOn);
100817
+ }
100818
+ }
100875100819
pS = pS->pPrior;
100876100820
}
100877100821
return mask;
100878100822
}
100879100823
@@ -102392,12 +102336,11 @@
102392102336
/* Generate code to skip over the creation and initialization of the
102393102337
** transient index on 2nd and subsequent iterations of the loop. */
102394102338
v = pParse->pVdbe;
102395102339
assert( v!=0 );
102396102340
regIsInit = ++pParse->nMem;
102397
- addrInit = sqlite3VdbeAddOp1(v, OP_If, regIsInit);
102398
- sqlite3VdbeAddOp2(v, OP_Integer, 1, regIsInit);
102341
+ addrInit = sqlite3VdbeAddOp1(v, OP_Once, regIsInit);
102399102342
102400102343
/* Count the number of columns that will be added to the index
102401102344
** and used to match WHERE clause constraints */
102402102345
nColumn = 0;
102403102346
pTable = pSrc->pTab;
@@ -105583,11 +105526,10 @@
105583105526
return;
105584105527
}
105585105528
105586105529
/************** End of where.c ***********************************************/
105587105530
/************** Begin file parse.c *******************************************/
105588
-#line 1 "tsrc/parse.c"
105589105531
/* Driver template for the LEMON parser generator.
105590105532
** The author disclaims copyright to this source code.
105591105533
**
105592105534
** This version of "lempar.c" is modified, slightly, for use by SQLite.
105593105535
** The only modifications are the addition of a couple of NEVER()
@@ -105596,11 +105538,10 @@
105596105538
** specific grammar used by SQLite.
105597105539
*/
105598105540
/* First off, code is included that follows the "include" declaration
105599105541
** in the input grammar file. */
105600105542
/* #include <stdio.h> */
105601
-#line 51 "parse.y"
105602105543
105603105544
105604105545
/*
105605105546
** Disable all error recovery processing in the parser push-down
105606105547
** automaton.
@@ -105644,11 +105585,10 @@
105644105585
/*
105645105586
** An instance of this structure holds the ATTACH key and the key type.
105646105587
*/
105647105588
struct AttachKey { int type; Token key; };
105648105589
105649
-#line 722 "parse.y"
105650105590
105651105591
/* This is a utility routine used to set the ExprSpan.zStart and
105652105592
** ExprSpan.zEnd values of pOut so that the span covers the complete
105653105593
** range of text beginning with pStart and going to the end of pEnd.
105654105594
*/
@@ -105664,11 +105604,10 @@
105664105604
static void spanExpr(ExprSpan *pOut, Parse *pParse, int op, Token *pValue){
105665105605
pOut->pExpr = sqlite3PExpr(pParse, op, 0, 0, pValue);
105666105606
pOut->zStart = pValue->z;
105667105607
pOut->zEnd = &pValue->z[pValue->n];
105668105608
}
105669
-#line 817 "parse.y"
105670105609
105671105610
/* This routine constructs a binary expression node out of two ExprSpan
105672105611
** objects and uses the result to populate a new ExprSpan object.
105673105612
*/
105674105613
static void spanBinaryExpr(
@@ -105680,11 +105619,10 @@
105680105619
){
105681105620
pOut->pExpr = sqlite3PExpr(pParse, op, pLeft->pExpr, pRight->pExpr, 0);
105682105621
pOut->zStart = pLeft->zStart;
105683105622
pOut->zEnd = pRight->zEnd;
105684105623
}
105685
-#line 873 "parse.y"
105686105624
105687105625
/* Construct an expression node for a unary postfix operator
105688105626
*/
105689105627
static void spanUnaryPostfix(
105690105628
ExprSpan *pOut, /* Write the new expression node here */
@@ -105695,11 +105633,10 @@
105695105633
){
105696105634
pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0);
105697105635
pOut->zStart = pOperand->zStart;
105698105636
pOut->zEnd = &pPostOp->z[pPostOp->n];
105699105637
}
105700
-#line 892 "parse.y"
105701105638
105702105639
/* A routine to convert a binary TK_IS or TK_ISNOT expression into a
105703105640
** unary TK_ISNULL or TK_NOTNULL expression. */
105704105641
static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
105705105642
sqlite3 *db = pParse->db;
@@ -105707,11 +105644,10 @@
105707105644
pA->op = (u8)op;
105708105645
sqlite3ExprDelete(db, pA->pRight);
105709105646
pA->pRight = 0;
105710105647
}
105711105648
}
105712
-#line 920 "parse.y"
105713105649
105714105650
/* Construct an expression node for a unary prefix operator
105715105651
*/
105716105652
static void spanUnaryPrefix(
105717105653
ExprSpan *pOut, /* Write the new expression node here */
@@ -105722,11 +105658,10 @@
105722105658
){
105723105659
pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0);
105724105660
pOut->zStart = pPreOp->z;
105725105661
pOut->zEnd = pOperand->zEnd;
105726105662
}
105727
-#line 141 "parse.c"
105728105663
/* Next is all token values, in a form suitable for use by makeheaders.
105729105664
** This section will be null unless lemon is run with the -m switch.
105730105665
*/
105731105666
/*
105732105667
** These constants (all generated automatically by the parser generator)
@@ -106978,21 +106913,17 @@
106978106913
** inside the C code.
106979106914
*/
106980106915
case 160: /* select */
106981106916
case 194: /* oneselect */
106982106917
{
106983
-#line 403 "parse.y"
106984106918
sqlite3SelectDelete(pParse->db, (yypminor->yy387));
106985
-#line 1399 "parse.c"
106986106919
}
106987106920
break;
106988106921
case 174: /* term */
106989106922
case 175: /* expr */
106990106923
{
106991
-#line 720 "parse.y"
106992106924
sqlite3ExprDelete(pParse->db, (yypminor->yy118).pExpr);
106993
-#line 1407 "parse.c"
106994106925
}
106995106926
break;
106996106927
case 179: /* idxlist_opt */
106997106928
case 187: /* idxlist */
106998106929
case 197: /* selcollist */
@@ -107004,23 +106935,19 @@
107004106935
case 217: /* setlist */
107005106936
case 220: /* itemlist */
107006106937
case 221: /* exprlist */
107007106938
case 226: /* case_exprlist */
107008106939
{
107009
-#line 1103 "parse.y"
107010106940
sqlite3ExprListDelete(pParse->db, (yypminor->yy322));
107011
-#line 1425 "parse.c"
107012106941
}
107013106942
break;
107014106943
case 193: /* fullname */
107015106944
case 198: /* from */
107016106945
case 206: /* seltablist */
107017106946
case 207: /* stl_prefix */
107018106947
{
107019
-#line 534 "parse.y"
107020106948
sqlite3SrcListDelete(pParse->db, (yypminor->yy259));
107021
-#line 1435 "parse.c"
107022106949
}
107023106950
break;
107024106951
case 199: /* where_opt */
107025106952
case 201: /* having_opt */
107026106953
case 210: /* on_opt */
@@ -107028,37 +106955,29 @@
107028106955
case 225: /* case_operand */
107029106956
case 227: /* case_else */
107030106957
case 238: /* when_clause */
107031106958
case 243: /* key_opt */
107032106959
{
107033
-#line 644 "parse.y"
107034106960
sqlite3ExprDelete(pParse->db, (yypminor->yy314));
107035
-#line 1449 "parse.c"
107036106961
}
107037106962
break;
107038106963
case 211: /* using_opt */
107039106964
case 213: /* inscollist */
107040106965
case 219: /* inscollist_opt */
107041106966
{
107042
-#line 566 "parse.y"
107043106967
sqlite3IdListDelete(pParse->db, (yypminor->yy384));
107044
-#line 1458 "parse.c"
107045106968
}
107046106969
break;
107047106970
case 234: /* trigger_cmd_list */
107048106971
case 239: /* trigger_cmd */
107049106972
{
107050
-#line 1210 "parse.y"
107051106973
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy203));
107052
-#line 1466 "parse.c"
107053106974
}
107054106975
break;
107055106976
case 236: /* trigger_event */
107056106977
{
107057
-#line 1196 "parse.y"
107058106978
sqlite3IdListDelete(pParse->db, (yypminor->yy90).b);
107059
-#line 1473 "parse.c"
107060106979
}
107061106980
break;
107062106981
default: break; /* If no destructor action specified: do nothing */
107063106982
}
107064106983
}
@@ -107240,16 +107159,14 @@
107240107159
}
107241107160
#endif
107242107161
while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
107243107162
/* Here code is inserted which will execute if the parser
107244107163
** stack every overflows */
107245
-#line 38 "parse.y"
107246107164
107247107165
UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */
107248107166
sqlite3ErrorMsg(pParse, "parser stack overflow");
107249107167
pParse->parseError = 1;
107250
-#line 1664 "parse.c"
107251107168
sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
107252107169
}
107253107170
107254107171
/*
107255107172
** Perform a shift action.
@@ -107686,94 +107603,66 @@
107686107603
** { ... } // User supplied code
107687107604
** #line <lineno> <thisfile>
107688107605
** break;
107689107606
*/
107690107607
case 5: /* explain ::= */
107691
-#line 107 "parse.y"
107692107608
{ sqlite3BeginParse(pParse, 0); }
107693
-#line 2107 "parse.c"
107694107609
break;
107695107610
case 6: /* explain ::= EXPLAIN */
107696
-#line 109 "parse.y"
107697107611
{ sqlite3BeginParse(pParse, 1); }
107698
-#line 2112 "parse.c"
107699107612
break;
107700107613
case 7: /* explain ::= EXPLAIN QUERY PLAN */
107701
-#line 110 "parse.y"
107702107614
{ sqlite3BeginParse(pParse, 2); }
107703
-#line 2117 "parse.c"
107704107615
break;
107705107616
case 8: /* cmdx ::= cmd */
107706
-#line 112 "parse.y"
107707107617
{ sqlite3FinishCoding(pParse); }
107708
-#line 2122 "parse.c"
107709107618
break;
107710107619
case 9: /* cmd ::= BEGIN transtype trans_opt */
107711
-#line 117 "parse.y"
107712107620
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy4);}
107713
-#line 2127 "parse.c"
107714107621
break;
107715107622
case 13: /* transtype ::= */
107716
-#line 122 "parse.y"
107717107623
{yygotominor.yy4 = TK_DEFERRED;}
107718
-#line 2132 "parse.c"
107719107624
break;
107720107625
case 14: /* transtype ::= DEFERRED */
107721107626
case 15: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==15);
107722107627
case 16: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==16);
107723107628
case 115: /* multiselect_op ::= UNION */ yytestcase(yyruleno==115);
107724107629
case 117: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==117);
107725
-#line 123 "parse.y"
107726107630
{yygotominor.yy4 = yymsp[0].major;}
107727
-#line 2141 "parse.c"
107728107631
break;
107729107632
case 17: /* cmd ::= COMMIT trans_opt */
107730107633
case 18: /* cmd ::= END trans_opt */ yytestcase(yyruleno==18);
107731
-#line 126 "parse.y"
107732107634
{sqlite3CommitTransaction(pParse);}
107733
-#line 2147 "parse.c"
107734107635
break;
107735107636
case 19: /* cmd ::= ROLLBACK trans_opt */
107736
-#line 128 "parse.y"
107737107637
{sqlite3RollbackTransaction(pParse);}
107738
-#line 2152 "parse.c"
107739107638
break;
107740107639
case 22: /* cmd ::= SAVEPOINT nm */
107741
-#line 132 "parse.y"
107742107640
{
107743107641
sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
107744107642
}
107745
-#line 2159 "parse.c"
107746107643
break;
107747107644
case 23: /* cmd ::= RELEASE savepoint_opt nm */
107748
-#line 135 "parse.y"
107749107645
{
107750107646
sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
107751107647
}
107752
-#line 2166 "parse.c"
107753107648
break;
107754107649
case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
107755
-#line 138 "parse.y"
107756107650
{
107757107651
sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
107758107652
}
107759
-#line 2173 "parse.c"
107760107653
break;
107761107654
case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
107762
-#line 145 "parse.y"
107763107655
{
107764107656
sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy4,0,0,yymsp[-2].minor.yy4);
107765107657
}
107766
-#line 2180 "parse.c"
107767107658
break;
107768107659
case 27: /* createkw ::= CREATE */
107769
-#line 148 "parse.y"
107770107660
{
107771107661
pParse->db->lookaside.bEnabled = 0;
107772107662
yygotominor.yy0 = yymsp[0].minor.yy0;
107773107663
}
107774
-#line 2188 "parse.c"
107775107664
break;
107776107665
case 28: /* ifnotexists ::= */
107777107666
case 31: /* temp ::= */ yytestcase(yyruleno==31);
107778107667
case 70: /* autoinc ::= */ yytestcase(yyruleno==70);
107779107668
case 83: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==83);
@@ -107783,56 +107672,44 @@
107783107672
case 109: /* ifexists ::= */ yytestcase(yyruleno==109);
107784107673
case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120);
107785107674
case 121: /* distinct ::= */ yytestcase(yyruleno==121);
107786107675
case 222: /* between_op ::= BETWEEN */ yytestcase(yyruleno==222);
107787107676
case 225: /* in_op ::= IN */ yytestcase(yyruleno==225);
107788
-#line 153 "parse.y"
107789107677
{yygotominor.yy4 = 0;}
107790
-#line 2204 "parse.c"
107791107678
break;
107792107679
case 29: /* ifnotexists ::= IF NOT EXISTS */
107793107680
case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30);
107794107681
case 71: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==71);
107795107682
case 86: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==86);
107796107683
case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108);
107797107684
case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119);
107798107685
case 223: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==223);
107799107686
case 226: /* in_op ::= NOT IN */ yytestcase(yyruleno==226);
107800
-#line 154 "parse.y"
107801107687
{yygotominor.yy4 = 1;}
107802
-#line 2216 "parse.c"
107803107688
break;
107804107689
case 32: /* create_table_args ::= LP columnlist conslist_opt RP */
107805
-#line 160 "parse.y"
107806107690
{
107807107691
sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0);
107808107692
}
107809
-#line 2223 "parse.c"
107810107693
break;
107811107694
case 33: /* create_table_args ::= AS select */
107812
-#line 163 "parse.y"
107813107695
{
107814107696
sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy387);
107815107697
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387);
107816107698
}
107817
-#line 2231 "parse.c"
107818107699
break;
107819107700
case 36: /* column ::= columnid type carglist */
107820
-#line 175 "parse.y"
107821107701
{
107822107702
yygotominor.yy0.z = yymsp[-2].minor.yy0.z;
107823107703
yygotominor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n;
107824107704
}
107825
-#line 2239 "parse.c"
107826107705
break;
107827107706
case 37: /* columnid ::= nm */
107828
-#line 179 "parse.y"
107829107707
{
107830107708
sqlite3AddColumn(pParse,&yymsp[0].minor.yy0);
107831107709
yygotominor.yy0 = yymsp[0].minor.yy0;
107832107710
}
107833
-#line 2247 "parse.c"
107834107711
break;
107835107712
case 38: /* id ::= ID */
107836107713
case 39: /* id ::= INDEXED */ yytestcase(yyruleno==39);
107837107714
case 40: /* ids ::= ID|STRING */ yytestcase(yyruleno==40);
107838107715
case 41: /* nm ::= id */ yytestcase(yyruleno==41);
@@ -107852,373 +107729,256 @@
107852107729
case 264: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==264);
107853107730
case 265: /* plus_num ::= plus_opt number */ yytestcase(yyruleno==265);
107854107731
case 266: /* minus_num ::= MINUS number */ yytestcase(yyruleno==266);
107855107732
case 267: /* number ::= INTEGER|FLOAT */ yytestcase(yyruleno==267);
107856107733
case 285: /* trnm ::= nm */ yytestcase(yyruleno==285);
107857
-#line 189 "parse.y"
107858107734
{yygotominor.yy0 = yymsp[0].minor.yy0;}
107859
-#line 2273 "parse.c"
107860107735
break;
107861107736
case 45: /* type ::= typetoken */
107862
-#line 251 "parse.y"
107863107737
{sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);}
107864
-#line 2278 "parse.c"
107865107738
break;
107866107739
case 47: /* typetoken ::= typename LP signed RP */
107867
-#line 253 "parse.y"
107868107740
{
107869107741
yygotominor.yy0.z = yymsp[-3].minor.yy0.z;
107870107742
yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
107871107743
}
107872
-#line 2286 "parse.c"
107873107744
break;
107874107745
case 48: /* typetoken ::= typename LP signed COMMA signed RP */
107875
-#line 257 "parse.y"
107876107746
{
107877107747
yygotominor.yy0.z = yymsp[-5].minor.yy0.z;
107878107748
yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
107879107749
}
107880
-#line 2294 "parse.c"
107881107750
break;
107882107751
case 50: /* typename ::= typename ids */
107883
-#line 263 "parse.y"
107884107752
{yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
107885
-#line 2299 "parse.c"
107886107753
break;
107887107754
case 57: /* ccons ::= DEFAULT term */
107888107755
case 59: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==59);
107889
-#line 274 "parse.y"
107890107756
{sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy118);}
107891
-#line 2305 "parse.c"
107892107757
break;
107893107758
case 58: /* ccons ::= DEFAULT LP expr RP */
107894
-#line 275 "parse.y"
107895107759
{sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy118);}
107896
-#line 2310 "parse.c"
107897107760
break;
107898107761
case 60: /* ccons ::= DEFAULT MINUS term */
107899
-#line 277 "parse.y"
107900107762
{
107901107763
ExprSpan v;
107902107764
v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy118.pExpr, 0, 0);
107903107765
v.zStart = yymsp[-1].minor.yy0.z;
107904107766
v.zEnd = yymsp[0].minor.yy118.zEnd;
107905107767
sqlite3AddDefaultValue(pParse,&v);
107906107768
}
107907
-#line 2321 "parse.c"
107908107769
break;
107909107770
case 61: /* ccons ::= DEFAULT id */
107910
-#line 284 "parse.y"
107911107771
{
107912107772
ExprSpan v;
107913107773
spanExpr(&v, pParse, TK_STRING, &yymsp[0].minor.yy0);
107914107774
sqlite3AddDefaultValue(pParse,&v);
107915107775
}
107916
-#line 2330 "parse.c"
107917107776
break;
107918107777
case 63: /* ccons ::= NOT NULL onconf */
107919
-#line 294 "parse.y"
107920107778
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy4);}
107921
-#line 2335 "parse.c"
107922107779
break;
107923107780
case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
107924
-#line 296 "parse.y"
107925107781
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy4,yymsp[0].minor.yy4,yymsp[-2].minor.yy4);}
107926
-#line 2340 "parse.c"
107927107782
break;
107928107783
case 65: /* ccons ::= UNIQUE onconf */
107929
-#line 297 "parse.y"
107930107784
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy4,0,0,0,0);}
107931
-#line 2345 "parse.c"
107932107785
break;
107933107786
case 66: /* ccons ::= CHECK LP expr RP */
107934
-#line 298 "parse.y"
107935107787
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy118.pExpr);}
107936
-#line 2350 "parse.c"
107937107788
break;
107938107789
case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */
107939
-#line 300 "parse.y"
107940107790
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy322,yymsp[0].minor.yy4);}
107941
-#line 2355 "parse.c"
107942107791
break;
107943107792
case 68: /* ccons ::= defer_subclause */
107944
-#line 301 "parse.y"
107945107793
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy4);}
107946
-#line 2360 "parse.c"
107947107794
break;
107948107795
case 69: /* ccons ::= COLLATE ids */
107949
-#line 302 "parse.y"
107950107796
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
107951
-#line 2365 "parse.c"
107952107797
break;
107953107798
case 72: /* refargs ::= */
107954
-#line 315 "parse.y"
107955107799
{ yygotominor.yy4 = OE_None*0x0101; /* EV: R-19803-45884 */}
107956
-#line 2370 "parse.c"
107957107800
break;
107958107801
case 73: /* refargs ::= refargs refarg */
107959
-#line 316 "parse.y"
107960107802
{ yygotominor.yy4 = (yymsp[-1].minor.yy4 & ~yymsp[0].minor.yy215.mask) | yymsp[0].minor.yy215.value; }
107961
-#line 2375 "parse.c"
107962107803
break;
107963107804
case 74: /* refarg ::= MATCH nm */
107964107805
case 75: /* refarg ::= ON INSERT refact */ yytestcase(yyruleno==75);
107965
-#line 318 "parse.y"
107966107806
{ yygotominor.yy215.value = 0; yygotominor.yy215.mask = 0x000000; }
107967
-#line 2381 "parse.c"
107968107807
break;
107969107808
case 76: /* refarg ::= ON DELETE refact */
107970
-#line 320 "parse.y"
107971107809
{ yygotominor.yy215.value = yymsp[0].minor.yy4; yygotominor.yy215.mask = 0x0000ff; }
107972
-#line 2386 "parse.c"
107973107810
break;
107974107811
case 77: /* refarg ::= ON UPDATE refact */
107975
-#line 321 "parse.y"
107976107812
{ yygotominor.yy215.value = yymsp[0].minor.yy4<<8; yygotominor.yy215.mask = 0x00ff00; }
107977
-#line 2391 "parse.c"
107978107813
break;
107979107814
case 78: /* refact ::= SET NULL */
107980
-#line 323 "parse.y"
107981107815
{ yygotominor.yy4 = OE_SetNull; /* EV: R-33326-45252 */}
107982
-#line 2396 "parse.c"
107983107816
break;
107984107817
case 79: /* refact ::= SET DEFAULT */
107985
-#line 324 "parse.y"
107986107818
{ yygotominor.yy4 = OE_SetDflt; /* EV: R-33326-45252 */}
107987
-#line 2401 "parse.c"
107988107819
break;
107989107820
case 80: /* refact ::= CASCADE */
107990
-#line 325 "parse.y"
107991107821
{ yygotominor.yy4 = OE_Cascade; /* EV: R-33326-45252 */}
107992
-#line 2406 "parse.c"
107993107822
break;
107994107823
case 81: /* refact ::= RESTRICT */
107995
-#line 326 "parse.y"
107996107824
{ yygotominor.yy4 = OE_Restrict; /* EV: R-33326-45252 */}
107997
-#line 2411 "parse.c"
107998107825
break;
107999107826
case 82: /* refact ::= NO ACTION */
108000
-#line 327 "parse.y"
108001107827
{ yygotominor.yy4 = OE_None; /* EV: R-33326-45252 */}
108002
-#line 2416 "parse.c"
108003107828
break;
108004107829
case 84: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
108005107830
case 99: /* defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==99);
108006107831
case 101: /* onconf ::= ON CONFLICT resolvetype */ yytestcase(yyruleno==101);
108007107832
case 104: /* resolvetype ::= raisetype */ yytestcase(yyruleno==104);
108008
-#line 330 "parse.y"
108009107833
{yygotominor.yy4 = yymsp[0].minor.yy4;}
108010
-#line 2424 "parse.c"
108011107834
break;
108012107835
case 88: /* conslist_opt ::= */
108013
-#line 339 "parse.y"
108014107836
{yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;}
108015
-#line 2429 "parse.c"
108016107837
break;
108017107838
case 89: /* conslist_opt ::= COMMA conslist */
108018
-#line 340 "parse.y"
108019107839
{yygotominor.yy0 = yymsp[-1].minor.yy0;}
108020
-#line 2434 "parse.c"
108021107840
break;
108022107841
case 94: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */
108023
-#line 346 "parse.y"
108024107842
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy322,yymsp[0].minor.yy4,yymsp[-2].minor.yy4,0);}
108025
-#line 2439 "parse.c"
108026107843
break;
108027107844
case 95: /* tcons ::= UNIQUE LP idxlist RP onconf */
108028
-#line 348 "parse.y"
108029107845
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy322,yymsp[0].minor.yy4,0,0,0,0);}
108030
-#line 2444 "parse.c"
108031107846
break;
108032107847
case 96: /* tcons ::= CHECK LP expr RP onconf */
108033
-#line 350 "parse.y"
108034107848
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy118.pExpr);}
108035
-#line 2449 "parse.c"
108036107849
break;
108037107850
case 97: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */
108038
-#line 352 "parse.y"
108039107851
{
108040107852
sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy322, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[-1].minor.yy4);
108041107853
sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy4);
108042107854
}
108043
-#line 2457 "parse.c"
108044107855
break;
108045107856
case 100: /* onconf ::= */
108046
-#line 366 "parse.y"
108047107857
{yygotominor.yy4 = OE_Default;}
108048
-#line 2462 "parse.c"
108049107858
break;
108050107859
case 102: /* orconf ::= */
108051
-#line 368 "parse.y"
108052107860
{yygotominor.yy210 = OE_Default;}
108053
-#line 2467 "parse.c"
108054107861
break;
108055107862
case 103: /* orconf ::= OR resolvetype */
108056
-#line 369 "parse.y"
108057107863
{yygotominor.yy210 = (u8)yymsp[0].minor.yy4;}
108058
-#line 2472 "parse.c"
108059107864
break;
108060107865
case 105: /* resolvetype ::= IGNORE */
108061
-#line 371 "parse.y"
108062107866
{yygotominor.yy4 = OE_Ignore;}
108063
-#line 2477 "parse.c"
108064107867
break;
108065107868
case 106: /* resolvetype ::= REPLACE */
108066
-#line 372 "parse.y"
108067107869
{yygotominor.yy4 = OE_Replace;}
108068
-#line 2482 "parse.c"
108069107870
break;
108070107871
case 107: /* cmd ::= DROP TABLE ifexists fullname */
108071
-#line 376 "parse.y"
108072107872
{
108073107873
sqlite3DropTable(pParse, yymsp[0].minor.yy259, 0, yymsp[-1].minor.yy4);
108074107874
}
108075
-#line 2489 "parse.c"
108076107875
break;
108077107876
case 110: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */
108078
-#line 386 "parse.y"
108079107877
{
108080107878
sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy387, yymsp[-6].minor.yy4, yymsp[-4].minor.yy4);
108081107879
}
108082
-#line 2496 "parse.c"
108083107880
break;
108084107881
case 111: /* cmd ::= DROP VIEW ifexists fullname */
108085
-#line 389 "parse.y"
108086107882
{
108087107883
sqlite3DropTable(pParse, yymsp[0].minor.yy259, 1, yymsp[-1].minor.yy4);
108088107884
}
108089
-#line 2503 "parse.c"
108090107885
break;
108091107886
case 112: /* cmd ::= select */
108092
-#line 396 "parse.y"
108093107887
{
108094107888
SelectDest dest = {SRT_Output, 0, 0, 0, 0};
108095107889
sqlite3Select(pParse, yymsp[0].minor.yy387, &dest);
108096107890
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387);
108097107891
}
108098
-#line 2512 "parse.c"
108099107892
break;
108100107893
case 113: /* select ::= oneselect */
108101
-#line 407 "parse.y"
108102107894
{yygotominor.yy387 = yymsp[0].minor.yy387;}
108103
-#line 2517 "parse.c"
108104107895
break;
108105107896
case 114: /* select ::= select multiselect_op oneselect */
108106
-#line 409 "parse.y"
108107107897
{
108108107898
if( yymsp[0].minor.yy387 ){
108109107899
yymsp[0].minor.yy387->op = (u8)yymsp[-1].minor.yy4;
108110107900
yymsp[0].minor.yy387->pPrior = yymsp[-2].minor.yy387;
108111107901
}else{
108112107902
sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy387);
108113107903
}
108114107904
yygotominor.yy387 = yymsp[0].minor.yy387;
108115107905
}
108116
-#line 2530 "parse.c"
108117107906
break;
108118107907
case 116: /* multiselect_op ::= UNION ALL */
108119
-#line 420 "parse.y"
108120107908
{yygotominor.yy4 = TK_ALL;}
108121
-#line 2535 "parse.c"
108122107909
break;
108123107910
case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
108124
-#line 424 "parse.y"
108125107911
{
108126107912
yygotominor.yy387 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy322,yymsp[-5].minor.yy259,yymsp[-4].minor.yy314,yymsp[-3].minor.yy322,yymsp[-2].minor.yy314,yymsp[-1].minor.yy322,yymsp[-7].minor.yy4,yymsp[0].minor.yy292.pLimit,yymsp[0].minor.yy292.pOffset);
108127107913
}
108128
-#line 2542 "parse.c"
108129107914
break;
108130107915
case 122: /* sclp ::= selcollist COMMA */
108131107916
case 247: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==247);
108132
-#line 445 "parse.y"
108133107917
{yygotominor.yy322 = yymsp[-1].minor.yy322;}
108134
-#line 2548 "parse.c"
108135107918
break;
108136107919
case 123: /* sclp ::= */
108137107920
case 151: /* orderby_opt ::= */ yytestcase(yyruleno==151);
108138107921
case 159: /* groupby_opt ::= */ yytestcase(yyruleno==159);
108139107922
case 240: /* exprlist ::= */ yytestcase(yyruleno==240);
108140107923
case 246: /* idxlist_opt ::= */ yytestcase(yyruleno==246);
108141
-#line 446 "parse.y"
108142107924
{yygotominor.yy322 = 0;}
108143
-#line 2557 "parse.c"
108144107925
break;
108145107926
case 124: /* selcollist ::= sclp expr as */
108146
-#line 447 "parse.y"
108147107927
{
108148107928
yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy322, yymsp[-1].minor.yy118.pExpr);
108149107929
if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[0].minor.yy0, 1);
108150107930
sqlite3ExprListSetSpan(pParse,yygotominor.yy322,&yymsp[-1].minor.yy118);
108151107931
}
108152
-#line 2566 "parse.c"
108153107932
break;
108154107933
case 125: /* selcollist ::= sclp STAR */
108155
-#line 452 "parse.y"
108156107934
{
108157107935
Expr *p = sqlite3Expr(pParse->db, TK_ALL, 0);
108158107936
yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy322, p);
108159107937
}
108160
-#line 2574 "parse.c"
108161107938
break;
108162107939
case 126: /* selcollist ::= sclp nm DOT STAR */
108163
-#line 456 "parse.y"
108164107940
{
108165107941
Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0);
108166107942
Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
108167107943
Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
108168107944
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, pDot);
108169107945
}
108170
-#line 2584 "parse.c"
108171107946
break;
108172107947
case 129: /* as ::= */
108173
-#line 469 "parse.y"
108174107948
{yygotominor.yy0.n = 0;}
108175
-#line 2589 "parse.c"
108176107949
break;
108177107950
case 130: /* from ::= */
108178
-#line 481 "parse.y"
108179107951
{yygotominor.yy259 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy259));}
108180
-#line 2594 "parse.c"
108181107952
break;
108182107953
case 131: /* from ::= FROM seltablist */
108183
-#line 482 "parse.y"
108184107954
{
108185107955
yygotominor.yy259 = yymsp[0].minor.yy259;
108186107956
sqlite3SrcListShiftJoinType(yygotominor.yy259);
108187107957
}
108188
-#line 2602 "parse.c"
108189107958
break;
108190107959
case 132: /* stl_prefix ::= seltablist joinop */
108191
-#line 490 "parse.y"
108192107960
{
108193107961
yygotominor.yy259 = yymsp[-1].minor.yy259;
108194107962
if( ALWAYS(yygotominor.yy259 && yygotominor.yy259->nSrc>0) ) yygotominor.yy259->a[yygotominor.yy259->nSrc-1].jointype = (u8)yymsp[0].minor.yy4;
108195107963
}
108196
-#line 2610 "parse.c"
108197107964
break;
108198107965
case 133: /* stl_prefix ::= */
108199
-#line 494 "parse.y"
108200107966
{yygotominor.yy259 = 0;}
108201
-#line 2615 "parse.c"
108202107967
break;
108203107968
case 134: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
108204
-#line 495 "parse.y"
108205107969
{
108206107970
yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
108207107971
sqlite3SrcListIndexedBy(pParse, yygotominor.yy259, &yymsp[-2].minor.yy0);
108208107972
}
108209
-#line 2623 "parse.c"
108210107973
break;
108211107974
case 135: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
108212
-#line 501 "parse.y"
108213107975
{
108214107976
yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy387,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
108215107977
}
108216
-#line 2630 "parse.c"
108217107978
break;
108218107979
case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
108219
-#line 505 "parse.y"
108220107980
{
108221107981
if( yymsp[-6].minor.yy259==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy314==0 && yymsp[0].minor.yy384==0 ){
108222107982
yygotominor.yy259 = yymsp[-4].minor.yy259;
108223107983
}else{
108224107984
Select *pSubquery;
@@ -108225,260 +107985,180 @@
108225107985
sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy259);
108226107986
pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy259,0,0,0,0,0,0,0);
108227107987
yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
108228107988
}
108229107989
}
108230
-#line 2644 "parse.c"
108231107990
break;
108232107991
case 137: /* dbnm ::= */
108233107992
case 146: /* indexed_opt ::= */ yytestcase(yyruleno==146);
108234
-#line 530 "parse.y"
108235107993
{yygotominor.yy0.z=0; yygotominor.yy0.n=0;}
108236
-#line 2650 "parse.c"
108237107994
break;
108238107995
case 139: /* fullname ::= nm dbnm */
108239
-#line 535 "parse.y"
108240107996
{yygotominor.yy259 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
108241
-#line 2655 "parse.c"
108242107997
break;
108243107998
case 140: /* joinop ::= COMMA|JOIN */
108244
-#line 539 "parse.y"
108245107999
{ yygotominor.yy4 = JT_INNER; }
108246
-#line 2660 "parse.c"
108247108000
break;
108248108001
case 141: /* joinop ::= JOIN_KW JOIN */
108249
-#line 540 "parse.y"
108250108002
{ yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
108251
-#line 2665 "parse.c"
108252108003
break;
108253108004
case 142: /* joinop ::= JOIN_KW nm JOIN */
108254
-#line 541 "parse.y"
108255108005
{ yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); }
108256
-#line 2670 "parse.c"
108257108006
break;
108258108007
case 143: /* joinop ::= JOIN_KW nm nm JOIN */
108259
-#line 543 "parse.y"
108260108008
{ yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); }
108261
-#line 2675 "parse.c"
108262108009
break;
108263108010
case 144: /* on_opt ::= ON expr */
108264108011
case 155: /* sortitem ::= expr */ yytestcase(yyruleno==155);
108265108012
case 162: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==162);
108266108013
case 169: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==169);
108267108014
case 235: /* case_else ::= ELSE expr */ yytestcase(yyruleno==235);
108268108015
case 237: /* case_operand ::= expr */ yytestcase(yyruleno==237);
108269
-#line 547 "parse.y"
108270108016
{yygotominor.yy314 = yymsp[0].minor.yy118.pExpr;}
108271
-#line 2685 "parse.c"
108272108017
break;
108273108018
case 145: /* on_opt ::= */
108274108019
case 161: /* having_opt ::= */ yytestcase(yyruleno==161);
108275108020
case 168: /* where_opt ::= */ yytestcase(yyruleno==168);
108276108021
case 236: /* case_else ::= */ yytestcase(yyruleno==236);
108277108022
case 238: /* case_operand ::= */ yytestcase(yyruleno==238);
108278
-#line 548 "parse.y"
108279108023
{yygotominor.yy314 = 0;}
108280
-#line 2694 "parse.c"
108281108024
break;
108282108025
case 148: /* indexed_opt ::= NOT INDEXED */
108283
-#line 563 "parse.y"
108284108026
{yygotominor.yy0.z=0; yygotominor.yy0.n=1;}
108285
-#line 2699 "parse.c"
108286108027
break;
108287108028
case 149: /* using_opt ::= USING LP inscollist RP */
108288108029
case 181: /* inscollist_opt ::= LP inscollist RP */ yytestcase(yyruleno==181);
108289
-#line 567 "parse.y"
108290108030
{yygotominor.yy384 = yymsp[-1].minor.yy384;}
108291
-#line 2705 "parse.c"
108292108031
break;
108293108032
case 150: /* using_opt ::= */
108294108033
case 180: /* inscollist_opt ::= */ yytestcase(yyruleno==180);
108295
-#line 568 "parse.y"
108296108034
{yygotominor.yy384 = 0;}
108297
-#line 2711 "parse.c"
108298108035
break;
108299108036
case 152: /* orderby_opt ::= ORDER BY sortlist */
108300108037
case 160: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==160);
108301108038
case 239: /* exprlist ::= nexprlist */ yytestcase(yyruleno==239);
108302
-#line 579 "parse.y"
108303108039
{yygotominor.yy322 = yymsp[0].minor.yy322;}
108304
-#line 2718 "parse.c"
108305108040
break;
108306108041
case 153: /* sortlist ::= sortlist COMMA sortitem sortorder */
108307
-#line 580 "parse.y"
108308108042
{
108309108043
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322,yymsp[-1].minor.yy314);
108310108044
if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
108311108045
}
108312
-#line 2726 "parse.c"
108313108046
break;
108314108047
case 154: /* sortlist ::= sortitem sortorder */
108315
-#line 584 "parse.y"
108316108048
{
108317108049
yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy314);
108318108050
if( yygotominor.yy322 && ALWAYS(yygotominor.yy322->a) ) yygotominor.yy322->a[0].sortOrder = (u8)yymsp[0].minor.yy4;
108319108051
}
108320
-#line 2734 "parse.c"
108321108052
break;
108322108053
case 156: /* sortorder ::= ASC */
108323108054
case 158: /* sortorder ::= */ yytestcase(yyruleno==158);
108324
-#line 592 "parse.y"
108325108055
{yygotominor.yy4 = SQLITE_SO_ASC;}
108326
-#line 2740 "parse.c"
108327108056
break;
108328108057
case 157: /* sortorder ::= DESC */
108329
-#line 593 "parse.y"
108330108058
{yygotominor.yy4 = SQLITE_SO_DESC;}
108331
-#line 2745 "parse.c"
108332108059
break;
108333108060
case 163: /* limit_opt ::= */
108334
-#line 619 "parse.y"
108335108061
{yygotominor.yy292.pLimit = 0; yygotominor.yy292.pOffset = 0;}
108336
-#line 2750 "parse.c"
108337108062
break;
108338108063
case 164: /* limit_opt ::= LIMIT expr */
108339
-#line 620 "parse.y"
108340108064
{yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr; yygotominor.yy292.pOffset = 0;}
108341
-#line 2755 "parse.c"
108342108065
break;
108343108066
case 165: /* limit_opt ::= LIMIT expr OFFSET expr */
108344
-#line 622 "parse.y"
108345108067
{yygotominor.yy292.pLimit = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pOffset = yymsp[0].minor.yy118.pExpr;}
108346
-#line 2760 "parse.c"
108347108068
break;
108348108069
case 166: /* limit_opt ::= LIMIT expr COMMA expr */
108349
-#line 624 "parse.y"
108350108070
{yygotominor.yy292.pOffset = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr;}
108351
-#line 2765 "parse.c"
108352108071
break;
108353108072
case 167: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */
108354
-#line 637 "parse.y"
108355108073
{
108356108074
sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy259, &yymsp[-1].minor.yy0);
108357108075
sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy259,yymsp[0].minor.yy314);
108358108076
}
108359
-#line 2773 "parse.c"
108360108077
break;
108361108078
case 170: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */
108362
-#line 660 "parse.y"
108363108079
{
108364108080
sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy259, &yymsp[-3].minor.yy0);
108365108081
sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy322,"set list");
108366108082
sqlite3Update(pParse,yymsp[-4].minor.yy259,yymsp[-1].minor.yy322,yymsp[0].minor.yy314,yymsp[-5].minor.yy210);
108367108083
}
108368
-#line 2782 "parse.c"
108369108084
break;
108370108085
case 171: /* setlist ::= setlist COMMA nm EQ expr */
108371
-#line 670 "parse.y"
108372108086
{
108373108087
yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy322, yymsp[0].minor.yy118.pExpr);
108374108088
sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
108375108089
}
108376
-#line 2790 "parse.c"
108377108090
break;
108378108091
case 172: /* setlist ::= nm EQ expr */
108379
-#line 674 "parse.y"
108380108092
{
108381108093
yygotominor.yy322 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy118.pExpr);
108382108094
sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
108383108095
}
108384
-#line 2798 "parse.c"
108385108096
break;
108386108097
case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */
108387
-#line 683 "parse.y"
108388108098
{sqlite3Insert(pParse, yymsp[-5].minor.yy259, yymsp[-1].minor.yy322, 0, yymsp[-4].minor.yy384, yymsp[-7].minor.yy210);}
108389
-#line 2803 "parse.c"
108390108099
break;
108391108100
case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */
108392
-#line 685 "parse.y"
108393108101
{sqlite3Insert(pParse, yymsp[-2].minor.yy259, 0, yymsp[0].minor.yy387, yymsp[-1].minor.yy384, yymsp[-4].minor.yy210);}
108394
-#line 2808 "parse.c"
108395108102
break;
108396108103
case 175: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */
108397
-#line 687 "parse.y"
108398108104
{sqlite3Insert(pParse, yymsp[-3].minor.yy259, 0, 0, yymsp[-2].minor.yy384, yymsp[-5].minor.yy210);}
108399
-#line 2813 "parse.c"
108400108105
break;
108401108106
case 176: /* insert_cmd ::= INSERT orconf */
108402
-#line 690 "parse.y"
108403108107
{yygotominor.yy210 = yymsp[0].minor.yy210;}
108404
-#line 2818 "parse.c"
108405108108
break;
108406108109
case 177: /* insert_cmd ::= REPLACE */
108407
-#line 691 "parse.y"
108408108110
{yygotominor.yy210 = OE_Replace;}
108409
-#line 2823 "parse.c"
108410108111
break;
108411108112
case 178: /* itemlist ::= itemlist COMMA expr */
108412108113
case 241: /* nexprlist ::= nexprlist COMMA expr */ yytestcase(yyruleno==241);
108413
-#line 698 "parse.y"
108414108114
{yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy118.pExpr);}
108415
-#line 2829 "parse.c"
108416108115
break;
108417108116
case 179: /* itemlist ::= expr */
108418108117
case 242: /* nexprlist ::= expr */ yytestcase(yyruleno==242);
108419
-#line 700 "parse.y"
108420108118
{yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy118.pExpr);}
108421
-#line 2835 "parse.c"
108422108119
break;
108423108120
case 182: /* inscollist ::= inscollist COMMA nm */
108424
-#line 710 "parse.y"
108425108121
{yygotominor.yy384 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy384,&yymsp[0].minor.yy0);}
108426
-#line 2840 "parse.c"
108427108122
break;
108428108123
case 183: /* inscollist ::= nm */
108429
-#line 712 "parse.y"
108430108124
{yygotominor.yy384 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);}
108431
-#line 2845 "parse.c"
108432108125
break;
108433108126
case 184: /* expr ::= term */
108434
-#line 743 "parse.y"
108435108127
{yygotominor.yy118 = yymsp[0].minor.yy118;}
108436
-#line 2850 "parse.c"
108437108128
break;
108438108129
case 185: /* expr ::= LP expr RP */
108439
-#line 744 "parse.y"
108440108130
{yygotominor.yy118.pExpr = yymsp[-1].minor.yy118.pExpr; spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);}
108441
-#line 2855 "parse.c"
108442108131
break;
108443108132
case 186: /* term ::= NULL */
108444108133
case 191: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==191);
108445108134
case 192: /* term ::= STRING */ yytestcase(yyruleno==192);
108446
-#line 745 "parse.y"
108447108135
{spanExpr(&yygotominor.yy118, pParse, yymsp[0].major, &yymsp[0].minor.yy0);}
108448
-#line 2862 "parse.c"
108449108136
break;
108450108137
case 187: /* expr ::= id */
108451108138
case 188: /* expr ::= JOIN_KW */ yytestcase(yyruleno==188);
108452
-#line 746 "parse.y"
108453108139
{spanExpr(&yygotominor.yy118, pParse, TK_ID, &yymsp[0].minor.yy0);}
108454
-#line 2868 "parse.c"
108455108140
break;
108456108141
case 189: /* expr ::= nm DOT nm */
108457
-#line 748 "parse.y"
108458108142
{
108459108143
Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
108460108144
Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
108461108145
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0);
108462108146
spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
108463108147
}
108464
-#line 2878 "parse.c"
108465108148
break;
108466108149
case 190: /* expr ::= nm DOT nm DOT nm */
108467
-#line 754 "parse.y"
108468108150
{
108469108151
Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0);
108470108152
Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
108471108153
Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
108472108154
Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0);
108473108155
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0);
108474108156
spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
108475108157
}
108476
-#line 2890 "parse.c"
108477108158
break;
108478108159
case 193: /* expr ::= REGISTER */
108479
-#line 764 "parse.y"
108480108160
{
108481108161
/* When doing a nested parse, one can include terms in an expression
108482108162
** that look like this: #1 #2 ... These terms refer to registers
108483108163
** in the virtual machine. #N is the N-th register. */
108484108164
if( pParse->nested==0 ){
@@ -108488,40 +108168,32 @@
108488108168
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &yymsp[0].minor.yy0);
108489108169
if( yygotominor.yy118.pExpr ) sqlite3GetInt32(&yymsp[0].minor.yy0.z[1], &yygotominor.yy118.pExpr->iTable);
108490108170
}
108491108171
spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
108492108172
}
108493
-#line 2907 "parse.c"
108494108173
break;
108495108174
case 194: /* expr ::= VARIABLE */
108496
-#line 777 "parse.y"
108497108175
{
108498108176
spanExpr(&yygotominor.yy118, pParse, TK_VARIABLE, &yymsp[0].minor.yy0);
108499108177
sqlite3ExprAssignVarNumber(pParse, yygotominor.yy118.pExpr);
108500108178
spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
108501108179
}
108502
-#line 2916 "parse.c"
108503108180
break;
108504108181
case 195: /* expr ::= expr COLLATE ids */
108505
-#line 782 "parse.y"
108506108182
{
108507108183
yygotominor.yy118.pExpr = sqlite3ExprSetCollByToken(pParse, yymsp[-2].minor.yy118.pExpr, &yymsp[0].minor.yy0);
108508108184
yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart;
108509108185
yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108510108186
}
108511
-#line 2925 "parse.c"
108512108187
break;
108513108188
case 196: /* expr ::= CAST LP expr AS typetoken RP */
108514
-#line 788 "parse.y"
108515108189
{
108516108190
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy118.pExpr, 0, &yymsp[-1].minor.yy0);
108517108191
spanSet(&yygotominor.yy118,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);
108518108192
}
108519
-#line 2933 "parse.c"
108520108193
break;
108521108194
case 197: /* expr ::= ID LP distinct exprlist RP */
108522
-#line 793 "parse.y"
108523108195
{
108524108196
if( yymsp[-1].minor.yy322 && yymsp[-1].minor.yy322->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
108525108197
sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
108526108198
}
108527108199
yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0);
@@ -108528,59 +108200,47 @@
108528108200
spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
108529108201
if( yymsp[-2].minor.yy4 && yygotominor.yy118.pExpr ){
108530108202
yygotominor.yy118.pExpr->flags |= EP_Distinct;
108531108203
}
108532108204
}
108533
-#line 2947 "parse.c"
108534108205
break;
108535108206
case 198: /* expr ::= ID LP STAR RP */
108536
-#line 803 "parse.y"
108537108207
{
108538108208
yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0);
108539108209
spanSet(&yygotominor.yy118,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
108540108210
}
108541
-#line 2955 "parse.c"
108542108211
break;
108543108212
case 199: /* term ::= CTIME_KW */
108544
-#line 807 "parse.y"
108545108213
{
108546108214
/* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are
108547108215
** treated as functions that return constants */
108548108216
yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0);
108549108217
if( yygotominor.yy118.pExpr ){
108550108218
yygotominor.yy118.pExpr->op = TK_CONST_FUNC;
108551108219
}
108552108220
spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
108553108221
}
108554
-#line 2968 "parse.c"
108555108222
break;
108556108223
case 200: /* expr ::= expr AND expr */
108557108224
case 201: /* expr ::= expr OR expr */ yytestcase(yyruleno==201);
108558108225
case 202: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==202);
108559108226
case 203: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==203);
108560108227
case 204: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==204);
108561108228
case 205: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==205);
108562108229
case 206: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==206);
108563108230
case 207: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==207);
108564
-#line 834 "parse.y"
108565108231
{spanBinaryExpr(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);}
108566
-#line 2980 "parse.c"
108567108232
break;
108568108233
case 208: /* likeop ::= LIKE_KW */
108569108234
case 210: /* likeop ::= MATCH */ yytestcase(yyruleno==210);
108570
-#line 847 "parse.y"
108571108235
{yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 0;}
108572
-#line 2986 "parse.c"
108573108236
break;
108574108237
case 209: /* likeop ::= NOT LIKE_KW */
108575108238
case 211: /* likeop ::= NOT MATCH */ yytestcase(yyruleno==211);
108576
-#line 848 "parse.y"
108577108239
{yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 1;}
108578
-#line 2992 "parse.c"
108579108240
break;
108580108241
case 212: /* expr ::= expr likeop expr */
108581
-#line 851 "parse.y"
108582108242
{
108583108243
ExprList *pList;
108584108244
pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy118.pExpr);
108585108245
pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy118.pExpr);
108586108246
yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy342.eOperator);
@@ -108587,14 +108247,12 @@
108587108247
if( yymsp[-1].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108588108248
yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart;
108589108249
yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
108590108250
if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc;
108591108251
}
108592
-#line 3006 "parse.c"
108593108252
break;
108594108253
case 213: /* expr ::= expr likeop expr ESCAPE expr */
108595
-#line 861 "parse.y"
108596108254
{
108597108255
ExprList *pList;
108598108256
pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
108599108257
pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy118.pExpr);
108600108258
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr);
@@ -108602,56 +108260,40 @@
108602108260
if( yymsp[-3].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108603108261
yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108604108262
yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
108605108263
if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc;
108606108264
}
108607
-#line 3021 "parse.c"
108608108265
break;
108609108266
case 214: /* expr ::= expr ISNULL|NOTNULL */
108610
-#line 889 "parse.y"
108611108267
{spanUnaryPostfix(&yygotominor.yy118,pParse,yymsp[0].major,&yymsp[-1].minor.yy118,&yymsp[0].minor.yy0);}
108612
-#line 3026 "parse.c"
108613108268
break;
108614108269
case 215: /* expr ::= expr NOT NULL */
108615
-#line 890 "parse.y"
108616108270
{spanUnaryPostfix(&yygotominor.yy118,pParse,TK_NOTNULL,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy0);}
108617
-#line 3031 "parse.c"
108618108271
break;
108619108272
case 216: /* expr ::= expr IS expr */
108620
-#line 911 "parse.y"
108621108273
{
108622108274
spanBinaryExpr(&yygotominor.yy118,pParse,TK_IS,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);
108623108275
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_ISNULL);
108624108276
}
108625
-#line 3039 "parse.c"
108626108277
break;
108627108278
case 217: /* expr ::= expr IS NOT expr */
108628
-#line 915 "parse.y"
108629108279
{
108630108280
spanBinaryExpr(&yygotominor.yy118,pParse,TK_ISNOT,&yymsp[-3].minor.yy118,&yymsp[0].minor.yy118);
108631108281
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_NOTNULL);
108632108282
}
108633
-#line 3047 "parse.c"
108634108283
break;
108635108284
case 218: /* expr ::= NOT expr */
108636108285
case 219: /* expr ::= BITNOT expr */ yytestcase(yyruleno==219);
108637
-#line 938 "parse.y"
108638108286
{spanUnaryPrefix(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
108639
-#line 3053 "parse.c"
108640108287
break;
108641108288
case 220: /* expr ::= MINUS expr */
108642
-#line 941 "parse.y"
108643108289
{spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UMINUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
108644
-#line 3058 "parse.c"
108645108290
break;
108646108291
case 221: /* expr ::= PLUS expr */
108647
-#line 943 "parse.y"
108648108292
{spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UPLUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
108649
-#line 3063 "parse.c"
108650108293
break;
108651108294
case 224: /* expr ::= expr between_op expr AND expr */
108652
-#line 948 "parse.y"
108653108295
{
108654108296
ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
108655108297
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr);
108656108298
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy118.pExpr, 0, 0);
108657108299
if( yygotominor.yy118.pExpr ){
@@ -108661,14 +108303,12 @@
108661108303
}
108662108304
if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108663108305
yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108664108306
yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
108665108307
}
108666
-#line 3080 "parse.c"
108667108308
break;
108668108309
case 227: /* expr ::= expr in_op LP exprlist RP */
108669
-#line 965 "parse.y"
108670108310
{
108671108311
if( yymsp[-1].minor.yy322==0 ){
108672108312
/* Expressions of the form
108673108313
**
108674108314
** expr1 IN ()
@@ -108690,14 +108330,12 @@
108690108330
if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108691108331
}
108692108332
yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108693108333
yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108694108334
}
108695
-#line 3109 "parse.c"
108696108335
break;
108697108336
case 228: /* expr ::= LP select RP */
108698
-#line 990 "parse.y"
108699108337
{
108700108338
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0);
108701108339
if( yygotominor.yy118.pExpr ){
108702108340
yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387;
108703108341
ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect);
@@ -108706,14 +108344,12 @@
108706108344
sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387);
108707108345
}
108708108346
yygotominor.yy118.zStart = yymsp[-2].minor.yy0.z;
108709108347
yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108710108348
}
108711
-#line 3125 "parse.c"
108712108349
break;
108713108350
case 229: /* expr ::= expr in_op LP select RP */
108714
-#line 1002 "parse.y"
108715108351
{
108716108352
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy118.pExpr, 0, 0);
108717108353
if( yygotominor.yy118.pExpr ){
108718108354
yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387;
108719108355
ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect);
@@ -108723,14 +108359,12 @@
108723108359
}
108724108360
if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108725108361
yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108726108362
yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108727108363
}
108728
-#line 3142 "parse.c"
108729108364
break;
108730108365
case 230: /* expr ::= expr in_op nm dbnm */
108731
-#line 1015 "parse.y"
108732108366
{
108733108367
SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);
108734108368
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy118.pExpr, 0, 0);
108735108369
if( yygotominor.yy118.pExpr ){
108736108370
yygotominor.yy118.pExpr->x.pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0);
@@ -108741,14 +108375,12 @@
108741108375
}
108742108376
if( yymsp[-2].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108743108377
yygotominor.yy118.zStart = yymsp[-3].minor.yy118.zStart;
108744108378
yygotominor.yy118.zEnd = yymsp[0].minor.yy0.z ? &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] : &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n];
108745108379
}
108746
-#line 3160 "parse.c"
108747108380
break;
108748108381
case 231: /* expr ::= EXISTS LP select RP */
108749
-#line 1029 "parse.y"
108750108382
{
108751108383
Expr *p = yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0);
108752108384
if( p ){
108753108385
p->x.pSelect = yymsp[-1].minor.yy387;
108754108386
ExprSetProperty(p, EP_xIsSelect);
@@ -108757,14 +108389,12 @@
108757108389
sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387);
108758108390
}
108759108391
yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z;
108760108392
yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108761108393
}
108762
-#line 3176 "parse.c"
108763108394
break;
108764108395
case 232: /* expr ::= CASE case_operand case_exprlist case_else END */
108765
-#line 1044 "parse.y"
108766108396
{
108767108397
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy314, yymsp[-1].minor.yy314, 0);
108768108398
if( yygotominor.yy118.pExpr ){
108769108399
yygotominor.yy118.pExpr->x.pList = yymsp[-2].minor.yy322;
108770108400
sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr);
@@ -108772,50 +108402,38 @@
108772108402
sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy322);
108773108403
}
108774108404
yygotominor.yy118.zStart = yymsp[-4].minor.yy0.z;
108775108405
yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108776108406
}
108777
-#line 3191 "parse.c"
108778108407
break;
108779108408
case 233: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
108780
-#line 1057 "parse.y"
108781108409
{
108782108410
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy118.pExpr);
108783108411
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr);
108784108412
}
108785
-#line 3199 "parse.c"
108786108413
break;
108787108414
case 234: /* case_exprlist ::= WHEN expr THEN expr */
108788
-#line 1061 "parse.y"
108789108415
{
108790108416
yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
108791108417
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr);
108792108418
}
108793
-#line 3207 "parse.c"
108794108419
break;
108795108420
case 243: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */
108796
-#line 1090 "parse.y"
108797108421
{
108798108422
sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0,
108799108423
sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy322, yymsp[-9].minor.yy4,
108800108424
&yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy4);
108801108425
}
108802
-#line 3216 "parse.c"
108803108426
break;
108804108427
case 244: /* uniqueflag ::= UNIQUE */
108805108428
case 298: /* raisetype ::= ABORT */ yytestcase(yyruleno==298);
108806
-#line 1097 "parse.y"
108807108429
{yygotominor.yy4 = OE_Abort;}
108808
-#line 3222 "parse.c"
108809108430
break;
108810108431
case 245: /* uniqueflag ::= */
108811
-#line 1098 "parse.y"
108812108432
{yygotominor.yy4 = OE_None;}
108813
-#line 3227 "parse.c"
108814108433
break;
108815108434
case 248: /* idxlist ::= idxlist COMMA nm collate sortorder */
108816
-#line 1107 "parse.y"
108817108435
{
108818108436
Expr *p = 0;
108819108437
if( yymsp[-1].minor.yy0.n>0 ){
108820108438
p = sqlite3Expr(pParse->db, TK_COLUMN, 0);
108821108439
sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0);
@@ -108823,14 +108441,12 @@
108823108441
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, p);
108824108442
sqlite3ExprListSetName(pParse,yygotominor.yy322,&yymsp[-2].minor.yy0,1);
108825108443
sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index");
108826108444
if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
108827108445
}
108828
-#line 3242 "parse.c"
108829108446
break;
108830108447
case 249: /* idxlist ::= nm collate sortorder */
108831
-#line 1118 "parse.y"
108832108448
{
108833108449
Expr *p = 0;
108834108450
if( yymsp[-1].minor.yy0.n>0 ){
108835108451
p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);
108836108452
sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0);
@@ -108838,307 +108454,214 @@
108838108454
yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, p);
108839108455
sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
108840108456
sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index");
108841108457
if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
108842108458
}
108843
-#line 3257 "parse.c"
108844108459
break;
108845108460
case 250: /* collate ::= */
108846
-#line 1131 "parse.y"
108847108461
{yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;}
108848
-#line 3262 "parse.c"
108849108462
break;
108850108463
case 252: /* cmd ::= DROP INDEX ifexists fullname */
108851
-#line 1137 "parse.y"
108852108464
{sqlite3DropIndex(pParse, yymsp[0].minor.yy259, yymsp[-1].minor.yy4);}
108853
-#line 3267 "parse.c"
108854108465
break;
108855108466
case 253: /* cmd ::= VACUUM */
108856108467
case 254: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==254);
108857
-#line 1143 "parse.y"
108858108468
{sqlite3Vacuum(pParse);}
108859
-#line 3273 "parse.c"
108860108469
break;
108861108470
case 255: /* cmd ::= PRAGMA nm dbnm */
108862
-#line 1151 "parse.y"
108863108471
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
108864
-#line 3278 "parse.c"
108865108472
break;
108866108473
case 256: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
108867
-#line 1152 "parse.y"
108868108474
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
108869
-#line 3283 "parse.c"
108870108475
break;
108871108476
case 257: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
108872
-#line 1153 "parse.y"
108873108477
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
108874
-#line 3288 "parse.c"
108875108478
break;
108876108479
case 258: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
108877
-#line 1155 "parse.y"
108878108480
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
108879
-#line 3293 "parse.c"
108880108481
break;
108881108482
case 259: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
108882
-#line 1157 "parse.y"
108883108483
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
108884
-#line 3298 "parse.c"
108885108484
break;
108886108485
case 270: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
108887
-#line 1175 "parse.y"
108888108486
{
108889108487
Token all;
108890108488
all.z = yymsp[-3].minor.yy0.z;
108891108489
all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
108892108490
sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy203, &all);
108893108491
}
108894
-#line 3308 "parse.c"
108895108492
break;
108896108493
case 271: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
108897
-#line 1184 "parse.y"
108898108494
{
108899108495
sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy4, yymsp[-4].minor.yy90.a, yymsp[-4].minor.yy90.b, yymsp[-2].minor.yy259, yymsp[0].minor.yy314, yymsp[-10].minor.yy4, yymsp[-8].minor.yy4);
108900108496
yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0);
108901108497
}
108902
-#line 3316 "parse.c"
108903108498
break;
108904108499
case 272: /* trigger_time ::= BEFORE */
108905108500
case 275: /* trigger_time ::= */ yytestcase(yyruleno==275);
108906
-#line 1190 "parse.y"
108907108501
{ yygotominor.yy4 = TK_BEFORE; }
108908
-#line 3322 "parse.c"
108909108502
break;
108910108503
case 273: /* trigger_time ::= AFTER */
108911
-#line 1191 "parse.y"
108912108504
{ yygotominor.yy4 = TK_AFTER; }
108913
-#line 3327 "parse.c"
108914108505
break;
108915108506
case 274: /* trigger_time ::= INSTEAD OF */
108916
-#line 1192 "parse.y"
108917108507
{ yygotominor.yy4 = TK_INSTEAD;}
108918
-#line 3332 "parse.c"
108919108508
break;
108920108509
case 276: /* trigger_event ::= DELETE|INSERT */
108921108510
case 277: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==277);
108922
-#line 1197 "parse.y"
108923108511
{yygotominor.yy90.a = yymsp[0].major; yygotominor.yy90.b = 0;}
108924
-#line 3338 "parse.c"
108925108512
break;
108926108513
case 278: /* trigger_event ::= UPDATE OF inscollist */
108927
-#line 1199 "parse.y"
108928108514
{yygotominor.yy90.a = TK_UPDATE; yygotominor.yy90.b = yymsp[0].minor.yy384;}
108929
-#line 3343 "parse.c"
108930108515
break;
108931108516
case 281: /* when_clause ::= */
108932108517
case 303: /* key_opt ::= */ yytestcase(yyruleno==303);
108933
-#line 1206 "parse.y"
108934108518
{ yygotominor.yy314 = 0; }
108935
-#line 3349 "parse.c"
108936108519
break;
108937108520
case 282: /* when_clause ::= WHEN expr */
108938108521
case 304: /* key_opt ::= KEY expr */ yytestcase(yyruleno==304);
108939
-#line 1207 "parse.y"
108940108522
{ yygotominor.yy314 = yymsp[0].minor.yy118.pExpr; }
108941
-#line 3355 "parse.c"
108942108523
break;
108943108524
case 283: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
108944
-#line 1211 "parse.y"
108945108525
{
108946108526
assert( yymsp[-2].minor.yy203!=0 );
108947108527
yymsp[-2].minor.yy203->pLast->pNext = yymsp[-1].minor.yy203;
108948108528
yymsp[-2].minor.yy203->pLast = yymsp[-1].minor.yy203;
108949108529
yygotominor.yy203 = yymsp[-2].minor.yy203;
108950108530
}
108951
-#line 3365 "parse.c"
108952108531
break;
108953108532
case 284: /* trigger_cmd_list ::= trigger_cmd SEMI */
108954
-#line 1217 "parse.y"
108955108533
{
108956108534
assert( yymsp[-1].minor.yy203!=0 );
108957108535
yymsp[-1].minor.yy203->pLast = yymsp[-1].minor.yy203;
108958108536
yygotominor.yy203 = yymsp[-1].minor.yy203;
108959108537
}
108960
-#line 3374 "parse.c"
108961108538
break;
108962108539
case 286: /* trnm ::= nm DOT nm */
108963
-#line 1229 "parse.y"
108964108540
{
108965108541
yygotominor.yy0 = yymsp[0].minor.yy0;
108966108542
sqlite3ErrorMsg(pParse,
108967108543
"qualified table names are not allowed on INSERT, UPDATE, and DELETE "
108968108544
"statements within triggers");
108969108545
}
108970
-#line 3384 "parse.c"
108971108546
break;
108972108547
case 288: /* tridxby ::= INDEXED BY nm */
108973
-#line 1241 "parse.y"
108974108548
{
108975108549
sqlite3ErrorMsg(pParse,
108976108550
"the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
108977108551
"within triggers");
108978108552
}
108979
-#line 3393 "parse.c"
108980108553
break;
108981108554
case 289: /* tridxby ::= NOT INDEXED */
108982
-#line 1246 "parse.y"
108983108555
{
108984108556
sqlite3ErrorMsg(pParse,
108985108557
"the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
108986108558
"within triggers");
108987108559
}
108988
-#line 3402 "parse.c"
108989108560
break;
108990108561
case 290: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */
108991
-#line 1259 "parse.y"
108992108562
{ yygotominor.yy203 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy322, yymsp[0].minor.yy314, yymsp[-5].minor.yy210); }
108993
-#line 3407 "parse.c"
108994108563
break;
108995108564
case 291: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */
108996
-#line 1264 "parse.y"
108997108565
{yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy384, yymsp[-1].minor.yy322, 0, yymsp[-7].minor.yy210);}
108998
-#line 3412 "parse.c"
108999108566
break;
109000108567
case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */
109001
-#line 1267 "parse.y"
109002108568
{yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy384, 0, yymsp[0].minor.yy387, yymsp[-4].minor.yy210);}
109003
-#line 3417 "parse.c"
109004108569
break;
109005108570
case 293: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */
109006
-#line 1271 "parse.y"
109007108571
{yygotominor.yy203 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy314);}
109008
-#line 3422 "parse.c"
109009108572
break;
109010108573
case 294: /* trigger_cmd ::= select */
109011
-#line 1274 "parse.y"
109012108574
{yygotominor.yy203 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy387); }
109013
-#line 3427 "parse.c"
109014108575
break;
109015108576
case 295: /* expr ::= RAISE LP IGNORE RP */
109016
-#line 1277 "parse.y"
109017108577
{
109018108578
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0);
109019108579
if( yygotominor.yy118.pExpr ){
109020108580
yygotominor.yy118.pExpr->affinity = OE_Ignore;
109021108581
}
109022108582
yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z;
109023108583
yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
109024108584
}
109025
-#line 3439 "parse.c"
109026108585
break;
109027108586
case 296: /* expr ::= RAISE LP raisetype COMMA nm RP */
109028
-#line 1285 "parse.y"
109029108587
{
109030108588
yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0);
109031108589
if( yygotominor.yy118.pExpr ) {
109032108590
yygotominor.yy118.pExpr->affinity = (char)yymsp[-3].minor.yy4;
109033108591
}
109034108592
yygotominor.yy118.zStart = yymsp[-5].minor.yy0.z;
109035108593
yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
109036108594
}
109037
-#line 3451 "parse.c"
109038108595
break;
109039108596
case 297: /* raisetype ::= ROLLBACK */
109040
-#line 1296 "parse.y"
109041108597
{yygotominor.yy4 = OE_Rollback;}
109042
-#line 3456 "parse.c"
109043108598
break;
109044108599
case 299: /* raisetype ::= FAIL */
109045
-#line 1298 "parse.y"
109046108600
{yygotominor.yy4 = OE_Fail;}
109047
-#line 3461 "parse.c"
109048108601
break;
109049108602
case 300: /* cmd ::= DROP TRIGGER ifexists fullname */
109050
-#line 1303 "parse.y"
109051108603
{
109052108604
sqlite3DropTrigger(pParse,yymsp[0].minor.yy259,yymsp[-1].minor.yy4);
109053108605
}
109054
-#line 3468 "parse.c"
109055108606
break;
109056108607
case 301: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
109057
-#line 1310 "parse.y"
109058108608
{
109059108609
sqlite3Attach(pParse, yymsp[-3].minor.yy118.pExpr, yymsp[-1].minor.yy118.pExpr, yymsp[0].minor.yy314);
109060108610
}
109061
-#line 3475 "parse.c"
109062108611
break;
109063108612
case 302: /* cmd ::= DETACH database_kw_opt expr */
109064
-#line 1313 "parse.y"
109065108613
{
109066108614
sqlite3Detach(pParse, yymsp[0].minor.yy118.pExpr);
109067108615
}
109068
-#line 3482 "parse.c"
109069108616
break;
109070108617
case 307: /* cmd ::= REINDEX */
109071
-#line 1328 "parse.y"
109072108618
{sqlite3Reindex(pParse, 0, 0);}
109073
-#line 3487 "parse.c"
109074108619
break;
109075108620
case 308: /* cmd ::= REINDEX nm dbnm */
109076
-#line 1329 "parse.y"
109077108621
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
109078
-#line 3492 "parse.c"
109079108622
break;
109080108623
case 309: /* cmd ::= ANALYZE */
109081
-#line 1334 "parse.y"
109082108624
{sqlite3Analyze(pParse, 0, 0);}
109083
-#line 3497 "parse.c"
109084108625
break;
109085108626
case 310: /* cmd ::= ANALYZE nm dbnm */
109086
-#line 1335 "parse.y"
109087108627
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
109088
-#line 3502 "parse.c"
109089108628
break;
109090108629
case 311: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
109091
-#line 1340 "parse.y"
109092108630
{
109093108631
sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy259,&yymsp[0].minor.yy0);
109094108632
}
109095
-#line 3509 "parse.c"
109096108633
break;
109097108634
case 312: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */
109098
-#line 1343 "parse.y"
109099108635
{
109100108636
sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0);
109101108637
}
109102
-#line 3516 "parse.c"
109103108638
break;
109104108639
case 313: /* add_column_fullname ::= fullname */
109105
-#line 1346 "parse.y"
109106108640
{
109107108641
pParse->db->lookaside.bEnabled = 0;
109108108642
sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy259);
109109108643
}
109110
-#line 3524 "parse.c"
109111108644
break;
109112108645
case 316: /* cmd ::= create_vtab */
109113
-#line 1356 "parse.y"
109114108646
{sqlite3VtabFinishParse(pParse,0);}
109115
-#line 3529 "parse.c"
109116108647
break;
109117108648
case 317: /* cmd ::= create_vtab LP vtabarglist RP */
109118
-#line 1357 "parse.y"
109119108649
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
109120
-#line 3534 "parse.c"
109121108650
break;
109122108651
case 318: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */
109123
-#line 1358 "parse.y"
109124108652
{
109125108653
sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
109126108654
}
109127
-#line 3541 "parse.c"
109128108655
break;
109129108656
case 321: /* vtabarg ::= */
109130
-#line 1363 "parse.y"
109131108657
{sqlite3VtabArgInit(pParse);}
109132
-#line 3546 "parse.c"
109133108658
break;
109134108659
case 323: /* vtabargtoken ::= ANY */
109135108660
case 324: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==324);
109136108661
case 325: /* lp ::= LP */ yytestcase(yyruleno==325);
109137
-#line 1365 "parse.y"
109138108662
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
109139
-#line 3553 "parse.c"
109140108663
break;
109141108664
default:
109142108665
/* (0) input ::= cmdlist */ yytestcase(yyruleno==0);
109143108666
/* (1) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==1);
109144108667
/* (2) cmdlist ::= ecmd */ yytestcase(yyruleno==2);
@@ -109236,17 +108759,15 @@
109236108759
int yymajor, /* The major type of the error token */
109237108760
YYMINORTYPE yyminor /* The minor type of the error token */
109238108761
){
109239108762
sqlite3ParserARG_FETCH;
109240108763
#define TOKEN (yyminor.yy0)
109241
-#line 32 "parse.y"
109242108764
109243108765
UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
109244108766
assert( TOKEN.z[0] ); /* The tokenizer always gives us a token */
109245108767
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
109246108768
pParse->parseError = 1;
109247
-#line 3661 "parse.c"
109248108769
sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
109249108770
}
109250108771
109251108772
/*
109252108773
** The following is executed when the parser accepts
@@ -109436,11 +108957,10 @@
109436108957
return;
109437108958
}
109438108959
109439108960
/************** End of parse.c ***********************************************/
109440108961
/************** Begin file tokenize.c ****************************************/
109441
-#line 1 "tsrc/tokenize.c"
109442108962
/*
109443108963
** 2001 September 15
109444108964
**
109445108965
** The author disclaims copyright to this source code. In place of
109446108966
** a legal notice, here is a blessing:
@@ -109502,11 +109022,10 @@
109502109022
** named keywordhash.h and then included into this source file by
109503109023
** the #include below.
109504109024
*/
109505109025
/************** Include keywordhash.h in the middle of tokenize.c ************/
109506109026
/************** Begin file keywordhash.h *************************************/
109507
-#line 1 "tsrc/keywordhash.h"
109508109027
/***** This file contains automatically generated code ******
109509109028
**
109510109029
** The code in this file has been automatically generated by
109511109030
**
109512109031
** sqlite/tool/mkkeywordhash.c
@@ -109776,11 +109295,10 @@
109776109295
}
109777109296
#define SQLITE_N_KEYWORD 121
109778109297
109779109298
/************** End of keywordhash.h *****************************************/
109780109299
/************** Continuing where we left off in tokenize.c *******************/
109781
-#line 66 "tsrc/tokenize.c"
109782109300
109783109301
109784109302
/*
109785109303
** If X is a character that can be used in an identifier then
109786109304
** IdChar(X) will be true. Otherwise it is false.
@@ -110241,11 +109759,10 @@
110241109759
return nErr;
110242109760
}
110243109761
110244109762
/************** End of tokenize.c ********************************************/
110245109763
/************** Begin file complete.c ****************************************/
110246
-#line 1 "tsrc/complete.c"
110247109764
/*
110248109765
** 2001 September 15
110249109766
**
110250109767
** The author disclaims copyright to this source code. In place of
110251109768
** a legal notice, here is a blessing:
@@ -110527,11 +110044,10 @@
110527110044
#endif /* SQLITE_OMIT_UTF16 */
110528110045
#endif /* SQLITE_OMIT_COMPLETE */
110529110046
110530110047
/************** End of complete.c ********************************************/
110531110048
/************** Begin file main.c ********************************************/
110532
-#line 1 "tsrc/main.c"
110533110049
/*
110534110050
** 2001 September 15
110535110051
**
110536110052
** The author disclaims copyright to this source code. In place of
110537110053
** a legal notice, here is a blessing:
@@ -110548,11 +110064,10 @@
110548110064
*/
110549110065
110550110066
#ifdef SQLITE_ENABLE_FTS3
110551110067
/************** Include fts3.h in the middle of main.c ***********************/
110552110068
/************** Begin file fts3.h ********************************************/
110553
-#line 1 "tsrc/fts3.h"
110554110069
/*
110555110070
** 2006 Oct 10
110556110071
**
110557110072
** The author disclaims copyright to this source code. In place of
110558110073
** a legal notice, here is a blessing:
@@ -110577,16 +110092,14 @@
110577110092
} /* extern "C" */
110578110093
#endif /* __cplusplus */
110579110094
110580110095
/************** End of fts3.h ************************************************/
110581110096
/************** Continuing where we left off in main.c ***********************/
110582
-#line 21 "tsrc/main.c"
110583110097
#endif
110584110098
#ifdef SQLITE_ENABLE_RTREE
110585110099
/************** Include rtree.h in the middle of main.c **********************/
110586110100
/************** Begin file rtree.h *******************************************/
110587
-#line 1 "tsrc/rtree.h"
110588110101
/*
110589110102
** 2008 May 26
110590110103
**
110591110104
** The author disclaims copyright to this source code. In place of
110592110105
** a legal notice, here is a blessing:
@@ -110611,16 +110124,14 @@
110611110124
} /* extern "C" */
110612110125
#endif /* __cplusplus */
110613110126
110614110127
/************** End of rtree.h ***********************************************/
110615110128
/************** Continuing where we left off in main.c ***********************/
110616
-#line 24 "tsrc/main.c"
110617110129
#endif
110618110130
#ifdef SQLITE_ENABLE_ICU
110619110131
/************** Include sqliteicu.h in the middle of main.c ******************/
110620110132
/************** Begin file sqliteicu.h ***************************************/
110621
-#line 1 "tsrc/sqliteicu.h"
110622110133
/*
110623110134
** 2008 May 26
110624110135
**
110625110136
** The author disclaims copyright to this source code. In place of
110626110137
** a legal notice, here is a blessing:
@@ -110646,11 +110157,10 @@
110646110157
#endif /* __cplusplus */
110647110158
110648110159
110649110160
/************** End of sqliteicu.h *******************************************/
110650110161
/************** Continuing where we left off in main.c ***********************/
110651
-#line 27 "tsrc/main.c"
110652110162
#endif
110653110163
110654110164
#ifndef SQLITE_AMALGAMATION
110655110165
/* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant
110656110166
** contains the text of SQLITE_VERSION macro.
@@ -113577,11 +113087,10 @@
113577113087
return 0;
113578113088
}
113579113089
113580113090
/************** End of main.c ************************************************/
113581113091
/************** Begin file notify.c ******************************************/
113582
-#line 1 "tsrc/notify.c"
113583113092
/*
113584113093
** 2009 March 3
113585113094
**
113586113095
** The author disclaims copyright to this source code. In place of
113587113096
** a legal notice, here is a blessing:
@@ -113911,11 +113420,10 @@
113911113420
}
113912113421
#endif
113913113422
113914113423
/************** End of notify.c **********************************************/
113915113424
/************** Begin file fts3.c ********************************************/
113916
-#line 1 "tsrc/fts3.c"
113917113425
/*
113918113426
** 2006 Oct 10
113919113427
**
113920113428
** The author disclaims copyright to this source code. In place of
113921113429
** a legal notice, here is a blessing:
@@ -114208,11 +113716,10 @@
114208113716
** into a single segment.
114209113717
*/
114210113718
114211113719
/************** Include fts3Int.h in the middle of fts3.c ********************/
114212113720
/************** Begin file fts3Int.h *****************************************/
114213
-#line 1 "tsrc/fts3Int.h"
114214113721
/*
114215113722
** 2009 Nov 12
114216113723
**
114217113724
** The author disclaims copyright to this source code. In place of
114218113725
** a legal notice, here is a blessing:
@@ -114247,11 +113754,10 @@
114247113754
SQLITE_API extern const sqlite3_api_routines *sqlite3_api;
114248113755
#endif
114249113756
114250113757
/************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/
114251113758
/************** Begin file fts3_tokenizer.h **********************************/
114252
-#line 1 "tsrc/fts3_tokenizer.h"
114253113759
/*
114254113760
** 2006 July 10
114255113761
**
114256113762
** The author disclaims copyright to this source code.
114257113763
**
@@ -114402,14 +113908,12 @@
114402113908
114403113909
#endif /* _FTS3_TOKENIZER_H_ */
114404113910
114405113911
/************** End of fts3_tokenizer.h **************************************/
114406113912
/************** Continuing where we left off in fts3Int.h ********************/
114407
-#line 40 "tsrc/fts3Int.h"
114408113913
/************** Include fts3_hash.h in the middle of fts3Int.h ***************/
114409113914
/************** Begin file fts3_hash.h ***************************************/
114410
-#line 1 "tsrc/fts3_hash.h"
114411113915
/*
114412113916
** 2001 September 22
114413113917
**
114414113918
** The author disclaims copyright to this source code. In place of
114415113919
** a legal notice, here is a blessing:
@@ -114521,11 +114025,10 @@
114521114025
114522114026
#endif /* _FTS3_HASH_H_ */
114523114027
114524114028
/************** End of fts3_hash.h *******************************************/
114525114029
/************** Continuing where we left off in fts3Int.h ********************/
114526
-#line 41 "tsrc/fts3Int.h"
114527114030
114528114031
/*
114529114032
** This constant controls how often segments are merged. Once there are
114530114033
** FTS3_MERGE_COUNT segments of level N, they are merged into a single
114531114034
** segment of level N+1.
@@ -114998,11 +114501,10 @@
114998114501
#endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
114999114502
#endif /* _FTSINT_H */
115000114503
115001114504
/************** End of fts3Int.h *********************************************/
115002114505
/************** Continuing where we left off in fts3.c ***********************/
115003
-#line 296 "tsrc/fts3.c"
115004114506
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
115005114507
115006114508
#if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)
115007114509
# define SQLITE_CORE 1
115008114510
#endif
@@ -119548,11 +119050,10 @@
119548119050
119549119051
#endif
119550119052
119551119053
/************** End of fts3.c ************************************************/
119552119054
/************** Begin file fts3_aux.c ****************************************/
119553
-#line 1 "tsrc/fts3_aux.c"
119554119055
/*
119555119056
** 2011 Jan 27
119556119057
**
119557119058
** The author disclaims copyright to this source code. In place of
119558119059
** a legal notice, here is a blessing:
@@ -120025,11 +119526,10 @@
120025119526
120026119527
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
120027119528
120028119529
/************** End of fts3_aux.c ********************************************/
120029119530
/************** Begin file fts3_expr.c ***************************************/
120030
-#line 1 "tsrc/fts3_expr.c"
120031119531
/*
120032119532
** 2008 Nov 28
120033119533
**
120034119534
** The author disclaims copyright to this source code. In place of
120035119535
** a legal notice, here is a blessing:
@@ -120992,11 +120492,10 @@
120992120492
#endif
120993120493
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
120994120494
120995120495
/************** End of fts3_expr.c *******************************************/
120996120496
/************** Begin file fts3_hash.c ***************************************/
120997
-#line 1 "tsrc/fts3_hash.c"
120998120497
/*
120999120498
** 2001 September 22
121000120499
**
121001120500
** The author disclaims copyright to this source code. In place of
121002120501
** a legal notice, here is a blessing:
@@ -121377,11 +120876,10 @@
121377120876
121378120877
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
121379120878
121380120879
/************** End of fts3_hash.c *******************************************/
121381120880
/************** Begin file fts3_porter.c *************************************/
121382
-#line 1 "tsrc/fts3_porter.c"
121383120881
/*
121384120882
** 2006 September 30
121385120883
**
121386120884
** The author disclaims copyright to this source code. In place of
121387120885
** a legal notice, here is a blessing:
@@ -122024,11 +121522,10 @@
122024121522
122025121523
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
122026121524
122027121525
/************** End of fts3_porter.c *****************************************/
122028121526
/************** Begin file fts3_tokenizer.c **********************************/
122029
-#line 1 "tsrc/fts3_tokenizer.c"
122030121527
/*
122031121528
** 2007 June 22
122032121529
**
122033121530
** The author disclaims copyright to this source code. In place of
122034121531
** a legal notice, here is a blessing:
@@ -122516,11 +122013,10 @@
122516122013
122517122014
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
122518122015
122519122016
/************** End of fts3_tokenizer.c **************************************/
122520122017
/************** Begin file fts3_tokenizer1.c *********************************/
122521
-#line 1 "tsrc/fts3_tokenizer1.c"
122522122018
/*
122523122019
** 2006 Oct 10
122524122020
**
122525122021
** The author disclaims copyright to this source code. In place of
122526122022
** a legal notice, here is a blessing:
@@ -122751,11 +122247,10 @@
122751122247
122752122248
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
122753122249
122754122250
/************** End of fts3_tokenizer1.c *************************************/
122755122251
/************** Begin file fts3_write.c **************************************/
122756
-#line 1 "tsrc/fts3_write.c"
122757122252
/*
122758122253
** 2009 Oct 23
122759122254
**
122760122255
** The author disclaims copyright to this source code. In place of
122761122256
** a legal notice, here is a blessing:
@@ -126022,11 +125517,10 @@
126022125517
126023125518
#endif
126024125519
126025125520
/************** End of fts3_write.c ******************************************/
126026125521
/************** Begin file fts3_snippet.c ************************************/
126027
-#line 1 "tsrc/fts3_snippet.c"
126028125522
/*
126029125523
** 2009 Oct 23
126030125524
**
126031125525
** The author disclaims copyright to this source code. In place of
126032125526
** a legal notice, here is a blessing:
@@ -127524,11 +127018,10 @@
127524127018
127525127019
#endif
127526127020
127527127021
/************** End of fts3_snippet.c ****************************************/
127528127022
/************** Begin file rtree.c *******************************************/
127529
-#line 1 "tsrc/rtree.c"
127530127023
/*
127531127024
** 2001 September 15
127532127025
**
127533127026
** The author disclaims copyright to this source code. In place of
127534127027
** a legal notice, here is a blessing:
@@ -130806,11 +130299,10 @@
130806130299
130807130300
#endif
130808130301
130809130302
/************** End of rtree.c ***********************************************/
130810130303
/************** Begin file icu.c *********************************************/
130811
-#line 1 "tsrc/icu.c"
130812130304
/*
130813130305
** 2007 May 6
130814130306
**
130815130307
** The author disclaims copyright to this source code. In place of
130816130308
** a legal notice, here is a blessing:
@@ -131309,11 +130801,10 @@
131309130801
131310130802
#endif
131311130803
131312130804
/************** End of icu.c *************************************************/
131313130805
/************** Begin file fts3_icu.c ****************************************/
131314
-#line 1 "tsrc/fts3_icu.c"
131315130806
/*
131316130807
** 2007 June 22
131317130808
**
131318130809
** The author disclaims copyright to this source code. In place of
131319130810
** a legal notice, here is a blessing:
131320130811
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -24,11 +24,10 @@
24 #endif
25 #ifndef SQLITE_API
26 # define SQLITE_API
27 #endif
28 /************** Begin file sqliteInt.h ***************************************/
29 #line 1 "tsrc/sqliteInt.h"
30 /*
31 ** 2001 September 15
32 **
33 ** The author disclaims copyright to this source code. In place of
34 ** a legal notice, here is a blessing:
@@ -79,11 +78,10 @@
79 #include "config.h"
80 #endif
81
82 /************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/
83 /************** Begin file sqliteLimit.h *************************************/
84 #line 1 "tsrc/sqliteLimit.h"
85 /*
86 ** 2007 May 7
87 **
88 ** The author disclaims copyright to this source code. In place of
89 ** a legal notice, here is a blessing:
@@ -291,11 +289,10 @@
291 # define SQLITE_MAX_TRIGGER_DEPTH 1000
292 #endif
293
294 /************** End of sqliteLimit.h *****************************************/
295 /************** Continuing where we left off in sqliteInt.h ******************/
296 #line 54 "tsrc/sqliteInt.h"
297
298 /* Disable nuisance warnings on Borland compilers */
299 #if defined(__BORLANDC__)
300 #pragma warn -rch /* unreachable code */
301 #pragma warn -ccc /* Condition is always true or false */
@@ -548,11 +545,10 @@
548 # define unlikely(X) !!(X)
549 #endif
550
551 /************** Include sqlite3.h in the middle of sqliteInt.h ***************/
552 /************** Begin file sqlite3.h *****************************************/
553 #line 1 "tsrc/sqlite3.h"
554 /*
555 ** 2001 September 15
556 **
557 ** The author disclaims copyright to this source code. In place of
558 ** a legal notice, here is a blessing:
@@ -660,11 +656,11 @@
660 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
661 ** [sqlite_version()] and [sqlite_source_id()].
662 */
663 #define SQLITE_VERSION "3.7.8"
664 #define SQLITE_VERSION_NUMBER 3007008
665 #define SQLITE_SOURCE_ID "2011-09-14 13:41:40 a1f3aeeb0988c848d40ce8f6da6e902935a997e2"
666
667 /*
668 ** CAPI3REF: Run-Time Library Version Numbers
669 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
670 **
@@ -7309,14 +7305,12 @@
7309 #endif /* ifndef _SQLITE3RTREE_H_ */
7310
7311
7312 /************** End of sqlite3.h *********************************************/
7313 /************** Continuing where we left off in sqliteInt.h ******************/
7314 #line 309 "tsrc/sqliteInt.h"
7315 /************** Include hash.h in the middle of sqliteInt.h ******************/
7316 /************** Begin file hash.h ********************************************/
7317 #line 1 "tsrc/hash.h"
7318 /*
7319 ** 2001 September 22
7320 **
7321 ** The author disclaims copyright to this source code. In place of
7322 ** a legal notice, here is a blessing:
@@ -7412,14 +7406,12 @@
7412
7413 #endif /* _SQLITE_HASH_H_ */
7414
7415 /************** End of hash.h ************************************************/
7416 /************** Continuing where we left off in sqliteInt.h ******************/
7417 #line 310 "tsrc/sqliteInt.h"
7418 /************** Include parse.h in the middle of sqliteInt.h *****************/
7419 /************** Begin file parse.h *******************************************/
7420 #line 1 "tsrc/parse.h"
7421 #define TK_SEMI 1
7422 #define TK_EXPLAIN 2
7423 #define TK_QUERY 3
7424 #define TK_PLAN 4
7425 #define TK_BEGIN 5
@@ -7576,11 +7568,10 @@
7576 #define TK_UMINUS 156
7577 #define TK_UPLUS 157
7578
7579 /************** End of parse.h ***********************************************/
7580 /************** Continuing where we left off in sqliteInt.h ******************/
7581 #line 311 "tsrc/sqliteInt.h"
7582 #include <stdio.h>
7583 #include <stdlib.h>
7584 #include <string.h>
7585 #include <assert.h>
7586 #include <stddef.h>
@@ -7920,11 +7911,10 @@
7920 ** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
7921 ** pointer types (i.e. FuncDef) defined above.
7922 */
7923 /************** Include btree.h in the middle of sqliteInt.h *****************/
7924 /************** Begin file btree.h *******************************************/
7925 #line 1 "tsrc/btree.h"
7926 /*
7927 ** 2001 September 15
7928 **
7929 ** The author disclaims copyright to this source code. In place of
7930 ** a legal notice, here is a blessing:
@@ -8165,14 +8155,12 @@
8165
8166 #endif /* _BTREE_H_ */
8167
8168 /************** End of btree.h ***********************************************/
8169 /************** Continuing where we left off in sqliteInt.h ******************/
8170 #line 653 "tsrc/sqliteInt.h"
8171 /************** Include vdbe.h in the middle of sqliteInt.h ******************/
8172 /************** Begin file vdbe.h ********************************************/
8173 #line 1 "tsrc/vdbe.h"
8174 /*
8175 ** 2001 September 15
8176 **
8177 ** The author disclaims copyright to this source code. In place of
8178 ** a legal notice, here is a blessing:
@@ -8333,11 +8321,10 @@
8333 ** The makefile scans the vdbe.c source file and creates the "opcodes.h"
8334 ** header file that defines a number for each opcode used by the VDBE.
8335 */
8336 /************** Include opcodes.h in the middle of vdbe.h ********************/
8337 /************** Begin file opcodes.h *****************************************/
8338 #line 1 "tsrc/opcodes.h"
8339 /* Automatically generated. Do not edit */
8340 /* See the mkopcodeh.awk script for details */
8341 #define OP_Goto 1
8342 #define OP_Gosub 2
8343 #define OP_Return 3
@@ -8387,108 +8374,109 @@
8387 #define OP_Jump 25
8388 #define OP_And 69 /* same as TK_AND */
8389 #define OP_Or 68 /* same as TK_OR */
8390 #define OP_Not 19 /* same as TK_NOT */
8391 #define OP_BitNot 93 /* same as TK_BITNOT */
8392 #define OP_If 26
8393 #define OP_IfNot 27
 
8394 #define OP_IsNull 73 /* same as TK_ISNULL */
8395 #define OP_NotNull 74 /* same as TK_NOTNULL */
8396 #define OP_Column 28
8397 #define OP_Affinity 29
8398 #define OP_MakeRecord 30
8399 #define OP_Count 31
8400 #define OP_Savepoint 32
8401 #define OP_AutoCommit 33
8402 #define OP_Transaction 34
8403 #define OP_ReadCookie 35
8404 #define OP_SetCookie 36
8405 #define OP_VerifyCookie 37
8406 #define OP_OpenRead 38
8407 #define OP_OpenWrite 39
8408 #define OP_OpenAutoindex 40
8409 #define OP_OpenEphemeral 41
8410 #define OP_SorterOpen 42
8411 #define OP_OpenPseudo 43
8412 #define OP_Close 44
8413 #define OP_SeekLt 45
8414 #define OP_SeekLe 46
8415 #define OP_SeekGe 47
8416 #define OP_SeekGt 48
8417 #define OP_Seek 49
8418 #define OP_NotFound 50
8419 #define OP_Found 51
8420 #define OP_IsUnique 52
8421 #define OP_NotExists 53
8422 #define OP_Sequence 54
8423 #define OP_NewRowid 55
8424 #define OP_Insert 56
8425 #define OP_InsertInt 57
8426 #define OP_Delete 58
8427 #define OP_ResetCount 59
8428 #define OP_SorterCompare 60
8429 #define OP_SorterData 61
8430 #define OP_RowKey 62
8431 #define OP_RowData 63
8432 #define OP_Rowid 64
8433 #define OP_NullRow 65
8434 #define OP_Last 66
8435 #define OP_SorterSort 67
8436 #define OP_Sort 70
8437 #define OP_Rewind 71
8438 #define OP_SorterNext 72
8439 #define OP_Prev 81
8440 #define OP_Next 92
8441 #define OP_SorterInsert 95
8442 #define OP_IdxInsert 96
8443 #define OP_IdxDelete 97
8444 #define OP_IdxRowid 98
8445 #define OP_IdxLT 99
8446 #define OP_IdxGE 100
8447 #define OP_Destroy 101
8448 #define OP_Clear 102
8449 #define OP_CreateIndex 103
8450 #define OP_CreateTable 104
8451 #define OP_ParseSchema 105
8452 #define OP_LoadAnalysis 106
8453 #define OP_DropTable 107
8454 #define OP_DropIndex 108
8455 #define OP_DropTrigger 109
8456 #define OP_IntegrityCk 110
8457 #define OP_RowSetAdd 111
8458 #define OP_RowSetRead 112
8459 #define OP_RowSetTest 113
8460 #define OP_Program 114
8461 #define OP_Param 115
8462 #define OP_FkCounter 116
8463 #define OP_FkIfZero 117
8464 #define OP_MemMax 118
8465 #define OP_IfPos 119
8466 #define OP_IfNeg 120
8467 #define OP_IfZero 121
8468 #define OP_AggStep 122
8469 #define OP_AggFinal 123
8470 #define OP_Checkpoint 124
8471 #define OP_JournalMode 125
8472 #define OP_Vacuum 126
8473 #define OP_IncrVacuum 127
8474 #define OP_Expire 128
8475 #define OP_TableLock 129
8476 #define OP_VBegin 131
8477 #define OP_VCreate 132
8478 #define OP_VDestroy 133
8479 #define OP_VOpen 134
8480 #define OP_VFilter 135
8481 #define OP_VColumn 136
8482 #define OP_VNext 137
8483 #define OP_VRename 138
8484 #define OP_VUpdate 139
8485 #define OP_Pagecount 140
8486 #define OP_MaxPgcnt 146
8487 #define OP_Trace 147
8488 #define OP_Noop 148
8489 #define OP_Explain 149
8490
8491
8492 /* Properties such as "out2" or "jump" that are specified in
8493 ** comments following the "case" for each opcode in the vdbe.c
8494 ** are encoded into bitvectors as follows:
@@ -8502,30 +8490,29 @@
8502 #define OPFLG_OUT3 0x0040 /* out3: P3 is an output */
8503 #define OPFLG_INITIALIZER {\
8504 /* 0 */ 0x00, 0x01, 0x05, 0x04, 0x04, 0x10, 0x00, 0x02,\
8505 /* 8 */ 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x24, 0x24,\
8506 /* 16 */ 0x00, 0x00, 0x00, 0x24, 0x04, 0x05, 0x04, 0x00,\
8507 /* 24 */ 0x00, 0x01, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02,\
8508 /* 32 */ 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00,\
8509 /* 40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11,\
8510 /* 48 */ 0x11, 0x08, 0x11, 0x11, 0x11, 0x11, 0x02, 0x02,\
8511 /* 56 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
8512 /* 64 */ 0x02, 0x00, 0x01, 0x01, 0x4c, 0x4c, 0x01, 0x01,\
8513 /* 72 */ 0x01, 0x05, 0x05, 0x15, 0x15, 0x15, 0x15, 0x15,\
8514 /* 80 */ 0x15, 0x01, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c,\
8515 /* 88 */ 0x4c, 0x4c, 0x4c, 0x4c, 0x01, 0x24, 0x02, 0x08,\
8516 /* 96 */ 0x08, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00, 0x02,\
8517 /* 104 */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,\
8518 /* 112 */ 0x45, 0x15, 0x01, 0x02, 0x00, 0x01, 0x08, 0x05,\
8519 /* 120 */ 0x05, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01,\
8520 /* 128 */ 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01,\
8521 /* 136 */ 0x00, 0x01, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04,\
8522 /* 144 */ 0x04, 0x04, 0x02, 0x00, 0x00, 0x00,}
8523
8524 /************** End of opcodes.h *********************************************/
8525 /************** Continuing where we left off in vdbe.h ***********************/
8526 #line 164 "tsrc/vdbe.h"
8527
8528 /*
8529 ** Prototypes for the VDBE interface. See comments on the implementation
8530 ** for a description of what each of these routines does.
8531 */
@@ -8541,11 +8528,11 @@
8541 SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1);
8542 SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2);
8543 SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3);
8544 SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5);
8545 SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr);
8546 SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr, int N);
8547 SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);
8548 SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int);
8549 SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int);
8550 SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*);
8551 SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*);
@@ -8596,14 +8583,12 @@
8596
8597 #endif
8598
8599 /************** End of vdbe.h ************************************************/
8600 /************** Continuing where we left off in sqliteInt.h ******************/
8601 #line 654 "tsrc/sqliteInt.h"
8602 /************** Include pager.h in the middle of sqliteInt.h *****************/
8603 /************** Begin file pager.h *******************************************/
8604 #line 1 "tsrc/pager.h"
8605 /*
8606 ** 2001 September 15
8607 **
8608 ** The author disclaims copyright to this source code. In place of
8609 ** a legal notice, here is a blessing:
@@ -8785,14 +8770,12 @@
8785
8786 #endif /* _PAGER_H_ */
8787
8788 /************** End of pager.h ***********************************************/
8789 /************** Continuing where we left off in sqliteInt.h ******************/
8790 #line 655 "tsrc/sqliteInt.h"
8791 /************** Include pcache.h in the middle of sqliteInt.h ****************/
8792 /************** Begin file pcache.h ******************************************/
8793 #line 1 "tsrc/pcache.h"
8794 /*
8795 ** 2008 August 05
8796 **
8797 ** The author disclaims copyright to this source code. In place of
8798 ** a legal notice, here is a blessing:
@@ -8947,15 +8930,13 @@
8947
8948 #endif /* _PCACHE_H_ */
8949
8950 /************** End of pcache.h **********************************************/
8951 /************** Continuing where we left off in sqliteInt.h ******************/
8952 #line 656 "tsrc/sqliteInt.h"
8953
8954 /************** Include os.h in the middle of sqliteInt.h ********************/
8955 /************** Begin file os.h **********************************************/
8956 #line 1 "tsrc/os.h"
8957 /*
8958 ** 2001 September 16
8959 **
8960 ** The author disclaims copyright to this source code. In place of
8961 ** a legal notice, here is a blessing:
@@ -9234,14 +9215,12 @@
9234
9235 #endif /* _SQLITE_OS_H_ */
9236
9237 /************** End of os.h **************************************************/
9238 /************** Continuing where we left off in sqliteInt.h ******************/
9239 #line 658 "tsrc/sqliteInt.h"
9240 /************** Include mutex.h in the middle of sqliteInt.h *****************/
9241 /************** Begin file mutex.h *******************************************/
9242 #line 1 "tsrc/mutex.h"
9243 /*
9244 ** 2007 August 28
9245 **
9246 ** The author disclaims copyright to this source code. In place of
9247 ** a legal notice, here is a blessing:
@@ -9312,11 +9291,10 @@
9312 #define sqlite3MutexEnd()
9313 #endif /* defined(SQLITE_MUTEX_OMIT) */
9314
9315 /************** End of mutex.h ***********************************************/
9316 /************** Continuing where we left off in sqliteInt.h ******************/
9317 #line 659 "tsrc/sqliteInt.h"
9318
9319
9320 /*
9321 ** Each database file to be accessed by the system is an instance
9322 ** of the following structure. There are normally two of these structures
@@ -10509,11 +10487,12 @@
10509 char *zDatabase; /* Name of database holding this table */
10510 char *zName; /* Name of the table */
10511 char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */
10512 Table *pTab; /* An SQL table corresponding to zName */
10513 Select *pSelect; /* A SELECT statement used in place of a table name */
10514 u8 isPopulated; /* Temporary table associated with SELECT is populated */
 
10515 u8 jointype; /* Type of join between this able and the previous */
10516 u8 notIndexed; /* True if there is a NOT INDEXED clause */
10517 u8 isCorrelated; /* True if sub-query is correlated */
10518 #ifndef SQLITE_OMIT_EXPLAIN
10519 u8 iSelectId; /* If pSelect!=0, the id of the sub-select in EQP */
@@ -11915,11 +11894,10 @@
11915
11916 #endif /* _SQLITEINT_H_ */
11917
11918 /************** End of sqliteInt.h *******************************************/
11919 /************** Begin file global.c ******************************************/
11920 #line 1 "tsrc/global.c"
11921 /*
11922 ** 2008 June 13
11923 **
11924 ** The author disclaims copyright to this source code. In place of
11925 ** a legal notice, here is a blessing:
@@ -12138,11 +12116,10 @@
12138 */
12139 SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER;
12140
12141 /************** End of global.c **********************************************/
12142 /************** Begin file ctime.c *******************************************/
12143 #line 1 "tsrc/ctime.c"
12144 /*
12145 ** 2010 February 23
12146 **
12147 ** The author disclaims copyright to this source code. In place of
12148 ** a legal notice, here is a blessing:
@@ -12543,11 +12520,10 @@
12543
12544 #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
12545
12546 /************** End of ctime.c ***********************************************/
12547 /************** Begin file status.c ******************************************/
12548 #line 1 "tsrc/status.c"
12549 /*
12550 ** 2008 June 18
12551 **
12552 ** The author disclaims copyright to this source code. In place of
12553 ** a legal notice, here is a blessing:
@@ -12561,11 +12537,10 @@
12561 ** This module implements the sqlite3_status() interface and related
12562 ** functionality.
12563 */
12564 /************** Include vdbeInt.h in the middle of status.c ******************/
12565 /************** Begin file vdbeInt.h *****************************************/
12566 #line 1 "tsrc/vdbeInt.h"
12567 /*
12568 ** 2003 September 6
12569 **
12570 ** The author disclaims copyright to this source code. In place of
12571 ** a legal notice, here is a blessing:
@@ -13013,11 +12988,10 @@
13013
13014 #endif /* !defined(_VDBEINT_H_) */
13015
13016 /************** End of vdbeInt.h *********************************************/
13017 /************** Continuing where we left off in status.c *********************/
13018 #line 18 "tsrc/status.c"
13019
13020 /*
13021 ** Variables in which to record status information.
13022 */
13023 typedef struct sqlite3StatType sqlite3StatType;
@@ -13227,11 +13201,10 @@
13227 return rc;
13228 }
13229
13230 /************** End of status.c **********************************************/
13231 /************** Begin file date.c ********************************************/
13232 #line 1 "tsrc/date.c"
13233 /*
13234 ** 2003 October 31
13235 **
13236 ** The author disclaims copyright to this source code. In place of
13237 ** a legal notice, here is a blessing:
@@ -14355,11 +14328,10 @@
14355 }
14356 }
14357
14358 /************** End of date.c ************************************************/
14359 /************** Begin file os.c **********************************************/
14360 #line 1 "tsrc/os.c"
14361 /*
14362 ** 2005 November 29
14363 **
14364 ** The author disclaims copyright to this source code. In place of
14365 ** a legal notice, here is a blessing:
@@ -14689,11 +14661,10 @@
14689 return SQLITE_OK;
14690 }
14691
14692 /************** End of os.c **************************************************/
14693 /************** Begin file fault.c *******************************************/
14694 #line 1 "tsrc/fault.c"
14695 /*
14696 ** 2008 Jan 22
14697 **
14698 ** The author disclaims copyright to this source code. In place of
14699 ** a legal notice, here is a blessing:
@@ -14779,11 +14750,10 @@
14779
14780 #endif /* #ifndef SQLITE_OMIT_BUILTIN_TEST */
14781
14782 /************** End of fault.c ***********************************************/
14783 /************** Begin file mem0.c ********************************************/
14784 #line 1 "tsrc/mem0.c"
14785 /*
14786 ** 2008 October 28
14787 **
14788 ** The author disclaims copyright to this source code. In place of
14789 ** a legal notice, here is a blessing:
@@ -14841,11 +14811,10 @@
14841
14842 #endif /* SQLITE_ZERO_MALLOC */
14843
14844 /************** End of mem0.c ************************************************/
14845 /************** Begin file mem1.c ********************************************/
14846 #line 1 "tsrc/mem1.c"
14847 /*
14848 ** 2007 August 14
14849 **
14850 ** The author disclaims copyright to this source code. In place of
14851 ** a legal notice, here is a blessing:
@@ -14994,11 +14963,10 @@
14994
14995 #endif /* SQLITE_SYSTEM_MALLOC */
14996
14997 /************** End of mem1.c ************************************************/
14998 /************** Begin file mem2.c ********************************************/
14999 #line 1 "tsrc/mem2.c"
15000 /*
15001 ** 2007 August 15
15002 **
15003 ** The author disclaims copyright to this source code. In place of
15004 ** a legal notice, here is a blessing:
@@ -15525,11 +15493,10 @@
15525
15526 #endif /* SQLITE_MEMDEBUG */
15527
15528 /************** End of mem2.c ************************************************/
15529 /************** Begin file mem3.c ********************************************/
15530 #line 1 "tsrc/mem3.c"
15531 /*
15532 ** 2007 October 14
15533 **
15534 ** The author disclaims copyright to this source code. In place of
15535 ** a legal notice, here is a blessing:
@@ -16215,11 +16182,10 @@
16215
16216 #endif /* SQLITE_ENABLE_MEMSYS3 */
16217
16218 /************** End of mem3.c ************************************************/
16219 /************** Begin file mem5.c ********************************************/
16220 #line 1 "tsrc/mem5.c"
16221 /*
16222 ** 2007 October 14
16223 **
16224 ** The author disclaims copyright to this source code. In place of
16225 ** a legal notice, here is a blessing:
@@ -16799,11 +16765,10 @@
16799
16800 #endif /* SQLITE_ENABLE_MEMSYS5 */
16801
16802 /************** End of mem5.c ************************************************/
16803 /************** Begin file mutex.c *******************************************/
16804 #line 1 "tsrc/mutex.c"
16805 /*
16806 ** 2007 August 14
16807 **
16808 ** The author disclaims copyright to this source code. In place of
16809 ** a legal notice, here is a blessing:
@@ -16955,11 +16920,10 @@
16955
16956 #endif /* SQLITE_MUTEX_OMIT */
16957
16958 /************** End of mutex.c ***********************************************/
16959 /************** Begin file mutex_noop.c **************************************/
16960 #line 1 "tsrc/mutex_noop.c"
16961 /*
16962 ** 2008 October 07
16963 **
16964 ** The author disclaims copyright to this source code. In place of
16965 ** a legal notice, here is a blessing:
@@ -17164,11 +17128,10 @@
17164 #endif /* SQLITE_MUTEX_NOOP */
17165 #endif /* SQLITE_MUTEX_OMIT */
17166
17167 /************** End of mutex_noop.c ******************************************/
17168 /************** Begin file mutex_os2.c ***************************************/
17169 #line 1 "tsrc/mutex_os2.c"
17170 /*
17171 ** 2007 August 28
17172 **
17173 ** The author disclaims copyright to this source code. In place of
17174 ** a legal notice, here is a blessing:
@@ -17441,11 +17404,10 @@
17441 }
17442 #endif /* SQLITE_MUTEX_OS2 */
17443
17444 /************** End of mutex_os2.c *******************************************/
17445 /************** Begin file mutex_unix.c **************************************/
17446 #line 1 "tsrc/mutex_unix.c"
17447 /*
17448 ** 2007 August 28
17449 **
17450 ** The author disclaims copyright to this source code. In place of
17451 ** a legal notice, here is a blessing:
@@ -17795,11 +17757,10 @@
17795
17796 #endif /* SQLITE_MUTEX_PTHREAD */
17797
17798 /************** End of mutex_unix.c ******************************************/
17799 /************** Begin file mutex_w32.c ***************************************/
17800 #line 1 "tsrc/mutex_w32.c"
17801 /*
17802 ** 2007 August 14
17803 **
17804 ** The author disclaims copyright to this source code. In place of
17805 ** a legal notice, here is a blessing:
@@ -18130,11 +18091,10 @@
18130 }
18131 #endif /* SQLITE_MUTEX_W32 */
18132
18133 /************** End of mutex_w32.c *******************************************/
18134 /************** Begin file malloc.c ******************************************/
18135 #line 1 "tsrc/malloc.c"
18136 /*
18137 ** 2001 September 15
18138 **
18139 ** The author disclaims copyright to this source code. In place of
18140 ** a legal notice, here is a blessing:
@@ -18910,11 +18870,10 @@
18910 return rc & (db ? db->errMask : 0xff);
18911 }
18912
18913 /************** End of malloc.c **********************************************/
18914 /************** Begin file printf.c ******************************************/
18915 #line 1 "tsrc/printf.c"
18916 /*
18917 ** The "printf" code that follows dates from the 1980's. It is in
18918 ** the public domain. The original comments are included here for
18919 ** completeness. They are very out-of-date but might be useful as
18920 ** an historical reference. Most of the "enhancements" have been backed
@@ -19942,11 +19901,10 @@
19942 }
19943 #endif
19944
19945 /************** End of printf.c **********************************************/
19946 /************** Begin file random.c ******************************************/
19947 #line 1 "tsrc/random.c"
19948 /*
19949 ** 2001 September 15
19950 **
19951 ** The author disclaims copyright to this source code. In place of
19952 ** a legal notice, here is a blessing:
@@ -20090,11 +20048,10 @@
20090 }
20091 #endif /* SQLITE_OMIT_BUILTIN_TEST */
20092
20093 /************** End of random.c **********************************************/
20094 /************** Begin file utf.c *********************************************/
20095 #line 1 "tsrc/utf.c"
20096 /*
20097 ** 2004 April 13
20098 **
20099 ** The author disclaims copyright to this source code. In place of
20100 ** a legal notice, here is a blessing:
@@ -20652,11 +20609,10 @@
20652 #endif /* SQLITE_TEST */
20653 #endif /* SQLITE_OMIT_UTF16 */
20654
20655 /************** End of utf.c *************************************************/
20656 /************** Begin file util.c ********************************************/
20657 #line 1 "tsrc/util.c"
20658 /*
20659 ** 2001 September 15
20660 **
20661 ** The author disclaims copyright to this source code. In place of
20662 ** a legal notice, here is a blessing:
@@ -21835,11 +21791,10 @@
21835 }
21836 #endif
21837
21838 /************** End of util.c ************************************************/
21839 /************** Begin file hash.c ********************************************/
21840 #line 1 "tsrc/hash.c"
21841 /*
21842 ** 2001 September 22
21843 **
21844 ** The author disclaims copyright to this source code. In place of
21845 ** a legal notice, here is a blessing:
@@ -22115,11 +22070,10 @@
22115 return 0;
22116 }
22117
22118 /************** End of hash.c ************************************************/
22119 /************** Begin file opcodes.c *****************************************/
22120 #line 1 "tsrc/opcodes.c"
22121 /* Automatically generated. Do not edit */
22122 /* See the mkopcodec.awk script for details. */
22123 #if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
22124 SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
22125 static const char *const azName[] = { "?",
@@ -22146,66 +22100,66 @@
22146 /* 21 */ "MustBeInt",
22147 /* 22 */ "RealAffinity",
22148 /* 23 */ "Permutation",
22149 /* 24 */ "Compare",
22150 /* 25 */ "Jump",
22151 /* 26 */ "If",
22152 /* 27 */ "IfNot",
22153 /* 28 */ "Column",
22154 /* 29 */ "Affinity",
22155 /* 30 */ "MakeRecord",
22156 /* 31 */ "Count",
22157 /* 32 */ "Savepoint",
22158 /* 33 */ "AutoCommit",
22159 /* 34 */ "Transaction",
22160 /* 35 */ "ReadCookie",
22161 /* 36 */ "SetCookie",
22162 /* 37 */ "VerifyCookie",
22163 /* 38 */ "OpenRead",
22164 /* 39 */ "OpenWrite",
22165 /* 40 */ "OpenAutoindex",
22166 /* 41 */ "OpenEphemeral",
22167 /* 42 */ "SorterOpen",
22168 /* 43 */ "OpenPseudo",
22169 /* 44 */ "Close",
22170 /* 45 */ "SeekLt",
22171 /* 46 */ "SeekLe",
22172 /* 47 */ "SeekGe",
22173 /* 48 */ "SeekGt",
22174 /* 49 */ "Seek",
22175 /* 50 */ "NotFound",
22176 /* 51 */ "Found",
22177 /* 52 */ "IsUnique",
22178 /* 53 */ "NotExists",
22179 /* 54 */ "Sequence",
22180 /* 55 */ "NewRowid",
22181 /* 56 */ "Insert",
22182 /* 57 */ "InsertInt",
22183 /* 58 */ "Delete",
22184 /* 59 */ "ResetCount",
22185 /* 60 */ "SorterCompare",
22186 /* 61 */ "SorterData",
22187 /* 62 */ "RowKey",
22188 /* 63 */ "RowData",
22189 /* 64 */ "Rowid",
22190 /* 65 */ "NullRow",
22191 /* 66 */ "Last",
22192 /* 67 */ "SorterSort",
22193 /* 68 */ "Or",
22194 /* 69 */ "And",
22195 /* 70 */ "Sort",
22196 /* 71 */ "Rewind",
22197 /* 72 */ "SorterNext",
22198 /* 73 */ "IsNull",
22199 /* 74 */ "NotNull",
22200 /* 75 */ "Ne",
22201 /* 76 */ "Eq",
22202 /* 77 */ "Gt",
22203 /* 78 */ "Le",
22204 /* 79 */ "Lt",
22205 /* 80 */ "Ge",
22206 /* 81 */ "Prev",
22207 /* 82 */ "BitAnd",
22208 /* 83 */ "BitOr",
22209 /* 84 */ "ShiftLeft",
22210 /* 85 */ "ShiftRight",
22211 /* 86 */ "Add",
@@ -22212,76 +22166,76 @@
22212 /* 87 */ "Subtract",
22213 /* 88 */ "Multiply",
22214 /* 89 */ "Divide",
22215 /* 90 */ "Remainder",
22216 /* 91 */ "Concat",
22217 /* 92 */ "Next",
22218 /* 93 */ "BitNot",
22219 /* 94 */ "String8",
22220 /* 95 */ "SorterInsert",
22221 /* 96 */ "IdxInsert",
22222 /* 97 */ "IdxDelete",
22223 /* 98 */ "IdxRowid",
22224 /* 99 */ "IdxLT",
22225 /* 100 */ "IdxGE",
22226 /* 101 */ "Destroy",
22227 /* 102 */ "Clear",
22228 /* 103 */ "CreateIndex",
22229 /* 104 */ "CreateTable",
22230 /* 105 */ "ParseSchema",
22231 /* 106 */ "LoadAnalysis",
22232 /* 107 */ "DropTable",
22233 /* 108 */ "DropIndex",
22234 /* 109 */ "DropTrigger",
22235 /* 110 */ "IntegrityCk",
22236 /* 111 */ "RowSetAdd",
22237 /* 112 */ "RowSetRead",
22238 /* 113 */ "RowSetTest",
22239 /* 114 */ "Program",
22240 /* 115 */ "Param",
22241 /* 116 */ "FkCounter",
22242 /* 117 */ "FkIfZero",
22243 /* 118 */ "MemMax",
22244 /* 119 */ "IfPos",
22245 /* 120 */ "IfNeg",
22246 /* 121 */ "IfZero",
22247 /* 122 */ "AggStep",
22248 /* 123 */ "AggFinal",
22249 /* 124 */ "Checkpoint",
22250 /* 125 */ "JournalMode",
22251 /* 126 */ "Vacuum",
22252 /* 127 */ "IncrVacuum",
22253 /* 128 */ "Expire",
22254 /* 129 */ "TableLock",
22255 /* 130 */ "Real",
22256 /* 131 */ "VBegin",
22257 /* 132 */ "VCreate",
22258 /* 133 */ "VDestroy",
22259 /* 134 */ "VOpen",
22260 /* 135 */ "VFilter",
22261 /* 136 */ "VColumn",
22262 /* 137 */ "VNext",
22263 /* 138 */ "VRename",
22264 /* 139 */ "VUpdate",
22265 /* 140 */ "Pagecount",
22266 /* 141 */ "ToText",
22267 /* 142 */ "ToBlob",
22268 /* 143 */ "ToNumeric",
22269 /* 144 */ "ToInt",
22270 /* 145 */ "ToReal",
22271 /* 146 */ "MaxPgcnt",
22272 /* 147 */ "Trace",
22273 /* 148 */ "Noop",
22274 /* 149 */ "Explain",
 
22275 };
22276 return azName[i];
22277 }
22278 #endif
22279
22280 /************** End of opcodes.c *********************************************/
22281 /************** Begin file os_os2.c ******************************************/
22282 #line 1 "tsrc/os_os2.c"
22283 /*
22284 ** 2006 Feb 14
22285 **
22286 ** The author disclaims copyright to this source code. In place of
22287 ** a legal notice, here is a blessing:
@@ -22334,11 +22288,10 @@
22334 /*
22335 ** Include code that is common to all os_*.c files
22336 */
22337 /************** Include os_common.h in the middle of os_os2.c ****************/
22338 /************** Begin file os_common.h ***************************************/
22339 #line 1 "tsrc/os_common.h"
22340 /*
22341 ** 2004 May 22
22342 **
22343 ** The author disclaims copyright to this source code. In place of
22344 ** a legal notice, here is a blessing:
@@ -22388,11 +22341,10 @@
22388 ** hwtime.h contains inline assembler code for implementing
22389 ** high-performance timing routines.
22390 */
22391 /************** Include hwtime.h in the middle of os_common.h ****************/
22392 /************** Begin file hwtime.h ******************************************/
22393 #line 1 "tsrc/hwtime.h"
22394 /*
22395 ** 2008 May 27
22396 **
22397 ** The author disclaims copyright to this source code. In place of
22398 ** a legal notice, here is a blessing:
@@ -22477,11 +22429,10 @@
22477
22478 #endif /* !defined(_HWTIME_H_) */
22479
22480 /************** End of hwtime.h **********************************************/
22481 /************** Continuing where we left off in os_common.h ******************/
22482 #line 53 "tsrc/os_common.h"
22483
22484 static sqlite_uint64 g_start;
22485 static sqlite_uint64 g_elapsed;
22486 #define TIMER_START g_start=sqlite3Hwtime()
22487 #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start
@@ -22544,11 +22495,10 @@
22544
22545 #endif /* !defined(_OS_COMMON_H_) */
22546
22547 /************** End of os_common.h *******************************************/
22548 /************** Continuing where we left off in os_os2.c *********************/
22549 #line 57 "tsrc/os_os2.c"
22550
22551 /* Forward references */
22552 typedef struct os2File os2File; /* The file structure */
22553 typedef struct os2ShmNode os2ShmNode; /* A shared descritive memory node */
22554 typedef struct os2ShmLink os2ShmLink; /* A connection to shared-memory */
@@ -24416,11 +24366,10 @@
24416
24417 #endif /* SQLITE_OS_OS2 */
24418
24419 /************** End of os_os2.c **********************************************/
24420 /************** Begin file os_unix.c *****************************************/
24421 #line 1 "tsrc/os_unix.c"
24422 /*
24423 ** 2004 May 22
24424 **
24425 ** The author disclaims copyright to this source code. In place of
24426 ** a legal notice, here is a blessing:
@@ -24681,11 +24630,10 @@
24681 /*
24682 ** Include code that is common to all os_*.c files
24683 */
24684 /************** Include os_common.h in the middle of os_unix.c ***************/
24685 /************** Begin file os_common.h ***************************************/
24686 #line 1 "tsrc/os_common.h"
24687 /*
24688 ** 2004 May 22
24689 **
24690 ** The author disclaims copyright to this source code. In place of
24691 ** a legal notice, here is a blessing:
@@ -24735,11 +24683,10 @@
24735 ** hwtime.h contains inline assembler code for implementing
24736 ** high-performance timing routines.
24737 */
24738 /************** Include hwtime.h in the middle of os_common.h ****************/
24739 /************** Begin file hwtime.h ******************************************/
24740 #line 1 "tsrc/hwtime.h"
24741 /*
24742 ** 2008 May 27
24743 **
24744 ** The author disclaims copyright to this source code. In place of
24745 ** a legal notice, here is a blessing:
@@ -24824,11 +24771,10 @@
24824
24825 #endif /* !defined(_HWTIME_H_) */
24826
24827 /************** End of hwtime.h **********************************************/
24828 /************** Continuing where we left off in os_common.h ******************/
24829 #line 53 "tsrc/os_common.h"
24830
24831 static sqlite_uint64 g_start;
24832 static sqlite_uint64 g_elapsed;
24833 #define TIMER_START g_start=sqlite3Hwtime()
24834 #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start
@@ -24891,11 +24837,10 @@
24891
24892 #endif /* !defined(_OS_COMMON_H_) */
24893
24894 /************** End of os_common.h *******************************************/
24895 /************** Continuing where we left off in os_unix.c ********************/
24896 #line 265 "tsrc/os_unix.c"
24897
24898 /*
24899 ** Define various macros that are missing from some systems.
24900 */
24901 #ifndef O_LARGEFILE
@@ -31401,11 +31346,10 @@
31401
31402 #endif /* SQLITE_OS_UNIX */
31403
31404 /************** End of os_unix.c *********************************************/
31405 /************** Begin file os_win.c ******************************************/
31406 #line 1 "tsrc/os_win.c"
31407 /*
31408 ** 2004 May 22
31409 **
31410 ** The author disclaims copyright to this source code. In place of
31411 ** a legal notice, here is a blessing:
@@ -31463,11 +31407,10 @@
31463 /*
31464 ** Include code that is common to all os_*.c files
31465 */
31466 /************** Include os_common.h in the middle of os_win.c ****************/
31467 /************** Begin file os_common.h ***************************************/
31468 #line 1 "tsrc/os_common.h"
31469 /*
31470 ** 2004 May 22
31471 **
31472 ** The author disclaims copyright to this source code. In place of
31473 ** a legal notice, here is a blessing:
@@ -31517,11 +31460,10 @@
31517 ** hwtime.h contains inline assembler code for implementing
31518 ** high-performance timing routines.
31519 */
31520 /************** Include hwtime.h in the middle of os_common.h ****************/
31521 /************** Begin file hwtime.h ******************************************/
31522 #line 1 "tsrc/hwtime.h"
31523 /*
31524 ** 2008 May 27
31525 **
31526 ** The author disclaims copyright to this source code. In place of
31527 ** a legal notice, here is a blessing:
@@ -31606,11 +31548,10 @@
31606
31607 #endif /* !defined(_HWTIME_H_) */
31608
31609 /************** End of hwtime.h **********************************************/
31610 /************** Continuing where we left off in os_common.h ******************/
31611 #line 53 "tsrc/os_common.h"
31612
31613 static sqlite_uint64 g_start;
31614 static sqlite_uint64 g_elapsed;
31615 #define TIMER_START g_start=sqlite3Hwtime()
31616 #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start
@@ -31673,11 +31614,10 @@
31673
31674 #endif /* !defined(_OS_COMMON_H_) */
31675
31676 /************** End of os_common.h *******************************************/
31677 /************** Continuing where we left off in os_win.c *********************/
31678 #line 62 "tsrc/os_win.c"
31679
31680 /*
31681 ** Some microsoft compilers lack this definition.
31682 */
31683 #ifndef INVALID_FILE_ATTRIBUTES
@@ -34809,11 +34749,10 @@
34809
34810 #endif /* SQLITE_OS_WIN */
34811
34812 /************** End of os_win.c **********************************************/
34813 /************** Begin file bitvec.c ******************************************/
34814 #line 1 "tsrc/bitvec.c"
34815 /*
34816 ** 2008 February 16
34817 **
34818 ** The author disclaims copyright to this source code. In place of
34819 ** a legal notice, here is a blessing:
@@ -35220,11 +35159,10 @@
35220 }
35221 #endif /* SQLITE_OMIT_BUILTIN_TEST */
35222
35223 /************** End of bitvec.c **********************************************/
35224 /************** Begin file pcache.c ******************************************/
35225 #line 1 "tsrc/pcache.c"
35226 /*
35227 ** 2008 August 05
35228 **
35229 ** The author disclaims copyright to this source code. In place of
35230 ** a legal notice, here is a blessing:
@@ -35817,11 +35755,10 @@
35817 }
35818 #endif
35819
35820 /************** End of pcache.c **********************************************/
35821 /************** Begin file pcache1.c *****************************************/
35822 #line 1 "tsrc/pcache1.c"
35823 /*
35824 ** 2008 November 05
35825 **
35826 ** The author disclaims copyright to this source code. In place of
35827 ** a legal notice, here is a blessing:
@@ -37034,11 +36971,10 @@
37034 }
37035 #endif
37036
37037 /************** End of pcache1.c *********************************************/
37038 /************** Begin file rowset.c ******************************************/
37039 #line 1 "tsrc/rowset.c"
37040 /*
37041 ** 2008 December 3
37042 **
37043 ** The author disclaims copyright to this source code. In place of
37044 ** a legal notice, here is a blessing:
@@ -37459,11 +37395,10 @@
37459 return 0;
37460 }
37461
37462 /************** End of rowset.c **********************************************/
37463 /************** Begin file pager.c *******************************************/
37464 #line 1 "tsrc/pager.c"
37465 /*
37466 ** 2001 September 15
37467 **
37468 ** The author disclaims copyright to this source code. In place of
37469 ** a legal notice, here is a blessing:
@@ -37483,11 +37418,10 @@
37483 ** another is writing.
37484 */
37485 #ifndef SQLITE_OMIT_DISKIO
37486 /************** Include wal.h in the middle of pager.c ***********************/
37487 /************** Begin file wal.h *********************************************/
37488 #line 1 "tsrc/wal.h"
37489 /*
37490 ** 2010 February 1
37491 **
37492 ** The author disclaims copyright to this source code. In place of
37493 ** a legal notice, here is a blessing:
@@ -37608,11 +37542,10 @@
37608 #endif /* ifndef SQLITE_OMIT_WAL */
37609 #endif /* _WAL_H_ */
37610
37611 /************** End of wal.h *************************************************/
37612 /************** Continuing where we left off in pager.c **********************/
37613 #line 24 "tsrc/pager.c"
37614
37615
37616 /******************* NOTES ON THE DESIGN OF THE PAGER ************************
37617 **
37618 ** This comment block describes invariants that hold when using a rollback
@@ -44422,11 +44355,10 @@
44422
44423 #endif /* SQLITE_OMIT_DISKIO */
44424
44425 /************** End of pager.c ***********************************************/
44426 /************** Begin file wal.c *********************************************/
44427 #line 1 "tsrc/wal.c"
44428 /*
44429 ** 2010 February 1
44430 **
44431 ** The author disclaims copyright to this source code. In place of
44432 ** a legal notice, here is a blessing:
@@ -47377,11 +47309,10 @@
47377
47378 #endif /* #ifndef SQLITE_OMIT_WAL */
47379
47380 /************** End of wal.c *************************************************/
47381 /************** Begin file btmutex.c *****************************************/
47382 #line 1 "tsrc/btmutex.c"
47383 /*
47384 ** 2007 August 27
47385 **
47386 ** The author disclaims copyright to this source code. In place of
47387 ** a legal notice, here is a blessing:
@@ -47397,11 +47328,10 @@
47397 ** big and we want to break it down some. This packaged seemed like
47398 ** a good breakout.
47399 */
47400 /************** Include btreeInt.h in the middle of btmutex.c ****************/
47401 /************** Begin file btreeInt.h ****************************************/
47402 #line 1 "tsrc/btreeInt.h"
47403 /*
47404 ** 2004 April 6
47405 **
47406 ** The author disclaims copyright to this source code. In place of
47407 ** a legal notice, here is a blessing:
@@ -48043,11 +47973,10 @@
48043 #define get4byte sqlite3Get4byte
48044 #define put4byte sqlite3Put4byte
48045
48046 /************** End of btreeInt.h ********************************************/
48047 /************** Continuing where we left off in btmutex.c ********************/
48048 #line 19 "tsrc/btmutex.c"
48049 #ifndef SQLITE_OMIT_SHARED_CACHE
48050 #if SQLITE_THREADSAFE
48051
48052 /*
48053 ** Obtain the BtShared mutex associated with B-Tree handle p. Also,
@@ -48316,11 +48245,10 @@
48316 #endif /* if SQLITE_THREADSAFE */
48317 #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */
48318
48319 /************** End of btmutex.c *********************************************/
48320 /************** Begin file btree.c *******************************************/
48321 #line 1 "tsrc/btree.c"
48322 /*
48323 ** 2004 April 6
48324 **
48325 ** The author disclaims copyright to this source code. In place of
48326 ** a legal notice, here is a blessing:
@@ -48982,11 +48910,11 @@
48982 assert( nKey==(i64)(int)nKey );
48983 pIdxKey = sqlite3VdbeAllocUnpackedRecord(
48984 pCur->pKeyInfo, aSpace, sizeof(aSpace), &pFree
48985 );
48986 if( pIdxKey==0 ) return SQLITE_NOMEM;
48987 sqlite3VdbeRecordUnpack(pCur->pKeyInfo, nKey, pKey, pIdxKey);
48988 }else{
48989 pIdxKey = 0;
48990 }
48991 rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes);
48992 if( pFree ){
@@ -56504,11 +56432,10 @@
56504 return rc;
56505 }
56506
56507 /************** End of btree.c ***********************************************/
56508 /************** Begin file backup.c ******************************************/
56509 #line 1 "tsrc/backup.c"
56510 /*
56511 ** 2009 January 28
56512 **
56513 ** The author disclaims copyright to this source code. In place of
56514 ** a legal notice, here is a blessing:
@@ -57211,11 +57138,10 @@
57211 }
57212 #endif /* SQLITE_OMIT_VACUUM */
57213
57214 /************** End of backup.c **********************************************/
57215 /************** Begin file vdbemem.c *****************************************/
57216 #line 1 "tsrc/vdbemem.c"
57217 /*
57218 ** 2004 May 26
57219 **
57220 ** The author disclaims copyright to this source code. In place of
57221 ** a legal notice, here is a blessing:
@@ -58366,11 +58292,10 @@
58366 return 0;
58367 }
58368
58369 /************** End of vdbemem.c *********************************************/
58370 /************** Begin file vdbeaux.c *****************************************/
58371 #line 1 "tsrc/vdbeaux.c"
58372 /*
58373 ** 2003 September 6
58374 **
58375 ** The author disclaims copyright to this source code. In place of
58376 ** a legal notice, here is a blessing:
@@ -59037,22 +58962,19 @@
59037 p->pNext = pVdbe->pProgram;
59038 pVdbe->pProgram = p;
59039 }
59040
59041 /*
59042 ** Change N opcodes starting at addr to No-ops.
59043 */
59044 SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr, int N){
59045 if( p->aOp ){
59046 VdbeOp *pOp = &p->aOp[addr];
59047 sqlite3 *db = p->db;
59048 while( N-- ){
59049 freeP4(db, pOp->p4type, pOp->p4.p);
59050 memset(pOp, 0, sizeof(pOp[0]));
59051 pOp->opcode = OP_Noop;
59052 pOp++;
59053 }
59054 }
59055 }
59056
59057 /*
59058 ** Change the value of the P4 operand for a specific instruction.
@@ -59204,11 +59126,11 @@
59204 ** check the value of p->nOp-1 before continuing.
59205 */
59206 SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){
59207 /* C89 specifies that the constant "dummy" will be initialized to all
59208 ** zeros, which is correct. MSVC generates a warning, nevertheless. */
59209 static const VdbeOp dummy; /* Ignore the MSVC warning about no initializer */
59210 assert( p->magic==VDBE_MAGIC_INIT );
59211 if( addr<0 ){
59212 #ifdef SQLITE_OMIT_TRACE
59213 if( p->nOp==0 ) return (VdbeOp*)&dummy;
59214 #endif
@@ -61609,11 +61531,10 @@
61609 }
61610 }
61611
61612 /************** End of vdbeaux.c *********************************************/
61613 /************** Begin file vdbeapi.c *****************************************/
61614 #line 1 "tsrc/vdbeapi.c"
61615 /*
61616 ** 2004 May 26
61617 **
61618 ** The author disclaims copyright to this source code. In place of
61619 ** a legal notice, here is a blessing:
@@ -62917,11 +62838,10 @@
62917 return v;
62918 }
62919
62920 /************** End of vdbeapi.c *********************************************/
62921 /************** Begin file vdbetrace.c ***************************************/
62922 #line 1 "tsrc/vdbetrace.c"
62923 /*
62924 ** 2009 November 25
62925 **
62926 ** The author disclaims copyright to this source code. In place of
62927 ** a legal notice, here is a blessing:
@@ -63073,11 +62993,10 @@
63073
63074 #endif /* #ifndef SQLITE_OMIT_TRACE */
63075
63076 /************** End of vdbetrace.c *******************************************/
63077 /************** Begin file vdbe.c ********************************************/
63078 #line 1 "tsrc/vdbe.c"
63079 /*
63080 ** 2001 September 15
63081 **
63082 ** The author disclaims copyright to this source code. In place of
63083 ** a legal notice, here is a blessing:
@@ -63543,11 +63462,10 @@
63543 ** hwtime.h contains inline assembler code for implementing
63544 ** high-performance timing routines.
63545 */
63546 /************** Include hwtime.h in the middle of vdbe.c *********************/
63547 /************** Begin file hwtime.h ******************************************/
63548 #line 1 "tsrc/hwtime.h"
63549 /*
63550 ** 2008 May 27
63551 **
63552 ** The author disclaims copyright to this source code. In place of
63553 ** a legal notice, here is a blessing:
@@ -63632,11 +63550,10 @@
63632
63633 #endif /* !defined(_HWTIME_H_) */
63634
63635 /************** End of hwtime.h **********************************************/
63636 /************** Continuing where we left off in vdbe.c ***********************/
63637 #line 471 "tsrc/vdbe.c"
63638
63639 #endif
63640
63641 /*
63642 ** The CHECK_FOR_INTERRUPT macro defined here looks to see if the
@@ -65627,10 +65544,20 @@
65627 sqlite3VdbeMemSetInt64(pOut, ~sqlite3VdbeIntValue(pIn1));
65628 }
65629 break;
65630 }
65631
 
 
 
 
 
 
 
 
 
 
65632 /* Opcode: If P1 P2 P3 * *
65633 **
65634 ** Jump to P2 if the value in register P1 is true. The value
65635 ** is considered true if it is numeric and non-zero. If the value
65636 ** in P1 is NULL then take the jump if P3 is true.
@@ -65639,10 +65566,11 @@
65639 **
65640 ** Jump to P2 if the value in register P1 is False. The value
65641 ** is considered true if it has a numeric value of zero. If the value
65642 ** in P1 is NULL then take the jump if P3 is true.
65643 */
 
65644 case OP_If: /* jump, in1 */
65645 case OP_IfNot: { /* jump, in1 */
65646 #if 0 /* local variables moved into u.al */
65647 int c;
65648 #endif /* local variables moved into u.al */
@@ -65657,10 +65585,16 @@
65657 #endif
65658 if( pOp->opcode==OP_IfNot ) u.al.c = !u.al.c;
65659 }
65660 if( u.al.c ){
65661 pc = pOp->p2-1;
 
 
 
 
 
 
65662 }
65663 break;
65664 }
65665
65666 /* Opcode: IsNull P1 P2 * * *
@@ -69860,11 +69794,10 @@
69860 goto vdbe_error_halt;
69861 }
69862
69863 /************** End of vdbe.c ************************************************/
69864 /************** Begin file vdbeblob.c ****************************************/
69865 #line 1 "tsrc/vdbeblob.c"
69866 /*
69867 ** 2007 May 1
69868 **
69869 ** The author disclaims copyright to this source code. In place of
69870 ** a legal notice, here is a blessing:
@@ -70134,21 +70067,21 @@
70134 /* Make sure a mutex is held on the table to be accessed */
70135 sqlite3VdbeUsesBtree(v, iDb);
70136
70137 /* Configure the OP_TableLock instruction */
70138 #ifdef SQLITE_OMIT_SHARED_CACHE
70139 sqlite3VdbeChangeToNoop(v, 2, 1);
70140 #else
70141 sqlite3VdbeChangeP1(v, 2, iDb);
70142 sqlite3VdbeChangeP2(v, 2, pTab->tnum);
70143 sqlite3VdbeChangeP3(v, 2, flags);
70144 sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT);
70145 #endif
70146
70147 /* Remove either the OP_OpenWrite or OpenRead. Set the P2
70148 ** parameter of the other to pTab->tnum. */
70149 sqlite3VdbeChangeToNoop(v, 4 - flags, 1);
70150 sqlite3VdbeChangeP2(v, 3 + flags, pTab->tnum);
70151 sqlite3VdbeChangeP3(v, 3 + flags, iDb);
70152
70153 /* Configure the number of columns. Configure the cursor to
70154 ** think that the table has one more column than it really
@@ -70331,11 +70264,10 @@
70331
70332 #endif /* #ifndef SQLITE_OMIT_INCRBLOB */
70333
70334 /************** End of vdbeblob.c ********************************************/
70335 /************** Begin file vdbesort.c ****************************************/
70336 #line 1 "tsrc/vdbesort.c"
70337 /*
70338 ** 2011 July 9
70339 **
70340 ** The author disclaims copyright to this source code. In place of
70341 ** a legal notice, here is a blessing:
@@ -70492,12 +70424,16 @@
70492 int rc; /* Return Code */
70493 int nRead; /* Number of bytes read */
70494 int nRec = 0; /* Size of record in bytes */
70495 int iOff = 0; /* Size of serialized size varint in bytes */
70496
70497 nRead = pIter->iEof - pIter->iReadOff;
70498 if( nRead>5 ) nRead = 5;
 
 
 
 
70499 if( nRead<=0 ){
70500 /* This is an EOF condition */
70501 vdbeSorterIterZero(db, pIter);
70502 return SQLITE_OK;
70503 }
@@ -71211,11 +71147,10 @@
71211
71212 #endif /* #ifndef SQLITE_OMIT_MERGE_SORT */
71213
71214 /************** End of vdbesort.c ********************************************/
71215 /************** Begin file journal.c *****************************************/
71216 #line 1 "tsrc/journal.c"
71217 /*
71218 ** 2007 August 22
71219 **
71220 ** The author disclaims copyright to this source code. In place of
71221 ** a legal notice, here is a blessing:
@@ -71452,11 +71387,10 @@
71452 }
71453 #endif
71454
71455 /************** End of journal.c *********************************************/
71456 /************** Begin file memjournal.c **************************************/
71457 #line 1 "tsrc/memjournal.c"
71458 /*
71459 ** 2008 October 7
71460 **
71461 ** The author disclaims copyright to this source code. In place of
71462 ** a legal notice, here is a blessing:
@@ -71714,11 +71648,10 @@
71714 return sizeof(MemJournal);
71715 }
71716
71717 /************** End of memjournal.c ******************************************/
71718 /************** Begin file walker.c ******************************************/
71719 #line 1 "tsrc/walker.c"
71720 /*
71721 ** 2008 August 16
71722 **
71723 ** The author disclaims copyright to this source code. In place of
71724 ** a legal notice, here is a blessing:
@@ -71853,11 +71786,10 @@
71853 return rc & WRC_Abort;
71854 }
71855
71856 /************** End of walker.c **********************************************/
71857 /************** Begin file resolve.c *****************************************/
71858 #line 1 "tsrc/resolve.c"
71859 /*
71860 ** 2008 August 18
71861 **
71862 ** The author disclaims copyright to this source code. In place of
71863 ** a legal notice, here is a blessing:
@@ -73074,11 +73006,10 @@
73074 sqlite3WalkSelect(&w, p);
73075 }
73076
73077 /************** End of resolve.c *********************************************/
73078 /************** Begin file expr.c ********************************************/
73079 #line 1 "tsrc/expr.c"
73080 /*
73081 ** 2001 September 15
73082 **
73083 ** The author disclaims copyright to this source code. In place of
73084 ** a legal notice, here is a blessing:
@@ -73977,11 +73908,12 @@
73977 pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase);
73978 pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
73979 pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);
73980 pNewItem->jointype = pOldItem->jointype;
73981 pNewItem->iCursor = pOldItem->iCursor;
73982 pNewItem->isPopulated = pOldItem->isPopulated;
 
73983 pNewItem->isCorrelated = pOldItem->isCorrelated;
73984 pNewItem->zIndex = sqlite3DbStrDup(db, pOldItem->zIndex);
73985 pNewItem->notIndexed = pOldItem->notIndexed;
73986 pNewItem->pIndex = pOldItem->pIndex;
73987 pTab = pNewItem->pTab = pOldItem->pTab;
@@ -74537,12 +74469,11 @@
74537 assert(v);
74538 if( iCol<0 ){
74539 int iMem = ++pParse->nMem;
74540 int iAddr;
74541
74542 iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem);
74543 sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem);
74544
74545 sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
74546 eType = IN_INDEX_ROWID;
74547
74548 sqlite3VdbeJumpHere(v, iAddr);
@@ -74569,12 +74500,11 @@
74569 int iMem = ++pParse->nMem;
74570 int iAddr;
74571 char *pKey;
74572
74573 pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx);
74574 iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem);
74575 sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem);
74576
74577 sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb,
74578 pKey,P4_KEYINFO_HANDOFF);
74579 VdbeComment((v, "%s", pIdx->zName));
74580 eType = IN_INDEX_INDEX;
@@ -74655,10 +74585,11 @@
74655 ){
74656 int testAddr = 0; /* One-time test address */
74657 int rReg = 0; /* Register storing resulting */
74658 Vdbe *v = sqlite3GetVdbe(pParse);
74659 if( NEVER(v==0) ) return 0;
 
74660 sqlite3ExprCachePush(pParse);
74661
74662 /* This code must be run in its entirety every time it is encountered
74663 ** if any of the following is true:
74664 **
@@ -74669,12 +74600,11 @@
74669 ** If all of the above are false, then we can run this code just once
74670 ** save the results, and reuse the same result on subsequent invocations.
74671 */
74672 if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){
74673 int mem = ++pParse->nMem;
74674 sqlite3VdbeAddOp1(v, OP_If, mem);
74675 testAddr = sqlite3VdbeAddOp2(v, OP_Integer, 1, mem);
74676 assert( testAddr>0 || pParse->db->mallocFailed );
74677 }
74678
74679 #ifndef SQLITE_OMIT_EXPLAIN
74680 if( pParse->explain==2 ){
@@ -74770,11 +74700,11 @@
74770 ** disable the test that was generated above that makes sure
74771 ** this code only executes once. Because for a non-constant
74772 ** expression we need to rerun this code each time.
74773 */
74774 if( testAddr && !sqlite3ExprIsConstant(pE2) ){
74775 sqlite3VdbeChangeToNoop(v, testAddr-1, 2);
74776 testAddr = 0;
74777 }
74778
74779 /* Evaluate the expression and insert it into the temp table */
74780 if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
@@ -74841,11 +74771,11 @@
74841 break;
74842 }
74843 }
74844
74845 if( testAddr ){
74846 sqlite3VdbeJumpHere(v, testAddr-1);
74847 }
74848 sqlite3ExprCachePop(pParse, 1);
74849
74850 return rReg;
74851 }
@@ -76835,11 +76765,10 @@
76835 }
76836 }
76837
76838 /************** End of expr.c ************************************************/
76839 /************** Begin file alter.c *******************************************/
76840 #line 1 "tsrc/alter.c"
76841 /*
76842 ** 2005 February 15
76843 **
76844 ** The author disclaims copyright to this source code. In place of
76845 ** a legal notice, here is a blessing:
@@ -77664,11 +77593,10 @@
77664 }
77665 #endif /* SQLITE_ALTER_TABLE */
77666
77667 /************** End of alter.c ***********************************************/
77668 /************** Begin file analyze.c *****************************************/
77669 #line 1 "tsrc/analyze.c"
77670 /*
77671 ** 2005 July 8
77672 **
77673 ** The author disclaims copyright to this source code. In place of
77674 ** a legal notice, here is a blessing:
@@ -78386,11 +78314,10 @@
78386
78387 #endif /* SQLITE_OMIT_ANALYZE */
78388
78389 /************** End of analyze.c *********************************************/
78390 /************** Begin file attach.c ******************************************/
78391 #line 1 "tsrc/attach.c"
78392 /*
78393 ** 2003 April 6
78394 **
78395 ** The author disclaims copyright to this source code. In place of
78396 ** a legal notice, here is a blessing:
@@ -78946,11 +78873,10 @@
78946 }
78947 #endif
78948
78949 /************** End of attach.c **********************************************/
78950 /************** Begin file auth.c ********************************************/
78951 #line 1 "tsrc/auth.c"
78952 /*
78953 ** 2003 January 11
78954 **
78955 ** The author disclaims copyright to this source code. In place of
78956 ** a legal notice, here is a blessing:
@@ -79198,11 +79124,10 @@
79198
79199 #endif /* SQLITE_OMIT_AUTHORIZATION */
79200
79201 /************** End of auth.c ************************************************/
79202 /************** Begin file build.c *******************************************/
79203 #line 1 "tsrc/build.c"
79204 /*
79205 ** 2001 September 15
79206 **
79207 ** The author disclaims copyright to this source code. In place of
79208 ** a legal notice, here is a blessing:
@@ -83002,11 +82927,10 @@
83002 return pKey;
83003 }
83004
83005 /************** End of build.c ***********************************************/
83006 /************** Begin file callback.c ****************************************/
83007 #line 1 "tsrc/callback.c"
83008 /*
83009 ** 2005 May 23
83010 **
83011 ** The author disclaims copyright to this source code. In place of
83012 ** a legal notice, here is a blessing:
@@ -83462,11 +83386,10 @@
83462 return p;
83463 }
83464
83465 /************** End of callback.c ********************************************/
83466 /************** Begin file delete.c ******************************************/
83467 #line 1 "tsrc/delete.c"
83468 /*
83469 ** 2001 September 15
83470 **
83471 ** The author disclaims copyright to this source code. In place of
83472 ** a legal notice, here is a blessing:
@@ -84117,11 +84040,10 @@
84117 return regBase;
84118 }
84119
84120 /************** End of delete.c **********************************************/
84121 /************** Begin file func.c ********************************************/
84122 #line 1 "tsrc/func.c"
84123 /*
84124 ** 2002 February 23
84125 **
84126 ** The author disclaims copyright to this source code. In place of
84127 ** a legal notice, here is a blessing:
@@ -85726,11 +85648,10 @@
85726 #endif
85727 }
85728
85729 /************** End of func.c ************************************************/
85730 /************** Begin file fkey.c ********************************************/
85731 #line 1 "tsrc/fkey.c"
85732 /*
85733 **
85734 ** The author disclaims copyright to this source code. In place of
85735 ** a legal notice, here is a blessing:
85736 **
@@ -86947,11 +86868,10 @@
86947 }
86948 #endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */
86949
86950 /************** End of fkey.c ************************************************/
86951 /************** Begin file insert.c ******************************************/
86952 #line 1 "tsrc/insert.c"
86953 /*
86954 ** 2001 September 15
86955 **
86956 ** The author disclaims copyright to this source code. In place of
86957 ** a legal notice, here is a blessing:
@@ -88793,11 +88713,10 @@
88793 }
88794 #endif /* SQLITE_OMIT_XFER_OPT */
88795
88796 /************** End of insert.c **********************************************/
88797 /************** Begin file legacy.c ******************************************/
88798 #line 1 "tsrc/legacy.c"
88799 /*
88800 ** 2001 September 15
88801 **
88802 ** The author disclaims copyright to this source code. In place of
88803 ** a legal notice, here is a blessing:
@@ -88941,11 +88860,10 @@
88941 return rc;
88942 }
88943
88944 /************** End of legacy.c **********************************************/
88945 /************** Begin file loadext.c *****************************************/
88946 #line 1 "tsrc/loadext.c"
88947 /*
88948 ** 2006 June 7
88949 **
88950 ** The author disclaims copyright to this source code. In place of
88951 ** a legal notice, here is a blessing:
@@ -88962,11 +88880,10 @@
88962 #ifndef SQLITE_CORE
88963 #define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */
88964 #endif
88965 /************** Include sqlite3ext.h in the middle of loadext.c **************/
88966 /************** Begin file sqlite3ext.h **************************************/
88967 #line 1 "tsrc/sqlite3ext.h"
88968 /*
88969 ** 2006 June 7
88970 **
88971 ** The author disclaims copyright to this source code. In place of
88972 ** a legal notice, here is a blessing:
@@ -89391,11 +89308,10 @@
89391
89392 #endif /* _SQLITE3EXT_H_ */
89393
89394 /************** End of sqlite3ext.h ******************************************/
89395 /************** Continuing where we left off in loadext.c ********************/
89396 #line 20 "tsrc/loadext.c"
89397 /* #include <string.h> */
89398
89399 #ifndef SQLITE_OMIT_LOAD_EXTENSION
89400
89401 /*
@@ -90031,11 +89947,10 @@
90031 }
90032 }
90033
90034 /************** End of loadext.c *********************************************/
90035 /************** Begin file pragma.c ******************************************/
90036 #line 1 "tsrc/pragma.c"
90037 /*
90038 ** 2003 April 6
90039 **
90040 ** The author disclaims copyright to this source code. In place of
90041 ** a legal notice, here is a blessing:
@@ -91560,11 +91475,10 @@
91560
91561 #endif /* SQLITE_OMIT_PRAGMA */
91562
91563 /************** End of pragma.c **********************************************/
91564 /************** Begin file prepare.c *****************************************/
91565 #line 1 "tsrc/prepare.c"
91566 /*
91567 ** 2005 May 25
91568 **
91569 ** The author disclaims copyright to this source code. In place of
91570 ** a legal notice, here is a blessing:
@@ -92421,11 +92335,10 @@
92421
92422 #endif /* SQLITE_OMIT_UTF16 */
92423
92424 /************** End of prepare.c *********************************************/
92425 /************** Begin file select.c ******************************************/
92426 #line 1 "tsrc/select.c"
92427 /*
92428 ** 2001 September 15
92429 **
92430 ** The author disclaims copyright to this source code. In place of
92431 ** a legal notice, here is a blessing:
@@ -92512,10 +92425,12 @@
92512 pNew->addrOpenEphm[2] = -1;
92513 if( db->mallocFailed ) {
92514 clearSelect(db, pNew);
92515 if( pNew!=&standin ) sqlite3DbFree(db, pNew);
92516 pNew = 0;
 
 
92517 }
92518 return pNew;
92519 }
92520
92521 /*
@@ -96224,11 +96139,15 @@
96224 struct SrcList_item *pItem = &pTabList->a[i];
96225 SelectDest dest;
96226 Select *pSub = pItem->pSelect;
96227 int isAggSub;
96228
96229 if( pSub==0 || pItem->isPopulated ) continue;
 
 
 
 
96230
96231 /* Increment Parse.nHeight by the height of the largest expression
96232 ** tree refered to by this, the parent select. The child select
96233 ** may contain expression trees of at most
96234 ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit
@@ -96235,25 +96154,48 @@
96235 ** more conservative than necessary, but much easier than enforcing
96236 ** an exact limit.
96237 */
96238 pParse->nHeight += sqlite3SelectExprHeight(p);
96239
96240 /* Check to see if the subquery can be absorbed into the parent. */
96241 isAggSub = (pSub->selFlags & SF_Aggregate)!=0;
96242 if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){
 
96243 if( isAggSub ){
96244 isAgg = 1;
96245 p->selFlags |= SF_Aggregate;
96246 }
96247 i = -1;
96248 }else{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96249 sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor);
96250 assert( pItem->isPopulated==0 );
96251 explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId);
96252 sqlite3Select(pParse, pSub, &dest);
96253 pItem->isPopulated = 1;
96254 pItem->pTab->nRowEst = (unsigned)pSub->nSelectRow;
 
 
 
 
 
96255 }
96256 if( /*pParse->nErr ||*/ db->mallocFailed ){
96257 goto select_end;
96258 }
96259 pParse->nHeight -= sqlite3SelectExprHeight(p);
@@ -96390,11 +96332,11 @@
96390 /* If sorting index that was created by a prior OP_OpenEphemeral
96391 ** instruction ended up not being needed, then change the OP_OpenEphemeral
96392 ** into an OP_Noop.
96393 */
96394 if( addrSortIndex>=0 && pOrderBy==0 ){
96395 sqlite3VdbeChangeToNoop(v, addrSortIndex, 1);
96396 p->addrOpenEphm[2] = -1;
96397 }
96398
96399 if( pWInfo->eDistinct ){
96400 VdbeOp *pOp; /* No longer required OpenEphemeral instr. */
@@ -96673,11 +96615,11 @@
96673 */
96674 if( groupBySort ){
96675 sqlite3VdbeAddOp2(v, OP_SorterNext, sAggInfo.sortingIdx, addrTopOfLoop);
96676 }else{
96677 sqlite3WhereEnd(pWInfo);
96678 sqlite3VdbeChangeToNoop(v, addrSortingIdx, 1);
96679 }
96680
96681 /* Output the final row of result
96682 */
96683 sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow);
@@ -96981,11 +96923,10 @@
96981 *****************************************************************************/
96982 #endif /* defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */
96983
96984 /************** End of select.c **********************************************/
96985 /************** Begin file table.c *******************************************/
96986 #line 1 "tsrc/table.c"
96987 /*
96988 ** 2001 September 15
96989 **
96990 ** The author disclaims copyright to this source code. In place of
96991 ** a legal notice, here is a blessing:
@@ -97181,11 +97122,10 @@
97181
97182 #endif /* SQLITE_OMIT_GET_TABLE */
97183
97184 /************** End of table.c ***********************************************/
97185 /************** Begin file trigger.c *****************************************/
97186 #line 1 "tsrc/trigger.c"
97187 /*
97188 **
97189 ** The author disclaims copyright to this source code. In place of
97190 ** a legal notice, here is a blessing:
97191 **
@@ -98307,11 +98247,10 @@
98307
98308 #endif /* !defined(SQLITE_OMIT_TRIGGER) */
98309
98310 /************** End of trigger.c *********************************************/
98311 /************** Begin file update.c ******************************************/
98312 #line 1 "tsrc/update.c"
98313 /*
98314 ** 2001 September 15
98315 **
98316 ** The author disclaims copyright to this source code. In place of
98317 ** a legal notice, here is a blessing:
@@ -98980,11 +98919,10 @@
98980 }
98981 #endif /* SQLITE_OMIT_VIRTUALTABLE */
98982
98983 /************** End of update.c **********************************************/
98984 /************** Begin file vacuum.c ******************************************/
98985 #line 1 "tsrc/vacuum.c"
98986 /*
98987 ** 2003 April 6
98988 **
98989 ** The author disclaims copyright to this source code. In place of
98990 ** a legal notice, here is a blessing:
@@ -99327,11 +99265,10 @@
99327
99328 #endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */
99329
99330 /************** End of vacuum.c **********************************************/
99331 /************** Begin file vtab.c ********************************************/
99332 #line 1 "tsrc/vtab.c"
99333 /*
99334 ** 2006 June 10
99335 **
99336 ** The author disclaims copyright to this source code. In place of
99337 ** a legal notice, here is a blessing:
@@ -100396,11 +100333,10 @@
100396
100397 #endif /* SQLITE_OMIT_VIRTUALTABLE */
100398
100399 /************** End of vtab.c ************************************************/
100400 /************** Begin file where.c *******************************************/
100401 #line 1 "tsrc/where.c"
100402 /*
100403 ** 2001 September 15
100404 **
100405 ** The author disclaims copyright to this source code. In place of
100406 ** a legal notice, here is a blessing:
@@ -100865,15 +100801,23 @@
100865 return mask;
100866 }
100867 static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){
100868 Bitmask mask = 0;
100869 while( pS ){
 
100870 mask |= exprListTableUsage(pMaskSet, pS->pEList);
100871 mask |= exprListTableUsage(pMaskSet, pS->pGroupBy);
100872 mask |= exprListTableUsage(pMaskSet, pS->pOrderBy);
100873 mask |= exprTableUsage(pMaskSet, pS->pWhere);
100874 mask |= exprTableUsage(pMaskSet, pS->pHaving);
 
 
 
 
 
 
 
100875 pS = pS->pPrior;
100876 }
100877 return mask;
100878 }
100879
@@ -102392,12 +102336,11 @@
102392 /* Generate code to skip over the creation and initialization of the
102393 ** transient index on 2nd and subsequent iterations of the loop. */
102394 v = pParse->pVdbe;
102395 assert( v!=0 );
102396 regIsInit = ++pParse->nMem;
102397 addrInit = sqlite3VdbeAddOp1(v, OP_If, regIsInit);
102398 sqlite3VdbeAddOp2(v, OP_Integer, 1, regIsInit);
102399
102400 /* Count the number of columns that will be added to the index
102401 ** and used to match WHERE clause constraints */
102402 nColumn = 0;
102403 pTable = pSrc->pTab;
@@ -105583,11 +105526,10 @@
105583 return;
105584 }
105585
105586 /************** End of where.c ***********************************************/
105587 /************** Begin file parse.c *******************************************/
105588 #line 1 "tsrc/parse.c"
105589 /* Driver template for the LEMON parser generator.
105590 ** The author disclaims copyright to this source code.
105591 **
105592 ** This version of "lempar.c" is modified, slightly, for use by SQLite.
105593 ** The only modifications are the addition of a couple of NEVER()
@@ -105596,11 +105538,10 @@
105596 ** specific grammar used by SQLite.
105597 */
105598 /* First off, code is included that follows the "include" declaration
105599 ** in the input grammar file. */
105600 /* #include <stdio.h> */
105601 #line 51 "parse.y"
105602
105603
105604 /*
105605 ** Disable all error recovery processing in the parser push-down
105606 ** automaton.
@@ -105644,11 +105585,10 @@
105644 /*
105645 ** An instance of this structure holds the ATTACH key and the key type.
105646 */
105647 struct AttachKey { int type; Token key; };
105648
105649 #line 722 "parse.y"
105650
105651 /* This is a utility routine used to set the ExprSpan.zStart and
105652 ** ExprSpan.zEnd values of pOut so that the span covers the complete
105653 ** range of text beginning with pStart and going to the end of pEnd.
105654 */
@@ -105664,11 +105604,10 @@
105664 static void spanExpr(ExprSpan *pOut, Parse *pParse, int op, Token *pValue){
105665 pOut->pExpr = sqlite3PExpr(pParse, op, 0, 0, pValue);
105666 pOut->zStart = pValue->z;
105667 pOut->zEnd = &pValue->z[pValue->n];
105668 }
105669 #line 817 "parse.y"
105670
105671 /* This routine constructs a binary expression node out of two ExprSpan
105672 ** objects and uses the result to populate a new ExprSpan object.
105673 */
105674 static void spanBinaryExpr(
@@ -105680,11 +105619,10 @@
105680 ){
105681 pOut->pExpr = sqlite3PExpr(pParse, op, pLeft->pExpr, pRight->pExpr, 0);
105682 pOut->zStart = pLeft->zStart;
105683 pOut->zEnd = pRight->zEnd;
105684 }
105685 #line 873 "parse.y"
105686
105687 /* Construct an expression node for a unary postfix operator
105688 */
105689 static void spanUnaryPostfix(
105690 ExprSpan *pOut, /* Write the new expression node here */
@@ -105695,11 +105633,10 @@
105695 ){
105696 pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0);
105697 pOut->zStart = pOperand->zStart;
105698 pOut->zEnd = &pPostOp->z[pPostOp->n];
105699 }
105700 #line 892 "parse.y"
105701
105702 /* A routine to convert a binary TK_IS or TK_ISNOT expression into a
105703 ** unary TK_ISNULL or TK_NOTNULL expression. */
105704 static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
105705 sqlite3 *db = pParse->db;
@@ -105707,11 +105644,10 @@
105707 pA->op = (u8)op;
105708 sqlite3ExprDelete(db, pA->pRight);
105709 pA->pRight = 0;
105710 }
105711 }
105712 #line 920 "parse.y"
105713
105714 /* Construct an expression node for a unary prefix operator
105715 */
105716 static void spanUnaryPrefix(
105717 ExprSpan *pOut, /* Write the new expression node here */
@@ -105722,11 +105658,10 @@
105722 ){
105723 pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0);
105724 pOut->zStart = pPreOp->z;
105725 pOut->zEnd = pOperand->zEnd;
105726 }
105727 #line 141 "parse.c"
105728 /* Next is all token values, in a form suitable for use by makeheaders.
105729 ** This section will be null unless lemon is run with the -m switch.
105730 */
105731 /*
105732 ** These constants (all generated automatically by the parser generator)
@@ -106978,21 +106913,17 @@
106978 ** inside the C code.
106979 */
106980 case 160: /* select */
106981 case 194: /* oneselect */
106982 {
106983 #line 403 "parse.y"
106984 sqlite3SelectDelete(pParse->db, (yypminor->yy387));
106985 #line 1399 "parse.c"
106986 }
106987 break;
106988 case 174: /* term */
106989 case 175: /* expr */
106990 {
106991 #line 720 "parse.y"
106992 sqlite3ExprDelete(pParse->db, (yypminor->yy118).pExpr);
106993 #line 1407 "parse.c"
106994 }
106995 break;
106996 case 179: /* idxlist_opt */
106997 case 187: /* idxlist */
106998 case 197: /* selcollist */
@@ -107004,23 +106935,19 @@
107004 case 217: /* setlist */
107005 case 220: /* itemlist */
107006 case 221: /* exprlist */
107007 case 226: /* case_exprlist */
107008 {
107009 #line 1103 "parse.y"
107010 sqlite3ExprListDelete(pParse->db, (yypminor->yy322));
107011 #line 1425 "parse.c"
107012 }
107013 break;
107014 case 193: /* fullname */
107015 case 198: /* from */
107016 case 206: /* seltablist */
107017 case 207: /* stl_prefix */
107018 {
107019 #line 534 "parse.y"
107020 sqlite3SrcListDelete(pParse->db, (yypminor->yy259));
107021 #line 1435 "parse.c"
107022 }
107023 break;
107024 case 199: /* where_opt */
107025 case 201: /* having_opt */
107026 case 210: /* on_opt */
@@ -107028,37 +106955,29 @@
107028 case 225: /* case_operand */
107029 case 227: /* case_else */
107030 case 238: /* when_clause */
107031 case 243: /* key_opt */
107032 {
107033 #line 644 "parse.y"
107034 sqlite3ExprDelete(pParse->db, (yypminor->yy314));
107035 #line 1449 "parse.c"
107036 }
107037 break;
107038 case 211: /* using_opt */
107039 case 213: /* inscollist */
107040 case 219: /* inscollist_opt */
107041 {
107042 #line 566 "parse.y"
107043 sqlite3IdListDelete(pParse->db, (yypminor->yy384));
107044 #line 1458 "parse.c"
107045 }
107046 break;
107047 case 234: /* trigger_cmd_list */
107048 case 239: /* trigger_cmd */
107049 {
107050 #line 1210 "parse.y"
107051 sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy203));
107052 #line 1466 "parse.c"
107053 }
107054 break;
107055 case 236: /* trigger_event */
107056 {
107057 #line 1196 "parse.y"
107058 sqlite3IdListDelete(pParse->db, (yypminor->yy90).b);
107059 #line 1473 "parse.c"
107060 }
107061 break;
107062 default: break; /* If no destructor action specified: do nothing */
107063 }
107064 }
@@ -107240,16 +107159,14 @@
107240 }
107241 #endif
107242 while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
107243 /* Here code is inserted which will execute if the parser
107244 ** stack every overflows */
107245 #line 38 "parse.y"
107246
107247 UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */
107248 sqlite3ErrorMsg(pParse, "parser stack overflow");
107249 pParse->parseError = 1;
107250 #line 1664 "parse.c"
107251 sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
107252 }
107253
107254 /*
107255 ** Perform a shift action.
@@ -107686,94 +107603,66 @@
107686 ** { ... } // User supplied code
107687 ** #line <lineno> <thisfile>
107688 ** break;
107689 */
107690 case 5: /* explain ::= */
107691 #line 107 "parse.y"
107692 { sqlite3BeginParse(pParse, 0); }
107693 #line 2107 "parse.c"
107694 break;
107695 case 6: /* explain ::= EXPLAIN */
107696 #line 109 "parse.y"
107697 { sqlite3BeginParse(pParse, 1); }
107698 #line 2112 "parse.c"
107699 break;
107700 case 7: /* explain ::= EXPLAIN QUERY PLAN */
107701 #line 110 "parse.y"
107702 { sqlite3BeginParse(pParse, 2); }
107703 #line 2117 "parse.c"
107704 break;
107705 case 8: /* cmdx ::= cmd */
107706 #line 112 "parse.y"
107707 { sqlite3FinishCoding(pParse); }
107708 #line 2122 "parse.c"
107709 break;
107710 case 9: /* cmd ::= BEGIN transtype trans_opt */
107711 #line 117 "parse.y"
107712 {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy4);}
107713 #line 2127 "parse.c"
107714 break;
107715 case 13: /* transtype ::= */
107716 #line 122 "parse.y"
107717 {yygotominor.yy4 = TK_DEFERRED;}
107718 #line 2132 "parse.c"
107719 break;
107720 case 14: /* transtype ::= DEFERRED */
107721 case 15: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==15);
107722 case 16: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==16);
107723 case 115: /* multiselect_op ::= UNION */ yytestcase(yyruleno==115);
107724 case 117: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==117);
107725 #line 123 "parse.y"
107726 {yygotominor.yy4 = yymsp[0].major;}
107727 #line 2141 "parse.c"
107728 break;
107729 case 17: /* cmd ::= COMMIT trans_opt */
107730 case 18: /* cmd ::= END trans_opt */ yytestcase(yyruleno==18);
107731 #line 126 "parse.y"
107732 {sqlite3CommitTransaction(pParse);}
107733 #line 2147 "parse.c"
107734 break;
107735 case 19: /* cmd ::= ROLLBACK trans_opt */
107736 #line 128 "parse.y"
107737 {sqlite3RollbackTransaction(pParse);}
107738 #line 2152 "parse.c"
107739 break;
107740 case 22: /* cmd ::= SAVEPOINT nm */
107741 #line 132 "parse.y"
107742 {
107743 sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
107744 }
107745 #line 2159 "parse.c"
107746 break;
107747 case 23: /* cmd ::= RELEASE savepoint_opt nm */
107748 #line 135 "parse.y"
107749 {
107750 sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
107751 }
107752 #line 2166 "parse.c"
107753 break;
107754 case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
107755 #line 138 "parse.y"
107756 {
107757 sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
107758 }
107759 #line 2173 "parse.c"
107760 break;
107761 case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
107762 #line 145 "parse.y"
107763 {
107764 sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy4,0,0,yymsp[-2].minor.yy4);
107765 }
107766 #line 2180 "parse.c"
107767 break;
107768 case 27: /* createkw ::= CREATE */
107769 #line 148 "parse.y"
107770 {
107771 pParse->db->lookaside.bEnabled = 0;
107772 yygotominor.yy0 = yymsp[0].minor.yy0;
107773 }
107774 #line 2188 "parse.c"
107775 break;
107776 case 28: /* ifnotexists ::= */
107777 case 31: /* temp ::= */ yytestcase(yyruleno==31);
107778 case 70: /* autoinc ::= */ yytestcase(yyruleno==70);
107779 case 83: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==83);
@@ -107783,56 +107672,44 @@
107783 case 109: /* ifexists ::= */ yytestcase(yyruleno==109);
107784 case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120);
107785 case 121: /* distinct ::= */ yytestcase(yyruleno==121);
107786 case 222: /* between_op ::= BETWEEN */ yytestcase(yyruleno==222);
107787 case 225: /* in_op ::= IN */ yytestcase(yyruleno==225);
107788 #line 153 "parse.y"
107789 {yygotominor.yy4 = 0;}
107790 #line 2204 "parse.c"
107791 break;
107792 case 29: /* ifnotexists ::= IF NOT EXISTS */
107793 case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30);
107794 case 71: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==71);
107795 case 86: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==86);
107796 case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108);
107797 case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119);
107798 case 223: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==223);
107799 case 226: /* in_op ::= NOT IN */ yytestcase(yyruleno==226);
107800 #line 154 "parse.y"
107801 {yygotominor.yy4 = 1;}
107802 #line 2216 "parse.c"
107803 break;
107804 case 32: /* create_table_args ::= LP columnlist conslist_opt RP */
107805 #line 160 "parse.y"
107806 {
107807 sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0);
107808 }
107809 #line 2223 "parse.c"
107810 break;
107811 case 33: /* create_table_args ::= AS select */
107812 #line 163 "parse.y"
107813 {
107814 sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy387);
107815 sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387);
107816 }
107817 #line 2231 "parse.c"
107818 break;
107819 case 36: /* column ::= columnid type carglist */
107820 #line 175 "parse.y"
107821 {
107822 yygotominor.yy0.z = yymsp[-2].minor.yy0.z;
107823 yygotominor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n;
107824 }
107825 #line 2239 "parse.c"
107826 break;
107827 case 37: /* columnid ::= nm */
107828 #line 179 "parse.y"
107829 {
107830 sqlite3AddColumn(pParse,&yymsp[0].minor.yy0);
107831 yygotominor.yy0 = yymsp[0].minor.yy0;
107832 }
107833 #line 2247 "parse.c"
107834 break;
107835 case 38: /* id ::= ID */
107836 case 39: /* id ::= INDEXED */ yytestcase(yyruleno==39);
107837 case 40: /* ids ::= ID|STRING */ yytestcase(yyruleno==40);
107838 case 41: /* nm ::= id */ yytestcase(yyruleno==41);
@@ -107852,373 +107729,256 @@
107852 case 264: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==264);
107853 case 265: /* plus_num ::= plus_opt number */ yytestcase(yyruleno==265);
107854 case 266: /* minus_num ::= MINUS number */ yytestcase(yyruleno==266);
107855 case 267: /* number ::= INTEGER|FLOAT */ yytestcase(yyruleno==267);
107856 case 285: /* trnm ::= nm */ yytestcase(yyruleno==285);
107857 #line 189 "parse.y"
107858 {yygotominor.yy0 = yymsp[0].minor.yy0;}
107859 #line 2273 "parse.c"
107860 break;
107861 case 45: /* type ::= typetoken */
107862 #line 251 "parse.y"
107863 {sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);}
107864 #line 2278 "parse.c"
107865 break;
107866 case 47: /* typetoken ::= typename LP signed RP */
107867 #line 253 "parse.y"
107868 {
107869 yygotominor.yy0.z = yymsp[-3].minor.yy0.z;
107870 yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
107871 }
107872 #line 2286 "parse.c"
107873 break;
107874 case 48: /* typetoken ::= typename LP signed COMMA signed RP */
107875 #line 257 "parse.y"
107876 {
107877 yygotominor.yy0.z = yymsp[-5].minor.yy0.z;
107878 yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
107879 }
107880 #line 2294 "parse.c"
107881 break;
107882 case 50: /* typename ::= typename ids */
107883 #line 263 "parse.y"
107884 {yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
107885 #line 2299 "parse.c"
107886 break;
107887 case 57: /* ccons ::= DEFAULT term */
107888 case 59: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==59);
107889 #line 274 "parse.y"
107890 {sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy118);}
107891 #line 2305 "parse.c"
107892 break;
107893 case 58: /* ccons ::= DEFAULT LP expr RP */
107894 #line 275 "parse.y"
107895 {sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy118);}
107896 #line 2310 "parse.c"
107897 break;
107898 case 60: /* ccons ::= DEFAULT MINUS term */
107899 #line 277 "parse.y"
107900 {
107901 ExprSpan v;
107902 v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy118.pExpr, 0, 0);
107903 v.zStart = yymsp[-1].minor.yy0.z;
107904 v.zEnd = yymsp[0].minor.yy118.zEnd;
107905 sqlite3AddDefaultValue(pParse,&v);
107906 }
107907 #line 2321 "parse.c"
107908 break;
107909 case 61: /* ccons ::= DEFAULT id */
107910 #line 284 "parse.y"
107911 {
107912 ExprSpan v;
107913 spanExpr(&v, pParse, TK_STRING, &yymsp[0].minor.yy0);
107914 sqlite3AddDefaultValue(pParse,&v);
107915 }
107916 #line 2330 "parse.c"
107917 break;
107918 case 63: /* ccons ::= NOT NULL onconf */
107919 #line 294 "parse.y"
107920 {sqlite3AddNotNull(pParse, yymsp[0].minor.yy4);}
107921 #line 2335 "parse.c"
107922 break;
107923 case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
107924 #line 296 "parse.y"
107925 {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy4,yymsp[0].minor.yy4,yymsp[-2].minor.yy4);}
107926 #line 2340 "parse.c"
107927 break;
107928 case 65: /* ccons ::= UNIQUE onconf */
107929 #line 297 "parse.y"
107930 {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy4,0,0,0,0);}
107931 #line 2345 "parse.c"
107932 break;
107933 case 66: /* ccons ::= CHECK LP expr RP */
107934 #line 298 "parse.y"
107935 {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy118.pExpr);}
107936 #line 2350 "parse.c"
107937 break;
107938 case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */
107939 #line 300 "parse.y"
107940 {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy322,yymsp[0].minor.yy4);}
107941 #line 2355 "parse.c"
107942 break;
107943 case 68: /* ccons ::= defer_subclause */
107944 #line 301 "parse.y"
107945 {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy4);}
107946 #line 2360 "parse.c"
107947 break;
107948 case 69: /* ccons ::= COLLATE ids */
107949 #line 302 "parse.y"
107950 {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
107951 #line 2365 "parse.c"
107952 break;
107953 case 72: /* refargs ::= */
107954 #line 315 "parse.y"
107955 { yygotominor.yy4 = OE_None*0x0101; /* EV: R-19803-45884 */}
107956 #line 2370 "parse.c"
107957 break;
107958 case 73: /* refargs ::= refargs refarg */
107959 #line 316 "parse.y"
107960 { yygotominor.yy4 = (yymsp[-1].minor.yy4 & ~yymsp[0].minor.yy215.mask) | yymsp[0].minor.yy215.value; }
107961 #line 2375 "parse.c"
107962 break;
107963 case 74: /* refarg ::= MATCH nm */
107964 case 75: /* refarg ::= ON INSERT refact */ yytestcase(yyruleno==75);
107965 #line 318 "parse.y"
107966 { yygotominor.yy215.value = 0; yygotominor.yy215.mask = 0x000000; }
107967 #line 2381 "parse.c"
107968 break;
107969 case 76: /* refarg ::= ON DELETE refact */
107970 #line 320 "parse.y"
107971 { yygotominor.yy215.value = yymsp[0].minor.yy4; yygotominor.yy215.mask = 0x0000ff; }
107972 #line 2386 "parse.c"
107973 break;
107974 case 77: /* refarg ::= ON UPDATE refact */
107975 #line 321 "parse.y"
107976 { yygotominor.yy215.value = yymsp[0].minor.yy4<<8; yygotominor.yy215.mask = 0x00ff00; }
107977 #line 2391 "parse.c"
107978 break;
107979 case 78: /* refact ::= SET NULL */
107980 #line 323 "parse.y"
107981 { yygotominor.yy4 = OE_SetNull; /* EV: R-33326-45252 */}
107982 #line 2396 "parse.c"
107983 break;
107984 case 79: /* refact ::= SET DEFAULT */
107985 #line 324 "parse.y"
107986 { yygotominor.yy4 = OE_SetDflt; /* EV: R-33326-45252 */}
107987 #line 2401 "parse.c"
107988 break;
107989 case 80: /* refact ::= CASCADE */
107990 #line 325 "parse.y"
107991 { yygotominor.yy4 = OE_Cascade; /* EV: R-33326-45252 */}
107992 #line 2406 "parse.c"
107993 break;
107994 case 81: /* refact ::= RESTRICT */
107995 #line 326 "parse.y"
107996 { yygotominor.yy4 = OE_Restrict; /* EV: R-33326-45252 */}
107997 #line 2411 "parse.c"
107998 break;
107999 case 82: /* refact ::= NO ACTION */
108000 #line 327 "parse.y"
108001 { yygotominor.yy4 = OE_None; /* EV: R-33326-45252 */}
108002 #line 2416 "parse.c"
108003 break;
108004 case 84: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
108005 case 99: /* defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==99);
108006 case 101: /* onconf ::= ON CONFLICT resolvetype */ yytestcase(yyruleno==101);
108007 case 104: /* resolvetype ::= raisetype */ yytestcase(yyruleno==104);
108008 #line 330 "parse.y"
108009 {yygotominor.yy4 = yymsp[0].minor.yy4;}
108010 #line 2424 "parse.c"
108011 break;
108012 case 88: /* conslist_opt ::= */
108013 #line 339 "parse.y"
108014 {yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;}
108015 #line 2429 "parse.c"
108016 break;
108017 case 89: /* conslist_opt ::= COMMA conslist */
108018 #line 340 "parse.y"
108019 {yygotominor.yy0 = yymsp[-1].minor.yy0;}
108020 #line 2434 "parse.c"
108021 break;
108022 case 94: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */
108023 #line 346 "parse.y"
108024 {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy322,yymsp[0].minor.yy4,yymsp[-2].minor.yy4,0);}
108025 #line 2439 "parse.c"
108026 break;
108027 case 95: /* tcons ::= UNIQUE LP idxlist RP onconf */
108028 #line 348 "parse.y"
108029 {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy322,yymsp[0].minor.yy4,0,0,0,0);}
108030 #line 2444 "parse.c"
108031 break;
108032 case 96: /* tcons ::= CHECK LP expr RP onconf */
108033 #line 350 "parse.y"
108034 {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy118.pExpr);}
108035 #line 2449 "parse.c"
108036 break;
108037 case 97: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */
108038 #line 352 "parse.y"
108039 {
108040 sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy322, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[-1].minor.yy4);
108041 sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy4);
108042 }
108043 #line 2457 "parse.c"
108044 break;
108045 case 100: /* onconf ::= */
108046 #line 366 "parse.y"
108047 {yygotominor.yy4 = OE_Default;}
108048 #line 2462 "parse.c"
108049 break;
108050 case 102: /* orconf ::= */
108051 #line 368 "parse.y"
108052 {yygotominor.yy210 = OE_Default;}
108053 #line 2467 "parse.c"
108054 break;
108055 case 103: /* orconf ::= OR resolvetype */
108056 #line 369 "parse.y"
108057 {yygotominor.yy210 = (u8)yymsp[0].minor.yy4;}
108058 #line 2472 "parse.c"
108059 break;
108060 case 105: /* resolvetype ::= IGNORE */
108061 #line 371 "parse.y"
108062 {yygotominor.yy4 = OE_Ignore;}
108063 #line 2477 "parse.c"
108064 break;
108065 case 106: /* resolvetype ::= REPLACE */
108066 #line 372 "parse.y"
108067 {yygotominor.yy4 = OE_Replace;}
108068 #line 2482 "parse.c"
108069 break;
108070 case 107: /* cmd ::= DROP TABLE ifexists fullname */
108071 #line 376 "parse.y"
108072 {
108073 sqlite3DropTable(pParse, yymsp[0].minor.yy259, 0, yymsp[-1].minor.yy4);
108074 }
108075 #line 2489 "parse.c"
108076 break;
108077 case 110: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */
108078 #line 386 "parse.y"
108079 {
108080 sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy387, yymsp[-6].minor.yy4, yymsp[-4].minor.yy4);
108081 }
108082 #line 2496 "parse.c"
108083 break;
108084 case 111: /* cmd ::= DROP VIEW ifexists fullname */
108085 #line 389 "parse.y"
108086 {
108087 sqlite3DropTable(pParse, yymsp[0].minor.yy259, 1, yymsp[-1].minor.yy4);
108088 }
108089 #line 2503 "parse.c"
108090 break;
108091 case 112: /* cmd ::= select */
108092 #line 396 "parse.y"
108093 {
108094 SelectDest dest = {SRT_Output, 0, 0, 0, 0};
108095 sqlite3Select(pParse, yymsp[0].minor.yy387, &dest);
108096 sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387);
108097 }
108098 #line 2512 "parse.c"
108099 break;
108100 case 113: /* select ::= oneselect */
108101 #line 407 "parse.y"
108102 {yygotominor.yy387 = yymsp[0].minor.yy387;}
108103 #line 2517 "parse.c"
108104 break;
108105 case 114: /* select ::= select multiselect_op oneselect */
108106 #line 409 "parse.y"
108107 {
108108 if( yymsp[0].minor.yy387 ){
108109 yymsp[0].minor.yy387->op = (u8)yymsp[-1].minor.yy4;
108110 yymsp[0].minor.yy387->pPrior = yymsp[-2].minor.yy387;
108111 }else{
108112 sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy387);
108113 }
108114 yygotominor.yy387 = yymsp[0].minor.yy387;
108115 }
108116 #line 2530 "parse.c"
108117 break;
108118 case 116: /* multiselect_op ::= UNION ALL */
108119 #line 420 "parse.y"
108120 {yygotominor.yy4 = TK_ALL;}
108121 #line 2535 "parse.c"
108122 break;
108123 case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
108124 #line 424 "parse.y"
108125 {
108126 yygotominor.yy387 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy322,yymsp[-5].minor.yy259,yymsp[-4].minor.yy314,yymsp[-3].minor.yy322,yymsp[-2].minor.yy314,yymsp[-1].minor.yy322,yymsp[-7].minor.yy4,yymsp[0].minor.yy292.pLimit,yymsp[0].minor.yy292.pOffset);
108127 }
108128 #line 2542 "parse.c"
108129 break;
108130 case 122: /* sclp ::= selcollist COMMA */
108131 case 247: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==247);
108132 #line 445 "parse.y"
108133 {yygotominor.yy322 = yymsp[-1].minor.yy322;}
108134 #line 2548 "parse.c"
108135 break;
108136 case 123: /* sclp ::= */
108137 case 151: /* orderby_opt ::= */ yytestcase(yyruleno==151);
108138 case 159: /* groupby_opt ::= */ yytestcase(yyruleno==159);
108139 case 240: /* exprlist ::= */ yytestcase(yyruleno==240);
108140 case 246: /* idxlist_opt ::= */ yytestcase(yyruleno==246);
108141 #line 446 "parse.y"
108142 {yygotominor.yy322 = 0;}
108143 #line 2557 "parse.c"
108144 break;
108145 case 124: /* selcollist ::= sclp expr as */
108146 #line 447 "parse.y"
108147 {
108148 yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy322, yymsp[-1].minor.yy118.pExpr);
108149 if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[0].minor.yy0, 1);
108150 sqlite3ExprListSetSpan(pParse,yygotominor.yy322,&yymsp[-1].minor.yy118);
108151 }
108152 #line 2566 "parse.c"
108153 break;
108154 case 125: /* selcollist ::= sclp STAR */
108155 #line 452 "parse.y"
108156 {
108157 Expr *p = sqlite3Expr(pParse->db, TK_ALL, 0);
108158 yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy322, p);
108159 }
108160 #line 2574 "parse.c"
108161 break;
108162 case 126: /* selcollist ::= sclp nm DOT STAR */
108163 #line 456 "parse.y"
108164 {
108165 Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0);
108166 Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
108167 Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
108168 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, pDot);
108169 }
108170 #line 2584 "parse.c"
108171 break;
108172 case 129: /* as ::= */
108173 #line 469 "parse.y"
108174 {yygotominor.yy0.n = 0;}
108175 #line 2589 "parse.c"
108176 break;
108177 case 130: /* from ::= */
108178 #line 481 "parse.y"
108179 {yygotominor.yy259 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy259));}
108180 #line 2594 "parse.c"
108181 break;
108182 case 131: /* from ::= FROM seltablist */
108183 #line 482 "parse.y"
108184 {
108185 yygotominor.yy259 = yymsp[0].minor.yy259;
108186 sqlite3SrcListShiftJoinType(yygotominor.yy259);
108187 }
108188 #line 2602 "parse.c"
108189 break;
108190 case 132: /* stl_prefix ::= seltablist joinop */
108191 #line 490 "parse.y"
108192 {
108193 yygotominor.yy259 = yymsp[-1].minor.yy259;
108194 if( ALWAYS(yygotominor.yy259 && yygotominor.yy259->nSrc>0) ) yygotominor.yy259->a[yygotominor.yy259->nSrc-1].jointype = (u8)yymsp[0].minor.yy4;
108195 }
108196 #line 2610 "parse.c"
108197 break;
108198 case 133: /* stl_prefix ::= */
108199 #line 494 "parse.y"
108200 {yygotominor.yy259 = 0;}
108201 #line 2615 "parse.c"
108202 break;
108203 case 134: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
108204 #line 495 "parse.y"
108205 {
108206 yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
108207 sqlite3SrcListIndexedBy(pParse, yygotominor.yy259, &yymsp[-2].minor.yy0);
108208 }
108209 #line 2623 "parse.c"
108210 break;
108211 case 135: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
108212 #line 501 "parse.y"
108213 {
108214 yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy387,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
108215 }
108216 #line 2630 "parse.c"
108217 break;
108218 case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
108219 #line 505 "parse.y"
108220 {
108221 if( yymsp[-6].minor.yy259==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy314==0 && yymsp[0].minor.yy384==0 ){
108222 yygotominor.yy259 = yymsp[-4].minor.yy259;
108223 }else{
108224 Select *pSubquery;
@@ -108225,260 +107985,180 @@
108225 sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy259);
108226 pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy259,0,0,0,0,0,0,0);
108227 yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
108228 }
108229 }
108230 #line 2644 "parse.c"
108231 break;
108232 case 137: /* dbnm ::= */
108233 case 146: /* indexed_opt ::= */ yytestcase(yyruleno==146);
108234 #line 530 "parse.y"
108235 {yygotominor.yy0.z=0; yygotominor.yy0.n=0;}
108236 #line 2650 "parse.c"
108237 break;
108238 case 139: /* fullname ::= nm dbnm */
108239 #line 535 "parse.y"
108240 {yygotominor.yy259 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
108241 #line 2655 "parse.c"
108242 break;
108243 case 140: /* joinop ::= COMMA|JOIN */
108244 #line 539 "parse.y"
108245 { yygotominor.yy4 = JT_INNER; }
108246 #line 2660 "parse.c"
108247 break;
108248 case 141: /* joinop ::= JOIN_KW JOIN */
108249 #line 540 "parse.y"
108250 { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
108251 #line 2665 "parse.c"
108252 break;
108253 case 142: /* joinop ::= JOIN_KW nm JOIN */
108254 #line 541 "parse.y"
108255 { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); }
108256 #line 2670 "parse.c"
108257 break;
108258 case 143: /* joinop ::= JOIN_KW nm nm JOIN */
108259 #line 543 "parse.y"
108260 { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); }
108261 #line 2675 "parse.c"
108262 break;
108263 case 144: /* on_opt ::= ON expr */
108264 case 155: /* sortitem ::= expr */ yytestcase(yyruleno==155);
108265 case 162: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==162);
108266 case 169: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==169);
108267 case 235: /* case_else ::= ELSE expr */ yytestcase(yyruleno==235);
108268 case 237: /* case_operand ::= expr */ yytestcase(yyruleno==237);
108269 #line 547 "parse.y"
108270 {yygotominor.yy314 = yymsp[0].minor.yy118.pExpr;}
108271 #line 2685 "parse.c"
108272 break;
108273 case 145: /* on_opt ::= */
108274 case 161: /* having_opt ::= */ yytestcase(yyruleno==161);
108275 case 168: /* where_opt ::= */ yytestcase(yyruleno==168);
108276 case 236: /* case_else ::= */ yytestcase(yyruleno==236);
108277 case 238: /* case_operand ::= */ yytestcase(yyruleno==238);
108278 #line 548 "parse.y"
108279 {yygotominor.yy314 = 0;}
108280 #line 2694 "parse.c"
108281 break;
108282 case 148: /* indexed_opt ::= NOT INDEXED */
108283 #line 563 "parse.y"
108284 {yygotominor.yy0.z=0; yygotominor.yy0.n=1;}
108285 #line 2699 "parse.c"
108286 break;
108287 case 149: /* using_opt ::= USING LP inscollist RP */
108288 case 181: /* inscollist_opt ::= LP inscollist RP */ yytestcase(yyruleno==181);
108289 #line 567 "parse.y"
108290 {yygotominor.yy384 = yymsp[-1].minor.yy384;}
108291 #line 2705 "parse.c"
108292 break;
108293 case 150: /* using_opt ::= */
108294 case 180: /* inscollist_opt ::= */ yytestcase(yyruleno==180);
108295 #line 568 "parse.y"
108296 {yygotominor.yy384 = 0;}
108297 #line 2711 "parse.c"
108298 break;
108299 case 152: /* orderby_opt ::= ORDER BY sortlist */
108300 case 160: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==160);
108301 case 239: /* exprlist ::= nexprlist */ yytestcase(yyruleno==239);
108302 #line 579 "parse.y"
108303 {yygotominor.yy322 = yymsp[0].minor.yy322;}
108304 #line 2718 "parse.c"
108305 break;
108306 case 153: /* sortlist ::= sortlist COMMA sortitem sortorder */
108307 #line 580 "parse.y"
108308 {
108309 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322,yymsp[-1].minor.yy314);
108310 if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
108311 }
108312 #line 2726 "parse.c"
108313 break;
108314 case 154: /* sortlist ::= sortitem sortorder */
108315 #line 584 "parse.y"
108316 {
108317 yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy314);
108318 if( yygotominor.yy322 && ALWAYS(yygotominor.yy322->a) ) yygotominor.yy322->a[0].sortOrder = (u8)yymsp[0].minor.yy4;
108319 }
108320 #line 2734 "parse.c"
108321 break;
108322 case 156: /* sortorder ::= ASC */
108323 case 158: /* sortorder ::= */ yytestcase(yyruleno==158);
108324 #line 592 "parse.y"
108325 {yygotominor.yy4 = SQLITE_SO_ASC;}
108326 #line 2740 "parse.c"
108327 break;
108328 case 157: /* sortorder ::= DESC */
108329 #line 593 "parse.y"
108330 {yygotominor.yy4 = SQLITE_SO_DESC;}
108331 #line 2745 "parse.c"
108332 break;
108333 case 163: /* limit_opt ::= */
108334 #line 619 "parse.y"
108335 {yygotominor.yy292.pLimit = 0; yygotominor.yy292.pOffset = 0;}
108336 #line 2750 "parse.c"
108337 break;
108338 case 164: /* limit_opt ::= LIMIT expr */
108339 #line 620 "parse.y"
108340 {yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr; yygotominor.yy292.pOffset = 0;}
108341 #line 2755 "parse.c"
108342 break;
108343 case 165: /* limit_opt ::= LIMIT expr OFFSET expr */
108344 #line 622 "parse.y"
108345 {yygotominor.yy292.pLimit = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pOffset = yymsp[0].minor.yy118.pExpr;}
108346 #line 2760 "parse.c"
108347 break;
108348 case 166: /* limit_opt ::= LIMIT expr COMMA expr */
108349 #line 624 "parse.y"
108350 {yygotominor.yy292.pOffset = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr;}
108351 #line 2765 "parse.c"
108352 break;
108353 case 167: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */
108354 #line 637 "parse.y"
108355 {
108356 sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy259, &yymsp[-1].minor.yy0);
108357 sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy259,yymsp[0].minor.yy314);
108358 }
108359 #line 2773 "parse.c"
108360 break;
108361 case 170: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */
108362 #line 660 "parse.y"
108363 {
108364 sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy259, &yymsp[-3].minor.yy0);
108365 sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy322,"set list");
108366 sqlite3Update(pParse,yymsp[-4].minor.yy259,yymsp[-1].minor.yy322,yymsp[0].minor.yy314,yymsp[-5].minor.yy210);
108367 }
108368 #line 2782 "parse.c"
108369 break;
108370 case 171: /* setlist ::= setlist COMMA nm EQ expr */
108371 #line 670 "parse.y"
108372 {
108373 yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy322, yymsp[0].minor.yy118.pExpr);
108374 sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
108375 }
108376 #line 2790 "parse.c"
108377 break;
108378 case 172: /* setlist ::= nm EQ expr */
108379 #line 674 "parse.y"
108380 {
108381 yygotominor.yy322 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy118.pExpr);
108382 sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
108383 }
108384 #line 2798 "parse.c"
108385 break;
108386 case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */
108387 #line 683 "parse.y"
108388 {sqlite3Insert(pParse, yymsp[-5].minor.yy259, yymsp[-1].minor.yy322, 0, yymsp[-4].minor.yy384, yymsp[-7].minor.yy210);}
108389 #line 2803 "parse.c"
108390 break;
108391 case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */
108392 #line 685 "parse.y"
108393 {sqlite3Insert(pParse, yymsp[-2].minor.yy259, 0, yymsp[0].minor.yy387, yymsp[-1].minor.yy384, yymsp[-4].minor.yy210);}
108394 #line 2808 "parse.c"
108395 break;
108396 case 175: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */
108397 #line 687 "parse.y"
108398 {sqlite3Insert(pParse, yymsp[-3].minor.yy259, 0, 0, yymsp[-2].minor.yy384, yymsp[-5].minor.yy210);}
108399 #line 2813 "parse.c"
108400 break;
108401 case 176: /* insert_cmd ::= INSERT orconf */
108402 #line 690 "parse.y"
108403 {yygotominor.yy210 = yymsp[0].minor.yy210;}
108404 #line 2818 "parse.c"
108405 break;
108406 case 177: /* insert_cmd ::= REPLACE */
108407 #line 691 "parse.y"
108408 {yygotominor.yy210 = OE_Replace;}
108409 #line 2823 "parse.c"
108410 break;
108411 case 178: /* itemlist ::= itemlist COMMA expr */
108412 case 241: /* nexprlist ::= nexprlist COMMA expr */ yytestcase(yyruleno==241);
108413 #line 698 "parse.y"
108414 {yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy118.pExpr);}
108415 #line 2829 "parse.c"
108416 break;
108417 case 179: /* itemlist ::= expr */
108418 case 242: /* nexprlist ::= expr */ yytestcase(yyruleno==242);
108419 #line 700 "parse.y"
108420 {yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy118.pExpr);}
108421 #line 2835 "parse.c"
108422 break;
108423 case 182: /* inscollist ::= inscollist COMMA nm */
108424 #line 710 "parse.y"
108425 {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy384,&yymsp[0].minor.yy0);}
108426 #line 2840 "parse.c"
108427 break;
108428 case 183: /* inscollist ::= nm */
108429 #line 712 "parse.y"
108430 {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);}
108431 #line 2845 "parse.c"
108432 break;
108433 case 184: /* expr ::= term */
108434 #line 743 "parse.y"
108435 {yygotominor.yy118 = yymsp[0].minor.yy118;}
108436 #line 2850 "parse.c"
108437 break;
108438 case 185: /* expr ::= LP expr RP */
108439 #line 744 "parse.y"
108440 {yygotominor.yy118.pExpr = yymsp[-1].minor.yy118.pExpr; spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);}
108441 #line 2855 "parse.c"
108442 break;
108443 case 186: /* term ::= NULL */
108444 case 191: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==191);
108445 case 192: /* term ::= STRING */ yytestcase(yyruleno==192);
108446 #line 745 "parse.y"
108447 {spanExpr(&yygotominor.yy118, pParse, yymsp[0].major, &yymsp[0].minor.yy0);}
108448 #line 2862 "parse.c"
108449 break;
108450 case 187: /* expr ::= id */
108451 case 188: /* expr ::= JOIN_KW */ yytestcase(yyruleno==188);
108452 #line 746 "parse.y"
108453 {spanExpr(&yygotominor.yy118, pParse, TK_ID, &yymsp[0].minor.yy0);}
108454 #line 2868 "parse.c"
108455 break;
108456 case 189: /* expr ::= nm DOT nm */
108457 #line 748 "parse.y"
108458 {
108459 Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
108460 Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
108461 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0);
108462 spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
108463 }
108464 #line 2878 "parse.c"
108465 break;
108466 case 190: /* expr ::= nm DOT nm DOT nm */
108467 #line 754 "parse.y"
108468 {
108469 Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0);
108470 Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
108471 Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
108472 Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0);
108473 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0);
108474 spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
108475 }
108476 #line 2890 "parse.c"
108477 break;
108478 case 193: /* expr ::= REGISTER */
108479 #line 764 "parse.y"
108480 {
108481 /* When doing a nested parse, one can include terms in an expression
108482 ** that look like this: #1 #2 ... These terms refer to registers
108483 ** in the virtual machine. #N is the N-th register. */
108484 if( pParse->nested==0 ){
@@ -108488,40 +108168,32 @@
108488 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &yymsp[0].minor.yy0);
108489 if( yygotominor.yy118.pExpr ) sqlite3GetInt32(&yymsp[0].minor.yy0.z[1], &yygotominor.yy118.pExpr->iTable);
108490 }
108491 spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
108492 }
108493 #line 2907 "parse.c"
108494 break;
108495 case 194: /* expr ::= VARIABLE */
108496 #line 777 "parse.y"
108497 {
108498 spanExpr(&yygotominor.yy118, pParse, TK_VARIABLE, &yymsp[0].minor.yy0);
108499 sqlite3ExprAssignVarNumber(pParse, yygotominor.yy118.pExpr);
108500 spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
108501 }
108502 #line 2916 "parse.c"
108503 break;
108504 case 195: /* expr ::= expr COLLATE ids */
108505 #line 782 "parse.y"
108506 {
108507 yygotominor.yy118.pExpr = sqlite3ExprSetCollByToken(pParse, yymsp[-2].minor.yy118.pExpr, &yymsp[0].minor.yy0);
108508 yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart;
108509 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108510 }
108511 #line 2925 "parse.c"
108512 break;
108513 case 196: /* expr ::= CAST LP expr AS typetoken RP */
108514 #line 788 "parse.y"
108515 {
108516 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy118.pExpr, 0, &yymsp[-1].minor.yy0);
108517 spanSet(&yygotominor.yy118,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);
108518 }
108519 #line 2933 "parse.c"
108520 break;
108521 case 197: /* expr ::= ID LP distinct exprlist RP */
108522 #line 793 "parse.y"
108523 {
108524 if( yymsp[-1].minor.yy322 && yymsp[-1].minor.yy322->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
108525 sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
108526 }
108527 yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0);
@@ -108528,59 +108200,47 @@
108528 spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
108529 if( yymsp[-2].minor.yy4 && yygotominor.yy118.pExpr ){
108530 yygotominor.yy118.pExpr->flags |= EP_Distinct;
108531 }
108532 }
108533 #line 2947 "parse.c"
108534 break;
108535 case 198: /* expr ::= ID LP STAR RP */
108536 #line 803 "parse.y"
108537 {
108538 yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0);
108539 spanSet(&yygotominor.yy118,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
108540 }
108541 #line 2955 "parse.c"
108542 break;
108543 case 199: /* term ::= CTIME_KW */
108544 #line 807 "parse.y"
108545 {
108546 /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are
108547 ** treated as functions that return constants */
108548 yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0);
108549 if( yygotominor.yy118.pExpr ){
108550 yygotominor.yy118.pExpr->op = TK_CONST_FUNC;
108551 }
108552 spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
108553 }
108554 #line 2968 "parse.c"
108555 break;
108556 case 200: /* expr ::= expr AND expr */
108557 case 201: /* expr ::= expr OR expr */ yytestcase(yyruleno==201);
108558 case 202: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==202);
108559 case 203: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==203);
108560 case 204: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==204);
108561 case 205: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==205);
108562 case 206: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==206);
108563 case 207: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==207);
108564 #line 834 "parse.y"
108565 {spanBinaryExpr(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);}
108566 #line 2980 "parse.c"
108567 break;
108568 case 208: /* likeop ::= LIKE_KW */
108569 case 210: /* likeop ::= MATCH */ yytestcase(yyruleno==210);
108570 #line 847 "parse.y"
108571 {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 0;}
108572 #line 2986 "parse.c"
108573 break;
108574 case 209: /* likeop ::= NOT LIKE_KW */
108575 case 211: /* likeop ::= NOT MATCH */ yytestcase(yyruleno==211);
108576 #line 848 "parse.y"
108577 {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 1;}
108578 #line 2992 "parse.c"
108579 break;
108580 case 212: /* expr ::= expr likeop expr */
108581 #line 851 "parse.y"
108582 {
108583 ExprList *pList;
108584 pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy118.pExpr);
108585 pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy118.pExpr);
108586 yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy342.eOperator);
@@ -108587,14 +108247,12 @@
108587 if( yymsp[-1].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108588 yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart;
108589 yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
108590 if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc;
108591 }
108592 #line 3006 "parse.c"
108593 break;
108594 case 213: /* expr ::= expr likeop expr ESCAPE expr */
108595 #line 861 "parse.y"
108596 {
108597 ExprList *pList;
108598 pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
108599 pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy118.pExpr);
108600 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr);
@@ -108602,56 +108260,40 @@
108602 if( yymsp[-3].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108603 yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108604 yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
108605 if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc;
108606 }
108607 #line 3021 "parse.c"
108608 break;
108609 case 214: /* expr ::= expr ISNULL|NOTNULL */
108610 #line 889 "parse.y"
108611 {spanUnaryPostfix(&yygotominor.yy118,pParse,yymsp[0].major,&yymsp[-1].minor.yy118,&yymsp[0].minor.yy0);}
108612 #line 3026 "parse.c"
108613 break;
108614 case 215: /* expr ::= expr NOT NULL */
108615 #line 890 "parse.y"
108616 {spanUnaryPostfix(&yygotominor.yy118,pParse,TK_NOTNULL,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy0);}
108617 #line 3031 "parse.c"
108618 break;
108619 case 216: /* expr ::= expr IS expr */
108620 #line 911 "parse.y"
108621 {
108622 spanBinaryExpr(&yygotominor.yy118,pParse,TK_IS,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);
108623 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_ISNULL);
108624 }
108625 #line 3039 "parse.c"
108626 break;
108627 case 217: /* expr ::= expr IS NOT expr */
108628 #line 915 "parse.y"
108629 {
108630 spanBinaryExpr(&yygotominor.yy118,pParse,TK_ISNOT,&yymsp[-3].minor.yy118,&yymsp[0].minor.yy118);
108631 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_NOTNULL);
108632 }
108633 #line 3047 "parse.c"
108634 break;
108635 case 218: /* expr ::= NOT expr */
108636 case 219: /* expr ::= BITNOT expr */ yytestcase(yyruleno==219);
108637 #line 938 "parse.y"
108638 {spanUnaryPrefix(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
108639 #line 3053 "parse.c"
108640 break;
108641 case 220: /* expr ::= MINUS expr */
108642 #line 941 "parse.y"
108643 {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UMINUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
108644 #line 3058 "parse.c"
108645 break;
108646 case 221: /* expr ::= PLUS expr */
108647 #line 943 "parse.y"
108648 {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UPLUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
108649 #line 3063 "parse.c"
108650 break;
108651 case 224: /* expr ::= expr between_op expr AND expr */
108652 #line 948 "parse.y"
108653 {
108654 ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
108655 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr);
108656 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy118.pExpr, 0, 0);
108657 if( yygotominor.yy118.pExpr ){
@@ -108661,14 +108303,12 @@
108661 }
108662 if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108663 yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108664 yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
108665 }
108666 #line 3080 "parse.c"
108667 break;
108668 case 227: /* expr ::= expr in_op LP exprlist RP */
108669 #line 965 "parse.y"
108670 {
108671 if( yymsp[-1].minor.yy322==0 ){
108672 /* Expressions of the form
108673 **
108674 ** expr1 IN ()
@@ -108690,14 +108330,12 @@
108690 if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108691 }
108692 yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108693 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108694 }
108695 #line 3109 "parse.c"
108696 break;
108697 case 228: /* expr ::= LP select RP */
108698 #line 990 "parse.y"
108699 {
108700 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0);
108701 if( yygotominor.yy118.pExpr ){
108702 yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387;
108703 ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect);
@@ -108706,14 +108344,12 @@
108706 sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387);
108707 }
108708 yygotominor.yy118.zStart = yymsp[-2].minor.yy0.z;
108709 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108710 }
108711 #line 3125 "parse.c"
108712 break;
108713 case 229: /* expr ::= expr in_op LP select RP */
108714 #line 1002 "parse.y"
108715 {
108716 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy118.pExpr, 0, 0);
108717 if( yygotominor.yy118.pExpr ){
108718 yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387;
108719 ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect);
@@ -108723,14 +108359,12 @@
108723 }
108724 if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108725 yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108726 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108727 }
108728 #line 3142 "parse.c"
108729 break;
108730 case 230: /* expr ::= expr in_op nm dbnm */
108731 #line 1015 "parse.y"
108732 {
108733 SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);
108734 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy118.pExpr, 0, 0);
108735 if( yygotominor.yy118.pExpr ){
108736 yygotominor.yy118.pExpr->x.pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0);
@@ -108741,14 +108375,12 @@
108741 }
108742 if( yymsp[-2].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108743 yygotominor.yy118.zStart = yymsp[-3].minor.yy118.zStart;
108744 yygotominor.yy118.zEnd = yymsp[0].minor.yy0.z ? &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] : &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n];
108745 }
108746 #line 3160 "parse.c"
108747 break;
108748 case 231: /* expr ::= EXISTS LP select RP */
108749 #line 1029 "parse.y"
108750 {
108751 Expr *p = yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0);
108752 if( p ){
108753 p->x.pSelect = yymsp[-1].minor.yy387;
108754 ExprSetProperty(p, EP_xIsSelect);
@@ -108757,14 +108389,12 @@
108757 sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387);
108758 }
108759 yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z;
108760 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108761 }
108762 #line 3176 "parse.c"
108763 break;
108764 case 232: /* expr ::= CASE case_operand case_exprlist case_else END */
108765 #line 1044 "parse.y"
108766 {
108767 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy314, yymsp[-1].minor.yy314, 0);
108768 if( yygotominor.yy118.pExpr ){
108769 yygotominor.yy118.pExpr->x.pList = yymsp[-2].minor.yy322;
108770 sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr);
@@ -108772,50 +108402,38 @@
108772 sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy322);
108773 }
108774 yygotominor.yy118.zStart = yymsp[-4].minor.yy0.z;
108775 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108776 }
108777 #line 3191 "parse.c"
108778 break;
108779 case 233: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
108780 #line 1057 "parse.y"
108781 {
108782 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy118.pExpr);
108783 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr);
108784 }
108785 #line 3199 "parse.c"
108786 break;
108787 case 234: /* case_exprlist ::= WHEN expr THEN expr */
108788 #line 1061 "parse.y"
108789 {
108790 yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
108791 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr);
108792 }
108793 #line 3207 "parse.c"
108794 break;
108795 case 243: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */
108796 #line 1090 "parse.y"
108797 {
108798 sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0,
108799 sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy322, yymsp[-9].minor.yy4,
108800 &yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy4);
108801 }
108802 #line 3216 "parse.c"
108803 break;
108804 case 244: /* uniqueflag ::= UNIQUE */
108805 case 298: /* raisetype ::= ABORT */ yytestcase(yyruleno==298);
108806 #line 1097 "parse.y"
108807 {yygotominor.yy4 = OE_Abort;}
108808 #line 3222 "parse.c"
108809 break;
108810 case 245: /* uniqueflag ::= */
108811 #line 1098 "parse.y"
108812 {yygotominor.yy4 = OE_None;}
108813 #line 3227 "parse.c"
108814 break;
108815 case 248: /* idxlist ::= idxlist COMMA nm collate sortorder */
108816 #line 1107 "parse.y"
108817 {
108818 Expr *p = 0;
108819 if( yymsp[-1].minor.yy0.n>0 ){
108820 p = sqlite3Expr(pParse->db, TK_COLUMN, 0);
108821 sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0);
@@ -108823,14 +108441,12 @@
108823 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, p);
108824 sqlite3ExprListSetName(pParse,yygotominor.yy322,&yymsp[-2].minor.yy0,1);
108825 sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index");
108826 if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
108827 }
108828 #line 3242 "parse.c"
108829 break;
108830 case 249: /* idxlist ::= nm collate sortorder */
108831 #line 1118 "parse.y"
108832 {
108833 Expr *p = 0;
108834 if( yymsp[-1].minor.yy0.n>0 ){
108835 p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);
108836 sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0);
@@ -108838,307 +108454,214 @@
108838 yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, p);
108839 sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
108840 sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index");
108841 if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
108842 }
108843 #line 3257 "parse.c"
108844 break;
108845 case 250: /* collate ::= */
108846 #line 1131 "parse.y"
108847 {yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;}
108848 #line 3262 "parse.c"
108849 break;
108850 case 252: /* cmd ::= DROP INDEX ifexists fullname */
108851 #line 1137 "parse.y"
108852 {sqlite3DropIndex(pParse, yymsp[0].minor.yy259, yymsp[-1].minor.yy4);}
108853 #line 3267 "parse.c"
108854 break;
108855 case 253: /* cmd ::= VACUUM */
108856 case 254: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==254);
108857 #line 1143 "parse.y"
108858 {sqlite3Vacuum(pParse);}
108859 #line 3273 "parse.c"
108860 break;
108861 case 255: /* cmd ::= PRAGMA nm dbnm */
108862 #line 1151 "parse.y"
108863 {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
108864 #line 3278 "parse.c"
108865 break;
108866 case 256: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
108867 #line 1152 "parse.y"
108868 {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
108869 #line 3283 "parse.c"
108870 break;
108871 case 257: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
108872 #line 1153 "parse.y"
108873 {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
108874 #line 3288 "parse.c"
108875 break;
108876 case 258: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
108877 #line 1155 "parse.y"
108878 {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
108879 #line 3293 "parse.c"
108880 break;
108881 case 259: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
108882 #line 1157 "parse.y"
108883 {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
108884 #line 3298 "parse.c"
108885 break;
108886 case 270: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
108887 #line 1175 "parse.y"
108888 {
108889 Token all;
108890 all.z = yymsp[-3].minor.yy0.z;
108891 all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
108892 sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy203, &all);
108893 }
108894 #line 3308 "parse.c"
108895 break;
108896 case 271: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
108897 #line 1184 "parse.y"
108898 {
108899 sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy4, yymsp[-4].minor.yy90.a, yymsp[-4].minor.yy90.b, yymsp[-2].minor.yy259, yymsp[0].minor.yy314, yymsp[-10].minor.yy4, yymsp[-8].minor.yy4);
108900 yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0);
108901 }
108902 #line 3316 "parse.c"
108903 break;
108904 case 272: /* trigger_time ::= BEFORE */
108905 case 275: /* trigger_time ::= */ yytestcase(yyruleno==275);
108906 #line 1190 "parse.y"
108907 { yygotominor.yy4 = TK_BEFORE; }
108908 #line 3322 "parse.c"
108909 break;
108910 case 273: /* trigger_time ::= AFTER */
108911 #line 1191 "parse.y"
108912 { yygotominor.yy4 = TK_AFTER; }
108913 #line 3327 "parse.c"
108914 break;
108915 case 274: /* trigger_time ::= INSTEAD OF */
108916 #line 1192 "parse.y"
108917 { yygotominor.yy4 = TK_INSTEAD;}
108918 #line 3332 "parse.c"
108919 break;
108920 case 276: /* trigger_event ::= DELETE|INSERT */
108921 case 277: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==277);
108922 #line 1197 "parse.y"
108923 {yygotominor.yy90.a = yymsp[0].major; yygotominor.yy90.b = 0;}
108924 #line 3338 "parse.c"
108925 break;
108926 case 278: /* trigger_event ::= UPDATE OF inscollist */
108927 #line 1199 "parse.y"
108928 {yygotominor.yy90.a = TK_UPDATE; yygotominor.yy90.b = yymsp[0].minor.yy384;}
108929 #line 3343 "parse.c"
108930 break;
108931 case 281: /* when_clause ::= */
108932 case 303: /* key_opt ::= */ yytestcase(yyruleno==303);
108933 #line 1206 "parse.y"
108934 { yygotominor.yy314 = 0; }
108935 #line 3349 "parse.c"
108936 break;
108937 case 282: /* when_clause ::= WHEN expr */
108938 case 304: /* key_opt ::= KEY expr */ yytestcase(yyruleno==304);
108939 #line 1207 "parse.y"
108940 { yygotominor.yy314 = yymsp[0].minor.yy118.pExpr; }
108941 #line 3355 "parse.c"
108942 break;
108943 case 283: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
108944 #line 1211 "parse.y"
108945 {
108946 assert( yymsp[-2].minor.yy203!=0 );
108947 yymsp[-2].minor.yy203->pLast->pNext = yymsp[-1].minor.yy203;
108948 yymsp[-2].minor.yy203->pLast = yymsp[-1].minor.yy203;
108949 yygotominor.yy203 = yymsp[-2].minor.yy203;
108950 }
108951 #line 3365 "parse.c"
108952 break;
108953 case 284: /* trigger_cmd_list ::= trigger_cmd SEMI */
108954 #line 1217 "parse.y"
108955 {
108956 assert( yymsp[-1].minor.yy203!=0 );
108957 yymsp[-1].minor.yy203->pLast = yymsp[-1].minor.yy203;
108958 yygotominor.yy203 = yymsp[-1].minor.yy203;
108959 }
108960 #line 3374 "parse.c"
108961 break;
108962 case 286: /* trnm ::= nm DOT nm */
108963 #line 1229 "parse.y"
108964 {
108965 yygotominor.yy0 = yymsp[0].minor.yy0;
108966 sqlite3ErrorMsg(pParse,
108967 "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
108968 "statements within triggers");
108969 }
108970 #line 3384 "parse.c"
108971 break;
108972 case 288: /* tridxby ::= INDEXED BY nm */
108973 #line 1241 "parse.y"
108974 {
108975 sqlite3ErrorMsg(pParse,
108976 "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
108977 "within triggers");
108978 }
108979 #line 3393 "parse.c"
108980 break;
108981 case 289: /* tridxby ::= NOT INDEXED */
108982 #line 1246 "parse.y"
108983 {
108984 sqlite3ErrorMsg(pParse,
108985 "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
108986 "within triggers");
108987 }
108988 #line 3402 "parse.c"
108989 break;
108990 case 290: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */
108991 #line 1259 "parse.y"
108992 { yygotominor.yy203 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy322, yymsp[0].minor.yy314, yymsp[-5].minor.yy210); }
108993 #line 3407 "parse.c"
108994 break;
108995 case 291: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */
108996 #line 1264 "parse.y"
108997 {yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy384, yymsp[-1].minor.yy322, 0, yymsp[-7].minor.yy210);}
108998 #line 3412 "parse.c"
108999 break;
109000 case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */
109001 #line 1267 "parse.y"
109002 {yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy384, 0, yymsp[0].minor.yy387, yymsp[-4].minor.yy210);}
109003 #line 3417 "parse.c"
109004 break;
109005 case 293: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */
109006 #line 1271 "parse.y"
109007 {yygotominor.yy203 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy314);}
109008 #line 3422 "parse.c"
109009 break;
109010 case 294: /* trigger_cmd ::= select */
109011 #line 1274 "parse.y"
109012 {yygotominor.yy203 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy387); }
109013 #line 3427 "parse.c"
109014 break;
109015 case 295: /* expr ::= RAISE LP IGNORE RP */
109016 #line 1277 "parse.y"
109017 {
109018 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0);
109019 if( yygotominor.yy118.pExpr ){
109020 yygotominor.yy118.pExpr->affinity = OE_Ignore;
109021 }
109022 yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z;
109023 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
109024 }
109025 #line 3439 "parse.c"
109026 break;
109027 case 296: /* expr ::= RAISE LP raisetype COMMA nm RP */
109028 #line 1285 "parse.y"
109029 {
109030 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0);
109031 if( yygotominor.yy118.pExpr ) {
109032 yygotominor.yy118.pExpr->affinity = (char)yymsp[-3].minor.yy4;
109033 }
109034 yygotominor.yy118.zStart = yymsp[-5].minor.yy0.z;
109035 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
109036 }
109037 #line 3451 "parse.c"
109038 break;
109039 case 297: /* raisetype ::= ROLLBACK */
109040 #line 1296 "parse.y"
109041 {yygotominor.yy4 = OE_Rollback;}
109042 #line 3456 "parse.c"
109043 break;
109044 case 299: /* raisetype ::= FAIL */
109045 #line 1298 "parse.y"
109046 {yygotominor.yy4 = OE_Fail;}
109047 #line 3461 "parse.c"
109048 break;
109049 case 300: /* cmd ::= DROP TRIGGER ifexists fullname */
109050 #line 1303 "parse.y"
109051 {
109052 sqlite3DropTrigger(pParse,yymsp[0].minor.yy259,yymsp[-1].minor.yy4);
109053 }
109054 #line 3468 "parse.c"
109055 break;
109056 case 301: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
109057 #line 1310 "parse.y"
109058 {
109059 sqlite3Attach(pParse, yymsp[-3].minor.yy118.pExpr, yymsp[-1].minor.yy118.pExpr, yymsp[0].minor.yy314);
109060 }
109061 #line 3475 "parse.c"
109062 break;
109063 case 302: /* cmd ::= DETACH database_kw_opt expr */
109064 #line 1313 "parse.y"
109065 {
109066 sqlite3Detach(pParse, yymsp[0].minor.yy118.pExpr);
109067 }
109068 #line 3482 "parse.c"
109069 break;
109070 case 307: /* cmd ::= REINDEX */
109071 #line 1328 "parse.y"
109072 {sqlite3Reindex(pParse, 0, 0);}
109073 #line 3487 "parse.c"
109074 break;
109075 case 308: /* cmd ::= REINDEX nm dbnm */
109076 #line 1329 "parse.y"
109077 {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
109078 #line 3492 "parse.c"
109079 break;
109080 case 309: /* cmd ::= ANALYZE */
109081 #line 1334 "parse.y"
109082 {sqlite3Analyze(pParse, 0, 0);}
109083 #line 3497 "parse.c"
109084 break;
109085 case 310: /* cmd ::= ANALYZE nm dbnm */
109086 #line 1335 "parse.y"
109087 {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
109088 #line 3502 "parse.c"
109089 break;
109090 case 311: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
109091 #line 1340 "parse.y"
109092 {
109093 sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy259,&yymsp[0].minor.yy0);
109094 }
109095 #line 3509 "parse.c"
109096 break;
109097 case 312: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */
109098 #line 1343 "parse.y"
109099 {
109100 sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0);
109101 }
109102 #line 3516 "parse.c"
109103 break;
109104 case 313: /* add_column_fullname ::= fullname */
109105 #line 1346 "parse.y"
109106 {
109107 pParse->db->lookaside.bEnabled = 0;
109108 sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy259);
109109 }
109110 #line 3524 "parse.c"
109111 break;
109112 case 316: /* cmd ::= create_vtab */
109113 #line 1356 "parse.y"
109114 {sqlite3VtabFinishParse(pParse,0);}
109115 #line 3529 "parse.c"
109116 break;
109117 case 317: /* cmd ::= create_vtab LP vtabarglist RP */
109118 #line 1357 "parse.y"
109119 {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
109120 #line 3534 "parse.c"
109121 break;
109122 case 318: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */
109123 #line 1358 "parse.y"
109124 {
109125 sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
109126 }
109127 #line 3541 "parse.c"
109128 break;
109129 case 321: /* vtabarg ::= */
109130 #line 1363 "parse.y"
109131 {sqlite3VtabArgInit(pParse);}
109132 #line 3546 "parse.c"
109133 break;
109134 case 323: /* vtabargtoken ::= ANY */
109135 case 324: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==324);
109136 case 325: /* lp ::= LP */ yytestcase(yyruleno==325);
109137 #line 1365 "parse.y"
109138 {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
109139 #line 3553 "parse.c"
109140 break;
109141 default:
109142 /* (0) input ::= cmdlist */ yytestcase(yyruleno==0);
109143 /* (1) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==1);
109144 /* (2) cmdlist ::= ecmd */ yytestcase(yyruleno==2);
@@ -109236,17 +108759,15 @@
109236 int yymajor, /* The major type of the error token */
109237 YYMINORTYPE yyminor /* The minor type of the error token */
109238 ){
109239 sqlite3ParserARG_FETCH;
109240 #define TOKEN (yyminor.yy0)
109241 #line 32 "parse.y"
109242
109243 UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
109244 assert( TOKEN.z[0] ); /* The tokenizer always gives us a token */
109245 sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
109246 pParse->parseError = 1;
109247 #line 3661 "parse.c"
109248 sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
109249 }
109250
109251 /*
109252 ** The following is executed when the parser accepts
@@ -109436,11 +108957,10 @@
109436 return;
109437 }
109438
109439 /************** End of parse.c ***********************************************/
109440 /************** Begin file tokenize.c ****************************************/
109441 #line 1 "tsrc/tokenize.c"
109442 /*
109443 ** 2001 September 15
109444 **
109445 ** The author disclaims copyright to this source code. In place of
109446 ** a legal notice, here is a blessing:
@@ -109502,11 +109022,10 @@
109502 ** named keywordhash.h and then included into this source file by
109503 ** the #include below.
109504 */
109505 /************** Include keywordhash.h in the middle of tokenize.c ************/
109506 /************** Begin file keywordhash.h *************************************/
109507 #line 1 "tsrc/keywordhash.h"
109508 /***** This file contains automatically generated code ******
109509 **
109510 ** The code in this file has been automatically generated by
109511 **
109512 ** sqlite/tool/mkkeywordhash.c
@@ -109776,11 +109295,10 @@
109776 }
109777 #define SQLITE_N_KEYWORD 121
109778
109779 /************** End of keywordhash.h *****************************************/
109780 /************** Continuing where we left off in tokenize.c *******************/
109781 #line 66 "tsrc/tokenize.c"
109782
109783
109784 /*
109785 ** If X is a character that can be used in an identifier then
109786 ** IdChar(X) will be true. Otherwise it is false.
@@ -110241,11 +109759,10 @@
110241 return nErr;
110242 }
110243
110244 /************** End of tokenize.c ********************************************/
110245 /************** Begin file complete.c ****************************************/
110246 #line 1 "tsrc/complete.c"
110247 /*
110248 ** 2001 September 15
110249 **
110250 ** The author disclaims copyright to this source code. In place of
110251 ** a legal notice, here is a blessing:
@@ -110527,11 +110044,10 @@
110527 #endif /* SQLITE_OMIT_UTF16 */
110528 #endif /* SQLITE_OMIT_COMPLETE */
110529
110530 /************** End of complete.c ********************************************/
110531 /************** Begin file main.c ********************************************/
110532 #line 1 "tsrc/main.c"
110533 /*
110534 ** 2001 September 15
110535 **
110536 ** The author disclaims copyright to this source code. In place of
110537 ** a legal notice, here is a blessing:
@@ -110548,11 +110064,10 @@
110548 */
110549
110550 #ifdef SQLITE_ENABLE_FTS3
110551 /************** Include fts3.h in the middle of main.c ***********************/
110552 /************** Begin file fts3.h ********************************************/
110553 #line 1 "tsrc/fts3.h"
110554 /*
110555 ** 2006 Oct 10
110556 **
110557 ** The author disclaims copyright to this source code. In place of
110558 ** a legal notice, here is a blessing:
@@ -110577,16 +110092,14 @@
110577 } /* extern "C" */
110578 #endif /* __cplusplus */
110579
110580 /************** End of fts3.h ************************************************/
110581 /************** Continuing where we left off in main.c ***********************/
110582 #line 21 "tsrc/main.c"
110583 #endif
110584 #ifdef SQLITE_ENABLE_RTREE
110585 /************** Include rtree.h in the middle of main.c **********************/
110586 /************** Begin file rtree.h *******************************************/
110587 #line 1 "tsrc/rtree.h"
110588 /*
110589 ** 2008 May 26
110590 **
110591 ** The author disclaims copyright to this source code. In place of
110592 ** a legal notice, here is a blessing:
@@ -110611,16 +110124,14 @@
110611 } /* extern "C" */
110612 #endif /* __cplusplus */
110613
110614 /************** End of rtree.h ***********************************************/
110615 /************** Continuing where we left off in main.c ***********************/
110616 #line 24 "tsrc/main.c"
110617 #endif
110618 #ifdef SQLITE_ENABLE_ICU
110619 /************** Include sqliteicu.h in the middle of main.c ******************/
110620 /************** Begin file sqliteicu.h ***************************************/
110621 #line 1 "tsrc/sqliteicu.h"
110622 /*
110623 ** 2008 May 26
110624 **
110625 ** The author disclaims copyright to this source code. In place of
110626 ** a legal notice, here is a blessing:
@@ -110646,11 +110157,10 @@
110646 #endif /* __cplusplus */
110647
110648
110649 /************** End of sqliteicu.h *******************************************/
110650 /************** Continuing where we left off in main.c ***********************/
110651 #line 27 "tsrc/main.c"
110652 #endif
110653
110654 #ifndef SQLITE_AMALGAMATION
110655 /* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant
110656 ** contains the text of SQLITE_VERSION macro.
@@ -113577,11 +113087,10 @@
113577 return 0;
113578 }
113579
113580 /************** End of main.c ************************************************/
113581 /************** Begin file notify.c ******************************************/
113582 #line 1 "tsrc/notify.c"
113583 /*
113584 ** 2009 March 3
113585 **
113586 ** The author disclaims copyright to this source code. In place of
113587 ** a legal notice, here is a blessing:
@@ -113911,11 +113420,10 @@
113911 }
113912 #endif
113913
113914 /************** End of notify.c **********************************************/
113915 /************** Begin file fts3.c ********************************************/
113916 #line 1 "tsrc/fts3.c"
113917 /*
113918 ** 2006 Oct 10
113919 **
113920 ** The author disclaims copyright to this source code. In place of
113921 ** a legal notice, here is a blessing:
@@ -114208,11 +113716,10 @@
114208 ** into a single segment.
114209 */
114210
114211 /************** Include fts3Int.h in the middle of fts3.c ********************/
114212 /************** Begin file fts3Int.h *****************************************/
114213 #line 1 "tsrc/fts3Int.h"
114214 /*
114215 ** 2009 Nov 12
114216 **
114217 ** The author disclaims copyright to this source code. In place of
114218 ** a legal notice, here is a blessing:
@@ -114247,11 +113754,10 @@
114247 SQLITE_API extern const sqlite3_api_routines *sqlite3_api;
114248 #endif
114249
114250 /************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/
114251 /************** Begin file fts3_tokenizer.h **********************************/
114252 #line 1 "tsrc/fts3_tokenizer.h"
114253 /*
114254 ** 2006 July 10
114255 **
114256 ** The author disclaims copyright to this source code.
114257 **
@@ -114402,14 +113908,12 @@
114402
114403 #endif /* _FTS3_TOKENIZER_H_ */
114404
114405 /************** End of fts3_tokenizer.h **************************************/
114406 /************** Continuing where we left off in fts3Int.h ********************/
114407 #line 40 "tsrc/fts3Int.h"
114408 /************** Include fts3_hash.h in the middle of fts3Int.h ***************/
114409 /************** Begin file fts3_hash.h ***************************************/
114410 #line 1 "tsrc/fts3_hash.h"
114411 /*
114412 ** 2001 September 22
114413 **
114414 ** The author disclaims copyright to this source code. In place of
114415 ** a legal notice, here is a blessing:
@@ -114521,11 +114025,10 @@
114521
114522 #endif /* _FTS3_HASH_H_ */
114523
114524 /************** End of fts3_hash.h *******************************************/
114525 /************** Continuing where we left off in fts3Int.h ********************/
114526 #line 41 "tsrc/fts3Int.h"
114527
114528 /*
114529 ** This constant controls how often segments are merged. Once there are
114530 ** FTS3_MERGE_COUNT segments of level N, they are merged into a single
114531 ** segment of level N+1.
@@ -114998,11 +114501,10 @@
114998 #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
114999 #endif /* _FTSINT_H */
115000
115001 /************** End of fts3Int.h *********************************************/
115002 /************** Continuing where we left off in fts3.c ***********************/
115003 #line 296 "tsrc/fts3.c"
115004 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
115005
115006 #if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)
115007 # define SQLITE_CORE 1
115008 #endif
@@ -119548,11 +119050,10 @@
119548
119549 #endif
119550
119551 /************** End of fts3.c ************************************************/
119552 /************** Begin file fts3_aux.c ****************************************/
119553 #line 1 "tsrc/fts3_aux.c"
119554 /*
119555 ** 2011 Jan 27
119556 **
119557 ** The author disclaims copyright to this source code. In place of
119558 ** a legal notice, here is a blessing:
@@ -120025,11 +119526,10 @@
120025
120026 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
120027
120028 /************** End of fts3_aux.c ********************************************/
120029 /************** Begin file fts3_expr.c ***************************************/
120030 #line 1 "tsrc/fts3_expr.c"
120031 /*
120032 ** 2008 Nov 28
120033 **
120034 ** The author disclaims copyright to this source code. In place of
120035 ** a legal notice, here is a blessing:
@@ -120992,11 +120492,10 @@
120992 #endif
120993 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
120994
120995 /************** End of fts3_expr.c *******************************************/
120996 /************** Begin file fts3_hash.c ***************************************/
120997 #line 1 "tsrc/fts3_hash.c"
120998 /*
120999 ** 2001 September 22
121000 **
121001 ** The author disclaims copyright to this source code. In place of
121002 ** a legal notice, here is a blessing:
@@ -121377,11 +120876,10 @@
121377
121378 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
121379
121380 /************** End of fts3_hash.c *******************************************/
121381 /************** Begin file fts3_porter.c *************************************/
121382 #line 1 "tsrc/fts3_porter.c"
121383 /*
121384 ** 2006 September 30
121385 **
121386 ** The author disclaims copyright to this source code. In place of
121387 ** a legal notice, here is a blessing:
@@ -122024,11 +121522,10 @@
122024
122025 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
122026
122027 /************** End of fts3_porter.c *****************************************/
122028 /************** Begin file fts3_tokenizer.c **********************************/
122029 #line 1 "tsrc/fts3_tokenizer.c"
122030 /*
122031 ** 2007 June 22
122032 **
122033 ** The author disclaims copyright to this source code. In place of
122034 ** a legal notice, here is a blessing:
@@ -122516,11 +122013,10 @@
122516
122517 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
122518
122519 /************** End of fts3_tokenizer.c **************************************/
122520 /************** Begin file fts3_tokenizer1.c *********************************/
122521 #line 1 "tsrc/fts3_tokenizer1.c"
122522 /*
122523 ** 2006 Oct 10
122524 **
122525 ** The author disclaims copyright to this source code. In place of
122526 ** a legal notice, here is a blessing:
@@ -122751,11 +122247,10 @@
122751
122752 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
122753
122754 /************** End of fts3_tokenizer1.c *************************************/
122755 /************** Begin file fts3_write.c **************************************/
122756 #line 1 "tsrc/fts3_write.c"
122757 /*
122758 ** 2009 Oct 23
122759 **
122760 ** The author disclaims copyright to this source code. In place of
122761 ** a legal notice, here is a blessing:
@@ -126022,11 +125517,10 @@
126022
126023 #endif
126024
126025 /************** End of fts3_write.c ******************************************/
126026 /************** Begin file fts3_snippet.c ************************************/
126027 #line 1 "tsrc/fts3_snippet.c"
126028 /*
126029 ** 2009 Oct 23
126030 **
126031 ** The author disclaims copyright to this source code. In place of
126032 ** a legal notice, here is a blessing:
@@ -127524,11 +127018,10 @@
127524
127525 #endif
127526
127527 /************** End of fts3_snippet.c ****************************************/
127528 /************** Begin file rtree.c *******************************************/
127529 #line 1 "tsrc/rtree.c"
127530 /*
127531 ** 2001 September 15
127532 **
127533 ** The author disclaims copyright to this source code. In place of
127534 ** a legal notice, here is a blessing:
@@ -130806,11 +130299,10 @@
130806
130807 #endif
130808
130809 /************** End of rtree.c ***********************************************/
130810 /************** Begin file icu.c *********************************************/
130811 #line 1 "tsrc/icu.c"
130812 /*
130813 ** 2007 May 6
130814 **
130815 ** The author disclaims copyright to this source code. In place of
130816 ** a legal notice, here is a blessing:
@@ -131309,11 +130801,10 @@
131309
131310 #endif
131311
131312 /************** End of icu.c *************************************************/
131313 /************** Begin file fts3_icu.c ****************************************/
131314 #line 1 "tsrc/fts3_icu.c"
131315 /*
131316 ** 2007 June 22
131317 **
131318 ** The author disclaims copyright to this source code. In place of
131319 ** a legal notice, here is a blessing:
131320
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -24,11 +24,10 @@
24 #endif
25 #ifndef SQLITE_API
26 # define SQLITE_API
27 #endif
28 /************** Begin file sqliteInt.h ***************************************/
 
29 /*
30 ** 2001 September 15
31 **
32 ** The author disclaims copyright to this source code. In place of
33 ** a legal notice, here is a blessing:
@@ -79,11 +78,10 @@
78 #include "config.h"
79 #endif
80
81 /************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/
82 /************** Begin file sqliteLimit.h *************************************/
 
83 /*
84 ** 2007 May 7
85 **
86 ** The author disclaims copyright to this source code. In place of
87 ** a legal notice, here is a blessing:
@@ -291,11 +289,10 @@
289 # define SQLITE_MAX_TRIGGER_DEPTH 1000
290 #endif
291
292 /************** End of sqliteLimit.h *****************************************/
293 /************** Continuing where we left off in sqliteInt.h ******************/
 
294
295 /* Disable nuisance warnings on Borland compilers */
296 #if defined(__BORLANDC__)
297 #pragma warn -rch /* unreachable code */
298 #pragma warn -ccc /* Condition is always true or false */
@@ -548,11 +545,10 @@
545 # define unlikely(X) !!(X)
546 #endif
547
548 /************** Include sqlite3.h in the middle of sqliteInt.h ***************/
549 /************** Begin file sqlite3.h *****************************************/
 
550 /*
551 ** 2001 September 15
552 **
553 ** The author disclaims copyright to this source code. In place of
554 ** a legal notice, here is a blessing:
@@ -660,11 +656,11 @@
656 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
657 ** [sqlite_version()] and [sqlite_source_id()].
658 */
659 #define SQLITE_VERSION "3.7.8"
660 #define SQLITE_VERSION_NUMBER 3007008
661 #define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8"
662
663 /*
664 ** CAPI3REF: Run-Time Library Version Numbers
665 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
666 **
@@ -7309,14 +7305,12 @@
7305 #endif /* ifndef _SQLITE3RTREE_H_ */
7306
7307
7308 /************** End of sqlite3.h *********************************************/
7309 /************** Continuing where we left off in sqliteInt.h ******************/
 
7310 /************** Include hash.h in the middle of sqliteInt.h ******************/
7311 /************** Begin file hash.h ********************************************/
 
7312 /*
7313 ** 2001 September 22
7314 **
7315 ** The author disclaims copyright to this source code. In place of
7316 ** a legal notice, here is a blessing:
@@ -7412,14 +7406,12 @@
7406
7407 #endif /* _SQLITE_HASH_H_ */
7408
7409 /************** End of hash.h ************************************************/
7410 /************** Continuing where we left off in sqliteInt.h ******************/
 
7411 /************** Include parse.h in the middle of sqliteInt.h *****************/
7412 /************** Begin file parse.h *******************************************/
 
7413 #define TK_SEMI 1
7414 #define TK_EXPLAIN 2
7415 #define TK_QUERY 3
7416 #define TK_PLAN 4
7417 #define TK_BEGIN 5
@@ -7576,11 +7568,10 @@
7568 #define TK_UMINUS 156
7569 #define TK_UPLUS 157
7570
7571 /************** End of parse.h ***********************************************/
7572 /************** Continuing where we left off in sqliteInt.h ******************/
 
7573 #include <stdio.h>
7574 #include <stdlib.h>
7575 #include <string.h>
7576 #include <assert.h>
7577 #include <stddef.h>
@@ -7920,11 +7911,10 @@
7911 ** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
7912 ** pointer types (i.e. FuncDef) defined above.
7913 */
7914 /************** Include btree.h in the middle of sqliteInt.h *****************/
7915 /************** Begin file btree.h *******************************************/
 
7916 /*
7917 ** 2001 September 15
7918 **
7919 ** The author disclaims copyright to this source code. In place of
7920 ** a legal notice, here is a blessing:
@@ -8165,14 +8155,12 @@
8155
8156 #endif /* _BTREE_H_ */
8157
8158 /************** End of btree.h ***********************************************/
8159 /************** Continuing where we left off in sqliteInt.h ******************/
 
8160 /************** Include vdbe.h in the middle of sqliteInt.h ******************/
8161 /************** Begin file vdbe.h ********************************************/
 
8162 /*
8163 ** 2001 September 15
8164 **
8165 ** The author disclaims copyright to this source code. In place of
8166 ** a legal notice, here is a blessing:
@@ -8333,11 +8321,10 @@
8321 ** The makefile scans the vdbe.c source file and creates the "opcodes.h"
8322 ** header file that defines a number for each opcode used by the VDBE.
8323 */
8324 /************** Include opcodes.h in the middle of vdbe.h ********************/
8325 /************** Begin file opcodes.h *****************************************/
 
8326 /* Automatically generated. Do not edit */
8327 /* See the mkopcodeh.awk script for details */
8328 #define OP_Goto 1
8329 #define OP_Gosub 2
8330 #define OP_Return 3
@@ -8387,108 +8374,109 @@
8374 #define OP_Jump 25
8375 #define OP_And 69 /* same as TK_AND */
8376 #define OP_Or 68 /* same as TK_OR */
8377 #define OP_Not 19 /* same as TK_NOT */
8378 #define OP_BitNot 93 /* same as TK_BITNOT */
8379 #define OP_Once 26
8380 #define OP_If 27
8381 #define OP_IfNot 28
8382 #define OP_IsNull 73 /* same as TK_ISNULL */
8383 #define OP_NotNull 74 /* same as TK_NOTNULL */
8384 #define OP_Column 29
8385 #define OP_Affinity 30
8386 #define OP_MakeRecord 31
8387 #define OP_Count 32
8388 #define OP_Savepoint 33
8389 #define OP_AutoCommit 34
8390 #define OP_Transaction 35
8391 #define OP_ReadCookie 36
8392 #define OP_SetCookie 37
8393 #define OP_VerifyCookie 38
8394 #define OP_OpenRead 39
8395 #define OP_OpenWrite 40
8396 #define OP_OpenAutoindex 41
8397 #define OP_OpenEphemeral 42
8398 #define OP_SorterOpen 43
8399 #define OP_OpenPseudo 44
8400 #define OP_Close 45
8401 #define OP_SeekLt 46
8402 #define OP_SeekLe 47
8403 #define OP_SeekGe 48
8404 #define OP_SeekGt 49
8405 #define OP_Seek 50
8406 #define OP_NotFound 51
8407 #define OP_Found 52
8408 #define OP_IsUnique 53
8409 #define OP_NotExists 54
8410 #define OP_Sequence 55
8411 #define OP_NewRowid 56
8412 #define OP_Insert 57
8413 #define OP_InsertInt 58
8414 #define OP_Delete 59
8415 #define OP_ResetCount 60
8416 #define OP_SorterCompare 61
8417 #define OP_SorterData 62
8418 #define OP_RowKey 63
8419 #define OP_RowData 64
8420 #define OP_Rowid 65
8421 #define OP_NullRow 66
8422 #define OP_Last 67
8423 #define OP_SorterSort 70
8424 #define OP_Sort 71
8425 #define OP_Rewind 72
8426 #define OP_SorterNext 81
8427 #define OP_Prev 92
8428 #define OP_Next 95
8429 #define OP_SorterInsert 96
8430 #define OP_IdxInsert 97
8431 #define OP_IdxDelete 98
8432 #define OP_IdxRowid 99
8433 #define OP_IdxLT 100
8434 #define OP_IdxGE 101
8435 #define OP_Destroy 102
8436 #define OP_Clear 103
8437 #define OP_CreateIndex 104
8438 #define OP_CreateTable 105
8439 #define OP_ParseSchema 106
8440 #define OP_LoadAnalysis 107
8441 #define OP_DropTable 108
8442 #define OP_DropIndex 109
8443 #define OP_DropTrigger 110
8444 #define OP_IntegrityCk 111
8445 #define OP_RowSetAdd 112
8446 #define OP_RowSetRead 113
8447 #define OP_RowSetTest 114
8448 #define OP_Program 115
8449 #define OP_Param 116
8450 #define OP_FkCounter 117
8451 #define OP_FkIfZero 118
8452 #define OP_MemMax 119
8453 #define OP_IfPos 120
8454 #define OP_IfNeg 121
8455 #define OP_IfZero 122
8456 #define OP_AggStep 123
8457 #define OP_AggFinal 124
8458 #define OP_Checkpoint 125
8459 #define OP_JournalMode 126
8460 #define OP_Vacuum 127
8461 #define OP_IncrVacuum 128
8462 #define OP_Expire 129
8463 #define OP_TableLock 131
8464 #define OP_VBegin 132
8465 #define OP_VCreate 133
8466 #define OP_VDestroy 134
8467 #define OP_VOpen 135
8468 #define OP_VFilter 136
8469 #define OP_VColumn 137
8470 #define OP_VNext 138
8471 #define OP_VRename 139
8472 #define OP_VUpdate 140
8473 #define OP_Pagecount 146
8474 #define OP_MaxPgcnt 147
8475 #define OP_Trace 148
8476 #define OP_Noop 149
8477 #define OP_Explain 150
8478
8479
8480 /* Properties such as "out2" or "jump" that are specified in
8481 ** comments following the "case" for each opcode in the vdbe.c
8482 ** are encoded into bitvectors as follows:
@@ -8502,30 +8490,29 @@
8490 #define OPFLG_OUT3 0x0040 /* out3: P3 is an output */
8491 #define OPFLG_INITIALIZER {\
8492 /* 0 */ 0x00, 0x01, 0x05, 0x04, 0x04, 0x10, 0x00, 0x02,\
8493 /* 8 */ 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x24, 0x24,\
8494 /* 16 */ 0x00, 0x00, 0x00, 0x24, 0x04, 0x05, 0x04, 0x00,\
8495 /* 24 */ 0x00, 0x01, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00,\
8496 /* 32 */ 0x02, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00,\
8497 /* 40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11,\
8498 /* 48 */ 0x11, 0x11, 0x08, 0x11, 0x11, 0x11, 0x11, 0x02,\
8499 /* 56 */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
8500 /* 64 */ 0x00, 0x02, 0x00, 0x01, 0x4c, 0x4c, 0x01, 0x01,\
8501 /* 72 */ 0x01, 0x05, 0x05, 0x15, 0x15, 0x15, 0x15, 0x15,\
8502 /* 80 */ 0x15, 0x01, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c,\
8503 /* 88 */ 0x4c, 0x4c, 0x4c, 0x4c, 0x01, 0x24, 0x02, 0x01,\
8504 /* 96 */ 0x08, 0x08, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00,\
8505 /* 104 */ 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
8506 /* 112 */ 0x0c, 0x45, 0x15, 0x01, 0x02, 0x00, 0x01, 0x08,\
8507 /* 120 */ 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00,\
8508 /* 128 */ 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\
8509 /* 136 */ 0x01, 0x00, 0x01, 0x00, 0x00, 0x04, 0x04, 0x04,\
8510 /* 144 */ 0x04, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00,}
8511
8512 /************** End of opcodes.h *********************************************/
8513 /************** Continuing where we left off in vdbe.h ***********************/
 
8514
8515 /*
8516 ** Prototypes for the VDBE interface. See comments on the implementation
8517 ** for a description of what each of these routines does.
8518 */
@@ -8541,11 +8528,11 @@
8528 SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1);
8529 SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2);
8530 SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3);
8531 SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5);
8532 SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr);
8533 SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr);
8534 SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);
8535 SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int);
8536 SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int);
8537 SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*);
8538 SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*);
@@ -8596,14 +8583,12 @@
8583
8584 #endif
8585
8586 /************** End of vdbe.h ************************************************/
8587 /************** Continuing where we left off in sqliteInt.h ******************/
 
8588 /************** Include pager.h in the middle of sqliteInt.h *****************/
8589 /************** Begin file pager.h *******************************************/
 
8590 /*
8591 ** 2001 September 15
8592 **
8593 ** The author disclaims copyright to this source code. In place of
8594 ** a legal notice, here is a blessing:
@@ -8785,14 +8770,12 @@
8770
8771 #endif /* _PAGER_H_ */
8772
8773 /************** End of pager.h ***********************************************/
8774 /************** Continuing where we left off in sqliteInt.h ******************/
 
8775 /************** Include pcache.h in the middle of sqliteInt.h ****************/
8776 /************** Begin file pcache.h ******************************************/
 
8777 /*
8778 ** 2008 August 05
8779 **
8780 ** The author disclaims copyright to this source code. In place of
8781 ** a legal notice, here is a blessing:
@@ -8947,15 +8930,13 @@
8930
8931 #endif /* _PCACHE_H_ */
8932
8933 /************** End of pcache.h **********************************************/
8934 /************** Continuing where we left off in sqliteInt.h ******************/
 
8935
8936 /************** Include os.h in the middle of sqliteInt.h ********************/
8937 /************** Begin file os.h **********************************************/
 
8938 /*
8939 ** 2001 September 16
8940 **
8941 ** The author disclaims copyright to this source code. In place of
8942 ** a legal notice, here is a blessing:
@@ -9234,14 +9215,12 @@
9215
9216 #endif /* _SQLITE_OS_H_ */
9217
9218 /************** End of os.h **************************************************/
9219 /************** Continuing where we left off in sqliteInt.h ******************/
 
9220 /************** Include mutex.h in the middle of sqliteInt.h *****************/
9221 /************** Begin file mutex.h *******************************************/
 
9222 /*
9223 ** 2007 August 28
9224 **
9225 ** The author disclaims copyright to this source code. In place of
9226 ** a legal notice, here is a blessing:
@@ -9312,11 +9291,10 @@
9291 #define sqlite3MutexEnd()
9292 #endif /* defined(SQLITE_MUTEX_OMIT) */
9293
9294 /************** End of mutex.h ***********************************************/
9295 /************** Continuing where we left off in sqliteInt.h ******************/
 
9296
9297
9298 /*
9299 ** Each database file to be accessed by the system is an instance
9300 ** of the following structure. There are normally two of these structures
@@ -10509,11 +10487,12 @@
10487 char *zDatabase; /* Name of database holding this table */
10488 char *zName; /* Name of the table */
10489 char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */
10490 Table *pTab; /* An SQL table corresponding to zName */
10491 Select *pSelect; /* A SELECT statement used in place of a table name */
10492 int addrFillSub; /* Address of subroutine to manifest a subquery */
10493 int regReturn; /* Register holding return address of addrFillSub */
10494 u8 jointype; /* Type of join between this able and the previous */
10495 u8 notIndexed; /* True if there is a NOT INDEXED clause */
10496 u8 isCorrelated; /* True if sub-query is correlated */
10497 #ifndef SQLITE_OMIT_EXPLAIN
10498 u8 iSelectId; /* If pSelect!=0, the id of the sub-select in EQP */
@@ -11915,11 +11894,10 @@
11894
11895 #endif /* _SQLITEINT_H_ */
11896
11897 /************** End of sqliteInt.h *******************************************/
11898 /************** Begin file global.c ******************************************/
 
11899 /*
11900 ** 2008 June 13
11901 **
11902 ** The author disclaims copyright to this source code. In place of
11903 ** a legal notice, here is a blessing:
@@ -12138,11 +12116,10 @@
12116 */
12117 SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER;
12118
12119 /************** End of global.c **********************************************/
12120 /************** Begin file ctime.c *******************************************/
 
12121 /*
12122 ** 2010 February 23
12123 **
12124 ** The author disclaims copyright to this source code. In place of
12125 ** a legal notice, here is a blessing:
@@ -12543,11 +12520,10 @@
12520
12521 #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
12522
12523 /************** End of ctime.c ***********************************************/
12524 /************** Begin file status.c ******************************************/
 
12525 /*
12526 ** 2008 June 18
12527 **
12528 ** The author disclaims copyright to this source code. In place of
12529 ** a legal notice, here is a blessing:
@@ -12561,11 +12537,10 @@
12537 ** This module implements the sqlite3_status() interface and related
12538 ** functionality.
12539 */
12540 /************** Include vdbeInt.h in the middle of status.c ******************/
12541 /************** Begin file vdbeInt.h *****************************************/
 
12542 /*
12543 ** 2003 September 6
12544 **
12545 ** The author disclaims copyright to this source code. In place of
12546 ** a legal notice, here is a blessing:
@@ -13013,11 +12988,10 @@
12988
12989 #endif /* !defined(_VDBEINT_H_) */
12990
12991 /************** End of vdbeInt.h *********************************************/
12992 /************** Continuing where we left off in status.c *********************/
 
12993
12994 /*
12995 ** Variables in which to record status information.
12996 */
12997 typedef struct sqlite3StatType sqlite3StatType;
@@ -13227,11 +13201,10 @@
13201 return rc;
13202 }
13203
13204 /************** End of status.c **********************************************/
13205 /************** Begin file date.c ********************************************/
 
13206 /*
13207 ** 2003 October 31
13208 **
13209 ** The author disclaims copyright to this source code. In place of
13210 ** a legal notice, here is a blessing:
@@ -14355,11 +14328,10 @@
14328 }
14329 }
14330
14331 /************** End of date.c ************************************************/
14332 /************** Begin file os.c **********************************************/
 
14333 /*
14334 ** 2005 November 29
14335 **
14336 ** The author disclaims copyright to this source code. In place of
14337 ** a legal notice, here is a blessing:
@@ -14689,11 +14661,10 @@
14661 return SQLITE_OK;
14662 }
14663
14664 /************** End of os.c **************************************************/
14665 /************** Begin file fault.c *******************************************/
 
14666 /*
14667 ** 2008 Jan 22
14668 **
14669 ** The author disclaims copyright to this source code. In place of
14670 ** a legal notice, here is a blessing:
@@ -14779,11 +14750,10 @@
14750
14751 #endif /* #ifndef SQLITE_OMIT_BUILTIN_TEST */
14752
14753 /************** End of fault.c ***********************************************/
14754 /************** Begin file mem0.c ********************************************/
 
14755 /*
14756 ** 2008 October 28
14757 **
14758 ** The author disclaims copyright to this source code. In place of
14759 ** a legal notice, here is a blessing:
@@ -14841,11 +14811,10 @@
14811
14812 #endif /* SQLITE_ZERO_MALLOC */
14813
14814 /************** End of mem0.c ************************************************/
14815 /************** Begin file mem1.c ********************************************/
 
14816 /*
14817 ** 2007 August 14
14818 **
14819 ** The author disclaims copyright to this source code. In place of
14820 ** a legal notice, here is a blessing:
@@ -14994,11 +14963,10 @@
14963
14964 #endif /* SQLITE_SYSTEM_MALLOC */
14965
14966 /************** End of mem1.c ************************************************/
14967 /************** Begin file mem2.c ********************************************/
 
14968 /*
14969 ** 2007 August 15
14970 **
14971 ** The author disclaims copyright to this source code. In place of
14972 ** a legal notice, here is a blessing:
@@ -15525,11 +15493,10 @@
15493
15494 #endif /* SQLITE_MEMDEBUG */
15495
15496 /************** End of mem2.c ************************************************/
15497 /************** Begin file mem3.c ********************************************/
 
15498 /*
15499 ** 2007 October 14
15500 **
15501 ** The author disclaims copyright to this source code. In place of
15502 ** a legal notice, here is a blessing:
@@ -16215,11 +16182,10 @@
16182
16183 #endif /* SQLITE_ENABLE_MEMSYS3 */
16184
16185 /************** End of mem3.c ************************************************/
16186 /************** Begin file mem5.c ********************************************/
 
16187 /*
16188 ** 2007 October 14
16189 **
16190 ** The author disclaims copyright to this source code. In place of
16191 ** a legal notice, here is a blessing:
@@ -16799,11 +16765,10 @@
16765
16766 #endif /* SQLITE_ENABLE_MEMSYS5 */
16767
16768 /************** End of mem5.c ************************************************/
16769 /************** Begin file mutex.c *******************************************/
 
16770 /*
16771 ** 2007 August 14
16772 **
16773 ** The author disclaims copyright to this source code. In place of
16774 ** a legal notice, here is a blessing:
@@ -16955,11 +16920,10 @@
16920
16921 #endif /* SQLITE_MUTEX_OMIT */
16922
16923 /************** End of mutex.c ***********************************************/
16924 /************** Begin file mutex_noop.c **************************************/
 
16925 /*
16926 ** 2008 October 07
16927 **
16928 ** The author disclaims copyright to this source code. In place of
16929 ** a legal notice, here is a blessing:
@@ -17164,11 +17128,10 @@
17128 #endif /* SQLITE_MUTEX_NOOP */
17129 #endif /* SQLITE_MUTEX_OMIT */
17130
17131 /************** End of mutex_noop.c ******************************************/
17132 /************** Begin file mutex_os2.c ***************************************/
 
17133 /*
17134 ** 2007 August 28
17135 **
17136 ** The author disclaims copyright to this source code. In place of
17137 ** a legal notice, here is a blessing:
@@ -17441,11 +17404,10 @@
17404 }
17405 #endif /* SQLITE_MUTEX_OS2 */
17406
17407 /************** End of mutex_os2.c *******************************************/
17408 /************** Begin file mutex_unix.c **************************************/
 
17409 /*
17410 ** 2007 August 28
17411 **
17412 ** The author disclaims copyright to this source code. In place of
17413 ** a legal notice, here is a blessing:
@@ -17795,11 +17757,10 @@
17757
17758 #endif /* SQLITE_MUTEX_PTHREAD */
17759
17760 /************** End of mutex_unix.c ******************************************/
17761 /************** Begin file mutex_w32.c ***************************************/
 
17762 /*
17763 ** 2007 August 14
17764 **
17765 ** The author disclaims copyright to this source code. In place of
17766 ** a legal notice, here is a blessing:
@@ -18130,11 +18091,10 @@
18091 }
18092 #endif /* SQLITE_MUTEX_W32 */
18093
18094 /************** End of mutex_w32.c *******************************************/
18095 /************** Begin file malloc.c ******************************************/
 
18096 /*
18097 ** 2001 September 15
18098 **
18099 ** The author disclaims copyright to this source code. In place of
18100 ** a legal notice, here is a blessing:
@@ -18910,11 +18870,10 @@
18870 return rc & (db ? db->errMask : 0xff);
18871 }
18872
18873 /************** End of malloc.c **********************************************/
18874 /************** Begin file printf.c ******************************************/
 
18875 /*
18876 ** The "printf" code that follows dates from the 1980's. It is in
18877 ** the public domain. The original comments are included here for
18878 ** completeness. They are very out-of-date but might be useful as
18879 ** an historical reference. Most of the "enhancements" have been backed
@@ -19942,11 +19901,10 @@
19901 }
19902 #endif
19903
19904 /************** End of printf.c **********************************************/
19905 /************** Begin file random.c ******************************************/
 
19906 /*
19907 ** 2001 September 15
19908 **
19909 ** The author disclaims copyright to this source code. In place of
19910 ** a legal notice, here is a blessing:
@@ -20090,11 +20048,10 @@
20048 }
20049 #endif /* SQLITE_OMIT_BUILTIN_TEST */
20050
20051 /************** End of random.c **********************************************/
20052 /************** Begin file utf.c *********************************************/
 
20053 /*
20054 ** 2004 April 13
20055 **
20056 ** The author disclaims copyright to this source code. In place of
20057 ** a legal notice, here is a blessing:
@@ -20652,11 +20609,10 @@
20609 #endif /* SQLITE_TEST */
20610 #endif /* SQLITE_OMIT_UTF16 */
20611
20612 /************** End of utf.c *************************************************/
20613 /************** Begin file util.c ********************************************/
 
20614 /*
20615 ** 2001 September 15
20616 **
20617 ** The author disclaims copyright to this source code. In place of
20618 ** a legal notice, here is a blessing:
@@ -21835,11 +21791,10 @@
21791 }
21792 #endif
21793
21794 /************** End of util.c ************************************************/
21795 /************** Begin file hash.c ********************************************/
 
21796 /*
21797 ** 2001 September 22
21798 **
21799 ** The author disclaims copyright to this source code. In place of
21800 ** a legal notice, here is a blessing:
@@ -22115,11 +22070,10 @@
22070 return 0;
22071 }
22072
22073 /************** End of hash.c ************************************************/
22074 /************** Begin file opcodes.c *****************************************/
 
22075 /* Automatically generated. Do not edit */
22076 /* See the mkopcodec.awk script for details. */
22077 #if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
22078 SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
22079 static const char *const azName[] = { "?",
@@ -22146,66 +22100,66 @@
22100 /* 21 */ "MustBeInt",
22101 /* 22 */ "RealAffinity",
22102 /* 23 */ "Permutation",
22103 /* 24 */ "Compare",
22104 /* 25 */ "Jump",
22105 /* 26 */ "Once",
22106 /* 27 */ "If",
22107 /* 28 */ "IfNot",
22108 /* 29 */ "Column",
22109 /* 30 */ "Affinity",
22110 /* 31 */ "MakeRecord",
22111 /* 32 */ "Count",
22112 /* 33 */ "Savepoint",
22113 /* 34 */ "AutoCommit",
22114 /* 35 */ "Transaction",
22115 /* 36 */ "ReadCookie",
22116 /* 37 */ "SetCookie",
22117 /* 38 */ "VerifyCookie",
22118 /* 39 */ "OpenRead",
22119 /* 40 */ "OpenWrite",
22120 /* 41 */ "OpenAutoindex",
22121 /* 42 */ "OpenEphemeral",
22122 /* 43 */ "SorterOpen",
22123 /* 44 */ "OpenPseudo",
22124 /* 45 */ "Close",
22125 /* 46 */ "SeekLt",
22126 /* 47 */ "SeekLe",
22127 /* 48 */ "SeekGe",
22128 /* 49 */ "SeekGt",
22129 /* 50 */ "Seek",
22130 /* 51 */ "NotFound",
22131 /* 52 */ "Found",
22132 /* 53 */ "IsUnique",
22133 /* 54 */ "NotExists",
22134 /* 55 */ "Sequence",
22135 /* 56 */ "NewRowid",
22136 /* 57 */ "Insert",
22137 /* 58 */ "InsertInt",
22138 /* 59 */ "Delete",
22139 /* 60 */ "ResetCount",
22140 /* 61 */ "SorterCompare",
22141 /* 62 */ "SorterData",
22142 /* 63 */ "RowKey",
22143 /* 64 */ "RowData",
22144 /* 65 */ "Rowid",
22145 /* 66 */ "NullRow",
22146 /* 67 */ "Last",
22147 /* 68 */ "Or",
22148 /* 69 */ "And",
22149 /* 70 */ "SorterSort",
22150 /* 71 */ "Sort",
22151 /* 72 */ "Rewind",
22152 /* 73 */ "IsNull",
22153 /* 74 */ "NotNull",
22154 /* 75 */ "Ne",
22155 /* 76 */ "Eq",
22156 /* 77 */ "Gt",
22157 /* 78 */ "Le",
22158 /* 79 */ "Lt",
22159 /* 80 */ "Ge",
22160 /* 81 */ "SorterNext",
22161 /* 82 */ "BitAnd",
22162 /* 83 */ "BitOr",
22163 /* 84 */ "ShiftLeft",
22164 /* 85 */ "ShiftRight",
22165 /* 86 */ "Add",
@@ -22212,76 +22166,76 @@
22166 /* 87 */ "Subtract",
22167 /* 88 */ "Multiply",
22168 /* 89 */ "Divide",
22169 /* 90 */ "Remainder",
22170 /* 91 */ "Concat",
22171 /* 92 */ "Prev",
22172 /* 93 */ "BitNot",
22173 /* 94 */ "String8",
22174 /* 95 */ "Next",
22175 /* 96 */ "SorterInsert",
22176 /* 97 */ "IdxInsert",
22177 /* 98 */ "IdxDelete",
22178 /* 99 */ "IdxRowid",
22179 /* 100 */ "IdxLT",
22180 /* 101 */ "IdxGE",
22181 /* 102 */ "Destroy",
22182 /* 103 */ "Clear",
22183 /* 104 */ "CreateIndex",
22184 /* 105 */ "CreateTable",
22185 /* 106 */ "ParseSchema",
22186 /* 107 */ "LoadAnalysis",
22187 /* 108 */ "DropTable",
22188 /* 109 */ "DropIndex",
22189 /* 110 */ "DropTrigger",
22190 /* 111 */ "IntegrityCk",
22191 /* 112 */ "RowSetAdd",
22192 /* 113 */ "RowSetRead",
22193 /* 114 */ "RowSetTest",
22194 /* 115 */ "Program",
22195 /* 116 */ "Param",
22196 /* 117 */ "FkCounter",
22197 /* 118 */ "FkIfZero",
22198 /* 119 */ "MemMax",
22199 /* 120 */ "IfPos",
22200 /* 121 */ "IfNeg",
22201 /* 122 */ "IfZero",
22202 /* 123 */ "AggStep",
22203 /* 124 */ "AggFinal",
22204 /* 125 */ "Checkpoint",
22205 /* 126 */ "JournalMode",
22206 /* 127 */ "Vacuum",
22207 /* 128 */ "IncrVacuum",
22208 /* 129 */ "Expire",
22209 /* 130 */ "Real",
22210 /* 131 */ "TableLock",
22211 /* 132 */ "VBegin",
22212 /* 133 */ "VCreate",
22213 /* 134 */ "VDestroy",
22214 /* 135 */ "VOpen",
22215 /* 136 */ "VFilter",
22216 /* 137 */ "VColumn",
22217 /* 138 */ "VNext",
22218 /* 139 */ "VRename",
22219 /* 140 */ "VUpdate",
22220 /* 141 */ "ToText",
22221 /* 142 */ "ToBlob",
22222 /* 143 */ "ToNumeric",
22223 /* 144 */ "ToInt",
22224 /* 145 */ "ToReal",
22225 /* 146 */ "Pagecount",
22226 /* 147 */ "MaxPgcnt",
22227 /* 148 */ "Trace",
22228 /* 149 */ "Noop",
22229 /* 150 */ "Explain",
22230 };
22231 return azName[i];
22232 }
22233 #endif
22234
22235 /************** End of opcodes.c *********************************************/
22236 /************** Begin file os_os2.c ******************************************/
 
22237 /*
22238 ** 2006 Feb 14
22239 **
22240 ** The author disclaims copyright to this source code. In place of
22241 ** a legal notice, here is a blessing:
@@ -22334,11 +22288,10 @@
22288 /*
22289 ** Include code that is common to all os_*.c files
22290 */
22291 /************** Include os_common.h in the middle of os_os2.c ****************/
22292 /************** Begin file os_common.h ***************************************/
 
22293 /*
22294 ** 2004 May 22
22295 **
22296 ** The author disclaims copyright to this source code. In place of
22297 ** a legal notice, here is a blessing:
@@ -22388,11 +22341,10 @@
22341 ** hwtime.h contains inline assembler code for implementing
22342 ** high-performance timing routines.
22343 */
22344 /************** Include hwtime.h in the middle of os_common.h ****************/
22345 /************** Begin file hwtime.h ******************************************/
 
22346 /*
22347 ** 2008 May 27
22348 **
22349 ** The author disclaims copyright to this source code. In place of
22350 ** a legal notice, here is a blessing:
@@ -22477,11 +22429,10 @@
22429
22430 #endif /* !defined(_HWTIME_H_) */
22431
22432 /************** End of hwtime.h **********************************************/
22433 /************** Continuing where we left off in os_common.h ******************/
 
22434
22435 static sqlite_uint64 g_start;
22436 static sqlite_uint64 g_elapsed;
22437 #define TIMER_START g_start=sqlite3Hwtime()
22438 #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start
@@ -22544,11 +22495,10 @@
22495
22496 #endif /* !defined(_OS_COMMON_H_) */
22497
22498 /************** End of os_common.h *******************************************/
22499 /************** Continuing where we left off in os_os2.c *********************/
 
22500
22501 /* Forward references */
22502 typedef struct os2File os2File; /* The file structure */
22503 typedef struct os2ShmNode os2ShmNode; /* A shared descritive memory node */
22504 typedef struct os2ShmLink os2ShmLink; /* A connection to shared-memory */
@@ -24416,11 +24366,10 @@
24366
24367 #endif /* SQLITE_OS_OS2 */
24368
24369 /************** End of os_os2.c **********************************************/
24370 /************** Begin file os_unix.c *****************************************/
 
24371 /*
24372 ** 2004 May 22
24373 **
24374 ** The author disclaims copyright to this source code. In place of
24375 ** a legal notice, here is a blessing:
@@ -24681,11 +24630,10 @@
24630 /*
24631 ** Include code that is common to all os_*.c files
24632 */
24633 /************** Include os_common.h in the middle of os_unix.c ***************/
24634 /************** Begin file os_common.h ***************************************/
 
24635 /*
24636 ** 2004 May 22
24637 **
24638 ** The author disclaims copyright to this source code. In place of
24639 ** a legal notice, here is a blessing:
@@ -24735,11 +24683,10 @@
24683 ** hwtime.h contains inline assembler code for implementing
24684 ** high-performance timing routines.
24685 */
24686 /************** Include hwtime.h in the middle of os_common.h ****************/
24687 /************** Begin file hwtime.h ******************************************/
 
24688 /*
24689 ** 2008 May 27
24690 **
24691 ** The author disclaims copyright to this source code. In place of
24692 ** a legal notice, here is a blessing:
@@ -24824,11 +24771,10 @@
24771
24772 #endif /* !defined(_HWTIME_H_) */
24773
24774 /************** End of hwtime.h **********************************************/
24775 /************** Continuing where we left off in os_common.h ******************/
 
24776
24777 static sqlite_uint64 g_start;
24778 static sqlite_uint64 g_elapsed;
24779 #define TIMER_START g_start=sqlite3Hwtime()
24780 #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start
@@ -24891,11 +24837,10 @@
24837
24838 #endif /* !defined(_OS_COMMON_H_) */
24839
24840 /************** End of os_common.h *******************************************/
24841 /************** Continuing where we left off in os_unix.c ********************/
 
24842
24843 /*
24844 ** Define various macros that are missing from some systems.
24845 */
24846 #ifndef O_LARGEFILE
@@ -31401,11 +31346,10 @@
31346
31347 #endif /* SQLITE_OS_UNIX */
31348
31349 /************** End of os_unix.c *********************************************/
31350 /************** Begin file os_win.c ******************************************/
 
31351 /*
31352 ** 2004 May 22
31353 **
31354 ** The author disclaims copyright to this source code. In place of
31355 ** a legal notice, here is a blessing:
@@ -31463,11 +31407,10 @@
31407 /*
31408 ** Include code that is common to all os_*.c files
31409 */
31410 /************** Include os_common.h in the middle of os_win.c ****************/
31411 /************** Begin file os_common.h ***************************************/
 
31412 /*
31413 ** 2004 May 22
31414 **
31415 ** The author disclaims copyright to this source code. In place of
31416 ** a legal notice, here is a blessing:
@@ -31517,11 +31460,10 @@
31460 ** hwtime.h contains inline assembler code for implementing
31461 ** high-performance timing routines.
31462 */
31463 /************** Include hwtime.h in the middle of os_common.h ****************/
31464 /************** Begin file hwtime.h ******************************************/
 
31465 /*
31466 ** 2008 May 27
31467 **
31468 ** The author disclaims copyright to this source code. In place of
31469 ** a legal notice, here is a blessing:
@@ -31606,11 +31548,10 @@
31548
31549 #endif /* !defined(_HWTIME_H_) */
31550
31551 /************** End of hwtime.h **********************************************/
31552 /************** Continuing where we left off in os_common.h ******************/
 
31553
31554 static sqlite_uint64 g_start;
31555 static sqlite_uint64 g_elapsed;
31556 #define TIMER_START g_start=sqlite3Hwtime()
31557 #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start
@@ -31673,11 +31614,10 @@
31614
31615 #endif /* !defined(_OS_COMMON_H_) */
31616
31617 /************** End of os_common.h *******************************************/
31618 /************** Continuing where we left off in os_win.c *********************/
 
31619
31620 /*
31621 ** Some microsoft compilers lack this definition.
31622 */
31623 #ifndef INVALID_FILE_ATTRIBUTES
@@ -34809,11 +34749,10 @@
34749
34750 #endif /* SQLITE_OS_WIN */
34751
34752 /************** End of os_win.c **********************************************/
34753 /************** Begin file bitvec.c ******************************************/
 
34754 /*
34755 ** 2008 February 16
34756 **
34757 ** The author disclaims copyright to this source code. In place of
34758 ** a legal notice, here is a blessing:
@@ -35220,11 +35159,10 @@
35159 }
35160 #endif /* SQLITE_OMIT_BUILTIN_TEST */
35161
35162 /************** End of bitvec.c **********************************************/
35163 /************** Begin file pcache.c ******************************************/
 
35164 /*
35165 ** 2008 August 05
35166 **
35167 ** The author disclaims copyright to this source code. In place of
35168 ** a legal notice, here is a blessing:
@@ -35817,11 +35755,10 @@
35755 }
35756 #endif
35757
35758 /************** End of pcache.c **********************************************/
35759 /************** Begin file pcache1.c *****************************************/
 
35760 /*
35761 ** 2008 November 05
35762 **
35763 ** The author disclaims copyright to this source code. In place of
35764 ** a legal notice, here is a blessing:
@@ -37034,11 +36971,10 @@
36971 }
36972 #endif
36973
36974 /************** End of pcache1.c *********************************************/
36975 /************** Begin file rowset.c ******************************************/
 
36976 /*
36977 ** 2008 December 3
36978 **
36979 ** The author disclaims copyright to this source code. In place of
36980 ** a legal notice, here is a blessing:
@@ -37459,11 +37395,10 @@
37395 return 0;
37396 }
37397
37398 /************** End of rowset.c **********************************************/
37399 /************** Begin file pager.c *******************************************/
 
37400 /*
37401 ** 2001 September 15
37402 **
37403 ** The author disclaims copyright to this source code. In place of
37404 ** a legal notice, here is a blessing:
@@ -37483,11 +37418,10 @@
37418 ** another is writing.
37419 */
37420 #ifndef SQLITE_OMIT_DISKIO
37421 /************** Include wal.h in the middle of pager.c ***********************/
37422 /************** Begin file wal.h *********************************************/
 
37423 /*
37424 ** 2010 February 1
37425 **
37426 ** The author disclaims copyright to this source code. In place of
37427 ** a legal notice, here is a blessing:
@@ -37608,11 +37542,10 @@
37542 #endif /* ifndef SQLITE_OMIT_WAL */
37543 #endif /* _WAL_H_ */
37544
37545 /************** End of wal.h *************************************************/
37546 /************** Continuing where we left off in pager.c **********************/
 
37547
37548
37549 /******************* NOTES ON THE DESIGN OF THE PAGER ************************
37550 **
37551 ** This comment block describes invariants that hold when using a rollback
@@ -44422,11 +44355,10 @@
44355
44356 #endif /* SQLITE_OMIT_DISKIO */
44357
44358 /************** End of pager.c ***********************************************/
44359 /************** Begin file wal.c *********************************************/
 
44360 /*
44361 ** 2010 February 1
44362 **
44363 ** The author disclaims copyright to this source code. In place of
44364 ** a legal notice, here is a blessing:
@@ -47377,11 +47309,10 @@
47309
47310 #endif /* #ifndef SQLITE_OMIT_WAL */
47311
47312 /************** End of wal.c *************************************************/
47313 /************** Begin file btmutex.c *****************************************/
 
47314 /*
47315 ** 2007 August 27
47316 **
47317 ** The author disclaims copyright to this source code. In place of
47318 ** a legal notice, here is a blessing:
@@ -47397,11 +47328,10 @@
47328 ** big and we want to break it down some. This packaged seemed like
47329 ** a good breakout.
47330 */
47331 /************** Include btreeInt.h in the middle of btmutex.c ****************/
47332 /************** Begin file btreeInt.h ****************************************/
 
47333 /*
47334 ** 2004 April 6
47335 **
47336 ** The author disclaims copyright to this source code. In place of
47337 ** a legal notice, here is a blessing:
@@ -48043,11 +47973,10 @@
47973 #define get4byte sqlite3Get4byte
47974 #define put4byte sqlite3Put4byte
47975
47976 /************** End of btreeInt.h ********************************************/
47977 /************** Continuing where we left off in btmutex.c ********************/
 
47978 #ifndef SQLITE_OMIT_SHARED_CACHE
47979 #if SQLITE_THREADSAFE
47980
47981 /*
47982 ** Obtain the BtShared mutex associated with B-Tree handle p. Also,
@@ -48316,11 +48245,10 @@
48245 #endif /* if SQLITE_THREADSAFE */
48246 #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */
48247
48248 /************** End of btmutex.c *********************************************/
48249 /************** Begin file btree.c *******************************************/
 
48250 /*
48251 ** 2004 April 6
48252 **
48253 ** The author disclaims copyright to this source code. In place of
48254 ** a legal notice, here is a blessing:
@@ -48982,11 +48910,11 @@
48910 assert( nKey==(i64)(int)nKey );
48911 pIdxKey = sqlite3VdbeAllocUnpackedRecord(
48912 pCur->pKeyInfo, aSpace, sizeof(aSpace), &pFree
48913 );
48914 if( pIdxKey==0 ) return SQLITE_NOMEM;
48915 sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey, pIdxKey);
48916 }else{
48917 pIdxKey = 0;
48918 }
48919 rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes);
48920 if( pFree ){
@@ -56504,11 +56432,10 @@
56432 return rc;
56433 }
56434
56435 /************** End of btree.c ***********************************************/
56436 /************** Begin file backup.c ******************************************/
 
56437 /*
56438 ** 2009 January 28
56439 **
56440 ** The author disclaims copyright to this source code. In place of
56441 ** a legal notice, here is a blessing:
@@ -57211,11 +57138,10 @@
57138 }
57139 #endif /* SQLITE_OMIT_VACUUM */
57140
57141 /************** End of backup.c **********************************************/
57142 /************** Begin file vdbemem.c *****************************************/
 
57143 /*
57144 ** 2004 May 26
57145 **
57146 ** The author disclaims copyright to this source code. In place of
57147 ** a legal notice, here is a blessing:
@@ -58366,11 +58292,10 @@
58292 return 0;
58293 }
58294
58295 /************** End of vdbemem.c *********************************************/
58296 /************** Begin file vdbeaux.c *****************************************/
 
58297 /*
58298 ** 2003 September 6
58299 **
58300 ** The author disclaims copyright to this source code. In place of
58301 ** a legal notice, here is a blessing:
@@ -59037,22 +58962,19 @@
58962 p->pNext = pVdbe->pProgram;
58963 pVdbe->pProgram = p;
58964 }
58965
58966 /*
58967 ** Change the opcode at addr into OP_Noop
58968 */
58969 SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
58970 if( p->aOp ){
58971 VdbeOp *pOp = &p->aOp[addr];
58972 sqlite3 *db = p->db;
58973 freeP4(db, pOp->p4type, pOp->p4.p);
58974 memset(pOp, 0, sizeof(pOp[0]));
58975 pOp->opcode = OP_Noop;
 
 
 
58976 }
58977 }
58978
58979 /*
58980 ** Change the value of the P4 operand for a specific instruction.
@@ -59204,11 +59126,11 @@
59126 ** check the value of p->nOp-1 before continuing.
59127 */
59128 SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){
59129 /* C89 specifies that the constant "dummy" will be initialized to all
59130 ** zeros, which is correct. MSVC generates a warning, nevertheless. */
59131 static VdbeOp dummy; /* Ignore the MSVC warning about no initializer */
59132 assert( p->magic==VDBE_MAGIC_INIT );
59133 if( addr<0 ){
59134 #ifdef SQLITE_OMIT_TRACE
59135 if( p->nOp==0 ) return (VdbeOp*)&dummy;
59136 #endif
@@ -61609,11 +61531,10 @@
61531 }
61532 }
61533
61534 /************** End of vdbeaux.c *********************************************/
61535 /************** Begin file vdbeapi.c *****************************************/
 
61536 /*
61537 ** 2004 May 26
61538 **
61539 ** The author disclaims copyright to this source code. In place of
61540 ** a legal notice, here is a blessing:
@@ -62917,11 +62838,10 @@
62838 return v;
62839 }
62840
62841 /************** End of vdbeapi.c *********************************************/
62842 /************** Begin file vdbetrace.c ***************************************/
 
62843 /*
62844 ** 2009 November 25
62845 **
62846 ** The author disclaims copyright to this source code. In place of
62847 ** a legal notice, here is a blessing:
@@ -63073,11 +62993,10 @@
62993
62994 #endif /* #ifndef SQLITE_OMIT_TRACE */
62995
62996 /************** End of vdbetrace.c *******************************************/
62997 /************** Begin file vdbe.c ********************************************/
 
62998 /*
62999 ** 2001 September 15
63000 **
63001 ** The author disclaims copyright to this source code. In place of
63002 ** a legal notice, here is a blessing:
@@ -63543,11 +63462,10 @@
63462 ** hwtime.h contains inline assembler code for implementing
63463 ** high-performance timing routines.
63464 */
63465 /************** Include hwtime.h in the middle of vdbe.c *********************/
63466 /************** Begin file hwtime.h ******************************************/
 
63467 /*
63468 ** 2008 May 27
63469 **
63470 ** The author disclaims copyright to this source code. In place of
63471 ** a legal notice, here is a blessing:
@@ -63632,11 +63550,10 @@
63550
63551 #endif /* !defined(_HWTIME_H_) */
63552
63553 /************** End of hwtime.h **********************************************/
63554 /************** Continuing where we left off in vdbe.c ***********************/
 
63555
63556 #endif
63557
63558 /*
63559 ** The CHECK_FOR_INTERRUPT macro defined here looks to see if the
@@ -65627,10 +65544,20 @@
65544 sqlite3VdbeMemSetInt64(pOut, ~sqlite3VdbeIntValue(pIn1));
65545 }
65546 break;
65547 }
65548
65549 /* Opcode: Once P1 P2 * * *
65550 **
65551 ** Jump to P2 if the value in register P1 is a not null or zero. If
65552 ** the value is NULL or zero, fall through and change the P1 register
65553 ** to an integer 1.
65554 **
65555 ** When P1 is not used otherwise in a program, this opcode falls through
65556 ** once and jumps on all subsequent invocations. It is the equivalent
65557 ** of "OP_If P1 P2", followed by "OP_Integer 1 P1".
65558 */
65559 /* Opcode: If P1 P2 P3 * *
65560 **
65561 ** Jump to P2 if the value in register P1 is true. The value
65562 ** is considered true if it is numeric and non-zero. If the value
65563 ** in P1 is NULL then take the jump if P3 is true.
@@ -65639,10 +65566,11 @@
65566 **
65567 ** Jump to P2 if the value in register P1 is False. The value
65568 ** is considered true if it has a numeric value of zero. If the value
65569 ** in P1 is NULL then take the jump if P3 is true.
65570 */
65571 case OP_Once: /* jump, in1 */
65572 case OP_If: /* jump, in1 */
65573 case OP_IfNot: { /* jump, in1 */
65574 #if 0 /* local variables moved into u.al */
65575 int c;
65576 #endif /* local variables moved into u.al */
@@ -65657,10 +65585,16 @@
65585 #endif
65586 if( pOp->opcode==OP_IfNot ) u.al.c = !u.al.c;
65587 }
65588 if( u.al.c ){
65589 pc = pOp->p2-1;
65590 }else if( pOp->opcode==OP_Once ){
65591 assert( (pIn1->flags & (MEM_Agg|MEM_Dyn|MEM_RowSet|MEM_Frame))==0 );
65592 memAboutToChange(p, pIn1);
65593 pIn1->flags = MEM_Int;
65594 pIn1->u.i = 1;
65595 REGISTER_TRACE(pOp->p1, pIn1);
65596 }
65597 break;
65598 }
65599
65600 /* Opcode: IsNull P1 P2 * * *
@@ -69860,11 +69794,10 @@
69794 goto vdbe_error_halt;
69795 }
69796
69797 /************** End of vdbe.c ************************************************/
69798 /************** Begin file vdbeblob.c ****************************************/
 
69799 /*
69800 ** 2007 May 1
69801 **
69802 ** The author disclaims copyright to this source code. In place of
69803 ** a legal notice, here is a blessing:
@@ -70134,21 +70067,21 @@
70067 /* Make sure a mutex is held on the table to be accessed */
70068 sqlite3VdbeUsesBtree(v, iDb);
70069
70070 /* Configure the OP_TableLock instruction */
70071 #ifdef SQLITE_OMIT_SHARED_CACHE
70072 sqlite3VdbeChangeToNoop(v, 2);
70073 #else
70074 sqlite3VdbeChangeP1(v, 2, iDb);
70075 sqlite3VdbeChangeP2(v, 2, pTab->tnum);
70076 sqlite3VdbeChangeP3(v, 2, flags);
70077 sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT);
70078 #endif
70079
70080 /* Remove either the OP_OpenWrite or OpenRead. Set the P2
70081 ** parameter of the other to pTab->tnum. */
70082 sqlite3VdbeChangeToNoop(v, 4 - flags);
70083 sqlite3VdbeChangeP2(v, 3 + flags, pTab->tnum);
70084 sqlite3VdbeChangeP3(v, 3 + flags, iDb);
70085
70086 /* Configure the number of columns. Configure the cursor to
70087 ** think that the table has one more column than it really
@@ -70331,11 +70264,10 @@
70264
70265 #endif /* #ifndef SQLITE_OMIT_INCRBLOB */
70266
70267 /************** End of vdbeblob.c ********************************************/
70268 /************** Begin file vdbesort.c ****************************************/
 
70269 /*
70270 ** 2011 July 9
70271 **
70272 ** The author disclaims copyright to this source code. In place of
70273 ** a legal notice, here is a blessing:
@@ -70492,12 +70424,16 @@
70424 int rc; /* Return Code */
70425 int nRead; /* Number of bytes read */
70426 int nRec = 0; /* Size of record in bytes */
70427 int iOff = 0; /* Size of serialized size varint in bytes */
70428
70429 assert( pIter->iEof>=pIter->iReadOff );
70430 if( pIter->iEof-pIter->iReadOff>5 ){
70431 nRead = 5;
70432 }else{
70433 nRead = (int)(pIter->iEof - pIter->iReadOff);
70434 }
70435 if( nRead<=0 ){
70436 /* This is an EOF condition */
70437 vdbeSorterIterZero(db, pIter);
70438 return SQLITE_OK;
70439 }
@@ -71211,11 +71147,10 @@
71147
71148 #endif /* #ifndef SQLITE_OMIT_MERGE_SORT */
71149
71150 /************** End of vdbesort.c ********************************************/
71151 /************** Begin file journal.c *****************************************/
 
71152 /*
71153 ** 2007 August 22
71154 **
71155 ** The author disclaims copyright to this source code. In place of
71156 ** a legal notice, here is a blessing:
@@ -71452,11 +71387,10 @@
71387 }
71388 #endif
71389
71390 /************** End of journal.c *********************************************/
71391 /************** Begin file memjournal.c **************************************/
 
71392 /*
71393 ** 2008 October 7
71394 **
71395 ** The author disclaims copyright to this source code. In place of
71396 ** a legal notice, here is a blessing:
@@ -71714,11 +71648,10 @@
71648 return sizeof(MemJournal);
71649 }
71650
71651 /************** End of memjournal.c ******************************************/
71652 /************** Begin file walker.c ******************************************/
 
71653 /*
71654 ** 2008 August 16
71655 **
71656 ** The author disclaims copyright to this source code. In place of
71657 ** a legal notice, here is a blessing:
@@ -71853,11 +71786,10 @@
71786 return rc & WRC_Abort;
71787 }
71788
71789 /************** End of walker.c **********************************************/
71790 /************** Begin file resolve.c *****************************************/
 
71791 /*
71792 ** 2008 August 18
71793 **
71794 ** The author disclaims copyright to this source code. In place of
71795 ** a legal notice, here is a blessing:
@@ -73074,11 +73006,10 @@
73006 sqlite3WalkSelect(&w, p);
73007 }
73008
73009 /************** End of resolve.c *********************************************/
73010 /************** Begin file expr.c ********************************************/
 
73011 /*
73012 ** 2001 September 15
73013 **
73014 ** The author disclaims copyright to this source code. In place of
73015 ** a legal notice, here is a blessing:
@@ -73977,11 +73908,12 @@
73908 pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase);
73909 pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
73910 pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);
73911 pNewItem->jointype = pOldItem->jointype;
73912 pNewItem->iCursor = pOldItem->iCursor;
73913 pNewItem->addrFillSub = pOldItem->addrFillSub;
73914 pNewItem->regReturn = pOldItem->regReturn;
73915 pNewItem->isCorrelated = pOldItem->isCorrelated;
73916 pNewItem->zIndex = sqlite3DbStrDup(db, pOldItem->zIndex);
73917 pNewItem->notIndexed = pOldItem->notIndexed;
73918 pNewItem->pIndex = pOldItem->pIndex;
73919 pTab = pNewItem->pTab = pOldItem->pTab;
@@ -74537,12 +74469,11 @@
74469 assert(v);
74470 if( iCol<0 ){
74471 int iMem = ++pParse->nMem;
74472 int iAddr;
74473
74474 iAddr = sqlite3VdbeAddOp1(v, OP_Once, iMem);
 
74475
74476 sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
74477 eType = IN_INDEX_ROWID;
74478
74479 sqlite3VdbeJumpHere(v, iAddr);
@@ -74569,12 +74500,11 @@
74500 int iMem = ++pParse->nMem;
74501 int iAddr;
74502 char *pKey;
74503
74504 pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx);
74505 iAddr = sqlite3VdbeAddOp1(v, OP_Once, iMem);
 
74506
74507 sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb,
74508 pKey,P4_KEYINFO_HANDOFF);
74509 VdbeComment((v, "%s", pIdx->zName));
74510 eType = IN_INDEX_INDEX;
@@ -74655,10 +74585,11 @@
74585 ){
74586 int testAddr = 0; /* One-time test address */
74587 int rReg = 0; /* Register storing resulting */
74588 Vdbe *v = sqlite3GetVdbe(pParse);
74589 if( NEVER(v==0) ) return 0;
74590 assert( sqlite3VdbeCurrentAddr(v)>0 );
74591 sqlite3ExprCachePush(pParse);
74592
74593 /* This code must be run in its entirety every time it is encountered
74594 ** if any of the following is true:
74595 **
@@ -74669,12 +74600,11 @@
74600 ** If all of the above are false, then we can run this code just once
74601 ** save the results, and reuse the same result on subsequent invocations.
74602 */
74603 if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){
74604 int mem = ++pParse->nMem;
74605 testAddr = sqlite3VdbeAddOp1(v, OP_Once, mem);
 
74606 assert( testAddr>0 || pParse->db->mallocFailed );
74607 }
74608
74609 #ifndef SQLITE_OMIT_EXPLAIN
74610 if( pParse->explain==2 ){
@@ -74770,11 +74700,11 @@
74700 ** disable the test that was generated above that makes sure
74701 ** this code only executes once. Because for a non-constant
74702 ** expression we need to rerun this code each time.
74703 */
74704 if( testAddr && !sqlite3ExprIsConstant(pE2) ){
74705 sqlite3VdbeChangeToNoop(v, testAddr);
74706 testAddr = 0;
74707 }
74708
74709 /* Evaluate the expression and insert it into the temp table */
74710 if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
@@ -74841,11 +74771,11 @@
74771 break;
74772 }
74773 }
74774
74775 if( testAddr ){
74776 sqlite3VdbeJumpHere(v, testAddr);
74777 }
74778 sqlite3ExprCachePop(pParse, 1);
74779
74780 return rReg;
74781 }
@@ -76835,11 +76765,10 @@
76765 }
76766 }
76767
76768 /************** End of expr.c ************************************************/
76769 /************** Begin file alter.c *******************************************/
 
76770 /*
76771 ** 2005 February 15
76772 **
76773 ** The author disclaims copyright to this source code. In place of
76774 ** a legal notice, here is a blessing:
@@ -77664,11 +77593,10 @@
77593 }
77594 #endif /* SQLITE_ALTER_TABLE */
77595
77596 /************** End of alter.c ***********************************************/
77597 /************** Begin file analyze.c *****************************************/
 
77598 /*
77599 ** 2005 July 8
77600 **
77601 ** The author disclaims copyright to this source code. In place of
77602 ** a legal notice, here is a blessing:
@@ -78386,11 +78314,10 @@
78314
78315 #endif /* SQLITE_OMIT_ANALYZE */
78316
78317 /************** End of analyze.c *********************************************/
78318 /************** Begin file attach.c ******************************************/
 
78319 /*
78320 ** 2003 April 6
78321 **
78322 ** The author disclaims copyright to this source code. In place of
78323 ** a legal notice, here is a blessing:
@@ -78946,11 +78873,10 @@
78873 }
78874 #endif
78875
78876 /************** End of attach.c **********************************************/
78877 /************** Begin file auth.c ********************************************/
 
78878 /*
78879 ** 2003 January 11
78880 **
78881 ** The author disclaims copyright to this source code. In place of
78882 ** a legal notice, here is a blessing:
@@ -79198,11 +79124,10 @@
79124
79125 #endif /* SQLITE_OMIT_AUTHORIZATION */
79126
79127 /************** End of auth.c ************************************************/
79128 /************** Begin file build.c *******************************************/
 
79129 /*
79130 ** 2001 September 15
79131 **
79132 ** The author disclaims copyright to this source code. In place of
79133 ** a legal notice, here is a blessing:
@@ -83002,11 +82927,10 @@
82927 return pKey;
82928 }
82929
82930 /************** End of build.c ***********************************************/
82931 /************** Begin file callback.c ****************************************/
 
82932 /*
82933 ** 2005 May 23
82934 **
82935 ** The author disclaims copyright to this source code. In place of
82936 ** a legal notice, here is a blessing:
@@ -83462,11 +83386,10 @@
83386 return p;
83387 }
83388
83389 /************** End of callback.c ********************************************/
83390 /************** Begin file delete.c ******************************************/
 
83391 /*
83392 ** 2001 September 15
83393 **
83394 ** The author disclaims copyright to this source code. In place of
83395 ** a legal notice, here is a blessing:
@@ -84117,11 +84040,10 @@
84040 return regBase;
84041 }
84042
84043 /************** End of delete.c **********************************************/
84044 /************** Begin file func.c ********************************************/
 
84045 /*
84046 ** 2002 February 23
84047 **
84048 ** The author disclaims copyright to this source code. In place of
84049 ** a legal notice, here is a blessing:
@@ -85726,11 +85648,10 @@
85648 #endif
85649 }
85650
85651 /************** End of func.c ************************************************/
85652 /************** Begin file fkey.c ********************************************/
 
85653 /*
85654 **
85655 ** The author disclaims copyright to this source code. In place of
85656 ** a legal notice, here is a blessing:
85657 **
@@ -86947,11 +86868,10 @@
86868 }
86869 #endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */
86870
86871 /************** End of fkey.c ************************************************/
86872 /************** Begin file insert.c ******************************************/
 
86873 /*
86874 ** 2001 September 15
86875 **
86876 ** The author disclaims copyright to this source code. In place of
86877 ** a legal notice, here is a blessing:
@@ -88793,11 +88713,10 @@
88713 }
88714 #endif /* SQLITE_OMIT_XFER_OPT */
88715
88716 /************** End of insert.c **********************************************/
88717 /************** Begin file legacy.c ******************************************/
 
88718 /*
88719 ** 2001 September 15
88720 **
88721 ** The author disclaims copyright to this source code. In place of
88722 ** a legal notice, here is a blessing:
@@ -88941,11 +88860,10 @@
88860 return rc;
88861 }
88862
88863 /************** End of legacy.c **********************************************/
88864 /************** Begin file loadext.c *****************************************/
 
88865 /*
88866 ** 2006 June 7
88867 **
88868 ** The author disclaims copyright to this source code. In place of
88869 ** a legal notice, here is a blessing:
@@ -88962,11 +88880,10 @@
88880 #ifndef SQLITE_CORE
88881 #define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */
88882 #endif
88883 /************** Include sqlite3ext.h in the middle of loadext.c **************/
88884 /************** Begin file sqlite3ext.h **************************************/
 
88885 /*
88886 ** 2006 June 7
88887 **
88888 ** The author disclaims copyright to this source code. In place of
88889 ** a legal notice, here is a blessing:
@@ -89391,11 +89308,10 @@
89308
89309 #endif /* _SQLITE3EXT_H_ */
89310
89311 /************** End of sqlite3ext.h ******************************************/
89312 /************** Continuing where we left off in loadext.c ********************/
 
89313 /* #include <string.h> */
89314
89315 #ifndef SQLITE_OMIT_LOAD_EXTENSION
89316
89317 /*
@@ -90031,11 +89947,10 @@
89947 }
89948 }
89949
89950 /************** End of loadext.c *********************************************/
89951 /************** Begin file pragma.c ******************************************/
 
89952 /*
89953 ** 2003 April 6
89954 **
89955 ** The author disclaims copyright to this source code. In place of
89956 ** a legal notice, here is a blessing:
@@ -91560,11 +91475,10 @@
91475
91476 #endif /* SQLITE_OMIT_PRAGMA */
91477
91478 /************** End of pragma.c **********************************************/
91479 /************** Begin file prepare.c *****************************************/
 
91480 /*
91481 ** 2005 May 25
91482 **
91483 ** The author disclaims copyright to this source code. In place of
91484 ** a legal notice, here is a blessing:
@@ -92421,11 +92335,10 @@
92335
92336 #endif /* SQLITE_OMIT_UTF16 */
92337
92338 /************** End of prepare.c *********************************************/
92339 /************** Begin file select.c ******************************************/
 
92340 /*
92341 ** 2001 September 15
92342 **
92343 ** The author disclaims copyright to this source code. In place of
92344 ** a legal notice, here is a blessing:
@@ -92512,10 +92425,12 @@
92425 pNew->addrOpenEphm[2] = -1;
92426 if( db->mallocFailed ) {
92427 clearSelect(db, pNew);
92428 if( pNew!=&standin ) sqlite3DbFree(db, pNew);
92429 pNew = 0;
92430 }else{
92431 assert( pNew->pSrc!=0 || pParse->nErr>0 );
92432 }
92433 return pNew;
92434 }
92435
92436 /*
@@ -96224,11 +96139,15 @@
96139 struct SrcList_item *pItem = &pTabList->a[i];
96140 SelectDest dest;
96141 Select *pSub = pItem->pSelect;
96142 int isAggSub;
96143
96144 if( pSub==0 ) continue;
96145 if( pItem->addrFillSub ){
96146 sqlite3VdbeAddOp2(v, OP_Gosub, pItem->regReturn, pItem->addrFillSub);
96147 continue;
96148 }
96149
96150 /* Increment Parse.nHeight by the height of the largest expression
96151 ** tree refered to by this, the parent select. The child select
96152 ** may contain expression trees of at most
96153 ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit
@@ -96235,25 +96154,48 @@
96154 ** more conservative than necessary, but much easier than enforcing
96155 ** an exact limit.
96156 */
96157 pParse->nHeight += sqlite3SelectExprHeight(p);
96158
 
96159 isAggSub = (pSub->selFlags & SF_Aggregate)!=0;
96160 if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){
96161 /* This subquery can be absorbed into its parent. */
96162 if( isAggSub ){
96163 isAgg = 1;
96164 p->selFlags |= SF_Aggregate;
96165 }
96166 i = -1;
96167 }else{
96168 /* Generate a subroutine that will fill an ephemeral table with
96169 ** the content of this subquery. pItem->addrFillSub will point
96170 ** to the address of the generated subroutine. pItem->regReturn
96171 ** is a register allocated to hold the subroutine return address
96172 */
96173 int topAddr;
96174 int onceAddr = 0;
96175 int retAddr;
96176 assert( pItem->addrFillSub==0 );
96177 pItem->regReturn = ++pParse->nMem;
96178 topAddr = sqlite3VdbeAddOp2(v, OP_Integer, 0, pItem->regReturn);
96179 pItem->addrFillSub = topAddr+1;
96180 VdbeNoopComment((v, "materialize %s", pItem->pTab->zName));
96181 if( pItem->isCorrelated==0 && pParse->pTriggerTab==0 ){
96182 /* If the subquery is no correlated and if we are not inside of
96183 ** a trigger, then we only need to compute the value of the subquery
96184 ** once. */
96185 int regOnce = ++pParse->nMem;
96186 onceAddr = sqlite3VdbeAddOp1(v, OP_Once, regOnce);
96187 }
96188 sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor);
 
96189 explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId);
96190 sqlite3Select(pParse, pSub, &dest);
 
96191 pItem->pTab->nRowEst = (unsigned)pSub->nSelectRow;
96192 if( onceAddr ) sqlite3VdbeJumpHere(v, onceAddr);
96193 retAddr = sqlite3VdbeAddOp1(v, OP_Return, pItem->regReturn);
96194 VdbeComment((v, "end %s", pItem->pTab->zName));
96195 sqlite3VdbeChangeP1(v, topAddr, retAddr);
96196
96197 }
96198 if( /*pParse->nErr ||*/ db->mallocFailed ){
96199 goto select_end;
96200 }
96201 pParse->nHeight -= sqlite3SelectExprHeight(p);
@@ -96390,11 +96332,11 @@
96332 /* If sorting index that was created by a prior OP_OpenEphemeral
96333 ** instruction ended up not being needed, then change the OP_OpenEphemeral
96334 ** into an OP_Noop.
96335 */
96336 if( addrSortIndex>=0 && pOrderBy==0 ){
96337 sqlite3VdbeChangeToNoop(v, addrSortIndex);
96338 p->addrOpenEphm[2] = -1;
96339 }
96340
96341 if( pWInfo->eDistinct ){
96342 VdbeOp *pOp; /* No longer required OpenEphemeral instr. */
@@ -96673,11 +96615,11 @@
96615 */
96616 if( groupBySort ){
96617 sqlite3VdbeAddOp2(v, OP_SorterNext, sAggInfo.sortingIdx, addrTopOfLoop);
96618 }else{
96619 sqlite3WhereEnd(pWInfo);
96620 sqlite3VdbeChangeToNoop(v, addrSortingIdx);
96621 }
96622
96623 /* Output the final row of result
96624 */
96625 sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow);
@@ -96981,11 +96923,10 @@
96923 *****************************************************************************/
96924 #endif /* defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */
96925
96926 /************** End of select.c **********************************************/
96927 /************** Begin file table.c *******************************************/
 
96928 /*
96929 ** 2001 September 15
96930 **
96931 ** The author disclaims copyright to this source code. In place of
96932 ** a legal notice, here is a blessing:
@@ -97181,11 +97122,10 @@
97122
97123 #endif /* SQLITE_OMIT_GET_TABLE */
97124
97125 /************** End of table.c ***********************************************/
97126 /************** Begin file trigger.c *****************************************/
 
97127 /*
97128 **
97129 ** The author disclaims copyright to this source code. In place of
97130 ** a legal notice, here is a blessing:
97131 **
@@ -98307,11 +98247,10 @@
98247
98248 #endif /* !defined(SQLITE_OMIT_TRIGGER) */
98249
98250 /************** End of trigger.c *********************************************/
98251 /************** Begin file update.c ******************************************/
 
98252 /*
98253 ** 2001 September 15
98254 **
98255 ** The author disclaims copyright to this source code. In place of
98256 ** a legal notice, here is a blessing:
@@ -98980,11 +98919,10 @@
98919 }
98920 #endif /* SQLITE_OMIT_VIRTUALTABLE */
98921
98922 /************** End of update.c **********************************************/
98923 /************** Begin file vacuum.c ******************************************/
 
98924 /*
98925 ** 2003 April 6
98926 **
98927 ** The author disclaims copyright to this source code. In place of
98928 ** a legal notice, here is a blessing:
@@ -99327,11 +99265,10 @@
99265
99266 #endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */
99267
99268 /************** End of vacuum.c **********************************************/
99269 /************** Begin file vtab.c ********************************************/
 
99270 /*
99271 ** 2006 June 10
99272 **
99273 ** The author disclaims copyright to this source code. In place of
99274 ** a legal notice, here is a blessing:
@@ -100396,11 +100333,10 @@
100333
100334 #endif /* SQLITE_OMIT_VIRTUALTABLE */
100335
100336 /************** End of vtab.c ************************************************/
100337 /************** Begin file where.c *******************************************/
 
100338 /*
100339 ** 2001 September 15
100340 **
100341 ** The author disclaims copyright to this source code. In place of
100342 ** a legal notice, here is a blessing:
@@ -100865,15 +100801,23 @@
100801 return mask;
100802 }
100803 static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){
100804 Bitmask mask = 0;
100805 while( pS ){
100806 SrcList *pSrc = pS->pSrc;
100807 mask |= exprListTableUsage(pMaskSet, pS->pEList);
100808 mask |= exprListTableUsage(pMaskSet, pS->pGroupBy);
100809 mask |= exprListTableUsage(pMaskSet, pS->pOrderBy);
100810 mask |= exprTableUsage(pMaskSet, pS->pWhere);
100811 mask |= exprTableUsage(pMaskSet, pS->pHaving);
100812 if( ALWAYS(pSrc!=0) ){
100813 int i;
100814 for(i=0; i<pSrc->nSrc; i++){
100815 mask |= exprSelectTableUsage(pMaskSet, pSrc->a[i].pSelect);
100816 mask |= exprTableUsage(pMaskSet, pSrc->a[i].pOn);
100817 }
100818 }
100819 pS = pS->pPrior;
100820 }
100821 return mask;
100822 }
100823
@@ -102392,12 +102336,11 @@
102336 /* Generate code to skip over the creation and initialization of the
102337 ** transient index on 2nd and subsequent iterations of the loop. */
102338 v = pParse->pVdbe;
102339 assert( v!=0 );
102340 regIsInit = ++pParse->nMem;
102341 addrInit = sqlite3VdbeAddOp1(v, OP_Once, regIsInit);
 
102342
102343 /* Count the number of columns that will be added to the index
102344 ** and used to match WHERE clause constraints */
102345 nColumn = 0;
102346 pTable = pSrc->pTab;
@@ -105583,11 +105526,10 @@
105526 return;
105527 }
105528
105529 /************** End of where.c ***********************************************/
105530 /************** Begin file parse.c *******************************************/
 
105531 /* Driver template for the LEMON parser generator.
105532 ** The author disclaims copyright to this source code.
105533 **
105534 ** This version of "lempar.c" is modified, slightly, for use by SQLite.
105535 ** The only modifications are the addition of a couple of NEVER()
@@ -105596,11 +105538,10 @@
105538 ** specific grammar used by SQLite.
105539 */
105540 /* First off, code is included that follows the "include" declaration
105541 ** in the input grammar file. */
105542 /* #include <stdio.h> */
 
105543
105544
105545 /*
105546 ** Disable all error recovery processing in the parser push-down
105547 ** automaton.
@@ -105644,11 +105585,10 @@
105585 /*
105586 ** An instance of this structure holds the ATTACH key and the key type.
105587 */
105588 struct AttachKey { int type; Token key; };
105589
 
105590
105591 /* This is a utility routine used to set the ExprSpan.zStart and
105592 ** ExprSpan.zEnd values of pOut so that the span covers the complete
105593 ** range of text beginning with pStart and going to the end of pEnd.
105594 */
@@ -105664,11 +105604,10 @@
105604 static void spanExpr(ExprSpan *pOut, Parse *pParse, int op, Token *pValue){
105605 pOut->pExpr = sqlite3PExpr(pParse, op, 0, 0, pValue);
105606 pOut->zStart = pValue->z;
105607 pOut->zEnd = &pValue->z[pValue->n];
105608 }
 
105609
105610 /* This routine constructs a binary expression node out of two ExprSpan
105611 ** objects and uses the result to populate a new ExprSpan object.
105612 */
105613 static void spanBinaryExpr(
@@ -105680,11 +105619,10 @@
105619 ){
105620 pOut->pExpr = sqlite3PExpr(pParse, op, pLeft->pExpr, pRight->pExpr, 0);
105621 pOut->zStart = pLeft->zStart;
105622 pOut->zEnd = pRight->zEnd;
105623 }
 
105624
105625 /* Construct an expression node for a unary postfix operator
105626 */
105627 static void spanUnaryPostfix(
105628 ExprSpan *pOut, /* Write the new expression node here */
@@ -105695,11 +105633,10 @@
105633 ){
105634 pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0);
105635 pOut->zStart = pOperand->zStart;
105636 pOut->zEnd = &pPostOp->z[pPostOp->n];
105637 }
 
105638
105639 /* A routine to convert a binary TK_IS or TK_ISNOT expression into a
105640 ** unary TK_ISNULL or TK_NOTNULL expression. */
105641 static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
105642 sqlite3 *db = pParse->db;
@@ -105707,11 +105644,10 @@
105644 pA->op = (u8)op;
105645 sqlite3ExprDelete(db, pA->pRight);
105646 pA->pRight = 0;
105647 }
105648 }
 
105649
105650 /* Construct an expression node for a unary prefix operator
105651 */
105652 static void spanUnaryPrefix(
105653 ExprSpan *pOut, /* Write the new expression node here */
@@ -105722,11 +105658,10 @@
105658 ){
105659 pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0);
105660 pOut->zStart = pPreOp->z;
105661 pOut->zEnd = pOperand->zEnd;
105662 }
 
105663 /* Next is all token values, in a form suitable for use by makeheaders.
105664 ** This section will be null unless lemon is run with the -m switch.
105665 */
105666 /*
105667 ** These constants (all generated automatically by the parser generator)
@@ -106978,21 +106913,17 @@
106913 ** inside the C code.
106914 */
106915 case 160: /* select */
106916 case 194: /* oneselect */
106917 {
 
106918 sqlite3SelectDelete(pParse->db, (yypminor->yy387));
 
106919 }
106920 break;
106921 case 174: /* term */
106922 case 175: /* expr */
106923 {
 
106924 sqlite3ExprDelete(pParse->db, (yypminor->yy118).pExpr);
 
106925 }
106926 break;
106927 case 179: /* idxlist_opt */
106928 case 187: /* idxlist */
106929 case 197: /* selcollist */
@@ -107004,23 +106935,19 @@
106935 case 217: /* setlist */
106936 case 220: /* itemlist */
106937 case 221: /* exprlist */
106938 case 226: /* case_exprlist */
106939 {
 
106940 sqlite3ExprListDelete(pParse->db, (yypminor->yy322));
 
106941 }
106942 break;
106943 case 193: /* fullname */
106944 case 198: /* from */
106945 case 206: /* seltablist */
106946 case 207: /* stl_prefix */
106947 {
 
106948 sqlite3SrcListDelete(pParse->db, (yypminor->yy259));
 
106949 }
106950 break;
106951 case 199: /* where_opt */
106952 case 201: /* having_opt */
106953 case 210: /* on_opt */
@@ -107028,37 +106955,29 @@
106955 case 225: /* case_operand */
106956 case 227: /* case_else */
106957 case 238: /* when_clause */
106958 case 243: /* key_opt */
106959 {
 
106960 sqlite3ExprDelete(pParse->db, (yypminor->yy314));
 
106961 }
106962 break;
106963 case 211: /* using_opt */
106964 case 213: /* inscollist */
106965 case 219: /* inscollist_opt */
106966 {
 
106967 sqlite3IdListDelete(pParse->db, (yypminor->yy384));
 
106968 }
106969 break;
106970 case 234: /* trigger_cmd_list */
106971 case 239: /* trigger_cmd */
106972 {
 
106973 sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy203));
 
106974 }
106975 break;
106976 case 236: /* trigger_event */
106977 {
 
106978 sqlite3IdListDelete(pParse->db, (yypminor->yy90).b);
 
106979 }
106980 break;
106981 default: break; /* If no destructor action specified: do nothing */
106982 }
106983 }
@@ -107240,16 +107159,14 @@
107159 }
107160 #endif
107161 while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
107162 /* Here code is inserted which will execute if the parser
107163 ** stack every overflows */
 
107164
107165 UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */
107166 sqlite3ErrorMsg(pParse, "parser stack overflow");
107167 pParse->parseError = 1;
 
107168 sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
107169 }
107170
107171 /*
107172 ** Perform a shift action.
@@ -107686,94 +107603,66 @@
107603 ** { ... } // User supplied code
107604 ** #line <lineno> <thisfile>
107605 ** break;
107606 */
107607 case 5: /* explain ::= */
 
107608 { sqlite3BeginParse(pParse, 0); }
 
107609 break;
107610 case 6: /* explain ::= EXPLAIN */
 
107611 { sqlite3BeginParse(pParse, 1); }
 
107612 break;
107613 case 7: /* explain ::= EXPLAIN QUERY PLAN */
 
107614 { sqlite3BeginParse(pParse, 2); }
 
107615 break;
107616 case 8: /* cmdx ::= cmd */
 
107617 { sqlite3FinishCoding(pParse); }
 
107618 break;
107619 case 9: /* cmd ::= BEGIN transtype trans_opt */
 
107620 {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy4);}
 
107621 break;
107622 case 13: /* transtype ::= */
 
107623 {yygotominor.yy4 = TK_DEFERRED;}
 
107624 break;
107625 case 14: /* transtype ::= DEFERRED */
107626 case 15: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==15);
107627 case 16: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==16);
107628 case 115: /* multiselect_op ::= UNION */ yytestcase(yyruleno==115);
107629 case 117: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==117);
 
107630 {yygotominor.yy4 = yymsp[0].major;}
 
107631 break;
107632 case 17: /* cmd ::= COMMIT trans_opt */
107633 case 18: /* cmd ::= END trans_opt */ yytestcase(yyruleno==18);
 
107634 {sqlite3CommitTransaction(pParse);}
 
107635 break;
107636 case 19: /* cmd ::= ROLLBACK trans_opt */
 
107637 {sqlite3RollbackTransaction(pParse);}
 
107638 break;
107639 case 22: /* cmd ::= SAVEPOINT nm */
 
107640 {
107641 sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
107642 }
 
107643 break;
107644 case 23: /* cmd ::= RELEASE savepoint_opt nm */
 
107645 {
107646 sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
107647 }
 
107648 break;
107649 case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
 
107650 {
107651 sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
107652 }
 
107653 break;
107654 case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
 
107655 {
107656 sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy4,0,0,yymsp[-2].minor.yy4);
107657 }
 
107658 break;
107659 case 27: /* createkw ::= CREATE */
 
107660 {
107661 pParse->db->lookaside.bEnabled = 0;
107662 yygotominor.yy0 = yymsp[0].minor.yy0;
107663 }
 
107664 break;
107665 case 28: /* ifnotexists ::= */
107666 case 31: /* temp ::= */ yytestcase(yyruleno==31);
107667 case 70: /* autoinc ::= */ yytestcase(yyruleno==70);
107668 case 83: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==83);
@@ -107783,56 +107672,44 @@
107672 case 109: /* ifexists ::= */ yytestcase(yyruleno==109);
107673 case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120);
107674 case 121: /* distinct ::= */ yytestcase(yyruleno==121);
107675 case 222: /* between_op ::= BETWEEN */ yytestcase(yyruleno==222);
107676 case 225: /* in_op ::= IN */ yytestcase(yyruleno==225);
 
107677 {yygotominor.yy4 = 0;}
 
107678 break;
107679 case 29: /* ifnotexists ::= IF NOT EXISTS */
107680 case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30);
107681 case 71: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==71);
107682 case 86: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==86);
107683 case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108);
107684 case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119);
107685 case 223: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==223);
107686 case 226: /* in_op ::= NOT IN */ yytestcase(yyruleno==226);
 
107687 {yygotominor.yy4 = 1;}
 
107688 break;
107689 case 32: /* create_table_args ::= LP columnlist conslist_opt RP */
 
107690 {
107691 sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0);
107692 }
 
107693 break;
107694 case 33: /* create_table_args ::= AS select */
 
107695 {
107696 sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy387);
107697 sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387);
107698 }
 
107699 break;
107700 case 36: /* column ::= columnid type carglist */
 
107701 {
107702 yygotominor.yy0.z = yymsp[-2].minor.yy0.z;
107703 yygotominor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n;
107704 }
 
107705 break;
107706 case 37: /* columnid ::= nm */
 
107707 {
107708 sqlite3AddColumn(pParse,&yymsp[0].minor.yy0);
107709 yygotominor.yy0 = yymsp[0].minor.yy0;
107710 }
 
107711 break;
107712 case 38: /* id ::= ID */
107713 case 39: /* id ::= INDEXED */ yytestcase(yyruleno==39);
107714 case 40: /* ids ::= ID|STRING */ yytestcase(yyruleno==40);
107715 case 41: /* nm ::= id */ yytestcase(yyruleno==41);
@@ -107852,373 +107729,256 @@
107729 case 264: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==264);
107730 case 265: /* plus_num ::= plus_opt number */ yytestcase(yyruleno==265);
107731 case 266: /* minus_num ::= MINUS number */ yytestcase(yyruleno==266);
107732 case 267: /* number ::= INTEGER|FLOAT */ yytestcase(yyruleno==267);
107733 case 285: /* trnm ::= nm */ yytestcase(yyruleno==285);
 
107734 {yygotominor.yy0 = yymsp[0].minor.yy0;}
 
107735 break;
107736 case 45: /* type ::= typetoken */
 
107737 {sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);}
 
107738 break;
107739 case 47: /* typetoken ::= typename LP signed RP */
 
107740 {
107741 yygotominor.yy0.z = yymsp[-3].minor.yy0.z;
107742 yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
107743 }
 
107744 break;
107745 case 48: /* typetoken ::= typename LP signed COMMA signed RP */
 
107746 {
107747 yygotominor.yy0.z = yymsp[-5].minor.yy0.z;
107748 yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
107749 }
 
107750 break;
107751 case 50: /* typename ::= typename ids */
 
107752 {yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
 
107753 break;
107754 case 57: /* ccons ::= DEFAULT term */
107755 case 59: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==59);
 
107756 {sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy118);}
 
107757 break;
107758 case 58: /* ccons ::= DEFAULT LP expr RP */
 
107759 {sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy118);}
 
107760 break;
107761 case 60: /* ccons ::= DEFAULT MINUS term */
 
107762 {
107763 ExprSpan v;
107764 v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy118.pExpr, 0, 0);
107765 v.zStart = yymsp[-1].minor.yy0.z;
107766 v.zEnd = yymsp[0].minor.yy118.zEnd;
107767 sqlite3AddDefaultValue(pParse,&v);
107768 }
 
107769 break;
107770 case 61: /* ccons ::= DEFAULT id */
 
107771 {
107772 ExprSpan v;
107773 spanExpr(&v, pParse, TK_STRING, &yymsp[0].minor.yy0);
107774 sqlite3AddDefaultValue(pParse,&v);
107775 }
 
107776 break;
107777 case 63: /* ccons ::= NOT NULL onconf */
 
107778 {sqlite3AddNotNull(pParse, yymsp[0].minor.yy4);}
 
107779 break;
107780 case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
 
107781 {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy4,yymsp[0].minor.yy4,yymsp[-2].minor.yy4);}
 
107782 break;
107783 case 65: /* ccons ::= UNIQUE onconf */
 
107784 {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy4,0,0,0,0);}
 
107785 break;
107786 case 66: /* ccons ::= CHECK LP expr RP */
 
107787 {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy118.pExpr);}
 
107788 break;
107789 case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */
 
107790 {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy322,yymsp[0].minor.yy4);}
 
107791 break;
107792 case 68: /* ccons ::= defer_subclause */
 
107793 {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy4);}
 
107794 break;
107795 case 69: /* ccons ::= COLLATE ids */
 
107796 {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
 
107797 break;
107798 case 72: /* refargs ::= */
 
107799 { yygotominor.yy4 = OE_None*0x0101; /* EV: R-19803-45884 */}
 
107800 break;
107801 case 73: /* refargs ::= refargs refarg */
 
107802 { yygotominor.yy4 = (yymsp[-1].minor.yy4 & ~yymsp[0].minor.yy215.mask) | yymsp[0].minor.yy215.value; }
 
107803 break;
107804 case 74: /* refarg ::= MATCH nm */
107805 case 75: /* refarg ::= ON INSERT refact */ yytestcase(yyruleno==75);
 
107806 { yygotominor.yy215.value = 0; yygotominor.yy215.mask = 0x000000; }
 
107807 break;
107808 case 76: /* refarg ::= ON DELETE refact */
 
107809 { yygotominor.yy215.value = yymsp[0].minor.yy4; yygotominor.yy215.mask = 0x0000ff; }
 
107810 break;
107811 case 77: /* refarg ::= ON UPDATE refact */
 
107812 { yygotominor.yy215.value = yymsp[0].minor.yy4<<8; yygotominor.yy215.mask = 0x00ff00; }
 
107813 break;
107814 case 78: /* refact ::= SET NULL */
 
107815 { yygotominor.yy4 = OE_SetNull; /* EV: R-33326-45252 */}
 
107816 break;
107817 case 79: /* refact ::= SET DEFAULT */
 
107818 { yygotominor.yy4 = OE_SetDflt; /* EV: R-33326-45252 */}
 
107819 break;
107820 case 80: /* refact ::= CASCADE */
 
107821 { yygotominor.yy4 = OE_Cascade; /* EV: R-33326-45252 */}
 
107822 break;
107823 case 81: /* refact ::= RESTRICT */
 
107824 { yygotominor.yy4 = OE_Restrict; /* EV: R-33326-45252 */}
 
107825 break;
107826 case 82: /* refact ::= NO ACTION */
 
107827 { yygotominor.yy4 = OE_None; /* EV: R-33326-45252 */}
 
107828 break;
107829 case 84: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
107830 case 99: /* defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==99);
107831 case 101: /* onconf ::= ON CONFLICT resolvetype */ yytestcase(yyruleno==101);
107832 case 104: /* resolvetype ::= raisetype */ yytestcase(yyruleno==104);
 
107833 {yygotominor.yy4 = yymsp[0].minor.yy4;}
 
107834 break;
107835 case 88: /* conslist_opt ::= */
 
107836 {yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;}
 
107837 break;
107838 case 89: /* conslist_opt ::= COMMA conslist */
 
107839 {yygotominor.yy0 = yymsp[-1].minor.yy0;}
 
107840 break;
107841 case 94: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */
 
107842 {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy322,yymsp[0].minor.yy4,yymsp[-2].minor.yy4,0);}
 
107843 break;
107844 case 95: /* tcons ::= UNIQUE LP idxlist RP onconf */
 
107845 {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy322,yymsp[0].minor.yy4,0,0,0,0);}
 
107846 break;
107847 case 96: /* tcons ::= CHECK LP expr RP onconf */
 
107848 {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy118.pExpr);}
 
107849 break;
107850 case 97: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */
 
107851 {
107852 sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy322, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[-1].minor.yy4);
107853 sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy4);
107854 }
 
107855 break;
107856 case 100: /* onconf ::= */
 
107857 {yygotominor.yy4 = OE_Default;}
 
107858 break;
107859 case 102: /* orconf ::= */
 
107860 {yygotominor.yy210 = OE_Default;}
 
107861 break;
107862 case 103: /* orconf ::= OR resolvetype */
 
107863 {yygotominor.yy210 = (u8)yymsp[0].minor.yy4;}
 
107864 break;
107865 case 105: /* resolvetype ::= IGNORE */
 
107866 {yygotominor.yy4 = OE_Ignore;}
 
107867 break;
107868 case 106: /* resolvetype ::= REPLACE */
 
107869 {yygotominor.yy4 = OE_Replace;}
 
107870 break;
107871 case 107: /* cmd ::= DROP TABLE ifexists fullname */
 
107872 {
107873 sqlite3DropTable(pParse, yymsp[0].minor.yy259, 0, yymsp[-1].minor.yy4);
107874 }
 
107875 break;
107876 case 110: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */
 
107877 {
107878 sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy387, yymsp[-6].minor.yy4, yymsp[-4].minor.yy4);
107879 }
 
107880 break;
107881 case 111: /* cmd ::= DROP VIEW ifexists fullname */
 
107882 {
107883 sqlite3DropTable(pParse, yymsp[0].minor.yy259, 1, yymsp[-1].minor.yy4);
107884 }
 
107885 break;
107886 case 112: /* cmd ::= select */
 
107887 {
107888 SelectDest dest = {SRT_Output, 0, 0, 0, 0};
107889 sqlite3Select(pParse, yymsp[0].minor.yy387, &dest);
107890 sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387);
107891 }
 
107892 break;
107893 case 113: /* select ::= oneselect */
 
107894 {yygotominor.yy387 = yymsp[0].minor.yy387;}
 
107895 break;
107896 case 114: /* select ::= select multiselect_op oneselect */
 
107897 {
107898 if( yymsp[0].minor.yy387 ){
107899 yymsp[0].minor.yy387->op = (u8)yymsp[-1].minor.yy4;
107900 yymsp[0].minor.yy387->pPrior = yymsp[-2].minor.yy387;
107901 }else{
107902 sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy387);
107903 }
107904 yygotominor.yy387 = yymsp[0].minor.yy387;
107905 }
 
107906 break;
107907 case 116: /* multiselect_op ::= UNION ALL */
 
107908 {yygotominor.yy4 = TK_ALL;}
 
107909 break;
107910 case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
 
107911 {
107912 yygotominor.yy387 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy322,yymsp[-5].minor.yy259,yymsp[-4].minor.yy314,yymsp[-3].minor.yy322,yymsp[-2].minor.yy314,yymsp[-1].minor.yy322,yymsp[-7].minor.yy4,yymsp[0].minor.yy292.pLimit,yymsp[0].minor.yy292.pOffset);
107913 }
 
107914 break;
107915 case 122: /* sclp ::= selcollist COMMA */
107916 case 247: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==247);
 
107917 {yygotominor.yy322 = yymsp[-1].minor.yy322;}
 
107918 break;
107919 case 123: /* sclp ::= */
107920 case 151: /* orderby_opt ::= */ yytestcase(yyruleno==151);
107921 case 159: /* groupby_opt ::= */ yytestcase(yyruleno==159);
107922 case 240: /* exprlist ::= */ yytestcase(yyruleno==240);
107923 case 246: /* idxlist_opt ::= */ yytestcase(yyruleno==246);
 
107924 {yygotominor.yy322 = 0;}
 
107925 break;
107926 case 124: /* selcollist ::= sclp expr as */
 
107927 {
107928 yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy322, yymsp[-1].minor.yy118.pExpr);
107929 if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[0].minor.yy0, 1);
107930 sqlite3ExprListSetSpan(pParse,yygotominor.yy322,&yymsp[-1].minor.yy118);
107931 }
 
107932 break;
107933 case 125: /* selcollist ::= sclp STAR */
 
107934 {
107935 Expr *p = sqlite3Expr(pParse->db, TK_ALL, 0);
107936 yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy322, p);
107937 }
 
107938 break;
107939 case 126: /* selcollist ::= sclp nm DOT STAR */
 
107940 {
107941 Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0);
107942 Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
107943 Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
107944 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, pDot);
107945 }
 
107946 break;
107947 case 129: /* as ::= */
 
107948 {yygotominor.yy0.n = 0;}
 
107949 break;
107950 case 130: /* from ::= */
 
107951 {yygotominor.yy259 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy259));}
 
107952 break;
107953 case 131: /* from ::= FROM seltablist */
 
107954 {
107955 yygotominor.yy259 = yymsp[0].minor.yy259;
107956 sqlite3SrcListShiftJoinType(yygotominor.yy259);
107957 }
 
107958 break;
107959 case 132: /* stl_prefix ::= seltablist joinop */
 
107960 {
107961 yygotominor.yy259 = yymsp[-1].minor.yy259;
107962 if( ALWAYS(yygotominor.yy259 && yygotominor.yy259->nSrc>0) ) yygotominor.yy259->a[yygotominor.yy259->nSrc-1].jointype = (u8)yymsp[0].minor.yy4;
107963 }
 
107964 break;
107965 case 133: /* stl_prefix ::= */
 
107966 {yygotominor.yy259 = 0;}
 
107967 break;
107968 case 134: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
 
107969 {
107970 yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
107971 sqlite3SrcListIndexedBy(pParse, yygotominor.yy259, &yymsp[-2].minor.yy0);
107972 }
 
107973 break;
107974 case 135: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
 
107975 {
107976 yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy387,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
107977 }
 
107978 break;
107979 case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
 
107980 {
107981 if( yymsp[-6].minor.yy259==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy314==0 && yymsp[0].minor.yy384==0 ){
107982 yygotominor.yy259 = yymsp[-4].minor.yy259;
107983 }else{
107984 Select *pSubquery;
@@ -108225,260 +107985,180 @@
107985 sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy259);
107986 pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy259,0,0,0,0,0,0,0);
107987 yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
107988 }
107989 }
 
107990 break;
107991 case 137: /* dbnm ::= */
107992 case 146: /* indexed_opt ::= */ yytestcase(yyruleno==146);
 
107993 {yygotominor.yy0.z=0; yygotominor.yy0.n=0;}
 
107994 break;
107995 case 139: /* fullname ::= nm dbnm */
 
107996 {yygotominor.yy259 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
 
107997 break;
107998 case 140: /* joinop ::= COMMA|JOIN */
 
107999 { yygotominor.yy4 = JT_INNER; }
 
108000 break;
108001 case 141: /* joinop ::= JOIN_KW JOIN */
 
108002 { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
 
108003 break;
108004 case 142: /* joinop ::= JOIN_KW nm JOIN */
 
108005 { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); }
 
108006 break;
108007 case 143: /* joinop ::= JOIN_KW nm nm JOIN */
 
108008 { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); }
 
108009 break;
108010 case 144: /* on_opt ::= ON expr */
108011 case 155: /* sortitem ::= expr */ yytestcase(yyruleno==155);
108012 case 162: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==162);
108013 case 169: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==169);
108014 case 235: /* case_else ::= ELSE expr */ yytestcase(yyruleno==235);
108015 case 237: /* case_operand ::= expr */ yytestcase(yyruleno==237);
 
108016 {yygotominor.yy314 = yymsp[0].minor.yy118.pExpr;}
 
108017 break;
108018 case 145: /* on_opt ::= */
108019 case 161: /* having_opt ::= */ yytestcase(yyruleno==161);
108020 case 168: /* where_opt ::= */ yytestcase(yyruleno==168);
108021 case 236: /* case_else ::= */ yytestcase(yyruleno==236);
108022 case 238: /* case_operand ::= */ yytestcase(yyruleno==238);
 
108023 {yygotominor.yy314 = 0;}
 
108024 break;
108025 case 148: /* indexed_opt ::= NOT INDEXED */
 
108026 {yygotominor.yy0.z=0; yygotominor.yy0.n=1;}
 
108027 break;
108028 case 149: /* using_opt ::= USING LP inscollist RP */
108029 case 181: /* inscollist_opt ::= LP inscollist RP */ yytestcase(yyruleno==181);
 
108030 {yygotominor.yy384 = yymsp[-1].minor.yy384;}
 
108031 break;
108032 case 150: /* using_opt ::= */
108033 case 180: /* inscollist_opt ::= */ yytestcase(yyruleno==180);
 
108034 {yygotominor.yy384 = 0;}
 
108035 break;
108036 case 152: /* orderby_opt ::= ORDER BY sortlist */
108037 case 160: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==160);
108038 case 239: /* exprlist ::= nexprlist */ yytestcase(yyruleno==239);
 
108039 {yygotominor.yy322 = yymsp[0].minor.yy322;}
 
108040 break;
108041 case 153: /* sortlist ::= sortlist COMMA sortitem sortorder */
 
108042 {
108043 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322,yymsp[-1].minor.yy314);
108044 if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
108045 }
 
108046 break;
108047 case 154: /* sortlist ::= sortitem sortorder */
 
108048 {
108049 yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy314);
108050 if( yygotominor.yy322 && ALWAYS(yygotominor.yy322->a) ) yygotominor.yy322->a[0].sortOrder = (u8)yymsp[0].minor.yy4;
108051 }
 
108052 break;
108053 case 156: /* sortorder ::= ASC */
108054 case 158: /* sortorder ::= */ yytestcase(yyruleno==158);
 
108055 {yygotominor.yy4 = SQLITE_SO_ASC;}
 
108056 break;
108057 case 157: /* sortorder ::= DESC */
 
108058 {yygotominor.yy4 = SQLITE_SO_DESC;}
 
108059 break;
108060 case 163: /* limit_opt ::= */
 
108061 {yygotominor.yy292.pLimit = 0; yygotominor.yy292.pOffset = 0;}
 
108062 break;
108063 case 164: /* limit_opt ::= LIMIT expr */
 
108064 {yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr; yygotominor.yy292.pOffset = 0;}
 
108065 break;
108066 case 165: /* limit_opt ::= LIMIT expr OFFSET expr */
 
108067 {yygotominor.yy292.pLimit = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pOffset = yymsp[0].minor.yy118.pExpr;}
 
108068 break;
108069 case 166: /* limit_opt ::= LIMIT expr COMMA expr */
 
108070 {yygotominor.yy292.pOffset = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr;}
 
108071 break;
108072 case 167: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */
 
108073 {
108074 sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy259, &yymsp[-1].minor.yy0);
108075 sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy259,yymsp[0].minor.yy314);
108076 }
 
108077 break;
108078 case 170: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */
 
108079 {
108080 sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy259, &yymsp[-3].minor.yy0);
108081 sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy322,"set list");
108082 sqlite3Update(pParse,yymsp[-4].minor.yy259,yymsp[-1].minor.yy322,yymsp[0].minor.yy314,yymsp[-5].minor.yy210);
108083 }
 
108084 break;
108085 case 171: /* setlist ::= setlist COMMA nm EQ expr */
 
108086 {
108087 yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy322, yymsp[0].minor.yy118.pExpr);
108088 sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
108089 }
 
108090 break;
108091 case 172: /* setlist ::= nm EQ expr */
 
108092 {
108093 yygotominor.yy322 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy118.pExpr);
108094 sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
108095 }
 
108096 break;
108097 case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */
 
108098 {sqlite3Insert(pParse, yymsp[-5].minor.yy259, yymsp[-1].minor.yy322, 0, yymsp[-4].minor.yy384, yymsp[-7].minor.yy210);}
 
108099 break;
108100 case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */
 
108101 {sqlite3Insert(pParse, yymsp[-2].minor.yy259, 0, yymsp[0].minor.yy387, yymsp[-1].minor.yy384, yymsp[-4].minor.yy210);}
 
108102 break;
108103 case 175: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */
 
108104 {sqlite3Insert(pParse, yymsp[-3].minor.yy259, 0, 0, yymsp[-2].minor.yy384, yymsp[-5].minor.yy210);}
 
108105 break;
108106 case 176: /* insert_cmd ::= INSERT orconf */
 
108107 {yygotominor.yy210 = yymsp[0].minor.yy210;}
 
108108 break;
108109 case 177: /* insert_cmd ::= REPLACE */
 
108110 {yygotominor.yy210 = OE_Replace;}
 
108111 break;
108112 case 178: /* itemlist ::= itemlist COMMA expr */
108113 case 241: /* nexprlist ::= nexprlist COMMA expr */ yytestcase(yyruleno==241);
 
108114 {yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy118.pExpr);}
 
108115 break;
108116 case 179: /* itemlist ::= expr */
108117 case 242: /* nexprlist ::= expr */ yytestcase(yyruleno==242);
 
108118 {yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy118.pExpr);}
 
108119 break;
108120 case 182: /* inscollist ::= inscollist COMMA nm */
 
108121 {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy384,&yymsp[0].minor.yy0);}
 
108122 break;
108123 case 183: /* inscollist ::= nm */
 
108124 {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);}
 
108125 break;
108126 case 184: /* expr ::= term */
 
108127 {yygotominor.yy118 = yymsp[0].minor.yy118;}
 
108128 break;
108129 case 185: /* expr ::= LP expr RP */
 
108130 {yygotominor.yy118.pExpr = yymsp[-1].minor.yy118.pExpr; spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);}
 
108131 break;
108132 case 186: /* term ::= NULL */
108133 case 191: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==191);
108134 case 192: /* term ::= STRING */ yytestcase(yyruleno==192);
 
108135 {spanExpr(&yygotominor.yy118, pParse, yymsp[0].major, &yymsp[0].minor.yy0);}
 
108136 break;
108137 case 187: /* expr ::= id */
108138 case 188: /* expr ::= JOIN_KW */ yytestcase(yyruleno==188);
 
108139 {spanExpr(&yygotominor.yy118, pParse, TK_ID, &yymsp[0].minor.yy0);}
 
108140 break;
108141 case 189: /* expr ::= nm DOT nm */
 
108142 {
108143 Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
108144 Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
108145 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0);
108146 spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
108147 }
 
108148 break;
108149 case 190: /* expr ::= nm DOT nm DOT nm */
 
108150 {
108151 Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0);
108152 Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
108153 Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
108154 Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0);
108155 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0);
108156 spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
108157 }
 
108158 break;
108159 case 193: /* expr ::= REGISTER */
 
108160 {
108161 /* When doing a nested parse, one can include terms in an expression
108162 ** that look like this: #1 #2 ... These terms refer to registers
108163 ** in the virtual machine. #N is the N-th register. */
108164 if( pParse->nested==0 ){
@@ -108488,40 +108168,32 @@
108168 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &yymsp[0].minor.yy0);
108169 if( yygotominor.yy118.pExpr ) sqlite3GetInt32(&yymsp[0].minor.yy0.z[1], &yygotominor.yy118.pExpr->iTable);
108170 }
108171 spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
108172 }
 
108173 break;
108174 case 194: /* expr ::= VARIABLE */
 
108175 {
108176 spanExpr(&yygotominor.yy118, pParse, TK_VARIABLE, &yymsp[0].minor.yy0);
108177 sqlite3ExprAssignVarNumber(pParse, yygotominor.yy118.pExpr);
108178 spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
108179 }
 
108180 break;
108181 case 195: /* expr ::= expr COLLATE ids */
 
108182 {
108183 yygotominor.yy118.pExpr = sqlite3ExprSetCollByToken(pParse, yymsp[-2].minor.yy118.pExpr, &yymsp[0].minor.yy0);
108184 yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart;
108185 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108186 }
 
108187 break;
108188 case 196: /* expr ::= CAST LP expr AS typetoken RP */
 
108189 {
108190 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy118.pExpr, 0, &yymsp[-1].minor.yy0);
108191 spanSet(&yygotominor.yy118,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);
108192 }
 
108193 break;
108194 case 197: /* expr ::= ID LP distinct exprlist RP */
 
108195 {
108196 if( yymsp[-1].minor.yy322 && yymsp[-1].minor.yy322->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
108197 sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
108198 }
108199 yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0);
@@ -108528,59 +108200,47 @@
108200 spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
108201 if( yymsp[-2].minor.yy4 && yygotominor.yy118.pExpr ){
108202 yygotominor.yy118.pExpr->flags |= EP_Distinct;
108203 }
108204 }
 
108205 break;
108206 case 198: /* expr ::= ID LP STAR RP */
 
108207 {
108208 yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0);
108209 spanSet(&yygotominor.yy118,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
108210 }
 
108211 break;
108212 case 199: /* term ::= CTIME_KW */
 
108213 {
108214 /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are
108215 ** treated as functions that return constants */
108216 yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0);
108217 if( yygotominor.yy118.pExpr ){
108218 yygotominor.yy118.pExpr->op = TK_CONST_FUNC;
108219 }
108220 spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
108221 }
 
108222 break;
108223 case 200: /* expr ::= expr AND expr */
108224 case 201: /* expr ::= expr OR expr */ yytestcase(yyruleno==201);
108225 case 202: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==202);
108226 case 203: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==203);
108227 case 204: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==204);
108228 case 205: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==205);
108229 case 206: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==206);
108230 case 207: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==207);
 
108231 {spanBinaryExpr(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);}
 
108232 break;
108233 case 208: /* likeop ::= LIKE_KW */
108234 case 210: /* likeop ::= MATCH */ yytestcase(yyruleno==210);
 
108235 {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 0;}
 
108236 break;
108237 case 209: /* likeop ::= NOT LIKE_KW */
108238 case 211: /* likeop ::= NOT MATCH */ yytestcase(yyruleno==211);
 
108239 {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 1;}
 
108240 break;
108241 case 212: /* expr ::= expr likeop expr */
 
108242 {
108243 ExprList *pList;
108244 pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy118.pExpr);
108245 pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy118.pExpr);
108246 yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy342.eOperator);
@@ -108587,14 +108247,12 @@
108247 if( yymsp[-1].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108248 yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart;
108249 yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
108250 if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc;
108251 }
 
108252 break;
108253 case 213: /* expr ::= expr likeop expr ESCAPE expr */
 
108254 {
108255 ExprList *pList;
108256 pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
108257 pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy118.pExpr);
108258 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr);
@@ -108602,56 +108260,40 @@
108260 if( yymsp[-3].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108261 yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108262 yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
108263 if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc;
108264 }
 
108265 break;
108266 case 214: /* expr ::= expr ISNULL|NOTNULL */
 
108267 {spanUnaryPostfix(&yygotominor.yy118,pParse,yymsp[0].major,&yymsp[-1].minor.yy118,&yymsp[0].minor.yy0);}
 
108268 break;
108269 case 215: /* expr ::= expr NOT NULL */
 
108270 {spanUnaryPostfix(&yygotominor.yy118,pParse,TK_NOTNULL,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy0);}
 
108271 break;
108272 case 216: /* expr ::= expr IS expr */
 
108273 {
108274 spanBinaryExpr(&yygotominor.yy118,pParse,TK_IS,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);
108275 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_ISNULL);
108276 }
 
108277 break;
108278 case 217: /* expr ::= expr IS NOT expr */
 
108279 {
108280 spanBinaryExpr(&yygotominor.yy118,pParse,TK_ISNOT,&yymsp[-3].minor.yy118,&yymsp[0].minor.yy118);
108281 binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_NOTNULL);
108282 }
 
108283 break;
108284 case 218: /* expr ::= NOT expr */
108285 case 219: /* expr ::= BITNOT expr */ yytestcase(yyruleno==219);
 
108286 {spanUnaryPrefix(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
 
108287 break;
108288 case 220: /* expr ::= MINUS expr */
 
108289 {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UMINUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
 
108290 break;
108291 case 221: /* expr ::= PLUS expr */
 
108292 {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UPLUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
 
108293 break;
108294 case 224: /* expr ::= expr between_op expr AND expr */
 
108295 {
108296 ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
108297 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr);
108298 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy118.pExpr, 0, 0);
108299 if( yygotominor.yy118.pExpr ){
@@ -108661,14 +108303,12 @@
108303 }
108304 if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108305 yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108306 yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
108307 }
 
108308 break;
108309 case 227: /* expr ::= expr in_op LP exprlist RP */
 
108310 {
108311 if( yymsp[-1].minor.yy322==0 ){
108312 /* Expressions of the form
108313 **
108314 ** expr1 IN ()
@@ -108690,14 +108330,12 @@
108330 if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108331 }
108332 yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108333 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108334 }
 
108335 break;
108336 case 228: /* expr ::= LP select RP */
 
108337 {
108338 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0);
108339 if( yygotominor.yy118.pExpr ){
108340 yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387;
108341 ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect);
@@ -108706,14 +108344,12 @@
108344 sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387);
108345 }
108346 yygotominor.yy118.zStart = yymsp[-2].minor.yy0.z;
108347 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108348 }
 
108349 break;
108350 case 229: /* expr ::= expr in_op LP select RP */
 
108351 {
108352 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy118.pExpr, 0, 0);
108353 if( yygotominor.yy118.pExpr ){
108354 yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387;
108355 ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect);
@@ -108723,14 +108359,12 @@
108359 }
108360 if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108361 yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
108362 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108363 }
 
108364 break;
108365 case 230: /* expr ::= expr in_op nm dbnm */
 
108366 {
108367 SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);
108368 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy118.pExpr, 0, 0);
108369 if( yygotominor.yy118.pExpr ){
108370 yygotominor.yy118.pExpr->x.pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0);
@@ -108741,14 +108375,12 @@
108375 }
108376 if( yymsp[-2].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
108377 yygotominor.yy118.zStart = yymsp[-3].minor.yy118.zStart;
108378 yygotominor.yy118.zEnd = yymsp[0].minor.yy0.z ? &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] : &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n];
108379 }
 
108380 break;
108381 case 231: /* expr ::= EXISTS LP select RP */
 
108382 {
108383 Expr *p = yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0);
108384 if( p ){
108385 p->x.pSelect = yymsp[-1].minor.yy387;
108386 ExprSetProperty(p, EP_xIsSelect);
@@ -108757,14 +108389,12 @@
108389 sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387);
108390 }
108391 yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z;
108392 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108393 }
 
108394 break;
108395 case 232: /* expr ::= CASE case_operand case_exprlist case_else END */
 
108396 {
108397 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy314, yymsp[-1].minor.yy314, 0);
108398 if( yygotominor.yy118.pExpr ){
108399 yygotominor.yy118.pExpr->x.pList = yymsp[-2].minor.yy322;
108400 sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr);
@@ -108772,50 +108402,38 @@
108402 sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy322);
108403 }
108404 yygotominor.yy118.zStart = yymsp[-4].minor.yy0.z;
108405 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108406 }
 
108407 break;
108408 case 233: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
 
108409 {
108410 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy118.pExpr);
108411 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr);
108412 }
 
108413 break;
108414 case 234: /* case_exprlist ::= WHEN expr THEN expr */
 
108415 {
108416 yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
108417 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr);
108418 }
 
108419 break;
108420 case 243: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */
 
108421 {
108422 sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0,
108423 sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy322, yymsp[-9].minor.yy4,
108424 &yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy4);
108425 }
 
108426 break;
108427 case 244: /* uniqueflag ::= UNIQUE */
108428 case 298: /* raisetype ::= ABORT */ yytestcase(yyruleno==298);
 
108429 {yygotominor.yy4 = OE_Abort;}
 
108430 break;
108431 case 245: /* uniqueflag ::= */
 
108432 {yygotominor.yy4 = OE_None;}
 
108433 break;
108434 case 248: /* idxlist ::= idxlist COMMA nm collate sortorder */
 
108435 {
108436 Expr *p = 0;
108437 if( yymsp[-1].minor.yy0.n>0 ){
108438 p = sqlite3Expr(pParse->db, TK_COLUMN, 0);
108439 sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0);
@@ -108823,14 +108441,12 @@
108441 yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, p);
108442 sqlite3ExprListSetName(pParse,yygotominor.yy322,&yymsp[-2].minor.yy0,1);
108443 sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index");
108444 if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
108445 }
 
108446 break;
108447 case 249: /* idxlist ::= nm collate sortorder */
 
108448 {
108449 Expr *p = 0;
108450 if( yymsp[-1].minor.yy0.n>0 ){
108451 p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);
108452 sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0);
@@ -108838,307 +108454,214 @@
108454 yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, p);
108455 sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
108456 sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index");
108457 if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
108458 }
 
108459 break;
108460 case 250: /* collate ::= */
 
108461 {yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;}
 
108462 break;
108463 case 252: /* cmd ::= DROP INDEX ifexists fullname */
 
108464 {sqlite3DropIndex(pParse, yymsp[0].minor.yy259, yymsp[-1].minor.yy4);}
 
108465 break;
108466 case 253: /* cmd ::= VACUUM */
108467 case 254: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==254);
 
108468 {sqlite3Vacuum(pParse);}
 
108469 break;
108470 case 255: /* cmd ::= PRAGMA nm dbnm */
 
108471 {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
 
108472 break;
108473 case 256: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
 
108474 {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
 
108475 break;
108476 case 257: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
 
108477 {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
 
108478 break;
108479 case 258: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
 
108480 {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
 
108481 break;
108482 case 259: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
 
108483 {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
 
108484 break;
108485 case 270: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
 
108486 {
108487 Token all;
108488 all.z = yymsp[-3].minor.yy0.z;
108489 all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
108490 sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy203, &all);
108491 }
 
108492 break;
108493 case 271: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
 
108494 {
108495 sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy4, yymsp[-4].minor.yy90.a, yymsp[-4].minor.yy90.b, yymsp[-2].minor.yy259, yymsp[0].minor.yy314, yymsp[-10].minor.yy4, yymsp[-8].minor.yy4);
108496 yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0);
108497 }
 
108498 break;
108499 case 272: /* trigger_time ::= BEFORE */
108500 case 275: /* trigger_time ::= */ yytestcase(yyruleno==275);
 
108501 { yygotominor.yy4 = TK_BEFORE; }
 
108502 break;
108503 case 273: /* trigger_time ::= AFTER */
 
108504 { yygotominor.yy4 = TK_AFTER; }
 
108505 break;
108506 case 274: /* trigger_time ::= INSTEAD OF */
 
108507 { yygotominor.yy4 = TK_INSTEAD;}
 
108508 break;
108509 case 276: /* trigger_event ::= DELETE|INSERT */
108510 case 277: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==277);
 
108511 {yygotominor.yy90.a = yymsp[0].major; yygotominor.yy90.b = 0;}
 
108512 break;
108513 case 278: /* trigger_event ::= UPDATE OF inscollist */
 
108514 {yygotominor.yy90.a = TK_UPDATE; yygotominor.yy90.b = yymsp[0].minor.yy384;}
 
108515 break;
108516 case 281: /* when_clause ::= */
108517 case 303: /* key_opt ::= */ yytestcase(yyruleno==303);
 
108518 { yygotominor.yy314 = 0; }
 
108519 break;
108520 case 282: /* when_clause ::= WHEN expr */
108521 case 304: /* key_opt ::= KEY expr */ yytestcase(yyruleno==304);
 
108522 { yygotominor.yy314 = yymsp[0].minor.yy118.pExpr; }
 
108523 break;
108524 case 283: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
 
108525 {
108526 assert( yymsp[-2].minor.yy203!=0 );
108527 yymsp[-2].minor.yy203->pLast->pNext = yymsp[-1].minor.yy203;
108528 yymsp[-2].minor.yy203->pLast = yymsp[-1].minor.yy203;
108529 yygotominor.yy203 = yymsp[-2].minor.yy203;
108530 }
 
108531 break;
108532 case 284: /* trigger_cmd_list ::= trigger_cmd SEMI */
 
108533 {
108534 assert( yymsp[-1].minor.yy203!=0 );
108535 yymsp[-1].minor.yy203->pLast = yymsp[-1].minor.yy203;
108536 yygotominor.yy203 = yymsp[-1].minor.yy203;
108537 }
 
108538 break;
108539 case 286: /* trnm ::= nm DOT nm */
 
108540 {
108541 yygotominor.yy0 = yymsp[0].minor.yy0;
108542 sqlite3ErrorMsg(pParse,
108543 "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
108544 "statements within triggers");
108545 }
 
108546 break;
108547 case 288: /* tridxby ::= INDEXED BY nm */
 
108548 {
108549 sqlite3ErrorMsg(pParse,
108550 "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
108551 "within triggers");
108552 }
 
108553 break;
108554 case 289: /* tridxby ::= NOT INDEXED */
 
108555 {
108556 sqlite3ErrorMsg(pParse,
108557 "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
108558 "within triggers");
108559 }
 
108560 break;
108561 case 290: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */
 
108562 { yygotominor.yy203 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy322, yymsp[0].minor.yy314, yymsp[-5].minor.yy210); }
 
108563 break;
108564 case 291: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */
 
108565 {yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy384, yymsp[-1].minor.yy322, 0, yymsp[-7].minor.yy210);}
 
108566 break;
108567 case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */
 
108568 {yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy384, 0, yymsp[0].minor.yy387, yymsp[-4].minor.yy210);}
 
108569 break;
108570 case 293: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */
 
108571 {yygotominor.yy203 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy314);}
 
108572 break;
108573 case 294: /* trigger_cmd ::= select */
 
108574 {yygotominor.yy203 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy387); }
 
108575 break;
108576 case 295: /* expr ::= RAISE LP IGNORE RP */
 
108577 {
108578 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0);
108579 if( yygotominor.yy118.pExpr ){
108580 yygotominor.yy118.pExpr->affinity = OE_Ignore;
108581 }
108582 yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z;
108583 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108584 }
 
108585 break;
108586 case 296: /* expr ::= RAISE LP raisetype COMMA nm RP */
 
108587 {
108588 yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0);
108589 if( yygotominor.yy118.pExpr ) {
108590 yygotominor.yy118.pExpr->affinity = (char)yymsp[-3].minor.yy4;
108591 }
108592 yygotominor.yy118.zStart = yymsp[-5].minor.yy0.z;
108593 yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
108594 }
 
108595 break;
108596 case 297: /* raisetype ::= ROLLBACK */
 
108597 {yygotominor.yy4 = OE_Rollback;}
 
108598 break;
108599 case 299: /* raisetype ::= FAIL */
 
108600 {yygotominor.yy4 = OE_Fail;}
 
108601 break;
108602 case 300: /* cmd ::= DROP TRIGGER ifexists fullname */
 
108603 {
108604 sqlite3DropTrigger(pParse,yymsp[0].minor.yy259,yymsp[-1].minor.yy4);
108605 }
 
108606 break;
108607 case 301: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
 
108608 {
108609 sqlite3Attach(pParse, yymsp[-3].minor.yy118.pExpr, yymsp[-1].minor.yy118.pExpr, yymsp[0].minor.yy314);
108610 }
 
108611 break;
108612 case 302: /* cmd ::= DETACH database_kw_opt expr */
 
108613 {
108614 sqlite3Detach(pParse, yymsp[0].minor.yy118.pExpr);
108615 }
 
108616 break;
108617 case 307: /* cmd ::= REINDEX */
 
108618 {sqlite3Reindex(pParse, 0, 0);}
 
108619 break;
108620 case 308: /* cmd ::= REINDEX nm dbnm */
 
108621 {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
 
108622 break;
108623 case 309: /* cmd ::= ANALYZE */
 
108624 {sqlite3Analyze(pParse, 0, 0);}
 
108625 break;
108626 case 310: /* cmd ::= ANALYZE nm dbnm */
 
108627 {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
 
108628 break;
108629 case 311: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
 
108630 {
108631 sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy259,&yymsp[0].minor.yy0);
108632 }
 
108633 break;
108634 case 312: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */
 
108635 {
108636 sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0);
108637 }
 
108638 break;
108639 case 313: /* add_column_fullname ::= fullname */
 
108640 {
108641 pParse->db->lookaside.bEnabled = 0;
108642 sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy259);
108643 }
 
108644 break;
108645 case 316: /* cmd ::= create_vtab */
 
108646 {sqlite3VtabFinishParse(pParse,0);}
 
108647 break;
108648 case 317: /* cmd ::= create_vtab LP vtabarglist RP */
 
108649 {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
 
108650 break;
108651 case 318: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */
 
108652 {
108653 sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
108654 }
 
108655 break;
108656 case 321: /* vtabarg ::= */
 
108657 {sqlite3VtabArgInit(pParse);}
 
108658 break;
108659 case 323: /* vtabargtoken ::= ANY */
108660 case 324: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==324);
108661 case 325: /* lp ::= LP */ yytestcase(yyruleno==325);
 
108662 {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
 
108663 break;
108664 default:
108665 /* (0) input ::= cmdlist */ yytestcase(yyruleno==0);
108666 /* (1) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==1);
108667 /* (2) cmdlist ::= ecmd */ yytestcase(yyruleno==2);
@@ -109236,17 +108759,15 @@
108759 int yymajor, /* The major type of the error token */
108760 YYMINORTYPE yyminor /* The minor type of the error token */
108761 ){
108762 sqlite3ParserARG_FETCH;
108763 #define TOKEN (yyminor.yy0)
 
108764
108765 UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
108766 assert( TOKEN.z[0] ); /* The tokenizer always gives us a token */
108767 sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
108768 pParse->parseError = 1;
 
108769 sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
108770 }
108771
108772 /*
108773 ** The following is executed when the parser accepts
@@ -109436,11 +108957,10 @@
108957 return;
108958 }
108959
108960 /************** End of parse.c ***********************************************/
108961 /************** Begin file tokenize.c ****************************************/
 
108962 /*
108963 ** 2001 September 15
108964 **
108965 ** The author disclaims copyright to this source code. In place of
108966 ** a legal notice, here is a blessing:
@@ -109502,11 +109022,10 @@
109022 ** named keywordhash.h and then included into this source file by
109023 ** the #include below.
109024 */
109025 /************** Include keywordhash.h in the middle of tokenize.c ************/
109026 /************** Begin file keywordhash.h *************************************/
 
109027 /***** This file contains automatically generated code ******
109028 **
109029 ** The code in this file has been automatically generated by
109030 **
109031 ** sqlite/tool/mkkeywordhash.c
@@ -109776,11 +109295,10 @@
109295 }
109296 #define SQLITE_N_KEYWORD 121
109297
109298 /************** End of keywordhash.h *****************************************/
109299 /************** Continuing where we left off in tokenize.c *******************/
 
109300
109301
109302 /*
109303 ** If X is a character that can be used in an identifier then
109304 ** IdChar(X) will be true. Otherwise it is false.
@@ -110241,11 +109759,10 @@
109759 return nErr;
109760 }
109761
109762 /************** End of tokenize.c ********************************************/
109763 /************** Begin file complete.c ****************************************/
 
109764 /*
109765 ** 2001 September 15
109766 **
109767 ** The author disclaims copyright to this source code. In place of
109768 ** a legal notice, here is a blessing:
@@ -110527,11 +110044,10 @@
110044 #endif /* SQLITE_OMIT_UTF16 */
110045 #endif /* SQLITE_OMIT_COMPLETE */
110046
110047 /************** End of complete.c ********************************************/
110048 /************** Begin file main.c ********************************************/
 
110049 /*
110050 ** 2001 September 15
110051 **
110052 ** The author disclaims copyright to this source code. In place of
110053 ** a legal notice, here is a blessing:
@@ -110548,11 +110064,10 @@
110064 */
110065
110066 #ifdef SQLITE_ENABLE_FTS3
110067 /************** Include fts3.h in the middle of main.c ***********************/
110068 /************** Begin file fts3.h ********************************************/
 
110069 /*
110070 ** 2006 Oct 10
110071 **
110072 ** The author disclaims copyright to this source code. In place of
110073 ** a legal notice, here is a blessing:
@@ -110577,16 +110092,14 @@
110092 } /* extern "C" */
110093 #endif /* __cplusplus */
110094
110095 /************** End of fts3.h ************************************************/
110096 /************** Continuing where we left off in main.c ***********************/
 
110097 #endif
110098 #ifdef SQLITE_ENABLE_RTREE
110099 /************** Include rtree.h in the middle of main.c **********************/
110100 /************** Begin file rtree.h *******************************************/
 
110101 /*
110102 ** 2008 May 26
110103 **
110104 ** The author disclaims copyright to this source code. In place of
110105 ** a legal notice, here is a blessing:
@@ -110611,16 +110124,14 @@
110124 } /* extern "C" */
110125 #endif /* __cplusplus */
110126
110127 /************** End of rtree.h ***********************************************/
110128 /************** Continuing where we left off in main.c ***********************/
 
110129 #endif
110130 #ifdef SQLITE_ENABLE_ICU
110131 /************** Include sqliteicu.h in the middle of main.c ******************/
110132 /************** Begin file sqliteicu.h ***************************************/
 
110133 /*
110134 ** 2008 May 26
110135 **
110136 ** The author disclaims copyright to this source code. In place of
110137 ** a legal notice, here is a blessing:
@@ -110646,11 +110157,10 @@
110157 #endif /* __cplusplus */
110158
110159
110160 /************** End of sqliteicu.h *******************************************/
110161 /************** Continuing where we left off in main.c ***********************/
 
110162 #endif
110163
110164 #ifndef SQLITE_AMALGAMATION
110165 /* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant
110166 ** contains the text of SQLITE_VERSION macro.
@@ -113577,11 +113087,10 @@
113087 return 0;
113088 }
113089
113090 /************** End of main.c ************************************************/
113091 /************** Begin file notify.c ******************************************/
 
113092 /*
113093 ** 2009 March 3
113094 **
113095 ** The author disclaims copyright to this source code. In place of
113096 ** a legal notice, here is a blessing:
@@ -113911,11 +113420,10 @@
113420 }
113421 #endif
113422
113423 /************** End of notify.c **********************************************/
113424 /************** Begin file fts3.c ********************************************/
 
113425 /*
113426 ** 2006 Oct 10
113427 **
113428 ** The author disclaims copyright to this source code. In place of
113429 ** a legal notice, here is a blessing:
@@ -114208,11 +113716,10 @@
113716 ** into a single segment.
113717 */
113718
113719 /************** Include fts3Int.h in the middle of fts3.c ********************/
113720 /************** Begin file fts3Int.h *****************************************/
 
113721 /*
113722 ** 2009 Nov 12
113723 **
113724 ** The author disclaims copyright to this source code. In place of
113725 ** a legal notice, here is a blessing:
@@ -114247,11 +113754,10 @@
113754 SQLITE_API extern const sqlite3_api_routines *sqlite3_api;
113755 #endif
113756
113757 /************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/
113758 /************** Begin file fts3_tokenizer.h **********************************/
 
113759 /*
113760 ** 2006 July 10
113761 **
113762 ** The author disclaims copyright to this source code.
113763 **
@@ -114402,14 +113908,12 @@
113908
113909 #endif /* _FTS3_TOKENIZER_H_ */
113910
113911 /************** End of fts3_tokenizer.h **************************************/
113912 /************** Continuing where we left off in fts3Int.h ********************/
 
113913 /************** Include fts3_hash.h in the middle of fts3Int.h ***************/
113914 /************** Begin file fts3_hash.h ***************************************/
 
113915 /*
113916 ** 2001 September 22
113917 **
113918 ** The author disclaims copyright to this source code. In place of
113919 ** a legal notice, here is a blessing:
@@ -114521,11 +114025,10 @@
114025
114026 #endif /* _FTS3_HASH_H_ */
114027
114028 /************** End of fts3_hash.h *******************************************/
114029 /************** Continuing where we left off in fts3Int.h ********************/
 
114030
114031 /*
114032 ** This constant controls how often segments are merged. Once there are
114033 ** FTS3_MERGE_COUNT segments of level N, they are merged into a single
114034 ** segment of level N+1.
@@ -114998,11 +114501,10 @@
114501 #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
114502 #endif /* _FTSINT_H */
114503
114504 /************** End of fts3Int.h *********************************************/
114505 /************** Continuing where we left off in fts3.c ***********************/
 
114506 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
114507
114508 #if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)
114509 # define SQLITE_CORE 1
114510 #endif
@@ -119548,11 +119050,10 @@
119050
119051 #endif
119052
119053 /************** End of fts3.c ************************************************/
119054 /************** Begin file fts3_aux.c ****************************************/
 
119055 /*
119056 ** 2011 Jan 27
119057 **
119058 ** The author disclaims copyright to this source code. In place of
119059 ** a legal notice, here is a blessing:
@@ -120025,11 +119526,10 @@
119526
119527 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
119528
119529 /************** End of fts3_aux.c ********************************************/
119530 /************** Begin file fts3_expr.c ***************************************/
 
119531 /*
119532 ** 2008 Nov 28
119533 **
119534 ** The author disclaims copyright to this source code. In place of
119535 ** a legal notice, here is a blessing:
@@ -120992,11 +120492,10 @@
120492 #endif
120493 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
120494
120495 /************** End of fts3_expr.c *******************************************/
120496 /************** Begin file fts3_hash.c ***************************************/
 
120497 /*
120498 ** 2001 September 22
120499 **
120500 ** The author disclaims copyright to this source code. In place of
120501 ** a legal notice, here is a blessing:
@@ -121377,11 +120876,10 @@
120876
120877 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
120878
120879 /************** End of fts3_hash.c *******************************************/
120880 /************** Begin file fts3_porter.c *************************************/
 
120881 /*
120882 ** 2006 September 30
120883 **
120884 ** The author disclaims copyright to this source code. In place of
120885 ** a legal notice, here is a blessing:
@@ -122024,11 +121522,10 @@
121522
121523 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
121524
121525 /************** End of fts3_porter.c *****************************************/
121526 /************** Begin file fts3_tokenizer.c **********************************/
 
121527 /*
121528 ** 2007 June 22
121529 **
121530 ** The author disclaims copyright to this source code. In place of
121531 ** a legal notice, here is a blessing:
@@ -122516,11 +122013,10 @@
122013
122014 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
122015
122016 /************** End of fts3_tokenizer.c **************************************/
122017 /************** Begin file fts3_tokenizer1.c *********************************/
 
122018 /*
122019 ** 2006 Oct 10
122020 **
122021 ** The author disclaims copyright to this source code. In place of
122022 ** a legal notice, here is a blessing:
@@ -122751,11 +122247,10 @@
122247
122248 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
122249
122250 /************** End of fts3_tokenizer1.c *************************************/
122251 /************** Begin file fts3_write.c **************************************/
 
122252 /*
122253 ** 2009 Oct 23
122254 **
122255 ** The author disclaims copyright to this source code. In place of
122256 ** a legal notice, here is a blessing:
@@ -126022,11 +125517,10 @@
125517
125518 #endif
125519
125520 /************** End of fts3_write.c ******************************************/
125521 /************** Begin file fts3_snippet.c ************************************/
 
125522 /*
125523 ** 2009 Oct 23
125524 **
125525 ** The author disclaims copyright to this source code. In place of
125526 ** a legal notice, here is a blessing:
@@ -127524,11 +127018,10 @@
127018
127019 #endif
127020
127021 /************** End of fts3_snippet.c ****************************************/
127022 /************** Begin file rtree.c *******************************************/
 
127023 /*
127024 ** 2001 September 15
127025 **
127026 ** The author disclaims copyright to this source code. In place of
127027 ** a legal notice, here is a blessing:
@@ -130806,11 +130299,10 @@
130299
130300 #endif
130301
130302 /************** End of rtree.c ***********************************************/
130303 /************** Begin file icu.c *********************************************/
 
130304 /*
130305 ** 2007 May 6
130306 **
130307 ** The author disclaims copyright to this source code. In place of
130308 ** a legal notice, here is a blessing:
@@ -131309,11 +130801,10 @@
130801
130802 #endif
130803
130804 /************** End of icu.c *************************************************/
130805 /************** Begin file fts3_icu.c ****************************************/
 
130806 /*
130807 ** 2007 June 22
130808 **
130809 ** The author disclaims copyright to this source code. In place of
130810 ** a legal notice, here is a blessing:
130811
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110110
#define SQLITE_VERSION "3.7.8"
111111
#define SQLITE_VERSION_NUMBER 3007008
112
-#define SQLITE_SOURCE_ID "2011-09-14 13:41:40 a1f3aeeb0988c848d40ce8f6da6e902935a997e2"
112
+#define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
118118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.8"
111 #define SQLITE_VERSION_NUMBER 3007008
112 #define SQLITE_SOURCE_ID "2011-09-14 13:41:40 a1f3aeeb0988c848d40ce8f6da6e902935a997e2"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.8"
111 #define SQLITE_VERSION_NUMBER 3007008
112 #define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118

Keyboard Shortcuts

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