| | @@ -24,11 +24,10 @@ |
| 24 | 24 | #endif |
| 25 | 25 | #ifndef SQLITE_API |
| 26 | 26 | # define SQLITE_API |
| 27 | 27 | #endif |
| 28 | 28 | /************** Begin file sqliteInt.h ***************************************/ |
| 29 | | -#line 1 "tsrc/sqliteInt.h" |
| 30 | 29 | /* |
| 31 | 30 | ** 2001 September 15 |
| 32 | 31 | ** |
| 33 | 32 | ** The author disclaims copyright to this source code. In place of |
| 34 | 33 | ** a legal notice, here is a blessing: |
| | @@ -79,11 +78,10 @@ |
| 79 | 78 | #include "config.h" |
| 80 | 79 | #endif |
| 81 | 80 | |
| 82 | 81 | /************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/ |
| 83 | 82 | /************** Begin file sqliteLimit.h *************************************/ |
| 84 | | -#line 1 "tsrc/sqliteLimit.h" |
| 85 | 83 | /* |
| 86 | 84 | ** 2007 May 7 |
| 87 | 85 | ** |
| 88 | 86 | ** The author disclaims copyright to this source code. In place of |
| 89 | 87 | ** a legal notice, here is a blessing: |
| | @@ -291,11 +289,10 @@ |
| 291 | 289 | # define SQLITE_MAX_TRIGGER_DEPTH 1000 |
| 292 | 290 | #endif |
| 293 | 291 | |
| 294 | 292 | /************** End of sqliteLimit.h *****************************************/ |
| 295 | 293 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 296 | | -#line 54 "tsrc/sqliteInt.h" |
| 297 | 294 | |
| 298 | 295 | /* Disable nuisance warnings on Borland compilers */ |
| 299 | 296 | #if defined(__BORLANDC__) |
| 300 | 297 | #pragma warn -rch /* unreachable code */ |
| 301 | 298 | #pragma warn -ccc /* Condition is always true or false */ |
| | @@ -548,11 +545,10 @@ |
| 548 | 545 | # define unlikely(X) !!(X) |
| 549 | 546 | #endif |
| 550 | 547 | |
| 551 | 548 | /************** Include sqlite3.h in the middle of sqliteInt.h ***************/ |
| 552 | 549 | /************** Begin file sqlite3.h *****************************************/ |
| 553 | | -#line 1 "tsrc/sqlite3.h" |
| 554 | 550 | /* |
| 555 | 551 | ** 2001 September 15 |
| 556 | 552 | ** |
| 557 | 553 | ** The author disclaims copyright to this source code. In place of |
| 558 | 554 | ** a legal notice, here is a blessing: |
| | @@ -660,11 +656,11 @@ |
| 660 | 656 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 661 | 657 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 662 | 658 | */ |
| 663 | 659 | #define SQLITE_VERSION "3.7.8" |
| 664 | 660 | #define SQLITE_VERSION_NUMBER 3007008 |
| 665 | | -#define SQLITE_SOURCE_ID "2011-09-14 13:41:40 a1f3aeeb0988c848d40ce8f6da6e902935a997e2" |
| 661 | +#define SQLITE_SOURCE_ID "2011-09-19 14:49:19 3e0da808d2f5b4d12046e05980ca04578f581177" |
| 666 | 662 | |
| 667 | 663 | /* |
| 668 | 664 | ** CAPI3REF: Run-Time Library Version Numbers |
| 669 | 665 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 670 | 666 | ** |
| | @@ -7309,14 +7305,12 @@ |
| 7309 | 7305 | #endif /* ifndef _SQLITE3RTREE_H_ */ |
| 7310 | 7306 | |
| 7311 | 7307 | |
| 7312 | 7308 | /************** End of sqlite3.h *********************************************/ |
| 7313 | 7309 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 7314 | | -#line 309 "tsrc/sqliteInt.h" |
| 7315 | 7310 | /************** Include hash.h in the middle of sqliteInt.h ******************/ |
| 7316 | 7311 | /************** Begin file hash.h ********************************************/ |
| 7317 | | -#line 1 "tsrc/hash.h" |
| 7318 | 7312 | /* |
| 7319 | 7313 | ** 2001 September 22 |
| 7320 | 7314 | ** |
| 7321 | 7315 | ** The author disclaims copyright to this source code. In place of |
| 7322 | 7316 | ** a legal notice, here is a blessing: |
| | @@ -7412,14 +7406,12 @@ |
| 7412 | 7406 | |
| 7413 | 7407 | #endif /* _SQLITE_HASH_H_ */ |
| 7414 | 7408 | |
| 7415 | 7409 | /************** End of hash.h ************************************************/ |
| 7416 | 7410 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 7417 | | -#line 310 "tsrc/sqliteInt.h" |
| 7418 | 7411 | /************** Include parse.h in the middle of sqliteInt.h *****************/ |
| 7419 | 7412 | /************** Begin file parse.h *******************************************/ |
| 7420 | | -#line 1 "tsrc/parse.h" |
| 7421 | 7413 | #define TK_SEMI 1 |
| 7422 | 7414 | #define TK_EXPLAIN 2 |
| 7423 | 7415 | #define TK_QUERY 3 |
| 7424 | 7416 | #define TK_PLAN 4 |
| 7425 | 7417 | #define TK_BEGIN 5 |
| | @@ -7576,11 +7568,10 @@ |
| 7576 | 7568 | #define TK_UMINUS 156 |
| 7577 | 7569 | #define TK_UPLUS 157 |
| 7578 | 7570 | |
| 7579 | 7571 | /************** End of parse.h ***********************************************/ |
| 7580 | 7572 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 7581 | | -#line 311 "tsrc/sqliteInt.h" |
| 7582 | 7573 | #include <stdio.h> |
| 7583 | 7574 | #include <stdlib.h> |
| 7584 | 7575 | #include <string.h> |
| 7585 | 7576 | #include <assert.h> |
| 7586 | 7577 | #include <stddef.h> |
| | @@ -7920,11 +7911,10 @@ |
| 7920 | 7911 | ** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque |
| 7921 | 7912 | ** pointer types (i.e. FuncDef) defined above. |
| 7922 | 7913 | */ |
| 7923 | 7914 | /************** Include btree.h in the middle of sqliteInt.h *****************/ |
| 7924 | 7915 | /************** Begin file btree.h *******************************************/ |
| 7925 | | -#line 1 "tsrc/btree.h" |
| 7926 | 7916 | /* |
| 7927 | 7917 | ** 2001 September 15 |
| 7928 | 7918 | ** |
| 7929 | 7919 | ** The author disclaims copyright to this source code. In place of |
| 7930 | 7920 | ** a legal notice, here is a blessing: |
| | @@ -8165,14 +8155,12 @@ |
| 8165 | 8155 | |
| 8166 | 8156 | #endif /* _BTREE_H_ */ |
| 8167 | 8157 | |
| 8168 | 8158 | /************** End of btree.h ***********************************************/ |
| 8169 | 8159 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8170 | | -#line 653 "tsrc/sqliteInt.h" |
| 8171 | 8160 | /************** Include vdbe.h in the middle of sqliteInt.h ******************/ |
| 8172 | 8161 | /************** Begin file vdbe.h ********************************************/ |
| 8173 | | -#line 1 "tsrc/vdbe.h" |
| 8174 | 8162 | /* |
| 8175 | 8163 | ** 2001 September 15 |
| 8176 | 8164 | ** |
| 8177 | 8165 | ** The author disclaims copyright to this source code. In place of |
| 8178 | 8166 | ** a legal notice, here is a blessing: |
| | @@ -8333,11 +8321,10 @@ |
| 8333 | 8321 | ** The makefile scans the vdbe.c source file and creates the "opcodes.h" |
| 8334 | 8322 | ** header file that defines a number for each opcode used by the VDBE. |
| 8335 | 8323 | */ |
| 8336 | 8324 | /************** Include opcodes.h in the middle of vdbe.h ********************/ |
| 8337 | 8325 | /************** Begin file opcodes.h *****************************************/ |
| 8338 | | -#line 1 "tsrc/opcodes.h" |
| 8339 | 8326 | /* Automatically generated. Do not edit */ |
| 8340 | 8327 | /* See the mkopcodeh.awk script for details */ |
| 8341 | 8328 | #define OP_Goto 1 |
| 8342 | 8329 | #define OP_Gosub 2 |
| 8343 | 8330 | #define OP_Return 3 |
| | @@ -8387,108 +8374,109 @@ |
| 8387 | 8374 | #define OP_Jump 25 |
| 8388 | 8375 | #define OP_And 69 /* same as TK_AND */ |
| 8389 | 8376 | #define OP_Or 68 /* same as TK_OR */ |
| 8390 | 8377 | #define OP_Not 19 /* same as TK_NOT */ |
| 8391 | 8378 | #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 |
| 8394 | 8382 | #define OP_IsNull 73 /* same as TK_ISNULL */ |
| 8395 | 8383 | #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 |
| 8490 | 8478 | |
| 8491 | 8479 | |
| 8492 | 8480 | /* Properties such as "out2" or "jump" that are specified in |
| 8493 | 8481 | ** comments following the "case" for each opcode in the vdbe.c |
| 8494 | 8482 | ** are encoded into bitvectors as follows: |
| | @@ -8502,30 +8490,29 @@ |
| 8502 | 8490 | #define OPFLG_OUT3 0x0040 /* out3: P3 is an output */ |
| 8503 | 8491 | #define OPFLG_INITIALIZER {\ |
| 8504 | 8492 | /* 0 */ 0x00, 0x01, 0x05, 0x04, 0x04, 0x10, 0x00, 0x02,\ |
| 8505 | 8493 | /* 8 */ 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x24, 0x24,\ |
| 8506 | 8494 | /* 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,\ |
| 8513 | 8501 | /* 72 */ 0x01, 0x05, 0x05, 0x15, 0x15, 0x15, 0x15, 0x15,\ |
| 8514 | 8502 | /* 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,} |
| 8523 | 8511 | |
| 8524 | 8512 | /************** End of opcodes.h *********************************************/ |
| 8525 | 8513 | /************** Continuing where we left off in vdbe.h ***********************/ |
| 8526 | | -#line 164 "tsrc/vdbe.h" |
| 8527 | 8514 | |
| 8528 | 8515 | /* |
| 8529 | 8516 | ** Prototypes for the VDBE interface. See comments on the implementation |
| 8530 | 8517 | ** for a description of what each of these routines does. |
| 8531 | 8518 | */ |
| | @@ -8541,11 +8528,11 @@ |
| 8541 | 8528 | SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1); |
| 8542 | 8529 | SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2); |
| 8543 | 8530 | SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3); |
| 8544 | 8531 | SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5); |
| 8545 | 8532 | 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); |
| 8547 | 8534 | SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N); |
| 8548 | 8535 | SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int); |
| 8549 | 8536 | SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int); |
| 8550 | 8537 | SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*); |
| 8551 | 8538 | SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*); |
| | @@ -8596,14 +8583,12 @@ |
| 8596 | 8583 | |
| 8597 | 8584 | #endif |
| 8598 | 8585 | |
| 8599 | 8586 | /************** End of vdbe.h ************************************************/ |
| 8600 | 8587 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8601 | | -#line 654 "tsrc/sqliteInt.h" |
| 8602 | 8588 | /************** Include pager.h in the middle of sqliteInt.h *****************/ |
| 8603 | 8589 | /************** Begin file pager.h *******************************************/ |
| 8604 | | -#line 1 "tsrc/pager.h" |
| 8605 | 8590 | /* |
| 8606 | 8591 | ** 2001 September 15 |
| 8607 | 8592 | ** |
| 8608 | 8593 | ** The author disclaims copyright to this source code. In place of |
| 8609 | 8594 | ** a legal notice, here is a blessing: |
| | @@ -8662,11 +8647,10 @@ |
| 8662 | 8647 | ** NOTE: These values must match the corresponding BTREE_ values in btree.h. |
| 8663 | 8648 | */ |
| 8664 | 8649 | #define PAGER_OMIT_JOURNAL 0x0001 /* Do not use a rollback journal */ |
| 8665 | 8650 | #define PAGER_NO_READLOCK 0x0002 /* Omit readlocks on readonly files */ |
| 8666 | 8651 | #define PAGER_MEMORY 0x0004 /* In-memory database */ |
| 8667 | | -#define PAGER_SORTER 0x0020 /* Accumulator in external merge sort */ |
| 8668 | 8652 | |
| 8669 | 8653 | /* |
| 8670 | 8654 | ** Valid values for the second argument to sqlite3PagerLockingMode(). |
| 8671 | 8655 | */ |
| 8672 | 8656 | #define PAGER_LOCKINGMODE_QUERY -1 |
| | @@ -8785,14 +8769,12 @@ |
| 8785 | 8769 | |
| 8786 | 8770 | #endif /* _PAGER_H_ */ |
| 8787 | 8771 | |
| 8788 | 8772 | /************** End of pager.h ***********************************************/ |
| 8789 | 8773 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8790 | | -#line 655 "tsrc/sqliteInt.h" |
| 8791 | 8774 | /************** Include pcache.h in the middle of sqliteInt.h ****************/ |
| 8792 | 8775 | /************** Begin file pcache.h ******************************************/ |
| 8793 | | -#line 1 "tsrc/pcache.h" |
| 8794 | 8776 | /* |
| 8795 | 8777 | ** 2008 August 05 |
| 8796 | 8778 | ** |
| 8797 | 8779 | ** The author disclaims copyright to this source code. In place of |
| 8798 | 8780 | ** a legal notice, here is a blessing: |
| | @@ -8947,15 +8929,13 @@ |
| 8947 | 8929 | |
| 8948 | 8930 | #endif /* _PCACHE_H_ */ |
| 8949 | 8931 | |
| 8950 | 8932 | /************** End of pcache.h **********************************************/ |
| 8951 | 8933 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8952 | | -#line 656 "tsrc/sqliteInt.h" |
| 8953 | 8934 | |
| 8954 | 8935 | /************** Include os.h in the middle of sqliteInt.h ********************/ |
| 8955 | 8936 | /************** Begin file os.h **********************************************/ |
| 8956 | | -#line 1 "tsrc/os.h" |
| 8957 | 8937 | /* |
| 8958 | 8938 | ** 2001 September 16 |
| 8959 | 8939 | ** |
| 8960 | 8940 | ** The author disclaims copyright to this source code. In place of |
| 8961 | 8941 | ** a legal notice, here is a blessing: |
| | @@ -9234,14 +9214,12 @@ |
| 9234 | 9214 | |
| 9235 | 9215 | #endif /* _SQLITE_OS_H_ */ |
| 9236 | 9216 | |
| 9237 | 9217 | /************** End of os.h **************************************************/ |
| 9238 | 9218 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 9239 | | -#line 658 "tsrc/sqliteInt.h" |
| 9240 | 9219 | /************** Include mutex.h in the middle of sqliteInt.h *****************/ |
| 9241 | 9220 | /************** Begin file mutex.h *******************************************/ |
| 9242 | | -#line 1 "tsrc/mutex.h" |
| 9243 | 9221 | /* |
| 9244 | 9222 | ** 2007 August 28 |
| 9245 | 9223 | ** |
| 9246 | 9224 | ** The author disclaims copyright to this source code. In place of |
| 9247 | 9225 | ** a legal notice, here is a blessing: |
| | @@ -9312,11 +9290,10 @@ |
| 9312 | 9290 | #define sqlite3MutexEnd() |
| 9313 | 9291 | #endif /* defined(SQLITE_MUTEX_OMIT) */ |
| 9314 | 9292 | |
| 9315 | 9293 | /************** End of mutex.h ***********************************************/ |
| 9316 | 9294 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 9317 | | -#line 659 "tsrc/sqliteInt.h" |
| 9318 | 9295 | |
| 9319 | 9296 | |
| 9320 | 9297 | /* |
| 9321 | 9298 | ** Each database file to be accessed by the system is an instance |
| 9322 | 9299 | ** of the following structure. There are normally two of these structures |
| | @@ -10509,11 +10486,12 @@ |
| 10509 | 10486 | char *zDatabase; /* Name of database holding this table */ |
| 10510 | 10487 | char *zName; /* Name of the table */ |
| 10511 | 10488 | char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */ |
| 10512 | 10489 | Table *pTab; /* An SQL table corresponding to zName */ |
| 10513 | 10490 | Select *pSelect; /* A SELECT statement used in place of a table name */ |
| 10514 | | - u8 isPopulated; /* Temporary table associated with SELECT is populated */ |
| 10491 | + int addrFillSub; /* Address of subroutine to manifest a subquery */ |
| 10492 | + int regReturn; /* Register holding return address of addrFillSub */ |
| 10515 | 10493 | u8 jointype; /* Type of join between this able and the previous */ |
| 10516 | 10494 | u8 notIndexed; /* True if there is a NOT INDEXED clause */ |
| 10517 | 10495 | u8 isCorrelated; /* True if sub-query is correlated */ |
| 10518 | 10496 | #ifndef SQLITE_OMIT_EXPLAIN |
| 10519 | 10497 | u8 iSelectId; /* If pSelect!=0, the id of the sub-select in EQP */ |
| | @@ -11915,11 +11893,10 @@ |
| 11915 | 11893 | |
| 11916 | 11894 | #endif /* _SQLITEINT_H_ */ |
| 11917 | 11895 | |
| 11918 | 11896 | /************** End of sqliteInt.h *******************************************/ |
| 11919 | 11897 | /************** Begin file global.c ******************************************/ |
| 11920 | | -#line 1 "tsrc/global.c" |
| 11921 | 11898 | /* |
| 11922 | 11899 | ** 2008 June 13 |
| 11923 | 11900 | ** |
| 11924 | 11901 | ** The author disclaims copyright to this source code. In place of |
| 11925 | 11902 | ** a legal notice, here is a blessing: |
| | @@ -12060,11 +12037,11 @@ |
| 12060 | 12037 | SQLITE_DEFAULT_MEMSTATUS, /* bMemstat */ |
| 12061 | 12038 | 1, /* bCoreMutex */ |
| 12062 | 12039 | SQLITE_THREADSAFE==1, /* bFullMutex */ |
| 12063 | 12040 | SQLITE_USE_URI, /* bOpenUri */ |
| 12064 | 12041 | 0x7ffffffe, /* mxStrlen */ |
| 12065 | | - 100, /* szLookaside */ |
| 12042 | + 128, /* szLookaside */ |
| 12066 | 12043 | 500, /* nLookaside */ |
| 12067 | 12044 | {0,0,0,0,0,0,0,0}, /* m */ |
| 12068 | 12045 | {0,0,0,0,0,0,0,0,0}, /* mutex */ |
| 12069 | 12046 | {0,0,0,0,0,0,0,0,0,0,0}, /* pcache */ |
| 12070 | 12047 | (void*)0, /* pHeap */ |
| | @@ -12138,11 +12115,10 @@ |
| 12138 | 12115 | */ |
| 12139 | 12116 | SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER; |
| 12140 | 12117 | |
| 12141 | 12118 | /************** End of global.c **********************************************/ |
| 12142 | 12119 | /************** Begin file ctime.c *******************************************/ |
| 12143 | | -#line 1 "tsrc/ctime.c" |
| 12144 | 12120 | /* |
| 12145 | 12121 | ** 2010 February 23 |
| 12146 | 12122 | ** |
| 12147 | 12123 | ** The author disclaims copyright to this source code. In place of |
| 12148 | 12124 | ** a legal notice, here is a blessing: |
| | @@ -12543,11 +12519,10 @@ |
| 12543 | 12519 | |
| 12544 | 12520 | #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ |
| 12545 | 12521 | |
| 12546 | 12522 | /************** End of ctime.c ***********************************************/ |
| 12547 | 12523 | /************** Begin file status.c ******************************************/ |
| 12548 | | -#line 1 "tsrc/status.c" |
| 12549 | 12524 | /* |
| 12550 | 12525 | ** 2008 June 18 |
| 12551 | 12526 | ** |
| 12552 | 12527 | ** The author disclaims copyright to this source code. In place of |
| 12553 | 12528 | ** a legal notice, here is a blessing: |
| | @@ -12561,11 +12536,10 @@ |
| 12561 | 12536 | ** This module implements the sqlite3_status() interface and related |
| 12562 | 12537 | ** functionality. |
| 12563 | 12538 | */ |
| 12564 | 12539 | /************** Include vdbeInt.h in the middle of status.c ******************/ |
| 12565 | 12540 | /************** Begin file vdbeInt.h *****************************************/ |
| 12566 | | -#line 1 "tsrc/vdbeInt.h" |
| 12567 | 12541 | /* |
| 12568 | 12542 | ** 2003 September 6 |
| 12569 | 12543 | ** |
| 12570 | 12544 | ** The author disclaims copyright to this source code. In place of |
| 12571 | 12545 | ** a legal notice, here is a blessing: |
| | @@ -13013,11 +12987,10 @@ |
| 13013 | 12987 | |
| 13014 | 12988 | #endif /* !defined(_VDBEINT_H_) */ |
| 13015 | 12989 | |
| 13016 | 12990 | /************** End of vdbeInt.h *********************************************/ |
| 13017 | 12991 | /************** Continuing where we left off in status.c *********************/ |
| 13018 | | -#line 18 "tsrc/status.c" |
| 13019 | 12992 | |
| 13020 | 12993 | /* |
| 13021 | 12994 | ** Variables in which to record status information. |
| 13022 | 12995 | */ |
| 13023 | 12996 | typedef struct sqlite3StatType sqlite3StatType; |
| | @@ -13227,11 +13200,10 @@ |
| 13227 | 13200 | return rc; |
| 13228 | 13201 | } |
| 13229 | 13202 | |
| 13230 | 13203 | /************** End of status.c **********************************************/ |
| 13231 | 13204 | /************** Begin file date.c ********************************************/ |
| 13232 | | -#line 1 "tsrc/date.c" |
| 13233 | 13205 | /* |
| 13234 | 13206 | ** 2003 October 31 |
| 13235 | 13207 | ** |
| 13236 | 13208 | ** The author disclaims copyright to this source code. In place of |
| 13237 | 13209 | ** a legal notice, here is a blessing: |
| | @@ -14355,11 +14327,10 @@ |
| 14355 | 14327 | } |
| 14356 | 14328 | } |
| 14357 | 14329 | |
| 14358 | 14330 | /************** End of date.c ************************************************/ |
| 14359 | 14331 | /************** Begin file os.c **********************************************/ |
| 14360 | | -#line 1 "tsrc/os.c" |
| 14361 | 14332 | /* |
| 14362 | 14333 | ** 2005 November 29 |
| 14363 | 14334 | ** |
| 14364 | 14335 | ** The author disclaims copyright to this source code. In place of |
| 14365 | 14336 | ** a legal notice, here is a blessing: |
| | @@ -14565,11 +14536,11 @@ |
| 14565 | 14536 | int flags, |
| 14566 | 14537 | int *pOutFlags |
| 14567 | 14538 | ){ |
| 14568 | 14539 | int rc = SQLITE_NOMEM; |
| 14569 | 14540 | sqlite3_file *pFile; |
| 14570 | | - pFile = (sqlite3_file *)sqlite3Malloc(pVfs->szOsFile); |
| 14541 | + pFile = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile); |
| 14571 | 14542 | if( pFile ){ |
| 14572 | 14543 | rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags); |
| 14573 | 14544 | if( rc!=SQLITE_OK ){ |
| 14574 | 14545 | sqlite3_free(pFile); |
| 14575 | 14546 | }else{ |
| | @@ -14689,11 +14660,10 @@ |
| 14689 | 14660 | return SQLITE_OK; |
| 14690 | 14661 | } |
| 14691 | 14662 | |
| 14692 | 14663 | /************** End of os.c **************************************************/ |
| 14693 | 14664 | /************** Begin file fault.c *******************************************/ |
| 14694 | | -#line 1 "tsrc/fault.c" |
| 14695 | 14665 | /* |
| 14696 | 14666 | ** 2008 Jan 22 |
| 14697 | 14667 | ** |
| 14698 | 14668 | ** The author disclaims copyright to this source code. In place of |
| 14699 | 14669 | ** a legal notice, here is a blessing: |
| | @@ -14779,11 +14749,10 @@ |
| 14779 | 14749 | |
| 14780 | 14750 | #endif /* #ifndef SQLITE_OMIT_BUILTIN_TEST */ |
| 14781 | 14751 | |
| 14782 | 14752 | /************** End of fault.c ***********************************************/ |
| 14783 | 14753 | /************** Begin file mem0.c ********************************************/ |
| 14784 | | -#line 1 "tsrc/mem0.c" |
| 14785 | 14754 | /* |
| 14786 | 14755 | ** 2008 October 28 |
| 14787 | 14756 | ** |
| 14788 | 14757 | ** The author disclaims copyright to this source code. In place of |
| 14789 | 14758 | ** a legal notice, here is a blessing: |
| | @@ -14841,11 +14810,10 @@ |
| 14841 | 14810 | |
| 14842 | 14811 | #endif /* SQLITE_ZERO_MALLOC */ |
| 14843 | 14812 | |
| 14844 | 14813 | /************** End of mem0.c ************************************************/ |
| 14845 | 14814 | /************** Begin file mem1.c ********************************************/ |
| 14846 | | -#line 1 "tsrc/mem1.c" |
| 14847 | 14815 | /* |
| 14848 | 14816 | ** 2007 August 14 |
| 14849 | 14817 | ** |
| 14850 | 14818 | ** The author disclaims copyright to this source code. In place of |
| 14851 | 14819 | ** a legal notice, here is a blessing: |
| | @@ -14994,11 +14962,10 @@ |
| 14994 | 14962 | |
| 14995 | 14963 | #endif /* SQLITE_SYSTEM_MALLOC */ |
| 14996 | 14964 | |
| 14997 | 14965 | /************** End of mem1.c ************************************************/ |
| 14998 | 14966 | /************** Begin file mem2.c ********************************************/ |
| 14999 | | -#line 1 "tsrc/mem2.c" |
| 15000 | 14967 | /* |
| 15001 | 14968 | ** 2007 August 15 |
| 15002 | 14969 | ** |
| 15003 | 14970 | ** The author disclaims copyright to this source code. In place of |
| 15004 | 14971 | ** a legal notice, here is a blessing: |
| | @@ -15525,11 +15492,10 @@ |
| 15525 | 15492 | |
| 15526 | 15493 | #endif /* SQLITE_MEMDEBUG */ |
| 15527 | 15494 | |
| 15528 | 15495 | /************** End of mem2.c ************************************************/ |
| 15529 | 15496 | /************** Begin file mem3.c ********************************************/ |
| 15530 | | -#line 1 "tsrc/mem3.c" |
| 15531 | 15497 | /* |
| 15532 | 15498 | ** 2007 October 14 |
| 15533 | 15499 | ** |
| 15534 | 15500 | ** The author disclaims copyright to this source code. In place of |
| 15535 | 15501 | ** a legal notice, here is a blessing: |
| | @@ -16215,11 +16181,10 @@ |
| 16215 | 16181 | |
| 16216 | 16182 | #endif /* SQLITE_ENABLE_MEMSYS3 */ |
| 16217 | 16183 | |
| 16218 | 16184 | /************** End of mem3.c ************************************************/ |
| 16219 | 16185 | /************** Begin file mem5.c ********************************************/ |
| 16220 | | -#line 1 "tsrc/mem5.c" |
| 16221 | 16186 | /* |
| 16222 | 16187 | ** 2007 October 14 |
| 16223 | 16188 | ** |
| 16224 | 16189 | ** The author disclaims copyright to this source code. In place of |
| 16225 | 16190 | ** a legal notice, here is a blessing: |
| | @@ -16799,11 +16764,10 @@ |
| 16799 | 16764 | |
| 16800 | 16765 | #endif /* SQLITE_ENABLE_MEMSYS5 */ |
| 16801 | 16766 | |
| 16802 | 16767 | /************** End of mem5.c ************************************************/ |
| 16803 | 16768 | /************** Begin file mutex.c *******************************************/ |
| 16804 | | -#line 1 "tsrc/mutex.c" |
| 16805 | 16769 | /* |
| 16806 | 16770 | ** 2007 August 14 |
| 16807 | 16771 | ** |
| 16808 | 16772 | ** The author disclaims copyright to this source code. In place of |
| 16809 | 16773 | ** a legal notice, here is a blessing: |
| | @@ -16955,11 +16919,10 @@ |
| 16955 | 16919 | |
| 16956 | 16920 | #endif /* SQLITE_MUTEX_OMIT */ |
| 16957 | 16921 | |
| 16958 | 16922 | /************** End of mutex.c ***********************************************/ |
| 16959 | 16923 | /************** Begin file mutex_noop.c **************************************/ |
| 16960 | | -#line 1 "tsrc/mutex_noop.c" |
| 16961 | 16924 | /* |
| 16962 | 16925 | ** 2008 October 07 |
| 16963 | 16926 | ** |
| 16964 | 16927 | ** The author disclaims copyright to this source code. In place of |
| 16965 | 16928 | ** a legal notice, here is a blessing: |
| | @@ -17164,11 +17127,10 @@ |
| 17164 | 17127 | #endif /* SQLITE_MUTEX_NOOP */ |
| 17165 | 17128 | #endif /* SQLITE_MUTEX_OMIT */ |
| 17166 | 17129 | |
| 17167 | 17130 | /************** End of mutex_noop.c ******************************************/ |
| 17168 | 17131 | /************** Begin file mutex_os2.c ***************************************/ |
| 17169 | | -#line 1 "tsrc/mutex_os2.c" |
| 17170 | 17132 | /* |
| 17171 | 17133 | ** 2007 August 28 |
| 17172 | 17134 | ** |
| 17173 | 17135 | ** The author disclaims copyright to this source code. In place of |
| 17174 | 17136 | ** a legal notice, here is a blessing: |
| | @@ -17441,11 +17403,10 @@ |
| 17441 | 17403 | } |
| 17442 | 17404 | #endif /* SQLITE_MUTEX_OS2 */ |
| 17443 | 17405 | |
| 17444 | 17406 | /************** End of mutex_os2.c *******************************************/ |
| 17445 | 17407 | /************** Begin file mutex_unix.c **************************************/ |
| 17446 | | -#line 1 "tsrc/mutex_unix.c" |
| 17447 | 17408 | /* |
| 17448 | 17409 | ** 2007 August 28 |
| 17449 | 17410 | ** |
| 17450 | 17411 | ** The author disclaims copyright to this source code. In place of |
| 17451 | 17412 | ** a legal notice, here is a blessing: |
| | @@ -17795,11 +17756,10 @@ |
| 17795 | 17756 | |
| 17796 | 17757 | #endif /* SQLITE_MUTEX_PTHREAD */ |
| 17797 | 17758 | |
| 17798 | 17759 | /************** End of mutex_unix.c ******************************************/ |
| 17799 | 17760 | /************** Begin file mutex_w32.c ***************************************/ |
| 17800 | | -#line 1 "tsrc/mutex_w32.c" |
| 17801 | 17761 | /* |
| 17802 | 17762 | ** 2007 August 14 |
| 17803 | 17763 | ** |
| 17804 | 17764 | ** The author disclaims copyright to this source code. In place of |
| 17805 | 17765 | ** a legal notice, here is a blessing: |
| | @@ -18130,11 +18090,10 @@ |
| 18130 | 18090 | } |
| 18131 | 18091 | #endif /* SQLITE_MUTEX_W32 */ |
| 18132 | 18092 | |
| 18133 | 18093 | /************** End of mutex_w32.c *******************************************/ |
| 18134 | 18094 | /************** Begin file malloc.c ******************************************/ |
| 18135 | | -#line 1 "tsrc/malloc.c" |
| 18136 | 18095 | /* |
| 18137 | 18096 | ** 2001 September 15 |
| 18138 | 18097 | ** |
| 18139 | 18098 | ** The author disclaims copyright to this source code. In place of |
| 18140 | 18099 | ** a legal notice, here is a blessing: |
| | @@ -18910,11 +18869,10 @@ |
| 18910 | 18869 | return rc & (db ? db->errMask : 0xff); |
| 18911 | 18870 | } |
| 18912 | 18871 | |
| 18913 | 18872 | /************** End of malloc.c **********************************************/ |
| 18914 | 18873 | /************** Begin file printf.c ******************************************/ |
| 18915 | | -#line 1 "tsrc/printf.c" |
| 18916 | 18874 | /* |
| 18917 | 18875 | ** The "printf" code that follows dates from the 1980's. It is in |
| 18918 | 18876 | ** the public domain. The original comments are included here for |
| 18919 | 18877 | ** completeness. They are very out-of-date but might be useful as |
| 18920 | 18878 | ** an historical reference. Most of the "enhancements" have been backed |
| | @@ -19942,11 +19900,10 @@ |
| 19942 | 19900 | } |
| 19943 | 19901 | #endif |
| 19944 | 19902 | |
| 19945 | 19903 | /************** End of printf.c **********************************************/ |
| 19946 | 19904 | /************** Begin file random.c ******************************************/ |
| 19947 | | -#line 1 "tsrc/random.c" |
| 19948 | 19905 | /* |
| 19949 | 19906 | ** 2001 September 15 |
| 19950 | 19907 | ** |
| 19951 | 19908 | ** The author disclaims copyright to this source code. In place of |
| 19952 | 19909 | ** a legal notice, here is a blessing: |
| | @@ -20090,11 +20047,10 @@ |
| 20090 | 20047 | } |
| 20091 | 20048 | #endif /* SQLITE_OMIT_BUILTIN_TEST */ |
| 20092 | 20049 | |
| 20093 | 20050 | /************** End of random.c **********************************************/ |
| 20094 | 20051 | /************** Begin file utf.c *********************************************/ |
| 20095 | | -#line 1 "tsrc/utf.c" |
| 20096 | 20052 | /* |
| 20097 | 20053 | ** 2004 April 13 |
| 20098 | 20054 | ** |
| 20099 | 20055 | ** The author disclaims copyright to this source code. In place of |
| 20100 | 20056 | ** a legal notice, here is a blessing: |
| | @@ -20652,11 +20608,10 @@ |
| 20652 | 20608 | #endif /* SQLITE_TEST */ |
| 20653 | 20609 | #endif /* SQLITE_OMIT_UTF16 */ |
| 20654 | 20610 | |
| 20655 | 20611 | /************** End of utf.c *************************************************/ |
| 20656 | 20612 | /************** Begin file util.c ********************************************/ |
| 20657 | | -#line 1 "tsrc/util.c" |
| 20658 | 20613 | /* |
| 20659 | 20614 | ** 2001 September 15 |
| 20660 | 20615 | ** |
| 20661 | 20616 | ** The author disclaims copyright to this source code. In place of |
| 20662 | 20617 | ** a legal notice, here is a blessing: |
| | @@ -21835,11 +21790,10 @@ |
| 21835 | 21790 | } |
| 21836 | 21791 | #endif |
| 21837 | 21792 | |
| 21838 | 21793 | /************** End of util.c ************************************************/ |
| 21839 | 21794 | /************** Begin file hash.c ********************************************/ |
| 21840 | | -#line 1 "tsrc/hash.c" |
| 21841 | 21795 | /* |
| 21842 | 21796 | ** 2001 September 22 |
| 21843 | 21797 | ** |
| 21844 | 21798 | ** The author disclaims copyright to this source code. In place of |
| 21845 | 21799 | ** a legal notice, here is a blessing: |
| | @@ -22115,11 +22069,10 @@ |
| 22115 | 22069 | return 0; |
| 22116 | 22070 | } |
| 22117 | 22071 | |
| 22118 | 22072 | /************** End of hash.c ************************************************/ |
| 22119 | 22073 | /************** Begin file opcodes.c *****************************************/ |
| 22120 | | -#line 1 "tsrc/opcodes.c" |
| 22121 | 22074 | /* Automatically generated. Do not edit */ |
| 22122 | 22075 | /* See the mkopcodec.awk script for details. */ |
| 22123 | 22076 | #if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG) |
| 22124 | 22077 | SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){ |
| 22125 | 22078 | static const char *const azName[] = { "?", |
| | @@ -22146,66 +22099,66 @@ |
| 22146 | 22099 | /* 21 */ "MustBeInt", |
| 22147 | 22100 | /* 22 */ "RealAffinity", |
| 22148 | 22101 | /* 23 */ "Permutation", |
| 22149 | 22102 | /* 24 */ "Compare", |
| 22150 | 22103 | /* 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", |
| 22104 | + /* 26 */ "Once", |
| 22105 | + /* 27 */ "If", |
| 22106 | + /* 28 */ "IfNot", |
| 22107 | + /* 29 */ "Column", |
| 22108 | + /* 30 */ "Affinity", |
| 22109 | + /* 31 */ "MakeRecord", |
| 22110 | + /* 32 */ "Count", |
| 22111 | + /* 33 */ "Savepoint", |
| 22112 | + /* 34 */ "AutoCommit", |
| 22113 | + /* 35 */ "Transaction", |
| 22114 | + /* 36 */ "ReadCookie", |
| 22115 | + /* 37 */ "SetCookie", |
| 22116 | + /* 38 */ "VerifyCookie", |
| 22117 | + /* 39 */ "OpenRead", |
| 22118 | + /* 40 */ "OpenWrite", |
| 22119 | + /* 41 */ "OpenAutoindex", |
| 22120 | + /* 42 */ "OpenEphemeral", |
| 22121 | + /* 43 */ "SorterOpen", |
| 22122 | + /* 44 */ "OpenPseudo", |
| 22123 | + /* 45 */ "Close", |
| 22124 | + /* 46 */ "SeekLt", |
| 22125 | + /* 47 */ "SeekLe", |
| 22126 | + /* 48 */ "SeekGe", |
| 22127 | + /* 49 */ "SeekGt", |
| 22128 | + /* 50 */ "Seek", |
| 22129 | + /* 51 */ "NotFound", |
| 22130 | + /* 52 */ "Found", |
| 22131 | + /* 53 */ "IsUnique", |
| 22132 | + /* 54 */ "NotExists", |
| 22133 | + /* 55 */ "Sequence", |
| 22134 | + /* 56 */ "NewRowid", |
| 22135 | + /* 57 */ "Insert", |
| 22136 | + /* 58 */ "InsertInt", |
| 22137 | + /* 59 */ "Delete", |
| 22138 | + /* 60 */ "ResetCount", |
| 22139 | + /* 61 */ "SorterCompare", |
| 22140 | + /* 62 */ "SorterData", |
| 22141 | + /* 63 */ "RowKey", |
| 22142 | + /* 64 */ "RowData", |
| 22143 | + /* 65 */ "Rowid", |
| 22144 | + /* 66 */ "NullRow", |
| 22145 | + /* 67 */ "Last", |
| 22193 | 22146 | /* 68 */ "Or", |
| 22194 | 22147 | /* 69 */ "And", |
| 22195 | | - /* 70 */ "Sort", |
| 22196 | | - /* 71 */ "Rewind", |
| 22197 | | - /* 72 */ "SorterNext", |
| 22148 | + /* 70 */ "SorterSort", |
| 22149 | + /* 71 */ "Sort", |
| 22150 | + /* 72 */ "Rewind", |
| 22198 | 22151 | /* 73 */ "IsNull", |
| 22199 | 22152 | /* 74 */ "NotNull", |
| 22200 | 22153 | /* 75 */ "Ne", |
| 22201 | 22154 | /* 76 */ "Eq", |
| 22202 | 22155 | /* 77 */ "Gt", |
| 22203 | 22156 | /* 78 */ "Le", |
| 22204 | 22157 | /* 79 */ "Lt", |
| 22205 | 22158 | /* 80 */ "Ge", |
| 22206 | | - /* 81 */ "Prev", |
| 22159 | + /* 81 */ "SorterNext", |
| 22207 | 22160 | /* 82 */ "BitAnd", |
| 22208 | 22161 | /* 83 */ "BitOr", |
| 22209 | 22162 | /* 84 */ "ShiftLeft", |
| 22210 | 22163 | /* 85 */ "ShiftRight", |
| 22211 | 22164 | /* 86 */ "Add", |
| | @@ -22212,76 +22165,76 @@ |
| 22212 | 22165 | /* 87 */ "Subtract", |
| 22213 | 22166 | /* 88 */ "Multiply", |
| 22214 | 22167 | /* 89 */ "Divide", |
| 22215 | 22168 | /* 90 */ "Remainder", |
| 22216 | 22169 | /* 91 */ "Concat", |
| 22217 | | - /* 92 */ "Next", |
| 22170 | + /* 92 */ "Prev", |
| 22218 | 22171 | /* 93 */ "BitNot", |
| 22219 | 22172 | /* 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", |
| 22173 | + /* 95 */ "Next", |
| 22174 | + /* 96 */ "SorterInsert", |
| 22175 | + /* 97 */ "IdxInsert", |
| 22176 | + /* 98 */ "IdxDelete", |
| 22177 | + /* 99 */ "IdxRowid", |
| 22178 | + /* 100 */ "IdxLT", |
| 22179 | + /* 101 */ "IdxGE", |
| 22180 | + /* 102 */ "Destroy", |
| 22181 | + /* 103 */ "Clear", |
| 22182 | + /* 104 */ "CreateIndex", |
| 22183 | + /* 105 */ "CreateTable", |
| 22184 | + /* 106 */ "ParseSchema", |
| 22185 | + /* 107 */ "LoadAnalysis", |
| 22186 | + /* 108 */ "DropTable", |
| 22187 | + /* 109 */ "DropIndex", |
| 22188 | + /* 110 */ "DropTrigger", |
| 22189 | + /* 111 */ "IntegrityCk", |
| 22190 | + /* 112 */ "RowSetAdd", |
| 22191 | + /* 113 */ "RowSetRead", |
| 22192 | + /* 114 */ "RowSetTest", |
| 22193 | + /* 115 */ "Program", |
| 22194 | + /* 116 */ "Param", |
| 22195 | + /* 117 */ "FkCounter", |
| 22196 | + /* 118 */ "FkIfZero", |
| 22197 | + /* 119 */ "MemMax", |
| 22198 | + /* 120 */ "IfPos", |
| 22199 | + /* 121 */ "IfNeg", |
| 22200 | + /* 122 */ "IfZero", |
| 22201 | + /* 123 */ "AggStep", |
| 22202 | + /* 124 */ "AggFinal", |
| 22203 | + /* 125 */ "Checkpoint", |
| 22204 | + /* 126 */ "JournalMode", |
| 22205 | + /* 127 */ "Vacuum", |
| 22206 | + /* 128 */ "IncrVacuum", |
| 22207 | + /* 129 */ "Expire", |
| 22255 | 22208 | /* 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", |
| 22209 | + /* 131 */ "TableLock", |
| 22210 | + /* 132 */ "VBegin", |
| 22211 | + /* 133 */ "VCreate", |
| 22212 | + /* 134 */ "VDestroy", |
| 22213 | + /* 135 */ "VOpen", |
| 22214 | + /* 136 */ "VFilter", |
| 22215 | + /* 137 */ "VColumn", |
| 22216 | + /* 138 */ "VNext", |
| 22217 | + /* 139 */ "VRename", |
| 22218 | + /* 140 */ "VUpdate", |
| 22266 | 22219 | /* 141 */ "ToText", |
| 22267 | 22220 | /* 142 */ "ToBlob", |
| 22268 | 22221 | /* 143 */ "ToNumeric", |
| 22269 | 22222 | /* 144 */ "ToInt", |
| 22270 | 22223 | /* 145 */ "ToReal", |
| 22271 | | - /* 146 */ "MaxPgcnt", |
| 22272 | | - /* 147 */ "Trace", |
| 22273 | | - /* 148 */ "Noop", |
| 22274 | | - /* 149 */ "Explain", |
| 22224 | + /* 146 */ "Pagecount", |
| 22225 | + /* 147 */ "MaxPgcnt", |
| 22226 | + /* 148 */ "Trace", |
| 22227 | + /* 149 */ "Noop", |
| 22228 | + /* 150 */ "Explain", |
| 22275 | 22229 | }; |
| 22276 | 22230 | return azName[i]; |
| 22277 | 22231 | } |
| 22278 | 22232 | #endif |
| 22279 | 22233 | |
| 22280 | 22234 | /************** End of opcodes.c *********************************************/ |
| 22281 | 22235 | /************** Begin file os_os2.c ******************************************/ |
| 22282 | | -#line 1 "tsrc/os_os2.c" |
| 22283 | 22236 | /* |
| 22284 | 22237 | ** 2006 Feb 14 |
| 22285 | 22238 | ** |
| 22286 | 22239 | ** The author disclaims copyright to this source code. In place of |
| 22287 | 22240 | ** a legal notice, here is a blessing: |
| | @@ -22334,11 +22287,10 @@ |
| 22334 | 22287 | /* |
| 22335 | 22288 | ** Include code that is common to all os_*.c files |
| 22336 | 22289 | */ |
| 22337 | 22290 | /************** Include os_common.h in the middle of os_os2.c ****************/ |
| 22338 | 22291 | /************** Begin file os_common.h ***************************************/ |
| 22339 | | -#line 1 "tsrc/os_common.h" |
| 22340 | 22292 | /* |
| 22341 | 22293 | ** 2004 May 22 |
| 22342 | 22294 | ** |
| 22343 | 22295 | ** The author disclaims copyright to this source code. In place of |
| 22344 | 22296 | ** a legal notice, here is a blessing: |
| | @@ -22388,11 +22340,10 @@ |
| 22388 | 22340 | ** hwtime.h contains inline assembler code for implementing |
| 22389 | 22341 | ** high-performance timing routines. |
| 22390 | 22342 | */ |
| 22391 | 22343 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 22392 | 22344 | /************** Begin file hwtime.h ******************************************/ |
| 22393 | | -#line 1 "tsrc/hwtime.h" |
| 22394 | 22345 | /* |
| 22395 | 22346 | ** 2008 May 27 |
| 22396 | 22347 | ** |
| 22397 | 22348 | ** The author disclaims copyright to this source code. In place of |
| 22398 | 22349 | ** a legal notice, here is a blessing: |
| | @@ -22477,11 +22428,10 @@ |
| 22477 | 22428 | |
| 22478 | 22429 | #endif /* !defined(_HWTIME_H_) */ |
| 22479 | 22430 | |
| 22480 | 22431 | /************** End of hwtime.h **********************************************/ |
| 22481 | 22432 | /************** Continuing where we left off in os_common.h ******************/ |
| 22482 | | -#line 53 "tsrc/os_common.h" |
| 22483 | 22433 | |
| 22484 | 22434 | static sqlite_uint64 g_start; |
| 22485 | 22435 | static sqlite_uint64 g_elapsed; |
| 22486 | 22436 | #define TIMER_START g_start=sqlite3Hwtime() |
| 22487 | 22437 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| | @@ -22544,11 +22494,10 @@ |
| 22544 | 22494 | |
| 22545 | 22495 | #endif /* !defined(_OS_COMMON_H_) */ |
| 22546 | 22496 | |
| 22547 | 22497 | /************** End of os_common.h *******************************************/ |
| 22548 | 22498 | /************** Continuing where we left off in os_os2.c *********************/ |
| 22549 | | -#line 57 "tsrc/os_os2.c" |
| 22550 | 22499 | |
| 22551 | 22500 | /* Forward references */ |
| 22552 | 22501 | typedef struct os2File os2File; /* The file structure */ |
| 22553 | 22502 | typedef struct os2ShmNode os2ShmNode; /* A shared descritive memory node */ |
| 22554 | 22503 | typedef struct os2ShmLink os2ShmLink; /* A connection to shared-memory */ |
| | @@ -24416,11 +24365,10 @@ |
| 24416 | 24365 | |
| 24417 | 24366 | #endif /* SQLITE_OS_OS2 */ |
| 24418 | 24367 | |
| 24419 | 24368 | /************** End of os_os2.c **********************************************/ |
| 24420 | 24369 | /************** Begin file os_unix.c *****************************************/ |
| 24421 | | -#line 1 "tsrc/os_unix.c" |
| 24422 | 24370 | /* |
| 24423 | 24371 | ** 2004 May 22 |
| 24424 | 24372 | ** |
| 24425 | 24373 | ** The author disclaims copyright to this source code. In place of |
| 24426 | 24374 | ** a legal notice, here is a blessing: |
| | @@ -24681,11 +24629,10 @@ |
| 24681 | 24629 | /* |
| 24682 | 24630 | ** Include code that is common to all os_*.c files |
| 24683 | 24631 | */ |
| 24684 | 24632 | /************** Include os_common.h in the middle of os_unix.c ***************/ |
| 24685 | 24633 | /************** Begin file os_common.h ***************************************/ |
| 24686 | | -#line 1 "tsrc/os_common.h" |
| 24687 | 24634 | /* |
| 24688 | 24635 | ** 2004 May 22 |
| 24689 | 24636 | ** |
| 24690 | 24637 | ** The author disclaims copyright to this source code. In place of |
| 24691 | 24638 | ** a legal notice, here is a blessing: |
| | @@ -24735,11 +24682,10 @@ |
| 24735 | 24682 | ** hwtime.h contains inline assembler code for implementing |
| 24736 | 24683 | ** high-performance timing routines. |
| 24737 | 24684 | */ |
| 24738 | 24685 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 24739 | 24686 | /************** Begin file hwtime.h ******************************************/ |
| 24740 | | -#line 1 "tsrc/hwtime.h" |
| 24741 | 24687 | /* |
| 24742 | 24688 | ** 2008 May 27 |
| 24743 | 24689 | ** |
| 24744 | 24690 | ** The author disclaims copyright to this source code. In place of |
| 24745 | 24691 | ** a legal notice, here is a blessing: |
| | @@ -24824,11 +24770,10 @@ |
| 24824 | 24770 | |
| 24825 | 24771 | #endif /* !defined(_HWTIME_H_) */ |
| 24826 | 24772 | |
| 24827 | 24773 | /************** End of hwtime.h **********************************************/ |
| 24828 | 24774 | /************** Continuing where we left off in os_common.h ******************/ |
| 24829 | | -#line 53 "tsrc/os_common.h" |
| 24830 | 24775 | |
| 24831 | 24776 | static sqlite_uint64 g_start; |
| 24832 | 24777 | static sqlite_uint64 g_elapsed; |
| 24833 | 24778 | #define TIMER_START g_start=sqlite3Hwtime() |
| 24834 | 24779 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| | @@ -24891,11 +24836,10 @@ |
| 24891 | 24836 | |
| 24892 | 24837 | #endif /* !defined(_OS_COMMON_H_) */ |
| 24893 | 24838 | |
| 24894 | 24839 | /************** End of os_common.h *******************************************/ |
| 24895 | 24840 | /************** Continuing where we left off in os_unix.c ********************/ |
| 24896 | | -#line 265 "tsrc/os_unix.c" |
| 24897 | 24841 | |
| 24898 | 24842 | /* |
| 24899 | 24843 | ** Define various macros that are missing from some systems. |
| 24900 | 24844 | */ |
| 24901 | 24845 | #ifndef O_LARGEFILE |
| | @@ -31401,11 +31345,10 @@ |
| 31401 | 31345 | |
| 31402 | 31346 | #endif /* SQLITE_OS_UNIX */ |
| 31403 | 31347 | |
| 31404 | 31348 | /************** End of os_unix.c *********************************************/ |
| 31405 | 31349 | /************** Begin file os_win.c ******************************************/ |
| 31406 | | -#line 1 "tsrc/os_win.c" |
| 31407 | 31350 | /* |
| 31408 | 31351 | ** 2004 May 22 |
| 31409 | 31352 | ** |
| 31410 | 31353 | ** The author disclaims copyright to this source code. In place of |
| 31411 | 31354 | ** a legal notice, here is a blessing: |
| | @@ -31463,11 +31406,10 @@ |
| 31463 | 31406 | /* |
| 31464 | 31407 | ** Include code that is common to all os_*.c files |
| 31465 | 31408 | */ |
| 31466 | 31409 | /************** Include os_common.h in the middle of os_win.c ****************/ |
| 31467 | 31410 | /************** Begin file os_common.h ***************************************/ |
| 31468 | | -#line 1 "tsrc/os_common.h" |
| 31469 | 31411 | /* |
| 31470 | 31412 | ** 2004 May 22 |
| 31471 | 31413 | ** |
| 31472 | 31414 | ** The author disclaims copyright to this source code. In place of |
| 31473 | 31415 | ** a legal notice, here is a blessing: |
| | @@ -31517,11 +31459,10 @@ |
| 31517 | 31459 | ** hwtime.h contains inline assembler code for implementing |
| 31518 | 31460 | ** high-performance timing routines. |
| 31519 | 31461 | */ |
| 31520 | 31462 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 31521 | 31463 | /************** Begin file hwtime.h ******************************************/ |
| 31522 | | -#line 1 "tsrc/hwtime.h" |
| 31523 | 31464 | /* |
| 31524 | 31465 | ** 2008 May 27 |
| 31525 | 31466 | ** |
| 31526 | 31467 | ** The author disclaims copyright to this source code. In place of |
| 31527 | 31468 | ** a legal notice, here is a blessing: |
| | @@ -31606,11 +31547,10 @@ |
| 31606 | 31547 | |
| 31607 | 31548 | #endif /* !defined(_HWTIME_H_) */ |
| 31608 | 31549 | |
| 31609 | 31550 | /************** End of hwtime.h **********************************************/ |
| 31610 | 31551 | /************** Continuing where we left off in os_common.h ******************/ |
| 31611 | | -#line 53 "tsrc/os_common.h" |
| 31612 | 31552 | |
| 31613 | 31553 | static sqlite_uint64 g_start; |
| 31614 | 31554 | static sqlite_uint64 g_elapsed; |
| 31615 | 31555 | #define TIMER_START g_start=sqlite3Hwtime() |
| 31616 | 31556 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| | @@ -31673,11 +31613,10 @@ |
| 31673 | 31613 | |
| 31674 | 31614 | #endif /* !defined(_OS_COMMON_H_) */ |
| 31675 | 31615 | |
| 31676 | 31616 | /************** End of os_common.h *******************************************/ |
| 31677 | 31617 | /************** Continuing where we left off in os_win.c *********************/ |
| 31678 | | -#line 62 "tsrc/os_win.c" |
| 31679 | 31618 | |
| 31680 | 31619 | /* |
| 31681 | 31620 | ** Some microsoft compilers lack this definition. |
| 31682 | 31621 | */ |
| 31683 | 31622 | #ifndef INVALID_FILE_ATTRIBUTES |
| | @@ -32860,13 +32799,23 @@ |
| 32860 | 32799 | |
| 32861 | 32800 | /* |
| 32862 | 32801 | ** Make sure all writes to a particular file are committed to disk. |
| 32863 | 32802 | */ |
| 32864 | 32803 | static int winSync(sqlite3_file *id, int flags){ |
| 32865 | | -#if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || defined(SQLITE_DEBUG) |
| 32866 | | - winFile *pFile = (winFile*)id; |
| 32804 | +#ifndef SQLITE_NO_SYNC |
| 32805 | + /* |
| 32806 | + ** Used only when SQLITE_NO_SYNC is not defined. |
| 32807 | + */ |
| 32867 | 32808 | BOOL rc; |
| 32809 | +#endif |
| 32810 | +#if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || \ |
| 32811 | + (defined(SQLITE_TEST) && defined(SQLITE_DEBUG)) |
| 32812 | + /* |
| 32813 | + ** Used when SQLITE_NO_SYNC is not defined and by the assert() and/or |
| 32814 | + ** OSTRACE() macros. |
| 32815 | + */ |
| 32816 | + winFile *pFile = (winFile*)id; |
| 32868 | 32817 | #else |
| 32869 | 32818 | UNUSED_PARAMETER(id); |
| 32870 | 32819 | #endif |
| 32871 | 32820 | |
| 32872 | 32821 | assert( pFile ); |
| | @@ -34809,11 +34758,10 @@ |
| 34809 | 34758 | |
| 34810 | 34759 | #endif /* SQLITE_OS_WIN */ |
| 34811 | 34760 | |
| 34812 | 34761 | /************** End of os_win.c **********************************************/ |
| 34813 | 34762 | /************** Begin file bitvec.c ******************************************/ |
| 34814 | | -#line 1 "tsrc/bitvec.c" |
| 34815 | 34763 | /* |
| 34816 | 34764 | ** 2008 February 16 |
| 34817 | 34765 | ** |
| 34818 | 34766 | ** The author disclaims copyright to this source code. In place of |
| 34819 | 34767 | ** a legal notice, here is a blessing: |
| | @@ -35220,11 +35168,10 @@ |
| 35220 | 35168 | } |
| 35221 | 35169 | #endif /* SQLITE_OMIT_BUILTIN_TEST */ |
| 35222 | 35170 | |
| 35223 | 35171 | /************** End of bitvec.c **********************************************/ |
| 35224 | 35172 | /************** Begin file pcache.c ******************************************/ |
| 35225 | | -#line 1 "tsrc/pcache.c" |
| 35226 | 35173 | /* |
| 35227 | 35174 | ** 2008 August 05 |
| 35228 | 35175 | ** |
| 35229 | 35176 | ** The author disclaims copyright to this source code. In place of |
| 35230 | 35177 | ** a legal notice, here is a blessing: |
| | @@ -35817,11 +35764,10 @@ |
| 35817 | 35764 | } |
| 35818 | 35765 | #endif |
| 35819 | 35766 | |
| 35820 | 35767 | /************** End of pcache.c **********************************************/ |
| 35821 | 35768 | /************** Begin file pcache1.c *****************************************/ |
| 35822 | | -#line 1 "tsrc/pcache1.c" |
| 35823 | 35769 | /* |
| 35824 | 35770 | ** 2008 November 05 |
| 35825 | 35771 | ** |
| 35826 | 35772 | ** The author disclaims copyright to this source code. In place of |
| 35827 | 35773 | ** a legal notice, here is a blessing: |
| | @@ -37034,11 +36980,10 @@ |
| 37034 | 36980 | } |
| 37035 | 36981 | #endif |
| 37036 | 36982 | |
| 37037 | 36983 | /************** End of pcache1.c *********************************************/ |
| 37038 | 36984 | /************** Begin file rowset.c ******************************************/ |
| 37039 | | -#line 1 "tsrc/rowset.c" |
| 37040 | 36985 | /* |
| 37041 | 36986 | ** 2008 December 3 |
| 37042 | 36987 | ** |
| 37043 | 36988 | ** The author disclaims copyright to this source code. In place of |
| 37044 | 36989 | ** a legal notice, here is a blessing: |
| | @@ -37459,11 +37404,10 @@ |
| 37459 | 37404 | return 0; |
| 37460 | 37405 | } |
| 37461 | 37406 | |
| 37462 | 37407 | /************** End of rowset.c **********************************************/ |
| 37463 | 37408 | /************** Begin file pager.c *******************************************/ |
| 37464 | | -#line 1 "tsrc/pager.c" |
| 37465 | 37409 | /* |
| 37466 | 37410 | ** 2001 September 15 |
| 37467 | 37411 | ** |
| 37468 | 37412 | ** The author disclaims copyright to this source code. In place of |
| 37469 | 37413 | ** a legal notice, here is a blessing: |
| | @@ -37483,11 +37427,10 @@ |
| 37483 | 37427 | ** another is writing. |
| 37484 | 37428 | */ |
| 37485 | 37429 | #ifndef SQLITE_OMIT_DISKIO |
| 37486 | 37430 | /************** Include wal.h in the middle of pager.c ***********************/ |
| 37487 | 37431 | /************** Begin file wal.h *********************************************/ |
| 37488 | | -#line 1 "tsrc/wal.h" |
| 37489 | 37432 | /* |
| 37490 | 37433 | ** 2010 February 1 |
| 37491 | 37434 | ** |
| 37492 | 37435 | ** The author disclaims copyright to this source code. In place of |
| 37493 | 37436 | ** a legal notice, here is a blessing: |
| | @@ -37608,11 +37551,10 @@ |
| 37608 | 37551 | #endif /* ifndef SQLITE_OMIT_WAL */ |
| 37609 | 37552 | #endif /* _WAL_H_ */ |
| 37610 | 37553 | |
| 37611 | 37554 | /************** End of wal.h *************************************************/ |
| 37612 | 37555 | /************** Continuing where we left off in pager.c **********************/ |
| 37613 | | -#line 24 "tsrc/pager.c" |
| 37614 | 37556 | |
| 37615 | 37557 | |
| 37616 | 37558 | /******************* NOTES ON THE DESIGN OF THE PAGER ************************ |
| 37617 | 37559 | ** |
| 37618 | 37560 | ** This comment block describes invariants that hold when using a rollback |
| | @@ -38208,11 +38150,10 @@ |
| 38208 | 38150 | u8 ckptSyncFlags; /* SYNC_NORMAL or SYNC_FULL for checkpoint */ |
| 38209 | 38151 | u8 syncFlags; /* SYNC_NORMAL or SYNC_FULL otherwise */ |
| 38210 | 38152 | u8 tempFile; /* zFilename is a temporary file */ |
| 38211 | 38153 | u8 readOnly; /* True for a read-only database */ |
| 38212 | 38154 | u8 memDb; /* True to inhibit all file I/O */ |
| 38213 | | - u8 hasSeenStress; /* pagerStress() called one or more times */ |
| 38214 | 38155 | |
| 38215 | 38156 | /************************************************************************** |
| 38216 | 38157 | ** The following block contains those class members that change during |
| 38217 | 38158 | ** routine opertion. Class members not in this block are either fixed |
| 38218 | 38159 | ** when the pager is first created or else only change when there is a |
| | @@ -41763,11 +41704,10 @@ |
| 41763 | 41704 | ** is impossible for sqlite3PCacheFetch() to be called with createFlag==1 |
| 41764 | 41705 | ** while in the error state, hence it is impossible for this routine to |
| 41765 | 41706 | ** be called in the error state. Nevertheless, we include a NEVER() |
| 41766 | 41707 | ** test for the error state as a safeguard against future changes. |
| 41767 | 41708 | */ |
| 41768 | | - pPager->hasSeenStress = 1; |
| 41769 | 41709 | if( NEVER(pPager->errCode) ) return SQLITE_OK; |
| 41770 | 41710 | if( pPager->doNotSpill ) return SQLITE_OK; |
| 41771 | 41711 | if( pPager->doNotSyncSpill && (pPg->flags & PGHDR_NEED_SYNC)!=0 ){ |
| 41772 | 41712 | return SQLITE_OK; |
| 41773 | 41713 | } |
| | @@ -44422,11 +44362,10 @@ |
| 44422 | 44362 | |
| 44423 | 44363 | #endif /* SQLITE_OMIT_DISKIO */ |
| 44424 | 44364 | |
| 44425 | 44365 | /************** End of pager.c ***********************************************/ |
| 44426 | 44366 | /************** Begin file wal.c *********************************************/ |
| 44427 | | -#line 1 "tsrc/wal.c" |
| 44428 | 44367 | /* |
| 44429 | 44368 | ** 2010 February 1 |
| 44430 | 44369 | ** |
| 44431 | 44370 | ** The author disclaims copyright to this source code. In place of |
| 44432 | 44371 | ** a legal notice, here is a blessing: |
| | @@ -47377,11 +47316,10 @@ |
| 47377 | 47316 | |
| 47378 | 47317 | #endif /* #ifndef SQLITE_OMIT_WAL */ |
| 47379 | 47318 | |
| 47380 | 47319 | /************** End of wal.c *************************************************/ |
| 47381 | 47320 | /************** Begin file btmutex.c *****************************************/ |
| 47382 | | -#line 1 "tsrc/btmutex.c" |
| 47383 | 47321 | /* |
| 47384 | 47322 | ** 2007 August 27 |
| 47385 | 47323 | ** |
| 47386 | 47324 | ** The author disclaims copyright to this source code. In place of |
| 47387 | 47325 | ** a legal notice, here is a blessing: |
| | @@ -47397,11 +47335,10 @@ |
| 47397 | 47335 | ** big and we want to break it down some. This packaged seemed like |
| 47398 | 47336 | ** a good breakout. |
| 47399 | 47337 | */ |
| 47400 | 47338 | /************** Include btreeInt.h in the middle of btmutex.c ****************/ |
| 47401 | 47339 | /************** Begin file btreeInt.h ****************************************/ |
| 47402 | | -#line 1 "tsrc/btreeInt.h" |
| 47403 | 47340 | /* |
| 47404 | 47341 | ** 2004 April 6 |
| 47405 | 47342 | ** |
| 47406 | 47343 | ** The author disclaims copyright to this source code. In place of |
| 47407 | 47344 | ** a legal notice, here is a blessing: |
| | @@ -48043,11 +47980,10 @@ |
| 48043 | 47980 | #define get4byte sqlite3Get4byte |
| 48044 | 47981 | #define put4byte sqlite3Put4byte |
| 48045 | 47982 | |
| 48046 | 47983 | /************** End of btreeInt.h ********************************************/ |
| 48047 | 47984 | /************** Continuing where we left off in btmutex.c ********************/ |
| 48048 | | -#line 19 "tsrc/btmutex.c" |
| 48049 | 47985 | #ifndef SQLITE_OMIT_SHARED_CACHE |
| 48050 | 47986 | #if SQLITE_THREADSAFE |
| 48051 | 47987 | |
| 48052 | 47988 | /* |
| 48053 | 47989 | ** Obtain the BtShared mutex associated with B-Tree handle p. Also, |
| | @@ -48316,11 +48252,10 @@ |
| 48316 | 48252 | #endif /* if SQLITE_THREADSAFE */ |
| 48317 | 48253 | #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */ |
| 48318 | 48254 | |
| 48319 | 48255 | /************** End of btmutex.c *********************************************/ |
| 48320 | 48256 | /************** Begin file btree.c *******************************************/ |
| 48321 | | -#line 1 "tsrc/btree.c" |
| 48322 | 48257 | /* |
| 48323 | 48258 | ** 2004 April 6 |
| 48324 | 48259 | ** |
| 48325 | 48260 | ** The author disclaims copyright to this source code. In place of |
| 48326 | 48261 | ** a legal notice, here is a blessing: |
| | @@ -48982,11 +48917,11 @@ |
| 48982 | 48917 | assert( nKey==(i64)(int)nKey ); |
| 48983 | 48918 | pIdxKey = sqlite3VdbeAllocUnpackedRecord( |
| 48984 | 48919 | pCur->pKeyInfo, aSpace, sizeof(aSpace), &pFree |
| 48985 | 48920 | ); |
| 48986 | 48921 | if( pIdxKey==0 ) return SQLITE_NOMEM; |
| 48987 | | - sqlite3VdbeRecordUnpack(pCur->pKeyInfo, nKey, pKey, pIdxKey); |
| 48922 | + sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey, pIdxKey); |
| 48988 | 48923 | }else{ |
| 48989 | 48924 | pIdxKey = 0; |
| 48990 | 48925 | } |
| 48991 | 48926 | rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes); |
| 48992 | 48927 | if( pFree ){ |
| | @@ -56504,11 +56439,10 @@ |
| 56504 | 56439 | return rc; |
| 56505 | 56440 | } |
| 56506 | 56441 | |
| 56507 | 56442 | /************** End of btree.c ***********************************************/ |
| 56508 | 56443 | /************** Begin file backup.c ******************************************/ |
| 56509 | | -#line 1 "tsrc/backup.c" |
| 56510 | 56444 | /* |
| 56511 | 56445 | ** 2009 January 28 |
| 56512 | 56446 | ** |
| 56513 | 56447 | ** The author disclaims copyright to this source code. In place of |
| 56514 | 56448 | ** a legal notice, here is a blessing: |
| | @@ -57211,11 +57145,10 @@ |
| 57211 | 57145 | } |
| 57212 | 57146 | #endif /* SQLITE_OMIT_VACUUM */ |
| 57213 | 57147 | |
| 57214 | 57148 | /************** End of backup.c **********************************************/ |
| 57215 | 57149 | /************** Begin file vdbemem.c *****************************************/ |
| 57216 | | -#line 1 "tsrc/vdbemem.c" |
| 57217 | 57150 | /* |
| 57218 | 57151 | ** 2004 May 26 |
| 57219 | 57152 | ** |
| 57220 | 57153 | ** The author disclaims copyright to this source code. In place of |
| 57221 | 57154 | ** a legal notice, here is a blessing: |
| | @@ -58366,11 +58299,10 @@ |
| 58366 | 58299 | return 0; |
| 58367 | 58300 | } |
| 58368 | 58301 | |
| 58369 | 58302 | /************** End of vdbemem.c *********************************************/ |
| 58370 | 58303 | /************** Begin file vdbeaux.c *****************************************/ |
| 58371 | | -#line 1 "tsrc/vdbeaux.c" |
| 58372 | 58304 | /* |
| 58373 | 58305 | ** 2003 September 6 |
| 58374 | 58306 | ** |
| 58375 | 58307 | ** The author disclaims copyright to this source code. In place of |
| 58376 | 58308 | ** a legal notice, here is a blessing: |
| | @@ -59037,22 +58969,19 @@ |
| 59037 | 58969 | p->pNext = pVdbe->pProgram; |
| 59038 | 58970 | pVdbe->pProgram = p; |
| 59039 | 58971 | } |
| 59040 | 58972 | |
| 59041 | 58973 | /* |
| 59042 | | -** Change N opcodes starting at addr to No-ops. |
| 58974 | +** Change the opcode at addr into OP_Noop |
| 59043 | 58975 | */ |
| 59044 | | -SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr, int N){ |
| 58976 | +SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr){ |
| 59045 | 58977 | if( p->aOp ){ |
| 59046 | 58978 | VdbeOp *pOp = &p->aOp[addr]; |
| 59047 | 58979 | 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 | | - } |
| 58980 | + freeP4(db, pOp->p4type, pOp->p4.p); |
| 58981 | + memset(pOp, 0, sizeof(pOp[0])); |
| 58982 | + pOp->opcode = OP_Noop; |
| 59054 | 58983 | } |
| 59055 | 58984 | } |
| 59056 | 58985 | |
| 59057 | 58986 | /* |
| 59058 | 58987 | ** Change the value of the P4 operand for a specific instruction. |
| | @@ -59204,11 +59133,11 @@ |
| 59204 | 59133 | ** check the value of p->nOp-1 before continuing. |
| 59205 | 59134 | */ |
| 59206 | 59135 | SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){ |
| 59207 | 59136 | /* C89 specifies that the constant "dummy" will be initialized to all |
| 59208 | 59137 | ** zeros, which is correct. MSVC generates a warning, nevertheless. */ |
| 59209 | | - static const VdbeOp dummy; /* Ignore the MSVC warning about no initializer */ |
| 59138 | + static VdbeOp dummy; /* Ignore the MSVC warning about no initializer */ |
| 59210 | 59139 | assert( p->magic==VDBE_MAGIC_INIT ); |
| 59211 | 59140 | if( addr<0 ){ |
| 59212 | 59141 | #ifdef SQLITE_OMIT_TRACE |
| 59213 | 59142 | if( p->nOp==0 ) return (VdbeOp*)&dummy; |
| 59214 | 59143 | #endif |
| | @@ -61609,11 +61538,10 @@ |
| 61609 | 61538 | } |
| 61610 | 61539 | } |
| 61611 | 61540 | |
| 61612 | 61541 | /************** End of vdbeaux.c *********************************************/ |
| 61613 | 61542 | /************** Begin file vdbeapi.c *****************************************/ |
| 61614 | | -#line 1 "tsrc/vdbeapi.c" |
| 61615 | 61543 | /* |
| 61616 | 61544 | ** 2004 May 26 |
| 61617 | 61545 | ** |
| 61618 | 61546 | ** The author disclaims copyright to this source code. In place of |
| 61619 | 61547 | ** a legal notice, here is a blessing: |
| | @@ -62917,11 +62845,10 @@ |
| 62917 | 62845 | return v; |
| 62918 | 62846 | } |
| 62919 | 62847 | |
| 62920 | 62848 | /************** End of vdbeapi.c *********************************************/ |
| 62921 | 62849 | /************** Begin file vdbetrace.c ***************************************/ |
| 62922 | | -#line 1 "tsrc/vdbetrace.c" |
| 62923 | 62850 | /* |
| 62924 | 62851 | ** 2009 November 25 |
| 62925 | 62852 | ** |
| 62926 | 62853 | ** The author disclaims copyright to this source code. In place of |
| 62927 | 62854 | ** a legal notice, here is a blessing: |
| | @@ -63073,11 +63000,10 @@ |
| 63073 | 63000 | |
| 63074 | 63001 | #endif /* #ifndef SQLITE_OMIT_TRACE */ |
| 63075 | 63002 | |
| 63076 | 63003 | /************** End of vdbetrace.c *******************************************/ |
| 63077 | 63004 | /************** Begin file vdbe.c ********************************************/ |
| 63078 | | -#line 1 "tsrc/vdbe.c" |
| 63079 | 63005 | /* |
| 63080 | 63006 | ** 2001 September 15 |
| 63081 | 63007 | ** |
| 63082 | 63008 | ** The author disclaims copyright to this source code. In place of |
| 63083 | 63009 | ** a legal notice, here is a blessing: |
| | @@ -63543,11 +63469,10 @@ |
| 63543 | 63469 | ** hwtime.h contains inline assembler code for implementing |
| 63544 | 63470 | ** high-performance timing routines. |
| 63545 | 63471 | */ |
| 63546 | 63472 | /************** Include hwtime.h in the middle of vdbe.c *********************/ |
| 63547 | 63473 | /************** Begin file hwtime.h ******************************************/ |
| 63548 | | -#line 1 "tsrc/hwtime.h" |
| 63549 | 63474 | /* |
| 63550 | 63475 | ** 2008 May 27 |
| 63551 | 63476 | ** |
| 63552 | 63477 | ** The author disclaims copyright to this source code. In place of |
| 63553 | 63478 | ** a legal notice, here is a blessing: |
| | @@ -63632,11 +63557,10 @@ |
| 63632 | 63557 | |
| 63633 | 63558 | #endif /* !defined(_HWTIME_H_) */ |
| 63634 | 63559 | |
| 63635 | 63560 | /************** End of hwtime.h **********************************************/ |
| 63636 | 63561 | /************** Continuing where we left off in vdbe.c ***********************/ |
| 63637 | | -#line 471 "tsrc/vdbe.c" |
| 63638 | 63562 | |
| 63639 | 63563 | #endif |
| 63640 | 63564 | |
| 63641 | 63565 | /* |
| 63642 | 63566 | ** The CHECK_FOR_INTERRUPT macro defined here looks to see if the |
| | @@ -65627,10 +65551,20 @@ |
| 65627 | 65551 | sqlite3VdbeMemSetInt64(pOut, ~sqlite3VdbeIntValue(pIn1)); |
| 65628 | 65552 | } |
| 65629 | 65553 | break; |
| 65630 | 65554 | } |
| 65631 | 65555 | |
| 65556 | +/* Opcode: Once P1 P2 * * * |
| 65557 | +** |
| 65558 | +** Jump to P2 if the value in register P1 is a not null or zero. If |
| 65559 | +** the value is NULL or zero, fall through and change the P1 register |
| 65560 | +** to an integer 1. |
| 65561 | +** |
| 65562 | +** When P1 is not used otherwise in a program, this opcode falls through |
| 65563 | +** once and jumps on all subsequent invocations. It is the equivalent |
| 65564 | +** of "OP_If P1 P2", followed by "OP_Integer 1 P1". |
| 65565 | +*/ |
| 65632 | 65566 | /* Opcode: If P1 P2 P3 * * |
| 65633 | 65567 | ** |
| 65634 | 65568 | ** Jump to P2 if the value in register P1 is true. The value |
| 65635 | 65569 | ** is considered true if it is numeric and non-zero. If the value |
| 65636 | 65570 | ** in P1 is NULL then take the jump if P3 is true. |
| | @@ -65639,10 +65573,11 @@ |
| 65639 | 65573 | ** |
| 65640 | 65574 | ** Jump to P2 if the value in register P1 is False. The value |
| 65641 | 65575 | ** is considered true if it has a numeric value of zero. If the value |
| 65642 | 65576 | ** in P1 is NULL then take the jump if P3 is true. |
| 65643 | 65577 | */ |
| 65578 | +case OP_Once: /* jump, in1 */ |
| 65644 | 65579 | case OP_If: /* jump, in1 */ |
| 65645 | 65580 | case OP_IfNot: { /* jump, in1 */ |
| 65646 | 65581 | #if 0 /* local variables moved into u.al */ |
| 65647 | 65582 | int c; |
| 65648 | 65583 | #endif /* local variables moved into u.al */ |
| | @@ -65657,10 +65592,16 @@ |
| 65657 | 65592 | #endif |
| 65658 | 65593 | if( pOp->opcode==OP_IfNot ) u.al.c = !u.al.c; |
| 65659 | 65594 | } |
| 65660 | 65595 | if( u.al.c ){ |
| 65661 | 65596 | pc = pOp->p2-1; |
| 65597 | + }else if( pOp->opcode==OP_Once ){ |
| 65598 | + assert( (pIn1->flags & (MEM_Agg|MEM_Dyn|MEM_RowSet|MEM_Frame))==0 ); |
| 65599 | + memAboutToChange(p, pIn1); |
| 65600 | + pIn1->flags = MEM_Int; |
| 65601 | + pIn1->u.i = 1; |
| 65602 | + REGISTER_TRACE(pOp->p1, pIn1); |
| 65662 | 65603 | } |
| 65663 | 65604 | break; |
| 65664 | 65605 | } |
| 65665 | 65606 | |
| 65666 | 65607 | /* Opcode: IsNull P1 P2 * * * |
| | @@ -69860,11 +69801,10 @@ |
| 69860 | 69801 | goto vdbe_error_halt; |
| 69861 | 69802 | } |
| 69862 | 69803 | |
| 69863 | 69804 | /************** End of vdbe.c ************************************************/ |
| 69864 | 69805 | /************** Begin file vdbeblob.c ****************************************/ |
| 69865 | | -#line 1 "tsrc/vdbeblob.c" |
| 69866 | 69806 | /* |
| 69867 | 69807 | ** 2007 May 1 |
| 69868 | 69808 | ** |
| 69869 | 69809 | ** The author disclaims copyright to this source code. In place of |
| 69870 | 69810 | ** a legal notice, here is a blessing: |
| | @@ -70134,21 +70074,21 @@ |
| 70134 | 70074 | /* Make sure a mutex is held on the table to be accessed */ |
| 70135 | 70075 | sqlite3VdbeUsesBtree(v, iDb); |
| 70136 | 70076 | |
| 70137 | 70077 | /* Configure the OP_TableLock instruction */ |
| 70138 | 70078 | #ifdef SQLITE_OMIT_SHARED_CACHE |
| 70139 | | - sqlite3VdbeChangeToNoop(v, 2, 1); |
| 70079 | + sqlite3VdbeChangeToNoop(v, 2); |
| 70140 | 70080 | #else |
| 70141 | 70081 | sqlite3VdbeChangeP1(v, 2, iDb); |
| 70142 | 70082 | sqlite3VdbeChangeP2(v, 2, pTab->tnum); |
| 70143 | 70083 | sqlite3VdbeChangeP3(v, 2, flags); |
| 70144 | 70084 | sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT); |
| 70145 | 70085 | #endif |
| 70146 | 70086 | |
| 70147 | 70087 | /* Remove either the OP_OpenWrite or OpenRead. Set the P2 |
| 70148 | 70088 | ** parameter of the other to pTab->tnum. */ |
| 70149 | | - sqlite3VdbeChangeToNoop(v, 4 - flags, 1); |
| 70089 | + sqlite3VdbeChangeToNoop(v, 4 - flags); |
| 70150 | 70090 | sqlite3VdbeChangeP2(v, 3 + flags, pTab->tnum); |
| 70151 | 70091 | sqlite3VdbeChangeP3(v, 3 + flags, iDb); |
| 70152 | 70092 | |
| 70153 | 70093 | /* Configure the number of columns. Configure the cursor to |
| 70154 | 70094 | ** think that the table has one more column than it really |
| | @@ -70331,11 +70271,10 @@ |
| 70331 | 70271 | |
| 70332 | 70272 | #endif /* #ifndef SQLITE_OMIT_INCRBLOB */ |
| 70333 | 70273 | |
| 70334 | 70274 | /************** End of vdbeblob.c ********************************************/ |
| 70335 | 70275 | /************** Begin file vdbesort.c ****************************************/ |
| 70336 | | -#line 1 "tsrc/vdbesort.c" |
| 70337 | 70276 | /* |
| 70338 | 70277 | ** 2011 July 9 |
| 70339 | 70278 | ** |
| 70340 | 70279 | ** The author disclaims copyright to this source code. In place of |
| 70341 | 70280 | ** a legal notice, here is a blessing: |
| | @@ -70492,12 +70431,16 @@ |
| 70492 | 70431 | int rc; /* Return Code */ |
| 70493 | 70432 | int nRead; /* Number of bytes read */ |
| 70494 | 70433 | int nRec = 0; /* Size of record in bytes */ |
| 70495 | 70434 | int iOff = 0; /* Size of serialized size varint in bytes */ |
| 70496 | 70435 | |
| 70497 | | - nRead = pIter->iEof - pIter->iReadOff; |
| 70498 | | - if( nRead>5 ) nRead = 5; |
| 70436 | + assert( pIter->iEof>=pIter->iReadOff ); |
| 70437 | + if( pIter->iEof-pIter->iReadOff>5 ){ |
| 70438 | + nRead = 5; |
| 70439 | + }else{ |
| 70440 | + nRead = (int)(pIter->iEof - pIter->iReadOff); |
| 70441 | + } |
| 70499 | 70442 | if( nRead<=0 ){ |
| 70500 | 70443 | /* This is an EOF condition */ |
| 70501 | 70444 | vdbeSorterIterZero(db, pIter); |
| 70502 | 70445 | return SQLITE_OK; |
| 70503 | 70446 | } |
| | @@ -71211,11 +71154,10 @@ |
| 71211 | 71154 | |
| 71212 | 71155 | #endif /* #ifndef SQLITE_OMIT_MERGE_SORT */ |
| 71213 | 71156 | |
| 71214 | 71157 | /************** End of vdbesort.c ********************************************/ |
| 71215 | 71158 | /************** Begin file journal.c *****************************************/ |
| 71216 | | -#line 1 "tsrc/journal.c" |
| 71217 | 71159 | /* |
| 71218 | 71160 | ** 2007 August 22 |
| 71219 | 71161 | ** |
| 71220 | 71162 | ** The author disclaims copyright to this source code. In place of |
| 71221 | 71163 | ** a legal notice, here is a blessing: |
| | @@ -71452,11 +71394,10 @@ |
| 71452 | 71394 | } |
| 71453 | 71395 | #endif |
| 71454 | 71396 | |
| 71455 | 71397 | /************** End of journal.c *********************************************/ |
| 71456 | 71398 | /************** Begin file memjournal.c **************************************/ |
| 71457 | | -#line 1 "tsrc/memjournal.c" |
| 71458 | 71399 | /* |
| 71459 | 71400 | ** 2008 October 7 |
| 71460 | 71401 | ** |
| 71461 | 71402 | ** The author disclaims copyright to this source code. In place of |
| 71462 | 71403 | ** a legal notice, here is a blessing: |
| | @@ -71714,11 +71655,10 @@ |
| 71714 | 71655 | return sizeof(MemJournal); |
| 71715 | 71656 | } |
| 71716 | 71657 | |
| 71717 | 71658 | /************** End of memjournal.c ******************************************/ |
| 71718 | 71659 | /************** Begin file walker.c ******************************************/ |
| 71719 | | -#line 1 "tsrc/walker.c" |
| 71720 | 71660 | /* |
| 71721 | 71661 | ** 2008 August 16 |
| 71722 | 71662 | ** |
| 71723 | 71663 | ** The author disclaims copyright to this source code. In place of |
| 71724 | 71664 | ** a legal notice, here is a blessing: |
| | @@ -71853,11 +71793,10 @@ |
| 71853 | 71793 | return rc & WRC_Abort; |
| 71854 | 71794 | } |
| 71855 | 71795 | |
| 71856 | 71796 | /************** End of walker.c **********************************************/ |
| 71857 | 71797 | /************** Begin file resolve.c *****************************************/ |
| 71858 | | -#line 1 "tsrc/resolve.c" |
| 71859 | 71798 | /* |
| 71860 | 71799 | ** 2008 August 18 |
| 71861 | 71800 | ** |
| 71862 | 71801 | ** The author disclaims copyright to this source code. In place of |
| 71863 | 71802 | ** a legal notice, here is a blessing: |
| | @@ -73074,11 +73013,10 @@ |
| 73074 | 73013 | sqlite3WalkSelect(&w, p); |
| 73075 | 73014 | } |
| 73076 | 73015 | |
| 73077 | 73016 | /************** End of resolve.c *********************************************/ |
| 73078 | 73017 | /************** Begin file expr.c ********************************************/ |
| 73079 | | -#line 1 "tsrc/expr.c" |
| 73080 | 73018 | /* |
| 73081 | 73019 | ** 2001 September 15 |
| 73082 | 73020 | ** |
| 73083 | 73021 | ** The author disclaims copyright to this source code. In place of |
| 73084 | 73022 | ** a legal notice, here is a blessing: |
| | @@ -73977,11 +73915,12 @@ |
| 73977 | 73915 | pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase); |
| 73978 | 73916 | pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName); |
| 73979 | 73917 | pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias); |
| 73980 | 73918 | pNewItem->jointype = pOldItem->jointype; |
| 73981 | 73919 | pNewItem->iCursor = pOldItem->iCursor; |
| 73982 | | - pNewItem->isPopulated = pOldItem->isPopulated; |
| 73920 | + pNewItem->addrFillSub = pOldItem->addrFillSub; |
| 73921 | + pNewItem->regReturn = pOldItem->regReturn; |
| 73983 | 73922 | pNewItem->isCorrelated = pOldItem->isCorrelated; |
| 73984 | 73923 | pNewItem->zIndex = sqlite3DbStrDup(db, pOldItem->zIndex); |
| 73985 | 73924 | pNewItem->notIndexed = pOldItem->notIndexed; |
| 73986 | 73925 | pNewItem->pIndex = pOldItem->pIndex; |
| 73987 | 73926 | pTab = pNewItem->pTab = pOldItem->pTab; |
| | @@ -74537,12 +74476,11 @@ |
| 74537 | 74476 | assert(v); |
| 74538 | 74477 | if( iCol<0 ){ |
| 74539 | 74478 | int iMem = ++pParse->nMem; |
| 74540 | 74479 | int iAddr; |
| 74541 | 74480 | |
| 74542 | | - iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem); |
| 74543 | | - sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem); |
| 74481 | + iAddr = sqlite3VdbeAddOp1(v, OP_Once, iMem); |
| 74544 | 74482 | |
| 74545 | 74483 | sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead); |
| 74546 | 74484 | eType = IN_INDEX_ROWID; |
| 74547 | 74485 | |
| 74548 | 74486 | sqlite3VdbeJumpHere(v, iAddr); |
| | @@ -74569,12 +74507,11 @@ |
| 74569 | 74507 | int iMem = ++pParse->nMem; |
| 74570 | 74508 | int iAddr; |
| 74571 | 74509 | char *pKey; |
| 74572 | 74510 | |
| 74573 | 74511 | pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx); |
| 74574 | | - iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem); |
| 74575 | | - sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem); |
| 74512 | + iAddr = sqlite3VdbeAddOp1(v, OP_Once, iMem); |
| 74576 | 74513 | |
| 74577 | 74514 | sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb, |
| 74578 | 74515 | pKey,P4_KEYINFO_HANDOFF); |
| 74579 | 74516 | VdbeComment((v, "%s", pIdx->zName)); |
| 74580 | 74517 | eType = IN_INDEX_INDEX; |
| | @@ -74651,11 +74588,11 @@ |
| 74651 | 74588 | Parse *pParse, /* Parsing context */ |
| 74652 | 74589 | Expr *pExpr, /* The IN, SELECT, or EXISTS operator */ |
| 74653 | 74590 | int rMayHaveNull, /* Register that records whether NULLs exist in RHS */ |
| 74654 | 74591 | int isRowid /* If true, LHS of IN operator is a rowid */ |
| 74655 | 74592 | ){ |
| 74656 | | - int testAddr = 0; /* One-time test address */ |
| 74593 | + int testAddr = -1; /* One-time test address */ |
| 74657 | 74594 | int rReg = 0; /* Register storing resulting */ |
| 74658 | 74595 | Vdbe *v = sqlite3GetVdbe(pParse); |
| 74659 | 74596 | if( NEVER(v==0) ) return 0; |
| 74660 | 74597 | sqlite3ExprCachePush(pParse); |
| 74661 | 74598 | |
| | @@ -74669,19 +74606,17 @@ |
| 74669 | 74606 | ** If all of the above are false, then we can run this code just once |
| 74670 | 74607 | ** save the results, and reuse the same result on subsequent invocations. |
| 74671 | 74608 | */ |
| 74672 | 74609 | if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){ |
| 74673 | 74610 | 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 ); |
| 74611 | + testAddr = sqlite3VdbeAddOp1(v, OP_Once, mem); |
| 74677 | 74612 | } |
| 74678 | 74613 | |
| 74679 | 74614 | #ifndef SQLITE_OMIT_EXPLAIN |
| 74680 | 74615 | if( pParse->explain==2 ){ |
| 74681 | 74616 | char *zMsg = sqlite3MPrintf( |
| 74682 | | - pParse->db, "EXECUTE %s%s SUBQUERY %d", testAddr?"":"CORRELATED ", |
| 74617 | + pParse->db, "EXECUTE %s%s SUBQUERY %d", testAddr>=0?"":"CORRELATED ", |
| 74683 | 74618 | pExpr->op==TK_IN?"LIST":"SCALAR", pParse->iNextSelectId |
| 74684 | 74619 | ); |
| 74685 | 74620 | sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC); |
| 74686 | 74621 | } |
| 74687 | 74622 | #endif |
| | @@ -74769,13 +74704,13 @@ |
| 74769 | 74704 | /* If the expression is not constant then we will need to |
| 74770 | 74705 | ** disable the test that was generated above that makes sure |
| 74771 | 74706 | ** this code only executes once. Because for a non-constant |
| 74772 | 74707 | ** expression we need to rerun this code each time. |
| 74773 | 74708 | */ |
| 74774 | | - if( testAddr && !sqlite3ExprIsConstant(pE2) ){ |
| 74775 | | - sqlite3VdbeChangeToNoop(v, testAddr-1, 2); |
| 74776 | | - testAddr = 0; |
| 74709 | + if( testAddr>=0 && !sqlite3ExprIsConstant(pE2) ){ |
| 74710 | + sqlite3VdbeChangeToNoop(v, testAddr); |
| 74711 | + testAddr = -1; |
| 74777 | 74712 | } |
| 74778 | 74713 | |
| 74779 | 74714 | /* Evaluate the expression and insert it into the temp table */ |
| 74780 | 74715 | if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){ |
| 74781 | 74716 | sqlite3VdbeAddOp3(v, OP_InsertInt, pExpr->iTable, r2, iValToIns); |
| | @@ -74840,12 +74775,12 @@ |
| 74840 | 74775 | ExprSetIrreducible(pExpr); |
| 74841 | 74776 | break; |
| 74842 | 74777 | } |
| 74843 | 74778 | } |
| 74844 | 74779 | |
| 74845 | | - if( testAddr ){ |
| 74846 | | - sqlite3VdbeJumpHere(v, testAddr-1); |
| 74780 | + if( testAddr>=0 ){ |
| 74781 | + sqlite3VdbeJumpHere(v, testAddr); |
| 74847 | 74782 | } |
| 74848 | 74783 | sqlite3ExprCachePop(pParse, 1); |
| 74849 | 74784 | |
| 74850 | 74785 | return rReg; |
| 74851 | 74786 | } |
| | @@ -76835,11 +76770,10 @@ |
| 76835 | 76770 | } |
| 76836 | 76771 | } |
| 76837 | 76772 | |
| 76838 | 76773 | /************** End of expr.c ************************************************/ |
| 76839 | 76774 | /************** Begin file alter.c *******************************************/ |
| 76840 | | -#line 1 "tsrc/alter.c" |
| 76841 | 76775 | /* |
| 76842 | 76776 | ** 2005 February 15 |
| 76843 | 76777 | ** |
| 76844 | 76778 | ** The author disclaims copyright to this source code. In place of |
| 76845 | 76779 | ** a legal notice, here is a blessing: |
| | @@ -77664,11 +77598,10 @@ |
| 77664 | 77598 | } |
| 77665 | 77599 | #endif /* SQLITE_ALTER_TABLE */ |
| 77666 | 77600 | |
| 77667 | 77601 | /************** End of alter.c ***********************************************/ |
| 77668 | 77602 | /************** Begin file analyze.c *****************************************/ |
| 77669 | | -#line 1 "tsrc/analyze.c" |
| 77670 | 77603 | /* |
| 77671 | 77604 | ** 2005 July 8 |
| 77672 | 77605 | ** |
| 77673 | 77606 | ** The author disclaims copyright to this source code. In place of |
| 77674 | 77607 | ** a legal notice, here is a blessing: |
| | @@ -78386,11 +78319,10 @@ |
| 78386 | 78319 | |
| 78387 | 78320 | #endif /* SQLITE_OMIT_ANALYZE */ |
| 78388 | 78321 | |
| 78389 | 78322 | /************** End of analyze.c *********************************************/ |
| 78390 | 78323 | /************** Begin file attach.c ******************************************/ |
| 78391 | | -#line 1 "tsrc/attach.c" |
| 78392 | 78324 | /* |
| 78393 | 78325 | ** 2003 April 6 |
| 78394 | 78326 | ** |
| 78395 | 78327 | ** The author disclaims copyright to this source code. In place of |
| 78396 | 78328 | ** a legal notice, here is a blessing: |
| | @@ -78946,11 +78878,10 @@ |
| 78946 | 78878 | } |
| 78947 | 78879 | #endif |
| 78948 | 78880 | |
| 78949 | 78881 | /************** End of attach.c **********************************************/ |
| 78950 | 78882 | /************** Begin file auth.c ********************************************/ |
| 78951 | | -#line 1 "tsrc/auth.c" |
| 78952 | 78883 | /* |
| 78953 | 78884 | ** 2003 January 11 |
| 78954 | 78885 | ** |
| 78955 | 78886 | ** The author disclaims copyright to this source code. In place of |
| 78956 | 78887 | ** a legal notice, here is a blessing: |
| | @@ -79198,11 +79129,10 @@ |
| 79198 | 79129 | |
| 79199 | 79130 | #endif /* SQLITE_OMIT_AUTHORIZATION */ |
| 79200 | 79131 | |
| 79201 | 79132 | /************** End of auth.c ************************************************/ |
| 79202 | 79133 | /************** Begin file build.c *******************************************/ |
| 79203 | | -#line 1 "tsrc/build.c" |
| 79204 | 79134 | /* |
| 79205 | 79135 | ** 2001 September 15 |
| 79206 | 79136 | ** |
| 79207 | 79137 | ** The author disclaims copyright to this source code. In place of |
| 79208 | 79138 | ** a legal notice, here is a blessing: |
| | @@ -83002,11 +82932,10 @@ |
| 83002 | 82932 | return pKey; |
| 83003 | 82933 | } |
| 83004 | 82934 | |
| 83005 | 82935 | /************** End of build.c ***********************************************/ |
| 83006 | 82936 | /************** Begin file callback.c ****************************************/ |
| 83007 | | -#line 1 "tsrc/callback.c" |
| 83008 | 82937 | /* |
| 83009 | 82938 | ** 2005 May 23 |
| 83010 | 82939 | ** |
| 83011 | 82940 | ** The author disclaims copyright to this source code. In place of |
| 83012 | 82941 | ** a legal notice, here is a blessing: |
| | @@ -83462,11 +83391,10 @@ |
| 83462 | 83391 | return p; |
| 83463 | 83392 | } |
| 83464 | 83393 | |
| 83465 | 83394 | /************** End of callback.c ********************************************/ |
| 83466 | 83395 | /************** Begin file delete.c ******************************************/ |
| 83467 | | -#line 1 "tsrc/delete.c" |
| 83468 | 83396 | /* |
| 83469 | 83397 | ** 2001 September 15 |
| 83470 | 83398 | ** |
| 83471 | 83399 | ** The author disclaims copyright to this source code. In place of |
| 83472 | 83400 | ** a legal notice, here is a blessing: |
| | @@ -84117,11 +84045,10 @@ |
| 84117 | 84045 | return regBase; |
| 84118 | 84046 | } |
| 84119 | 84047 | |
| 84120 | 84048 | /************** End of delete.c **********************************************/ |
| 84121 | 84049 | /************** Begin file func.c ********************************************/ |
| 84122 | | -#line 1 "tsrc/func.c" |
| 84123 | 84050 | /* |
| 84124 | 84051 | ** 2002 February 23 |
| 84125 | 84052 | ** |
| 84126 | 84053 | ** The author disclaims copyright to this source code. In place of |
| 84127 | 84054 | ** a legal notice, here is a blessing: |
| | @@ -85726,11 +85653,10 @@ |
| 85726 | 85653 | #endif |
| 85727 | 85654 | } |
| 85728 | 85655 | |
| 85729 | 85656 | /************** End of func.c ************************************************/ |
| 85730 | 85657 | /************** Begin file fkey.c ********************************************/ |
| 85731 | | -#line 1 "tsrc/fkey.c" |
| 85732 | 85658 | /* |
| 85733 | 85659 | ** |
| 85734 | 85660 | ** The author disclaims copyright to this source code. In place of |
| 85735 | 85661 | ** a legal notice, here is a blessing: |
| 85736 | 85662 | ** |
| | @@ -86947,11 +86873,10 @@ |
| 86947 | 86873 | } |
| 86948 | 86874 | #endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */ |
| 86949 | 86875 | |
| 86950 | 86876 | /************** End of fkey.c ************************************************/ |
| 86951 | 86877 | /************** Begin file insert.c ******************************************/ |
| 86952 | | -#line 1 "tsrc/insert.c" |
| 86953 | 86878 | /* |
| 86954 | 86879 | ** 2001 September 15 |
| 86955 | 86880 | ** |
| 86956 | 86881 | ** The author disclaims copyright to this source code. In place of |
| 86957 | 86882 | ** a legal notice, here is a blessing: |
| | @@ -88793,11 +88718,10 @@ |
| 88793 | 88718 | } |
| 88794 | 88719 | #endif /* SQLITE_OMIT_XFER_OPT */ |
| 88795 | 88720 | |
| 88796 | 88721 | /************** End of insert.c **********************************************/ |
| 88797 | 88722 | /************** Begin file legacy.c ******************************************/ |
| 88798 | | -#line 1 "tsrc/legacy.c" |
| 88799 | 88723 | /* |
| 88800 | 88724 | ** 2001 September 15 |
| 88801 | 88725 | ** |
| 88802 | 88726 | ** The author disclaims copyright to this source code. In place of |
| 88803 | 88727 | ** a legal notice, here is a blessing: |
| | @@ -88941,11 +88865,10 @@ |
| 88941 | 88865 | return rc; |
| 88942 | 88866 | } |
| 88943 | 88867 | |
| 88944 | 88868 | /************** End of legacy.c **********************************************/ |
| 88945 | 88869 | /************** Begin file loadext.c *****************************************/ |
| 88946 | | -#line 1 "tsrc/loadext.c" |
| 88947 | 88870 | /* |
| 88948 | 88871 | ** 2006 June 7 |
| 88949 | 88872 | ** |
| 88950 | 88873 | ** The author disclaims copyright to this source code. In place of |
| 88951 | 88874 | ** a legal notice, here is a blessing: |
| | @@ -88962,11 +88885,10 @@ |
| 88962 | 88885 | #ifndef SQLITE_CORE |
| 88963 | 88886 | #define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */ |
| 88964 | 88887 | #endif |
| 88965 | 88888 | /************** Include sqlite3ext.h in the middle of loadext.c **************/ |
| 88966 | 88889 | /************** Begin file sqlite3ext.h **************************************/ |
| 88967 | | -#line 1 "tsrc/sqlite3ext.h" |
| 88968 | 88890 | /* |
| 88969 | 88891 | ** 2006 June 7 |
| 88970 | 88892 | ** |
| 88971 | 88893 | ** The author disclaims copyright to this source code. In place of |
| 88972 | 88894 | ** a legal notice, here is a blessing: |
| | @@ -89391,11 +89313,10 @@ |
| 89391 | 89313 | |
| 89392 | 89314 | #endif /* _SQLITE3EXT_H_ */ |
| 89393 | 89315 | |
| 89394 | 89316 | /************** End of sqlite3ext.h ******************************************/ |
| 89395 | 89317 | /************** Continuing where we left off in loadext.c ********************/ |
| 89396 | | -#line 20 "tsrc/loadext.c" |
| 89397 | 89318 | /* #include <string.h> */ |
| 89398 | 89319 | |
| 89399 | 89320 | #ifndef SQLITE_OMIT_LOAD_EXTENSION |
| 89400 | 89321 | |
| 89401 | 89322 | /* |
| | @@ -90031,11 +89952,10 @@ |
| 90031 | 89952 | } |
| 90032 | 89953 | } |
| 90033 | 89954 | |
| 90034 | 89955 | /************** End of loadext.c *********************************************/ |
| 90035 | 89956 | /************** Begin file pragma.c ******************************************/ |
| 90036 | | -#line 1 "tsrc/pragma.c" |
| 90037 | 89957 | /* |
| 90038 | 89958 | ** 2003 April 6 |
| 90039 | 89959 | ** |
| 90040 | 89960 | ** The author disclaims copyright to this source code. In place of |
| 90041 | 89961 | ** a legal notice, here is a blessing: |
| | @@ -91560,11 +91480,10 @@ |
| 91560 | 91480 | |
| 91561 | 91481 | #endif /* SQLITE_OMIT_PRAGMA */ |
| 91562 | 91482 | |
| 91563 | 91483 | /************** End of pragma.c **********************************************/ |
| 91564 | 91484 | /************** Begin file prepare.c *****************************************/ |
| 91565 | | -#line 1 "tsrc/prepare.c" |
| 91566 | 91485 | /* |
| 91567 | 91486 | ** 2005 May 25 |
| 91568 | 91487 | ** |
| 91569 | 91488 | ** The author disclaims copyright to this source code. In place of |
| 91570 | 91489 | ** a legal notice, here is a blessing: |
| | @@ -92421,11 +92340,10 @@ |
| 92421 | 92340 | |
| 92422 | 92341 | #endif /* SQLITE_OMIT_UTF16 */ |
| 92423 | 92342 | |
| 92424 | 92343 | /************** End of prepare.c *********************************************/ |
| 92425 | 92344 | /************** Begin file select.c ******************************************/ |
| 92426 | | -#line 1 "tsrc/select.c" |
| 92427 | 92345 | /* |
| 92428 | 92346 | ** 2001 September 15 |
| 92429 | 92347 | ** |
| 92430 | 92348 | ** The author disclaims copyright to this source code. In place of |
| 92431 | 92349 | ** a legal notice, here is a blessing: |
| | @@ -92512,10 +92430,12 @@ |
| 92512 | 92430 | pNew->addrOpenEphm[2] = -1; |
| 92513 | 92431 | if( db->mallocFailed ) { |
| 92514 | 92432 | clearSelect(db, pNew); |
| 92515 | 92433 | if( pNew!=&standin ) sqlite3DbFree(db, pNew); |
| 92516 | 92434 | pNew = 0; |
| 92435 | + }else{ |
| 92436 | + assert( pNew->pSrc!=0 || pParse->nErr>0 ); |
| 92517 | 92437 | } |
| 92518 | 92438 | return pNew; |
| 92519 | 92439 | } |
| 92520 | 92440 | |
| 92521 | 92441 | /* |
| | @@ -96224,11 +96144,15 @@ |
| 96224 | 96144 | struct SrcList_item *pItem = &pTabList->a[i]; |
| 96225 | 96145 | SelectDest dest; |
| 96226 | 96146 | Select *pSub = pItem->pSelect; |
| 96227 | 96147 | int isAggSub; |
| 96228 | 96148 | |
| 96229 | | - if( pSub==0 || pItem->isPopulated ) continue; |
| 96149 | + if( pSub==0 ) continue; |
| 96150 | + if( pItem->addrFillSub ){ |
| 96151 | + sqlite3VdbeAddOp2(v, OP_Gosub, pItem->regReturn, pItem->addrFillSub); |
| 96152 | + continue; |
| 96153 | + } |
| 96230 | 96154 | |
| 96231 | 96155 | /* Increment Parse.nHeight by the height of the largest expression |
| 96232 | 96156 | ** tree refered to by this, the parent select. The child select |
| 96233 | 96157 | ** may contain expression trees of at most |
| 96234 | 96158 | ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit |
| | @@ -96235,25 +96159,48 @@ |
| 96235 | 96159 | ** more conservative than necessary, but much easier than enforcing |
| 96236 | 96160 | ** an exact limit. |
| 96237 | 96161 | */ |
| 96238 | 96162 | pParse->nHeight += sqlite3SelectExprHeight(p); |
| 96239 | 96163 | |
| 96240 | | - /* Check to see if the subquery can be absorbed into the parent. */ |
| 96241 | 96164 | isAggSub = (pSub->selFlags & SF_Aggregate)!=0; |
| 96242 | 96165 | if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){ |
| 96166 | + /* This subquery can be absorbed into its parent. */ |
| 96243 | 96167 | if( isAggSub ){ |
| 96244 | 96168 | isAgg = 1; |
| 96245 | 96169 | p->selFlags |= SF_Aggregate; |
| 96246 | 96170 | } |
| 96247 | 96171 | i = -1; |
| 96248 | 96172 | }else{ |
| 96173 | + /* Generate a subroutine that will fill an ephemeral table with |
| 96174 | + ** the content of this subquery. pItem->addrFillSub will point |
| 96175 | + ** to the address of the generated subroutine. pItem->regReturn |
| 96176 | + ** is a register allocated to hold the subroutine return address |
| 96177 | + */ |
| 96178 | + int topAddr; |
| 96179 | + int onceAddr = 0; |
| 96180 | + int retAddr; |
| 96181 | + assert( pItem->addrFillSub==0 ); |
| 96182 | + pItem->regReturn = ++pParse->nMem; |
| 96183 | + topAddr = sqlite3VdbeAddOp2(v, OP_Integer, 0, pItem->regReturn); |
| 96184 | + pItem->addrFillSub = topAddr+1; |
| 96185 | + VdbeNoopComment((v, "materialize %s", pItem->pTab->zName)); |
| 96186 | + if( pItem->isCorrelated==0 && pParse->pTriggerTab==0 ){ |
| 96187 | + /* If the subquery is no correlated and if we are not inside of |
| 96188 | + ** a trigger, then we only need to compute the value of the subquery |
| 96189 | + ** once. */ |
| 96190 | + int regOnce = ++pParse->nMem; |
| 96191 | + onceAddr = sqlite3VdbeAddOp1(v, OP_Once, regOnce); |
| 96192 | + } |
| 96249 | 96193 | sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor); |
| 96250 | | - assert( pItem->isPopulated==0 ); |
| 96251 | 96194 | explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId); |
| 96252 | 96195 | sqlite3Select(pParse, pSub, &dest); |
| 96253 | | - pItem->isPopulated = 1; |
| 96254 | 96196 | pItem->pTab->nRowEst = (unsigned)pSub->nSelectRow; |
| 96197 | + if( onceAddr ) sqlite3VdbeJumpHere(v, onceAddr); |
| 96198 | + retAddr = sqlite3VdbeAddOp1(v, OP_Return, pItem->regReturn); |
| 96199 | + VdbeComment((v, "end %s", pItem->pTab->zName)); |
| 96200 | + sqlite3VdbeChangeP1(v, topAddr, retAddr); |
| 96201 | + |
| 96255 | 96202 | } |
| 96256 | 96203 | if( /*pParse->nErr ||*/ db->mallocFailed ){ |
| 96257 | 96204 | goto select_end; |
| 96258 | 96205 | } |
| 96259 | 96206 | pParse->nHeight -= sqlite3SelectExprHeight(p); |
| | @@ -96390,11 +96337,11 @@ |
| 96390 | 96337 | /* If sorting index that was created by a prior OP_OpenEphemeral |
| 96391 | 96338 | ** instruction ended up not being needed, then change the OP_OpenEphemeral |
| 96392 | 96339 | ** into an OP_Noop. |
| 96393 | 96340 | */ |
| 96394 | 96341 | if( addrSortIndex>=0 && pOrderBy==0 ){ |
| 96395 | | - sqlite3VdbeChangeToNoop(v, addrSortIndex, 1); |
| 96342 | + sqlite3VdbeChangeToNoop(v, addrSortIndex); |
| 96396 | 96343 | p->addrOpenEphm[2] = -1; |
| 96397 | 96344 | } |
| 96398 | 96345 | |
| 96399 | 96346 | if( pWInfo->eDistinct ){ |
| 96400 | 96347 | VdbeOp *pOp; /* No longer required OpenEphemeral instr. */ |
| | @@ -96673,11 +96620,11 @@ |
| 96673 | 96620 | */ |
| 96674 | 96621 | if( groupBySort ){ |
| 96675 | 96622 | sqlite3VdbeAddOp2(v, OP_SorterNext, sAggInfo.sortingIdx, addrTopOfLoop); |
| 96676 | 96623 | }else{ |
| 96677 | 96624 | sqlite3WhereEnd(pWInfo); |
| 96678 | | - sqlite3VdbeChangeToNoop(v, addrSortingIdx, 1); |
| 96625 | + sqlite3VdbeChangeToNoop(v, addrSortingIdx); |
| 96679 | 96626 | } |
| 96680 | 96627 | |
| 96681 | 96628 | /* Output the final row of result |
| 96682 | 96629 | */ |
| 96683 | 96630 | sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow); |
| | @@ -96981,11 +96928,10 @@ |
| 96981 | 96928 | *****************************************************************************/ |
| 96982 | 96929 | #endif /* defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */ |
| 96983 | 96930 | |
| 96984 | 96931 | /************** End of select.c **********************************************/ |
| 96985 | 96932 | /************** Begin file table.c *******************************************/ |
| 96986 | | -#line 1 "tsrc/table.c" |
| 96987 | 96933 | /* |
| 96988 | 96934 | ** 2001 September 15 |
| 96989 | 96935 | ** |
| 96990 | 96936 | ** The author disclaims copyright to this source code. In place of |
| 96991 | 96937 | ** a legal notice, here is a blessing: |
| | @@ -97181,11 +97127,10 @@ |
| 97181 | 97127 | |
| 97182 | 97128 | #endif /* SQLITE_OMIT_GET_TABLE */ |
| 97183 | 97129 | |
| 97184 | 97130 | /************** End of table.c ***********************************************/ |
| 97185 | 97131 | /************** Begin file trigger.c *****************************************/ |
| 97186 | | -#line 1 "tsrc/trigger.c" |
| 97187 | 97132 | /* |
| 97188 | 97133 | ** |
| 97189 | 97134 | ** The author disclaims copyright to this source code. In place of |
| 97190 | 97135 | ** a legal notice, here is a blessing: |
| 97191 | 97136 | ** |
| | @@ -98307,11 +98252,10 @@ |
| 98307 | 98252 | |
| 98308 | 98253 | #endif /* !defined(SQLITE_OMIT_TRIGGER) */ |
| 98309 | 98254 | |
| 98310 | 98255 | /************** End of trigger.c *********************************************/ |
| 98311 | 98256 | /************** Begin file update.c ******************************************/ |
| 98312 | | -#line 1 "tsrc/update.c" |
| 98313 | 98257 | /* |
| 98314 | 98258 | ** 2001 September 15 |
| 98315 | 98259 | ** |
| 98316 | 98260 | ** The author disclaims copyright to this source code. In place of |
| 98317 | 98261 | ** a legal notice, here is a blessing: |
| | @@ -98980,11 +98924,10 @@ |
| 98980 | 98924 | } |
| 98981 | 98925 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 98982 | 98926 | |
| 98983 | 98927 | /************** End of update.c **********************************************/ |
| 98984 | 98928 | /************** Begin file vacuum.c ******************************************/ |
| 98985 | | -#line 1 "tsrc/vacuum.c" |
| 98986 | 98929 | /* |
| 98987 | 98930 | ** 2003 April 6 |
| 98988 | 98931 | ** |
| 98989 | 98932 | ** The author disclaims copyright to this source code. In place of |
| 98990 | 98933 | ** a legal notice, here is a blessing: |
| | @@ -99327,11 +99270,10 @@ |
| 99327 | 99270 | |
| 99328 | 99271 | #endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */ |
| 99329 | 99272 | |
| 99330 | 99273 | /************** End of vacuum.c **********************************************/ |
| 99331 | 99274 | /************** Begin file vtab.c ********************************************/ |
| 99332 | | -#line 1 "tsrc/vtab.c" |
| 99333 | 99275 | /* |
| 99334 | 99276 | ** 2006 June 10 |
| 99335 | 99277 | ** |
| 99336 | 99278 | ** The author disclaims copyright to this source code. In place of |
| 99337 | 99279 | ** a legal notice, here is a blessing: |
| | @@ -100396,11 +100338,10 @@ |
| 100396 | 100338 | |
| 100397 | 100339 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 100398 | 100340 | |
| 100399 | 100341 | /************** End of vtab.c ************************************************/ |
| 100400 | 100342 | /************** Begin file where.c *******************************************/ |
| 100401 | | -#line 1 "tsrc/where.c" |
| 100402 | 100343 | /* |
| 100403 | 100344 | ** 2001 September 15 |
| 100404 | 100345 | ** |
| 100405 | 100346 | ** The author disclaims copyright to this source code. In place of |
| 100406 | 100347 | ** a legal notice, here is a blessing: |
| | @@ -100865,15 +100806,23 @@ |
| 100865 | 100806 | return mask; |
| 100866 | 100807 | } |
| 100867 | 100808 | static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){ |
| 100868 | 100809 | Bitmask mask = 0; |
| 100869 | 100810 | while( pS ){ |
| 100811 | + SrcList *pSrc = pS->pSrc; |
| 100870 | 100812 | mask |= exprListTableUsage(pMaskSet, pS->pEList); |
| 100871 | 100813 | mask |= exprListTableUsage(pMaskSet, pS->pGroupBy); |
| 100872 | 100814 | mask |= exprListTableUsage(pMaskSet, pS->pOrderBy); |
| 100873 | 100815 | mask |= exprTableUsage(pMaskSet, pS->pWhere); |
| 100874 | 100816 | mask |= exprTableUsage(pMaskSet, pS->pHaving); |
| 100817 | + if( ALWAYS(pSrc!=0) ){ |
| 100818 | + int i; |
| 100819 | + for(i=0; i<pSrc->nSrc; i++){ |
| 100820 | + mask |= exprSelectTableUsage(pMaskSet, pSrc->a[i].pSelect); |
| 100821 | + mask |= exprTableUsage(pMaskSet, pSrc->a[i].pOn); |
| 100822 | + } |
| 100823 | + } |
| 100875 | 100824 | pS = pS->pPrior; |
| 100876 | 100825 | } |
| 100877 | 100826 | return mask; |
| 100878 | 100827 | } |
| 100879 | 100828 | |
| | @@ -102392,12 +102341,11 @@ |
| 102392 | 102341 | /* Generate code to skip over the creation and initialization of the |
| 102393 | 102342 | ** transient index on 2nd and subsequent iterations of the loop. */ |
| 102394 | 102343 | v = pParse->pVdbe; |
| 102395 | 102344 | assert( v!=0 ); |
| 102396 | 102345 | regIsInit = ++pParse->nMem; |
| 102397 | | - addrInit = sqlite3VdbeAddOp1(v, OP_If, regIsInit); |
| 102398 | | - sqlite3VdbeAddOp2(v, OP_Integer, 1, regIsInit); |
| 102346 | + addrInit = sqlite3VdbeAddOp1(v, OP_Once, regIsInit); |
| 102399 | 102347 | |
| 102400 | 102348 | /* Count the number of columns that will be added to the index |
| 102401 | 102349 | ** and used to match WHERE clause constraints */ |
| 102402 | 102350 | nColumn = 0; |
| 102403 | 102351 | pTable = pSrc->pTab; |
| | @@ -105583,11 +105531,10 @@ |
| 105583 | 105531 | return; |
| 105584 | 105532 | } |
| 105585 | 105533 | |
| 105586 | 105534 | /************** End of where.c ***********************************************/ |
| 105587 | 105535 | /************** Begin file parse.c *******************************************/ |
| 105588 | | -#line 1 "tsrc/parse.c" |
| 105589 | 105536 | /* Driver template for the LEMON parser generator. |
| 105590 | 105537 | ** The author disclaims copyright to this source code. |
| 105591 | 105538 | ** |
| 105592 | 105539 | ** This version of "lempar.c" is modified, slightly, for use by SQLite. |
| 105593 | 105540 | ** The only modifications are the addition of a couple of NEVER() |
| | @@ -105596,11 +105543,10 @@ |
| 105596 | 105543 | ** specific grammar used by SQLite. |
| 105597 | 105544 | */ |
| 105598 | 105545 | /* First off, code is included that follows the "include" declaration |
| 105599 | 105546 | ** in the input grammar file. */ |
| 105600 | 105547 | /* #include <stdio.h> */ |
| 105601 | | -#line 51 "parse.y" |
| 105602 | 105548 | |
| 105603 | 105549 | |
| 105604 | 105550 | /* |
| 105605 | 105551 | ** Disable all error recovery processing in the parser push-down |
| 105606 | 105552 | ** automaton. |
| | @@ -105644,11 +105590,10 @@ |
| 105644 | 105590 | /* |
| 105645 | 105591 | ** An instance of this structure holds the ATTACH key and the key type. |
| 105646 | 105592 | */ |
| 105647 | 105593 | struct AttachKey { int type; Token key; }; |
| 105648 | 105594 | |
| 105649 | | -#line 722 "parse.y" |
| 105650 | 105595 | |
| 105651 | 105596 | /* This is a utility routine used to set the ExprSpan.zStart and |
| 105652 | 105597 | ** ExprSpan.zEnd values of pOut so that the span covers the complete |
| 105653 | 105598 | ** range of text beginning with pStart and going to the end of pEnd. |
| 105654 | 105599 | */ |
| | @@ -105664,11 +105609,10 @@ |
| 105664 | 105609 | static void spanExpr(ExprSpan *pOut, Parse *pParse, int op, Token *pValue){ |
| 105665 | 105610 | pOut->pExpr = sqlite3PExpr(pParse, op, 0, 0, pValue); |
| 105666 | 105611 | pOut->zStart = pValue->z; |
| 105667 | 105612 | pOut->zEnd = &pValue->z[pValue->n]; |
| 105668 | 105613 | } |
| 105669 | | -#line 817 "parse.y" |
| 105670 | 105614 | |
| 105671 | 105615 | /* This routine constructs a binary expression node out of two ExprSpan |
| 105672 | 105616 | ** objects and uses the result to populate a new ExprSpan object. |
| 105673 | 105617 | */ |
| 105674 | 105618 | static void spanBinaryExpr( |
| | @@ -105680,11 +105624,10 @@ |
| 105680 | 105624 | ){ |
| 105681 | 105625 | pOut->pExpr = sqlite3PExpr(pParse, op, pLeft->pExpr, pRight->pExpr, 0); |
| 105682 | 105626 | pOut->zStart = pLeft->zStart; |
| 105683 | 105627 | pOut->zEnd = pRight->zEnd; |
| 105684 | 105628 | } |
| 105685 | | -#line 873 "parse.y" |
| 105686 | 105629 | |
| 105687 | 105630 | /* Construct an expression node for a unary postfix operator |
| 105688 | 105631 | */ |
| 105689 | 105632 | static void spanUnaryPostfix( |
| 105690 | 105633 | ExprSpan *pOut, /* Write the new expression node here */ |
| | @@ -105695,11 +105638,10 @@ |
| 105695 | 105638 | ){ |
| 105696 | 105639 | pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0); |
| 105697 | 105640 | pOut->zStart = pOperand->zStart; |
| 105698 | 105641 | pOut->zEnd = &pPostOp->z[pPostOp->n]; |
| 105699 | 105642 | } |
| 105700 | | -#line 892 "parse.y" |
| 105701 | 105643 | |
| 105702 | 105644 | /* A routine to convert a binary TK_IS or TK_ISNOT expression into a |
| 105703 | 105645 | ** unary TK_ISNULL or TK_NOTNULL expression. */ |
| 105704 | 105646 | static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){ |
| 105705 | 105647 | sqlite3 *db = pParse->db; |
| | @@ -105707,11 +105649,10 @@ |
| 105707 | 105649 | pA->op = (u8)op; |
| 105708 | 105650 | sqlite3ExprDelete(db, pA->pRight); |
| 105709 | 105651 | pA->pRight = 0; |
| 105710 | 105652 | } |
| 105711 | 105653 | } |
| 105712 | | -#line 920 "parse.y" |
| 105713 | 105654 | |
| 105714 | 105655 | /* Construct an expression node for a unary prefix operator |
| 105715 | 105656 | */ |
| 105716 | 105657 | static void spanUnaryPrefix( |
| 105717 | 105658 | ExprSpan *pOut, /* Write the new expression node here */ |
| | @@ -105722,11 +105663,10 @@ |
| 105722 | 105663 | ){ |
| 105723 | 105664 | pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0); |
| 105724 | 105665 | pOut->zStart = pPreOp->z; |
| 105725 | 105666 | pOut->zEnd = pOperand->zEnd; |
| 105726 | 105667 | } |
| 105727 | | -#line 141 "parse.c" |
| 105728 | 105668 | /* Next is all token values, in a form suitable for use by makeheaders. |
| 105729 | 105669 | ** This section will be null unless lemon is run with the -m switch. |
| 105730 | 105670 | */ |
| 105731 | 105671 | /* |
| 105732 | 105672 | ** These constants (all generated automatically by the parser generator) |
| | @@ -106978,21 +106918,17 @@ |
| 106978 | 106918 | ** inside the C code. |
| 106979 | 106919 | */ |
| 106980 | 106920 | case 160: /* select */ |
| 106981 | 106921 | case 194: /* oneselect */ |
| 106982 | 106922 | { |
| 106983 | | -#line 403 "parse.y" |
| 106984 | 106923 | sqlite3SelectDelete(pParse->db, (yypminor->yy387)); |
| 106985 | | -#line 1399 "parse.c" |
| 106986 | 106924 | } |
| 106987 | 106925 | break; |
| 106988 | 106926 | case 174: /* term */ |
| 106989 | 106927 | case 175: /* expr */ |
| 106990 | 106928 | { |
| 106991 | | -#line 720 "parse.y" |
| 106992 | 106929 | sqlite3ExprDelete(pParse->db, (yypminor->yy118).pExpr); |
| 106993 | | -#line 1407 "parse.c" |
| 106994 | 106930 | } |
| 106995 | 106931 | break; |
| 106996 | 106932 | case 179: /* idxlist_opt */ |
| 106997 | 106933 | case 187: /* idxlist */ |
| 106998 | 106934 | case 197: /* selcollist */ |
| | @@ -107004,23 +106940,19 @@ |
| 107004 | 106940 | case 217: /* setlist */ |
| 107005 | 106941 | case 220: /* itemlist */ |
| 107006 | 106942 | case 221: /* exprlist */ |
| 107007 | 106943 | case 226: /* case_exprlist */ |
| 107008 | 106944 | { |
| 107009 | | -#line 1103 "parse.y" |
| 107010 | 106945 | sqlite3ExprListDelete(pParse->db, (yypminor->yy322)); |
| 107011 | | -#line 1425 "parse.c" |
| 107012 | 106946 | } |
| 107013 | 106947 | break; |
| 107014 | 106948 | case 193: /* fullname */ |
| 107015 | 106949 | case 198: /* from */ |
| 107016 | 106950 | case 206: /* seltablist */ |
| 107017 | 106951 | case 207: /* stl_prefix */ |
| 107018 | 106952 | { |
| 107019 | | -#line 534 "parse.y" |
| 107020 | 106953 | sqlite3SrcListDelete(pParse->db, (yypminor->yy259)); |
| 107021 | | -#line 1435 "parse.c" |
| 107022 | 106954 | } |
| 107023 | 106955 | break; |
| 107024 | 106956 | case 199: /* where_opt */ |
| 107025 | 106957 | case 201: /* having_opt */ |
| 107026 | 106958 | case 210: /* on_opt */ |
| | @@ -107028,37 +106960,29 @@ |
| 107028 | 106960 | case 225: /* case_operand */ |
| 107029 | 106961 | case 227: /* case_else */ |
| 107030 | 106962 | case 238: /* when_clause */ |
| 107031 | 106963 | case 243: /* key_opt */ |
| 107032 | 106964 | { |
| 107033 | | -#line 644 "parse.y" |
| 107034 | 106965 | sqlite3ExprDelete(pParse->db, (yypminor->yy314)); |
| 107035 | | -#line 1449 "parse.c" |
| 107036 | 106966 | } |
| 107037 | 106967 | break; |
| 107038 | 106968 | case 211: /* using_opt */ |
| 107039 | 106969 | case 213: /* inscollist */ |
| 107040 | 106970 | case 219: /* inscollist_opt */ |
| 107041 | 106971 | { |
| 107042 | | -#line 566 "parse.y" |
| 107043 | 106972 | sqlite3IdListDelete(pParse->db, (yypminor->yy384)); |
| 107044 | | -#line 1458 "parse.c" |
| 107045 | 106973 | } |
| 107046 | 106974 | break; |
| 107047 | 106975 | case 234: /* trigger_cmd_list */ |
| 107048 | 106976 | case 239: /* trigger_cmd */ |
| 107049 | 106977 | { |
| 107050 | | -#line 1210 "parse.y" |
| 107051 | 106978 | sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy203)); |
| 107052 | | -#line 1466 "parse.c" |
| 107053 | 106979 | } |
| 107054 | 106980 | break; |
| 107055 | 106981 | case 236: /* trigger_event */ |
| 107056 | 106982 | { |
| 107057 | | -#line 1196 "parse.y" |
| 107058 | 106983 | sqlite3IdListDelete(pParse->db, (yypminor->yy90).b); |
| 107059 | | -#line 1473 "parse.c" |
| 107060 | 106984 | } |
| 107061 | 106985 | break; |
| 107062 | 106986 | default: break; /* If no destructor action specified: do nothing */ |
| 107063 | 106987 | } |
| 107064 | 106988 | } |
| | @@ -107240,16 +107164,14 @@ |
| 107240 | 107164 | } |
| 107241 | 107165 | #endif |
| 107242 | 107166 | while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); |
| 107243 | 107167 | /* Here code is inserted which will execute if the parser |
| 107244 | 107168 | ** stack every overflows */ |
| 107245 | | -#line 38 "parse.y" |
| 107246 | 107169 | |
| 107247 | 107170 | UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */ |
| 107248 | 107171 | sqlite3ErrorMsg(pParse, "parser stack overflow"); |
| 107249 | 107172 | pParse->parseError = 1; |
| 107250 | | -#line 1664 "parse.c" |
| 107251 | 107173 | sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */ |
| 107252 | 107174 | } |
| 107253 | 107175 | |
| 107254 | 107176 | /* |
| 107255 | 107177 | ** Perform a shift action. |
| | @@ -107686,94 +107608,66 @@ |
| 107686 | 107608 | ** { ... } // User supplied code |
| 107687 | 107609 | ** #line <lineno> <thisfile> |
| 107688 | 107610 | ** break; |
| 107689 | 107611 | */ |
| 107690 | 107612 | case 5: /* explain ::= */ |
| 107691 | | -#line 107 "parse.y" |
| 107692 | 107613 | { sqlite3BeginParse(pParse, 0); } |
| 107693 | | -#line 2107 "parse.c" |
| 107694 | 107614 | break; |
| 107695 | 107615 | case 6: /* explain ::= EXPLAIN */ |
| 107696 | | -#line 109 "parse.y" |
| 107697 | 107616 | { sqlite3BeginParse(pParse, 1); } |
| 107698 | | -#line 2112 "parse.c" |
| 107699 | 107617 | break; |
| 107700 | 107618 | case 7: /* explain ::= EXPLAIN QUERY PLAN */ |
| 107701 | | -#line 110 "parse.y" |
| 107702 | 107619 | { sqlite3BeginParse(pParse, 2); } |
| 107703 | | -#line 2117 "parse.c" |
| 107704 | 107620 | break; |
| 107705 | 107621 | case 8: /* cmdx ::= cmd */ |
| 107706 | | -#line 112 "parse.y" |
| 107707 | 107622 | { sqlite3FinishCoding(pParse); } |
| 107708 | | -#line 2122 "parse.c" |
| 107709 | 107623 | break; |
| 107710 | 107624 | case 9: /* cmd ::= BEGIN transtype trans_opt */ |
| 107711 | | -#line 117 "parse.y" |
| 107712 | 107625 | {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy4);} |
| 107713 | | -#line 2127 "parse.c" |
| 107714 | 107626 | break; |
| 107715 | 107627 | case 13: /* transtype ::= */ |
| 107716 | | -#line 122 "parse.y" |
| 107717 | 107628 | {yygotominor.yy4 = TK_DEFERRED;} |
| 107718 | | -#line 2132 "parse.c" |
| 107719 | 107629 | break; |
| 107720 | 107630 | case 14: /* transtype ::= DEFERRED */ |
| 107721 | 107631 | case 15: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==15); |
| 107722 | 107632 | case 16: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==16); |
| 107723 | 107633 | case 115: /* multiselect_op ::= UNION */ yytestcase(yyruleno==115); |
| 107724 | 107634 | case 117: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==117); |
| 107725 | | -#line 123 "parse.y" |
| 107726 | 107635 | {yygotominor.yy4 = yymsp[0].major;} |
| 107727 | | -#line 2141 "parse.c" |
| 107728 | 107636 | break; |
| 107729 | 107637 | case 17: /* cmd ::= COMMIT trans_opt */ |
| 107730 | 107638 | case 18: /* cmd ::= END trans_opt */ yytestcase(yyruleno==18); |
| 107731 | | -#line 126 "parse.y" |
| 107732 | 107639 | {sqlite3CommitTransaction(pParse);} |
| 107733 | | -#line 2147 "parse.c" |
| 107734 | 107640 | break; |
| 107735 | 107641 | case 19: /* cmd ::= ROLLBACK trans_opt */ |
| 107736 | | -#line 128 "parse.y" |
| 107737 | 107642 | {sqlite3RollbackTransaction(pParse);} |
| 107738 | | -#line 2152 "parse.c" |
| 107739 | 107643 | break; |
| 107740 | 107644 | case 22: /* cmd ::= SAVEPOINT nm */ |
| 107741 | | -#line 132 "parse.y" |
| 107742 | 107645 | { |
| 107743 | 107646 | sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0); |
| 107744 | 107647 | } |
| 107745 | | -#line 2159 "parse.c" |
| 107746 | 107648 | break; |
| 107747 | 107649 | case 23: /* cmd ::= RELEASE savepoint_opt nm */ |
| 107748 | | -#line 135 "parse.y" |
| 107749 | 107650 | { |
| 107750 | 107651 | sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0); |
| 107751 | 107652 | } |
| 107752 | | -#line 2166 "parse.c" |
| 107753 | 107653 | break; |
| 107754 | 107654 | case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */ |
| 107755 | | -#line 138 "parse.y" |
| 107756 | 107655 | { |
| 107757 | 107656 | sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0); |
| 107758 | 107657 | } |
| 107759 | | -#line 2173 "parse.c" |
| 107760 | 107658 | break; |
| 107761 | 107659 | case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */ |
| 107762 | | -#line 145 "parse.y" |
| 107763 | 107660 | { |
| 107764 | 107661 | sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy4,0,0,yymsp[-2].minor.yy4); |
| 107765 | 107662 | } |
| 107766 | | -#line 2180 "parse.c" |
| 107767 | 107663 | break; |
| 107768 | 107664 | case 27: /* createkw ::= CREATE */ |
| 107769 | | -#line 148 "parse.y" |
| 107770 | 107665 | { |
| 107771 | 107666 | pParse->db->lookaside.bEnabled = 0; |
| 107772 | 107667 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 107773 | 107668 | } |
| 107774 | | -#line 2188 "parse.c" |
| 107775 | 107669 | break; |
| 107776 | 107670 | case 28: /* ifnotexists ::= */ |
| 107777 | 107671 | case 31: /* temp ::= */ yytestcase(yyruleno==31); |
| 107778 | 107672 | case 70: /* autoinc ::= */ yytestcase(yyruleno==70); |
| 107779 | 107673 | case 83: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==83); |
| | @@ -107783,56 +107677,44 @@ |
| 107783 | 107677 | case 109: /* ifexists ::= */ yytestcase(yyruleno==109); |
| 107784 | 107678 | case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120); |
| 107785 | 107679 | case 121: /* distinct ::= */ yytestcase(yyruleno==121); |
| 107786 | 107680 | case 222: /* between_op ::= BETWEEN */ yytestcase(yyruleno==222); |
| 107787 | 107681 | case 225: /* in_op ::= IN */ yytestcase(yyruleno==225); |
| 107788 | | -#line 153 "parse.y" |
| 107789 | 107682 | {yygotominor.yy4 = 0;} |
| 107790 | | -#line 2204 "parse.c" |
| 107791 | 107683 | break; |
| 107792 | 107684 | case 29: /* ifnotexists ::= IF NOT EXISTS */ |
| 107793 | 107685 | case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30); |
| 107794 | 107686 | case 71: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==71); |
| 107795 | 107687 | case 86: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==86); |
| 107796 | 107688 | case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108); |
| 107797 | 107689 | case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119); |
| 107798 | 107690 | case 223: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==223); |
| 107799 | 107691 | case 226: /* in_op ::= NOT IN */ yytestcase(yyruleno==226); |
| 107800 | | -#line 154 "parse.y" |
| 107801 | 107692 | {yygotominor.yy4 = 1;} |
| 107802 | | -#line 2216 "parse.c" |
| 107803 | 107693 | break; |
| 107804 | 107694 | case 32: /* create_table_args ::= LP columnlist conslist_opt RP */ |
| 107805 | | -#line 160 "parse.y" |
| 107806 | 107695 | { |
| 107807 | 107696 | sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0); |
| 107808 | 107697 | } |
| 107809 | | -#line 2223 "parse.c" |
| 107810 | 107698 | break; |
| 107811 | 107699 | case 33: /* create_table_args ::= AS select */ |
| 107812 | | -#line 163 "parse.y" |
| 107813 | 107700 | { |
| 107814 | 107701 | sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy387); |
| 107815 | 107702 | sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387); |
| 107816 | 107703 | } |
| 107817 | | -#line 2231 "parse.c" |
| 107818 | 107704 | break; |
| 107819 | 107705 | case 36: /* column ::= columnid type carglist */ |
| 107820 | | -#line 175 "parse.y" |
| 107821 | 107706 | { |
| 107822 | 107707 | yygotominor.yy0.z = yymsp[-2].minor.yy0.z; |
| 107823 | 107708 | yygotominor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n; |
| 107824 | 107709 | } |
| 107825 | | -#line 2239 "parse.c" |
| 107826 | 107710 | break; |
| 107827 | 107711 | case 37: /* columnid ::= nm */ |
| 107828 | | -#line 179 "parse.y" |
| 107829 | 107712 | { |
| 107830 | 107713 | sqlite3AddColumn(pParse,&yymsp[0].minor.yy0); |
| 107831 | 107714 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 107832 | 107715 | } |
| 107833 | | -#line 2247 "parse.c" |
| 107834 | 107716 | break; |
| 107835 | 107717 | case 38: /* id ::= ID */ |
| 107836 | 107718 | case 39: /* id ::= INDEXED */ yytestcase(yyruleno==39); |
| 107837 | 107719 | case 40: /* ids ::= ID|STRING */ yytestcase(yyruleno==40); |
| 107838 | 107720 | case 41: /* nm ::= id */ yytestcase(yyruleno==41); |
| | @@ -107852,373 +107734,256 @@ |
| 107852 | 107734 | case 264: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==264); |
| 107853 | 107735 | case 265: /* plus_num ::= plus_opt number */ yytestcase(yyruleno==265); |
| 107854 | 107736 | case 266: /* minus_num ::= MINUS number */ yytestcase(yyruleno==266); |
| 107855 | 107737 | case 267: /* number ::= INTEGER|FLOAT */ yytestcase(yyruleno==267); |
| 107856 | 107738 | case 285: /* trnm ::= nm */ yytestcase(yyruleno==285); |
| 107857 | | -#line 189 "parse.y" |
| 107858 | 107739 | {yygotominor.yy0 = yymsp[0].minor.yy0;} |
| 107859 | | -#line 2273 "parse.c" |
| 107860 | 107740 | break; |
| 107861 | 107741 | case 45: /* type ::= typetoken */ |
| 107862 | | -#line 251 "parse.y" |
| 107863 | 107742 | {sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);} |
| 107864 | | -#line 2278 "parse.c" |
| 107865 | 107743 | break; |
| 107866 | 107744 | case 47: /* typetoken ::= typename LP signed RP */ |
| 107867 | | -#line 253 "parse.y" |
| 107868 | 107745 | { |
| 107869 | 107746 | yygotominor.yy0.z = yymsp[-3].minor.yy0.z; |
| 107870 | 107747 | yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z); |
| 107871 | 107748 | } |
| 107872 | | -#line 2286 "parse.c" |
| 107873 | 107749 | break; |
| 107874 | 107750 | case 48: /* typetoken ::= typename LP signed COMMA signed RP */ |
| 107875 | | -#line 257 "parse.y" |
| 107876 | 107751 | { |
| 107877 | 107752 | yygotominor.yy0.z = yymsp[-5].minor.yy0.z; |
| 107878 | 107753 | yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z); |
| 107879 | 107754 | } |
| 107880 | | -#line 2294 "parse.c" |
| 107881 | 107755 | break; |
| 107882 | 107756 | case 50: /* typename ::= typename ids */ |
| 107883 | | -#line 263 "parse.y" |
| 107884 | 107757 | {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 | 107758 | break; |
| 107887 | 107759 | case 57: /* ccons ::= DEFAULT term */ |
| 107888 | 107760 | case 59: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==59); |
| 107889 | | -#line 274 "parse.y" |
| 107890 | 107761 | {sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy118);} |
| 107891 | | -#line 2305 "parse.c" |
| 107892 | 107762 | break; |
| 107893 | 107763 | case 58: /* ccons ::= DEFAULT LP expr RP */ |
| 107894 | | -#line 275 "parse.y" |
| 107895 | 107764 | {sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy118);} |
| 107896 | | -#line 2310 "parse.c" |
| 107897 | 107765 | break; |
| 107898 | 107766 | case 60: /* ccons ::= DEFAULT MINUS term */ |
| 107899 | | -#line 277 "parse.y" |
| 107900 | 107767 | { |
| 107901 | 107768 | ExprSpan v; |
| 107902 | 107769 | v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy118.pExpr, 0, 0); |
| 107903 | 107770 | v.zStart = yymsp[-1].minor.yy0.z; |
| 107904 | 107771 | v.zEnd = yymsp[0].minor.yy118.zEnd; |
| 107905 | 107772 | sqlite3AddDefaultValue(pParse,&v); |
| 107906 | 107773 | } |
| 107907 | | -#line 2321 "parse.c" |
| 107908 | 107774 | break; |
| 107909 | 107775 | case 61: /* ccons ::= DEFAULT id */ |
| 107910 | | -#line 284 "parse.y" |
| 107911 | 107776 | { |
| 107912 | 107777 | ExprSpan v; |
| 107913 | 107778 | spanExpr(&v, pParse, TK_STRING, &yymsp[0].minor.yy0); |
| 107914 | 107779 | sqlite3AddDefaultValue(pParse,&v); |
| 107915 | 107780 | } |
| 107916 | | -#line 2330 "parse.c" |
| 107917 | 107781 | break; |
| 107918 | 107782 | case 63: /* ccons ::= NOT NULL onconf */ |
| 107919 | | -#line 294 "parse.y" |
| 107920 | 107783 | {sqlite3AddNotNull(pParse, yymsp[0].minor.yy4);} |
| 107921 | | -#line 2335 "parse.c" |
| 107922 | 107784 | break; |
| 107923 | 107785 | case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */ |
| 107924 | | -#line 296 "parse.y" |
| 107925 | 107786 | {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy4,yymsp[0].minor.yy4,yymsp[-2].minor.yy4);} |
| 107926 | | -#line 2340 "parse.c" |
| 107927 | 107787 | break; |
| 107928 | 107788 | case 65: /* ccons ::= UNIQUE onconf */ |
| 107929 | | -#line 297 "parse.y" |
| 107930 | 107789 | {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy4,0,0,0,0);} |
| 107931 | | -#line 2345 "parse.c" |
| 107932 | 107790 | break; |
| 107933 | 107791 | case 66: /* ccons ::= CHECK LP expr RP */ |
| 107934 | | -#line 298 "parse.y" |
| 107935 | 107792 | {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy118.pExpr);} |
| 107936 | | -#line 2350 "parse.c" |
| 107937 | 107793 | break; |
| 107938 | 107794 | case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */ |
| 107939 | | -#line 300 "parse.y" |
| 107940 | 107795 | {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy322,yymsp[0].minor.yy4);} |
| 107941 | | -#line 2355 "parse.c" |
| 107942 | 107796 | break; |
| 107943 | 107797 | case 68: /* ccons ::= defer_subclause */ |
| 107944 | | -#line 301 "parse.y" |
| 107945 | 107798 | {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy4);} |
| 107946 | | -#line 2360 "parse.c" |
| 107947 | 107799 | break; |
| 107948 | 107800 | case 69: /* ccons ::= COLLATE ids */ |
| 107949 | | -#line 302 "parse.y" |
| 107950 | 107801 | {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);} |
| 107951 | | -#line 2365 "parse.c" |
| 107952 | 107802 | break; |
| 107953 | 107803 | case 72: /* refargs ::= */ |
| 107954 | | -#line 315 "parse.y" |
| 107955 | 107804 | { yygotominor.yy4 = OE_None*0x0101; /* EV: R-19803-45884 */} |
| 107956 | | -#line 2370 "parse.c" |
| 107957 | 107805 | break; |
| 107958 | 107806 | case 73: /* refargs ::= refargs refarg */ |
| 107959 | | -#line 316 "parse.y" |
| 107960 | 107807 | { yygotominor.yy4 = (yymsp[-1].minor.yy4 & ~yymsp[0].minor.yy215.mask) | yymsp[0].minor.yy215.value; } |
| 107961 | | -#line 2375 "parse.c" |
| 107962 | 107808 | break; |
| 107963 | 107809 | case 74: /* refarg ::= MATCH nm */ |
| 107964 | 107810 | case 75: /* refarg ::= ON INSERT refact */ yytestcase(yyruleno==75); |
| 107965 | | -#line 318 "parse.y" |
| 107966 | 107811 | { yygotominor.yy215.value = 0; yygotominor.yy215.mask = 0x000000; } |
| 107967 | | -#line 2381 "parse.c" |
| 107968 | 107812 | break; |
| 107969 | 107813 | case 76: /* refarg ::= ON DELETE refact */ |
| 107970 | | -#line 320 "parse.y" |
| 107971 | 107814 | { yygotominor.yy215.value = yymsp[0].minor.yy4; yygotominor.yy215.mask = 0x0000ff; } |
| 107972 | | -#line 2386 "parse.c" |
| 107973 | 107815 | break; |
| 107974 | 107816 | case 77: /* refarg ::= ON UPDATE refact */ |
| 107975 | | -#line 321 "parse.y" |
| 107976 | 107817 | { yygotominor.yy215.value = yymsp[0].minor.yy4<<8; yygotominor.yy215.mask = 0x00ff00; } |
| 107977 | | -#line 2391 "parse.c" |
| 107978 | 107818 | break; |
| 107979 | 107819 | case 78: /* refact ::= SET NULL */ |
| 107980 | | -#line 323 "parse.y" |
| 107981 | 107820 | { yygotominor.yy4 = OE_SetNull; /* EV: R-33326-45252 */} |
| 107982 | | -#line 2396 "parse.c" |
| 107983 | 107821 | break; |
| 107984 | 107822 | case 79: /* refact ::= SET DEFAULT */ |
| 107985 | | -#line 324 "parse.y" |
| 107986 | 107823 | { yygotominor.yy4 = OE_SetDflt; /* EV: R-33326-45252 */} |
| 107987 | | -#line 2401 "parse.c" |
| 107988 | 107824 | break; |
| 107989 | 107825 | case 80: /* refact ::= CASCADE */ |
| 107990 | | -#line 325 "parse.y" |
| 107991 | 107826 | { yygotominor.yy4 = OE_Cascade; /* EV: R-33326-45252 */} |
| 107992 | | -#line 2406 "parse.c" |
| 107993 | 107827 | break; |
| 107994 | 107828 | case 81: /* refact ::= RESTRICT */ |
| 107995 | | -#line 326 "parse.y" |
| 107996 | 107829 | { yygotominor.yy4 = OE_Restrict; /* EV: R-33326-45252 */} |
| 107997 | | -#line 2411 "parse.c" |
| 107998 | 107830 | break; |
| 107999 | 107831 | case 82: /* refact ::= NO ACTION */ |
| 108000 | | -#line 327 "parse.y" |
| 108001 | 107832 | { yygotominor.yy4 = OE_None; /* EV: R-33326-45252 */} |
| 108002 | | -#line 2416 "parse.c" |
| 108003 | 107833 | break; |
| 108004 | 107834 | case 84: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ |
| 108005 | 107835 | case 99: /* defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==99); |
| 108006 | 107836 | case 101: /* onconf ::= ON CONFLICT resolvetype */ yytestcase(yyruleno==101); |
| 108007 | 107837 | case 104: /* resolvetype ::= raisetype */ yytestcase(yyruleno==104); |
| 108008 | | -#line 330 "parse.y" |
| 108009 | 107838 | {yygotominor.yy4 = yymsp[0].minor.yy4;} |
| 108010 | | -#line 2424 "parse.c" |
| 108011 | 107839 | break; |
| 108012 | 107840 | case 88: /* conslist_opt ::= */ |
| 108013 | | -#line 339 "parse.y" |
| 108014 | 107841 | {yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;} |
| 108015 | | -#line 2429 "parse.c" |
| 108016 | 107842 | break; |
| 108017 | 107843 | case 89: /* conslist_opt ::= COMMA conslist */ |
| 108018 | | -#line 340 "parse.y" |
| 108019 | 107844 | {yygotominor.yy0 = yymsp[-1].minor.yy0;} |
| 108020 | | -#line 2434 "parse.c" |
| 108021 | 107845 | break; |
| 108022 | 107846 | case 94: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */ |
| 108023 | | -#line 346 "parse.y" |
| 108024 | 107847 | {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy322,yymsp[0].minor.yy4,yymsp[-2].minor.yy4,0);} |
| 108025 | | -#line 2439 "parse.c" |
| 108026 | 107848 | break; |
| 108027 | 107849 | case 95: /* tcons ::= UNIQUE LP idxlist RP onconf */ |
| 108028 | | -#line 348 "parse.y" |
| 108029 | 107850 | {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy322,yymsp[0].minor.yy4,0,0,0,0);} |
| 108030 | | -#line 2444 "parse.c" |
| 108031 | 107851 | break; |
| 108032 | 107852 | case 96: /* tcons ::= CHECK LP expr RP onconf */ |
| 108033 | | -#line 350 "parse.y" |
| 108034 | 107853 | {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy118.pExpr);} |
| 108035 | | -#line 2449 "parse.c" |
| 108036 | 107854 | break; |
| 108037 | 107855 | case 97: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */ |
| 108038 | | -#line 352 "parse.y" |
| 108039 | 107856 | { |
| 108040 | 107857 | sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy322, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[-1].minor.yy4); |
| 108041 | 107858 | sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy4); |
| 108042 | 107859 | } |
| 108043 | | -#line 2457 "parse.c" |
| 108044 | 107860 | break; |
| 108045 | 107861 | case 100: /* onconf ::= */ |
| 108046 | | -#line 366 "parse.y" |
| 108047 | 107862 | {yygotominor.yy4 = OE_Default;} |
| 108048 | | -#line 2462 "parse.c" |
| 108049 | 107863 | break; |
| 108050 | 107864 | case 102: /* orconf ::= */ |
| 108051 | | -#line 368 "parse.y" |
| 108052 | 107865 | {yygotominor.yy210 = OE_Default;} |
| 108053 | | -#line 2467 "parse.c" |
| 108054 | 107866 | break; |
| 108055 | 107867 | case 103: /* orconf ::= OR resolvetype */ |
| 108056 | | -#line 369 "parse.y" |
| 108057 | 107868 | {yygotominor.yy210 = (u8)yymsp[0].minor.yy4;} |
| 108058 | | -#line 2472 "parse.c" |
| 108059 | 107869 | break; |
| 108060 | 107870 | case 105: /* resolvetype ::= IGNORE */ |
| 108061 | | -#line 371 "parse.y" |
| 108062 | 107871 | {yygotominor.yy4 = OE_Ignore;} |
| 108063 | | -#line 2477 "parse.c" |
| 108064 | 107872 | break; |
| 108065 | 107873 | case 106: /* resolvetype ::= REPLACE */ |
| 108066 | | -#line 372 "parse.y" |
| 108067 | 107874 | {yygotominor.yy4 = OE_Replace;} |
| 108068 | | -#line 2482 "parse.c" |
| 108069 | 107875 | break; |
| 108070 | 107876 | case 107: /* cmd ::= DROP TABLE ifexists fullname */ |
| 108071 | | -#line 376 "parse.y" |
| 108072 | 107877 | { |
| 108073 | 107878 | sqlite3DropTable(pParse, yymsp[0].minor.yy259, 0, yymsp[-1].minor.yy4); |
| 108074 | 107879 | } |
| 108075 | | -#line 2489 "parse.c" |
| 108076 | 107880 | break; |
| 108077 | 107881 | case 110: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */ |
| 108078 | | -#line 386 "parse.y" |
| 108079 | 107882 | { |
| 108080 | 107883 | 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 | 107884 | } |
| 108082 | | -#line 2496 "parse.c" |
| 108083 | 107885 | break; |
| 108084 | 107886 | case 111: /* cmd ::= DROP VIEW ifexists fullname */ |
| 108085 | | -#line 389 "parse.y" |
| 108086 | 107887 | { |
| 108087 | 107888 | sqlite3DropTable(pParse, yymsp[0].minor.yy259, 1, yymsp[-1].minor.yy4); |
| 108088 | 107889 | } |
| 108089 | | -#line 2503 "parse.c" |
| 108090 | 107890 | break; |
| 108091 | 107891 | case 112: /* cmd ::= select */ |
| 108092 | | -#line 396 "parse.y" |
| 108093 | 107892 | { |
| 108094 | 107893 | SelectDest dest = {SRT_Output, 0, 0, 0, 0}; |
| 108095 | 107894 | sqlite3Select(pParse, yymsp[0].minor.yy387, &dest); |
| 108096 | 107895 | sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387); |
| 108097 | 107896 | } |
| 108098 | | -#line 2512 "parse.c" |
| 108099 | 107897 | break; |
| 108100 | 107898 | case 113: /* select ::= oneselect */ |
| 108101 | | -#line 407 "parse.y" |
| 108102 | 107899 | {yygotominor.yy387 = yymsp[0].minor.yy387;} |
| 108103 | | -#line 2517 "parse.c" |
| 108104 | 107900 | break; |
| 108105 | 107901 | case 114: /* select ::= select multiselect_op oneselect */ |
| 108106 | | -#line 409 "parse.y" |
| 108107 | 107902 | { |
| 108108 | 107903 | if( yymsp[0].minor.yy387 ){ |
| 108109 | 107904 | yymsp[0].minor.yy387->op = (u8)yymsp[-1].minor.yy4; |
| 108110 | 107905 | yymsp[0].minor.yy387->pPrior = yymsp[-2].minor.yy387; |
| 108111 | 107906 | }else{ |
| 108112 | 107907 | sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy387); |
| 108113 | 107908 | } |
| 108114 | 107909 | yygotominor.yy387 = yymsp[0].minor.yy387; |
| 108115 | 107910 | } |
| 108116 | | -#line 2530 "parse.c" |
| 108117 | 107911 | break; |
| 108118 | 107912 | case 116: /* multiselect_op ::= UNION ALL */ |
| 108119 | | -#line 420 "parse.y" |
| 108120 | 107913 | {yygotominor.yy4 = TK_ALL;} |
| 108121 | | -#line 2535 "parse.c" |
| 108122 | 107914 | break; |
| 108123 | 107915 | case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ |
| 108124 | | -#line 424 "parse.y" |
| 108125 | 107916 | { |
| 108126 | 107917 | 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 | 107918 | } |
| 108128 | | -#line 2542 "parse.c" |
| 108129 | 107919 | break; |
| 108130 | 107920 | case 122: /* sclp ::= selcollist COMMA */ |
| 108131 | 107921 | case 247: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==247); |
| 108132 | | -#line 445 "parse.y" |
| 108133 | 107922 | {yygotominor.yy322 = yymsp[-1].minor.yy322;} |
| 108134 | | -#line 2548 "parse.c" |
| 108135 | 107923 | break; |
| 108136 | 107924 | case 123: /* sclp ::= */ |
| 108137 | 107925 | case 151: /* orderby_opt ::= */ yytestcase(yyruleno==151); |
| 108138 | 107926 | case 159: /* groupby_opt ::= */ yytestcase(yyruleno==159); |
| 108139 | 107927 | case 240: /* exprlist ::= */ yytestcase(yyruleno==240); |
| 108140 | 107928 | case 246: /* idxlist_opt ::= */ yytestcase(yyruleno==246); |
| 108141 | | -#line 446 "parse.y" |
| 108142 | 107929 | {yygotominor.yy322 = 0;} |
| 108143 | | -#line 2557 "parse.c" |
| 108144 | 107930 | break; |
| 108145 | 107931 | case 124: /* selcollist ::= sclp expr as */ |
| 108146 | | -#line 447 "parse.y" |
| 108147 | 107932 | { |
| 108148 | 107933 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy322, yymsp[-1].minor.yy118.pExpr); |
| 108149 | 107934 | if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[0].minor.yy0, 1); |
| 108150 | 107935 | sqlite3ExprListSetSpan(pParse,yygotominor.yy322,&yymsp[-1].minor.yy118); |
| 108151 | 107936 | } |
| 108152 | | -#line 2566 "parse.c" |
| 108153 | 107937 | break; |
| 108154 | 107938 | case 125: /* selcollist ::= sclp STAR */ |
| 108155 | | -#line 452 "parse.y" |
| 108156 | 107939 | { |
| 108157 | 107940 | Expr *p = sqlite3Expr(pParse->db, TK_ALL, 0); |
| 108158 | 107941 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy322, p); |
| 108159 | 107942 | } |
| 108160 | | -#line 2574 "parse.c" |
| 108161 | 107943 | break; |
| 108162 | 107944 | case 126: /* selcollist ::= sclp nm DOT STAR */ |
| 108163 | | -#line 456 "parse.y" |
| 108164 | 107945 | { |
| 108165 | 107946 | Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0); |
| 108166 | 107947 | Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108167 | 107948 | Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0); |
| 108168 | 107949 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, pDot); |
| 108169 | 107950 | } |
| 108170 | | -#line 2584 "parse.c" |
| 108171 | 107951 | break; |
| 108172 | 107952 | case 129: /* as ::= */ |
| 108173 | | -#line 469 "parse.y" |
| 108174 | 107953 | {yygotominor.yy0.n = 0;} |
| 108175 | | -#line 2589 "parse.c" |
| 108176 | 107954 | break; |
| 108177 | 107955 | case 130: /* from ::= */ |
| 108178 | | -#line 481 "parse.y" |
| 108179 | 107956 | {yygotominor.yy259 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy259));} |
| 108180 | | -#line 2594 "parse.c" |
| 108181 | 107957 | break; |
| 108182 | 107958 | case 131: /* from ::= FROM seltablist */ |
| 108183 | | -#line 482 "parse.y" |
| 108184 | 107959 | { |
| 108185 | 107960 | yygotominor.yy259 = yymsp[0].minor.yy259; |
| 108186 | 107961 | sqlite3SrcListShiftJoinType(yygotominor.yy259); |
| 108187 | 107962 | } |
| 108188 | | -#line 2602 "parse.c" |
| 108189 | 107963 | break; |
| 108190 | 107964 | case 132: /* stl_prefix ::= seltablist joinop */ |
| 108191 | | -#line 490 "parse.y" |
| 108192 | 107965 | { |
| 108193 | 107966 | yygotominor.yy259 = yymsp[-1].minor.yy259; |
| 108194 | 107967 | if( ALWAYS(yygotominor.yy259 && yygotominor.yy259->nSrc>0) ) yygotominor.yy259->a[yygotominor.yy259->nSrc-1].jointype = (u8)yymsp[0].minor.yy4; |
| 108195 | 107968 | } |
| 108196 | | -#line 2610 "parse.c" |
| 108197 | 107969 | break; |
| 108198 | 107970 | case 133: /* stl_prefix ::= */ |
| 108199 | | -#line 494 "parse.y" |
| 108200 | 107971 | {yygotominor.yy259 = 0;} |
| 108201 | | -#line 2615 "parse.c" |
| 108202 | 107972 | break; |
| 108203 | 107973 | case 134: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */ |
| 108204 | | -#line 495 "parse.y" |
| 108205 | 107974 | { |
| 108206 | 107975 | 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 | 107976 | sqlite3SrcListIndexedBy(pParse, yygotominor.yy259, &yymsp[-2].minor.yy0); |
| 108208 | 107977 | } |
| 108209 | | -#line 2623 "parse.c" |
| 108210 | 107978 | break; |
| 108211 | 107979 | case 135: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */ |
| 108212 | | -#line 501 "parse.y" |
| 108213 | 107980 | { |
| 108214 | 107981 | 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 | 107982 | } |
| 108216 | | -#line 2630 "parse.c" |
| 108217 | 107983 | break; |
| 108218 | 107984 | case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ |
| 108219 | | -#line 505 "parse.y" |
| 108220 | 107985 | { |
| 108221 | 107986 | if( yymsp[-6].minor.yy259==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy314==0 && yymsp[0].minor.yy384==0 ){ |
| 108222 | 107987 | yygotominor.yy259 = yymsp[-4].minor.yy259; |
| 108223 | 107988 | }else{ |
| 108224 | 107989 | Select *pSubquery; |
| | @@ -108225,260 +107990,180 @@ |
| 108225 | 107990 | sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy259); |
| 108226 | 107991 | pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy259,0,0,0,0,0,0,0); |
| 108227 | 107992 | yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy314,yymsp[0].minor.yy384); |
| 108228 | 107993 | } |
| 108229 | 107994 | } |
| 108230 | | -#line 2644 "parse.c" |
| 108231 | 107995 | break; |
| 108232 | 107996 | case 137: /* dbnm ::= */ |
| 108233 | 107997 | case 146: /* indexed_opt ::= */ yytestcase(yyruleno==146); |
| 108234 | | -#line 530 "parse.y" |
| 108235 | 107998 | {yygotominor.yy0.z=0; yygotominor.yy0.n=0;} |
| 108236 | | -#line 2650 "parse.c" |
| 108237 | 107999 | break; |
| 108238 | 108000 | case 139: /* fullname ::= nm dbnm */ |
| 108239 | | -#line 535 "parse.y" |
| 108240 | 108001 | {yygotominor.yy259 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);} |
| 108241 | | -#line 2655 "parse.c" |
| 108242 | 108002 | break; |
| 108243 | 108003 | case 140: /* joinop ::= COMMA|JOIN */ |
| 108244 | | -#line 539 "parse.y" |
| 108245 | 108004 | { yygotominor.yy4 = JT_INNER; } |
| 108246 | | -#line 2660 "parse.c" |
| 108247 | 108005 | break; |
| 108248 | 108006 | case 141: /* joinop ::= JOIN_KW JOIN */ |
| 108249 | | -#line 540 "parse.y" |
| 108250 | 108007 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); } |
| 108251 | | -#line 2665 "parse.c" |
| 108252 | 108008 | break; |
| 108253 | 108009 | case 142: /* joinop ::= JOIN_KW nm JOIN */ |
| 108254 | | -#line 541 "parse.y" |
| 108255 | 108010 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); } |
| 108256 | | -#line 2670 "parse.c" |
| 108257 | 108011 | break; |
| 108258 | 108012 | case 143: /* joinop ::= JOIN_KW nm nm JOIN */ |
| 108259 | | -#line 543 "parse.y" |
| 108260 | 108013 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); } |
| 108261 | | -#line 2675 "parse.c" |
| 108262 | 108014 | break; |
| 108263 | 108015 | case 144: /* on_opt ::= ON expr */ |
| 108264 | 108016 | case 155: /* sortitem ::= expr */ yytestcase(yyruleno==155); |
| 108265 | 108017 | case 162: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==162); |
| 108266 | 108018 | case 169: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==169); |
| 108267 | 108019 | case 235: /* case_else ::= ELSE expr */ yytestcase(yyruleno==235); |
| 108268 | 108020 | case 237: /* case_operand ::= expr */ yytestcase(yyruleno==237); |
| 108269 | | -#line 547 "parse.y" |
| 108270 | 108021 | {yygotominor.yy314 = yymsp[0].minor.yy118.pExpr;} |
| 108271 | | -#line 2685 "parse.c" |
| 108272 | 108022 | break; |
| 108273 | 108023 | case 145: /* on_opt ::= */ |
| 108274 | 108024 | case 161: /* having_opt ::= */ yytestcase(yyruleno==161); |
| 108275 | 108025 | case 168: /* where_opt ::= */ yytestcase(yyruleno==168); |
| 108276 | 108026 | case 236: /* case_else ::= */ yytestcase(yyruleno==236); |
| 108277 | 108027 | case 238: /* case_operand ::= */ yytestcase(yyruleno==238); |
| 108278 | | -#line 548 "parse.y" |
| 108279 | 108028 | {yygotominor.yy314 = 0;} |
| 108280 | | -#line 2694 "parse.c" |
| 108281 | 108029 | break; |
| 108282 | 108030 | case 148: /* indexed_opt ::= NOT INDEXED */ |
| 108283 | | -#line 563 "parse.y" |
| 108284 | 108031 | {yygotominor.yy0.z=0; yygotominor.yy0.n=1;} |
| 108285 | | -#line 2699 "parse.c" |
| 108286 | 108032 | break; |
| 108287 | 108033 | case 149: /* using_opt ::= USING LP inscollist RP */ |
| 108288 | 108034 | case 181: /* inscollist_opt ::= LP inscollist RP */ yytestcase(yyruleno==181); |
| 108289 | | -#line 567 "parse.y" |
| 108290 | 108035 | {yygotominor.yy384 = yymsp[-1].minor.yy384;} |
| 108291 | | -#line 2705 "parse.c" |
| 108292 | 108036 | break; |
| 108293 | 108037 | case 150: /* using_opt ::= */ |
| 108294 | 108038 | case 180: /* inscollist_opt ::= */ yytestcase(yyruleno==180); |
| 108295 | | -#line 568 "parse.y" |
| 108296 | 108039 | {yygotominor.yy384 = 0;} |
| 108297 | | -#line 2711 "parse.c" |
| 108298 | 108040 | break; |
| 108299 | 108041 | case 152: /* orderby_opt ::= ORDER BY sortlist */ |
| 108300 | 108042 | case 160: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==160); |
| 108301 | 108043 | case 239: /* exprlist ::= nexprlist */ yytestcase(yyruleno==239); |
| 108302 | | -#line 579 "parse.y" |
| 108303 | 108044 | {yygotominor.yy322 = yymsp[0].minor.yy322;} |
| 108304 | | -#line 2718 "parse.c" |
| 108305 | 108045 | break; |
| 108306 | 108046 | case 153: /* sortlist ::= sortlist COMMA sortitem sortorder */ |
| 108307 | | -#line 580 "parse.y" |
| 108308 | 108047 | { |
| 108309 | 108048 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322,yymsp[-1].minor.yy314); |
| 108310 | 108049 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108311 | 108050 | } |
| 108312 | | -#line 2726 "parse.c" |
| 108313 | 108051 | break; |
| 108314 | 108052 | case 154: /* sortlist ::= sortitem sortorder */ |
| 108315 | | -#line 584 "parse.y" |
| 108316 | 108053 | { |
| 108317 | 108054 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy314); |
| 108318 | 108055 | if( yygotominor.yy322 && ALWAYS(yygotominor.yy322->a) ) yygotominor.yy322->a[0].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108319 | 108056 | } |
| 108320 | | -#line 2734 "parse.c" |
| 108321 | 108057 | break; |
| 108322 | 108058 | case 156: /* sortorder ::= ASC */ |
| 108323 | 108059 | case 158: /* sortorder ::= */ yytestcase(yyruleno==158); |
| 108324 | | -#line 592 "parse.y" |
| 108325 | 108060 | {yygotominor.yy4 = SQLITE_SO_ASC;} |
| 108326 | | -#line 2740 "parse.c" |
| 108327 | 108061 | break; |
| 108328 | 108062 | case 157: /* sortorder ::= DESC */ |
| 108329 | | -#line 593 "parse.y" |
| 108330 | 108063 | {yygotominor.yy4 = SQLITE_SO_DESC;} |
| 108331 | | -#line 2745 "parse.c" |
| 108332 | 108064 | break; |
| 108333 | 108065 | case 163: /* limit_opt ::= */ |
| 108334 | | -#line 619 "parse.y" |
| 108335 | 108066 | {yygotominor.yy292.pLimit = 0; yygotominor.yy292.pOffset = 0;} |
| 108336 | | -#line 2750 "parse.c" |
| 108337 | 108067 | break; |
| 108338 | 108068 | case 164: /* limit_opt ::= LIMIT expr */ |
| 108339 | | -#line 620 "parse.y" |
| 108340 | 108069 | {yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr; yygotominor.yy292.pOffset = 0;} |
| 108341 | | -#line 2755 "parse.c" |
| 108342 | 108070 | break; |
| 108343 | 108071 | case 165: /* limit_opt ::= LIMIT expr OFFSET expr */ |
| 108344 | | -#line 622 "parse.y" |
| 108345 | 108072 | {yygotominor.yy292.pLimit = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pOffset = yymsp[0].minor.yy118.pExpr;} |
| 108346 | | -#line 2760 "parse.c" |
| 108347 | 108073 | break; |
| 108348 | 108074 | case 166: /* limit_opt ::= LIMIT expr COMMA expr */ |
| 108349 | | -#line 624 "parse.y" |
| 108350 | 108075 | {yygotominor.yy292.pOffset = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr;} |
| 108351 | | -#line 2765 "parse.c" |
| 108352 | 108076 | break; |
| 108353 | 108077 | case 167: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */ |
| 108354 | | -#line 637 "parse.y" |
| 108355 | 108078 | { |
| 108356 | 108079 | sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy259, &yymsp[-1].minor.yy0); |
| 108357 | 108080 | sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy259,yymsp[0].minor.yy314); |
| 108358 | 108081 | } |
| 108359 | | -#line 2773 "parse.c" |
| 108360 | 108082 | break; |
| 108361 | 108083 | case 170: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */ |
| 108362 | | -#line 660 "parse.y" |
| 108363 | 108084 | { |
| 108364 | 108085 | sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy259, &yymsp[-3].minor.yy0); |
| 108365 | 108086 | sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy322,"set list"); |
| 108366 | 108087 | sqlite3Update(pParse,yymsp[-4].minor.yy259,yymsp[-1].minor.yy322,yymsp[0].minor.yy314,yymsp[-5].minor.yy210); |
| 108367 | 108088 | } |
| 108368 | | -#line 2782 "parse.c" |
| 108369 | 108089 | break; |
| 108370 | 108090 | case 171: /* setlist ::= setlist COMMA nm EQ expr */ |
| 108371 | | -#line 670 "parse.y" |
| 108372 | 108091 | { |
| 108373 | 108092 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108374 | 108093 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108375 | 108094 | } |
| 108376 | | -#line 2790 "parse.c" |
| 108377 | 108095 | break; |
| 108378 | 108096 | case 172: /* setlist ::= nm EQ expr */ |
| 108379 | | -#line 674 "parse.y" |
| 108380 | 108097 | { |
| 108381 | 108098 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy118.pExpr); |
| 108382 | 108099 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108383 | 108100 | } |
| 108384 | | -#line 2798 "parse.c" |
| 108385 | 108101 | break; |
| 108386 | 108102 | case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */ |
| 108387 | | -#line 683 "parse.y" |
| 108388 | 108103 | {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 | 108104 | break; |
| 108391 | 108105 | case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */ |
| 108392 | | -#line 685 "parse.y" |
| 108393 | 108106 | {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 | 108107 | break; |
| 108396 | 108108 | case 175: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */ |
| 108397 | | -#line 687 "parse.y" |
| 108398 | 108109 | {sqlite3Insert(pParse, yymsp[-3].minor.yy259, 0, 0, yymsp[-2].minor.yy384, yymsp[-5].minor.yy210);} |
| 108399 | | -#line 2813 "parse.c" |
| 108400 | 108110 | break; |
| 108401 | 108111 | case 176: /* insert_cmd ::= INSERT orconf */ |
| 108402 | | -#line 690 "parse.y" |
| 108403 | 108112 | {yygotominor.yy210 = yymsp[0].minor.yy210;} |
| 108404 | | -#line 2818 "parse.c" |
| 108405 | 108113 | break; |
| 108406 | 108114 | case 177: /* insert_cmd ::= REPLACE */ |
| 108407 | | -#line 691 "parse.y" |
| 108408 | 108115 | {yygotominor.yy210 = OE_Replace;} |
| 108409 | | -#line 2823 "parse.c" |
| 108410 | 108116 | break; |
| 108411 | 108117 | case 178: /* itemlist ::= itemlist COMMA expr */ |
| 108412 | 108118 | case 241: /* nexprlist ::= nexprlist COMMA expr */ yytestcase(yyruleno==241); |
| 108413 | | -#line 698 "parse.y" |
| 108414 | 108119 | {yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy118.pExpr);} |
| 108415 | | -#line 2829 "parse.c" |
| 108416 | 108120 | break; |
| 108417 | 108121 | case 179: /* itemlist ::= expr */ |
| 108418 | 108122 | case 242: /* nexprlist ::= expr */ yytestcase(yyruleno==242); |
| 108419 | | -#line 700 "parse.y" |
| 108420 | 108123 | {yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy118.pExpr);} |
| 108421 | | -#line 2835 "parse.c" |
| 108422 | 108124 | break; |
| 108423 | 108125 | case 182: /* inscollist ::= inscollist COMMA nm */ |
| 108424 | | -#line 710 "parse.y" |
| 108425 | 108126 | {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy384,&yymsp[0].minor.yy0);} |
| 108426 | | -#line 2840 "parse.c" |
| 108427 | 108127 | break; |
| 108428 | 108128 | case 183: /* inscollist ::= nm */ |
| 108429 | | -#line 712 "parse.y" |
| 108430 | 108129 | {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);} |
| 108431 | | -#line 2845 "parse.c" |
| 108432 | 108130 | break; |
| 108433 | 108131 | case 184: /* expr ::= term */ |
| 108434 | | -#line 743 "parse.y" |
| 108435 | 108132 | {yygotominor.yy118 = yymsp[0].minor.yy118;} |
| 108436 | | -#line 2850 "parse.c" |
| 108437 | 108133 | break; |
| 108438 | 108134 | case 185: /* expr ::= LP expr RP */ |
| 108439 | | -#line 744 "parse.y" |
| 108440 | 108135 | {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 | 108136 | break; |
| 108443 | 108137 | case 186: /* term ::= NULL */ |
| 108444 | 108138 | case 191: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==191); |
| 108445 | 108139 | case 192: /* term ::= STRING */ yytestcase(yyruleno==192); |
| 108446 | | -#line 745 "parse.y" |
| 108447 | 108140 | {spanExpr(&yygotominor.yy118, pParse, yymsp[0].major, &yymsp[0].minor.yy0);} |
| 108448 | | -#line 2862 "parse.c" |
| 108449 | 108141 | break; |
| 108450 | 108142 | case 187: /* expr ::= id */ |
| 108451 | 108143 | case 188: /* expr ::= JOIN_KW */ yytestcase(yyruleno==188); |
| 108452 | | -#line 746 "parse.y" |
| 108453 | 108144 | {spanExpr(&yygotominor.yy118, pParse, TK_ID, &yymsp[0].minor.yy0);} |
| 108454 | | -#line 2868 "parse.c" |
| 108455 | 108145 | break; |
| 108456 | 108146 | case 189: /* expr ::= nm DOT nm */ |
| 108457 | | -#line 748 "parse.y" |
| 108458 | 108147 | { |
| 108459 | 108148 | Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108460 | 108149 | Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0); |
| 108461 | 108150 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0); |
| 108462 | 108151 | spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); |
| 108463 | 108152 | } |
| 108464 | | -#line 2878 "parse.c" |
| 108465 | 108153 | break; |
| 108466 | 108154 | case 190: /* expr ::= nm DOT nm DOT nm */ |
| 108467 | | -#line 754 "parse.y" |
| 108468 | 108155 | { |
| 108469 | 108156 | Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0); |
| 108470 | 108157 | Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108471 | 108158 | Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0); |
| 108472 | 108159 | Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0); |
| 108473 | 108160 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0); |
| 108474 | 108161 | spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); |
| 108475 | 108162 | } |
| 108476 | | -#line 2890 "parse.c" |
| 108477 | 108163 | break; |
| 108478 | 108164 | case 193: /* expr ::= REGISTER */ |
| 108479 | | -#line 764 "parse.y" |
| 108480 | 108165 | { |
| 108481 | 108166 | /* When doing a nested parse, one can include terms in an expression |
| 108482 | 108167 | ** that look like this: #1 #2 ... These terms refer to registers |
| 108483 | 108168 | ** in the virtual machine. #N is the N-th register. */ |
| 108484 | 108169 | if( pParse->nested==0 ){ |
| | @@ -108488,40 +108173,32 @@ |
| 108488 | 108173 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &yymsp[0].minor.yy0); |
| 108489 | 108174 | if( yygotominor.yy118.pExpr ) sqlite3GetInt32(&yymsp[0].minor.yy0.z[1], &yygotominor.yy118.pExpr->iTable); |
| 108490 | 108175 | } |
| 108491 | 108176 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108492 | 108177 | } |
| 108493 | | -#line 2907 "parse.c" |
| 108494 | 108178 | break; |
| 108495 | 108179 | case 194: /* expr ::= VARIABLE */ |
| 108496 | | -#line 777 "parse.y" |
| 108497 | 108180 | { |
| 108498 | 108181 | spanExpr(&yygotominor.yy118, pParse, TK_VARIABLE, &yymsp[0].minor.yy0); |
| 108499 | 108182 | sqlite3ExprAssignVarNumber(pParse, yygotominor.yy118.pExpr); |
| 108500 | 108183 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108501 | 108184 | } |
| 108502 | | -#line 2916 "parse.c" |
| 108503 | 108185 | break; |
| 108504 | 108186 | case 195: /* expr ::= expr COLLATE ids */ |
| 108505 | | -#line 782 "parse.y" |
| 108506 | 108187 | { |
| 108507 | 108188 | yygotominor.yy118.pExpr = sqlite3ExprSetCollByToken(pParse, yymsp[-2].minor.yy118.pExpr, &yymsp[0].minor.yy0); |
| 108508 | 108189 | yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart; |
| 108509 | 108190 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108510 | 108191 | } |
| 108511 | | -#line 2925 "parse.c" |
| 108512 | 108192 | break; |
| 108513 | 108193 | case 196: /* expr ::= CAST LP expr AS typetoken RP */ |
| 108514 | | -#line 788 "parse.y" |
| 108515 | 108194 | { |
| 108516 | 108195 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy118.pExpr, 0, &yymsp[-1].minor.yy0); |
| 108517 | 108196 | spanSet(&yygotominor.yy118,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0); |
| 108518 | 108197 | } |
| 108519 | | -#line 2933 "parse.c" |
| 108520 | 108198 | break; |
| 108521 | 108199 | case 197: /* expr ::= ID LP distinct exprlist RP */ |
| 108522 | | -#line 793 "parse.y" |
| 108523 | 108200 | { |
| 108524 | 108201 | if( yymsp[-1].minor.yy322 && yymsp[-1].minor.yy322->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){ |
| 108525 | 108202 | sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0); |
| 108526 | 108203 | } |
| 108527 | 108204 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0); |
| | @@ -108528,59 +108205,47 @@ |
| 108528 | 108205 | spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); |
| 108529 | 108206 | if( yymsp[-2].minor.yy4 && yygotominor.yy118.pExpr ){ |
| 108530 | 108207 | yygotominor.yy118.pExpr->flags |= EP_Distinct; |
| 108531 | 108208 | } |
| 108532 | 108209 | } |
| 108533 | | -#line 2947 "parse.c" |
| 108534 | 108210 | break; |
| 108535 | 108211 | case 198: /* expr ::= ID LP STAR RP */ |
| 108536 | | -#line 803 "parse.y" |
| 108537 | 108212 | { |
| 108538 | 108213 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0); |
| 108539 | 108214 | spanSet(&yygotominor.yy118,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); |
| 108540 | 108215 | } |
| 108541 | | -#line 2955 "parse.c" |
| 108542 | 108216 | break; |
| 108543 | 108217 | case 199: /* term ::= CTIME_KW */ |
| 108544 | | -#line 807 "parse.y" |
| 108545 | 108218 | { |
| 108546 | 108219 | /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are |
| 108547 | 108220 | ** treated as functions that return constants */ |
| 108548 | 108221 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0); |
| 108549 | 108222 | if( yygotominor.yy118.pExpr ){ |
| 108550 | 108223 | yygotominor.yy118.pExpr->op = TK_CONST_FUNC; |
| 108551 | 108224 | } |
| 108552 | 108225 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108553 | 108226 | } |
| 108554 | | -#line 2968 "parse.c" |
| 108555 | 108227 | break; |
| 108556 | 108228 | case 200: /* expr ::= expr AND expr */ |
| 108557 | 108229 | case 201: /* expr ::= expr OR expr */ yytestcase(yyruleno==201); |
| 108558 | 108230 | case 202: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==202); |
| 108559 | 108231 | case 203: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==203); |
| 108560 | 108232 | case 204: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==204); |
| 108561 | 108233 | case 205: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==205); |
| 108562 | 108234 | case 206: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==206); |
| 108563 | 108235 | case 207: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==207); |
| 108564 | | -#line 834 "parse.y" |
| 108565 | 108236 | {spanBinaryExpr(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);} |
| 108566 | | -#line 2980 "parse.c" |
| 108567 | 108237 | break; |
| 108568 | 108238 | case 208: /* likeop ::= LIKE_KW */ |
| 108569 | 108239 | case 210: /* likeop ::= MATCH */ yytestcase(yyruleno==210); |
| 108570 | | -#line 847 "parse.y" |
| 108571 | 108240 | {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 0;} |
| 108572 | | -#line 2986 "parse.c" |
| 108573 | 108241 | break; |
| 108574 | 108242 | case 209: /* likeop ::= NOT LIKE_KW */ |
| 108575 | 108243 | case 211: /* likeop ::= NOT MATCH */ yytestcase(yyruleno==211); |
| 108576 | | -#line 848 "parse.y" |
| 108577 | 108244 | {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 1;} |
| 108578 | | -#line 2992 "parse.c" |
| 108579 | 108245 | break; |
| 108580 | 108246 | case 212: /* expr ::= expr likeop expr */ |
| 108581 | | -#line 851 "parse.y" |
| 108582 | 108247 | { |
| 108583 | 108248 | ExprList *pList; |
| 108584 | 108249 | pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy118.pExpr); |
| 108585 | 108250 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy118.pExpr); |
| 108586 | 108251 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy342.eOperator); |
| | @@ -108587,14 +108252,12 @@ |
| 108587 | 108252 | if( yymsp[-1].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108588 | 108253 | yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart; |
| 108589 | 108254 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108590 | 108255 | if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc; |
| 108591 | 108256 | } |
| 108592 | | -#line 3006 "parse.c" |
| 108593 | 108257 | break; |
| 108594 | 108258 | case 213: /* expr ::= expr likeop expr ESCAPE expr */ |
| 108595 | | -#line 861 "parse.y" |
| 108596 | 108259 | { |
| 108597 | 108260 | ExprList *pList; |
| 108598 | 108261 | pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108599 | 108262 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy118.pExpr); |
| 108600 | 108263 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr); |
| | @@ -108602,56 +108265,40 @@ |
| 108602 | 108265 | if( yymsp[-3].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108603 | 108266 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108604 | 108267 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108605 | 108268 | if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc; |
| 108606 | 108269 | } |
| 108607 | | -#line 3021 "parse.c" |
| 108608 | 108270 | break; |
| 108609 | 108271 | case 214: /* expr ::= expr ISNULL|NOTNULL */ |
| 108610 | | -#line 889 "parse.y" |
| 108611 | 108272 | {spanUnaryPostfix(&yygotominor.yy118,pParse,yymsp[0].major,&yymsp[-1].minor.yy118,&yymsp[0].minor.yy0);} |
| 108612 | | -#line 3026 "parse.c" |
| 108613 | 108273 | break; |
| 108614 | 108274 | case 215: /* expr ::= expr NOT NULL */ |
| 108615 | | -#line 890 "parse.y" |
| 108616 | 108275 | {spanUnaryPostfix(&yygotominor.yy118,pParse,TK_NOTNULL,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy0);} |
| 108617 | | -#line 3031 "parse.c" |
| 108618 | 108276 | break; |
| 108619 | 108277 | case 216: /* expr ::= expr IS expr */ |
| 108620 | | -#line 911 "parse.y" |
| 108621 | 108278 | { |
| 108622 | 108279 | spanBinaryExpr(&yygotominor.yy118,pParse,TK_IS,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118); |
| 108623 | 108280 | binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_ISNULL); |
| 108624 | 108281 | } |
| 108625 | | -#line 3039 "parse.c" |
| 108626 | 108282 | break; |
| 108627 | 108283 | case 217: /* expr ::= expr IS NOT expr */ |
| 108628 | | -#line 915 "parse.y" |
| 108629 | 108284 | { |
| 108630 | 108285 | spanBinaryExpr(&yygotominor.yy118,pParse,TK_ISNOT,&yymsp[-3].minor.yy118,&yymsp[0].minor.yy118); |
| 108631 | 108286 | binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_NOTNULL); |
| 108632 | 108287 | } |
| 108633 | | -#line 3047 "parse.c" |
| 108634 | 108288 | break; |
| 108635 | 108289 | case 218: /* expr ::= NOT expr */ |
| 108636 | 108290 | case 219: /* expr ::= BITNOT expr */ yytestcase(yyruleno==219); |
| 108637 | | -#line 938 "parse.y" |
| 108638 | 108291 | {spanUnaryPrefix(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108639 | | -#line 3053 "parse.c" |
| 108640 | 108292 | break; |
| 108641 | 108293 | case 220: /* expr ::= MINUS expr */ |
| 108642 | | -#line 941 "parse.y" |
| 108643 | 108294 | {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UMINUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108644 | | -#line 3058 "parse.c" |
| 108645 | 108295 | break; |
| 108646 | 108296 | case 221: /* expr ::= PLUS expr */ |
| 108647 | | -#line 943 "parse.y" |
| 108648 | 108297 | {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UPLUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108649 | | -#line 3063 "parse.c" |
| 108650 | 108298 | break; |
| 108651 | 108299 | case 224: /* expr ::= expr between_op expr AND expr */ |
| 108652 | | -#line 948 "parse.y" |
| 108653 | 108300 | { |
| 108654 | 108301 | ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108655 | 108302 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr); |
| 108656 | 108303 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy118.pExpr, 0, 0); |
| 108657 | 108304 | if( yygotominor.yy118.pExpr ){ |
| | @@ -108661,14 +108308,12 @@ |
| 108661 | 108308 | } |
| 108662 | 108309 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108663 | 108310 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108664 | 108311 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108665 | 108312 | } |
| 108666 | | -#line 3080 "parse.c" |
| 108667 | 108313 | break; |
| 108668 | 108314 | case 227: /* expr ::= expr in_op LP exprlist RP */ |
| 108669 | | -#line 965 "parse.y" |
| 108670 | 108315 | { |
| 108671 | 108316 | if( yymsp[-1].minor.yy322==0 ){ |
| 108672 | 108317 | /* Expressions of the form |
| 108673 | 108318 | ** |
| 108674 | 108319 | ** expr1 IN () |
| | @@ -108690,14 +108335,12 @@ |
| 108690 | 108335 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108691 | 108336 | } |
| 108692 | 108337 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108693 | 108338 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108694 | 108339 | } |
| 108695 | | -#line 3109 "parse.c" |
| 108696 | 108340 | break; |
| 108697 | 108341 | case 228: /* expr ::= LP select RP */ |
| 108698 | | -#line 990 "parse.y" |
| 108699 | 108342 | { |
| 108700 | 108343 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0); |
| 108701 | 108344 | if( yygotominor.yy118.pExpr ){ |
| 108702 | 108345 | yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387; |
| 108703 | 108346 | ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect); |
| | @@ -108706,14 +108349,12 @@ |
| 108706 | 108349 | sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387); |
| 108707 | 108350 | } |
| 108708 | 108351 | yygotominor.yy118.zStart = yymsp[-2].minor.yy0.z; |
| 108709 | 108352 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108710 | 108353 | } |
| 108711 | | -#line 3125 "parse.c" |
| 108712 | 108354 | break; |
| 108713 | 108355 | case 229: /* expr ::= expr in_op LP select RP */ |
| 108714 | | -#line 1002 "parse.y" |
| 108715 | 108356 | { |
| 108716 | 108357 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy118.pExpr, 0, 0); |
| 108717 | 108358 | if( yygotominor.yy118.pExpr ){ |
| 108718 | 108359 | yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387; |
| 108719 | 108360 | ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect); |
| | @@ -108723,14 +108364,12 @@ |
| 108723 | 108364 | } |
| 108724 | 108365 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108725 | 108366 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108726 | 108367 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108727 | 108368 | } |
| 108728 | | -#line 3142 "parse.c" |
| 108729 | 108369 | break; |
| 108730 | 108370 | case 230: /* expr ::= expr in_op nm dbnm */ |
| 108731 | | -#line 1015 "parse.y" |
| 108732 | 108371 | { |
| 108733 | 108372 | SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0); |
| 108734 | 108373 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy118.pExpr, 0, 0); |
| 108735 | 108374 | if( yygotominor.yy118.pExpr ){ |
| 108736 | 108375 | yygotominor.yy118.pExpr->x.pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0); |
| | @@ -108741,14 +108380,12 @@ |
| 108741 | 108380 | } |
| 108742 | 108381 | if( yymsp[-2].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108743 | 108382 | yygotominor.yy118.zStart = yymsp[-3].minor.yy118.zStart; |
| 108744 | 108383 | 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 | 108384 | } |
| 108746 | | -#line 3160 "parse.c" |
| 108747 | 108385 | break; |
| 108748 | 108386 | case 231: /* expr ::= EXISTS LP select RP */ |
| 108749 | | -#line 1029 "parse.y" |
| 108750 | 108387 | { |
| 108751 | 108388 | Expr *p = yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0); |
| 108752 | 108389 | if( p ){ |
| 108753 | 108390 | p->x.pSelect = yymsp[-1].minor.yy387; |
| 108754 | 108391 | ExprSetProperty(p, EP_xIsSelect); |
| | @@ -108757,14 +108394,12 @@ |
| 108757 | 108394 | sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387); |
| 108758 | 108395 | } |
| 108759 | 108396 | yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z; |
| 108760 | 108397 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108761 | 108398 | } |
| 108762 | | -#line 3176 "parse.c" |
| 108763 | 108399 | break; |
| 108764 | 108400 | case 232: /* expr ::= CASE case_operand case_exprlist case_else END */ |
| 108765 | | -#line 1044 "parse.y" |
| 108766 | 108401 | { |
| 108767 | 108402 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy314, yymsp[-1].minor.yy314, 0); |
| 108768 | 108403 | if( yygotominor.yy118.pExpr ){ |
| 108769 | 108404 | yygotominor.yy118.pExpr->x.pList = yymsp[-2].minor.yy322; |
| 108770 | 108405 | sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr); |
| | @@ -108772,50 +108407,38 @@ |
| 108772 | 108407 | sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy322); |
| 108773 | 108408 | } |
| 108774 | 108409 | yygotominor.yy118.zStart = yymsp[-4].minor.yy0.z; |
| 108775 | 108410 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108776 | 108411 | } |
| 108777 | | -#line 3191 "parse.c" |
| 108778 | 108412 | break; |
| 108779 | 108413 | case 233: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ |
| 108780 | | -#line 1057 "parse.y" |
| 108781 | 108414 | { |
| 108782 | 108415 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy118.pExpr); |
| 108783 | 108416 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108784 | 108417 | } |
| 108785 | | -#line 3199 "parse.c" |
| 108786 | 108418 | break; |
| 108787 | 108419 | case 234: /* case_exprlist ::= WHEN expr THEN expr */ |
| 108788 | | -#line 1061 "parse.y" |
| 108789 | 108420 | { |
| 108790 | 108421 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108791 | 108422 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108792 | 108423 | } |
| 108793 | | -#line 3207 "parse.c" |
| 108794 | 108424 | break; |
| 108795 | 108425 | case 243: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */ |
| 108796 | | -#line 1090 "parse.y" |
| 108797 | 108426 | { |
| 108798 | 108427 | sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0, |
| 108799 | 108428 | sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy322, yymsp[-9].minor.yy4, |
| 108800 | 108429 | &yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy4); |
| 108801 | 108430 | } |
| 108802 | | -#line 3216 "parse.c" |
| 108803 | 108431 | break; |
| 108804 | 108432 | case 244: /* uniqueflag ::= UNIQUE */ |
| 108805 | 108433 | case 298: /* raisetype ::= ABORT */ yytestcase(yyruleno==298); |
| 108806 | | -#line 1097 "parse.y" |
| 108807 | 108434 | {yygotominor.yy4 = OE_Abort;} |
| 108808 | | -#line 3222 "parse.c" |
| 108809 | 108435 | break; |
| 108810 | 108436 | case 245: /* uniqueflag ::= */ |
| 108811 | | -#line 1098 "parse.y" |
| 108812 | 108437 | {yygotominor.yy4 = OE_None;} |
| 108813 | | -#line 3227 "parse.c" |
| 108814 | 108438 | break; |
| 108815 | 108439 | case 248: /* idxlist ::= idxlist COMMA nm collate sortorder */ |
| 108816 | | -#line 1107 "parse.y" |
| 108817 | 108440 | { |
| 108818 | 108441 | Expr *p = 0; |
| 108819 | 108442 | if( yymsp[-1].minor.yy0.n>0 ){ |
| 108820 | 108443 | p = sqlite3Expr(pParse->db, TK_COLUMN, 0); |
| 108821 | 108444 | sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0); |
| | @@ -108823,14 +108446,12 @@ |
| 108823 | 108446 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, p); |
| 108824 | 108447 | sqlite3ExprListSetName(pParse,yygotominor.yy322,&yymsp[-2].minor.yy0,1); |
| 108825 | 108448 | sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index"); |
| 108826 | 108449 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108827 | 108450 | } |
| 108828 | | -#line 3242 "parse.c" |
| 108829 | 108451 | break; |
| 108830 | 108452 | case 249: /* idxlist ::= nm collate sortorder */ |
| 108831 | | -#line 1118 "parse.y" |
| 108832 | 108453 | { |
| 108833 | 108454 | Expr *p = 0; |
| 108834 | 108455 | if( yymsp[-1].minor.yy0.n>0 ){ |
| 108835 | 108456 | p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0); |
| 108836 | 108457 | sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0); |
| | @@ -108838,307 +108459,214 @@ |
| 108838 | 108459 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, p); |
| 108839 | 108460 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108840 | 108461 | sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index"); |
| 108841 | 108462 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108842 | 108463 | } |
| 108843 | | -#line 3257 "parse.c" |
| 108844 | 108464 | break; |
| 108845 | 108465 | case 250: /* collate ::= */ |
| 108846 | | -#line 1131 "parse.y" |
| 108847 | 108466 | {yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;} |
| 108848 | | -#line 3262 "parse.c" |
| 108849 | 108467 | break; |
| 108850 | 108468 | case 252: /* cmd ::= DROP INDEX ifexists fullname */ |
| 108851 | | -#line 1137 "parse.y" |
| 108852 | 108469 | {sqlite3DropIndex(pParse, yymsp[0].minor.yy259, yymsp[-1].minor.yy4);} |
| 108853 | | -#line 3267 "parse.c" |
| 108854 | 108470 | break; |
| 108855 | 108471 | case 253: /* cmd ::= VACUUM */ |
| 108856 | 108472 | case 254: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==254); |
| 108857 | | -#line 1143 "parse.y" |
| 108858 | 108473 | {sqlite3Vacuum(pParse);} |
| 108859 | | -#line 3273 "parse.c" |
| 108860 | 108474 | break; |
| 108861 | 108475 | case 255: /* cmd ::= PRAGMA nm dbnm */ |
| 108862 | | -#line 1151 "parse.y" |
| 108863 | 108476 | {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);} |
| 108864 | | -#line 3278 "parse.c" |
| 108865 | 108477 | break; |
| 108866 | 108478 | case 256: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ |
| 108867 | | -#line 1152 "parse.y" |
| 108868 | 108479 | {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);} |
| 108869 | | -#line 3283 "parse.c" |
| 108870 | 108480 | break; |
| 108871 | 108481 | case 257: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ |
| 108872 | | -#line 1153 "parse.y" |
| 108873 | 108482 | {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);} |
| 108874 | | -#line 3288 "parse.c" |
| 108875 | 108483 | break; |
| 108876 | 108484 | case 258: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ |
| 108877 | | -#line 1155 "parse.y" |
| 108878 | 108485 | {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);} |
| 108879 | | -#line 3293 "parse.c" |
| 108880 | 108486 | break; |
| 108881 | 108487 | case 259: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ |
| 108882 | | -#line 1157 "parse.y" |
| 108883 | 108488 | {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);} |
| 108884 | | -#line 3298 "parse.c" |
| 108885 | 108489 | break; |
| 108886 | 108490 | case 270: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ |
| 108887 | | -#line 1175 "parse.y" |
| 108888 | 108491 | { |
| 108889 | 108492 | Token all; |
| 108890 | 108493 | all.z = yymsp[-3].minor.yy0.z; |
| 108891 | 108494 | all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n; |
| 108892 | 108495 | sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy203, &all); |
| 108893 | 108496 | } |
| 108894 | | -#line 3308 "parse.c" |
| 108895 | 108497 | break; |
| 108896 | 108498 | 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 | 108499 | { |
| 108899 | 108500 | 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 | 108501 | yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); |
| 108901 | 108502 | } |
| 108902 | | -#line 3316 "parse.c" |
| 108903 | 108503 | break; |
| 108904 | 108504 | case 272: /* trigger_time ::= BEFORE */ |
| 108905 | 108505 | case 275: /* trigger_time ::= */ yytestcase(yyruleno==275); |
| 108906 | | -#line 1190 "parse.y" |
| 108907 | 108506 | { yygotominor.yy4 = TK_BEFORE; } |
| 108908 | | -#line 3322 "parse.c" |
| 108909 | 108507 | break; |
| 108910 | 108508 | case 273: /* trigger_time ::= AFTER */ |
| 108911 | | -#line 1191 "parse.y" |
| 108912 | 108509 | { yygotominor.yy4 = TK_AFTER; } |
| 108913 | | -#line 3327 "parse.c" |
| 108914 | 108510 | break; |
| 108915 | 108511 | case 274: /* trigger_time ::= INSTEAD OF */ |
| 108916 | | -#line 1192 "parse.y" |
| 108917 | 108512 | { yygotominor.yy4 = TK_INSTEAD;} |
| 108918 | | -#line 3332 "parse.c" |
| 108919 | 108513 | break; |
| 108920 | 108514 | case 276: /* trigger_event ::= DELETE|INSERT */ |
| 108921 | 108515 | case 277: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==277); |
| 108922 | | -#line 1197 "parse.y" |
| 108923 | 108516 | {yygotominor.yy90.a = yymsp[0].major; yygotominor.yy90.b = 0;} |
| 108924 | | -#line 3338 "parse.c" |
| 108925 | 108517 | break; |
| 108926 | 108518 | case 278: /* trigger_event ::= UPDATE OF inscollist */ |
| 108927 | | -#line 1199 "parse.y" |
| 108928 | 108519 | {yygotominor.yy90.a = TK_UPDATE; yygotominor.yy90.b = yymsp[0].minor.yy384;} |
| 108929 | | -#line 3343 "parse.c" |
| 108930 | 108520 | break; |
| 108931 | 108521 | case 281: /* when_clause ::= */ |
| 108932 | 108522 | case 303: /* key_opt ::= */ yytestcase(yyruleno==303); |
| 108933 | | -#line 1206 "parse.y" |
| 108934 | 108523 | { yygotominor.yy314 = 0; } |
| 108935 | | -#line 3349 "parse.c" |
| 108936 | 108524 | break; |
| 108937 | 108525 | case 282: /* when_clause ::= WHEN expr */ |
| 108938 | 108526 | case 304: /* key_opt ::= KEY expr */ yytestcase(yyruleno==304); |
| 108939 | | -#line 1207 "parse.y" |
| 108940 | 108527 | { yygotominor.yy314 = yymsp[0].minor.yy118.pExpr; } |
| 108941 | | -#line 3355 "parse.c" |
| 108942 | 108528 | break; |
| 108943 | 108529 | case 283: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ |
| 108944 | | -#line 1211 "parse.y" |
| 108945 | 108530 | { |
| 108946 | 108531 | assert( yymsp[-2].minor.yy203!=0 ); |
| 108947 | 108532 | yymsp[-2].minor.yy203->pLast->pNext = yymsp[-1].minor.yy203; |
| 108948 | 108533 | yymsp[-2].minor.yy203->pLast = yymsp[-1].minor.yy203; |
| 108949 | 108534 | yygotominor.yy203 = yymsp[-2].minor.yy203; |
| 108950 | 108535 | } |
| 108951 | | -#line 3365 "parse.c" |
| 108952 | 108536 | break; |
| 108953 | 108537 | case 284: /* trigger_cmd_list ::= trigger_cmd SEMI */ |
| 108954 | | -#line 1217 "parse.y" |
| 108955 | 108538 | { |
| 108956 | 108539 | assert( yymsp[-1].minor.yy203!=0 ); |
| 108957 | 108540 | yymsp[-1].minor.yy203->pLast = yymsp[-1].minor.yy203; |
| 108958 | 108541 | yygotominor.yy203 = yymsp[-1].minor.yy203; |
| 108959 | 108542 | } |
| 108960 | | -#line 3374 "parse.c" |
| 108961 | 108543 | break; |
| 108962 | 108544 | case 286: /* trnm ::= nm DOT nm */ |
| 108963 | | -#line 1229 "parse.y" |
| 108964 | 108545 | { |
| 108965 | 108546 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 108966 | 108547 | sqlite3ErrorMsg(pParse, |
| 108967 | 108548 | "qualified table names are not allowed on INSERT, UPDATE, and DELETE " |
| 108968 | 108549 | "statements within triggers"); |
| 108969 | 108550 | } |
| 108970 | | -#line 3384 "parse.c" |
| 108971 | 108551 | break; |
| 108972 | 108552 | case 288: /* tridxby ::= INDEXED BY nm */ |
| 108973 | | -#line 1241 "parse.y" |
| 108974 | 108553 | { |
| 108975 | 108554 | sqlite3ErrorMsg(pParse, |
| 108976 | 108555 | "the INDEXED BY clause is not allowed on UPDATE or DELETE statements " |
| 108977 | 108556 | "within triggers"); |
| 108978 | 108557 | } |
| 108979 | | -#line 3393 "parse.c" |
| 108980 | 108558 | break; |
| 108981 | 108559 | case 289: /* tridxby ::= NOT INDEXED */ |
| 108982 | | -#line 1246 "parse.y" |
| 108983 | 108560 | { |
| 108984 | 108561 | sqlite3ErrorMsg(pParse, |
| 108985 | 108562 | "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements " |
| 108986 | 108563 | "within triggers"); |
| 108987 | 108564 | } |
| 108988 | | -#line 3402 "parse.c" |
| 108989 | 108565 | break; |
| 108990 | 108566 | case 290: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */ |
| 108991 | | -#line 1259 "parse.y" |
| 108992 | 108567 | { 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 | 108568 | break; |
| 108995 | 108569 | case 291: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */ |
| 108996 | | -#line 1264 "parse.y" |
| 108997 | 108570 | {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 | 108571 | break; |
| 109000 | 108572 | case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */ |
| 109001 | | -#line 1267 "parse.y" |
| 109002 | 108573 | {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 | 108574 | break; |
| 109005 | 108575 | case 293: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */ |
| 109006 | | -#line 1271 "parse.y" |
| 109007 | 108576 | {yygotominor.yy203 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy314);} |
| 109008 | | -#line 3422 "parse.c" |
| 109009 | 108577 | break; |
| 109010 | 108578 | case 294: /* trigger_cmd ::= select */ |
| 109011 | | -#line 1274 "parse.y" |
| 109012 | 108579 | {yygotominor.yy203 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy387); } |
| 109013 | | -#line 3427 "parse.c" |
| 109014 | 108580 | break; |
| 109015 | 108581 | case 295: /* expr ::= RAISE LP IGNORE RP */ |
| 109016 | | -#line 1277 "parse.y" |
| 109017 | 108582 | { |
| 109018 | 108583 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0); |
| 109019 | 108584 | if( yygotominor.yy118.pExpr ){ |
| 109020 | 108585 | yygotominor.yy118.pExpr->affinity = OE_Ignore; |
| 109021 | 108586 | } |
| 109022 | 108587 | yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z; |
| 109023 | 108588 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 109024 | 108589 | } |
| 109025 | | -#line 3439 "parse.c" |
| 109026 | 108590 | break; |
| 109027 | 108591 | case 296: /* expr ::= RAISE LP raisetype COMMA nm RP */ |
| 109028 | | -#line 1285 "parse.y" |
| 109029 | 108592 | { |
| 109030 | 108593 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); |
| 109031 | 108594 | if( yygotominor.yy118.pExpr ) { |
| 109032 | 108595 | yygotominor.yy118.pExpr->affinity = (char)yymsp[-3].minor.yy4; |
| 109033 | 108596 | } |
| 109034 | 108597 | yygotominor.yy118.zStart = yymsp[-5].minor.yy0.z; |
| 109035 | 108598 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 109036 | 108599 | } |
| 109037 | | -#line 3451 "parse.c" |
| 109038 | 108600 | break; |
| 109039 | 108601 | case 297: /* raisetype ::= ROLLBACK */ |
| 109040 | | -#line 1296 "parse.y" |
| 109041 | 108602 | {yygotominor.yy4 = OE_Rollback;} |
| 109042 | | -#line 3456 "parse.c" |
| 109043 | 108603 | break; |
| 109044 | 108604 | case 299: /* raisetype ::= FAIL */ |
| 109045 | | -#line 1298 "parse.y" |
| 109046 | 108605 | {yygotominor.yy4 = OE_Fail;} |
| 109047 | | -#line 3461 "parse.c" |
| 109048 | 108606 | break; |
| 109049 | 108607 | case 300: /* cmd ::= DROP TRIGGER ifexists fullname */ |
| 109050 | | -#line 1303 "parse.y" |
| 109051 | 108608 | { |
| 109052 | 108609 | sqlite3DropTrigger(pParse,yymsp[0].minor.yy259,yymsp[-1].minor.yy4); |
| 109053 | 108610 | } |
| 109054 | | -#line 3468 "parse.c" |
| 109055 | 108611 | break; |
| 109056 | 108612 | case 301: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ |
| 109057 | | -#line 1310 "parse.y" |
| 109058 | 108613 | { |
| 109059 | 108614 | sqlite3Attach(pParse, yymsp[-3].minor.yy118.pExpr, yymsp[-1].minor.yy118.pExpr, yymsp[0].minor.yy314); |
| 109060 | 108615 | } |
| 109061 | | -#line 3475 "parse.c" |
| 109062 | 108616 | break; |
| 109063 | 108617 | case 302: /* cmd ::= DETACH database_kw_opt expr */ |
| 109064 | | -#line 1313 "parse.y" |
| 109065 | 108618 | { |
| 109066 | 108619 | sqlite3Detach(pParse, yymsp[0].minor.yy118.pExpr); |
| 109067 | 108620 | } |
| 109068 | | -#line 3482 "parse.c" |
| 109069 | 108621 | break; |
| 109070 | 108622 | case 307: /* cmd ::= REINDEX */ |
| 109071 | | -#line 1328 "parse.y" |
| 109072 | 108623 | {sqlite3Reindex(pParse, 0, 0);} |
| 109073 | | -#line 3487 "parse.c" |
| 109074 | 108624 | break; |
| 109075 | 108625 | case 308: /* cmd ::= REINDEX nm dbnm */ |
| 109076 | | -#line 1329 "parse.y" |
| 109077 | 108626 | {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} |
| 109078 | | -#line 3492 "parse.c" |
| 109079 | 108627 | break; |
| 109080 | 108628 | case 309: /* cmd ::= ANALYZE */ |
| 109081 | | -#line 1334 "parse.y" |
| 109082 | 108629 | {sqlite3Analyze(pParse, 0, 0);} |
| 109083 | | -#line 3497 "parse.c" |
| 109084 | 108630 | break; |
| 109085 | 108631 | case 310: /* cmd ::= ANALYZE nm dbnm */ |
| 109086 | | -#line 1335 "parse.y" |
| 109087 | 108632 | {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} |
| 109088 | | -#line 3502 "parse.c" |
| 109089 | 108633 | break; |
| 109090 | 108634 | case 311: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ |
| 109091 | | -#line 1340 "parse.y" |
| 109092 | 108635 | { |
| 109093 | 108636 | sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy259,&yymsp[0].minor.yy0); |
| 109094 | 108637 | } |
| 109095 | | -#line 3509 "parse.c" |
| 109096 | 108638 | break; |
| 109097 | 108639 | case 312: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */ |
| 109098 | | -#line 1343 "parse.y" |
| 109099 | 108640 | { |
| 109100 | 108641 | sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0); |
| 109101 | 108642 | } |
| 109102 | | -#line 3516 "parse.c" |
| 109103 | 108643 | break; |
| 109104 | 108644 | case 313: /* add_column_fullname ::= fullname */ |
| 109105 | | -#line 1346 "parse.y" |
| 109106 | 108645 | { |
| 109107 | 108646 | pParse->db->lookaside.bEnabled = 0; |
| 109108 | 108647 | sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy259); |
| 109109 | 108648 | } |
| 109110 | | -#line 3524 "parse.c" |
| 109111 | 108649 | break; |
| 109112 | 108650 | case 316: /* cmd ::= create_vtab */ |
| 109113 | | -#line 1356 "parse.y" |
| 109114 | 108651 | {sqlite3VtabFinishParse(pParse,0);} |
| 109115 | | -#line 3529 "parse.c" |
| 109116 | 108652 | break; |
| 109117 | 108653 | case 317: /* cmd ::= create_vtab LP vtabarglist RP */ |
| 109118 | | -#line 1357 "parse.y" |
| 109119 | 108654 | {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);} |
| 109120 | | -#line 3534 "parse.c" |
| 109121 | 108655 | break; |
| 109122 | 108656 | case 318: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */ |
| 109123 | | -#line 1358 "parse.y" |
| 109124 | 108657 | { |
| 109125 | 108658 | sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); |
| 109126 | 108659 | } |
| 109127 | | -#line 3541 "parse.c" |
| 109128 | 108660 | break; |
| 109129 | 108661 | case 321: /* vtabarg ::= */ |
| 109130 | | -#line 1363 "parse.y" |
| 109131 | 108662 | {sqlite3VtabArgInit(pParse);} |
| 109132 | | -#line 3546 "parse.c" |
| 109133 | 108663 | break; |
| 109134 | 108664 | case 323: /* vtabargtoken ::= ANY */ |
| 109135 | 108665 | case 324: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==324); |
| 109136 | 108666 | case 325: /* lp ::= LP */ yytestcase(yyruleno==325); |
| 109137 | | -#line 1365 "parse.y" |
| 109138 | 108667 | {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);} |
| 109139 | | -#line 3553 "parse.c" |
| 109140 | 108668 | break; |
| 109141 | 108669 | default: |
| 109142 | 108670 | /* (0) input ::= cmdlist */ yytestcase(yyruleno==0); |
| 109143 | 108671 | /* (1) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==1); |
| 109144 | 108672 | /* (2) cmdlist ::= ecmd */ yytestcase(yyruleno==2); |
| | @@ -109236,17 +108764,15 @@ |
| 109236 | 108764 | int yymajor, /* The major type of the error token */ |
| 109237 | 108765 | YYMINORTYPE yyminor /* The minor type of the error token */ |
| 109238 | 108766 | ){ |
| 109239 | 108767 | sqlite3ParserARG_FETCH; |
| 109240 | 108768 | #define TOKEN (yyminor.yy0) |
| 109241 | | -#line 32 "parse.y" |
| 109242 | 108769 | |
| 109243 | 108770 | UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */ |
| 109244 | 108771 | assert( TOKEN.z[0] ); /* The tokenizer always gives us a token */ |
| 109245 | 108772 | sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN); |
| 109246 | 108773 | pParse->parseError = 1; |
| 109247 | | -#line 3661 "parse.c" |
| 109248 | 108774 | sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */ |
| 109249 | 108775 | } |
| 109250 | 108776 | |
| 109251 | 108777 | /* |
| 109252 | 108778 | ** The following is executed when the parser accepts |
| | @@ -109436,11 +108962,10 @@ |
| 109436 | 108962 | return; |
| 109437 | 108963 | } |
| 109438 | 108964 | |
| 109439 | 108965 | /************** End of parse.c ***********************************************/ |
| 109440 | 108966 | /************** Begin file tokenize.c ****************************************/ |
| 109441 | | -#line 1 "tsrc/tokenize.c" |
| 109442 | 108967 | /* |
| 109443 | 108968 | ** 2001 September 15 |
| 109444 | 108969 | ** |
| 109445 | 108970 | ** The author disclaims copyright to this source code. In place of |
| 109446 | 108971 | ** a legal notice, here is a blessing: |
| | @@ -109502,11 +109027,10 @@ |
| 109502 | 109027 | ** named keywordhash.h and then included into this source file by |
| 109503 | 109028 | ** the #include below. |
| 109504 | 109029 | */ |
| 109505 | 109030 | /************** Include keywordhash.h in the middle of tokenize.c ************/ |
| 109506 | 109031 | /************** Begin file keywordhash.h *************************************/ |
| 109507 | | -#line 1 "tsrc/keywordhash.h" |
| 109508 | 109032 | /***** This file contains automatically generated code ****** |
| 109509 | 109033 | ** |
| 109510 | 109034 | ** The code in this file has been automatically generated by |
| 109511 | 109035 | ** |
| 109512 | 109036 | ** sqlite/tool/mkkeywordhash.c |
| | @@ -109776,11 +109300,10 @@ |
| 109776 | 109300 | } |
| 109777 | 109301 | #define SQLITE_N_KEYWORD 121 |
| 109778 | 109302 | |
| 109779 | 109303 | /************** End of keywordhash.h *****************************************/ |
| 109780 | 109304 | /************** Continuing where we left off in tokenize.c *******************/ |
| 109781 | | -#line 66 "tsrc/tokenize.c" |
| 109782 | 109305 | |
| 109783 | 109306 | |
| 109784 | 109307 | /* |
| 109785 | 109308 | ** If X is a character that can be used in an identifier then |
| 109786 | 109309 | ** IdChar(X) will be true. Otherwise it is false. |
| | @@ -110241,11 +109764,10 @@ |
| 110241 | 109764 | return nErr; |
| 110242 | 109765 | } |
| 110243 | 109766 | |
| 110244 | 109767 | /************** End of tokenize.c ********************************************/ |
| 110245 | 109768 | /************** Begin file complete.c ****************************************/ |
| 110246 | | -#line 1 "tsrc/complete.c" |
| 110247 | 109769 | /* |
| 110248 | 109770 | ** 2001 September 15 |
| 110249 | 109771 | ** |
| 110250 | 109772 | ** The author disclaims copyright to this source code. In place of |
| 110251 | 109773 | ** a legal notice, here is a blessing: |
| | @@ -110527,11 +110049,10 @@ |
| 110527 | 110049 | #endif /* SQLITE_OMIT_UTF16 */ |
| 110528 | 110050 | #endif /* SQLITE_OMIT_COMPLETE */ |
| 110529 | 110051 | |
| 110530 | 110052 | /************** End of complete.c ********************************************/ |
| 110531 | 110053 | /************** Begin file main.c ********************************************/ |
| 110532 | | -#line 1 "tsrc/main.c" |
| 110533 | 110054 | /* |
| 110534 | 110055 | ** 2001 September 15 |
| 110535 | 110056 | ** |
| 110536 | 110057 | ** The author disclaims copyright to this source code. In place of |
| 110537 | 110058 | ** a legal notice, here is a blessing: |
| | @@ -110548,11 +110069,10 @@ |
| 110548 | 110069 | */ |
| 110549 | 110070 | |
| 110550 | 110071 | #ifdef SQLITE_ENABLE_FTS3 |
| 110551 | 110072 | /************** Include fts3.h in the middle of main.c ***********************/ |
| 110552 | 110073 | /************** Begin file fts3.h ********************************************/ |
| 110553 | | -#line 1 "tsrc/fts3.h" |
| 110554 | 110074 | /* |
| 110555 | 110075 | ** 2006 Oct 10 |
| 110556 | 110076 | ** |
| 110557 | 110077 | ** The author disclaims copyright to this source code. In place of |
| 110558 | 110078 | ** a legal notice, here is a blessing: |
| | @@ -110577,16 +110097,14 @@ |
| 110577 | 110097 | } /* extern "C" */ |
| 110578 | 110098 | #endif /* __cplusplus */ |
| 110579 | 110099 | |
| 110580 | 110100 | /************** End of fts3.h ************************************************/ |
| 110581 | 110101 | /************** Continuing where we left off in main.c ***********************/ |
| 110582 | | -#line 21 "tsrc/main.c" |
| 110583 | 110102 | #endif |
| 110584 | 110103 | #ifdef SQLITE_ENABLE_RTREE |
| 110585 | 110104 | /************** Include rtree.h in the middle of main.c **********************/ |
| 110586 | 110105 | /************** Begin file rtree.h *******************************************/ |
| 110587 | | -#line 1 "tsrc/rtree.h" |
| 110588 | 110106 | /* |
| 110589 | 110107 | ** 2008 May 26 |
| 110590 | 110108 | ** |
| 110591 | 110109 | ** The author disclaims copyright to this source code. In place of |
| 110592 | 110110 | ** a legal notice, here is a blessing: |
| | @@ -110611,16 +110129,14 @@ |
| 110611 | 110129 | } /* extern "C" */ |
| 110612 | 110130 | #endif /* __cplusplus */ |
| 110613 | 110131 | |
| 110614 | 110132 | /************** End of rtree.h ***********************************************/ |
| 110615 | 110133 | /************** Continuing where we left off in main.c ***********************/ |
| 110616 | | -#line 24 "tsrc/main.c" |
| 110617 | 110134 | #endif |
| 110618 | 110135 | #ifdef SQLITE_ENABLE_ICU |
| 110619 | 110136 | /************** Include sqliteicu.h in the middle of main.c ******************/ |
| 110620 | 110137 | /************** Begin file sqliteicu.h ***************************************/ |
| 110621 | | -#line 1 "tsrc/sqliteicu.h" |
| 110622 | 110138 | /* |
| 110623 | 110139 | ** 2008 May 26 |
| 110624 | 110140 | ** |
| 110625 | 110141 | ** The author disclaims copyright to this source code. In place of |
| 110626 | 110142 | ** a legal notice, here is a blessing: |
| | @@ -110646,11 +110162,10 @@ |
| 110646 | 110162 | #endif /* __cplusplus */ |
| 110647 | 110163 | |
| 110648 | 110164 | |
| 110649 | 110165 | /************** End of sqliteicu.h *******************************************/ |
| 110650 | 110166 | /************** Continuing where we left off in main.c ***********************/ |
| 110651 | | -#line 27 "tsrc/main.c" |
| 110652 | 110167 | #endif |
| 110653 | 110168 | |
| 110654 | 110169 | #ifndef SQLITE_AMALGAMATION |
| 110655 | 110170 | /* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant |
| 110656 | 110171 | ** contains the text of SQLITE_VERSION macro. |
| | @@ -113577,11 +113092,10 @@ |
| 113577 | 113092 | return 0; |
| 113578 | 113093 | } |
| 113579 | 113094 | |
| 113580 | 113095 | /************** End of main.c ************************************************/ |
| 113581 | 113096 | /************** Begin file notify.c ******************************************/ |
| 113582 | | -#line 1 "tsrc/notify.c" |
| 113583 | 113097 | /* |
| 113584 | 113098 | ** 2009 March 3 |
| 113585 | 113099 | ** |
| 113586 | 113100 | ** The author disclaims copyright to this source code. In place of |
| 113587 | 113101 | ** a legal notice, here is a blessing: |
| | @@ -113911,11 +113425,10 @@ |
| 113911 | 113425 | } |
| 113912 | 113426 | #endif |
| 113913 | 113427 | |
| 113914 | 113428 | /************** End of notify.c **********************************************/ |
| 113915 | 113429 | /************** Begin file fts3.c ********************************************/ |
| 113916 | | -#line 1 "tsrc/fts3.c" |
| 113917 | 113430 | /* |
| 113918 | 113431 | ** 2006 Oct 10 |
| 113919 | 113432 | ** |
| 113920 | 113433 | ** The author disclaims copyright to this source code. In place of |
| 113921 | 113434 | ** a legal notice, here is a blessing: |
| | @@ -114208,11 +113721,10 @@ |
| 114208 | 113721 | ** into a single segment. |
| 114209 | 113722 | */ |
| 114210 | 113723 | |
| 114211 | 113724 | /************** Include fts3Int.h in the middle of fts3.c ********************/ |
| 114212 | 113725 | /************** Begin file fts3Int.h *****************************************/ |
| 114213 | | -#line 1 "tsrc/fts3Int.h" |
| 114214 | 113726 | /* |
| 114215 | 113727 | ** 2009 Nov 12 |
| 114216 | 113728 | ** |
| 114217 | 113729 | ** The author disclaims copyright to this source code. In place of |
| 114218 | 113730 | ** a legal notice, here is a blessing: |
| | @@ -114247,11 +113759,10 @@ |
| 114247 | 113759 | SQLITE_API extern const sqlite3_api_routines *sqlite3_api; |
| 114248 | 113760 | #endif |
| 114249 | 113761 | |
| 114250 | 113762 | /************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/ |
| 114251 | 113763 | /************** Begin file fts3_tokenizer.h **********************************/ |
| 114252 | | -#line 1 "tsrc/fts3_tokenizer.h" |
| 114253 | 113764 | /* |
| 114254 | 113765 | ** 2006 July 10 |
| 114255 | 113766 | ** |
| 114256 | 113767 | ** The author disclaims copyright to this source code. |
| 114257 | 113768 | ** |
| | @@ -114402,14 +113913,12 @@ |
| 114402 | 113913 | |
| 114403 | 113914 | #endif /* _FTS3_TOKENIZER_H_ */ |
| 114404 | 113915 | |
| 114405 | 113916 | /************** End of fts3_tokenizer.h **************************************/ |
| 114406 | 113917 | /************** Continuing where we left off in fts3Int.h ********************/ |
| 114407 | | -#line 40 "tsrc/fts3Int.h" |
| 114408 | 113918 | /************** Include fts3_hash.h in the middle of fts3Int.h ***************/ |
| 114409 | 113919 | /************** Begin file fts3_hash.h ***************************************/ |
| 114410 | | -#line 1 "tsrc/fts3_hash.h" |
| 114411 | 113920 | /* |
| 114412 | 113921 | ** 2001 September 22 |
| 114413 | 113922 | ** |
| 114414 | 113923 | ** The author disclaims copyright to this source code. In place of |
| 114415 | 113924 | ** a legal notice, here is a blessing: |
| | @@ -114521,11 +114030,10 @@ |
| 114521 | 114030 | |
| 114522 | 114031 | #endif /* _FTS3_HASH_H_ */ |
| 114523 | 114032 | |
| 114524 | 114033 | /************** End of fts3_hash.h *******************************************/ |
| 114525 | 114034 | /************** Continuing where we left off in fts3Int.h ********************/ |
| 114526 | | -#line 41 "tsrc/fts3Int.h" |
| 114527 | 114035 | |
| 114528 | 114036 | /* |
| 114529 | 114037 | ** This constant controls how often segments are merged. Once there are |
| 114530 | 114038 | ** FTS3_MERGE_COUNT segments of level N, they are merged into a single |
| 114531 | 114039 | ** segment of level N+1. |
| | @@ -114998,11 +114506,10 @@ |
| 114998 | 114506 | #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */ |
| 114999 | 114507 | #endif /* _FTSINT_H */ |
| 115000 | 114508 | |
| 115001 | 114509 | /************** End of fts3Int.h *********************************************/ |
| 115002 | 114510 | /************** Continuing where we left off in fts3.c ***********************/ |
| 115003 | | -#line 296 "tsrc/fts3.c" |
| 115004 | 114511 | #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) |
| 115005 | 114512 | |
| 115006 | 114513 | #if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE) |
| 115007 | 114514 | # define SQLITE_CORE 1 |
| 115008 | 114515 | #endif |
| | @@ -119548,11 +119055,10 @@ |
| 119548 | 119055 | |
| 119549 | 119056 | #endif |
| 119550 | 119057 | |
| 119551 | 119058 | /************** End of fts3.c ************************************************/ |
| 119552 | 119059 | /************** Begin file fts3_aux.c ****************************************/ |
| 119553 | | -#line 1 "tsrc/fts3_aux.c" |
| 119554 | 119060 | /* |
| 119555 | 119061 | ** 2011 Jan 27 |
| 119556 | 119062 | ** |
| 119557 | 119063 | ** The author disclaims copyright to this source code. In place of |
| 119558 | 119064 | ** a legal notice, here is a blessing: |
| | @@ -120025,11 +119531,10 @@ |
| 120025 | 119531 | |
| 120026 | 119532 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 120027 | 119533 | |
| 120028 | 119534 | /************** End of fts3_aux.c ********************************************/ |
| 120029 | 119535 | /************** Begin file fts3_expr.c ***************************************/ |
| 120030 | | -#line 1 "tsrc/fts3_expr.c" |
| 120031 | 119536 | /* |
| 120032 | 119537 | ** 2008 Nov 28 |
| 120033 | 119538 | ** |
| 120034 | 119539 | ** The author disclaims copyright to this source code. In place of |
| 120035 | 119540 | ** a legal notice, here is a blessing: |
| | @@ -120992,11 +120497,10 @@ |
| 120992 | 120497 | #endif |
| 120993 | 120498 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 120994 | 120499 | |
| 120995 | 120500 | /************** End of fts3_expr.c *******************************************/ |
| 120996 | 120501 | /************** Begin file fts3_hash.c ***************************************/ |
| 120997 | | -#line 1 "tsrc/fts3_hash.c" |
| 120998 | 120502 | /* |
| 120999 | 120503 | ** 2001 September 22 |
| 121000 | 120504 | ** |
| 121001 | 120505 | ** The author disclaims copyright to this source code. In place of |
| 121002 | 120506 | ** a legal notice, here is a blessing: |
| | @@ -121377,11 +120881,10 @@ |
| 121377 | 120881 | |
| 121378 | 120882 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 121379 | 120883 | |
| 121380 | 120884 | /************** End of fts3_hash.c *******************************************/ |
| 121381 | 120885 | /************** Begin file fts3_porter.c *************************************/ |
| 121382 | | -#line 1 "tsrc/fts3_porter.c" |
| 121383 | 120886 | /* |
| 121384 | 120887 | ** 2006 September 30 |
| 121385 | 120888 | ** |
| 121386 | 120889 | ** The author disclaims copyright to this source code. In place of |
| 121387 | 120890 | ** a legal notice, here is a blessing: |
| | @@ -122024,11 +121527,10 @@ |
| 122024 | 121527 | |
| 122025 | 121528 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122026 | 121529 | |
| 122027 | 121530 | /************** End of fts3_porter.c *****************************************/ |
| 122028 | 121531 | /************** Begin file fts3_tokenizer.c **********************************/ |
| 122029 | | -#line 1 "tsrc/fts3_tokenizer.c" |
| 122030 | 121532 | /* |
| 122031 | 121533 | ** 2007 June 22 |
| 122032 | 121534 | ** |
| 122033 | 121535 | ** The author disclaims copyright to this source code. In place of |
| 122034 | 121536 | ** a legal notice, here is a blessing: |
| | @@ -122516,11 +122018,10 @@ |
| 122516 | 122018 | |
| 122517 | 122019 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122518 | 122020 | |
| 122519 | 122021 | /************** End of fts3_tokenizer.c **************************************/ |
| 122520 | 122022 | /************** Begin file fts3_tokenizer1.c *********************************/ |
| 122521 | | -#line 1 "tsrc/fts3_tokenizer1.c" |
| 122522 | 122023 | /* |
| 122523 | 122024 | ** 2006 Oct 10 |
| 122524 | 122025 | ** |
| 122525 | 122026 | ** The author disclaims copyright to this source code. In place of |
| 122526 | 122027 | ** a legal notice, here is a blessing: |
| | @@ -122751,11 +122252,10 @@ |
| 122751 | 122252 | |
| 122752 | 122253 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122753 | 122254 | |
| 122754 | 122255 | /************** End of fts3_tokenizer1.c *************************************/ |
| 122755 | 122256 | /************** Begin file fts3_write.c **************************************/ |
| 122756 | | -#line 1 "tsrc/fts3_write.c" |
| 122757 | 122257 | /* |
| 122758 | 122258 | ** 2009 Oct 23 |
| 122759 | 122259 | ** |
| 122760 | 122260 | ** The author disclaims copyright to this source code. In place of |
| 122761 | 122261 | ** a legal notice, here is a blessing: |
| | @@ -126022,11 +125522,10 @@ |
| 126022 | 125522 | |
| 126023 | 125523 | #endif |
| 126024 | 125524 | |
| 126025 | 125525 | /************** End of fts3_write.c ******************************************/ |
| 126026 | 125526 | /************** Begin file fts3_snippet.c ************************************/ |
| 126027 | | -#line 1 "tsrc/fts3_snippet.c" |
| 126028 | 125527 | /* |
| 126029 | 125528 | ** 2009 Oct 23 |
| 126030 | 125529 | ** |
| 126031 | 125530 | ** The author disclaims copyright to this source code. In place of |
| 126032 | 125531 | ** a legal notice, here is a blessing: |
| | @@ -127524,11 +127023,10 @@ |
| 127524 | 127023 | |
| 127525 | 127024 | #endif |
| 127526 | 127025 | |
| 127527 | 127026 | /************** End of fts3_snippet.c ****************************************/ |
| 127528 | 127027 | /************** Begin file rtree.c *******************************************/ |
| 127529 | | -#line 1 "tsrc/rtree.c" |
| 127530 | 127028 | /* |
| 127531 | 127029 | ** 2001 September 15 |
| 127532 | 127030 | ** |
| 127533 | 127031 | ** The author disclaims copyright to this source code. In place of |
| 127534 | 127032 | ** a legal notice, here is a blessing: |
| | @@ -130806,11 +130304,10 @@ |
| 130806 | 130304 | |
| 130807 | 130305 | #endif |
| 130808 | 130306 | |
| 130809 | 130307 | /************** End of rtree.c ***********************************************/ |
| 130810 | 130308 | /************** Begin file icu.c *********************************************/ |
| 130811 | | -#line 1 "tsrc/icu.c" |
| 130812 | 130309 | /* |
| 130813 | 130310 | ** 2007 May 6 |
| 130814 | 130311 | ** |
| 130815 | 130312 | ** The author disclaims copyright to this source code. In place of |
| 130816 | 130313 | ** a legal notice, here is a blessing: |
| | @@ -131309,11 +130806,10 @@ |
| 131309 | 130806 | |
| 131310 | 130807 | #endif |
| 131311 | 130808 | |
| 131312 | 130809 | /************** End of icu.c *************************************************/ |
| 131313 | 130810 | /************** Begin file fts3_icu.c ****************************************/ |
| 131314 | | -#line 1 "tsrc/fts3_icu.c" |
| 131315 | 130811 | /* |
| 131316 | 130812 | ** 2007 June 22 |
| 131317 | 130813 | ** |
| 131318 | 130814 | ** The author disclaims copyright to this source code. In place of |
| 131319 | 130815 | ** a legal notice, here is a blessing: |
| 131320 | 130816 | |