Fossil SCM
Update the built-in SQLite amalgamation to the latest 3.7.8 beta.
Commit
4db5bd1111f21a2208b1a22f6dad88ea8d5f72b1
Parent
693ab93b7de85e9…
2 files changed
+296
-805
+1
-1
+296
-805
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -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-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8" | |
| 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: |
| @@ -8785,14 +8770,12 @@ | ||
| 8785 | 8770 | |
| 8786 | 8771 | #endif /* _PAGER_H_ */ |
| 8787 | 8772 | |
| 8788 | 8773 | /************** End of pager.h ***********************************************/ |
| 8789 | 8774 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8790 | -#line 655 "tsrc/sqliteInt.h" | |
| 8791 | 8775 | /************** Include pcache.h in the middle of sqliteInt.h ****************/ |
| 8792 | 8776 | /************** Begin file pcache.h ******************************************/ |
| 8793 | -#line 1 "tsrc/pcache.h" | |
| 8794 | 8777 | /* |
| 8795 | 8778 | ** 2008 August 05 |
| 8796 | 8779 | ** |
| 8797 | 8780 | ** The author disclaims copyright to this source code. In place of |
| 8798 | 8781 | ** a legal notice, here is a blessing: |
| @@ -8947,15 +8930,13 @@ | ||
| 8947 | 8930 | |
| 8948 | 8931 | #endif /* _PCACHE_H_ */ |
| 8949 | 8932 | |
| 8950 | 8933 | /************** End of pcache.h **********************************************/ |
| 8951 | 8934 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8952 | -#line 656 "tsrc/sqliteInt.h" | |
| 8953 | 8935 | |
| 8954 | 8936 | /************** Include os.h in the middle of sqliteInt.h ********************/ |
| 8955 | 8937 | /************** Begin file os.h **********************************************/ |
| 8956 | -#line 1 "tsrc/os.h" | |
| 8957 | 8938 | /* |
| 8958 | 8939 | ** 2001 September 16 |
| 8959 | 8940 | ** |
| 8960 | 8941 | ** The author disclaims copyright to this source code. In place of |
| 8961 | 8942 | ** a legal notice, here is a blessing: |
| @@ -9234,14 +9215,12 @@ | ||
| 9234 | 9215 | |
| 9235 | 9216 | #endif /* _SQLITE_OS_H_ */ |
| 9236 | 9217 | |
| 9237 | 9218 | /************** End of os.h **************************************************/ |
| 9238 | 9219 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 9239 | -#line 658 "tsrc/sqliteInt.h" | |
| 9240 | 9220 | /************** Include mutex.h in the middle of sqliteInt.h *****************/ |
| 9241 | 9221 | /************** Begin file mutex.h *******************************************/ |
| 9242 | -#line 1 "tsrc/mutex.h" | |
| 9243 | 9222 | /* |
| 9244 | 9223 | ** 2007 August 28 |
| 9245 | 9224 | ** |
| 9246 | 9225 | ** The author disclaims copyright to this source code. In place of |
| 9247 | 9226 | ** a legal notice, here is a blessing: |
| @@ -9312,11 +9291,10 @@ | ||
| 9312 | 9291 | #define sqlite3MutexEnd() |
| 9313 | 9292 | #endif /* defined(SQLITE_MUTEX_OMIT) */ |
| 9314 | 9293 | |
| 9315 | 9294 | /************** End of mutex.h ***********************************************/ |
| 9316 | 9295 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 9317 | -#line 659 "tsrc/sqliteInt.h" | |
| 9318 | 9296 | |
| 9319 | 9297 | |
| 9320 | 9298 | /* |
| 9321 | 9299 | ** Each database file to be accessed by the system is an instance |
| 9322 | 9300 | ** of the following structure. There are normally two of these structures |
| @@ -10509,11 +10487,12 @@ | ||
| 10509 | 10487 | char *zDatabase; /* Name of database holding this table */ |
| 10510 | 10488 | char *zName; /* Name of the table */ |
| 10511 | 10489 | char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */ |
| 10512 | 10490 | Table *pTab; /* An SQL table corresponding to zName */ |
| 10513 | 10491 | Select *pSelect; /* A SELECT statement used in place of a table name */ |
| 10514 | - u8 isPopulated; /* Temporary table associated with SELECT is populated */ | |
| 10492 | + int addrFillSub; /* Address of subroutine to manifest a subquery */ | |
| 10493 | + int regReturn; /* Register holding return address of addrFillSub */ | |
| 10515 | 10494 | u8 jointype; /* Type of join between this able and the previous */ |
| 10516 | 10495 | u8 notIndexed; /* True if there is a NOT INDEXED clause */ |
| 10517 | 10496 | u8 isCorrelated; /* True if sub-query is correlated */ |
| 10518 | 10497 | #ifndef SQLITE_OMIT_EXPLAIN |
| 10519 | 10498 | u8 iSelectId; /* If pSelect!=0, the id of the sub-select in EQP */ |
| @@ -11915,11 +11894,10 @@ | ||
| 11915 | 11894 | |
| 11916 | 11895 | #endif /* _SQLITEINT_H_ */ |
| 11917 | 11896 | |
| 11918 | 11897 | /************** End of sqliteInt.h *******************************************/ |
| 11919 | 11898 | /************** Begin file global.c ******************************************/ |
| 11920 | -#line 1 "tsrc/global.c" | |
| 11921 | 11899 | /* |
| 11922 | 11900 | ** 2008 June 13 |
| 11923 | 11901 | ** |
| 11924 | 11902 | ** The author disclaims copyright to this source code. In place of |
| 11925 | 11903 | ** a legal notice, here is a blessing: |
| @@ -12138,11 +12116,10 @@ | ||
| 12138 | 12116 | */ |
| 12139 | 12117 | SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER; |
| 12140 | 12118 | |
| 12141 | 12119 | /************** End of global.c **********************************************/ |
| 12142 | 12120 | /************** Begin file ctime.c *******************************************/ |
| 12143 | -#line 1 "tsrc/ctime.c" | |
| 12144 | 12121 | /* |
| 12145 | 12122 | ** 2010 February 23 |
| 12146 | 12123 | ** |
| 12147 | 12124 | ** The author disclaims copyright to this source code. In place of |
| 12148 | 12125 | ** a legal notice, here is a blessing: |
| @@ -12543,11 +12520,10 @@ | ||
| 12543 | 12520 | |
| 12544 | 12521 | #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ |
| 12545 | 12522 | |
| 12546 | 12523 | /************** End of ctime.c ***********************************************/ |
| 12547 | 12524 | /************** Begin file status.c ******************************************/ |
| 12548 | -#line 1 "tsrc/status.c" | |
| 12549 | 12525 | /* |
| 12550 | 12526 | ** 2008 June 18 |
| 12551 | 12527 | ** |
| 12552 | 12528 | ** The author disclaims copyright to this source code. In place of |
| 12553 | 12529 | ** a legal notice, here is a blessing: |
| @@ -12561,11 +12537,10 @@ | ||
| 12561 | 12537 | ** This module implements the sqlite3_status() interface and related |
| 12562 | 12538 | ** functionality. |
| 12563 | 12539 | */ |
| 12564 | 12540 | /************** Include vdbeInt.h in the middle of status.c ******************/ |
| 12565 | 12541 | /************** Begin file vdbeInt.h *****************************************/ |
| 12566 | -#line 1 "tsrc/vdbeInt.h" | |
| 12567 | 12542 | /* |
| 12568 | 12543 | ** 2003 September 6 |
| 12569 | 12544 | ** |
| 12570 | 12545 | ** The author disclaims copyright to this source code. In place of |
| 12571 | 12546 | ** a legal notice, here is a blessing: |
| @@ -13013,11 +12988,10 @@ | ||
| 13013 | 12988 | |
| 13014 | 12989 | #endif /* !defined(_VDBEINT_H_) */ |
| 13015 | 12990 | |
| 13016 | 12991 | /************** End of vdbeInt.h *********************************************/ |
| 13017 | 12992 | /************** Continuing where we left off in status.c *********************/ |
| 13018 | -#line 18 "tsrc/status.c" | |
| 13019 | 12993 | |
| 13020 | 12994 | /* |
| 13021 | 12995 | ** Variables in which to record status information. |
| 13022 | 12996 | */ |
| 13023 | 12997 | typedef struct sqlite3StatType sqlite3StatType; |
| @@ -13227,11 +13201,10 @@ | ||
| 13227 | 13201 | return rc; |
| 13228 | 13202 | } |
| 13229 | 13203 | |
| 13230 | 13204 | /************** End of status.c **********************************************/ |
| 13231 | 13205 | /************** Begin file date.c ********************************************/ |
| 13232 | -#line 1 "tsrc/date.c" | |
| 13233 | 13206 | /* |
| 13234 | 13207 | ** 2003 October 31 |
| 13235 | 13208 | ** |
| 13236 | 13209 | ** The author disclaims copyright to this source code. In place of |
| 13237 | 13210 | ** a legal notice, here is a blessing: |
| @@ -14355,11 +14328,10 @@ | ||
| 14355 | 14328 | } |
| 14356 | 14329 | } |
| 14357 | 14330 | |
| 14358 | 14331 | /************** End of date.c ************************************************/ |
| 14359 | 14332 | /************** Begin file os.c **********************************************/ |
| 14360 | -#line 1 "tsrc/os.c" | |
| 14361 | 14333 | /* |
| 14362 | 14334 | ** 2005 November 29 |
| 14363 | 14335 | ** |
| 14364 | 14336 | ** The author disclaims copyright to this source code. In place of |
| 14365 | 14337 | ** a legal notice, here is a blessing: |
| @@ -14689,11 +14661,10 @@ | ||
| 14689 | 14661 | return SQLITE_OK; |
| 14690 | 14662 | } |
| 14691 | 14663 | |
| 14692 | 14664 | /************** End of os.c **************************************************/ |
| 14693 | 14665 | /************** Begin file fault.c *******************************************/ |
| 14694 | -#line 1 "tsrc/fault.c" | |
| 14695 | 14666 | /* |
| 14696 | 14667 | ** 2008 Jan 22 |
| 14697 | 14668 | ** |
| 14698 | 14669 | ** The author disclaims copyright to this source code. In place of |
| 14699 | 14670 | ** a legal notice, here is a blessing: |
| @@ -14779,11 +14750,10 @@ | ||
| 14779 | 14750 | |
| 14780 | 14751 | #endif /* #ifndef SQLITE_OMIT_BUILTIN_TEST */ |
| 14781 | 14752 | |
| 14782 | 14753 | /************** End of fault.c ***********************************************/ |
| 14783 | 14754 | /************** Begin file mem0.c ********************************************/ |
| 14784 | -#line 1 "tsrc/mem0.c" | |
| 14785 | 14755 | /* |
| 14786 | 14756 | ** 2008 October 28 |
| 14787 | 14757 | ** |
| 14788 | 14758 | ** The author disclaims copyright to this source code. In place of |
| 14789 | 14759 | ** a legal notice, here is a blessing: |
| @@ -14841,11 +14811,10 @@ | ||
| 14841 | 14811 | |
| 14842 | 14812 | #endif /* SQLITE_ZERO_MALLOC */ |
| 14843 | 14813 | |
| 14844 | 14814 | /************** End of mem0.c ************************************************/ |
| 14845 | 14815 | /************** Begin file mem1.c ********************************************/ |
| 14846 | -#line 1 "tsrc/mem1.c" | |
| 14847 | 14816 | /* |
| 14848 | 14817 | ** 2007 August 14 |
| 14849 | 14818 | ** |
| 14850 | 14819 | ** The author disclaims copyright to this source code. In place of |
| 14851 | 14820 | ** a legal notice, here is a blessing: |
| @@ -14994,11 +14963,10 @@ | ||
| 14994 | 14963 | |
| 14995 | 14964 | #endif /* SQLITE_SYSTEM_MALLOC */ |
| 14996 | 14965 | |
| 14997 | 14966 | /************** End of mem1.c ************************************************/ |
| 14998 | 14967 | /************** Begin file mem2.c ********************************************/ |
| 14999 | -#line 1 "tsrc/mem2.c" | |
| 15000 | 14968 | /* |
| 15001 | 14969 | ** 2007 August 15 |
| 15002 | 14970 | ** |
| 15003 | 14971 | ** The author disclaims copyright to this source code. In place of |
| 15004 | 14972 | ** a legal notice, here is a blessing: |
| @@ -15525,11 +15493,10 @@ | ||
| 15525 | 15493 | |
| 15526 | 15494 | #endif /* SQLITE_MEMDEBUG */ |
| 15527 | 15495 | |
| 15528 | 15496 | /************** End of mem2.c ************************************************/ |
| 15529 | 15497 | /************** Begin file mem3.c ********************************************/ |
| 15530 | -#line 1 "tsrc/mem3.c" | |
| 15531 | 15498 | /* |
| 15532 | 15499 | ** 2007 October 14 |
| 15533 | 15500 | ** |
| 15534 | 15501 | ** The author disclaims copyright to this source code. In place of |
| 15535 | 15502 | ** a legal notice, here is a blessing: |
| @@ -16215,11 +16182,10 @@ | ||
| 16215 | 16182 | |
| 16216 | 16183 | #endif /* SQLITE_ENABLE_MEMSYS3 */ |
| 16217 | 16184 | |
| 16218 | 16185 | /************** End of mem3.c ************************************************/ |
| 16219 | 16186 | /************** Begin file mem5.c ********************************************/ |
| 16220 | -#line 1 "tsrc/mem5.c" | |
| 16221 | 16187 | /* |
| 16222 | 16188 | ** 2007 October 14 |
| 16223 | 16189 | ** |
| 16224 | 16190 | ** The author disclaims copyright to this source code. In place of |
| 16225 | 16191 | ** a legal notice, here is a blessing: |
| @@ -16799,11 +16765,10 @@ | ||
| 16799 | 16765 | |
| 16800 | 16766 | #endif /* SQLITE_ENABLE_MEMSYS5 */ |
| 16801 | 16767 | |
| 16802 | 16768 | /************** End of mem5.c ************************************************/ |
| 16803 | 16769 | /************** Begin file mutex.c *******************************************/ |
| 16804 | -#line 1 "tsrc/mutex.c" | |
| 16805 | 16770 | /* |
| 16806 | 16771 | ** 2007 August 14 |
| 16807 | 16772 | ** |
| 16808 | 16773 | ** The author disclaims copyright to this source code. In place of |
| 16809 | 16774 | ** a legal notice, here is a blessing: |
| @@ -16955,11 +16920,10 @@ | ||
| 16955 | 16920 | |
| 16956 | 16921 | #endif /* SQLITE_MUTEX_OMIT */ |
| 16957 | 16922 | |
| 16958 | 16923 | /************** End of mutex.c ***********************************************/ |
| 16959 | 16924 | /************** Begin file mutex_noop.c **************************************/ |
| 16960 | -#line 1 "tsrc/mutex_noop.c" | |
| 16961 | 16925 | /* |
| 16962 | 16926 | ** 2008 October 07 |
| 16963 | 16927 | ** |
| 16964 | 16928 | ** The author disclaims copyright to this source code. In place of |
| 16965 | 16929 | ** a legal notice, here is a blessing: |
| @@ -17164,11 +17128,10 @@ | ||
| 17164 | 17128 | #endif /* SQLITE_MUTEX_NOOP */ |
| 17165 | 17129 | #endif /* SQLITE_MUTEX_OMIT */ |
| 17166 | 17130 | |
| 17167 | 17131 | /************** End of mutex_noop.c ******************************************/ |
| 17168 | 17132 | /************** Begin file mutex_os2.c ***************************************/ |
| 17169 | -#line 1 "tsrc/mutex_os2.c" | |
| 17170 | 17133 | /* |
| 17171 | 17134 | ** 2007 August 28 |
| 17172 | 17135 | ** |
| 17173 | 17136 | ** The author disclaims copyright to this source code. In place of |
| 17174 | 17137 | ** a legal notice, here is a blessing: |
| @@ -17441,11 +17404,10 @@ | ||
| 17441 | 17404 | } |
| 17442 | 17405 | #endif /* SQLITE_MUTEX_OS2 */ |
| 17443 | 17406 | |
| 17444 | 17407 | /************** End of mutex_os2.c *******************************************/ |
| 17445 | 17408 | /************** Begin file mutex_unix.c **************************************/ |
| 17446 | -#line 1 "tsrc/mutex_unix.c" | |
| 17447 | 17409 | /* |
| 17448 | 17410 | ** 2007 August 28 |
| 17449 | 17411 | ** |
| 17450 | 17412 | ** The author disclaims copyright to this source code. In place of |
| 17451 | 17413 | ** a legal notice, here is a blessing: |
| @@ -17795,11 +17757,10 @@ | ||
| 17795 | 17757 | |
| 17796 | 17758 | #endif /* SQLITE_MUTEX_PTHREAD */ |
| 17797 | 17759 | |
| 17798 | 17760 | /************** End of mutex_unix.c ******************************************/ |
| 17799 | 17761 | /************** Begin file mutex_w32.c ***************************************/ |
| 17800 | -#line 1 "tsrc/mutex_w32.c" | |
| 17801 | 17762 | /* |
| 17802 | 17763 | ** 2007 August 14 |
| 17803 | 17764 | ** |
| 17804 | 17765 | ** The author disclaims copyright to this source code. In place of |
| 17805 | 17766 | ** a legal notice, here is a blessing: |
| @@ -18130,11 +18091,10 @@ | ||
| 18130 | 18091 | } |
| 18131 | 18092 | #endif /* SQLITE_MUTEX_W32 */ |
| 18132 | 18093 | |
| 18133 | 18094 | /************** End of mutex_w32.c *******************************************/ |
| 18134 | 18095 | /************** Begin file malloc.c ******************************************/ |
| 18135 | -#line 1 "tsrc/malloc.c" | |
| 18136 | 18096 | /* |
| 18137 | 18097 | ** 2001 September 15 |
| 18138 | 18098 | ** |
| 18139 | 18099 | ** The author disclaims copyright to this source code. In place of |
| 18140 | 18100 | ** a legal notice, here is a blessing: |
| @@ -18910,11 +18870,10 @@ | ||
| 18910 | 18870 | return rc & (db ? db->errMask : 0xff); |
| 18911 | 18871 | } |
| 18912 | 18872 | |
| 18913 | 18873 | /************** End of malloc.c **********************************************/ |
| 18914 | 18874 | /************** Begin file printf.c ******************************************/ |
| 18915 | -#line 1 "tsrc/printf.c" | |
| 18916 | 18875 | /* |
| 18917 | 18876 | ** The "printf" code that follows dates from the 1980's. It is in |
| 18918 | 18877 | ** the public domain. The original comments are included here for |
| 18919 | 18878 | ** completeness. They are very out-of-date but might be useful as |
| 18920 | 18879 | ** an historical reference. Most of the "enhancements" have been backed |
| @@ -19942,11 +19901,10 @@ | ||
| 19942 | 19901 | } |
| 19943 | 19902 | #endif |
| 19944 | 19903 | |
| 19945 | 19904 | /************** End of printf.c **********************************************/ |
| 19946 | 19905 | /************** Begin file random.c ******************************************/ |
| 19947 | -#line 1 "tsrc/random.c" | |
| 19948 | 19906 | /* |
| 19949 | 19907 | ** 2001 September 15 |
| 19950 | 19908 | ** |
| 19951 | 19909 | ** The author disclaims copyright to this source code. In place of |
| 19952 | 19910 | ** a legal notice, here is a blessing: |
| @@ -20090,11 +20048,10 @@ | ||
| 20090 | 20048 | } |
| 20091 | 20049 | #endif /* SQLITE_OMIT_BUILTIN_TEST */ |
| 20092 | 20050 | |
| 20093 | 20051 | /************** End of random.c **********************************************/ |
| 20094 | 20052 | /************** Begin file utf.c *********************************************/ |
| 20095 | -#line 1 "tsrc/utf.c" | |
| 20096 | 20053 | /* |
| 20097 | 20054 | ** 2004 April 13 |
| 20098 | 20055 | ** |
| 20099 | 20056 | ** The author disclaims copyright to this source code. In place of |
| 20100 | 20057 | ** a legal notice, here is a blessing: |
| @@ -20652,11 +20609,10 @@ | ||
| 20652 | 20609 | #endif /* SQLITE_TEST */ |
| 20653 | 20610 | #endif /* SQLITE_OMIT_UTF16 */ |
| 20654 | 20611 | |
| 20655 | 20612 | /************** End of utf.c *************************************************/ |
| 20656 | 20613 | /************** Begin file util.c ********************************************/ |
| 20657 | -#line 1 "tsrc/util.c" | |
| 20658 | 20614 | /* |
| 20659 | 20615 | ** 2001 September 15 |
| 20660 | 20616 | ** |
| 20661 | 20617 | ** The author disclaims copyright to this source code. In place of |
| 20662 | 20618 | ** a legal notice, here is a blessing: |
| @@ -21835,11 +21791,10 @@ | ||
| 21835 | 21791 | } |
| 21836 | 21792 | #endif |
| 21837 | 21793 | |
| 21838 | 21794 | /************** End of util.c ************************************************/ |
| 21839 | 21795 | /************** Begin file hash.c ********************************************/ |
| 21840 | -#line 1 "tsrc/hash.c" | |
| 21841 | 21796 | /* |
| 21842 | 21797 | ** 2001 September 22 |
| 21843 | 21798 | ** |
| 21844 | 21799 | ** The author disclaims copyright to this source code. In place of |
| 21845 | 21800 | ** a legal notice, here is a blessing: |
| @@ -22115,11 +22070,10 @@ | ||
| 22115 | 22070 | return 0; |
| 22116 | 22071 | } |
| 22117 | 22072 | |
| 22118 | 22073 | /************** End of hash.c ************************************************/ |
| 22119 | 22074 | /************** Begin file opcodes.c *****************************************/ |
| 22120 | -#line 1 "tsrc/opcodes.c" | |
| 22121 | 22075 | /* Automatically generated. Do not edit */ |
| 22122 | 22076 | /* See the mkopcodec.awk script for details. */ |
| 22123 | 22077 | #if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG) |
| 22124 | 22078 | SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){ |
| 22125 | 22079 | static const char *const azName[] = { "?", |
| @@ -22146,66 +22100,66 @@ | ||
| 22146 | 22100 | /* 21 */ "MustBeInt", |
| 22147 | 22101 | /* 22 */ "RealAffinity", |
| 22148 | 22102 | /* 23 */ "Permutation", |
| 22149 | 22103 | /* 24 */ "Compare", |
| 22150 | 22104 | /* 25 */ "Jump", |
| 22151 | - /* 26 */ "If", | |
| 22152 | - /* 27 */ "IfNot", | |
| 22153 | - /* 28 */ "Column", | |
| 22154 | - /* 29 */ "Affinity", | |
| 22155 | - /* 30 */ "MakeRecord", | |
| 22156 | - /* 31 */ "Count", | |
| 22157 | - /* 32 */ "Savepoint", | |
| 22158 | - /* 33 */ "AutoCommit", | |
| 22159 | - /* 34 */ "Transaction", | |
| 22160 | - /* 35 */ "ReadCookie", | |
| 22161 | - /* 36 */ "SetCookie", | |
| 22162 | - /* 37 */ "VerifyCookie", | |
| 22163 | - /* 38 */ "OpenRead", | |
| 22164 | - /* 39 */ "OpenWrite", | |
| 22165 | - /* 40 */ "OpenAutoindex", | |
| 22166 | - /* 41 */ "OpenEphemeral", | |
| 22167 | - /* 42 */ "SorterOpen", | |
| 22168 | - /* 43 */ "OpenPseudo", | |
| 22169 | - /* 44 */ "Close", | |
| 22170 | - /* 45 */ "SeekLt", | |
| 22171 | - /* 46 */ "SeekLe", | |
| 22172 | - /* 47 */ "SeekGe", | |
| 22173 | - /* 48 */ "SeekGt", | |
| 22174 | - /* 49 */ "Seek", | |
| 22175 | - /* 50 */ "NotFound", | |
| 22176 | - /* 51 */ "Found", | |
| 22177 | - /* 52 */ "IsUnique", | |
| 22178 | - /* 53 */ "NotExists", | |
| 22179 | - /* 54 */ "Sequence", | |
| 22180 | - /* 55 */ "NewRowid", | |
| 22181 | - /* 56 */ "Insert", | |
| 22182 | - /* 57 */ "InsertInt", | |
| 22183 | - /* 58 */ "Delete", | |
| 22184 | - /* 59 */ "ResetCount", | |
| 22185 | - /* 60 */ "SorterCompare", | |
| 22186 | - /* 61 */ "SorterData", | |
| 22187 | - /* 62 */ "RowKey", | |
| 22188 | - /* 63 */ "RowData", | |
| 22189 | - /* 64 */ "Rowid", | |
| 22190 | - /* 65 */ "NullRow", | |
| 22191 | - /* 66 */ "Last", | |
| 22192 | - /* 67 */ "SorterSort", | |
| 22105 | + /* 26 */ "Once", | |
| 22106 | + /* 27 */ "If", | |
| 22107 | + /* 28 */ "IfNot", | |
| 22108 | + /* 29 */ "Column", | |
| 22109 | + /* 30 */ "Affinity", | |
| 22110 | + /* 31 */ "MakeRecord", | |
| 22111 | + /* 32 */ "Count", | |
| 22112 | + /* 33 */ "Savepoint", | |
| 22113 | + /* 34 */ "AutoCommit", | |
| 22114 | + /* 35 */ "Transaction", | |
| 22115 | + /* 36 */ "ReadCookie", | |
| 22116 | + /* 37 */ "SetCookie", | |
| 22117 | + /* 38 */ "VerifyCookie", | |
| 22118 | + /* 39 */ "OpenRead", | |
| 22119 | + /* 40 */ "OpenWrite", | |
| 22120 | + /* 41 */ "OpenAutoindex", | |
| 22121 | + /* 42 */ "OpenEphemeral", | |
| 22122 | + /* 43 */ "SorterOpen", | |
| 22123 | + /* 44 */ "OpenPseudo", | |
| 22124 | + /* 45 */ "Close", | |
| 22125 | + /* 46 */ "SeekLt", | |
| 22126 | + /* 47 */ "SeekLe", | |
| 22127 | + /* 48 */ "SeekGe", | |
| 22128 | + /* 49 */ "SeekGt", | |
| 22129 | + /* 50 */ "Seek", | |
| 22130 | + /* 51 */ "NotFound", | |
| 22131 | + /* 52 */ "Found", | |
| 22132 | + /* 53 */ "IsUnique", | |
| 22133 | + /* 54 */ "NotExists", | |
| 22134 | + /* 55 */ "Sequence", | |
| 22135 | + /* 56 */ "NewRowid", | |
| 22136 | + /* 57 */ "Insert", | |
| 22137 | + /* 58 */ "InsertInt", | |
| 22138 | + /* 59 */ "Delete", | |
| 22139 | + /* 60 */ "ResetCount", | |
| 22140 | + /* 61 */ "SorterCompare", | |
| 22141 | + /* 62 */ "SorterData", | |
| 22142 | + /* 63 */ "RowKey", | |
| 22143 | + /* 64 */ "RowData", | |
| 22144 | + /* 65 */ "Rowid", | |
| 22145 | + /* 66 */ "NullRow", | |
| 22146 | + /* 67 */ "Last", | |
| 22193 | 22147 | /* 68 */ "Or", |
| 22194 | 22148 | /* 69 */ "And", |
| 22195 | - /* 70 */ "Sort", | |
| 22196 | - /* 71 */ "Rewind", | |
| 22197 | - /* 72 */ "SorterNext", | |
| 22149 | + /* 70 */ "SorterSort", | |
| 22150 | + /* 71 */ "Sort", | |
| 22151 | + /* 72 */ "Rewind", | |
| 22198 | 22152 | /* 73 */ "IsNull", |
| 22199 | 22153 | /* 74 */ "NotNull", |
| 22200 | 22154 | /* 75 */ "Ne", |
| 22201 | 22155 | /* 76 */ "Eq", |
| 22202 | 22156 | /* 77 */ "Gt", |
| 22203 | 22157 | /* 78 */ "Le", |
| 22204 | 22158 | /* 79 */ "Lt", |
| 22205 | 22159 | /* 80 */ "Ge", |
| 22206 | - /* 81 */ "Prev", | |
| 22160 | + /* 81 */ "SorterNext", | |
| 22207 | 22161 | /* 82 */ "BitAnd", |
| 22208 | 22162 | /* 83 */ "BitOr", |
| 22209 | 22163 | /* 84 */ "ShiftLeft", |
| 22210 | 22164 | /* 85 */ "ShiftRight", |
| 22211 | 22165 | /* 86 */ "Add", |
| @@ -22212,76 +22166,76 @@ | ||
| 22212 | 22166 | /* 87 */ "Subtract", |
| 22213 | 22167 | /* 88 */ "Multiply", |
| 22214 | 22168 | /* 89 */ "Divide", |
| 22215 | 22169 | /* 90 */ "Remainder", |
| 22216 | 22170 | /* 91 */ "Concat", |
| 22217 | - /* 92 */ "Next", | |
| 22171 | + /* 92 */ "Prev", | |
| 22218 | 22172 | /* 93 */ "BitNot", |
| 22219 | 22173 | /* 94 */ "String8", |
| 22220 | - /* 95 */ "SorterInsert", | |
| 22221 | - /* 96 */ "IdxInsert", | |
| 22222 | - /* 97 */ "IdxDelete", | |
| 22223 | - /* 98 */ "IdxRowid", | |
| 22224 | - /* 99 */ "IdxLT", | |
| 22225 | - /* 100 */ "IdxGE", | |
| 22226 | - /* 101 */ "Destroy", | |
| 22227 | - /* 102 */ "Clear", | |
| 22228 | - /* 103 */ "CreateIndex", | |
| 22229 | - /* 104 */ "CreateTable", | |
| 22230 | - /* 105 */ "ParseSchema", | |
| 22231 | - /* 106 */ "LoadAnalysis", | |
| 22232 | - /* 107 */ "DropTable", | |
| 22233 | - /* 108 */ "DropIndex", | |
| 22234 | - /* 109 */ "DropTrigger", | |
| 22235 | - /* 110 */ "IntegrityCk", | |
| 22236 | - /* 111 */ "RowSetAdd", | |
| 22237 | - /* 112 */ "RowSetRead", | |
| 22238 | - /* 113 */ "RowSetTest", | |
| 22239 | - /* 114 */ "Program", | |
| 22240 | - /* 115 */ "Param", | |
| 22241 | - /* 116 */ "FkCounter", | |
| 22242 | - /* 117 */ "FkIfZero", | |
| 22243 | - /* 118 */ "MemMax", | |
| 22244 | - /* 119 */ "IfPos", | |
| 22245 | - /* 120 */ "IfNeg", | |
| 22246 | - /* 121 */ "IfZero", | |
| 22247 | - /* 122 */ "AggStep", | |
| 22248 | - /* 123 */ "AggFinal", | |
| 22249 | - /* 124 */ "Checkpoint", | |
| 22250 | - /* 125 */ "JournalMode", | |
| 22251 | - /* 126 */ "Vacuum", | |
| 22252 | - /* 127 */ "IncrVacuum", | |
| 22253 | - /* 128 */ "Expire", | |
| 22254 | - /* 129 */ "TableLock", | |
| 22174 | + /* 95 */ "Next", | |
| 22175 | + /* 96 */ "SorterInsert", | |
| 22176 | + /* 97 */ "IdxInsert", | |
| 22177 | + /* 98 */ "IdxDelete", | |
| 22178 | + /* 99 */ "IdxRowid", | |
| 22179 | + /* 100 */ "IdxLT", | |
| 22180 | + /* 101 */ "IdxGE", | |
| 22181 | + /* 102 */ "Destroy", | |
| 22182 | + /* 103 */ "Clear", | |
| 22183 | + /* 104 */ "CreateIndex", | |
| 22184 | + /* 105 */ "CreateTable", | |
| 22185 | + /* 106 */ "ParseSchema", | |
| 22186 | + /* 107 */ "LoadAnalysis", | |
| 22187 | + /* 108 */ "DropTable", | |
| 22188 | + /* 109 */ "DropIndex", | |
| 22189 | + /* 110 */ "DropTrigger", | |
| 22190 | + /* 111 */ "IntegrityCk", | |
| 22191 | + /* 112 */ "RowSetAdd", | |
| 22192 | + /* 113 */ "RowSetRead", | |
| 22193 | + /* 114 */ "RowSetTest", | |
| 22194 | + /* 115 */ "Program", | |
| 22195 | + /* 116 */ "Param", | |
| 22196 | + /* 117 */ "FkCounter", | |
| 22197 | + /* 118 */ "FkIfZero", | |
| 22198 | + /* 119 */ "MemMax", | |
| 22199 | + /* 120 */ "IfPos", | |
| 22200 | + /* 121 */ "IfNeg", | |
| 22201 | + /* 122 */ "IfZero", | |
| 22202 | + /* 123 */ "AggStep", | |
| 22203 | + /* 124 */ "AggFinal", | |
| 22204 | + /* 125 */ "Checkpoint", | |
| 22205 | + /* 126 */ "JournalMode", | |
| 22206 | + /* 127 */ "Vacuum", | |
| 22207 | + /* 128 */ "IncrVacuum", | |
| 22208 | + /* 129 */ "Expire", | |
| 22255 | 22209 | /* 130 */ "Real", |
| 22256 | - /* 131 */ "VBegin", | |
| 22257 | - /* 132 */ "VCreate", | |
| 22258 | - /* 133 */ "VDestroy", | |
| 22259 | - /* 134 */ "VOpen", | |
| 22260 | - /* 135 */ "VFilter", | |
| 22261 | - /* 136 */ "VColumn", | |
| 22262 | - /* 137 */ "VNext", | |
| 22263 | - /* 138 */ "VRename", | |
| 22264 | - /* 139 */ "VUpdate", | |
| 22265 | - /* 140 */ "Pagecount", | |
| 22210 | + /* 131 */ "TableLock", | |
| 22211 | + /* 132 */ "VBegin", | |
| 22212 | + /* 133 */ "VCreate", | |
| 22213 | + /* 134 */ "VDestroy", | |
| 22214 | + /* 135 */ "VOpen", | |
| 22215 | + /* 136 */ "VFilter", | |
| 22216 | + /* 137 */ "VColumn", | |
| 22217 | + /* 138 */ "VNext", | |
| 22218 | + /* 139 */ "VRename", | |
| 22219 | + /* 140 */ "VUpdate", | |
| 22266 | 22220 | /* 141 */ "ToText", |
| 22267 | 22221 | /* 142 */ "ToBlob", |
| 22268 | 22222 | /* 143 */ "ToNumeric", |
| 22269 | 22223 | /* 144 */ "ToInt", |
| 22270 | 22224 | /* 145 */ "ToReal", |
| 22271 | - /* 146 */ "MaxPgcnt", | |
| 22272 | - /* 147 */ "Trace", | |
| 22273 | - /* 148 */ "Noop", | |
| 22274 | - /* 149 */ "Explain", | |
| 22225 | + /* 146 */ "Pagecount", | |
| 22226 | + /* 147 */ "MaxPgcnt", | |
| 22227 | + /* 148 */ "Trace", | |
| 22228 | + /* 149 */ "Noop", | |
| 22229 | + /* 150 */ "Explain", | |
| 22275 | 22230 | }; |
| 22276 | 22231 | return azName[i]; |
| 22277 | 22232 | } |
| 22278 | 22233 | #endif |
| 22279 | 22234 | |
| 22280 | 22235 | /************** End of opcodes.c *********************************************/ |
| 22281 | 22236 | /************** Begin file os_os2.c ******************************************/ |
| 22282 | -#line 1 "tsrc/os_os2.c" | |
| 22283 | 22237 | /* |
| 22284 | 22238 | ** 2006 Feb 14 |
| 22285 | 22239 | ** |
| 22286 | 22240 | ** The author disclaims copyright to this source code. In place of |
| 22287 | 22241 | ** a legal notice, here is a blessing: |
| @@ -22334,11 +22288,10 @@ | ||
| 22334 | 22288 | /* |
| 22335 | 22289 | ** Include code that is common to all os_*.c files |
| 22336 | 22290 | */ |
| 22337 | 22291 | /************** Include os_common.h in the middle of os_os2.c ****************/ |
| 22338 | 22292 | /************** Begin file os_common.h ***************************************/ |
| 22339 | -#line 1 "tsrc/os_common.h" | |
| 22340 | 22293 | /* |
| 22341 | 22294 | ** 2004 May 22 |
| 22342 | 22295 | ** |
| 22343 | 22296 | ** The author disclaims copyright to this source code. In place of |
| 22344 | 22297 | ** a legal notice, here is a blessing: |
| @@ -22388,11 +22341,10 @@ | ||
| 22388 | 22341 | ** hwtime.h contains inline assembler code for implementing |
| 22389 | 22342 | ** high-performance timing routines. |
| 22390 | 22343 | */ |
| 22391 | 22344 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 22392 | 22345 | /************** Begin file hwtime.h ******************************************/ |
| 22393 | -#line 1 "tsrc/hwtime.h" | |
| 22394 | 22346 | /* |
| 22395 | 22347 | ** 2008 May 27 |
| 22396 | 22348 | ** |
| 22397 | 22349 | ** The author disclaims copyright to this source code. In place of |
| 22398 | 22350 | ** a legal notice, here is a blessing: |
| @@ -22477,11 +22429,10 @@ | ||
| 22477 | 22429 | |
| 22478 | 22430 | #endif /* !defined(_HWTIME_H_) */ |
| 22479 | 22431 | |
| 22480 | 22432 | /************** End of hwtime.h **********************************************/ |
| 22481 | 22433 | /************** Continuing where we left off in os_common.h ******************/ |
| 22482 | -#line 53 "tsrc/os_common.h" | |
| 22483 | 22434 | |
| 22484 | 22435 | static sqlite_uint64 g_start; |
| 22485 | 22436 | static sqlite_uint64 g_elapsed; |
| 22486 | 22437 | #define TIMER_START g_start=sqlite3Hwtime() |
| 22487 | 22438 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| @@ -22544,11 +22495,10 @@ | ||
| 22544 | 22495 | |
| 22545 | 22496 | #endif /* !defined(_OS_COMMON_H_) */ |
| 22546 | 22497 | |
| 22547 | 22498 | /************** End of os_common.h *******************************************/ |
| 22548 | 22499 | /************** Continuing where we left off in os_os2.c *********************/ |
| 22549 | -#line 57 "tsrc/os_os2.c" | |
| 22550 | 22500 | |
| 22551 | 22501 | /* Forward references */ |
| 22552 | 22502 | typedef struct os2File os2File; /* The file structure */ |
| 22553 | 22503 | typedef struct os2ShmNode os2ShmNode; /* A shared descritive memory node */ |
| 22554 | 22504 | typedef struct os2ShmLink os2ShmLink; /* A connection to shared-memory */ |
| @@ -24416,11 +24366,10 @@ | ||
| 24416 | 24366 | |
| 24417 | 24367 | #endif /* SQLITE_OS_OS2 */ |
| 24418 | 24368 | |
| 24419 | 24369 | /************** End of os_os2.c **********************************************/ |
| 24420 | 24370 | /************** Begin file os_unix.c *****************************************/ |
| 24421 | -#line 1 "tsrc/os_unix.c" | |
| 24422 | 24371 | /* |
| 24423 | 24372 | ** 2004 May 22 |
| 24424 | 24373 | ** |
| 24425 | 24374 | ** The author disclaims copyright to this source code. In place of |
| 24426 | 24375 | ** a legal notice, here is a blessing: |
| @@ -24681,11 +24630,10 @@ | ||
| 24681 | 24630 | /* |
| 24682 | 24631 | ** Include code that is common to all os_*.c files |
| 24683 | 24632 | */ |
| 24684 | 24633 | /************** Include os_common.h in the middle of os_unix.c ***************/ |
| 24685 | 24634 | /************** Begin file os_common.h ***************************************/ |
| 24686 | -#line 1 "tsrc/os_common.h" | |
| 24687 | 24635 | /* |
| 24688 | 24636 | ** 2004 May 22 |
| 24689 | 24637 | ** |
| 24690 | 24638 | ** The author disclaims copyright to this source code. In place of |
| 24691 | 24639 | ** a legal notice, here is a blessing: |
| @@ -24735,11 +24683,10 @@ | ||
| 24735 | 24683 | ** hwtime.h contains inline assembler code for implementing |
| 24736 | 24684 | ** high-performance timing routines. |
| 24737 | 24685 | */ |
| 24738 | 24686 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 24739 | 24687 | /************** Begin file hwtime.h ******************************************/ |
| 24740 | -#line 1 "tsrc/hwtime.h" | |
| 24741 | 24688 | /* |
| 24742 | 24689 | ** 2008 May 27 |
| 24743 | 24690 | ** |
| 24744 | 24691 | ** The author disclaims copyright to this source code. In place of |
| 24745 | 24692 | ** a legal notice, here is a blessing: |
| @@ -24824,11 +24771,10 @@ | ||
| 24824 | 24771 | |
| 24825 | 24772 | #endif /* !defined(_HWTIME_H_) */ |
| 24826 | 24773 | |
| 24827 | 24774 | /************** End of hwtime.h **********************************************/ |
| 24828 | 24775 | /************** Continuing where we left off in os_common.h ******************/ |
| 24829 | -#line 53 "tsrc/os_common.h" | |
| 24830 | 24776 | |
| 24831 | 24777 | static sqlite_uint64 g_start; |
| 24832 | 24778 | static sqlite_uint64 g_elapsed; |
| 24833 | 24779 | #define TIMER_START g_start=sqlite3Hwtime() |
| 24834 | 24780 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| @@ -24891,11 +24837,10 @@ | ||
| 24891 | 24837 | |
| 24892 | 24838 | #endif /* !defined(_OS_COMMON_H_) */ |
| 24893 | 24839 | |
| 24894 | 24840 | /************** End of os_common.h *******************************************/ |
| 24895 | 24841 | /************** Continuing where we left off in os_unix.c ********************/ |
| 24896 | -#line 265 "tsrc/os_unix.c" | |
| 24897 | 24842 | |
| 24898 | 24843 | /* |
| 24899 | 24844 | ** Define various macros that are missing from some systems. |
| 24900 | 24845 | */ |
| 24901 | 24846 | #ifndef O_LARGEFILE |
| @@ -31401,11 +31346,10 @@ | ||
| 31401 | 31346 | |
| 31402 | 31347 | #endif /* SQLITE_OS_UNIX */ |
| 31403 | 31348 | |
| 31404 | 31349 | /************** End of os_unix.c *********************************************/ |
| 31405 | 31350 | /************** Begin file os_win.c ******************************************/ |
| 31406 | -#line 1 "tsrc/os_win.c" | |
| 31407 | 31351 | /* |
| 31408 | 31352 | ** 2004 May 22 |
| 31409 | 31353 | ** |
| 31410 | 31354 | ** The author disclaims copyright to this source code. In place of |
| 31411 | 31355 | ** a legal notice, here is a blessing: |
| @@ -31463,11 +31407,10 @@ | ||
| 31463 | 31407 | /* |
| 31464 | 31408 | ** Include code that is common to all os_*.c files |
| 31465 | 31409 | */ |
| 31466 | 31410 | /************** Include os_common.h in the middle of os_win.c ****************/ |
| 31467 | 31411 | /************** Begin file os_common.h ***************************************/ |
| 31468 | -#line 1 "tsrc/os_common.h" | |
| 31469 | 31412 | /* |
| 31470 | 31413 | ** 2004 May 22 |
| 31471 | 31414 | ** |
| 31472 | 31415 | ** The author disclaims copyright to this source code. In place of |
| 31473 | 31416 | ** a legal notice, here is a blessing: |
| @@ -31517,11 +31460,10 @@ | ||
| 31517 | 31460 | ** hwtime.h contains inline assembler code for implementing |
| 31518 | 31461 | ** high-performance timing routines. |
| 31519 | 31462 | */ |
| 31520 | 31463 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 31521 | 31464 | /************** Begin file hwtime.h ******************************************/ |
| 31522 | -#line 1 "tsrc/hwtime.h" | |
| 31523 | 31465 | /* |
| 31524 | 31466 | ** 2008 May 27 |
| 31525 | 31467 | ** |
| 31526 | 31468 | ** The author disclaims copyright to this source code. In place of |
| 31527 | 31469 | ** a legal notice, here is a blessing: |
| @@ -31606,11 +31548,10 @@ | ||
| 31606 | 31548 | |
| 31607 | 31549 | #endif /* !defined(_HWTIME_H_) */ |
| 31608 | 31550 | |
| 31609 | 31551 | /************** End of hwtime.h **********************************************/ |
| 31610 | 31552 | /************** Continuing where we left off in os_common.h ******************/ |
| 31611 | -#line 53 "tsrc/os_common.h" | |
| 31612 | 31553 | |
| 31613 | 31554 | static sqlite_uint64 g_start; |
| 31614 | 31555 | static sqlite_uint64 g_elapsed; |
| 31615 | 31556 | #define TIMER_START g_start=sqlite3Hwtime() |
| 31616 | 31557 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| @@ -31673,11 +31614,10 @@ | ||
| 31673 | 31614 | |
| 31674 | 31615 | #endif /* !defined(_OS_COMMON_H_) */ |
| 31675 | 31616 | |
| 31676 | 31617 | /************** End of os_common.h *******************************************/ |
| 31677 | 31618 | /************** Continuing where we left off in os_win.c *********************/ |
| 31678 | -#line 62 "tsrc/os_win.c" | |
| 31679 | 31619 | |
| 31680 | 31620 | /* |
| 31681 | 31621 | ** Some microsoft compilers lack this definition. |
| 31682 | 31622 | */ |
| 31683 | 31623 | #ifndef INVALID_FILE_ATTRIBUTES |
| @@ -34809,11 +34749,10 @@ | ||
| 34809 | 34749 | |
| 34810 | 34750 | #endif /* SQLITE_OS_WIN */ |
| 34811 | 34751 | |
| 34812 | 34752 | /************** End of os_win.c **********************************************/ |
| 34813 | 34753 | /************** Begin file bitvec.c ******************************************/ |
| 34814 | -#line 1 "tsrc/bitvec.c" | |
| 34815 | 34754 | /* |
| 34816 | 34755 | ** 2008 February 16 |
| 34817 | 34756 | ** |
| 34818 | 34757 | ** The author disclaims copyright to this source code. In place of |
| 34819 | 34758 | ** a legal notice, here is a blessing: |
| @@ -35220,11 +35159,10 @@ | ||
| 35220 | 35159 | } |
| 35221 | 35160 | #endif /* SQLITE_OMIT_BUILTIN_TEST */ |
| 35222 | 35161 | |
| 35223 | 35162 | /************** End of bitvec.c **********************************************/ |
| 35224 | 35163 | /************** Begin file pcache.c ******************************************/ |
| 35225 | -#line 1 "tsrc/pcache.c" | |
| 35226 | 35164 | /* |
| 35227 | 35165 | ** 2008 August 05 |
| 35228 | 35166 | ** |
| 35229 | 35167 | ** The author disclaims copyright to this source code. In place of |
| 35230 | 35168 | ** a legal notice, here is a blessing: |
| @@ -35817,11 +35755,10 @@ | ||
| 35817 | 35755 | } |
| 35818 | 35756 | #endif |
| 35819 | 35757 | |
| 35820 | 35758 | /************** End of pcache.c **********************************************/ |
| 35821 | 35759 | /************** Begin file pcache1.c *****************************************/ |
| 35822 | -#line 1 "tsrc/pcache1.c" | |
| 35823 | 35760 | /* |
| 35824 | 35761 | ** 2008 November 05 |
| 35825 | 35762 | ** |
| 35826 | 35763 | ** The author disclaims copyright to this source code. In place of |
| 35827 | 35764 | ** a legal notice, here is a blessing: |
| @@ -37034,11 +36971,10 @@ | ||
| 37034 | 36971 | } |
| 37035 | 36972 | #endif |
| 37036 | 36973 | |
| 37037 | 36974 | /************** End of pcache1.c *********************************************/ |
| 37038 | 36975 | /************** Begin file rowset.c ******************************************/ |
| 37039 | -#line 1 "tsrc/rowset.c" | |
| 37040 | 36976 | /* |
| 37041 | 36977 | ** 2008 December 3 |
| 37042 | 36978 | ** |
| 37043 | 36979 | ** The author disclaims copyright to this source code. In place of |
| 37044 | 36980 | ** a legal notice, here is a blessing: |
| @@ -37459,11 +37395,10 @@ | ||
| 37459 | 37395 | return 0; |
| 37460 | 37396 | } |
| 37461 | 37397 | |
| 37462 | 37398 | /************** End of rowset.c **********************************************/ |
| 37463 | 37399 | /************** Begin file pager.c *******************************************/ |
| 37464 | -#line 1 "tsrc/pager.c" | |
| 37465 | 37400 | /* |
| 37466 | 37401 | ** 2001 September 15 |
| 37467 | 37402 | ** |
| 37468 | 37403 | ** The author disclaims copyright to this source code. In place of |
| 37469 | 37404 | ** a legal notice, here is a blessing: |
| @@ -37483,11 +37418,10 @@ | ||
| 37483 | 37418 | ** another is writing. |
| 37484 | 37419 | */ |
| 37485 | 37420 | #ifndef SQLITE_OMIT_DISKIO |
| 37486 | 37421 | /************** Include wal.h in the middle of pager.c ***********************/ |
| 37487 | 37422 | /************** Begin file wal.h *********************************************/ |
| 37488 | -#line 1 "tsrc/wal.h" | |
| 37489 | 37423 | /* |
| 37490 | 37424 | ** 2010 February 1 |
| 37491 | 37425 | ** |
| 37492 | 37426 | ** The author disclaims copyright to this source code. In place of |
| 37493 | 37427 | ** a legal notice, here is a blessing: |
| @@ -37608,11 +37542,10 @@ | ||
| 37608 | 37542 | #endif /* ifndef SQLITE_OMIT_WAL */ |
| 37609 | 37543 | #endif /* _WAL_H_ */ |
| 37610 | 37544 | |
| 37611 | 37545 | /************** End of wal.h *************************************************/ |
| 37612 | 37546 | /************** Continuing where we left off in pager.c **********************/ |
| 37613 | -#line 24 "tsrc/pager.c" | |
| 37614 | 37547 | |
| 37615 | 37548 | |
| 37616 | 37549 | /******************* NOTES ON THE DESIGN OF THE PAGER ************************ |
| 37617 | 37550 | ** |
| 37618 | 37551 | ** This comment block describes invariants that hold when using a rollback |
| @@ -44422,11 +44355,10 @@ | ||
| 44422 | 44355 | |
| 44423 | 44356 | #endif /* SQLITE_OMIT_DISKIO */ |
| 44424 | 44357 | |
| 44425 | 44358 | /************** End of pager.c ***********************************************/ |
| 44426 | 44359 | /************** Begin file wal.c *********************************************/ |
| 44427 | -#line 1 "tsrc/wal.c" | |
| 44428 | 44360 | /* |
| 44429 | 44361 | ** 2010 February 1 |
| 44430 | 44362 | ** |
| 44431 | 44363 | ** The author disclaims copyright to this source code. In place of |
| 44432 | 44364 | ** a legal notice, here is a blessing: |
| @@ -47377,11 +47309,10 @@ | ||
| 47377 | 47309 | |
| 47378 | 47310 | #endif /* #ifndef SQLITE_OMIT_WAL */ |
| 47379 | 47311 | |
| 47380 | 47312 | /************** End of wal.c *************************************************/ |
| 47381 | 47313 | /************** Begin file btmutex.c *****************************************/ |
| 47382 | -#line 1 "tsrc/btmutex.c" | |
| 47383 | 47314 | /* |
| 47384 | 47315 | ** 2007 August 27 |
| 47385 | 47316 | ** |
| 47386 | 47317 | ** The author disclaims copyright to this source code. In place of |
| 47387 | 47318 | ** a legal notice, here is a blessing: |
| @@ -47397,11 +47328,10 @@ | ||
| 47397 | 47328 | ** big and we want to break it down some. This packaged seemed like |
| 47398 | 47329 | ** a good breakout. |
| 47399 | 47330 | */ |
| 47400 | 47331 | /************** Include btreeInt.h in the middle of btmutex.c ****************/ |
| 47401 | 47332 | /************** Begin file btreeInt.h ****************************************/ |
| 47402 | -#line 1 "tsrc/btreeInt.h" | |
| 47403 | 47333 | /* |
| 47404 | 47334 | ** 2004 April 6 |
| 47405 | 47335 | ** |
| 47406 | 47336 | ** The author disclaims copyright to this source code. In place of |
| 47407 | 47337 | ** a legal notice, here is a blessing: |
| @@ -48043,11 +47973,10 @@ | ||
| 48043 | 47973 | #define get4byte sqlite3Get4byte |
| 48044 | 47974 | #define put4byte sqlite3Put4byte |
| 48045 | 47975 | |
| 48046 | 47976 | /************** End of btreeInt.h ********************************************/ |
| 48047 | 47977 | /************** Continuing where we left off in btmutex.c ********************/ |
| 48048 | -#line 19 "tsrc/btmutex.c" | |
| 48049 | 47978 | #ifndef SQLITE_OMIT_SHARED_CACHE |
| 48050 | 47979 | #if SQLITE_THREADSAFE |
| 48051 | 47980 | |
| 48052 | 47981 | /* |
| 48053 | 47982 | ** Obtain the BtShared mutex associated with B-Tree handle p. Also, |
| @@ -48316,11 +48245,10 @@ | ||
| 48316 | 48245 | #endif /* if SQLITE_THREADSAFE */ |
| 48317 | 48246 | #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */ |
| 48318 | 48247 | |
| 48319 | 48248 | /************** End of btmutex.c *********************************************/ |
| 48320 | 48249 | /************** Begin file btree.c *******************************************/ |
| 48321 | -#line 1 "tsrc/btree.c" | |
| 48322 | 48250 | /* |
| 48323 | 48251 | ** 2004 April 6 |
| 48324 | 48252 | ** |
| 48325 | 48253 | ** The author disclaims copyright to this source code. In place of |
| 48326 | 48254 | ** a legal notice, here is a blessing: |
| @@ -48982,11 +48910,11 @@ | ||
| 48982 | 48910 | assert( nKey==(i64)(int)nKey ); |
| 48983 | 48911 | pIdxKey = sqlite3VdbeAllocUnpackedRecord( |
| 48984 | 48912 | pCur->pKeyInfo, aSpace, sizeof(aSpace), &pFree |
| 48985 | 48913 | ); |
| 48986 | 48914 | if( pIdxKey==0 ) return SQLITE_NOMEM; |
| 48987 | - sqlite3VdbeRecordUnpack(pCur->pKeyInfo, nKey, pKey, pIdxKey); | |
| 48915 | + sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey, pIdxKey); | |
| 48988 | 48916 | }else{ |
| 48989 | 48917 | pIdxKey = 0; |
| 48990 | 48918 | } |
| 48991 | 48919 | rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes); |
| 48992 | 48920 | if( pFree ){ |
| @@ -56504,11 +56432,10 @@ | ||
| 56504 | 56432 | return rc; |
| 56505 | 56433 | } |
| 56506 | 56434 | |
| 56507 | 56435 | /************** End of btree.c ***********************************************/ |
| 56508 | 56436 | /************** Begin file backup.c ******************************************/ |
| 56509 | -#line 1 "tsrc/backup.c" | |
| 56510 | 56437 | /* |
| 56511 | 56438 | ** 2009 January 28 |
| 56512 | 56439 | ** |
| 56513 | 56440 | ** The author disclaims copyright to this source code. In place of |
| 56514 | 56441 | ** a legal notice, here is a blessing: |
| @@ -57211,11 +57138,10 @@ | ||
| 57211 | 57138 | } |
| 57212 | 57139 | #endif /* SQLITE_OMIT_VACUUM */ |
| 57213 | 57140 | |
| 57214 | 57141 | /************** End of backup.c **********************************************/ |
| 57215 | 57142 | /************** Begin file vdbemem.c *****************************************/ |
| 57216 | -#line 1 "tsrc/vdbemem.c" | |
| 57217 | 57143 | /* |
| 57218 | 57144 | ** 2004 May 26 |
| 57219 | 57145 | ** |
| 57220 | 57146 | ** The author disclaims copyright to this source code. In place of |
| 57221 | 57147 | ** a legal notice, here is a blessing: |
| @@ -58366,11 +58292,10 @@ | ||
| 58366 | 58292 | return 0; |
| 58367 | 58293 | } |
| 58368 | 58294 | |
| 58369 | 58295 | /************** End of vdbemem.c *********************************************/ |
| 58370 | 58296 | /************** Begin file vdbeaux.c *****************************************/ |
| 58371 | -#line 1 "tsrc/vdbeaux.c" | |
| 58372 | 58297 | /* |
| 58373 | 58298 | ** 2003 September 6 |
| 58374 | 58299 | ** |
| 58375 | 58300 | ** The author disclaims copyright to this source code. In place of |
| 58376 | 58301 | ** a legal notice, here is a blessing: |
| @@ -59037,22 +58962,19 @@ | ||
| 59037 | 58962 | p->pNext = pVdbe->pProgram; |
| 59038 | 58963 | pVdbe->pProgram = p; |
| 59039 | 58964 | } |
| 59040 | 58965 | |
| 59041 | 58966 | /* |
| 59042 | -** Change N opcodes starting at addr to No-ops. | |
| 58967 | +** Change the opcode at addr into OP_Noop | |
| 59043 | 58968 | */ |
| 59044 | -SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr, int N){ | |
| 58969 | +SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr){ | |
| 59045 | 58970 | if( p->aOp ){ |
| 59046 | 58971 | VdbeOp *pOp = &p->aOp[addr]; |
| 59047 | 58972 | sqlite3 *db = p->db; |
| 59048 | - while( N-- ){ | |
| 59049 | - freeP4(db, pOp->p4type, pOp->p4.p); | |
| 59050 | - memset(pOp, 0, sizeof(pOp[0])); | |
| 59051 | - pOp->opcode = OP_Noop; | |
| 59052 | - pOp++; | |
| 59053 | - } | |
| 58973 | + freeP4(db, pOp->p4type, pOp->p4.p); | |
| 58974 | + memset(pOp, 0, sizeof(pOp[0])); | |
| 58975 | + pOp->opcode = OP_Noop; | |
| 59054 | 58976 | } |
| 59055 | 58977 | } |
| 59056 | 58978 | |
| 59057 | 58979 | /* |
| 59058 | 58980 | ** Change the value of the P4 operand for a specific instruction. |
| @@ -59204,11 +59126,11 @@ | ||
| 59204 | 59126 | ** check the value of p->nOp-1 before continuing. |
| 59205 | 59127 | */ |
| 59206 | 59128 | SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){ |
| 59207 | 59129 | /* C89 specifies that the constant "dummy" will be initialized to all |
| 59208 | 59130 | ** zeros, which is correct. MSVC generates a warning, nevertheless. */ |
| 59209 | - static const VdbeOp dummy; /* Ignore the MSVC warning about no initializer */ | |
| 59131 | + static VdbeOp dummy; /* Ignore the MSVC warning about no initializer */ | |
| 59210 | 59132 | assert( p->magic==VDBE_MAGIC_INIT ); |
| 59211 | 59133 | if( addr<0 ){ |
| 59212 | 59134 | #ifdef SQLITE_OMIT_TRACE |
| 59213 | 59135 | if( p->nOp==0 ) return (VdbeOp*)&dummy; |
| 59214 | 59136 | #endif |
| @@ -61609,11 +61531,10 @@ | ||
| 61609 | 61531 | } |
| 61610 | 61532 | } |
| 61611 | 61533 | |
| 61612 | 61534 | /************** End of vdbeaux.c *********************************************/ |
| 61613 | 61535 | /************** Begin file vdbeapi.c *****************************************/ |
| 61614 | -#line 1 "tsrc/vdbeapi.c" | |
| 61615 | 61536 | /* |
| 61616 | 61537 | ** 2004 May 26 |
| 61617 | 61538 | ** |
| 61618 | 61539 | ** The author disclaims copyright to this source code. In place of |
| 61619 | 61540 | ** a legal notice, here is a blessing: |
| @@ -62917,11 +62838,10 @@ | ||
| 62917 | 62838 | return v; |
| 62918 | 62839 | } |
| 62919 | 62840 | |
| 62920 | 62841 | /************** End of vdbeapi.c *********************************************/ |
| 62921 | 62842 | /************** Begin file vdbetrace.c ***************************************/ |
| 62922 | -#line 1 "tsrc/vdbetrace.c" | |
| 62923 | 62843 | /* |
| 62924 | 62844 | ** 2009 November 25 |
| 62925 | 62845 | ** |
| 62926 | 62846 | ** The author disclaims copyright to this source code. In place of |
| 62927 | 62847 | ** a legal notice, here is a blessing: |
| @@ -63073,11 +62993,10 @@ | ||
| 63073 | 62993 | |
| 63074 | 62994 | #endif /* #ifndef SQLITE_OMIT_TRACE */ |
| 63075 | 62995 | |
| 63076 | 62996 | /************** End of vdbetrace.c *******************************************/ |
| 63077 | 62997 | /************** Begin file vdbe.c ********************************************/ |
| 63078 | -#line 1 "tsrc/vdbe.c" | |
| 63079 | 62998 | /* |
| 63080 | 62999 | ** 2001 September 15 |
| 63081 | 63000 | ** |
| 63082 | 63001 | ** The author disclaims copyright to this source code. In place of |
| 63083 | 63002 | ** a legal notice, here is a blessing: |
| @@ -63543,11 +63462,10 @@ | ||
| 63543 | 63462 | ** hwtime.h contains inline assembler code for implementing |
| 63544 | 63463 | ** high-performance timing routines. |
| 63545 | 63464 | */ |
| 63546 | 63465 | /************** Include hwtime.h in the middle of vdbe.c *********************/ |
| 63547 | 63466 | /************** Begin file hwtime.h ******************************************/ |
| 63548 | -#line 1 "tsrc/hwtime.h" | |
| 63549 | 63467 | /* |
| 63550 | 63468 | ** 2008 May 27 |
| 63551 | 63469 | ** |
| 63552 | 63470 | ** The author disclaims copyright to this source code. In place of |
| 63553 | 63471 | ** a legal notice, here is a blessing: |
| @@ -63632,11 +63550,10 @@ | ||
| 63632 | 63550 | |
| 63633 | 63551 | #endif /* !defined(_HWTIME_H_) */ |
| 63634 | 63552 | |
| 63635 | 63553 | /************** End of hwtime.h **********************************************/ |
| 63636 | 63554 | /************** Continuing where we left off in vdbe.c ***********************/ |
| 63637 | -#line 471 "tsrc/vdbe.c" | |
| 63638 | 63555 | |
| 63639 | 63556 | #endif |
| 63640 | 63557 | |
| 63641 | 63558 | /* |
| 63642 | 63559 | ** The CHECK_FOR_INTERRUPT macro defined here looks to see if the |
| @@ -65627,10 +65544,20 @@ | ||
| 65627 | 65544 | sqlite3VdbeMemSetInt64(pOut, ~sqlite3VdbeIntValue(pIn1)); |
| 65628 | 65545 | } |
| 65629 | 65546 | break; |
| 65630 | 65547 | } |
| 65631 | 65548 | |
| 65549 | +/* Opcode: Once P1 P2 * * * | |
| 65550 | +** | |
| 65551 | +** Jump to P2 if the value in register P1 is a not null or zero. If | |
| 65552 | +** the value is NULL or zero, fall through and change the P1 register | |
| 65553 | +** to an integer 1. | |
| 65554 | +** | |
| 65555 | +** When P1 is not used otherwise in a program, this opcode falls through | |
| 65556 | +** once and jumps on all subsequent invocations. It is the equivalent | |
| 65557 | +** of "OP_If P1 P2", followed by "OP_Integer 1 P1". | |
| 65558 | +*/ | |
| 65632 | 65559 | /* Opcode: If P1 P2 P3 * * |
| 65633 | 65560 | ** |
| 65634 | 65561 | ** Jump to P2 if the value in register P1 is true. The value |
| 65635 | 65562 | ** is considered true if it is numeric and non-zero. If the value |
| 65636 | 65563 | ** in P1 is NULL then take the jump if P3 is true. |
| @@ -65639,10 +65566,11 @@ | ||
| 65639 | 65566 | ** |
| 65640 | 65567 | ** Jump to P2 if the value in register P1 is False. The value |
| 65641 | 65568 | ** is considered true if it has a numeric value of zero. If the value |
| 65642 | 65569 | ** in P1 is NULL then take the jump if P3 is true. |
| 65643 | 65570 | */ |
| 65571 | +case OP_Once: /* jump, in1 */ | |
| 65644 | 65572 | case OP_If: /* jump, in1 */ |
| 65645 | 65573 | case OP_IfNot: { /* jump, in1 */ |
| 65646 | 65574 | #if 0 /* local variables moved into u.al */ |
| 65647 | 65575 | int c; |
| 65648 | 65576 | #endif /* local variables moved into u.al */ |
| @@ -65657,10 +65585,16 @@ | ||
| 65657 | 65585 | #endif |
| 65658 | 65586 | if( pOp->opcode==OP_IfNot ) u.al.c = !u.al.c; |
| 65659 | 65587 | } |
| 65660 | 65588 | if( u.al.c ){ |
| 65661 | 65589 | pc = pOp->p2-1; |
| 65590 | + }else if( pOp->opcode==OP_Once ){ | |
| 65591 | + assert( (pIn1->flags & (MEM_Agg|MEM_Dyn|MEM_RowSet|MEM_Frame))==0 ); | |
| 65592 | + memAboutToChange(p, pIn1); | |
| 65593 | + pIn1->flags = MEM_Int; | |
| 65594 | + pIn1->u.i = 1; | |
| 65595 | + REGISTER_TRACE(pOp->p1, pIn1); | |
| 65662 | 65596 | } |
| 65663 | 65597 | break; |
| 65664 | 65598 | } |
| 65665 | 65599 | |
| 65666 | 65600 | /* Opcode: IsNull P1 P2 * * * |
| @@ -69860,11 +69794,10 @@ | ||
| 69860 | 69794 | goto vdbe_error_halt; |
| 69861 | 69795 | } |
| 69862 | 69796 | |
| 69863 | 69797 | /************** End of vdbe.c ************************************************/ |
| 69864 | 69798 | /************** Begin file vdbeblob.c ****************************************/ |
| 69865 | -#line 1 "tsrc/vdbeblob.c" | |
| 69866 | 69799 | /* |
| 69867 | 69800 | ** 2007 May 1 |
| 69868 | 69801 | ** |
| 69869 | 69802 | ** The author disclaims copyright to this source code. In place of |
| 69870 | 69803 | ** a legal notice, here is a blessing: |
| @@ -70134,21 +70067,21 @@ | ||
| 70134 | 70067 | /* Make sure a mutex is held on the table to be accessed */ |
| 70135 | 70068 | sqlite3VdbeUsesBtree(v, iDb); |
| 70136 | 70069 | |
| 70137 | 70070 | /* Configure the OP_TableLock instruction */ |
| 70138 | 70071 | #ifdef SQLITE_OMIT_SHARED_CACHE |
| 70139 | - sqlite3VdbeChangeToNoop(v, 2, 1); | |
| 70072 | + sqlite3VdbeChangeToNoop(v, 2); | |
| 70140 | 70073 | #else |
| 70141 | 70074 | sqlite3VdbeChangeP1(v, 2, iDb); |
| 70142 | 70075 | sqlite3VdbeChangeP2(v, 2, pTab->tnum); |
| 70143 | 70076 | sqlite3VdbeChangeP3(v, 2, flags); |
| 70144 | 70077 | sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT); |
| 70145 | 70078 | #endif |
| 70146 | 70079 | |
| 70147 | 70080 | /* Remove either the OP_OpenWrite or OpenRead. Set the P2 |
| 70148 | 70081 | ** parameter of the other to pTab->tnum. */ |
| 70149 | - sqlite3VdbeChangeToNoop(v, 4 - flags, 1); | |
| 70082 | + sqlite3VdbeChangeToNoop(v, 4 - flags); | |
| 70150 | 70083 | sqlite3VdbeChangeP2(v, 3 + flags, pTab->tnum); |
| 70151 | 70084 | sqlite3VdbeChangeP3(v, 3 + flags, iDb); |
| 70152 | 70085 | |
| 70153 | 70086 | /* Configure the number of columns. Configure the cursor to |
| 70154 | 70087 | ** think that the table has one more column than it really |
| @@ -70331,11 +70264,10 @@ | ||
| 70331 | 70264 | |
| 70332 | 70265 | #endif /* #ifndef SQLITE_OMIT_INCRBLOB */ |
| 70333 | 70266 | |
| 70334 | 70267 | /************** End of vdbeblob.c ********************************************/ |
| 70335 | 70268 | /************** Begin file vdbesort.c ****************************************/ |
| 70336 | -#line 1 "tsrc/vdbesort.c" | |
| 70337 | 70269 | /* |
| 70338 | 70270 | ** 2011 July 9 |
| 70339 | 70271 | ** |
| 70340 | 70272 | ** The author disclaims copyright to this source code. In place of |
| 70341 | 70273 | ** a legal notice, here is a blessing: |
| @@ -70492,12 +70424,16 @@ | ||
| 70492 | 70424 | int rc; /* Return Code */ |
| 70493 | 70425 | int nRead; /* Number of bytes read */ |
| 70494 | 70426 | int nRec = 0; /* Size of record in bytes */ |
| 70495 | 70427 | int iOff = 0; /* Size of serialized size varint in bytes */ |
| 70496 | 70428 | |
| 70497 | - nRead = pIter->iEof - pIter->iReadOff; | |
| 70498 | - if( nRead>5 ) nRead = 5; | |
| 70429 | + assert( pIter->iEof>=pIter->iReadOff ); | |
| 70430 | + if( pIter->iEof-pIter->iReadOff>5 ){ | |
| 70431 | + nRead = 5; | |
| 70432 | + }else{ | |
| 70433 | + nRead = (int)(pIter->iEof - pIter->iReadOff); | |
| 70434 | + } | |
| 70499 | 70435 | if( nRead<=0 ){ |
| 70500 | 70436 | /* This is an EOF condition */ |
| 70501 | 70437 | vdbeSorterIterZero(db, pIter); |
| 70502 | 70438 | return SQLITE_OK; |
| 70503 | 70439 | } |
| @@ -71211,11 +71147,10 @@ | ||
| 71211 | 71147 | |
| 71212 | 71148 | #endif /* #ifndef SQLITE_OMIT_MERGE_SORT */ |
| 71213 | 71149 | |
| 71214 | 71150 | /************** End of vdbesort.c ********************************************/ |
| 71215 | 71151 | /************** Begin file journal.c *****************************************/ |
| 71216 | -#line 1 "tsrc/journal.c" | |
| 71217 | 71152 | /* |
| 71218 | 71153 | ** 2007 August 22 |
| 71219 | 71154 | ** |
| 71220 | 71155 | ** The author disclaims copyright to this source code. In place of |
| 71221 | 71156 | ** a legal notice, here is a blessing: |
| @@ -71452,11 +71387,10 @@ | ||
| 71452 | 71387 | } |
| 71453 | 71388 | #endif |
| 71454 | 71389 | |
| 71455 | 71390 | /************** End of journal.c *********************************************/ |
| 71456 | 71391 | /************** Begin file memjournal.c **************************************/ |
| 71457 | -#line 1 "tsrc/memjournal.c" | |
| 71458 | 71392 | /* |
| 71459 | 71393 | ** 2008 October 7 |
| 71460 | 71394 | ** |
| 71461 | 71395 | ** The author disclaims copyright to this source code. In place of |
| 71462 | 71396 | ** a legal notice, here is a blessing: |
| @@ -71714,11 +71648,10 @@ | ||
| 71714 | 71648 | return sizeof(MemJournal); |
| 71715 | 71649 | } |
| 71716 | 71650 | |
| 71717 | 71651 | /************** End of memjournal.c ******************************************/ |
| 71718 | 71652 | /************** Begin file walker.c ******************************************/ |
| 71719 | -#line 1 "tsrc/walker.c" | |
| 71720 | 71653 | /* |
| 71721 | 71654 | ** 2008 August 16 |
| 71722 | 71655 | ** |
| 71723 | 71656 | ** The author disclaims copyright to this source code. In place of |
| 71724 | 71657 | ** a legal notice, here is a blessing: |
| @@ -71853,11 +71786,10 @@ | ||
| 71853 | 71786 | return rc & WRC_Abort; |
| 71854 | 71787 | } |
| 71855 | 71788 | |
| 71856 | 71789 | /************** End of walker.c **********************************************/ |
| 71857 | 71790 | /************** Begin file resolve.c *****************************************/ |
| 71858 | -#line 1 "tsrc/resolve.c" | |
| 71859 | 71791 | /* |
| 71860 | 71792 | ** 2008 August 18 |
| 71861 | 71793 | ** |
| 71862 | 71794 | ** The author disclaims copyright to this source code. In place of |
| 71863 | 71795 | ** a legal notice, here is a blessing: |
| @@ -73074,11 +73006,10 @@ | ||
| 73074 | 73006 | sqlite3WalkSelect(&w, p); |
| 73075 | 73007 | } |
| 73076 | 73008 | |
| 73077 | 73009 | /************** End of resolve.c *********************************************/ |
| 73078 | 73010 | /************** Begin file expr.c ********************************************/ |
| 73079 | -#line 1 "tsrc/expr.c" | |
| 73080 | 73011 | /* |
| 73081 | 73012 | ** 2001 September 15 |
| 73082 | 73013 | ** |
| 73083 | 73014 | ** The author disclaims copyright to this source code. In place of |
| 73084 | 73015 | ** a legal notice, here is a blessing: |
| @@ -73977,11 +73908,12 @@ | ||
| 73977 | 73908 | pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase); |
| 73978 | 73909 | pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName); |
| 73979 | 73910 | pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias); |
| 73980 | 73911 | pNewItem->jointype = pOldItem->jointype; |
| 73981 | 73912 | pNewItem->iCursor = pOldItem->iCursor; |
| 73982 | - pNewItem->isPopulated = pOldItem->isPopulated; | |
| 73913 | + pNewItem->addrFillSub = pOldItem->addrFillSub; | |
| 73914 | + pNewItem->regReturn = pOldItem->regReturn; | |
| 73983 | 73915 | pNewItem->isCorrelated = pOldItem->isCorrelated; |
| 73984 | 73916 | pNewItem->zIndex = sqlite3DbStrDup(db, pOldItem->zIndex); |
| 73985 | 73917 | pNewItem->notIndexed = pOldItem->notIndexed; |
| 73986 | 73918 | pNewItem->pIndex = pOldItem->pIndex; |
| 73987 | 73919 | pTab = pNewItem->pTab = pOldItem->pTab; |
| @@ -74537,12 +74469,11 @@ | ||
| 74537 | 74469 | assert(v); |
| 74538 | 74470 | if( iCol<0 ){ |
| 74539 | 74471 | int iMem = ++pParse->nMem; |
| 74540 | 74472 | int iAddr; |
| 74541 | 74473 | |
| 74542 | - iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem); | |
| 74543 | - sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem); | |
| 74474 | + iAddr = sqlite3VdbeAddOp1(v, OP_Once, iMem); | |
| 74544 | 74475 | |
| 74545 | 74476 | sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead); |
| 74546 | 74477 | eType = IN_INDEX_ROWID; |
| 74547 | 74478 | |
| 74548 | 74479 | sqlite3VdbeJumpHere(v, iAddr); |
| @@ -74569,12 +74500,11 @@ | ||
| 74569 | 74500 | int iMem = ++pParse->nMem; |
| 74570 | 74501 | int iAddr; |
| 74571 | 74502 | char *pKey; |
| 74572 | 74503 | |
| 74573 | 74504 | pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx); |
| 74574 | - iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem); | |
| 74575 | - sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem); | |
| 74505 | + iAddr = sqlite3VdbeAddOp1(v, OP_Once, iMem); | |
| 74576 | 74506 | |
| 74577 | 74507 | sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb, |
| 74578 | 74508 | pKey,P4_KEYINFO_HANDOFF); |
| 74579 | 74509 | VdbeComment((v, "%s", pIdx->zName)); |
| 74580 | 74510 | eType = IN_INDEX_INDEX; |
| @@ -74655,10 +74585,11 @@ | ||
| 74655 | 74585 | ){ |
| 74656 | 74586 | int testAddr = 0; /* One-time test address */ |
| 74657 | 74587 | int rReg = 0; /* Register storing resulting */ |
| 74658 | 74588 | Vdbe *v = sqlite3GetVdbe(pParse); |
| 74659 | 74589 | if( NEVER(v==0) ) return 0; |
| 74590 | + assert( sqlite3VdbeCurrentAddr(v)>0 ); | |
| 74660 | 74591 | sqlite3ExprCachePush(pParse); |
| 74661 | 74592 | |
| 74662 | 74593 | /* This code must be run in its entirety every time it is encountered |
| 74663 | 74594 | ** if any of the following is true: |
| 74664 | 74595 | ** |
| @@ -74669,12 +74600,11 @@ | ||
| 74669 | 74600 | ** If all of the above are false, then we can run this code just once |
| 74670 | 74601 | ** save the results, and reuse the same result on subsequent invocations. |
| 74671 | 74602 | */ |
| 74672 | 74603 | if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){ |
| 74673 | 74604 | int mem = ++pParse->nMem; |
| 74674 | - sqlite3VdbeAddOp1(v, OP_If, mem); | |
| 74675 | - testAddr = sqlite3VdbeAddOp2(v, OP_Integer, 1, mem); | |
| 74605 | + testAddr = sqlite3VdbeAddOp1(v, OP_Once, mem); | |
| 74676 | 74606 | assert( testAddr>0 || pParse->db->mallocFailed ); |
| 74677 | 74607 | } |
| 74678 | 74608 | |
| 74679 | 74609 | #ifndef SQLITE_OMIT_EXPLAIN |
| 74680 | 74610 | if( pParse->explain==2 ){ |
| @@ -74770,11 +74700,11 @@ | ||
| 74770 | 74700 | ** disable the test that was generated above that makes sure |
| 74771 | 74701 | ** this code only executes once. Because for a non-constant |
| 74772 | 74702 | ** expression we need to rerun this code each time. |
| 74773 | 74703 | */ |
| 74774 | 74704 | if( testAddr && !sqlite3ExprIsConstant(pE2) ){ |
| 74775 | - sqlite3VdbeChangeToNoop(v, testAddr-1, 2); | |
| 74705 | + sqlite3VdbeChangeToNoop(v, testAddr); | |
| 74776 | 74706 | testAddr = 0; |
| 74777 | 74707 | } |
| 74778 | 74708 | |
| 74779 | 74709 | /* Evaluate the expression and insert it into the temp table */ |
| 74780 | 74710 | if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){ |
| @@ -74841,11 +74771,11 @@ | ||
| 74841 | 74771 | break; |
| 74842 | 74772 | } |
| 74843 | 74773 | } |
| 74844 | 74774 | |
| 74845 | 74775 | if( testAddr ){ |
| 74846 | - sqlite3VdbeJumpHere(v, testAddr-1); | |
| 74776 | + sqlite3VdbeJumpHere(v, testAddr); | |
| 74847 | 74777 | } |
| 74848 | 74778 | sqlite3ExprCachePop(pParse, 1); |
| 74849 | 74779 | |
| 74850 | 74780 | return rReg; |
| 74851 | 74781 | } |
| @@ -76835,11 +76765,10 @@ | ||
| 76835 | 76765 | } |
| 76836 | 76766 | } |
| 76837 | 76767 | |
| 76838 | 76768 | /************** End of expr.c ************************************************/ |
| 76839 | 76769 | /************** Begin file alter.c *******************************************/ |
| 76840 | -#line 1 "tsrc/alter.c" | |
| 76841 | 76770 | /* |
| 76842 | 76771 | ** 2005 February 15 |
| 76843 | 76772 | ** |
| 76844 | 76773 | ** The author disclaims copyright to this source code. In place of |
| 76845 | 76774 | ** a legal notice, here is a blessing: |
| @@ -77664,11 +77593,10 @@ | ||
| 77664 | 77593 | } |
| 77665 | 77594 | #endif /* SQLITE_ALTER_TABLE */ |
| 77666 | 77595 | |
| 77667 | 77596 | /************** End of alter.c ***********************************************/ |
| 77668 | 77597 | /************** Begin file analyze.c *****************************************/ |
| 77669 | -#line 1 "tsrc/analyze.c" | |
| 77670 | 77598 | /* |
| 77671 | 77599 | ** 2005 July 8 |
| 77672 | 77600 | ** |
| 77673 | 77601 | ** The author disclaims copyright to this source code. In place of |
| 77674 | 77602 | ** a legal notice, here is a blessing: |
| @@ -78386,11 +78314,10 @@ | ||
| 78386 | 78314 | |
| 78387 | 78315 | #endif /* SQLITE_OMIT_ANALYZE */ |
| 78388 | 78316 | |
| 78389 | 78317 | /************** End of analyze.c *********************************************/ |
| 78390 | 78318 | /************** Begin file attach.c ******************************************/ |
| 78391 | -#line 1 "tsrc/attach.c" | |
| 78392 | 78319 | /* |
| 78393 | 78320 | ** 2003 April 6 |
| 78394 | 78321 | ** |
| 78395 | 78322 | ** The author disclaims copyright to this source code. In place of |
| 78396 | 78323 | ** a legal notice, here is a blessing: |
| @@ -78946,11 +78873,10 @@ | ||
| 78946 | 78873 | } |
| 78947 | 78874 | #endif |
| 78948 | 78875 | |
| 78949 | 78876 | /************** End of attach.c **********************************************/ |
| 78950 | 78877 | /************** Begin file auth.c ********************************************/ |
| 78951 | -#line 1 "tsrc/auth.c" | |
| 78952 | 78878 | /* |
| 78953 | 78879 | ** 2003 January 11 |
| 78954 | 78880 | ** |
| 78955 | 78881 | ** The author disclaims copyright to this source code. In place of |
| 78956 | 78882 | ** a legal notice, here is a blessing: |
| @@ -79198,11 +79124,10 @@ | ||
| 79198 | 79124 | |
| 79199 | 79125 | #endif /* SQLITE_OMIT_AUTHORIZATION */ |
| 79200 | 79126 | |
| 79201 | 79127 | /************** End of auth.c ************************************************/ |
| 79202 | 79128 | /************** Begin file build.c *******************************************/ |
| 79203 | -#line 1 "tsrc/build.c" | |
| 79204 | 79129 | /* |
| 79205 | 79130 | ** 2001 September 15 |
| 79206 | 79131 | ** |
| 79207 | 79132 | ** The author disclaims copyright to this source code. In place of |
| 79208 | 79133 | ** a legal notice, here is a blessing: |
| @@ -83002,11 +82927,10 @@ | ||
| 83002 | 82927 | return pKey; |
| 83003 | 82928 | } |
| 83004 | 82929 | |
| 83005 | 82930 | /************** End of build.c ***********************************************/ |
| 83006 | 82931 | /************** Begin file callback.c ****************************************/ |
| 83007 | -#line 1 "tsrc/callback.c" | |
| 83008 | 82932 | /* |
| 83009 | 82933 | ** 2005 May 23 |
| 83010 | 82934 | ** |
| 83011 | 82935 | ** The author disclaims copyright to this source code. In place of |
| 83012 | 82936 | ** a legal notice, here is a blessing: |
| @@ -83462,11 +83386,10 @@ | ||
| 83462 | 83386 | return p; |
| 83463 | 83387 | } |
| 83464 | 83388 | |
| 83465 | 83389 | /************** End of callback.c ********************************************/ |
| 83466 | 83390 | /************** Begin file delete.c ******************************************/ |
| 83467 | -#line 1 "tsrc/delete.c" | |
| 83468 | 83391 | /* |
| 83469 | 83392 | ** 2001 September 15 |
| 83470 | 83393 | ** |
| 83471 | 83394 | ** The author disclaims copyright to this source code. In place of |
| 83472 | 83395 | ** a legal notice, here is a blessing: |
| @@ -84117,11 +84040,10 @@ | ||
| 84117 | 84040 | return regBase; |
| 84118 | 84041 | } |
| 84119 | 84042 | |
| 84120 | 84043 | /************** End of delete.c **********************************************/ |
| 84121 | 84044 | /************** Begin file func.c ********************************************/ |
| 84122 | -#line 1 "tsrc/func.c" | |
| 84123 | 84045 | /* |
| 84124 | 84046 | ** 2002 February 23 |
| 84125 | 84047 | ** |
| 84126 | 84048 | ** The author disclaims copyright to this source code. In place of |
| 84127 | 84049 | ** a legal notice, here is a blessing: |
| @@ -85726,11 +85648,10 @@ | ||
| 85726 | 85648 | #endif |
| 85727 | 85649 | } |
| 85728 | 85650 | |
| 85729 | 85651 | /************** End of func.c ************************************************/ |
| 85730 | 85652 | /************** Begin file fkey.c ********************************************/ |
| 85731 | -#line 1 "tsrc/fkey.c" | |
| 85732 | 85653 | /* |
| 85733 | 85654 | ** |
| 85734 | 85655 | ** The author disclaims copyright to this source code. In place of |
| 85735 | 85656 | ** a legal notice, here is a blessing: |
| 85736 | 85657 | ** |
| @@ -86947,11 +86868,10 @@ | ||
| 86947 | 86868 | } |
| 86948 | 86869 | #endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */ |
| 86949 | 86870 | |
| 86950 | 86871 | /************** End of fkey.c ************************************************/ |
| 86951 | 86872 | /************** Begin file insert.c ******************************************/ |
| 86952 | -#line 1 "tsrc/insert.c" | |
| 86953 | 86873 | /* |
| 86954 | 86874 | ** 2001 September 15 |
| 86955 | 86875 | ** |
| 86956 | 86876 | ** The author disclaims copyright to this source code. In place of |
| 86957 | 86877 | ** a legal notice, here is a blessing: |
| @@ -88793,11 +88713,10 @@ | ||
| 88793 | 88713 | } |
| 88794 | 88714 | #endif /* SQLITE_OMIT_XFER_OPT */ |
| 88795 | 88715 | |
| 88796 | 88716 | /************** End of insert.c **********************************************/ |
| 88797 | 88717 | /************** Begin file legacy.c ******************************************/ |
| 88798 | -#line 1 "tsrc/legacy.c" | |
| 88799 | 88718 | /* |
| 88800 | 88719 | ** 2001 September 15 |
| 88801 | 88720 | ** |
| 88802 | 88721 | ** The author disclaims copyright to this source code. In place of |
| 88803 | 88722 | ** a legal notice, here is a blessing: |
| @@ -88941,11 +88860,10 @@ | ||
| 88941 | 88860 | return rc; |
| 88942 | 88861 | } |
| 88943 | 88862 | |
| 88944 | 88863 | /************** End of legacy.c **********************************************/ |
| 88945 | 88864 | /************** Begin file loadext.c *****************************************/ |
| 88946 | -#line 1 "tsrc/loadext.c" | |
| 88947 | 88865 | /* |
| 88948 | 88866 | ** 2006 June 7 |
| 88949 | 88867 | ** |
| 88950 | 88868 | ** The author disclaims copyright to this source code. In place of |
| 88951 | 88869 | ** a legal notice, here is a blessing: |
| @@ -88962,11 +88880,10 @@ | ||
| 88962 | 88880 | #ifndef SQLITE_CORE |
| 88963 | 88881 | #define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */ |
| 88964 | 88882 | #endif |
| 88965 | 88883 | /************** Include sqlite3ext.h in the middle of loadext.c **************/ |
| 88966 | 88884 | /************** Begin file sqlite3ext.h **************************************/ |
| 88967 | -#line 1 "tsrc/sqlite3ext.h" | |
| 88968 | 88885 | /* |
| 88969 | 88886 | ** 2006 June 7 |
| 88970 | 88887 | ** |
| 88971 | 88888 | ** The author disclaims copyright to this source code. In place of |
| 88972 | 88889 | ** a legal notice, here is a blessing: |
| @@ -89391,11 +89308,10 @@ | ||
| 89391 | 89308 | |
| 89392 | 89309 | #endif /* _SQLITE3EXT_H_ */ |
| 89393 | 89310 | |
| 89394 | 89311 | /************** End of sqlite3ext.h ******************************************/ |
| 89395 | 89312 | /************** Continuing where we left off in loadext.c ********************/ |
| 89396 | -#line 20 "tsrc/loadext.c" | |
| 89397 | 89313 | /* #include <string.h> */ |
| 89398 | 89314 | |
| 89399 | 89315 | #ifndef SQLITE_OMIT_LOAD_EXTENSION |
| 89400 | 89316 | |
| 89401 | 89317 | /* |
| @@ -90031,11 +89947,10 @@ | ||
| 90031 | 89947 | } |
| 90032 | 89948 | } |
| 90033 | 89949 | |
| 90034 | 89950 | /************** End of loadext.c *********************************************/ |
| 90035 | 89951 | /************** Begin file pragma.c ******************************************/ |
| 90036 | -#line 1 "tsrc/pragma.c" | |
| 90037 | 89952 | /* |
| 90038 | 89953 | ** 2003 April 6 |
| 90039 | 89954 | ** |
| 90040 | 89955 | ** The author disclaims copyright to this source code. In place of |
| 90041 | 89956 | ** a legal notice, here is a blessing: |
| @@ -91560,11 +91475,10 @@ | ||
| 91560 | 91475 | |
| 91561 | 91476 | #endif /* SQLITE_OMIT_PRAGMA */ |
| 91562 | 91477 | |
| 91563 | 91478 | /************** End of pragma.c **********************************************/ |
| 91564 | 91479 | /************** Begin file prepare.c *****************************************/ |
| 91565 | -#line 1 "tsrc/prepare.c" | |
| 91566 | 91480 | /* |
| 91567 | 91481 | ** 2005 May 25 |
| 91568 | 91482 | ** |
| 91569 | 91483 | ** The author disclaims copyright to this source code. In place of |
| 91570 | 91484 | ** a legal notice, here is a blessing: |
| @@ -92421,11 +92335,10 @@ | ||
| 92421 | 92335 | |
| 92422 | 92336 | #endif /* SQLITE_OMIT_UTF16 */ |
| 92423 | 92337 | |
| 92424 | 92338 | /************** End of prepare.c *********************************************/ |
| 92425 | 92339 | /************** Begin file select.c ******************************************/ |
| 92426 | -#line 1 "tsrc/select.c" | |
| 92427 | 92340 | /* |
| 92428 | 92341 | ** 2001 September 15 |
| 92429 | 92342 | ** |
| 92430 | 92343 | ** The author disclaims copyright to this source code. In place of |
| 92431 | 92344 | ** a legal notice, here is a blessing: |
| @@ -92512,10 +92425,12 @@ | ||
| 92512 | 92425 | pNew->addrOpenEphm[2] = -1; |
| 92513 | 92426 | if( db->mallocFailed ) { |
| 92514 | 92427 | clearSelect(db, pNew); |
| 92515 | 92428 | if( pNew!=&standin ) sqlite3DbFree(db, pNew); |
| 92516 | 92429 | pNew = 0; |
| 92430 | + }else{ | |
| 92431 | + assert( pNew->pSrc!=0 || pParse->nErr>0 ); | |
| 92517 | 92432 | } |
| 92518 | 92433 | return pNew; |
| 92519 | 92434 | } |
| 92520 | 92435 | |
| 92521 | 92436 | /* |
| @@ -96224,11 +96139,15 @@ | ||
| 96224 | 96139 | struct SrcList_item *pItem = &pTabList->a[i]; |
| 96225 | 96140 | SelectDest dest; |
| 96226 | 96141 | Select *pSub = pItem->pSelect; |
| 96227 | 96142 | int isAggSub; |
| 96228 | 96143 | |
| 96229 | - if( pSub==0 || pItem->isPopulated ) continue; | |
| 96144 | + if( pSub==0 ) continue; | |
| 96145 | + if( pItem->addrFillSub ){ | |
| 96146 | + sqlite3VdbeAddOp2(v, OP_Gosub, pItem->regReturn, pItem->addrFillSub); | |
| 96147 | + continue; | |
| 96148 | + } | |
| 96230 | 96149 | |
| 96231 | 96150 | /* Increment Parse.nHeight by the height of the largest expression |
| 96232 | 96151 | ** tree refered to by this, the parent select. The child select |
| 96233 | 96152 | ** may contain expression trees of at most |
| 96234 | 96153 | ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit |
| @@ -96235,25 +96154,48 @@ | ||
| 96235 | 96154 | ** more conservative than necessary, but much easier than enforcing |
| 96236 | 96155 | ** an exact limit. |
| 96237 | 96156 | */ |
| 96238 | 96157 | pParse->nHeight += sqlite3SelectExprHeight(p); |
| 96239 | 96158 | |
| 96240 | - /* Check to see if the subquery can be absorbed into the parent. */ | |
| 96241 | 96159 | isAggSub = (pSub->selFlags & SF_Aggregate)!=0; |
| 96242 | 96160 | if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){ |
| 96161 | + /* This subquery can be absorbed into its parent. */ | |
| 96243 | 96162 | if( isAggSub ){ |
| 96244 | 96163 | isAgg = 1; |
| 96245 | 96164 | p->selFlags |= SF_Aggregate; |
| 96246 | 96165 | } |
| 96247 | 96166 | i = -1; |
| 96248 | 96167 | }else{ |
| 96168 | + /* Generate a subroutine that will fill an ephemeral table with | |
| 96169 | + ** the content of this subquery. pItem->addrFillSub will point | |
| 96170 | + ** to the address of the generated subroutine. pItem->regReturn | |
| 96171 | + ** is a register allocated to hold the subroutine return address | |
| 96172 | + */ | |
| 96173 | + int topAddr; | |
| 96174 | + int onceAddr = 0; | |
| 96175 | + int retAddr; | |
| 96176 | + assert( pItem->addrFillSub==0 ); | |
| 96177 | + pItem->regReturn = ++pParse->nMem; | |
| 96178 | + topAddr = sqlite3VdbeAddOp2(v, OP_Integer, 0, pItem->regReturn); | |
| 96179 | + pItem->addrFillSub = topAddr+1; | |
| 96180 | + VdbeNoopComment((v, "materialize %s", pItem->pTab->zName)); | |
| 96181 | + if( pItem->isCorrelated==0 && pParse->pTriggerTab==0 ){ | |
| 96182 | + /* If the subquery is no correlated and if we are not inside of | |
| 96183 | + ** a trigger, then we only need to compute the value of the subquery | |
| 96184 | + ** once. */ | |
| 96185 | + int regOnce = ++pParse->nMem; | |
| 96186 | + onceAddr = sqlite3VdbeAddOp1(v, OP_Once, regOnce); | |
| 96187 | + } | |
| 96249 | 96188 | sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor); |
| 96250 | - assert( pItem->isPopulated==0 ); | |
| 96251 | 96189 | explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId); |
| 96252 | 96190 | sqlite3Select(pParse, pSub, &dest); |
| 96253 | - pItem->isPopulated = 1; | |
| 96254 | 96191 | pItem->pTab->nRowEst = (unsigned)pSub->nSelectRow; |
| 96192 | + if( onceAddr ) sqlite3VdbeJumpHere(v, onceAddr); | |
| 96193 | + retAddr = sqlite3VdbeAddOp1(v, OP_Return, pItem->regReturn); | |
| 96194 | + VdbeComment((v, "end %s", pItem->pTab->zName)); | |
| 96195 | + sqlite3VdbeChangeP1(v, topAddr, retAddr); | |
| 96196 | + | |
| 96255 | 96197 | } |
| 96256 | 96198 | if( /*pParse->nErr ||*/ db->mallocFailed ){ |
| 96257 | 96199 | goto select_end; |
| 96258 | 96200 | } |
| 96259 | 96201 | pParse->nHeight -= sqlite3SelectExprHeight(p); |
| @@ -96390,11 +96332,11 @@ | ||
| 96390 | 96332 | /* If sorting index that was created by a prior OP_OpenEphemeral |
| 96391 | 96333 | ** instruction ended up not being needed, then change the OP_OpenEphemeral |
| 96392 | 96334 | ** into an OP_Noop. |
| 96393 | 96335 | */ |
| 96394 | 96336 | if( addrSortIndex>=0 && pOrderBy==0 ){ |
| 96395 | - sqlite3VdbeChangeToNoop(v, addrSortIndex, 1); | |
| 96337 | + sqlite3VdbeChangeToNoop(v, addrSortIndex); | |
| 96396 | 96338 | p->addrOpenEphm[2] = -1; |
| 96397 | 96339 | } |
| 96398 | 96340 | |
| 96399 | 96341 | if( pWInfo->eDistinct ){ |
| 96400 | 96342 | VdbeOp *pOp; /* No longer required OpenEphemeral instr. */ |
| @@ -96673,11 +96615,11 @@ | ||
| 96673 | 96615 | */ |
| 96674 | 96616 | if( groupBySort ){ |
| 96675 | 96617 | sqlite3VdbeAddOp2(v, OP_SorterNext, sAggInfo.sortingIdx, addrTopOfLoop); |
| 96676 | 96618 | }else{ |
| 96677 | 96619 | sqlite3WhereEnd(pWInfo); |
| 96678 | - sqlite3VdbeChangeToNoop(v, addrSortingIdx, 1); | |
| 96620 | + sqlite3VdbeChangeToNoop(v, addrSortingIdx); | |
| 96679 | 96621 | } |
| 96680 | 96622 | |
| 96681 | 96623 | /* Output the final row of result |
| 96682 | 96624 | */ |
| 96683 | 96625 | sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow); |
| @@ -96981,11 +96923,10 @@ | ||
| 96981 | 96923 | *****************************************************************************/ |
| 96982 | 96924 | #endif /* defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */ |
| 96983 | 96925 | |
| 96984 | 96926 | /************** End of select.c **********************************************/ |
| 96985 | 96927 | /************** Begin file table.c *******************************************/ |
| 96986 | -#line 1 "tsrc/table.c" | |
| 96987 | 96928 | /* |
| 96988 | 96929 | ** 2001 September 15 |
| 96989 | 96930 | ** |
| 96990 | 96931 | ** The author disclaims copyright to this source code. In place of |
| 96991 | 96932 | ** a legal notice, here is a blessing: |
| @@ -97181,11 +97122,10 @@ | ||
| 97181 | 97122 | |
| 97182 | 97123 | #endif /* SQLITE_OMIT_GET_TABLE */ |
| 97183 | 97124 | |
| 97184 | 97125 | /************** End of table.c ***********************************************/ |
| 97185 | 97126 | /************** Begin file trigger.c *****************************************/ |
| 97186 | -#line 1 "tsrc/trigger.c" | |
| 97187 | 97127 | /* |
| 97188 | 97128 | ** |
| 97189 | 97129 | ** The author disclaims copyright to this source code. In place of |
| 97190 | 97130 | ** a legal notice, here is a blessing: |
| 97191 | 97131 | ** |
| @@ -98307,11 +98247,10 @@ | ||
| 98307 | 98247 | |
| 98308 | 98248 | #endif /* !defined(SQLITE_OMIT_TRIGGER) */ |
| 98309 | 98249 | |
| 98310 | 98250 | /************** End of trigger.c *********************************************/ |
| 98311 | 98251 | /************** Begin file update.c ******************************************/ |
| 98312 | -#line 1 "tsrc/update.c" | |
| 98313 | 98252 | /* |
| 98314 | 98253 | ** 2001 September 15 |
| 98315 | 98254 | ** |
| 98316 | 98255 | ** The author disclaims copyright to this source code. In place of |
| 98317 | 98256 | ** a legal notice, here is a blessing: |
| @@ -98980,11 +98919,10 @@ | ||
| 98980 | 98919 | } |
| 98981 | 98920 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 98982 | 98921 | |
| 98983 | 98922 | /************** End of update.c **********************************************/ |
| 98984 | 98923 | /************** Begin file vacuum.c ******************************************/ |
| 98985 | -#line 1 "tsrc/vacuum.c" | |
| 98986 | 98924 | /* |
| 98987 | 98925 | ** 2003 April 6 |
| 98988 | 98926 | ** |
| 98989 | 98927 | ** The author disclaims copyright to this source code. In place of |
| 98990 | 98928 | ** a legal notice, here is a blessing: |
| @@ -99327,11 +99265,10 @@ | ||
| 99327 | 99265 | |
| 99328 | 99266 | #endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */ |
| 99329 | 99267 | |
| 99330 | 99268 | /************** End of vacuum.c **********************************************/ |
| 99331 | 99269 | /************** Begin file vtab.c ********************************************/ |
| 99332 | -#line 1 "tsrc/vtab.c" | |
| 99333 | 99270 | /* |
| 99334 | 99271 | ** 2006 June 10 |
| 99335 | 99272 | ** |
| 99336 | 99273 | ** The author disclaims copyright to this source code. In place of |
| 99337 | 99274 | ** a legal notice, here is a blessing: |
| @@ -100396,11 +100333,10 @@ | ||
| 100396 | 100333 | |
| 100397 | 100334 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 100398 | 100335 | |
| 100399 | 100336 | /************** End of vtab.c ************************************************/ |
| 100400 | 100337 | /************** Begin file where.c *******************************************/ |
| 100401 | -#line 1 "tsrc/where.c" | |
| 100402 | 100338 | /* |
| 100403 | 100339 | ** 2001 September 15 |
| 100404 | 100340 | ** |
| 100405 | 100341 | ** The author disclaims copyright to this source code. In place of |
| 100406 | 100342 | ** a legal notice, here is a blessing: |
| @@ -100865,15 +100801,23 @@ | ||
| 100865 | 100801 | return mask; |
| 100866 | 100802 | } |
| 100867 | 100803 | static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){ |
| 100868 | 100804 | Bitmask mask = 0; |
| 100869 | 100805 | while( pS ){ |
| 100806 | + SrcList *pSrc = pS->pSrc; | |
| 100870 | 100807 | mask |= exprListTableUsage(pMaskSet, pS->pEList); |
| 100871 | 100808 | mask |= exprListTableUsage(pMaskSet, pS->pGroupBy); |
| 100872 | 100809 | mask |= exprListTableUsage(pMaskSet, pS->pOrderBy); |
| 100873 | 100810 | mask |= exprTableUsage(pMaskSet, pS->pWhere); |
| 100874 | 100811 | mask |= exprTableUsage(pMaskSet, pS->pHaving); |
| 100812 | + if( ALWAYS(pSrc!=0) ){ | |
| 100813 | + int i; | |
| 100814 | + for(i=0; i<pSrc->nSrc; i++){ | |
| 100815 | + mask |= exprSelectTableUsage(pMaskSet, pSrc->a[i].pSelect); | |
| 100816 | + mask |= exprTableUsage(pMaskSet, pSrc->a[i].pOn); | |
| 100817 | + } | |
| 100818 | + } | |
| 100875 | 100819 | pS = pS->pPrior; |
| 100876 | 100820 | } |
| 100877 | 100821 | return mask; |
| 100878 | 100822 | } |
| 100879 | 100823 | |
| @@ -102392,12 +102336,11 @@ | ||
| 102392 | 102336 | /* Generate code to skip over the creation and initialization of the |
| 102393 | 102337 | ** transient index on 2nd and subsequent iterations of the loop. */ |
| 102394 | 102338 | v = pParse->pVdbe; |
| 102395 | 102339 | assert( v!=0 ); |
| 102396 | 102340 | regIsInit = ++pParse->nMem; |
| 102397 | - addrInit = sqlite3VdbeAddOp1(v, OP_If, regIsInit); | |
| 102398 | - sqlite3VdbeAddOp2(v, OP_Integer, 1, regIsInit); | |
| 102341 | + addrInit = sqlite3VdbeAddOp1(v, OP_Once, regIsInit); | |
| 102399 | 102342 | |
| 102400 | 102343 | /* Count the number of columns that will be added to the index |
| 102401 | 102344 | ** and used to match WHERE clause constraints */ |
| 102402 | 102345 | nColumn = 0; |
| 102403 | 102346 | pTable = pSrc->pTab; |
| @@ -105583,11 +105526,10 @@ | ||
| 105583 | 105526 | return; |
| 105584 | 105527 | } |
| 105585 | 105528 | |
| 105586 | 105529 | /************** End of where.c ***********************************************/ |
| 105587 | 105530 | /************** Begin file parse.c *******************************************/ |
| 105588 | -#line 1 "tsrc/parse.c" | |
| 105589 | 105531 | /* Driver template for the LEMON parser generator. |
| 105590 | 105532 | ** The author disclaims copyright to this source code. |
| 105591 | 105533 | ** |
| 105592 | 105534 | ** This version of "lempar.c" is modified, slightly, for use by SQLite. |
| 105593 | 105535 | ** The only modifications are the addition of a couple of NEVER() |
| @@ -105596,11 +105538,10 @@ | ||
| 105596 | 105538 | ** specific grammar used by SQLite. |
| 105597 | 105539 | */ |
| 105598 | 105540 | /* First off, code is included that follows the "include" declaration |
| 105599 | 105541 | ** in the input grammar file. */ |
| 105600 | 105542 | /* #include <stdio.h> */ |
| 105601 | -#line 51 "parse.y" | |
| 105602 | 105543 | |
| 105603 | 105544 | |
| 105604 | 105545 | /* |
| 105605 | 105546 | ** Disable all error recovery processing in the parser push-down |
| 105606 | 105547 | ** automaton. |
| @@ -105644,11 +105585,10 @@ | ||
| 105644 | 105585 | /* |
| 105645 | 105586 | ** An instance of this structure holds the ATTACH key and the key type. |
| 105646 | 105587 | */ |
| 105647 | 105588 | struct AttachKey { int type; Token key; }; |
| 105648 | 105589 | |
| 105649 | -#line 722 "parse.y" | |
| 105650 | 105590 | |
| 105651 | 105591 | /* This is a utility routine used to set the ExprSpan.zStart and |
| 105652 | 105592 | ** ExprSpan.zEnd values of pOut so that the span covers the complete |
| 105653 | 105593 | ** range of text beginning with pStart and going to the end of pEnd. |
| 105654 | 105594 | */ |
| @@ -105664,11 +105604,10 @@ | ||
| 105664 | 105604 | static void spanExpr(ExprSpan *pOut, Parse *pParse, int op, Token *pValue){ |
| 105665 | 105605 | pOut->pExpr = sqlite3PExpr(pParse, op, 0, 0, pValue); |
| 105666 | 105606 | pOut->zStart = pValue->z; |
| 105667 | 105607 | pOut->zEnd = &pValue->z[pValue->n]; |
| 105668 | 105608 | } |
| 105669 | -#line 817 "parse.y" | |
| 105670 | 105609 | |
| 105671 | 105610 | /* This routine constructs a binary expression node out of two ExprSpan |
| 105672 | 105611 | ** objects and uses the result to populate a new ExprSpan object. |
| 105673 | 105612 | */ |
| 105674 | 105613 | static void spanBinaryExpr( |
| @@ -105680,11 +105619,10 @@ | ||
| 105680 | 105619 | ){ |
| 105681 | 105620 | pOut->pExpr = sqlite3PExpr(pParse, op, pLeft->pExpr, pRight->pExpr, 0); |
| 105682 | 105621 | pOut->zStart = pLeft->zStart; |
| 105683 | 105622 | pOut->zEnd = pRight->zEnd; |
| 105684 | 105623 | } |
| 105685 | -#line 873 "parse.y" | |
| 105686 | 105624 | |
| 105687 | 105625 | /* Construct an expression node for a unary postfix operator |
| 105688 | 105626 | */ |
| 105689 | 105627 | static void spanUnaryPostfix( |
| 105690 | 105628 | ExprSpan *pOut, /* Write the new expression node here */ |
| @@ -105695,11 +105633,10 @@ | ||
| 105695 | 105633 | ){ |
| 105696 | 105634 | pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0); |
| 105697 | 105635 | pOut->zStart = pOperand->zStart; |
| 105698 | 105636 | pOut->zEnd = &pPostOp->z[pPostOp->n]; |
| 105699 | 105637 | } |
| 105700 | -#line 892 "parse.y" | |
| 105701 | 105638 | |
| 105702 | 105639 | /* A routine to convert a binary TK_IS or TK_ISNOT expression into a |
| 105703 | 105640 | ** unary TK_ISNULL or TK_NOTNULL expression. */ |
| 105704 | 105641 | static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){ |
| 105705 | 105642 | sqlite3 *db = pParse->db; |
| @@ -105707,11 +105644,10 @@ | ||
| 105707 | 105644 | pA->op = (u8)op; |
| 105708 | 105645 | sqlite3ExprDelete(db, pA->pRight); |
| 105709 | 105646 | pA->pRight = 0; |
| 105710 | 105647 | } |
| 105711 | 105648 | } |
| 105712 | -#line 920 "parse.y" | |
| 105713 | 105649 | |
| 105714 | 105650 | /* Construct an expression node for a unary prefix operator |
| 105715 | 105651 | */ |
| 105716 | 105652 | static void spanUnaryPrefix( |
| 105717 | 105653 | ExprSpan *pOut, /* Write the new expression node here */ |
| @@ -105722,11 +105658,10 @@ | ||
| 105722 | 105658 | ){ |
| 105723 | 105659 | pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0); |
| 105724 | 105660 | pOut->zStart = pPreOp->z; |
| 105725 | 105661 | pOut->zEnd = pOperand->zEnd; |
| 105726 | 105662 | } |
| 105727 | -#line 141 "parse.c" | |
| 105728 | 105663 | /* Next is all token values, in a form suitable for use by makeheaders. |
| 105729 | 105664 | ** This section will be null unless lemon is run with the -m switch. |
| 105730 | 105665 | */ |
| 105731 | 105666 | /* |
| 105732 | 105667 | ** These constants (all generated automatically by the parser generator) |
| @@ -106978,21 +106913,17 @@ | ||
| 106978 | 106913 | ** inside the C code. |
| 106979 | 106914 | */ |
| 106980 | 106915 | case 160: /* select */ |
| 106981 | 106916 | case 194: /* oneselect */ |
| 106982 | 106917 | { |
| 106983 | -#line 403 "parse.y" | |
| 106984 | 106918 | sqlite3SelectDelete(pParse->db, (yypminor->yy387)); |
| 106985 | -#line 1399 "parse.c" | |
| 106986 | 106919 | } |
| 106987 | 106920 | break; |
| 106988 | 106921 | case 174: /* term */ |
| 106989 | 106922 | case 175: /* expr */ |
| 106990 | 106923 | { |
| 106991 | -#line 720 "parse.y" | |
| 106992 | 106924 | sqlite3ExprDelete(pParse->db, (yypminor->yy118).pExpr); |
| 106993 | -#line 1407 "parse.c" | |
| 106994 | 106925 | } |
| 106995 | 106926 | break; |
| 106996 | 106927 | case 179: /* idxlist_opt */ |
| 106997 | 106928 | case 187: /* idxlist */ |
| 106998 | 106929 | case 197: /* selcollist */ |
| @@ -107004,23 +106935,19 @@ | ||
| 107004 | 106935 | case 217: /* setlist */ |
| 107005 | 106936 | case 220: /* itemlist */ |
| 107006 | 106937 | case 221: /* exprlist */ |
| 107007 | 106938 | case 226: /* case_exprlist */ |
| 107008 | 106939 | { |
| 107009 | -#line 1103 "parse.y" | |
| 107010 | 106940 | sqlite3ExprListDelete(pParse->db, (yypminor->yy322)); |
| 107011 | -#line 1425 "parse.c" | |
| 107012 | 106941 | } |
| 107013 | 106942 | break; |
| 107014 | 106943 | case 193: /* fullname */ |
| 107015 | 106944 | case 198: /* from */ |
| 107016 | 106945 | case 206: /* seltablist */ |
| 107017 | 106946 | case 207: /* stl_prefix */ |
| 107018 | 106947 | { |
| 107019 | -#line 534 "parse.y" | |
| 107020 | 106948 | sqlite3SrcListDelete(pParse->db, (yypminor->yy259)); |
| 107021 | -#line 1435 "parse.c" | |
| 107022 | 106949 | } |
| 107023 | 106950 | break; |
| 107024 | 106951 | case 199: /* where_opt */ |
| 107025 | 106952 | case 201: /* having_opt */ |
| 107026 | 106953 | case 210: /* on_opt */ |
| @@ -107028,37 +106955,29 @@ | ||
| 107028 | 106955 | case 225: /* case_operand */ |
| 107029 | 106956 | case 227: /* case_else */ |
| 107030 | 106957 | case 238: /* when_clause */ |
| 107031 | 106958 | case 243: /* key_opt */ |
| 107032 | 106959 | { |
| 107033 | -#line 644 "parse.y" | |
| 107034 | 106960 | sqlite3ExprDelete(pParse->db, (yypminor->yy314)); |
| 107035 | -#line 1449 "parse.c" | |
| 107036 | 106961 | } |
| 107037 | 106962 | break; |
| 107038 | 106963 | case 211: /* using_opt */ |
| 107039 | 106964 | case 213: /* inscollist */ |
| 107040 | 106965 | case 219: /* inscollist_opt */ |
| 107041 | 106966 | { |
| 107042 | -#line 566 "parse.y" | |
| 107043 | 106967 | sqlite3IdListDelete(pParse->db, (yypminor->yy384)); |
| 107044 | -#line 1458 "parse.c" | |
| 107045 | 106968 | } |
| 107046 | 106969 | break; |
| 107047 | 106970 | case 234: /* trigger_cmd_list */ |
| 107048 | 106971 | case 239: /* trigger_cmd */ |
| 107049 | 106972 | { |
| 107050 | -#line 1210 "parse.y" | |
| 107051 | 106973 | sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy203)); |
| 107052 | -#line 1466 "parse.c" | |
| 107053 | 106974 | } |
| 107054 | 106975 | break; |
| 107055 | 106976 | case 236: /* trigger_event */ |
| 107056 | 106977 | { |
| 107057 | -#line 1196 "parse.y" | |
| 107058 | 106978 | sqlite3IdListDelete(pParse->db, (yypminor->yy90).b); |
| 107059 | -#line 1473 "parse.c" | |
| 107060 | 106979 | } |
| 107061 | 106980 | break; |
| 107062 | 106981 | default: break; /* If no destructor action specified: do nothing */ |
| 107063 | 106982 | } |
| 107064 | 106983 | } |
| @@ -107240,16 +107159,14 @@ | ||
| 107240 | 107159 | } |
| 107241 | 107160 | #endif |
| 107242 | 107161 | while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); |
| 107243 | 107162 | /* Here code is inserted which will execute if the parser |
| 107244 | 107163 | ** stack every overflows */ |
| 107245 | -#line 38 "parse.y" | |
| 107246 | 107164 | |
| 107247 | 107165 | UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */ |
| 107248 | 107166 | sqlite3ErrorMsg(pParse, "parser stack overflow"); |
| 107249 | 107167 | pParse->parseError = 1; |
| 107250 | -#line 1664 "parse.c" | |
| 107251 | 107168 | sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */ |
| 107252 | 107169 | } |
| 107253 | 107170 | |
| 107254 | 107171 | /* |
| 107255 | 107172 | ** Perform a shift action. |
| @@ -107686,94 +107603,66 @@ | ||
| 107686 | 107603 | ** { ... } // User supplied code |
| 107687 | 107604 | ** #line <lineno> <thisfile> |
| 107688 | 107605 | ** break; |
| 107689 | 107606 | */ |
| 107690 | 107607 | case 5: /* explain ::= */ |
| 107691 | -#line 107 "parse.y" | |
| 107692 | 107608 | { sqlite3BeginParse(pParse, 0); } |
| 107693 | -#line 2107 "parse.c" | |
| 107694 | 107609 | break; |
| 107695 | 107610 | case 6: /* explain ::= EXPLAIN */ |
| 107696 | -#line 109 "parse.y" | |
| 107697 | 107611 | { sqlite3BeginParse(pParse, 1); } |
| 107698 | -#line 2112 "parse.c" | |
| 107699 | 107612 | break; |
| 107700 | 107613 | case 7: /* explain ::= EXPLAIN QUERY PLAN */ |
| 107701 | -#line 110 "parse.y" | |
| 107702 | 107614 | { sqlite3BeginParse(pParse, 2); } |
| 107703 | -#line 2117 "parse.c" | |
| 107704 | 107615 | break; |
| 107705 | 107616 | case 8: /* cmdx ::= cmd */ |
| 107706 | -#line 112 "parse.y" | |
| 107707 | 107617 | { sqlite3FinishCoding(pParse); } |
| 107708 | -#line 2122 "parse.c" | |
| 107709 | 107618 | break; |
| 107710 | 107619 | case 9: /* cmd ::= BEGIN transtype trans_opt */ |
| 107711 | -#line 117 "parse.y" | |
| 107712 | 107620 | {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy4);} |
| 107713 | -#line 2127 "parse.c" | |
| 107714 | 107621 | break; |
| 107715 | 107622 | case 13: /* transtype ::= */ |
| 107716 | -#line 122 "parse.y" | |
| 107717 | 107623 | {yygotominor.yy4 = TK_DEFERRED;} |
| 107718 | -#line 2132 "parse.c" | |
| 107719 | 107624 | break; |
| 107720 | 107625 | case 14: /* transtype ::= DEFERRED */ |
| 107721 | 107626 | case 15: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==15); |
| 107722 | 107627 | case 16: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==16); |
| 107723 | 107628 | case 115: /* multiselect_op ::= UNION */ yytestcase(yyruleno==115); |
| 107724 | 107629 | case 117: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==117); |
| 107725 | -#line 123 "parse.y" | |
| 107726 | 107630 | {yygotominor.yy4 = yymsp[0].major;} |
| 107727 | -#line 2141 "parse.c" | |
| 107728 | 107631 | break; |
| 107729 | 107632 | case 17: /* cmd ::= COMMIT trans_opt */ |
| 107730 | 107633 | case 18: /* cmd ::= END trans_opt */ yytestcase(yyruleno==18); |
| 107731 | -#line 126 "parse.y" | |
| 107732 | 107634 | {sqlite3CommitTransaction(pParse);} |
| 107733 | -#line 2147 "parse.c" | |
| 107734 | 107635 | break; |
| 107735 | 107636 | case 19: /* cmd ::= ROLLBACK trans_opt */ |
| 107736 | -#line 128 "parse.y" | |
| 107737 | 107637 | {sqlite3RollbackTransaction(pParse);} |
| 107738 | -#line 2152 "parse.c" | |
| 107739 | 107638 | break; |
| 107740 | 107639 | case 22: /* cmd ::= SAVEPOINT nm */ |
| 107741 | -#line 132 "parse.y" | |
| 107742 | 107640 | { |
| 107743 | 107641 | sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0); |
| 107744 | 107642 | } |
| 107745 | -#line 2159 "parse.c" | |
| 107746 | 107643 | break; |
| 107747 | 107644 | case 23: /* cmd ::= RELEASE savepoint_opt nm */ |
| 107748 | -#line 135 "parse.y" | |
| 107749 | 107645 | { |
| 107750 | 107646 | sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0); |
| 107751 | 107647 | } |
| 107752 | -#line 2166 "parse.c" | |
| 107753 | 107648 | break; |
| 107754 | 107649 | case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */ |
| 107755 | -#line 138 "parse.y" | |
| 107756 | 107650 | { |
| 107757 | 107651 | sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0); |
| 107758 | 107652 | } |
| 107759 | -#line 2173 "parse.c" | |
| 107760 | 107653 | break; |
| 107761 | 107654 | case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */ |
| 107762 | -#line 145 "parse.y" | |
| 107763 | 107655 | { |
| 107764 | 107656 | sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy4,0,0,yymsp[-2].minor.yy4); |
| 107765 | 107657 | } |
| 107766 | -#line 2180 "parse.c" | |
| 107767 | 107658 | break; |
| 107768 | 107659 | case 27: /* createkw ::= CREATE */ |
| 107769 | -#line 148 "parse.y" | |
| 107770 | 107660 | { |
| 107771 | 107661 | pParse->db->lookaside.bEnabled = 0; |
| 107772 | 107662 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 107773 | 107663 | } |
| 107774 | -#line 2188 "parse.c" | |
| 107775 | 107664 | break; |
| 107776 | 107665 | case 28: /* ifnotexists ::= */ |
| 107777 | 107666 | case 31: /* temp ::= */ yytestcase(yyruleno==31); |
| 107778 | 107667 | case 70: /* autoinc ::= */ yytestcase(yyruleno==70); |
| 107779 | 107668 | case 83: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==83); |
| @@ -107783,56 +107672,44 @@ | ||
| 107783 | 107672 | case 109: /* ifexists ::= */ yytestcase(yyruleno==109); |
| 107784 | 107673 | case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120); |
| 107785 | 107674 | case 121: /* distinct ::= */ yytestcase(yyruleno==121); |
| 107786 | 107675 | case 222: /* between_op ::= BETWEEN */ yytestcase(yyruleno==222); |
| 107787 | 107676 | case 225: /* in_op ::= IN */ yytestcase(yyruleno==225); |
| 107788 | -#line 153 "parse.y" | |
| 107789 | 107677 | {yygotominor.yy4 = 0;} |
| 107790 | -#line 2204 "parse.c" | |
| 107791 | 107678 | break; |
| 107792 | 107679 | case 29: /* ifnotexists ::= IF NOT EXISTS */ |
| 107793 | 107680 | case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30); |
| 107794 | 107681 | case 71: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==71); |
| 107795 | 107682 | case 86: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==86); |
| 107796 | 107683 | case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108); |
| 107797 | 107684 | case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119); |
| 107798 | 107685 | case 223: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==223); |
| 107799 | 107686 | case 226: /* in_op ::= NOT IN */ yytestcase(yyruleno==226); |
| 107800 | -#line 154 "parse.y" | |
| 107801 | 107687 | {yygotominor.yy4 = 1;} |
| 107802 | -#line 2216 "parse.c" | |
| 107803 | 107688 | break; |
| 107804 | 107689 | case 32: /* create_table_args ::= LP columnlist conslist_opt RP */ |
| 107805 | -#line 160 "parse.y" | |
| 107806 | 107690 | { |
| 107807 | 107691 | sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0); |
| 107808 | 107692 | } |
| 107809 | -#line 2223 "parse.c" | |
| 107810 | 107693 | break; |
| 107811 | 107694 | case 33: /* create_table_args ::= AS select */ |
| 107812 | -#line 163 "parse.y" | |
| 107813 | 107695 | { |
| 107814 | 107696 | sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy387); |
| 107815 | 107697 | sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387); |
| 107816 | 107698 | } |
| 107817 | -#line 2231 "parse.c" | |
| 107818 | 107699 | break; |
| 107819 | 107700 | case 36: /* column ::= columnid type carglist */ |
| 107820 | -#line 175 "parse.y" | |
| 107821 | 107701 | { |
| 107822 | 107702 | yygotominor.yy0.z = yymsp[-2].minor.yy0.z; |
| 107823 | 107703 | yygotominor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n; |
| 107824 | 107704 | } |
| 107825 | -#line 2239 "parse.c" | |
| 107826 | 107705 | break; |
| 107827 | 107706 | case 37: /* columnid ::= nm */ |
| 107828 | -#line 179 "parse.y" | |
| 107829 | 107707 | { |
| 107830 | 107708 | sqlite3AddColumn(pParse,&yymsp[0].minor.yy0); |
| 107831 | 107709 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 107832 | 107710 | } |
| 107833 | -#line 2247 "parse.c" | |
| 107834 | 107711 | break; |
| 107835 | 107712 | case 38: /* id ::= ID */ |
| 107836 | 107713 | case 39: /* id ::= INDEXED */ yytestcase(yyruleno==39); |
| 107837 | 107714 | case 40: /* ids ::= ID|STRING */ yytestcase(yyruleno==40); |
| 107838 | 107715 | case 41: /* nm ::= id */ yytestcase(yyruleno==41); |
| @@ -107852,373 +107729,256 @@ | ||
| 107852 | 107729 | case 264: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==264); |
| 107853 | 107730 | case 265: /* plus_num ::= plus_opt number */ yytestcase(yyruleno==265); |
| 107854 | 107731 | case 266: /* minus_num ::= MINUS number */ yytestcase(yyruleno==266); |
| 107855 | 107732 | case 267: /* number ::= INTEGER|FLOAT */ yytestcase(yyruleno==267); |
| 107856 | 107733 | case 285: /* trnm ::= nm */ yytestcase(yyruleno==285); |
| 107857 | -#line 189 "parse.y" | |
| 107858 | 107734 | {yygotominor.yy0 = yymsp[0].minor.yy0;} |
| 107859 | -#line 2273 "parse.c" | |
| 107860 | 107735 | break; |
| 107861 | 107736 | case 45: /* type ::= typetoken */ |
| 107862 | -#line 251 "parse.y" | |
| 107863 | 107737 | {sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);} |
| 107864 | -#line 2278 "parse.c" | |
| 107865 | 107738 | break; |
| 107866 | 107739 | case 47: /* typetoken ::= typename LP signed RP */ |
| 107867 | -#line 253 "parse.y" | |
| 107868 | 107740 | { |
| 107869 | 107741 | yygotominor.yy0.z = yymsp[-3].minor.yy0.z; |
| 107870 | 107742 | yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z); |
| 107871 | 107743 | } |
| 107872 | -#line 2286 "parse.c" | |
| 107873 | 107744 | break; |
| 107874 | 107745 | case 48: /* typetoken ::= typename LP signed COMMA signed RP */ |
| 107875 | -#line 257 "parse.y" | |
| 107876 | 107746 | { |
| 107877 | 107747 | yygotominor.yy0.z = yymsp[-5].minor.yy0.z; |
| 107878 | 107748 | yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z); |
| 107879 | 107749 | } |
| 107880 | -#line 2294 "parse.c" | |
| 107881 | 107750 | break; |
| 107882 | 107751 | case 50: /* typename ::= typename ids */ |
| 107883 | -#line 263 "parse.y" | |
| 107884 | 107752 | {yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);} |
| 107885 | -#line 2299 "parse.c" | |
| 107886 | 107753 | break; |
| 107887 | 107754 | case 57: /* ccons ::= DEFAULT term */ |
| 107888 | 107755 | case 59: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==59); |
| 107889 | -#line 274 "parse.y" | |
| 107890 | 107756 | {sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy118);} |
| 107891 | -#line 2305 "parse.c" | |
| 107892 | 107757 | break; |
| 107893 | 107758 | case 58: /* ccons ::= DEFAULT LP expr RP */ |
| 107894 | -#line 275 "parse.y" | |
| 107895 | 107759 | {sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy118);} |
| 107896 | -#line 2310 "parse.c" | |
| 107897 | 107760 | break; |
| 107898 | 107761 | case 60: /* ccons ::= DEFAULT MINUS term */ |
| 107899 | -#line 277 "parse.y" | |
| 107900 | 107762 | { |
| 107901 | 107763 | ExprSpan v; |
| 107902 | 107764 | v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy118.pExpr, 0, 0); |
| 107903 | 107765 | v.zStart = yymsp[-1].minor.yy0.z; |
| 107904 | 107766 | v.zEnd = yymsp[0].minor.yy118.zEnd; |
| 107905 | 107767 | sqlite3AddDefaultValue(pParse,&v); |
| 107906 | 107768 | } |
| 107907 | -#line 2321 "parse.c" | |
| 107908 | 107769 | break; |
| 107909 | 107770 | case 61: /* ccons ::= DEFAULT id */ |
| 107910 | -#line 284 "parse.y" | |
| 107911 | 107771 | { |
| 107912 | 107772 | ExprSpan v; |
| 107913 | 107773 | spanExpr(&v, pParse, TK_STRING, &yymsp[0].minor.yy0); |
| 107914 | 107774 | sqlite3AddDefaultValue(pParse,&v); |
| 107915 | 107775 | } |
| 107916 | -#line 2330 "parse.c" | |
| 107917 | 107776 | break; |
| 107918 | 107777 | case 63: /* ccons ::= NOT NULL onconf */ |
| 107919 | -#line 294 "parse.y" | |
| 107920 | 107778 | {sqlite3AddNotNull(pParse, yymsp[0].minor.yy4);} |
| 107921 | -#line 2335 "parse.c" | |
| 107922 | 107779 | break; |
| 107923 | 107780 | case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */ |
| 107924 | -#line 296 "parse.y" | |
| 107925 | 107781 | {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy4,yymsp[0].minor.yy4,yymsp[-2].minor.yy4);} |
| 107926 | -#line 2340 "parse.c" | |
| 107927 | 107782 | break; |
| 107928 | 107783 | case 65: /* ccons ::= UNIQUE onconf */ |
| 107929 | -#line 297 "parse.y" | |
| 107930 | 107784 | {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy4,0,0,0,0);} |
| 107931 | -#line 2345 "parse.c" | |
| 107932 | 107785 | break; |
| 107933 | 107786 | case 66: /* ccons ::= CHECK LP expr RP */ |
| 107934 | -#line 298 "parse.y" | |
| 107935 | 107787 | {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy118.pExpr);} |
| 107936 | -#line 2350 "parse.c" | |
| 107937 | 107788 | break; |
| 107938 | 107789 | case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */ |
| 107939 | -#line 300 "parse.y" | |
| 107940 | 107790 | {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy322,yymsp[0].minor.yy4);} |
| 107941 | -#line 2355 "parse.c" | |
| 107942 | 107791 | break; |
| 107943 | 107792 | case 68: /* ccons ::= defer_subclause */ |
| 107944 | -#line 301 "parse.y" | |
| 107945 | 107793 | {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy4);} |
| 107946 | -#line 2360 "parse.c" | |
| 107947 | 107794 | break; |
| 107948 | 107795 | case 69: /* ccons ::= COLLATE ids */ |
| 107949 | -#line 302 "parse.y" | |
| 107950 | 107796 | {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);} |
| 107951 | -#line 2365 "parse.c" | |
| 107952 | 107797 | break; |
| 107953 | 107798 | case 72: /* refargs ::= */ |
| 107954 | -#line 315 "parse.y" | |
| 107955 | 107799 | { yygotominor.yy4 = OE_None*0x0101; /* EV: R-19803-45884 */} |
| 107956 | -#line 2370 "parse.c" | |
| 107957 | 107800 | break; |
| 107958 | 107801 | case 73: /* refargs ::= refargs refarg */ |
| 107959 | -#line 316 "parse.y" | |
| 107960 | 107802 | { yygotominor.yy4 = (yymsp[-1].minor.yy4 & ~yymsp[0].minor.yy215.mask) | yymsp[0].minor.yy215.value; } |
| 107961 | -#line 2375 "parse.c" | |
| 107962 | 107803 | break; |
| 107963 | 107804 | case 74: /* refarg ::= MATCH nm */ |
| 107964 | 107805 | case 75: /* refarg ::= ON INSERT refact */ yytestcase(yyruleno==75); |
| 107965 | -#line 318 "parse.y" | |
| 107966 | 107806 | { yygotominor.yy215.value = 0; yygotominor.yy215.mask = 0x000000; } |
| 107967 | -#line 2381 "parse.c" | |
| 107968 | 107807 | break; |
| 107969 | 107808 | case 76: /* refarg ::= ON DELETE refact */ |
| 107970 | -#line 320 "parse.y" | |
| 107971 | 107809 | { yygotominor.yy215.value = yymsp[0].minor.yy4; yygotominor.yy215.mask = 0x0000ff; } |
| 107972 | -#line 2386 "parse.c" | |
| 107973 | 107810 | break; |
| 107974 | 107811 | case 77: /* refarg ::= ON UPDATE refact */ |
| 107975 | -#line 321 "parse.y" | |
| 107976 | 107812 | { yygotominor.yy215.value = yymsp[0].minor.yy4<<8; yygotominor.yy215.mask = 0x00ff00; } |
| 107977 | -#line 2391 "parse.c" | |
| 107978 | 107813 | break; |
| 107979 | 107814 | case 78: /* refact ::= SET NULL */ |
| 107980 | -#line 323 "parse.y" | |
| 107981 | 107815 | { yygotominor.yy4 = OE_SetNull; /* EV: R-33326-45252 */} |
| 107982 | -#line 2396 "parse.c" | |
| 107983 | 107816 | break; |
| 107984 | 107817 | case 79: /* refact ::= SET DEFAULT */ |
| 107985 | -#line 324 "parse.y" | |
| 107986 | 107818 | { yygotominor.yy4 = OE_SetDflt; /* EV: R-33326-45252 */} |
| 107987 | -#line 2401 "parse.c" | |
| 107988 | 107819 | break; |
| 107989 | 107820 | case 80: /* refact ::= CASCADE */ |
| 107990 | -#line 325 "parse.y" | |
| 107991 | 107821 | { yygotominor.yy4 = OE_Cascade; /* EV: R-33326-45252 */} |
| 107992 | -#line 2406 "parse.c" | |
| 107993 | 107822 | break; |
| 107994 | 107823 | case 81: /* refact ::= RESTRICT */ |
| 107995 | -#line 326 "parse.y" | |
| 107996 | 107824 | { yygotominor.yy4 = OE_Restrict; /* EV: R-33326-45252 */} |
| 107997 | -#line 2411 "parse.c" | |
| 107998 | 107825 | break; |
| 107999 | 107826 | case 82: /* refact ::= NO ACTION */ |
| 108000 | -#line 327 "parse.y" | |
| 108001 | 107827 | { yygotominor.yy4 = OE_None; /* EV: R-33326-45252 */} |
| 108002 | -#line 2416 "parse.c" | |
| 108003 | 107828 | break; |
| 108004 | 107829 | case 84: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ |
| 108005 | 107830 | case 99: /* defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==99); |
| 108006 | 107831 | case 101: /* onconf ::= ON CONFLICT resolvetype */ yytestcase(yyruleno==101); |
| 108007 | 107832 | case 104: /* resolvetype ::= raisetype */ yytestcase(yyruleno==104); |
| 108008 | -#line 330 "parse.y" | |
| 108009 | 107833 | {yygotominor.yy4 = yymsp[0].minor.yy4;} |
| 108010 | -#line 2424 "parse.c" | |
| 108011 | 107834 | break; |
| 108012 | 107835 | case 88: /* conslist_opt ::= */ |
| 108013 | -#line 339 "parse.y" | |
| 108014 | 107836 | {yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;} |
| 108015 | -#line 2429 "parse.c" | |
| 108016 | 107837 | break; |
| 108017 | 107838 | case 89: /* conslist_opt ::= COMMA conslist */ |
| 108018 | -#line 340 "parse.y" | |
| 108019 | 107839 | {yygotominor.yy0 = yymsp[-1].minor.yy0;} |
| 108020 | -#line 2434 "parse.c" | |
| 108021 | 107840 | break; |
| 108022 | 107841 | case 94: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */ |
| 108023 | -#line 346 "parse.y" | |
| 108024 | 107842 | {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy322,yymsp[0].minor.yy4,yymsp[-2].minor.yy4,0);} |
| 108025 | -#line 2439 "parse.c" | |
| 108026 | 107843 | break; |
| 108027 | 107844 | case 95: /* tcons ::= UNIQUE LP idxlist RP onconf */ |
| 108028 | -#line 348 "parse.y" | |
| 108029 | 107845 | {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy322,yymsp[0].minor.yy4,0,0,0,0);} |
| 108030 | -#line 2444 "parse.c" | |
| 108031 | 107846 | break; |
| 108032 | 107847 | case 96: /* tcons ::= CHECK LP expr RP onconf */ |
| 108033 | -#line 350 "parse.y" | |
| 108034 | 107848 | {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy118.pExpr);} |
| 108035 | -#line 2449 "parse.c" | |
| 108036 | 107849 | break; |
| 108037 | 107850 | case 97: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */ |
| 108038 | -#line 352 "parse.y" | |
| 108039 | 107851 | { |
| 108040 | 107852 | sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy322, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[-1].minor.yy4); |
| 108041 | 107853 | sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy4); |
| 108042 | 107854 | } |
| 108043 | -#line 2457 "parse.c" | |
| 108044 | 107855 | break; |
| 108045 | 107856 | case 100: /* onconf ::= */ |
| 108046 | -#line 366 "parse.y" | |
| 108047 | 107857 | {yygotominor.yy4 = OE_Default;} |
| 108048 | -#line 2462 "parse.c" | |
| 108049 | 107858 | break; |
| 108050 | 107859 | case 102: /* orconf ::= */ |
| 108051 | -#line 368 "parse.y" | |
| 108052 | 107860 | {yygotominor.yy210 = OE_Default;} |
| 108053 | -#line 2467 "parse.c" | |
| 108054 | 107861 | break; |
| 108055 | 107862 | case 103: /* orconf ::= OR resolvetype */ |
| 108056 | -#line 369 "parse.y" | |
| 108057 | 107863 | {yygotominor.yy210 = (u8)yymsp[0].minor.yy4;} |
| 108058 | -#line 2472 "parse.c" | |
| 108059 | 107864 | break; |
| 108060 | 107865 | case 105: /* resolvetype ::= IGNORE */ |
| 108061 | -#line 371 "parse.y" | |
| 108062 | 107866 | {yygotominor.yy4 = OE_Ignore;} |
| 108063 | -#line 2477 "parse.c" | |
| 108064 | 107867 | break; |
| 108065 | 107868 | case 106: /* resolvetype ::= REPLACE */ |
| 108066 | -#line 372 "parse.y" | |
| 108067 | 107869 | {yygotominor.yy4 = OE_Replace;} |
| 108068 | -#line 2482 "parse.c" | |
| 108069 | 107870 | break; |
| 108070 | 107871 | case 107: /* cmd ::= DROP TABLE ifexists fullname */ |
| 108071 | -#line 376 "parse.y" | |
| 108072 | 107872 | { |
| 108073 | 107873 | sqlite3DropTable(pParse, yymsp[0].minor.yy259, 0, yymsp[-1].minor.yy4); |
| 108074 | 107874 | } |
| 108075 | -#line 2489 "parse.c" | |
| 108076 | 107875 | break; |
| 108077 | 107876 | case 110: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */ |
| 108078 | -#line 386 "parse.y" | |
| 108079 | 107877 | { |
| 108080 | 107878 | sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy387, yymsp[-6].minor.yy4, yymsp[-4].minor.yy4); |
| 108081 | 107879 | } |
| 108082 | -#line 2496 "parse.c" | |
| 108083 | 107880 | break; |
| 108084 | 107881 | case 111: /* cmd ::= DROP VIEW ifexists fullname */ |
| 108085 | -#line 389 "parse.y" | |
| 108086 | 107882 | { |
| 108087 | 107883 | sqlite3DropTable(pParse, yymsp[0].minor.yy259, 1, yymsp[-1].minor.yy4); |
| 108088 | 107884 | } |
| 108089 | -#line 2503 "parse.c" | |
| 108090 | 107885 | break; |
| 108091 | 107886 | case 112: /* cmd ::= select */ |
| 108092 | -#line 396 "parse.y" | |
| 108093 | 107887 | { |
| 108094 | 107888 | SelectDest dest = {SRT_Output, 0, 0, 0, 0}; |
| 108095 | 107889 | sqlite3Select(pParse, yymsp[0].minor.yy387, &dest); |
| 108096 | 107890 | sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387); |
| 108097 | 107891 | } |
| 108098 | -#line 2512 "parse.c" | |
| 108099 | 107892 | break; |
| 108100 | 107893 | case 113: /* select ::= oneselect */ |
| 108101 | -#line 407 "parse.y" | |
| 108102 | 107894 | {yygotominor.yy387 = yymsp[0].minor.yy387;} |
| 108103 | -#line 2517 "parse.c" | |
| 108104 | 107895 | break; |
| 108105 | 107896 | case 114: /* select ::= select multiselect_op oneselect */ |
| 108106 | -#line 409 "parse.y" | |
| 108107 | 107897 | { |
| 108108 | 107898 | if( yymsp[0].minor.yy387 ){ |
| 108109 | 107899 | yymsp[0].minor.yy387->op = (u8)yymsp[-1].minor.yy4; |
| 108110 | 107900 | yymsp[0].minor.yy387->pPrior = yymsp[-2].minor.yy387; |
| 108111 | 107901 | }else{ |
| 108112 | 107902 | sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy387); |
| 108113 | 107903 | } |
| 108114 | 107904 | yygotominor.yy387 = yymsp[0].minor.yy387; |
| 108115 | 107905 | } |
| 108116 | -#line 2530 "parse.c" | |
| 108117 | 107906 | break; |
| 108118 | 107907 | case 116: /* multiselect_op ::= UNION ALL */ |
| 108119 | -#line 420 "parse.y" | |
| 108120 | 107908 | {yygotominor.yy4 = TK_ALL;} |
| 108121 | -#line 2535 "parse.c" | |
| 108122 | 107909 | break; |
| 108123 | 107910 | case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ |
| 108124 | -#line 424 "parse.y" | |
| 108125 | 107911 | { |
| 108126 | 107912 | yygotominor.yy387 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy322,yymsp[-5].minor.yy259,yymsp[-4].minor.yy314,yymsp[-3].minor.yy322,yymsp[-2].minor.yy314,yymsp[-1].minor.yy322,yymsp[-7].minor.yy4,yymsp[0].minor.yy292.pLimit,yymsp[0].minor.yy292.pOffset); |
| 108127 | 107913 | } |
| 108128 | -#line 2542 "parse.c" | |
| 108129 | 107914 | break; |
| 108130 | 107915 | case 122: /* sclp ::= selcollist COMMA */ |
| 108131 | 107916 | case 247: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==247); |
| 108132 | -#line 445 "parse.y" | |
| 108133 | 107917 | {yygotominor.yy322 = yymsp[-1].minor.yy322;} |
| 108134 | -#line 2548 "parse.c" | |
| 108135 | 107918 | break; |
| 108136 | 107919 | case 123: /* sclp ::= */ |
| 108137 | 107920 | case 151: /* orderby_opt ::= */ yytestcase(yyruleno==151); |
| 108138 | 107921 | case 159: /* groupby_opt ::= */ yytestcase(yyruleno==159); |
| 108139 | 107922 | case 240: /* exprlist ::= */ yytestcase(yyruleno==240); |
| 108140 | 107923 | case 246: /* idxlist_opt ::= */ yytestcase(yyruleno==246); |
| 108141 | -#line 446 "parse.y" | |
| 108142 | 107924 | {yygotominor.yy322 = 0;} |
| 108143 | -#line 2557 "parse.c" | |
| 108144 | 107925 | break; |
| 108145 | 107926 | case 124: /* selcollist ::= sclp expr as */ |
| 108146 | -#line 447 "parse.y" | |
| 108147 | 107927 | { |
| 108148 | 107928 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy322, yymsp[-1].minor.yy118.pExpr); |
| 108149 | 107929 | if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[0].minor.yy0, 1); |
| 108150 | 107930 | sqlite3ExprListSetSpan(pParse,yygotominor.yy322,&yymsp[-1].minor.yy118); |
| 108151 | 107931 | } |
| 108152 | -#line 2566 "parse.c" | |
| 108153 | 107932 | break; |
| 108154 | 107933 | case 125: /* selcollist ::= sclp STAR */ |
| 108155 | -#line 452 "parse.y" | |
| 108156 | 107934 | { |
| 108157 | 107935 | Expr *p = sqlite3Expr(pParse->db, TK_ALL, 0); |
| 108158 | 107936 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy322, p); |
| 108159 | 107937 | } |
| 108160 | -#line 2574 "parse.c" | |
| 108161 | 107938 | break; |
| 108162 | 107939 | case 126: /* selcollist ::= sclp nm DOT STAR */ |
| 108163 | -#line 456 "parse.y" | |
| 108164 | 107940 | { |
| 108165 | 107941 | Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0); |
| 108166 | 107942 | Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108167 | 107943 | Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0); |
| 108168 | 107944 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, pDot); |
| 108169 | 107945 | } |
| 108170 | -#line 2584 "parse.c" | |
| 108171 | 107946 | break; |
| 108172 | 107947 | case 129: /* as ::= */ |
| 108173 | -#line 469 "parse.y" | |
| 108174 | 107948 | {yygotominor.yy0.n = 0;} |
| 108175 | -#line 2589 "parse.c" | |
| 108176 | 107949 | break; |
| 108177 | 107950 | case 130: /* from ::= */ |
| 108178 | -#line 481 "parse.y" | |
| 108179 | 107951 | {yygotominor.yy259 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy259));} |
| 108180 | -#line 2594 "parse.c" | |
| 108181 | 107952 | break; |
| 108182 | 107953 | case 131: /* from ::= FROM seltablist */ |
| 108183 | -#line 482 "parse.y" | |
| 108184 | 107954 | { |
| 108185 | 107955 | yygotominor.yy259 = yymsp[0].minor.yy259; |
| 108186 | 107956 | sqlite3SrcListShiftJoinType(yygotominor.yy259); |
| 108187 | 107957 | } |
| 108188 | -#line 2602 "parse.c" | |
| 108189 | 107958 | break; |
| 108190 | 107959 | case 132: /* stl_prefix ::= seltablist joinop */ |
| 108191 | -#line 490 "parse.y" | |
| 108192 | 107960 | { |
| 108193 | 107961 | yygotominor.yy259 = yymsp[-1].minor.yy259; |
| 108194 | 107962 | if( ALWAYS(yygotominor.yy259 && yygotominor.yy259->nSrc>0) ) yygotominor.yy259->a[yygotominor.yy259->nSrc-1].jointype = (u8)yymsp[0].minor.yy4; |
| 108195 | 107963 | } |
| 108196 | -#line 2610 "parse.c" | |
| 108197 | 107964 | break; |
| 108198 | 107965 | case 133: /* stl_prefix ::= */ |
| 108199 | -#line 494 "parse.y" | |
| 108200 | 107966 | {yygotominor.yy259 = 0;} |
| 108201 | -#line 2615 "parse.c" | |
| 108202 | 107967 | break; |
| 108203 | 107968 | case 134: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */ |
| 108204 | -#line 495 "parse.y" | |
| 108205 | 107969 | { |
| 108206 | 107970 | yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy314,yymsp[0].minor.yy384); |
| 108207 | 107971 | sqlite3SrcListIndexedBy(pParse, yygotominor.yy259, &yymsp[-2].minor.yy0); |
| 108208 | 107972 | } |
| 108209 | -#line 2623 "parse.c" | |
| 108210 | 107973 | break; |
| 108211 | 107974 | case 135: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */ |
| 108212 | -#line 501 "parse.y" | |
| 108213 | 107975 | { |
| 108214 | 107976 | yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy387,yymsp[-1].minor.yy314,yymsp[0].minor.yy384); |
| 108215 | 107977 | } |
| 108216 | -#line 2630 "parse.c" | |
| 108217 | 107978 | break; |
| 108218 | 107979 | case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ |
| 108219 | -#line 505 "parse.y" | |
| 108220 | 107980 | { |
| 108221 | 107981 | if( yymsp[-6].minor.yy259==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy314==0 && yymsp[0].minor.yy384==0 ){ |
| 108222 | 107982 | yygotominor.yy259 = yymsp[-4].minor.yy259; |
| 108223 | 107983 | }else{ |
| 108224 | 107984 | Select *pSubquery; |
| @@ -108225,260 +107985,180 @@ | ||
| 108225 | 107985 | sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy259); |
| 108226 | 107986 | pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy259,0,0,0,0,0,0,0); |
| 108227 | 107987 | yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy314,yymsp[0].minor.yy384); |
| 108228 | 107988 | } |
| 108229 | 107989 | } |
| 108230 | -#line 2644 "parse.c" | |
| 108231 | 107990 | break; |
| 108232 | 107991 | case 137: /* dbnm ::= */ |
| 108233 | 107992 | case 146: /* indexed_opt ::= */ yytestcase(yyruleno==146); |
| 108234 | -#line 530 "parse.y" | |
| 108235 | 107993 | {yygotominor.yy0.z=0; yygotominor.yy0.n=0;} |
| 108236 | -#line 2650 "parse.c" | |
| 108237 | 107994 | break; |
| 108238 | 107995 | case 139: /* fullname ::= nm dbnm */ |
| 108239 | -#line 535 "parse.y" | |
| 108240 | 107996 | {yygotominor.yy259 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);} |
| 108241 | -#line 2655 "parse.c" | |
| 108242 | 107997 | break; |
| 108243 | 107998 | case 140: /* joinop ::= COMMA|JOIN */ |
| 108244 | -#line 539 "parse.y" | |
| 108245 | 107999 | { yygotominor.yy4 = JT_INNER; } |
| 108246 | -#line 2660 "parse.c" | |
| 108247 | 108000 | break; |
| 108248 | 108001 | case 141: /* joinop ::= JOIN_KW JOIN */ |
| 108249 | -#line 540 "parse.y" | |
| 108250 | 108002 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); } |
| 108251 | -#line 2665 "parse.c" | |
| 108252 | 108003 | break; |
| 108253 | 108004 | case 142: /* joinop ::= JOIN_KW nm JOIN */ |
| 108254 | -#line 541 "parse.y" | |
| 108255 | 108005 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); } |
| 108256 | -#line 2670 "parse.c" | |
| 108257 | 108006 | break; |
| 108258 | 108007 | case 143: /* joinop ::= JOIN_KW nm nm JOIN */ |
| 108259 | -#line 543 "parse.y" | |
| 108260 | 108008 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); } |
| 108261 | -#line 2675 "parse.c" | |
| 108262 | 108009 | break; |
| 108263 | 108010 | case 144: /* on_opt ::= ON expr */ |
| 108264 | 108011 | case 155: /* sortitem ::= expr */ yytestcase(yyruleno==155); |
| 108265 | 108012 | case 162: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==162); |
| 108266 | 108013 | case 169: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==169); |
| 108267 | 108014 | case 235: /* case_else ::= ELSE expr */ yytestcase(yyruleno==235); |
| 108268 | 108015 | case 237: /* case_operand ::= expr */ yytestcase(yyruleno==237); |
| 108269 | -#line 547 "parse.y" | |
| 108270 | 108016 | {yygotominor.yy314 = yymsp[0].minor.yy118.pExpr;} |
| 108271 | -#line 2685 "parse.c" | |
| 108272 | 108017 | break; |
| 108273 | 108018 | case 145: /* on_opt ::= */ |
| 108274 | 108019 | case 161: /* having_opt ::= */ yytestcase(yyruleno==161); |
| 108275 | 108020 | case 168: /* where_opt ::= */ yytestcase(yyruleno==168); |
| 108276 | 108021 | case 236: /* case_else ::= */ yytestcase(yyruleno==236); |
| 108277 | 108022 | case 238: /* case_operand ::= */ yytestcase(yyruleno==238); |
| 108278 | -#line 548 "parse.y" | |
| 108279 | 108023 | {yygotominor.yy314 = 0;} |
| 108280 | -#line 2694 "parse.c" | |
| 108281 | 108024 | break; |
| 108282 | 108025 | case 148: /* indexed_opt ::= NOT INDEXED */ |
| 108283 | -#line 563 "parse.y" | |
| 108284 | 108026 | {yygotominor.yy0.z=0; yygotominor.yy0.n=1;} |
| 108285 | -#line 2699 "parse.c" | |
| 108286 | 108027 | break; |
| 108287 | 108028 | case 149: /* using_opt ::= USING LP inscollist RP */ |
| 108288 | 108029 | case 181: /* inscollist_opt ::= LP inscollist RP */ yytestcase(yyruleno==181); |
| 108289 | -#line 567 "parse.y" | |
| 108290 | 108030 | {yygotominor.yy384 = yymsp[-1].minor.yy384;} |
| 108291 | -#line 2705 "parse.c" | |
| 108292 | 108031 | break; |
| 108293 | 108032 | case 150: /* using_opt ::= */ |
| 108294 | 108033 | case 180: /* inscollist_opt ::= */ yytestcase(yyruleno==180); |
| 108295 | -#line 568 "parse.y" | |
| 108296 | 108034 | {yygotominor.yy384 = 0;} |
| 108297 | -#line 2711 "parse.c" | |
| 108298 | 108035 | break; |
| 108299 | 108036 | case 152: /* orderby_opt ::= ORDER BY sortlist */ |
| 108300 | 108037 | case 160: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==160); |
| 108301 | 108038 | case 239: /* exprlist ::= nexprlist */ yytestcase(yyruleno==239); |
| 108302 | -#line 579 "parse.y" | |
| 108303 | 108039 | {yygotominor.yy322 = yymsp[0].minor.yy322;} |
| 108304 | -#line 2718 "parse.c" | |
| 108305 | 108040 | break; |
| 108306 | 108041 | case 153: /* sortlist ::= sortlist COMMA sortitem sortorder */ |
| 108307 | -#line 580 "parse.y" | |
| 108308 | 108042 | { |
| 108309 | 108043 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322,yymsp[-1].minor.yy314); |
| 108310 | 108044 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108311 | 108045 | } |
| 108312 | -#line 2726 "parse.c" | |
| 108313 | 108046 | break; |
| 108314 | 108047 | case 154: /* sortlist ::= sortitem sortorder */ |
| 108315 | -#line 584 "parse.y" | |
| 108316 | 108048 | { |
| 108317 | 108049 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy314); |
| 108318 | 108050 | if( yygotominor.yy322 && ALWAYS(yygotominor.yy322->a) ) yygotominor.yy322->a[0].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108319 | 108051 | } |
| 108320 | -#line 2734 "parse.c" | |
| 108321 | 108052 | break; |
| 108322 | 108053 | case 156: /* sortorder ::= ASC */ |
| 108323 | 108054 | case 158: /* sortorder ::= */ yytestcase(yyruleno==158); |
| 108324 | -#line 592 "parse.y" | |
| 108325 | 108055 | {yygotominor.yy4 = SQLITE_SO_ASC;} |
| 108326 | -#line 2740 "parse.c" | |
| 108327 | 108056 | break; |
| 108328 | 108057 | case 157: /* sortorder ::= DESC */ |
| 108329 | -#line 593 "parse.y" | |
| 108330 | 108058 | {yygotominor.yy4 = SQLITE_SO_DESC;} |
| 108331 | -#line 2745 "parse.c" | |
| 108332 | 108059 | break; |
| 108333 | 108060 | case 163: /* limit_opt ::= */ |
| 108334 | -#line 619 "parse.y" | |
| 108335 | 108061 | {yygotominor.yy292.pLimit = 0; yygotominor.yy292.pOffset = 0;} |
| 108336 | -#line 2750 "parse.c" | |
| 108337 | 108062 | break; |
| 108338 | 108063 | case 164: /* limit_opt ::= LIMIT expr */ |
| 108339 | -#line 620 "parse.y" | |
| 108340 | 108064 | {yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr; yygotominor.yy292.pOffset = 0;} |
| 108341 | -#line 2755 "parse.c" | |
| 108342 | 108065 | break; |
| 108343 | 108066 | case 165: /* limit_opt ::= LIMIT expr OFFSET expr */ |
| 108344 | -#line 622 "parse.y" | |
| 108345 | 108067 | {yygotominor.yy292.pLimit = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pOffset = yymsp[0].minor.yy118.pExpr;} |
| 108346 | -#line 2760 "parse.c" | |
| 108347 | 108068 | break; |
| 108348 | 108069 | case 166: /* limit_opt ::= LIMIT expr COMMA expr */ |
| 108349 | -#line 624 "parse.y" | |
| 108350 | 108070 | {yygotominor.yy292.pOffset = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr;} |
| 108351 | -#line 2765 "parse.c" | |
| 108352 | 108071 | break; |
| 108353 | 108072 | case 167: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */ |
| 108354 | -#line 637 "parse.y" | |
| 108355 | 108073 | { |
| 108356 | 108074 | sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy259, &yymsp[-1].minor.yy0); |
| 108357 | 108075 | sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy259,yymsp[0].minor.yy314); |
| 108358 | 108076 | } |
| 108359 | -#line 2773 "parse.c" | |
| 108360 | 108077 | break; |
| 108361 | 108078 | case 170: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */ |
| 108362 | -#line 660 "parse.y" | |
| 108363 | 108079 | { |
| 108364 | 108080 | sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy259, &yymsp[-3].minor.yy0); |
| 108365 | 108081 | sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy322,"set list"); |
| 108366 | 108082 | sqlite3Update(pParse,yymsp[-4].minor.yy259,yymsp[-1].minor.yy322,yymsp[0].minor.yy314,yymsp[-5].minor.yy210); |
| 108367 | 108083 | } |
| 108368 | -#line 2782 "parse.c" | |
| 108369 | 108084 | break; |
| 108370 | 108085 | case 171: /* setlist ::= setlist COMMA nm EQ expr */ |
| 108371 | -#line 670 "parse.y" | |
| 108372 | 108086 | { |
| 108373 | 108087 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108374 | 108088 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108375 | 108089 | } |
| 108376 | -#line 2790 "parse.c" | |
| 108377 | 108090 | break; |
| 108378 | 108091 | case 172: /* setlist ::= nm EQ expr */ |
| 108379 | -#line 674 "parse.y" | |
| 108380 | 108092 | { |
| 108381 | 108093 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy118.pExpr); |
| 108382 | 108094 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108383 | 108095 | } |
| 108384 | -#line 2798 "parse.c" | |
| 108385 | 108096 | break; |
| 108386 | 108097 | case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */ |
| 108387 | -#line 683 "parse.y" | |
| 108388 | 108098 | {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 | 108099 | break; |
| 108391 | 108100 | case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */ |
| 108392 | -#line 685 "parse.y" | |
| 108393 | 108101 | {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 | 108102 | break; |
| 108396 | 108103 | case 175: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */ |
| 108397 | -#line 687 "parse.y" | |
| 108398 | 108104 | {sqlite3Insert(pParse, yymsp[-3].minor.yy259, 0, 0, yymsp[-2].minor.yy384, yymsp[-5].minor.yy210);} |
| 108399 | -#line 2813 "parse.c" | |
| 108400 | 108105 | break; |
| 108401 | 108106 | case 176: /* insert_cmd ::= INSERT orconf */ |
| 108402 | -#line 690 "parse.y" | |
| 108403 | 108107 | {yygotominor.yy210 = yymsp[0].minor.yy210;} |
| 108404 | -#line 2818 "parse.c" | |
| 108405 | 108108 | break; |
| 108406 | 108109 | case 177: /* insert_cmd ::= REPLACE */ |
| 108407 | -#line 691 "parse.y" | |
| 108408 | 108110 | {yygotominor.yy210 = OE_Replace;} |
| 108409 | -#line 2823 "parse.c" | |
| 108410 | 108111 | break; |
| 108411 | 108112 | case 178: /* itemlist ::= itemlist COMMA expr */ |
| 108412 | 108113 | case 241: /* nexprlist ::= nexprlist COMMA expr */ yytestcase(yyruleno==241); |
| 108413 | -#line 698 "parse.y" | |
| 108414 | 108114 | {yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy118.pExpr);} |
| 108415 | -#line 2829 "parse.c" | |
| 108416 | 108115 | break; |
| 108417 | 108116 | case 179: /* itemlist ::= expr */ |
| 108418 | 108117 | case 242: /* nexprlist ::= expr */ yytestcase(yyruleno==242); |
| 108419 | -#line 700 "parse.y" | |
| 108420 | 108118 | {yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy118.pExpr);} |
| 108421 | -#line 2835 "parse.c" | |
| 108422 | 108119 | break; |
| 108423 | 108120 | case 182: /* inscollist ::= inscollist COMMA nm */ |
| 108424 | -#line 710 "parse.y" | |
| 108425 | 108121 | {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy384,&yymsp[0].minor.yy0);} |
| 108426 | -#line 2840 "parse.c" | |
| 108427 | 108122 | break; |
| 108428 | 108123 | case 183: /* inscollist ::= nm */ |
| 108429 | -#line 712 "parse.y" | |
| 108430 | 108124 | {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);} |
| 108431 | -#line 2845 "parse.c" | |
| 108432 | 108125 | break; |
| 108433 | 108126 | case 184: /* expr ::= term */ |
| 108434 | -#line 743 "parse.y" | |
| 108435 | 108127 | {yygotominor.yy118 = yymsp[0].minor.yy118;} |
| 108436 | -#line 2850 "parse.c" | |
| 108437 | 108128 | break; |
| 108438 | 108129 | case 185: /* expr ::= LP expr RP */ |
| 108439 | -#line 744 "parse.y" | |
| 108440 | 108130 | {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 | 108131 | break; |
| 108443 | 108132 | case 186: /* term ::= NULL */ |
| 108444 | 108133 | case 191: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==191); |
| 108445 | 108134 | case 192: /* term ::= STRING */ yytestcase(yyruleno==192); |
| 108446 | -#line 745 "parse.y" | |
| 108447 | 108135 | {spanExpr(&yygotominor.yy118, pParse, yymsp[0].major, &yymsp[0].minor.yy0);} |
| 108448 | -#line 2862 "parse.c" | |
| 108449 | 108136 | break; |
| 108450 | 108137 | case 187: /* expr ::= id */ |
| 108451 | 108138 | case 188: /* expr ::= JOIN_KW */ yytestcase(yyruleno==188); |
| 108452 | -#line 746 "parse.y" | |
| 108453 | 108139 | {spanExpr(&yygotominor.yy118, pParse, TK_ID, &yymsp[0].minor.yy0);} |
| 108454 | -#line 2868 "parse.c" | |
| 108455 | 108140 | break; |
| 108456 | 108141 | case 189: /* expr ::= nm DOT nm */ |
| 108457 | -#line 748 "parse.y" | |
| 108458 | 108142 | { |
| 108459 | 108143 | Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108460 | 108144 | Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0); |
| 108461 | 108145 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0); |
| 108462 | 108146 | spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); |
| 108463 | 108147 | } |
| 108464 | -#line 2878 "parse.c" | |
| 108465 | 108148 | break; |
| 108466 | 108149 | case 190: /* expr ::= nm DOT nm DOT nm */ |
| 108467 | -#line 754 "parse.y" | |
| 108468 | 108150 | { |
| 108469 | 108151 | Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0); |
| 108470 | 108152 | Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108471 | 108153 | Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0); |
| 108472 | 108154 | Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0); |
| 108473 | 108155 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0); |
| 108474 | 108156 | spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); |
| 108475 | 108157 | } |
| 108476 | -#line 2890 "parse.c" | |
| 108477 | 108158 | break; |
| 108478 | 108159 | case 193: /* expr ::= REGISTER */ |
| 108479 | -#line 764 "parse.y" | |
| 108480 | 108160 | { |
| 108481 | 108161 | /* When doing a nested parse, one can include terms in an expression |
| 108482 | 108162 | ** that look like this: #1 #2 ... These terms refer to registers |
| 108483 | 108163 | ** in the virtual machine. #N is the N-th register. */ |
| 108484 | 108164 | if( pParse->nested==0 ){ |
| @@ -108488,40 +108168,32 @@ | ||
| 108488 | 108168 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &yymsp[0].minor.yy0); |
| 108489 | 108169 | if( yygotominor.yy118.pExpr ) sqlite3GetInt32(&yymsp[0].minor.yy0.z[1], &yygotominor.yy118.pExpr->iTable); |
| 108490 | 108170 | } |
| 108491 | 108171 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108492 | 108172 | } |
| 108493 | -#line 2907 "parse.c" | |
| 108494 | 108173 | break; |
| 108495 | 108174 | case 194: /* expr ::= VARIABLE */ |
| 108496 | -#line 777 "parse.y" | |
| 108497 | 108175 | { |
| 108498 | 108176 | spanExpr(&yygotominor.yy118, pParse, TK_VARIABLE, &yymsp[0].minor.yy0); |
| 108499 | 108177 | sqlite3ExprAssignVarNumber(pParse, yygotominor.yy118.pExpr); |
| 108500 | 108178 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108501 | 108179 | } |
| 108502 | -#line 2916 "parse.c" | |
| 108503 | 108180 | break; |
| 108504 | 108181 | case 195: /* expr ::= expr COLLATE ids */ |
| 108505 | -#line 782 "parse.y" | |
| 108506 | 108182 | { |
| 108507 | 108183 | yygotominor.yy118.pExpr = sqlite3ExprSetCollByToken(pParse, yymsp[-2].minor.yy118.pExpr, &yymsp[0].minor.yy0); |
| 108508 | 108184 | yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart; |
| 108509 | 108185 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108510 | 108186 | } |
| 108511 | -#line 2925 "parse.c" | |
| 108512 | 108187 | break; |
| 108513 | 108188 | case 196: /* expr ::= CAST LP expr AS typetoken RP */ |
| 108514 | -#line 788 "parse.y" | |
| 108515 | 108189 | { |
| 108516 | 108190 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy118.pExpr, 0, &yymsp[-1].minor.yy0); |
| 108517 | 108191 | spanSet(&yygotominor.yy118,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0); |
| 108518 | 108192 | } |
| 108519 | -#line 2933 "parse.c" | |
| 108520 | 108193 | break; |
| 108521 | 108194 | case 197: /* expr ::= ID LP distinct exprlist RP */ |
| 108522 | -#line 793 "parse.y" | |
| 108523 | 108195 | { |
| 108524 | 108196 | if( yymsp[-1].minor.yy322 && yymsp[-1].minor.yy322->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){ |
| 108525 | 108197 | sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0); |
| 108526 | 108198 | } |
| 108527 | 108199 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0); |
| @@ -108528,59 +108200,47 @@ | ||
| 108528 | 108200 | spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); |
| 108529 | 108201 | if( yymsp[-2].minor.yy4 && yygotominor.yy118.pExpr ){ |
| 108530 | 108202 | yygotominor.yy118.pExpr->flags |= EP_Distinct; |
| 108531 | 108203 | } |
| 108532 | 108204 | } |
| 108533 | -#line 2947 "parse.c" | |
| 108534 | 108205 | break; |
| 108535 | 108206 | case 198: /* expr ::= ID LP STAR RP */ |
| 108536 | -#line 803 "parse.y" | |
| 108537 | 108207 | { |
| 108538 | 108208 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0); |
| 108539 | 108209 | spanSet(&yygotominor.yy118,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); |
| 108540 | 108210 | } |
| 108541 | -#line 2955 "parse.c" | |
| 108542 | 108211 | break; |
| 108543 | 108212 | case 199: /* term ::= CTIME_KW */ |
| 108544 | -#line 807 "parse.y" | |
| 108545 | 108213 | { |
| 108546 | 108214 | /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are |
| 108547 | 108215 | ** treated as functions that return constants */ |
| 108548 | 108216 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0); |
| 108549 | 108217 | if( yygotominor.yy118.pExpr ){ |
| 108550 | 108218 | yygotominor.yy118.pExpr->op = TK_CONST_FUNC; |
| 108551 | 108219 | } |
| 108552 | 108220 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108553 | 108221 | } |
| 108554 | -#line 2968 "parse.c" | |
| 108555 | 108222 | break; |
| 108556 | 108223 | case 200: /* expr ::= expr AND expr */ |
| 108557 | 108224 | case 201: /* expr ::= expr OR expr */ yytestcase(yyruleno==201); |
| 108558 | 108225 | case 202: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==202); |
| 108559 | 108226 | case 203: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==203); |
| 108560 | 108227 | case 204: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==204); |
| 108561 | 108228 | case 205: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==205); |
| 108562 | 108229 | case 206: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==206); |
| 108563 | 108230 | case 207: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==207); |
| 108564 | -#line 834 "parse.y" | |
| 108565 | 108231 | {spanBinaryExpr(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);} |
| 108566 | -#line 2980 "parse.c" | |
| 108567 | 108232 | break; |
| 108568 | 108233 | case 208: /* likeop ::= LIKE_KW */ |
| 108569 | 108234 | case 210: /* likeop ::= MATCH */ yytestcase(yyruleno==210); |
| 108570 | -#line 847 "parse.y" | |
| 108571 | 108235 | {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 0;} |
| 108572 | -#line 2986 "parse.c" | |
| 108573 | 108236 | break; |
| 108574 | 108237 | case 209: /* likeop ::= NOT LIKE_KW */ |
| 108575 | 108238 | case 211: /* likeop ::= NOT MATCH */ yytestcase(yyruleno==211); |
| 108576 | -#line 848 "parse.y" | |
| 108577 | 108239 | {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 1;} |
| 108578 | -#line 2992 "parse.c" | |
| 108579 | 108240 | break; |
| 108580 | 108241 | case 212: /* expr ::= expr likeop expr */ |
| 108581 | -#line 851 "parse.y" | |
| 108582 | 108242 | { |
| 108583 | 108243 | ExprList *pList; |
| 108584 | 108244 | pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy118.pExpr); |
| 108585 | 108245 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy118.pExpr); |
| 108586 | 108246 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy342.eOperator); |
| @@ -108587,14 +108247,12 @@ | ||
| 108587 | 108247 | if( yymsp[-1].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108588 | 108248 | yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart; |
| 108589 | 108249 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108590 | 108250 | if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc; |
| 108591 | 108251 | } |
| 108592 | -#line 3006 "parse.c" | |
| 108593 | 108252 | break; |
| 108594 | 108253 | case 213: /* expr ::= expr likeop expr ESCAPE expr */ |
| 108595 | -#line 861 "parse.y" | |
| 108596 | 108254 | { |
| 108597 | 108255 | ExprList *pList; |
| 108598 | 108256 | pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108599 | 108257 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy118.pExpr); |
| 108600 | 108258 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr); |
| @@ -108602,56 +108260,40 @@ | ||
| 108602 | 108260 | if( yymsp[-3].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108603 | 108261 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108604 | 108262 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108605 | 108263 | if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc; |
| 108606 | 108264 | } |
| 108607 | -#line 3021 "parse.c" | |
| 108608 | 108265 | break; |
| 108609 | 108266 | case 214: /* expr ::= expr ISNULL|NOTNULL */ |
| 108610 | -#line 889 "parse.y" | |
| 108611 | 108267 | {spanUnaryPostfix(&yygotominor.yy118,pParse,yymsp[0].major,&yymsp[-1].minor.yy118,&yymsp[0].minor.yy0);} |
| 108612 | -#line 3026 "parse.c" | |
| 108613 | 108268 | break; |
| 108614 | 108269 | case 215: /* expr ::= expr NOT NULL */ |
| 108615 | -#line 890 "parse.y" | |
| 108616 | 108270 | {spanUnaryPostfix(&yygotominor.yy118,pParse,TK_NOTNULL,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy0);} |
| 108617 | -#line 3031 "parse.c" | |
| 108618 | 108271 | break; |
| 108619 | 108272 | case 216: /* expr ::= expr IS expr */ |
| 108620 | -#line 911 "parse.y" | |
| 108621 | 108273 | { |
| 108622 | 108274 | spanBinaryExpr(&yygotominor.yy118,pParse,TK_IS,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118); |
| 108623 | 108275 | binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_ISNULL); |
| 108624 | 108276 | } |
| 108625 | -#line 3039 "parse.c" | |
| 108626 | 108277 | break; |
| 108627 | 108278 | case 217: /* expr ::= expr IS NOT expr */ |
| 108628 | -#line 915 "parse.y" | |
| 108629 | 108279 | { |
| 108630 | 108280 | spanBinaryExpr(&yygotominor.yy118,pParse,TK_ISNOT,&yymsp[-3].minor.yy118,&yymsp[0].minor.yy118); |
| 108631 | 108281 | binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_NOTNULL); |
| 108632 | 108282 | } |
| 108633 | -#line 3047 "parse.c" | |
| 108634 | 108283 | break; |
| 108635 | 108284 | case 218: /* expr ::= NOT expr */ |
| 108636 | 108285 | case 219: /* expr ::= BITNOT expr */ yytestcase(yyruleno==219); |
| 108637 | -#line 938 "parse.y" | |
| 108638 | 108286 | {spanUnaryPrefix(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108639 | -#line 3053 "parse.c" | |
| 108640 | 108287 | break; |
| 108641 | 108288 | case 220: /* expr ::= MINUS expr */ |
| 108642 | -#line 941 "parse.y" | |
| 108643 | 108289 | {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UMINUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108644 | -#line 3058 "parse.c" | |
| 108645 | 108290 | break; |
| 108646 | 108291 | case 221: /* expr ::= PLUS expr */ |
| 108647 | -#line 943 "parse.y" | |
| 108648 | 108292 | {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UPLUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108649 | -#line 3063 "parse.c" | |
| 108650 | 108293 | break; |
| 108651 | 108294 | case 224: /* expr ::= expr between_op expr AND expr */ |
| 108652 | -#line 948 "parse.y" | |
| 108653 | 108295 | { |
| 108654 | 108296 | ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108655 | 108297 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr); |
| 108656 | 108298 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy118.pExpr, 0, 0); |
| 108657 | 108299 | if( yygotominor.yy118.pExpr ){ |
| @@ -108661,14 +108303,12 @@ | ||
| 108661 | 108303 | } |
| 108662 | 108304 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108663 | 108305 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108664 | 108306 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108665 | 108307 | } |
| 108666 | -#line 3080 "parse.c" | |
| 108667 | 108308 | break; |
| 108668 | 108309 | case 227: /* expr ::= expr in_op LP exprlist RP */ |
| 108669 | -#line 965 "parse.y" | |
| 108670 | 108310 | { |
| 108671 | 108311 | if( yymsp[-1].minor.yy322==0 ){ |
| 108672 | 108312 | /* Expressions of the form |
| 108673 | 108313 | ** |
| 108674 | 108314 | ** expr1 IN () |
| @@ -108690,14 +108330,12 @@ | ||
| 108690 | 108330 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108691 | 108331 | } |
| 108692 | 108332 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108693 | 108333 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108694 | 108334 | } |
| 108695 | -#line 3109 "parse.c" | |
| 108696 | 108335 | break; |
| 108697 | 108336 | case 228: /* expr ::= LP select RP */ |
| 108698 | -#line 990 "parse.y" | |
| 108699 | 108337 | { |
| 108700 | 108338 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0); |
| 108701 | 108339 | if( yygotominor.yy118.pExpr ){ |
| 108702 | 108340 | yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387; |
| 108703 | 108341 | ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect); |
| @@ -108706,14 +108344,12 @@ | ||
| 108706 | 108344 | sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387); |
| 108707 | 108345 | } |
| 108708 | 108346 | yygotominor.yy118.zStart = yymsp[-2].minor.yy0.z; |
| 108709 | 108347 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108710 | 108348 | } |
| 108711 | -#line 3125 "parse.c" | |
| 108712 | 108349 | break; |
| 108713 | 108350 | case 229: /* expr ::= expr in_op LP select RP */ |
| 108714 | -#line 1002 "parse.y" | |
| 108715 | 108351 | { |
| 108716 | 108352 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy118.pExpr, 0, 0); |
| 108717 | 108353 | if( yygotominor.yy118.pExpr ){ |
| 108718 | 108354 | yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387; |
| 108719 | 108355 | ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect); |
| @@ -108723,14 +108359,12 @@ | ||
| 108723 | 108359 | } |
| 108724 | 108360 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108725 | 108361 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108726 | 108362 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108727 | 108363 | } |
| 108728 | -#line 3142 "parse.c" | |
| 108729 | 108364 | break; |
| 108730 | 108365 | case 230: /* expr ::= expr in_op nm dbnm */ |
| 108731 | -#line 1015 "parse.y" | |
| 108732 | 108366 | { |
| 108733 | 108367 | SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0); |
| 108734 | 108368 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy118.pExpr, 0, 0); |
| 108735 | 108369 | if( yygotominor.yy118.pExpr ){ |
| 108736 | 108370 | yygotominor.yy118.pExpr->x.pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0); |
| @@ -108741,14 +108375,12 @@ | ||
| 108741 | 108375 | } |
| 108742 | 108376 | if( yymsp[-2].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108743 | 108377 | yygotominor.yy118.zStart = yymsp[-3].minor.yy118.zStart; |
| 108744 | 108378 | yygotominor.yy118.zEnd = yymsp[0].minor.yy0.z ? &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] : &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]; |
| 108745 | 108379 | } |
| 108746 | -#line 3160 "parse.c" | |
| 108747 | 108380 | break; |
| 108748 | 108381 | case 231: /* expr ::= EXISTS LP select RP */ |
| 108749 | -#line 1029 "parse.y" | |
| 108750 | 108382 | { |
| 108751 | 108383 | Expr *p = yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0); |
| 108752 | 108384 | if( p ){ |
| 108753 | 108385 | p->x.pSelect = yymsp[-1].minor.yy387; |
| 108754 | 108386 | ExprSetProperty(p, EP_xIsSelect); |
| @@ -108757,14 +108389,12 @@ | ||
| 108757 | 108389 | sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387); |
| 108758 | 108390 | } |
| 108759 | 108391 | yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z; |
| 108760 | 108392 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108761 | 108393 | } |
| 108762 | -#line 3176 "parse.c" | |
| 108763 | 108394 | break; |
| 108764 | 108395 | case 232: /* expr ::= CASE case_operand case_exprlist case_else END */ |
| 108765 | -#line 1044 "parse.y" | |
| 108766 | 108396 | { |
| 108767 | 108397 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy314, yymsp[-1].minor.yy314, 0); |
| 108768 | 108398 | if( yygotominor.yy118.pExpr ){ |
| 108769 | 108399 | yygotominor.yy118.pExpr->x.pList = yymsp[-2].minor.yy322; |
| 108770 | 108400 | sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr); |
| @@ -108772,50 +108402,38 @@ | ||
| 108772 | 108402 | sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy322); |
| 108773 | 108403 | } |
| 108774 | 108404 | yygotominor.yy118.zStart = yymsp[-4].minor.yy0.z; |
| 108775 | 108405 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108776 | 108406 | } |
| 108777 | -#line 3191 "parse.c" | |
| 108778 | 108407 | break; |
| 108779 | 108408 | case 233: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ |
| 108780 | -#line 1057 "parse.y" | |
| 108781 | 108409 | { |
| 108782 | 108410 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy118.pExpr); |
| 108783 | 108411 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108784 | 108412 | } |
| 108785 | -#line 3199 "parse.c" | |
| 108786 | 108413 | break; |
| 108787 | 108414 | case 234: /* case_exprlist ::= WHEN expr THEN expr */ |
| 108788 | -#line 1061 "parse.y" | |
| 108789 | 108415 | { |
| 108790 | 108416 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108791 | 108417 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108792 | 108418 | } |
| 108793 | -#line 3207 "parse.c" | |
| 108794 | 108419 | break; |
| 108795 | 108420 | case 243: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */ |
| 108796 | -#line 1090 "parse.y" | |
| 108797 | 108421 | { |
| 108798 | 108422 | sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0, |
| 108799 | 108423 | sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy322, yymsp[-9].minor.yy4, |
| 108800 | 108424 | &yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy4); |
| 108801 | 108425 | } |
| 108802 | -#line 3216 "parse.c" | |
| 108803 | 108426 | break; |
| 108804 | 108427 | case 244: /* uniqueflag ::= UNIQUE */ |
| 108805 | 108428 | case 298: /* raisetype ::= ABORT */ yytestcase(yyruleno==298); |
| 108806 | -#line 1097 "parse.y" | |
| 108807 | 108429 | {yygotominor.yy4 = OE_Abort;} |
| 108808 | -#line 3222 "parse.c" | |
| 108809 | 108430 | break; |
| 108810 | 108431 | case 245: /* uniqueflag ::= */ |
| 108811 | -#line 1098 "parse.y" | |
| 108812 | 108432 | {yygotominor.yy4 = OE_None;} |
| 108813 | -#line 3227 "parse.c" | |
| 108814 | 108433 | break; |
| 108815 | 108434 | case 248: /* idxlist ::= idxlist COMMA nm collate sortorder */ |
| 108816 | -#line 1107 "parse.y" | |
| 108817 | 108435 | { |
| 108818 | 108436 | Expr *p = 0; |
| 108819 | 108437 | if( yymsp[-1].minor.yy0.n>0 ){ |
| 108820 | 108438 | p = sqlite3Expr(pParse->db, TK_COLUMN, 0); |
| 108821 | 108439 | sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0); |
| @@ -108823,14 +108441,12 @@ | ||
| 108823 | 108441 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, p); |
| 108824 | 108442 | sqlite3ExprListSetName(pParse,yygotominor.yy322,&yymsp[-2].minor.yy0,1); |
| 108825 | 108443 | sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index"); |
| 108826 | 108444 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108827 | 108445 | } |
| 108828 | -#line 3242 "parse.c" | |
| 108829 | 108446 | break; |
| 108830 | 108447 | case 249: /* idxlist ::= nm collate sortorder */ |
| 108831 | -#line 1118 "parse.y" | |
| 108832 | 108448 | { |
| 108833 | 108449 | Expr *p = 0; |
| 108834 | 108450 | if( yymsp[-1].minor.yy0.n>0 ){ |
| 108835 | 108451 | p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0); |
| 108836 | 108452 | sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0); |
| @@ -108838,307 +108454,214 @@ | ||
| 108838 | 108454 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, p); |
| 108839 | 108455 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108840 | 108456 | sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index"); |
| 108841 | 108457 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108842 | 108458 | } |
| 108843 | -#line 3257 "parse.c" | |
| 108844 | 108459 | break; |
| 108845 | 108460 | case 250: /* collate ::= */ |
| 108846 | -#line 1131 "parse.y" | |
| 108847 | 108461 | {yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;} |
| 108848 | -#line 3262 "parse.c" | |
| 108849 | 108462 | break; |
| 108850 | 108463 | case 252: /* cmd ::= DROP INDEX ifexists fullname */ |
| 108851 | -#line 1137 "parse.y" | |
| 108852 | 108464 | {sqlite3DropIndex(pParse, yymsp[0].minor.yy259, yymsp[-1].minor.yy4);} |
| 108853 | -#line 3267 "parse.c" | |
| 108854 | 108465 | break; |
| 108855 | 108466 | case 253: /* cmd ::= VACUUM */ |
| 108856 | 108467 | case 254: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==254); |
| 108857 | -#line 1143 "parse.y" | |
| 108858 | 108468 | {sqlite3Vacuum(pParse);} |
| 108859 | -#line 3273 "parse.c" | |
| 108860 | 108469 | break; |
| 108861 | 108470 | case 255: /* cmd ::= PRAGMA nm dbnm */ |
| 108862 | -#line 1151 "parse.y" | |
| 108863 | 108471 | {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);} |
| 108864 | -#line 3278 "parse.c" | |
| 108865 | 108472 | break; |
| 108866 | 108473 | case 256: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ |
| 108867 | -#line 1152 "parse.y" | |
| 108868 | 108474 | {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);} |
| 108869 | -#line 3283 "parse.c" | |
| 108870 | 108475 | break; |
| 108871 | 108476 | case 257: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ |
| 108872 | -#line 1153 "parse.y" | |
| 108873 | 108477 | {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);} |
| 108874 | -#line 3288 "parse.c" | |
| 108875 | 108478 | break; |
| 108876 | 108479 | case 258: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ |
| 108877 | -#line 1155 "parse.y" | |
| 108878 | 108480 | {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);} |
| 108879 | -#line 3293 "parse.c" | |
| 108880 | 108481 | break; |
| 108881 | 108482 | case 259: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ |
| 108882 | -#line 1157 "parse.y" | |
| 108883 | 108483 | {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);} |
| 108884 | -#line 3298 "parse.c" | |
| 108885 | 108484 | break; |
| 108886 | 108485 | case 270: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ |
| 108887 | -#line 1175 "parse.y" | |
| 108888 | 108486 | { |
| 108889 | 108487 | Token all; |
| 108890 | 108488 | all.z = yymsp[-3].minor.yy0.z; |
| 108891 | 108489 | all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n; |
| 108892 | 108490 | sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy203, &all); |
| 108893 | 108491 | } |
| 108894 | -#line 3308 "parse.c" | |
| 108895 | 108492 | break; |
| 108896 | 108493 | 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 | 108494 | { |
| 108899 | 108495 | sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy4, yymsp[-4].minor.yy90.a, yymsp[-4].minor.yy90.b, yymsp[-2].minor.yy259, yymsp[0].minor.yy314, yymsp[-10].minor.yy4, yymsp[-8].minor.yy4); |
| 108900 | 108496 | yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); |
| 108901 | 108497 | } |
| 108902 | -#line 3316 "parse.c" | |
| 108903 | 108498 | break; |
| 108904 | 108499 | case 272: /* trigger_time ::= BEFORE */ |
| 108905 | 108500 | case 275: /* trigger_time ::= */ yytestcase(yyruleno==275); |
| 108906 | -#line 1190 "parse.y" | |
| 108907 | 108501 | { yygotominor.yy4 = TK_BEFORE; } |
| 108908 | -#line 3322 "parse.c" | |
| 108909 | 108502 | break; |
| 108910 | 108503 | case 273: /* trigger_time ::= AFTER */ |
| 108911 | -#line 1191 "parse.y" | |
| 108912 | 108504 | { yygotominor.yy4 = TK_AFTER; } |
| 108913 | -#line 3327 "parse.c" | |
| 108914 | 108505 | break; |
| 108915 | 108506 | case 274: /* trigger_time ::= INSTEAD OF */ |
| 108916 | -#line 1192 "parse.y" | |
| 108917 | 108507 | { yygotominor.yy4 = TK_INSTEAD;} |
| 108918 | -#line 3332 "parse.c" | |
| 108919 | 108508 | break; |
| 108920 | 108509 | case 276: /* trigger_event ::= DELETE|INSERT */ |
| 108921 | 108510 | case 277: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==277); |
| 108922 | -#line 1197 "parse.y" | |
| 108923 | 108511 | {yygotominor.yy90.a = yymsp[0].major; yygotominor.yy90.b = 0;} |
| 108924 | -#line 3338 "parse.c" | |
| 108925 | 108512 | break; |
| 108926 | 108513 | case 278: /* trigger_event ::= UPDATE OF inscollist */ |
| 108927 | -#line 1199 "parse.y" | |
| 108928 | 108514 | {yygotominor.yy90.a = TK_UPDATE; yygotominor.yy90.b = yymsp[0].minor.yy384;} |
| 108929 | -#line 3343 "parse.c" | |
| 108930 | 108515 | break; |
| 108931 | 108516 | case 281: /* when_clause ::= */ |
| 108932 | 108517 | case 303: /* key_opt ::= */ yytestcase(yyruleno==303); |
| 108933 | -#line 1206 "parse.y" | |
| 108934 | 108518 | { yygotominor.yy314 = 0; } |
| 108935 | -#line 3349 "parse.c" | |
| 108936 | 108519 | break; |
| 108937 | 108520 | case 282: /* when_clause ::= WHEN expr */ |
| 108938 | 108521 | case 304: /* key_opt ::= KEY expr */ yytestcase(yyruleno==304); |
| 108939 | -#line 1207 "parse.y" | |
| 108940 | 108522 | { yygotominor.yy314 = yymsp[0].minor.yy118.pExpr; } |
| 108941 | -#line 3355 "parse.c" | |
| 108942 | 108523 | break; |
| 108943 | 108524 | case 283: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ |
| 108944 | -#line 1211 "parse.y" | |
| 108945 | 108525 | { |
| 108946 | 108526 | assert( yymsp[-2].minor.yy203!=0 ); |
| 108947 | 108527 | yymsp[-2].minor.yy203->pLast->pNext = yymsp[-1].minor.yy203; |
| 108948 | 108528 | yymsp[-2].minor.yy203->pLast = yymsp[-1].minor.yy203; |
| 108949 | 108529 | yygotominor.yy203 = yymsp[-2].minor.yy203; |
| 108950 | 108530 | } |
| 108951 | -#line 3365 "parse.c" | |
| 108952 | 108531 | break; |
| 108953 | 108532 | case 284: /* trigger_cmd_list ::= trigger_cmd SEMI */ |
| 108954 | -#line 1217 "parse.y" | |
| 108955 | 108533 | { |
| 108956 | 108534 | assert( yymsp[-1].minor.yy203!=0 ); |
| 108957 | 108535 | yymsp[-1].minor.yy203->pLast = yymsp[-1].minor.yy203; |
| 108958 | 108536 | yygotominor.yy203 = yymsp[-1].minor.yy203; |
| 108959 | 108537 | } |
| 108960 | -#line 3374 "parse.c" | |
| 108961 | 108538 | break; |
| 108962 | 108539 | case 286: /* trnm ::= nm DOT nm */ |
| 108963 | -#line 1229 "parse.y" | |
| 108964 | 108540 | { |
| 108965 | 108541 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 108966 | 108542 | sqlite3ErrorMsg(pParse, |
| 108967 | 108543 | "qualified table names are not allowed on INSERT, UPDATE, and DELETE " |
| 108968 | 108544 | "statements within triggers"); |
| 108969 | 108545 | } |
| 108970 | -#line 3384 "parse.c" | |
| 108971 | 108546 | break; |
| 108972 | 108547 | case 288: /* tridxby ::= INDEXED BY nm */ |
| 108973 | -#line 1241 "parse.y" | |
| 108974 | 108548 | { |
| 108975 | 108549 | sqlite3ErrorMsg(pParse, |
| 108976 | 108550 | "the INDEXED BY clause is not allowed on UPDATE or DELETE statements " |
| 108977 | 108551 | "within triggers"); |
| 108978 | 108552 | } |
| 108979 | -#line 3393 "parse.c" | |
| 108980 | 108553 | break; |
| 108981 | 108554 | case 289: /* tridxby ::= NOT INDEXED */ |
| 108982 | -#line 1246 "parse.y" | |
| 108983 | 108555 | { |
| 108984 | 108556 | sqlite3ErrorMsg(pParse, |
| 108985 | 108557 | "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements " |
| 108986 | 108558 | "within triggers"); |
| 108987 | 108559 | } |
| 108988 | -#line 3402 "parse.c" | |
| 108989 | 108560 | break; |
| 108990 | 108561 | case 290: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */ |
| 108991 | -#line 1259 "parse.y" | |
| 108992 | 108562 | { 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 | 108563 | break; |
| 108995 | 108564 | case 291: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */ |
| 108996 | -#line 1264 "parse.y" | |
| 108997 | 108565 | {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 | 108566 | break; |
| 109000 | 108567 | case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */ |
| 109001 | -#line 1267 "parse.y" | |
| 109002 | 108568 | {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 | 108569 | break; |
| 109005 | 108570 | case 293: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */ |
| 109006 | -#line 1271 "parse.y" | |
| 109007 | 108571 | {yygotominor.yy203 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy314);} |
| 109008 | -#line 3422 "parse.c" | |
| 109009 | 108572 | break; |
| 109010 | 108573 | case 294: /* trigger_cmd ::= select */ |
| 109011 | -#line 1274 "parse.y" | |
| 109012 | 108574 | {yygotominor.yy203 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy387); } |
| 109013 | -#line 3427 "parse.c" | |
| 109014 | 108575 | break; |
| 109015 | 108576 | case 295: /* expr ::= RAISE LP IGNORE RP */ |
| 109016 | -#line 1277 "parse.y" | |
| 109017 | 108577 | { |
| 109018 | 108578 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0); |
| 109019 | 108579 | if( yygotominor.yy118.pExpr ){ |
| 109020 | 108580 | yygotominor.yy118.pExpr->affinity = OE_Ignore; |
| 109021 | 108581 | } |
| 109022 | 108582 | yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z; |
| 109023 | 108583 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 109024 | 108584 | } |
| 109025 | -#line 3439 "parse.c" | |
| 109026 | 108585 | break; |
| 109027 | 108586 | case 296: /* expr ::= RAISE LP raisetype COMMA nm RP */ |
| 109028 | -#line 1285 "parse.y" | |
| 109029 | 108587 | { |
| 109030 | 108588 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); |
| 109031 | 108589 | if( yygotominor.yy118.pExpr ) { |
| 109032 | 108590 | yygotominor.yy118.pExpr->affinity = (char)yymsp[-3].minor.yy4; |
| 109033 | 108591 | } |
| 109034 | 108592 | yygotominor.yy118.zStart = yymsp[-5].minor.yy0.z; |
| 109035 | 108593 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 109036 | 108594 | } |
| 109037 | -#line 3451 "parse.c" | |
| 109038 | 108595 | break; |
| 109039 | 108596 | case 297: /* raisetype ::= ROLLBACK */ |
| 109040 | -#line 1296 "parse.y" | |
| 109041 | 108597 | {yygotominor.yy4 = OE_Rollback;} |
| 109042 | -#line 3456 "parse.c" | |
| 109043 | 108598 | break; |
| 109044 | 108599 | case 299: /* raisetype ::= FAIL */ |
| 109045 | -#line 1298 "parse.y" | |
| 109046 | 108600 | {yygotominor.yy4 = OE_Fail;} |
| 109047 | -#line 3461 "parse.c" | |
| 109048 | 108601 | break; |
| 109049 | 108602 | case 300: /* cmd ::= DROP TRIGGER ifexists fullname */ |
| 109050 | -#line 1303 "parse.y" | |
| 109051 | 108603 | { |
| 109052 | 108604 | sqlite3DropTrigger(pParse,yymsp[0].minor.yy259,yymsp[-1].minor.yy4); |
| 109053 | 108605 | } |
| 109054 | -#line 3468 "parse.c" | |
| 109055 | 108606 | break; |
| 109056 | 108607 | case 301: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ |
| 109057 | -#line 1310 "parse.y" | |
| 109058 | 108608 | { |
| 109059 | 108609 | sqlite3Attach(pParse, yymsp[-3].minor.yy118.pExpr, yymsp[-1].minor.yy118.pExpr, yymsp[0].minor.yy314); |
| 109060 | 108610 | } |
| 109061 | -#line 3475 "parse.c" | |
| 109062 | 108611 | break; |
| 109063 | 108612 | case 302: /* cmd ::= DETACH database_kw_opt expr */ |
| 109064 | -#line 1313 "parse.y" | |
| 109065 | 108613 | { |
| 109066 | 108614 | sqlite3Detach(pParse, yymsp[0].minor.yy118.pExpr); |
| 109067 | 108615 | } |
| 109068 | -#line 3482 "parse.c" | |
| 109069 | 108616 | break; |
| 109070 | 108617 | case 307: /* cmd ::= REINDEX */ |
| 109071 | -#line 1328 "parse.y" | |
| 109072 | 108618 | {sqlite3Reindex(pParse, 0, 0);} |
| 109073 | -#line 3487 "parse.c" | |
| 109074 | 108619 | break; |
| 109075 | 108620 | case 308: /* cmd ::= REINDEX nm dbnm */ |
| 109076 | -#line 1329 "parse.y" | |
| 109077 | 108621 | {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} |
| 109078 | -#line 3492 "parse.c" | |
| 109079 | 108622 | break; |
| 109080 | 108623 | case 309: /* cmd ::= ANALYZE */ |
| 109081 | -#line 1334 "parse.y" | |
| 109082 | 108624 | {sqlite3Analyze(pParse, 0, 0);} |
| 109083 | -#line 3497 "parse.c" | |
| 109084 | 108625 | break; |
| 109085 | 108626 | case 310: /* cmd ::= ANALYZE nm dbnm */ |
| 109086 | -#line 1335 "parse.y" | |
| 109087 | 108627 | {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} |
| 109088 | -#line 3502 "parse.c" | |
| 109089 | 108628 | break; |
| 109090 | 108629 | case 311: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ |
| 109091 | -#line 1340 "parse.y" | |
| 109092 | 108630 | { |
| 109093 | 108631 | sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy259,&yymsp[0].minor.yy0); |
| 109094 | 108632 | } |
| 109095 | -#line 3509 "parse.c" | |
| 109096 | 108633 | break; |
| 109097 | 108634 | case 312: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */ |
| 109098 | -#line 1343 "parse.y" | |
| 109099 | 108635 | { |
| 109100 | 108636 | sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0); |
| 109101 | 108637 | } |
| 109102 | -#line 3516 "parse.c" | |
| 109103 | 108638 | break; |
| 109104 | 108639 | case 313: /* add_column_fullname ::= fullname */ |
| 109105 | -#line 1346 "parse.y" | |
| 109106 | 108640 | { |
| 109107 | 108641 | pParse->db->lookaside.bEnabled = 0; |
| 109108 | 108642 | sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy259); |
| 109109 | 108643 | } |
| 109110 | -#line 3524 "parse.c" | |
| 109111 | 108644 | break; |
| 109112 | 108645 | case 316: /* cmd ::= create_vtab */ |
| 109113 | -#line 1356 "parse.y" | |
| 109114 | 108646 | {sqlite3VtabFinishParse(pParse,0);} |
| 109115 | -#line 3529 "parse.c" | |
| 109116 | 108647 | break; |
| 109117 | 108648 | case 317: /* cmd ::= create_vtab LP vtabarglist RP */ |
| 109118 | -#line 1357 "parse.y" | |
| 109119 | 108649 | {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);} |
| 109120 | -#line 3534 "parse.c" | |
| 109121 | 108650 | break; |
| 109122 | 108651 | case 318: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */ |
| 109123 | -#line 1358 "parse.y" | |
| 109124 | 108652 | { |
| 109125 | 108653 | sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); |
| 109126 | 108654 | } |
| 109127 | -#line 3541 "parse.c" | |
| 109128 | 108655 | break; |
| 109129 | 108656 | case 321: /* vtabarg ::= */ |
| 109130 | -#line 1363 "parse.y" | |
| 109131 | 108657 | {sqlite3VtabArgInit(pParse);} |
| 109132 | -#line 3546 "parse.c" | |
| 109133 | 108658 | break; |
| 109134 | 108659 | case 323: /* vtabargtoken ::= ANY */ |
| 109135 | 108660 | case 324: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==324); |
| 109136 | 108661 | case 325: /* lp ::= LP */ yytestcase(yyruleno==325); |
| 109137 | -#line 1365 "parse.y" | |
| 109138 | 108662 | {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);} |
| 109139 | -#line 3553 "parse.c" | |
| 109140 | 108663 | break; |
| 109141 | 108664 | default: |
| 109142 | 108665 | /* (0) input ::= cmdlist */ yytestcase(yyruleno==0); |
| 109143 | 108666 | /* (1) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==1); |
| 109144 | 108667 | /* (2) cmdlist ::= ecmd */ yytestcase(yyruleno==2); |
| @@ -109236,17 +108759,15 @@ | ||
| 109236 | 108759 | int yymajor, /* The major type of the error token */ |
| 109237 | 108760 | YYMINORTYPE yyminor /* The minor type of the error token */ |
| 109238 | 108761 | ){ |
| 109239 | 108762 | sqlite3ParserARG_FETCH; |
| 109240 | 108763 | #define TOKEN (yyminor.yy0) |
| 109241 | -#line 32 "parse.y" | |
| 109242 | 108764 | |
| 109243 | 108765 | UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */ |
| 109244 | 108766 | assert( TOKEN.z[0] ); /* The tokenizer always gives us a token */ |
| 109245 | 108767 | sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN); |
| 109246 | 108768 | pParse->parseError = 1; |
| 109247 | -#line 3661 "parse.c" | |
| 109248 | 108769 | sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */ |
| 109249 | 108770 | } |
| 109250 | 108771 | |
| 109251 | 108772 | /* |
| 109252 | 108773 | ** The following is executed when the parser accepts |
| @@ -109436,11 +108957,10 @@ | ||
| 109436 | 108957 | return; |
| 109437 | 108958 | } |
| 109438 | 108959 | |
| 109439 | 108960 | /************** End of parse.c ***********************************************/ |
| 109440 | 108961 | /************** Begin file tokenize.c ****************************************/ |
| 109441 | -#line 1 "tsrc/tokenize.c" | |
| 109442 | 108962 | /* |
| 109443 | 108963 | ** 2001 September 15 |
| 109444 | 108964 | ** |
| 109445 | 108965 | ** The author disclaims copyright to this source code. In place of |
| 109446 | 108966 | ** a legal notice, here is a blessing: |
| @@ -109502,11 +109022,10 @@ | ||
| 109502 | 109022 | ** named keywordhash.h and then included into this source file by |
| 109503 | 109023 | ** the #include below. |
| 109504 | 109024 | */ |
| 109505 | 109025 | /************** Include keywordhash.h in the middle of tokenize.c ************/ |
| 109506 | 109026 | /************** Begin file keywordhash.h *************************************/ |
| 109507 | -#line 1 "tsrc/keywordhash.h" | |
| 109508 | 109027 | /***** This file contains automatically generated code ****** |
| 109509 | 109028 | ** |
| 109510 | 109029 | ** The code in this file has been automatically generated by |
| 109511 | 109030 | ** |
| 109512 | 109031 | ** sqlite/tool/mkkeywordhash.c |
| @@ -109776,11 +109295,10 @@ | ||
| 109776 | 109295 | } |
| 109777 | 109296 | #define SQLITE_N_KEYWORD 121 |
| 109778 | 109297 | |
| 109779 | 109298 | /************** End of keywordhash.h *****************************************/ |
| 109780 | 109299 | /************** Continuing where we left off in tokenize.c *******************/ |
| 109781 | -#line 66 "tsrc/tokenize.c" | |
| 109782 | 109300 | |
| 109783 | 109301 | |
| 109784 | 109302 | /* |
| 109785 | 109303 | ** If X is a character that can be used in an identifier then |
| 109786 | 109304 | ** IdChar(X) will be true. Otherwise it is false. |
| @@ -110241,11 +109759,10 @@ | ||
| 110241 | 109759 | return nErr; |
| 110242 | 109760 | } |
| 110243 | 109761 | |
| 110244 | 109762 | /************** End of tokenize.c ********************************************/ |
| 110245 | 109763 | /************** Begin file complete.c ****************************************/ |
| 110246 | -#line 1 "tsrc/complete.c" | |
| 110247 | 109764 | /* |
| 110248 | 109765 | ** 2001 September 15 |
| 110249 | 109766 | ** |
| 110250 | 109767 | ** The author disclaims copyright to this source code. In place of |
| 110251 | 109768 | ** a legal notice, here is a blessing: |
| @@ -110527,11 +110044,10 @@ | ||
| 110527 | 110044 | #endif /* SQLITE_OMIT_UTF16 */ |
| 110528 | 110045 | #endif /* SQLITE_OMIT_COMPLETE */ |
| 110529 | 110046 | |
| 110530 | 110047 | /************** End of complete.c ********************************************/ |
| 110531 | 110048 | /************** Begin file main.c ********************************************/ |
| 110532 | -#line 1 "tsrc/main.c" | |
| 110533 | 110049 | /* |
| 110534 | 110050 | ** 2001 September 15 |
| 110535 | 110051 | ** |
| 110536 | 110052 | ** The author disclaims copyright to this source code. In place of |
| 110537 | 110053 | ** a legal notice, here is a blessing: |
| @@ -110548,11 +110064,10 @@ | ||
| 110548 | 110064 | */ |
| 110549 | 110065 | |
| 110550 | 110066 | #ifdef SQLITE_ENABLE_FTS3 |
| 110551 | 110067 | /************** Include fts3.h in the middle of main.c ***********************/ |
| 110552 | 110068 | /************** Begin file fts3.h ********************************************/ |
| 110553 | -#line 1 "tsrc/fts3.h" | |
| 110554 | 110069 | /* |
| 110555 | 110070 | ** 2006 Oct 10 |
| 110556 | 110071 | ** |
| 110557 | 110072 | ** The author disclaims copyright to this source code. In place of |
| 110558 | 110073 | ** a legal notice, here is a blessing: |
| @@ -110577,16 +110092,14 @@ | ||
| 110577 | 110092 | } /* extern "C" */ |
| 110578 | 110093 | #endif /* __cplusplus */ |
| 110579 | 110094 | |
| 110580 | 110095 | /************** End of fts3.h ************************************************/ |
| 110581 | 110096 | /************** Continuing where we left off in main.c ***********************/ |
| 110582 | -#line 21 "tsrc/main.c" | |
| 110583 | 110097 | #endif |
| 110584 | 110098 | #ifdef SQLITE_ENABLE_RTREE |
| 110585 | 110099 | /************** Include rtree.h in the middle of main.c **********************/ |
| 110586 | 110100 | /************** Begin file rtree.h *******************************************/ |
| 110587 | -#line 1 "tsrc/rtree.h" | |
| 110588 | 110101 | /* |
| 110589 | 110102 | ** 2008 May 26 |
| 110590 | 110103 | ** |
| 110591 | 110104 | ** The author disclaims copyright to this source code. In place of |
| 110592 | 110105 | ** a legal notice, here is a blessing: |
| @@ -110611,16 +110124,14 @@ | ||
| 110611 | 110124 | } /* extern "C" */ |
| 110612 | 110125 | #endif /* __cplusplus */ |
| 110613 | 110126 | |
| 110614 | 110127 | /************** End of rtree.h ***********************************************/ |
| 110615 | 110128 | /************** Continuing where we left off in main.c ***********************/ |
| 110616 | -#line 24 "tsrc/main.c" | |
| 110617 | 110129 | #endif |
| 110618 | 110130 | #ifdef SQLITE_ENABLE_ICU |
| 110619 | 110131 | /************** Include sqliteicu.h in the middle of main.c ******************/ |
| 110620 | 110132 | /************** Begin file sqliteicu.h ***************************************/ |
| 110621 | -#line 1 "tsrc/sqliteicu.h" | |
| 110622 | 110133 | /* |
| 110623 | 110134 | ** 2008 May 26 |
| 110624 | 110135 | ** |
| 110625 | 110136 | ** The author disclaims copyright to this source code. In place of |
| 110626 | 110137 | ** a legal notice, here is a blessing: |
| @@ -110646,11 +110157,10 @@ | ||
| 110646 | 110157 | #endif /* __cplusplus */ |
| 110647 | 110158 | |
| 110648 | 110159 | |
| 110649 | 110160 | /************** End of sqliteicu.h *******************************************/ |
| 110650 | 110161 | /************** Continuing where we left off in main.c ***********************/ |
| 110651 | -#line 27 "tsrc/main.c" | |
| 110652 | 110162 | #endif |
| 110653 | 110163 | |
| 110654 | 110164 | #ifndef SQLITE_AMALGAMATION |
| 110655 | 110165 | /* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant |
| 110656 | 110166 | ** contains the text of SQLITE_VERSION macro. |
| @@ -113577,11 +113087,10 @@ | ||
| 113577 | 113087 | return 0; |
| 113578 | 113088 | } |
| 113579 | 113089 | |
| 113580 | 113090 | /************** End of main.c ************************************************/ |
| 113581 | 113091 | /************** Begin file notify.c ******************************************/ |
| 113582 | -#line 1 "tsrc/notify.c" | |
| 113583 | 113092 | /* |
| 113584 | 113093 | ** 2009 March 3 |
| 113585 | 113094 | ** |
| 113586 | 113095 | ** The author disclaims copyright to this source code. In place of |
| 113587 | 113096 | ** a legal notice, here is a blessing: |
| @@ -113911,11 +113420,10 @@ | ||
| 113911 | 113420 | } |
| 113912 | 113421 | #endif |
| 113913 | 113422 | |
| 113914 | 113423 | /************** End of notify.c **********************************************/ |
| 113915 | 113424 | /************** Begin file fts3.c ********************************************/ |
| 113916 | -#line 1 "tsrc/fts3.c" | |
| 113917 | 113425 | /* |
| 113918 | 113426 | ** 2006 Oct 10 |
| 113919 | 113427 | ** |
| 113920 | 113428 | ** The author disclaims copyright to this source code. In place of |
| 113921 | 113429 | ** a legal notice, here is a blessing: |
| @@ -114208,11 +113716,10 @@ | ||
| 114208 | 113716 | ** into a single segment. |
| 114209 | 113717 | */ |
| 114210 | 113718 | |
| 114211 | 113719 | /************** Include fts3Int.h in the middle of fts3.c ********************/ |
| 114212 | 113720 | /************** Begin file fts3Int.h *****************************************/ |
| 114213 | -#line 1 "tsrc/fts3Int.h" | |
| 114214 | 113721 | /* |
| 114215 | 113722 | ** 2009 Nov 12 |
| 114216 | 113723 | ** |
| 114217 | 113724 | ** The author disclaims copyright to this source code. In place of |
| 114218 | 113725 | ** a legal notice, here is a blessing: |
| @@ -114247,11 +113754,10 @@ | ||
| 114247 | 113754 | SQLITE_API extern const sqlite3_api_routines *sqlite3_api; |
| 114248 | 113755 | #endif |
| 114249 | 113756 | |
| 114250 | 113757 | /************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/ |
| 114251 | 113758 | /************** Begin file fts3_tokenizer.h **********************************/ |
| 114252 | -#line 1 "tsrc/fts3_tokenizer.h" | |
| 114253 | 113759 | /* |
| 114254 | 113760 | ** 2006 July 10 |
| 114255 | 113761 | ** |
| 114256 | 113762 | ** The author disclaims copyright to this source code. |
| 114257 | 113763 | ** |
| @@ -114402,14 +113908,12 @@ | ||
| 114402 | 113908 | |
| 114403 | 113909 | #endif /* _FTS3_TOKENIZER_H_ */ |
| 114404 | 113910 | |
| 114405 | 113911 | /************** End of fts3_tokenizer.h **************************************/ |
| 114406 | 113912 | /************** Continuing where we left off in fts3Int.h ********************/ |
| 114407 | -#line 40 "tsrc/fts3Int.h" | |
| 114408 | 113913 | /************** Include fts3_hash.h in the middle of fts3Int.h ***************/ |
| 114409 | 113914 | /************** Begin file fts3_hash.h ***************************************/ |
| 114410 | -#line 1 "tsrc/fts3_hash.h" | |
| 114411 | 113915 | /* |
| 114412 | 113916 | ** 2001 September 22 |
| 114413 | 113917 | ** |
| 114414 | 113918 | ** The author disclaims copyright to this source code. In place of |
| 114415 | 113919 | ** a legal notice, here is a blessing: |
| @@ -114521,11 +114025,10 @@ | ||
| 114521 | 114025 | |
| 114522 | 114026 | #endif /* _FTS3_HASH_H_ */ |
| 114523 | 114027 | |
| 114524 | 114028 | /************** End of fts3_hash.h *******************************************/ |
| 114525 | 114029 | /************** Continuing where we left off in fts3Int.h ********************/ |
| 114526 | -#line 41 "tsrc/fts3Int.h" | |
| 114527 | 114030 | |
| 114528 | 114031 | /* |
| 114529 | 114032 | ** This constant controls how often segments are merged. Once there are |
| 114530 | 114033 | ** FTS3_MERGE_COUNT segments of level N, they are merged into a single |
| 114531 | 114034 | ** segment of level N+1. |
| @@ -114998,11 +114501,10 @@ | ||
| 114998 | 114501 | #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */ |
| 114999 | 114502 | #endif /* _FTSINT_H */ |
| 115000 | 114503 | |
| 115001 | 114504 | /************** End of fts3Int.h *********************************************/ |
| 115002 | 114505 | /************** Continuing where we left off in fts3.c ***********************/ |
| 115003 | -#line 296 "tsrc/fts3.c" | |
| 115004 | 114506 | #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) |
| 115005 | 114507 | |
| 115006 | 114508 | #if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE) |
| 115007 | 114509 | # define SQLITE_CORE 1 |
| 115008 | 114510 | #endif |
| @@ -119548,11 +119050,10 @@ | ||
| 119548 | 119050 | |
| 119549 | 119051 | #endif |
| 119550 | 119052 | |
| 119551 | 119053 | /************** End of fts3.c ************************************************/ |
| 119552 | 119054 | /************** Begin file fts3_aux.c ****************************************/ |
| 119553 | -#line 1 "tsrc/fts3_aux.c" | |
| 119554 | 119055 | /* |
| 119555 | 119056 | ** 2011 Jan 27 |
| 119556 | 119057 | ** |
| 119557 | 119058 | ** The author disclaims copyright to this source code. In place of |
| 119558 | 119059 | ** a legal notice, here is a blessing: |
| @@ -120025,11 +119526,10 @@ | ||
| 120025 | 119526 | |
| 120026 | 119527 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 120027 | 119528 | |
| 120028 | 119529 | /************** End of fts3_aux.c ********************************************/ |
| 120029 | 119530 | /************** Begin file fts3_expr.c ***************************************/ |
| 120030 | -#line 1 "tsrc/fts3_expr.c" | |
| 120031 | 119531 | /* |
| 120032 | 119532 | ** 2008 Nov 28 |
| 120033 | 119533 | ** |
| 120034 | 119534 | ** The author disclaims copyright to this source code. In place of |
| 120035 | 119535 | ** a legal notice, here is a blessing: |
| @@ -120992,11 +120492,10 @@ | ||
| 120992 | 120492 | #endif |
| 120993 | 120493 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 120994 | 120494 | |
| 120995 | 120495 | /************** End of fts3_expr.c *******************************************/ |
| 120996 | 120496 | /************** Begin file fts3_hash.c ***************************************/ |
| 120997 | -#line 1 "tsrc/fts3_hash.c" | |
| 120998 | 120497 | /* |
| 120999 | 120498 | ** 2001 September 22 |
| 121000 | 120499 | ** |
| 121001 | 120500 | ** The author disclaims copyright to this source code. In place of |
| 121002 | 120501 | ** a legal notice, here is a blessing: |
| @@ -121377,11 +120876,10 @@ | ||
| 121377 | 120876 | |
| 121378 | 120877 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 121379 | 120878 | |
| 121380 | 120879 | /************** End of fts3_hash.c *******************************************/ |
| 121381 | 120880 | /************** Begin file fts3_porter.c *************************************/ |
| 121382 | -#line 1 "tsrc/fts3_porter.c" | |
| 121383 | 120881 | /* |
| 121384 | 120882 | ** 2006 September 30 |
| 121385 | 120883 | ** |
| 121386 | 120884 | ** The author disclaims copyright to this source code. In place of |
| 121387 | 120885 | ** a legal notice, here is a blessing: |
| @@ -122024,11 +121522,10 @@ | ||
| 122024 | 121522 | |
| 122025 | 121523 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122026 | 121524 | |
| 122027 | 121525 | /************** End of fts3_porter.c *****************************************/ |
| 122028 | 121526 | /************** Begin file fts3_tokenizer.c **********************************/ |
| 122029 | -#line 1 "tsrc/fts3_tokenizer.c" | |
| 122030 | 121527 | /* |
| 122031 | 121528 | ** 2007 June 22 |
| 122032 | 121529 | ** |
| 122033 | 121530 | ** The author disclaims copyright to this source code. In place of |
| 122034 | 121531 | ** a legal notice, here is a blessing: |
| @@ -122516,11 +122013,10 @@ | ||
| 122516 | 122013 | |
| 122517 | 122014 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122518 | 122015 | |
| 122519 | 122016 | /************** End of fts3_tokenizer.c **************************************/ |
| 122520 | 122017 | /************** Begin file fts3_tokenizer1.c *********************************/ |
| 122521 | -#line 1 "tsrc/fts3_tokenizer1.c" | |
| 122522 | 122018 | /* |
| 122523 | 122019 | ** 2006 Oct 10 |
| 122524 | 122020 | ** |
| 122525 | 122021 | ** The author disclaims copyright to this source code. In place of |
| 122526 | 122022 | ** a legal notice, here is a blessing: |
| @@ -122751,11 +122247,10 @@ | ||
| 122751 | 122247 | |
| 122752 | 122248 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122753 | 122249 | |
| 122754 | 122250 | /************** End of fts3_tokenizer1.c *************************************/ |
| 122755 | 122251 | /************** Begin file fts3_write.c **************************************/ |
| 122756 | -#line 1 "tsrc/fts3_write.c" | |
| 122757 | 122252 | /* |
| 122758 | 122253 | ** 2009 Oct 23 |
| 122759 | 122254 | ** |
| 122760 | 122255 | ** The author disclaims copyright to this source code. In place of |
| 122761 | 122256 | ** a legal notice, here is a blessing: |
| @@ -126022,11 +125517,10 @@ | ||
| 126022 | 125517 | |
| 126023 | 125518 | #endif |
| 126024 | 125519 | |
| 126025 | 125520 | /************** End of fts3_write.c ******************************************/ |
| 126026 | 125521 | /************** Begin file fts3_snippet.c ************************************/ |
| 126027 | -#line 1 "tsrc/fts3_snippet.c" | |
| 126028 | 125522 | /* |
| 126029 | 125523 | ** 2009 Oct 23 |
| 126030 | 125524 | ** |
| 126031 | 125525 | ** The author disclaims copyright to this source code. In place of |
| 126032 | 125526 | ** a legal notice, here is a blessing: |
| @@ -127524,11 +127018,10 @@ | ||
| 127524 | 127018 | |
| 127525 | 127019 | #endif |
| 127526 | 127020 | |
| 127527 | 127021 | /************** End of fts3_snippet.c ****************************************/ |
| 127528 | 127022 | /************** Begin file rtree.c *******************************************/ |
| 127529 | -#line 1 "tsrc/rtree.c" | |
| 127530 | 127023 | /* |
| 127531 | 127024 | ** 2001 September 15 |
| 127532 | 127025 | ** |
| 127533 | 127026 | ** The author disclaims copyright to this source code. In place of |
| 127534 | 127027 | ** a legal notice, here is a blessing: |
| @@ -130806,11 +130299,10 @@ | ||
| 130806 | 130299 | |
| 130807 | 130300 | #endif |
| 130808 | 130301 | |
| 130809 | 130302 | /************** End of rtree.c ***********************************************/ |
| 130810 | 130303 | /************** Begin file icu.c *********************************************/ |
| 130811 | -#line 1 "tsrc/icu.c" | |
| 130812 | 130304 | /* |
| 130813 | 130305 | ** 2007 May 6 |
| 130814 | 130306 | ** |
| 130815 | 130307 | ** The author disclaims copyright to this source code. In place of |
| 130816 | 130308 | ** a legal notice, here is a blessing: |
| @@ -131309,11 +130801,10 @@ | ||
| 131309 | 130801 | |
| 131310 | 130802 | #endif |
| 131311 | 130803 | |
| 131312 | 130804 | /************** End of icu.c *************************************************/ |
| 131313 | 130805 | /************** Begin file fts3_icu.c ****************************************/ |
| 131314 | -#line 1 "tsrc/fts3_icu.c" | |
| 131315 | 130806 | /* |
| 131316 | 130807 | ** 2007 June 22 |
| 131317 | 130808 | ** |
| 131318 | 130809 | ** The author disclaims copyright to this source code. In place of |
| 131319 | 130810 | ** a legal notice, here is a blessing: |
| 131320 | 130811 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -24,11 +24,10 @@ | |
| 24 | #endif |
| 25 | #ifndef SQLITE_API |
| 26 | # define SQLITE_API |
| 27 | #endif |
| 28 | /************** Begin file sqliteInt.h ***************************************/ |
| 29 | #line 1 "tsrc/sqliteInt.h" |
| 30 | /* |
| 31 | ** 2001 September 15 |
| 32 | ** |
| 33 | ** The author disclaims copyright to this source code. In place of |
| 34 | ** a legal notice, here is a blessing: |
| @@ -79,11 +78,10 @@ | |
| 79 | #include "config.h" |
| 80 | #endif |
| 81 | |
| 82 | /************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/ |
| 83 | /************** Begin file sqliteLimit.h *************************************/ |
| 84 | #line 1 "tsrc/sqliteLimit.h" |
| 85 | /* |
| 86 | ** 2007 May 7 |
| 87 | ** |
| 88 | ** The author disclaims copyright to this source code. In place of |
| 89 | ** a legal notice, here is a blessing: |
| @@ -291,11 +289,10 @@ | |
| 291 | # define SQLITE_MAX_TRIGGER_DEPTH 1000 |
| 292 | #endif |
| 293 | |
| 294 | /************** End of sqliteLimit.h *****************************************/ |
| 295 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 296 | #line 54 "tsrc/sqliteInt.h" |
| 297 | |
| 298 | /* Disable nuisance warnings on Borland compilers */ |
| 299 | #if defined(__BORLANDC__) |
| 300 | #pragma warn -rch /* unreachable code */ |
| 301 | #pragma warn -ccc /* Condition is always true or false */ |
| @@ -548,11 +545,10 @@ | |
| 548 | # define unlikely(X) !!(X) |
| 549 | #endif |
| 550 | |
| 551 | /************** Include sqlite3.h in the middle of sqliteInt.h ***************/ |
| 552 | /************** Begin file sqlite3.h *****************************************/ |
| 553 | #line 1 "tsrc/sqlite3.h" |
| 554 | /* |
| 555 | ** 2001 September 15 |
| 556 | ** |
| 557 | ** The author disclaims copyright to this source code. In place of |
| 558 | ** a legal notice, here is a blessing: |
| @@ -660,11 +656,11 @@ | |
| 660 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 661 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 662 | */ |
| 663 | #define SQLITE_VERSION "3.7.8" |
| 664 | #define SQLITE_VERSION_NUMBER 3007008 |
| 665 | #define SQLITE_SOURCE_ID "2011-09-14 13:41:40 a1f3aeeb0988c848d40ce8f6da6e902935a997e2" |
| 666 | |
| 667 | /* |
| 668 | ** CAPI3REF: Run-Time Library Version Numbers |
| 669 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 670 | ** |
| @@ -7309,14 +7305,12 @@ | |
| 7309 | #endif /* ifndef _SQLITE3RTREE_H_ */ |
| 7310 | |
| 7311 | |
| 7312 | /************** End of sqlite3.h *********************************************/ |
| 7313 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 7314 | #line 309 "tsrc/sqliteInt.h" |
| 7315 | /************** Include hash.h in the middle of sqliteInt.h ******************/ |
| 7316 | /************** Begin file hash.h ********************************************/ |
| 7317 | #line 1 "tsrc/hash.h" |
| 7318 | /* |
| 7319 | ** 2001 September 22 |
| 7320 | ** |
| 7321 | ** The author disclaims copyright to this source code. In place of |
| 7322 | ** a legal notice, here is a blessing: |
| @@ -7412,14 +7406,12 @@ | |
| 7412 | |
| 7413 | #endif /* _SQLITE_HASH_H_ */ |
| 7414 | |
| 7415 | /************** End of hash.h ************************************************/ |
| 7416 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 7417 | #line 310 "tsrc/sqliteInt.h" |
| 7418 | /************** Include parse.h in the middle of sqliteInt.h *****************/ |
| 7419 | /************** Begin file parse.h *******************************************/ |
| 7420 | #line 1 "tsrc/parse.h" |
| 7421 | #define TK_SEMI 1 |
| 7422 | #define TK_EXPLAIN 2 |
| 7423 | #define TK_QUERY 3 |
| 7424 | #define TK_PLAN 4 |
| 7425 | #define TK_BEGIN 5 |
| @@ -7576,11 +7568,10 @@ | |
| 7576 | #define TK_UMINUS 156 |
| 7577 | #define TK_UPLUS 157 |
| 7578 | |
| 7579 | /************** End of parse.h ***********************************************/ |
| 7580 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 7581 | #line 311 "tsrc/sqliteInt.h" |
| 7582 | #include <stdio.h> |
| 7583 | #include <stdlib.h> |
| 7584 | #include <string.h> |
| 7585 | #include <assert.h> |
| 7586 | #include <stddef.h> |
| @@ -7920,11 +7911,10 @@ | |
| 7920 | ** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque |
| 7921 | ** pointer types (i.e. FuncDef) defined above. |
| 7922 | */ |
| 7923 | /************** Include btree.h in the middle of sqliteInt.h *****************/ |
| 7924 | /************** Begin file btree.h *******************************************/ |
| 7925 | #line 1 "tsrc/btree.h" |
| 7926 | /* |
| 7927 | ** 2001 September 15 |
| 7928 | ** |
| 7929 | ** The author disclaims copyright to this source code. In place of |
| 7930 | ** a legal notice, here is a blessing: |
| @@ -8165,14 +8155,12 @@ | |
| 8165 | |
| 8166 | #endif /* _BTREE_H_ */ |
| 8167 | |
| 8168 | /************** End of btree.h ***********************************************/ |
| 8169 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8170 | #line 653 "tsrc/sqliteInt.h" |
| 8171 | /************** Include vdbe.h in the middle of sqliteInt.h ******************/ |
| 8172 | /************** Begin file vdbe.h ********************************************/ |
| 8173 | #line 1 "tsrc/vdbe.h" |
| 8174 | /* |
| 8175 | ** 2001 September 15 |
| 8176 | ** |
| 8177 | ** The author disclaims copyright to this source code. In place of |
| 8178 | ** a legal notice, here is a blessing: |
| @@ -8333,11 +8321,10 @@ | |
| 8333 | ** The makefile scans the vdbe.c source file and creates the "opcodes.h" |
| 8334 | ** header file that defines a number for each opcode used by the VDBE. |
| 8335 | */ |
| 8336 | /************** Include opcodes.h in the middle of vdbe.h ********************/ |
| 8337 | /************** Begin file opcodes.h *****************************************/ |
| 8338 | #line 1 "tsrc/opcodes.h" |
| 8339 | /* Automatically generated. Do not edit */ |
| 8340 | /* See the mkopcodeh.awk script for details */ |
| 8341 | #define OP_Goto 1 |
| 8342 | #define OP_Gosub 2 |
| 8343 | #define OP_Return 3 |
| @@ -8387,108 +8374,109 @@ | |
| 8387 | #define OP_Jump 25 |
| 8388 | #define OP_And 69 /* same as TK_AND */ |
| 8389 | #define OP_Or 68 /* same as TK_OR */ |
| 8390 | #define OP_Not 19 /* same as TK_NOT */ |
| 8391 | #define OP_BitNot 93 /* same as TK_BITNOT */ |
| 8392 | #define OP_If 26 |
| 8393 | #define OP_IfNot 27 |
| 8394 | #define OP_IsNull 73 /* same as TK_ISNULL */ |
| 8395 | #define OP_NotNull 74 /* same as TK_NOTNULL */ |
| 8396 | #define OP_Column 28 |
| 8397 | #define OP_Affinity 29 |
| 8398 | #define OP_MakeRecord 30 |
| 8399 | #define OP_Count 31 |
| 8400 | #define OP_Savepoint 32 |
| 8401 | #define OP_AutoCommit 33 |
| 8402 | #define OP_Transaction 34 |
| 8403 | #define OP_ReadCookie 35 |
| 8404 | #define OP_SetCookie 36 |
| 8405 | #define OP_VerifyCookie 37 |
| 8406 | #define OP_OpenRead 38 |
| 8407 | #define OP_OpenWrite 39 |
| 8408 | #define OP_OpenAutoindex 40 |
| 8409 | #define OP_OpenEphemeral 41 |
| 8410 | #define OP_SorterOpen 42 |
| 8411 | #define OP_OpenPseudo 43 |
| 8412 | #define OP_Close 44 |
| 8413 | #define OP_SeekLt 45 |
| 8414 | #define OP_SeekLe 46 |
| 8415 | #define OP_SeekGe 47 |
| 8416 | #define OP_SeekGt 48 |
| 8417 | #define OP_Seek 49 |
| 8418 | #define OP_NotFound 50 |
| 8419 | #define OP_Found 51 |
| 8420 | #define OP_IsUnique 52 |
| 8421 | #define OP_NotExists 53 |
| 8422 | #define OP_Sequence 54 |
| 8423 | #define OP_NewRowid 55 |
| 8424 | #define OP_Insert 56 |
| 8425 | #define OP_InsertInt 57 |
| 8426 | #define OP_Delete 58 |
| 8427 | #define OP_ResetCount 59 |
| 8428 | #define OP_SorterCompare 60 |
| 8429 | #define OP_SorterData 61 |
| 8430 | #define OP_RowKey 62 |
| 8431 | #define OP_RowData 63 |
| 8432 | #define OP_Rowid 64 |
| 8433 | #define OP_NullRow 65 |
| 8434 | #define OP_Last 66 |
| 8435 | #define OP_SorterSort 67 |
| 8436 | #define OP_Sort 70 |
| 8437 | #define OP_Rewind 71 |
| 8438 | #define OP_SorterNext 72 |
| 8439 | #define OP_Prev 81 |
| 8440 | #define OP_Next 92 |
| 8441 | #define OP_SorterInsert 95 |
| 8442 | #define OP_IdxInsert 96 |
| 8443 | #define OP_IdxDelete 97 |
| 8444 | #define OP_IdxRowid 98 |
| 8445 | #define OP_IdxLT 99 |
| 8446 | #define OP_IdxGE 100 |
| 8447 | #define OP_Destroy 101 |
| 8448 | #define OP_Clear 102 |
| 8449 | #define OP_CreateIndex 103 |
| 8450 | #define OP_CreateTable 104 |
| 8451 | #define OP_ParseSchema 105 |
| 8452 | #define OP_LoadAnalysis 106 |
| 8453 | #define OP_DropTable 107 |
| 8454 | #define OP_DropIndex 108 |
| 8455 | #define OP_DropTrigger 109 |
| 8456 | #define OP_IntegrityCk 110 |
| 8457 | #define OP_RowSetAdd 111 |
| 8458 | #define OP_RowSetRead 112 |
| 8459 | #define OP_RowSetTest 113 |
| 8460 | #define OP_Program 114 |
| 8461 | #define OP_Param 115 |
| 8462 | #define OP_FkCounter 116 |
| 8463 | #define OP_FkIfZero 117 |
| 8464 | #define OP_MemMax 118 |
| 8465 | #define OP_IfPos 119 |
| 8466 | #define OP_IfNeg 120 |
| 8467 | #define OP_IfZero 121 |
| 8468 | #define OP_AggStep 122 |
| 8469 | #define OP_AggFinal 123 |
| 8470 | #define OP_Checkpoint 124 |
| 8471 | #define OP_JournalMode 125 |
| 8472 | #define OP_Vacuum 126 |
| 8473 | #define OP_IncrVacuum 127 |
| 8474 | #define OP_Expire 128 |
| 8475 | #define OP_TableLock 129 |
| 8476 | #define OP_VBegin 131 |
| 8477 | #define OP_VCreate 132 |
| 8478 | #define OP_VDestroy 133 |
| 8479 | #define OP_VOpen 134 |
| 8480 | #define OP_VFilter 135 |
| 8481 | #define OP_VColumn 136 |
| 8482 | #define OP_VNext 137 |
| 8483 | #define OP_VRename 138 |
| 8484 | #define OP_VUpdate 139 |
| 8485 | #define OP_Pagecount 140 |
| 8486 | #define OP_MaxPgcnt 146 |
| 8487 | #define OP_Trace 147 |
| 8488 | #define OP_Noop 148 |
| 8489 | #define OP_Explain 149 |
| 8490 | |
| 8491 | |
| 8492 | /* Properties such as "out2" or "jump" that are specified in |
| 8493 | ** comments following the "case" for each opcode in the vdbe.c |
| 8494 | ** are encoded into bitvectors as follows: |
| @@ -8502,30 +8490,29 @@ | |
| 8502 | #define OPFLG_OUT3 0x0040 /* out3: P3 is an output */ |
| 8503 | #define OPFLG_INITIALIZER {\ |
| 8504 | /* 0 */ 0x00, 0x01, 0x05, 0x04, 0x04, 0x10, 0x00, 0x02,\ |
| 8505 | /* 8 */ 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x24, 0x24,\ |
| 8506 | /* 16 */ 0x00, 0x00, 0x00, 0x24, 0x04, 0x05, 0x04, 0x00,\ |
| 8507 | /* 24 */ 0x00, 0x01, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02,\ |
| 8508 | /* 32 */ 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00,\ |
| 8509 | /* 40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11,\ |
| 8510 | /* 48 */ 0x11, 0x08, 0x11, 0x11, 0x11, 0x11, 0x02, 0x02,\ |
| 8511 | /* 56 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ |
| 8512 | /* 64 */ 0x02, 0x00, 0x01, 0x01, 0x4c, 0x4c, 0x01, 0x01,\ |
| 8513 | /* 72 */ 0x01, 0x05, 0x05, 0x15, 0x15, 0x15, 0x15, 0x15,\ |
| 8514 | /* 80 */ 0x15, 0x01, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c,\ |
| 8515 | /* 88 */ 0x4c, 0x4c, 0x4c, 0x4c, 0x01, 0x24, 0x02, 0x08,\ |
| 8516 | /* 96 */ 0x08, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00, 0x02,\ |
| 8517 | /* 104 */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,\ |
| 8518 | /* 112 */ 0x45, 0x15, 0x01, 0x02, 0x00, 0x01, 0x08, 0x05,\ |
| 8519 | /* 120 */ 0x05, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01,\ |
| 8520 | /* 128 */ 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01,\ |
| 8521 | /* 136 */ 0x00, 0x01, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04,\ |
| 8522 | /* 144 */ 0x04, 0x04, 0x02, 0x00, 0x00, 0x00,} |
| 8523 | |
| 8524 | /************** End of opcodes.h *********************************************/ |
| 8525 | /************** Continuing where we left off in vdbe.h ***********************/ |
| 8526 | #line 164 "tsrc/vdbe.h" |
| 8527 | |
| 8528 | /* |
| 8529 | ** Prototypes for the VDBE interface. See comments on the implementation |
| 8530 | ** for a description of what each of these routines does. |
| 8531 | */ |
| @@ -8541,11 +8528,11 @@ | |
| 8541 | SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1); |
| 8542 | SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2); |
| 8543 | SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3); |
| 8544 | SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5); |
| 8545 | SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr); |
| 8546 | SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr, int N); |
| 8547 | SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N); |
| 8548 | SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int); |
| 8549 | SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int); |
| 8550 | SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*); |
| 8551 | SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*); |
| @@ -8596,14 +8583,12 @@ | |
| 8596 | |
| 8597 | #endif |
| 8598 | |
| 8599 | /************** End of vdbe.h ************************************************/ |
| 8600 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8601 | #line 654 "tsrc/sqliteInt.h" |
| 8602 | /************** Include pager.h in the middle of sqliteInt.h *****************/ |
| 8603 | /************** Begin file pager.h *******************************************/ |
| 8604 | #line 1 "tsrc/pager.h" |
| 8605 | /* |
| 8606 | ** 2001 September 15 |
| 8607 | ** |
| 8608 | ** The author disclaims copyright to this source code. In place of |
| 8609 | ** a legal notice, here is a blessing: |
| @@ -8785,14 +8770,12 @@ | |
| 8785 | |
| 8786 | #endif /* _PAGER_H_ */ |
| 8787 | |
| 8788 | /************** End of pager.h ***********************************************/ |
| 8789 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8790 | #line 655 "tsrc/sqliteInt.h" |
| 8791 | /************** Include pcache.h in the middle of sqliteInt.h ****************/ |
| 8792 | /************** Begin file pcache.h ******************************************/ |
| 8793 | #line 1 "tsrc/pcache.h" |
| 8794 | /* |
| 8795 | ** 2008 August 05 |
| 8796 | ** |
| 8797 | ** The author disclaims copyright to this source code. In place of |
| 8798 | ** a legal notice, here is a blessing: |
| @@ -8947,15 +8930,13 @@ | |
| 8947 | |
| 8948 | #endif /* _PCACHE_H_ */ |
| 8949 | |
| 8950 | /************** End of pcache.h **********************************************/ |
| 8951 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8952 | #line 656 "tsrc/sqliteInt.h" |
| 8953 | |
| 8954 | /************** Include os.h in the middle of sqliteInt.h ********************/ |
| 8955 | /************** Begin file os.h **********************************************/ |
| 8956 | #line 1 "tsrc/os.h" |
| 8957 | /* |
| 8958 | ** 2001 September 16 |
| 8959 | ** |
| 8960 | ** The author disclaims copyright to this source code. In place of |
| 8961 | ** a legal notice, here is a blessing: |
| @@ -9234,14 +9215,12 @@ | |
| 9234 | |
| 9235 | #endif /* _SQLITE_OS_H_ */ |
| 9236 | |
| 9237 | /************** End of os.h **************************************************/ |
| 9238 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 9239 | #line 658 "tsrc/sqliteInt.h" |
| 9240 | /************** Include mutex.h in the middle of sqliteInt.h *****************/ |
| 9241 | /************** Begin file mutex.h *******************************************/ |
| 9242 | #line 1 "tsrc/mutex.h" |
| 9243 | /* |
| 9244 | ** 2007 August 28 |
| 9245 | ** |
| 9246 | ** The author disclaims copyright to this source code. In place of |
| 9247 | ** a legal notice, here is a blessing: |
| @@ -9312,11 +9291,10 @@ | |
| 9312 | #define sqlite3MutexEnd() |
| 9313 | #endif /* defined(SQLITE_MUTEX_OMIT) */ |
| 9314 | |
| 9315 | /************** End of mutex.h ***********************************************/ |
| 9316 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 9317 | #line 659 "tsrc/sqliteInt.h" |
| 9318 | |
| 9319 | |
| 9320 | /* |
| 9321 | ** Each database file to be accessed by the system is an instance |
| 9322 | ** of the following structure. There are normally two of these structures |
| @@ -10509,11 +10487,12 @@ | |
| 10509 | char *zDatabase; /* Name of database holding this table */ |
| 10510 | char *zName; /* Name of the table */ |
| 10511 | char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */ |
| 10512 | Table *pTab; /* An SQL table corresponding to zName */ |
| 10513 | Select *pSelect; /* A SELECT statement used in place of a table name */ |
| 10514 | u8 isPopulated; /* Temporary table associated with SELECT is populated */ |
| 10515 | u8 jointype; /* Type of join between this able and the previous */ |
| 10516 | u8 notIndexed; /* True if there is a NOT INDEXED clause */ |
| 10517 | u8 isCorrelated; /* True if sub-query is correlated */ |
| 10518 | #ifndef SQLITE_OMIT_EXPLAIN |
| 10519 | u8 iSelectId; /* If pSelect!=0, the id of the sub-select in EQP */ |
| @@ -11915,11 +11894,10 @@ | |
| 11915 | |
| 11916 | #endif /* _SQLITEINT_H_ */ |
| 11917 | |
| 11918 | /************** End of sqliteInt.h *******************************************/ |
| 11919 | /************** Begin file global.c ******************************************/ |
| 11920 | #line 1 "tsrc/global.c" |
| 11921 | /* |
| 11922 | ** 2008 June 13 |
| 11923 | ** |
| 11924 | ** The author disclaims copyright to this source code. In place of |
| 11925 | ** a legal notice, here is a blessing: |
| @@ -12138,11 +12116,10 @@ | |
| 12138 | */ |
| 12139 | SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER; |
| 12140 | |
| 12141 | /************** End of global.c **********************************************/ |
| 12142 | /************** Begin file ctime.c *******************************************/ |
| 12143 | #line 1 "tsrc/ctime.c" |
| 12144 | /* |
| 12145 | ** 2010 February 23 |
| 12146 | ** |
| 12147 | ** The author disclaims copyright to this source code. In place of |
| 12148 | ** a legal notice, here is a blessing: |
| @@ -12543,11 +12520,10 @@ | |
| 12543 | |
| 12544 | #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ |
| 12545 | |
| 12546 | /************** End of ctime.c ***********************************************/ |
| 12547 | /************** Begin file status.c ******************************************/ |
| 12548 | #line 1 "tsrc/status.c" |
| 12549 | /* |
| 12550 | ** 2008 June 18 |
| 12551 | ** |
| 12552 | ** The author disclaims copyright to this source code. In place of |
| 12553 | ** a legal notice, here is a blessing: |
| @@ -12561,11 +12537,10 @@ | |
| 12561 | ** This module implements the sqlite3_status() interface and related |
| 12562 | ** functionality. |
| 12563 | */ |
| 12564 | /************** Include vdbeInt.h in the middle of status.c ******************/ |
| 12565 | /************** Begin file vdbeInt.h *****************************************/ |
| 12566 | #line 1 "tsrc/vdbeInt.h" |
| 12567 | /* |
| 12568 | ** 2003 September 6 |
| 12569 | ** |
| 12570 | ** The author disclaims copyright to this source code. In place of |
| 12571 | ** a legal notice, here is a blessing: |
| @@ -13013,11 +12988,10 @@ | |
| 13013 | |
| 13014 | #endif /* !defined(_VDBEINT_H_) */ |
| 13015 | |
| 13016 | /************** End of vdbeInt.h *********************************************/ |
| 13017 | /************** Continuing where we left off in status.c *********************/ |
| 13018 | #line 18 "tsrc/status.c" |
| 13019 | |
| 13020 | /* |
| 13021 | ** Variables in which to record status information. |
| 13022 | */ |
| 13023 | typedef struct sqlite3StatType sqlite3StatType; |
| @@ -13227,11 +13201,10 @@ | |
| 13227 | return rc; |
| 13228 | } |
| 13229 | |
| 13230 | /************** End of status.c **********************************************/ |
| 13231 | /************** Begin file date.c ********************************************/ |
| 13232 | #line 1 "tsrc/date.c" |
| 13233 | /* |
| 13234 | ** 2003 October 31 |
| 13235 | ** |
| 13236 | ** The author disclaims copyright to this source code. In place of |
| 13237 | ** a legal notice, here is a blessing: |
| @@ -14355,11 +14328,10 @@ | |
| 14355 | } |
| 14356 | } |
| 14357 | |
| 14358 | /************** End of date.c ************************************************/ |
| 14359 | /************** Begin file os.c **********************************************/ |
| 14360 | #line 1 "tsrc/os.c" |
| 14361 | /* |
| 14362 | ** 2005 November 29 |
| 14363 | ** |
| 14364 | ** The author disclaims copyright to this source code. In place of |
| 14365 | ** a legal notice, here is a blessing: |
| @@ -14689,11 +14661,10 @@ | |
| 14689 | return SQLITE_OK; |
| 14690 | } |
| 14691 | |
| 14692 | /************** End of os.c **************************************************/ |
| 14693 | /************** Begin file fault.c *******************************************/ |
| 14694 | #line 1 "tsrc/fault.c" |
| 14695 | /* |
| 14696 | ** 2008 Jan 22 |
| 14697 | ** |
| 14698 | ** The author disclaims copyright to this source code. In place of |
| 14699 | ** a legal notice, here is a blessing: |
| @@ -14779,11 +14750,10 @@ | |
| 14779 | |
| 14780 | #endif /* #ifndef SQLITE_OMIT_BUILTIN_TEST */ |
| 14781 | |
| 14782 | /************** End of fault.c ***********************************************/ |
| 14783 | /************** Begin file mem0.c ********************************************/ |
| 14784 | #line 1 "tsrc/mem0.c" |
| 14785 | /* |
| 14786 | ** 2008 October 28 |
| 14787 | ** |
| 14788 | ** The author disclaims copyright to this source code. In place of |
| 14789 | ** a legal notice, here is a blessing: |
| @@ -14841,11 +14811,10 @@ | |
| 14841 | |
| 14842 | #endif /* SQLITE_ZERO_MALLOC */ |
| 14843 | |
| 14844 | /************** End of mem0.c ************************************************/ |
| 14845 | /************** Begin file mem1.c ********************************************/ |
| 14846 | #line 1 "tsrc/mem1.c" |
| 14847 | /* |
| 14848 | ** 2007 August 14 |
| 14849 | ** |
| 14850 | ** The author disclaims copyright to this source code. In place of |
| 14851 | ** a legal notice, here is a blessing: |
| @@ -14994,11 +14963,10 @@ | |
| 14994 | |
| 14995 | #endif /* SQLITE_SYSTEM_MALLOC */ |
| 14996 | |
| 14997 | /************** End of mem1.c ************************************************/ |
| 14998 | /************** Begin file mem2.c ********************************************/ |
| 14999 | #line 1 "tsrc/mem2.c" |
| 15000 | /* |
| 15001 | ** 2007 August 15 |
| 15002 | ** |
| 15003 | ** The author disclaims copyright to this source code. In place of |
| 15004 | ** a legal notice, here is a blessing: |
| @@ -15525,11 +15493,10 @@ | |
| 15525 | |
| 15526 | #endif /* SQLITE_MEMDEBUG */ |
| 15527 | |
| 15528 | /************** End of mem2.c ************************************************/ |
| 15529 | /************** Begin file mem3.c ********************************************/ |
| 15530 | #line 1 "tsrc/mem3.c" |
| 15531 | /* |
| 15532 | ** 2007 October 14 |
| 15533 | ** |
| 15534 | ** The author disclaims copyright to this source code. In place of |
| 15535 | ** a legal notice, here is a blessing: |
| @@ -16215,11 +16182,10 @@ | |
| 16215 | |
| 16216 | #endif /* SQLITE_ENABLE_MEMSYS3 */ |
| 16217 | |
| 16218 | /************** End of mem3.c ************************************************/ |
| 16219 | /************** Begin file mem5.c ********************************************/ |
| 16220 | #line 1 "tsrc/mem5.c" |
| 16221 | /* |
| 16222 | ** 2007 October 14 |
| 16223 | ** |
| 16224 | ** The author disclaims copyright to this source code. In place of |
| 16225 | ** a legal notice, here is a blessing: |
| @@ -16799,11 +16765,10 @@ | |
| 16799 | |
| 16800 | #endif /* SQLITE_ENABLE_MEMSYS5 */ |
| 16801 | |
| 16802 | /************** End of mem5.c ************************************************/ |
| 16803 | /************** Begin file mutex.c *******************************************/ |
| 16804 | #line 1 "tsrc/mutex.c" |
| 16805 | /* |
| 16806 | ** 2007 August 14 |
| 16807 | ** |
| 16808 | ** The author disclaims copyright to this source code. In place of |
| 16809 | ** a legal notice, here is a blessing: |
| @@ -16955,11 +16920,10 @@ | |
| 16955 | |
| 16956 | #endif /* SQLITE_MUTEX_OMIT */ |
| 16957 | |
| 16958 | /************** End of mutex.c ***********************************************/ |
| 16959 | /************** Begin file mutex_noop.c **************************************/ |
| 16960 | #line 1 "tsrc/mutex_noop.c" |
| 16961 | /* |
| 16962 | ** 2008 October 07 |
| 16963 | ** |
| 16964 | ** The author disclaims copyright to this source code. In place of |
| 16965 | ** a legal notice, here is a blessing: |
| @@ -17164,11 +17128,10 @@ | |
| 17164 | #endif /* SQLITE_MUTEX_NOOP */ |
| 17165 | #endif /* SQLITE_MUTEX_OMIT */ |
| 17166 | |
| 17167 | /************** End of mutex_noop.c ******************************************/ |
| 17168 | /************** Begin file mutex_os2.c ***************************************/ |
| 17169 | #line 1 "tsrc/mutex_os2.c" |
| 17170 | /* |
| 17171 | ** 2007 August 28 |
| 17172 | ** |
| 17173 | ** The author disclaims copyright to this source code. In place of |
| 17174 | ** a legal notice, here is a blessing: |
| @@ -17441,11 +17404,10 @@ | |
| 17441 | } |
| 17442 | #endif /* SQLITE_MUTEX_OS2 */ |
| 17443 | |
| 17444 | /************** End of mutex_os2.c *******************************************/ |
| 17445 | /************** Begin file mutex_unix.c **************************************/ |
| 17446 | #line 1 "tsrc/mutex_unix.c" |
| 17447 | /* |
| 17448 | ** 2007 August 28 |
| 17449 | ** |
| 17450 | ** The author disclaims copyright to this source code. In place of |
| 17451 | ** a legal notice, here is a blessing: |
| @@ -17795,11 +17757,10 @@ | |
| 17795 | |
| 17796 | #endif /* SQLITE_MUTEX_PTHREAD */ |
| 17797 | |
| 17798 | /************** End of mutex_unix.c ******************************************/ |
| 17799 | /************** Begin file mutex_w32.c ***************************************/ |
| 17800 | #line 1 "tsrc/mutex_w32.c" |
| 17801 | /* |
| 17802 | ** 2007 August 14 |
| 17803 | ** |
| 17804 | ** The author disclaims copyright to this source code. In place of |
| 17805 | ** a legal notice, here is a blessing: |
| @@ -18130,11 +18091,10 @@ | |
| 18130 | } |
| 18131 | #endif /* SQLITE_MUTEX_W32 */ |
| 18132 | |
| 18133 | /************** End of mutex_w32.c *******************************************/ |
| 18134 | /************** Begin file malloc.c ******************************************/ |
| 18135 | #line 1 "tsrc/malloc.c" |
| 18136 | /* |
| 18137 | ** 2001 September 15 |
| 18138 | ** |
| 18139 | ** The author disclaims copyright to this source code. In place of |
| 18140 | ** a legal notice, here is a blessing: |
| @@ -18910,11 +18870,10 @@ | |
| 18910 | return rc & (db ? db->errMask : 0xff); |
| 18911 | } |
| 18912 | |
| 18913 | /************** End of malloc.c **********************************************/ |
| 18914 | /************** Begin file printf.c ******************************************/ |
| 18915 | #line 1 "tsrc/printf.c" |
| 18916 | /* |
| 18917 | ** The "printf" code that follows dates from the 1980's. It is in |
| 18918 | ** the public domain. The original comments are included here for |
| 18919 | ** completeness. They are very out-of-date but might be useful as |
| 18920 | ** an historical reference. Most of the "enhancements" have been backed |
| @@ -19942,11 +19901,10 @@ | |
| 19942 | } |
| 19943 | #endif |
| 19944 | |
| 19945 | /************** End of printf.c **********************************************/ |
| 19946 | /************** Begin file random.c ******************************************/ |
| 19947 | #line 1 "tsrc/random.c" |
| 19948 | /* |
| 19949 | ** 2001 September 15 |
| 19950 | ** |
| 19951 | ** The author disclaims copyright to this source code. In place of |
| 19952 | ** a legal notice, here is a blessing: |
| @@ -20090,11 +20048,10 @@ | |
| 20090 | } |
| 20091 | #endif /* SQLITE_OMIT_BUILTIN_TEST */ |
| 20092 | |
| 20093 | /************** End of random.c **********************************************/ |
| 20094 | /************** Begin file utf.c *********************************************/ |
| 20095 | #line 1 "tsrc/utf.c" |
| 20096 | /* |
| 20097 | ** 2004 April 13 |
| 20098 | ** |
| 20099 | ** The author disclaims copyright to this source code. In place of |
| 20100 | ** a legal notice, here is a blessing: |
| @@ -20652,11 +20609,10 @@ | |
| 20652 | #endif /* SQLITE_TEST */ |
| 20653 | #endif /* SQLITE_OMIT_UTF16 */ |
| 20654 | |
| 20655 | /************** End of utf.c *************************************************/ |
| 20656 | /************** Begin file util.c ********************************************/ |
| 20657 | #line 1 "tsrc/util.c" |
| 20658 | /* |
| 20659 | ** 2001 September 15 |
| 20660 | ** |
| 20661 | ** The author disclaims copyright to this source code. In place of |
| 20662 | ** a legal notice, here is a blessing: |
| @@ -21835,11 +21791,10 @@ | |
| 21835 | } |
| 21836 | #endif |
| 21837 | |
| 21838 | /************** End of util.c ************************************************/ |
| 21839 | /************** Begin file hash.c ********************************************/ |
| 21840 | #line 1 "tsrc/hash.c" |
| 21841 | /* |
| 21842 | ** 2001 September 22 |
| 21843 | ** |
| 21844 | ** The author disclaims copyright to this source code. In place of |
| 21845 | ** a legal notice, here is a blessing: |
| @@ -22115,11 +22070,10 @@ | |
| 22115 | return 0; |
| 22116 | } |
| 22117 | |
| 22118 | /************** End of hash.c ************************************************/ |
| 22119 | /************** Begin file opcodes.c *****************************************/ |
| 22120 | #line 1 "tsrc/opcodes.c" |
| 22121 | /* Automatically generated. Do not edit */ |
| 22122 | /* See the mkopcodec.awk script for details. */ |
| 22123 | #if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG) |
| 22124 | SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){ |
| 22125 | static const char *const azName[] = { "?", |
| @@ -22146,66 +22100,66 @@ | |
| 22146 | /* 21 */ "MustBeInt", |
| 22147 | /* 22 */ "RealAffinity", |
| 22148 | /* 23 */ "Permutation", |
| 22149 | /* 24 */ "Compare", |
| 22150 | /* 25 */ "Jump", |
| 22151 | /* 26 */ "If", |
| 22152 | /* 27 */ "IfNot", |
| 22153 | /* 28 */ "Column", |
| 22154 | /* 29 */ "Affinity", |
| 22155 | /* 30 */ "MakeRecord", |
| 22156 | /* 31 */ "Count", |
| 22157 | /* 32 */ "Savepoint", |
| 22158 | /* 33 */ "AutoCommit", |
| 22159 | /* 34 */ "Transaction", |
| 22160 | /* 35 */ "ReadCookie", |
| 22161 | /* 36 */ "SetCookie", |
| 22162 | /* 37 */ "VerifyCookie", |
| 22163 | /* 38 */ "OpenRead", |
| 22164 | /* 39 */ "OpenWrite", |
| 22165 | /* 40 */ "OpenAutoindex", |
| 22166 | /* 41 */ "OpenEphemeral", |
| 22167 | /* 42 */ "SorterOpen", |
| 22168 | /* 43 */ "OpenPseudo", |
| 22169 | /* 44 */ "Close", |
| 22170 | /* 45 */ "SeekLt", |
| 22171 | /* 46 */ "SeekLe", |
| 22172 | /* 47 */ "SeekGe", |
| 22173 | /* 48 */ "SeekGt", |
| 22174 | /* 49 */ "Seek", |
| 22175 | /* 50 */ "NotFound", |
| 22176 | /* 51 */ "Found", |
| 22177 | /* 52 */ "IsUnique", |
| 22178 | /* 53 */ "NotExists", |
| 22179 | /* 54 */ "Sequence", |
| 22180 | /* 55 */ "NewRowid", |
| 22181 | /* 56 */ "Insert", |
| 22182 | /* 57 */ "InsertInt", |
| 22183 | /* 58 */ "Delete", |
| 22184 | /* 59 */ "ResetCount", |
| 22185 | /* 60 */ "SorterCompare", |
| 22186 | /* 61 */ "SorterData", |
| 22187 | /* 62 */ "RowKey", |
| 22188 | /* 63 */ "RowData", |
| 22189 | /* 64 */ "Rowid", |
| 22190 | /* 65 */ "NullRow", |
| 22191 | /* 66 */ "Last", |
| 22192 | /* 67 */ "SorterSort", |
| 22193 | /* 68 */ "Or", |
| 22194 | /* 69 */ "And", |
| 22195 | /* 70 */ "Sort", |
| 22196 | /* 71 */ "Rewind", |
| 22197 | /* 72 */ "SorterNext", |
| 22198 | /* 73 */ "IsNull", |
| 22199 | /* 74 */ "NotNull", |
| 22200 | /* 75 */ "Ne", |
| 22201 | /* 76 */ "Eq", |
| 22202 | /* 77 */ "Gt", |
| 22203 | /* 78 */ "Le", |
| 22204 | /* 79 */ "Lt", |
| 22205 | /* 80 */ "Ge", |
| 22206 | /* 81 */ "Prev", |
| 22207 | /* 82 */ "BitAnd", |
| 22208 | /* 83 */ "BitOr", |
| 22209 | /* 84 */ "ShiftLeft", |
| 22210 | /* 85 */ "ShiftRight", |
| 22211 | /* 86 */ "Add", |
| @@ -22212,76 +22166,76 @@ | |
| 22212 | /* 87 */ "Subtract", |
| 22213 | /* 88 */ "Multiply", |
| 22214 | /* 89 */ "Divide", |
| 22215 | /* 90 */ "Remainder", |
| 22216 | /* 91 */ "Concat", |
| 22217 | /* 92 */ "Next", |
| 22218 | /* 93 */ "BitNot", |
| 22219 | /* 94 */ "String8", |
| 22220 | /* 95 */ "SorterInsert", |
| 22221 | /* 96 */ "IdxInsert", |
| 22222 | /* 97 */ "IdxDelete", |
| 22223 | /* 98 */ "IdxRowid", |
| 22224 | /* 99 */ "IdxLT", |
| 22225 | /* 100 */ "IdxGE", |
| 22226 | /* 101 */ "Destroy", |
| 22227 | /* 102 */ "Clear", |
| 22228 | /* 103 */ "CreateIndex", |
| 22229 | /* 104 */ "CreateTable", |
| 22230 | /* 105 */ "ParseSchema", |
| 22231 | /* 106 */ "LoadAnalysis", |
| 22232 | /* 107 */ "DropTable", |
| 22233 | /* 108 */ "DropIndex", |
| 22234 | /* 109 */ "DropTrigger", |
| 22235 | /* 110 */ "IntegrityCk", |
| 22236 | /* 111 */ "RowSetAdd", |
| 22237 | /* 112 */ "RowSetRead", |
| 22238 | /* 113 */ "RowSetTest", |
| 22239 | /* 114 */ "Program", |
| 22240 | /* 115 */ "Param", |
| 22241 | /* 116 */ "FkCounter", |
| 22242 | /* 117 */ "FkIfZero", |
| 22243 | /* 118 */ "MemMax", |
| 22244 | /* 119 */ "IfPos", |
| 22245 | /* 120 */ "IfNeg", |
| 22246 | /* 121 */ "IfZero", |
| 22247 | /* 122 */ "AggStep", |
| 22248 | /* 123 */ "AggFinal", |
| 22249 | /* 124 */ "Checkpoint", |
| 22250 | /* 125 */ "JournalMode", |
| 22251 | /* 126 */ "Vacuum", |
| 22252 | /* 127 */ "IncrVacuum", |
| 22253 | /* 128 */ "Expire", |
| 22254 | /* 129 */ "TableLock", |
| 22255 | /* 130 */ "Real", |
| 22256 | /* 131 */ "VBegin", |
| 22257 | /* 132 */ "VCreate", |
| 22258 | /* 133 */ "VDestroy", |
| 22259 | /* 134 */ "VOpen", |
| 22260 | /* 135 */ "VFilter", |
| 22261 | /* 136 */ "VColumn", |
| 22262 | /* 137 */ "VNext", |
| 22263 | /* 138 */ "VRename", |
| 22264 | /* 139 */ "VUpdate", |
| 22265 | /* 140 */ "Pagecount", |
| 22266 | /* 141 */ "ToText", |
| 22267 | /* 142 */ "ToBlob", |
| 22268 | /* 143 */ "ToNumeric", |
| 22269 | /* 144 */ "ToInt", |
| 22270 | /* 145 */ "ToReal", |
| 22271 | /* 146 */ "MaxPgcnt", |
| 22272 | /* 147 */ "Trace", |
| 22273 | /* 148 */ "Noop", |
| 22274 | /* 149 */ "Explain", |
| 22275 | }; |
| 22276 | return azName[i]; |
| 22277 | } |
| 22278 | #endif |
| 22279 | |
| 22280 | /************** End of opcodes.c *********************************************/ |
| 22281 | /************** Begin file os_os2.c ******************************************/ |
| 22282 | #line 1 "tsrc/os_os2.c" |
| 22283 | /* |
| 22284 | ** 2006 Feb 14 |
| 22285 | ** |
| 22286 | ** The author disclaims copyright to this source code. In place of |
| 22287 | ** a legal notice, here is a blessing: |
| @@ -22334,11 +22288,10 @@ | |
| 22334 | /* |
| 22335 | ** Include code that is common to all os_*.c files |
| 22336 | */ |
| 22337 | /************** Include os_common.h in the middle of os_os2.c ****************/ |
| 22338 | /************** Begin file os_common.h ***************************************/ |
| 22339 | #line 1 "tsrc/os_common.h" |
| 22340 | /* |
| 22341 | ** 2004 May 22 |
| 22342 | ** |
| 22343 | ** The author disclaims copyright to this source code. In place of |
| 22344 | ** a legal notice, here is a blessing: |
| @@ -22388,11 +22341,10 @@ | |
| 22388 | ** hwtime.h contains inline assembler code for implementing |
| 22389 | ** high-performance timing routines. |
| 22390 | */ |
| 22391 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 22392 | /************** Begin file hwtime.h ******************************************/ |
| 22393 | #line 1 "tsrc/hwtime.h" |
| 22394 | /* |
| 22395 | ** 2008 May 27 |
| 22396 | ** |
| 22397 | ** The author disclaims copyright to this source code. In place of |
| 22398 | ** a legal notice, here is a blessing: |
| @@ -22477,11 +22429,10 @@ | |
| 22477 | |
| 22478 | #endif /* !defined(_HWTIME_H_) */ |
| 22479 | |
| 22480 | /************** End of hwtime.h **********************************************/ |
| 22481 | /************** Continuing where we left off in os_common.h ******************/ |
| 22482 | #line 53 "tsrc/os_common.h" |
| 22483 | |
| 22484 | static sqlite_uint64 g_start; |
| 22485 | static sqlite_uint64 g_elapsed; |
| 22486 | #define TIMER_START g_start=sqlite3Hwtime() |
| 22487 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| @@ -22544,11 +22495,10 @@ | |
| 22544 | |
| 22545 | #endif /* !defined(_OS_COMMON_H_) */ |
| 22546 | |
| 22547 | /************** End of os_common.h *******************************************/ |
| 22548 | /************** Continuing where we left off in os_os2.c *********************/ |
| 22549 | #line 57 "tsrc/os_os2.c" |
| 22550 | |
| 22551 | /* Forward references */ |
| 22552 | typedef struct os2File os2File; /* The file structure */ |
| 22553 | typedef struct os2ShmNode os2ShmNode; /* A shared descritive memory node */ |
| 22554 | typedef struct os2ShmLink os2ShmLink; /* A connection to shared-memory */ |
| @@ -24416,11 +24366,10 @@ | |
| 24416 | |
| 24417 | #endif /* SQLITE_OS_OS2 */ |
| 24418 | |
| 24419 | /************** End of os_os2.c **********************************************/ |
| 24420 | /************** Begin file os_unix.c *****************************************/ |
| 24421 | #line 1 "tsrc/os_unix.c" |
| 24422 | /* |
| 24423 | ** 2004 May 22 |
| 24424 | ** |
| 24425 | ** The author disclaims copyright to this source code. In place of |
| 24426 | ** a legal notice, here is a blessing: |
| @@ -24681,11 +24630,10 @@ | |
| 24681 | /* |
| 24682 | ** Include code that is common to all os_*.c files |
| 24683 | */ |
| 24684 | /************** Include os_common.h in the middle of os_unix.c ***************/ |
| 24685 | /************** Begin file os_common.h ***************************************/ |
| 24686 | #line 1 "tsrc/os_common.h" |
| 24687 | /* |
| 24688 | ** 2004 May 22 |
| 24689 | ** |
| 24690 | ** The author disclaims copyright to this source code. In place of |
| 24691 | ** a legal notice, here is a blessing: |
| @@ -24735,11 +24683,10 @@ | |
| 24735 | ** hwtime.h contains inline assembler code for implementing |
| 24736 | ** high-performance timing routines. |
| 24737 | */ |
| 24738 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 24739 | /************** Begin file hwtime.h ******************************************/ |
| 24740 | #line 1 "tsrc/hwtime.h" |
| 24741 | /* |
| 24742 | ** 2008 May 27 |
| 24743 | ** |
| 24744 | ** The author disclaims copyright to this source code. In place of |
| 24745 | ** a legal notice, here is a blessing: |
| @@ -24824,11 +24771,10 @@ | |
| 24824 | |
| 24825 | #endif /* !defined(_HWTIME_H_) */ |
| 24826 | |
| 24827 | /************** End of hwtime.h **********************************************/ |
| 24828 | /************** Continuing where we left off in os_common.h ******************/ |
| 24829 | #line 53 "tsrc/os_common.h" |
| 24830 | |
| 24831 | static sqlite_uint64 g_start; |
| 24832 | static sqlite_uint64 g_elapsed; |
| 24833 | #define TIMER_START g_start=sqlite3Hwtime() |
| 24834 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| @@ -24891,11 +24837,10 @@ | |
| 24891 | |
| 24892 | #endif /* !defined(_OS_COMMON_H_) */ |
| 24893 | |
| 24894 | /************** End of os_common.h *******************************************/ |
| 24895 | /************** Continuing where we left off in os_unix.c ********************/ |
| 24896 | #line 265 "tsrc/os_unix.c" |
| 24897 | |
| 24898 | /* |
| 24899 | ** Define various macros that are missing from some systems. |
| 24900 | */ |
| 24901 | #ifndef O_LARGEFILE |
| @@ -31401,11 +31346,10 @@ | |
| 31401 | |
| 31402 | #endif /* SQLITE_OS_UNIX */ |
| 31403 | |
| 31404 | /************** End of os_unix.c *********************************************/ |
| 31405 | /************** Begin file os_win.c ******************************************/ |
| 31406 | #line 1 "tsrc/os_win.c" |
| 31407 | /* |
| 31408 | ** 2004 May 22 |
| 31409 | ** |
| 31410 | ** The author disclaims copyright to this source code. In place of |
| 31411 | ** a legal notice, here is a blessing: |
| @@ -31463,11 +31407,10 @@ | |
| 31463 | /* |
| 31464 | ** Include code that is common to all os_*.c files |
| 31465 | */ |
| 31466 | /************** Include os_common.h in the middle of os_win.c ****************/ |
| 31467 | /************** Begin file os_common.h ***************************************/ |
| 31468 | #line 1 "tsrc/os_common.h" |
| 31469 | /* |
| 31470 | ** 2004 May 22 |
| 31471 | ** |
| 31472 | ** The author disclaims copyright to this source code. In place of |
| 31473 | ** a legal notice, here is a blessing: |
| @@ -31517,11 +31460,10 @@ | |
| 31517 | ** hwtime.h contains inline assembler code for implementing |
| 31518 | ** high-performance timing routines. |
| 31519 | */ |
| 31520 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 31521 | /************** Begin file hwtime.h ******************************************/ |
| 31522 | #line 1 "tsrc/hwtime.h" |
| 31523 | /* |
| 31524 | ** 2008 May 27 |
| 31525 | ** |
| 31526 | ** The author disclaims copyright to this source code. In place of |
| 31527 | ** a legal notice, here is a blessing: |
| @@ -31606,11 +31548,10 @@ | |
| 31606 | |
| 31607 | #endif /* !defined(_HWTIME_H_) */ |
| 31608 | |
| 31609 | /************** End of hwtime.h **********************************************/ |
| 31610 | /************** Continuing where we left off in os_common.h ******************/ |
| 31611 | #line 53 "tsrc/os_common.h" |
| 31612 | |
| 31613 | static sqlite_uint64 g_start; |
| 31614 | static sqlite_uint64 g_elapsed; |
| 31615 | #define TIMER_START g_start=sqlite3Hwtime() |
| 31616 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| @@ -31673,11 +31614,10 @@ | |
| 31673 | |
| 31674 | #endif /* !defined(_OS_COMMON_H_) */ |
| 31675 | |
| 31676 | /************** End of os_common.h *******************************************/ |
| 31677 | /************** Continuing where we left off in os_win.c *********************/ |
| 31678 | #line 62 "tsrc/os_win.c" |
| 31679 | |
| 31680 | /* |
| 31681 | ** Some microsoft compilers lack this definition. |
| 31682 | */ |
| 31683 | #ifndef INVALID_FILE_ATTRIBUTES |
| @@ -34809,11 +34749,10 @@ | |
| 34809 | |
| 34810 | #endif /* SQLITE_OS_WIN */ |
| 34811 | |
| 34812 | /************** End of os_win.c **********************************************/ |
| 34813 | /************** Begin file bitvec.c ******************************************/ |
| 34814 | #line 1 "tsrc/bitvec.c" |
| 34815 | /* |
| 34816 | ** 2008 February 16 |
| 34817 | ** |
| 34818 | ** The author disclaims copyright to this source code. In place of |
| 34819 | ** a legal notice, here is a blessing: |
| @@ -35220,11 +35159,10 @@ | |
| 35220 | } |
| 35221 | #endif /* SQLITE_OMIT_BUILTIN_TEST */ |
| 35222 | |
| 35223 | /************** End of bitvec.c **********************************************/ |
| 35224 | /************** Begin file pcache.c ******************************************/ |
| 35225 | #line 1 "tsrc/pcache.c" |
| 35226 | /* |
| 35227 | ** 2008 August 05 |
| 35228 | ** |
| 35229 | ** The author disclaims copyright to this source code. In place of |
| 35230 | ** a legal notice, here is a blessing: |
| @@ -35817,11 +35755,10 @@ | |
| 35817 | } |
| 35818 | #endif |
| 35819 | |
| 35820 | /************** End of pcache.c **********************************************/ |
| 35821 | /************** Begin file pcache1.c *****************************************/ |
| 35822 | #line 1 "tsrc/pcache1.c" |
| 35823 | /* |
| 35824 | ** 2008 November 05 |
| 35825 | ** |
| 35826 | ** The author disclaims copyright to this source code. In place of |
| 35827 | ** a legal notice, here is a blessing: |
| @@ -37034,11 +36971,10 @@ | |
| 37034 | } |
| 37035 | #endif |
| 37036 | |
| 37037 | /************** End of pcache1.c *********************************************/ |
| 37038 | /************** Begin file rowset.c ******************************************/ |
| 37039 | #line 1 "tsrc/rowset.c" |
| 37040 | /* |
| 37041 | ** 2008 December 3 |
| 37042 | ** |
| 37043 | ** The author disclaims copyright to this source code. In place of |
| 37044 | ** a legal notice, here is a blessing: |
| @@ -37459,11 +37395,10 @@ | |
| 37459 | return 0; |
| 37460 | } |
| 37461 | |
| 37462 | /************** End of rowset.c **********************************************/ |
| 37463 | /************** Begin file pager.c *******************************************/ |
| 37464 | #line 1 "tsrc/pager.c" |
| 37465 | /* |
| 37466 | ** 2001 September 15 |
| 37467 | ** |
| 37468 | ** The author disclaims copyright to this source code. In place of |
| 37469 | ** a legal notice, here is a blessing: |
| @@ -37483,11 +37418,10 @@ | |
| 37483 | ** another is writing. |
| 37484 | */ |
| 37485 | #ifndef SQLITE_OMIT_DISKIO |
| 37486 | /************** Include wal.h in the middle of pager.c ***********************/ |
| 37487 | /************** Begin file wal.h *********************************************/ |
| 37488 | #line 1 "tsrc/wal.h" |
| 37489 | /* |
| 37490 | ** 2010 February 1 |
| 37491 | ** |
| 37492 | ** The author disclaims copyright to this source code. In place of |
| 37493 | ** a legal notice, here is a blessing: |
| @@ -37608,11 +37542,10 @@ | |
| 37608 | #endif /* ifndef SQLITE_OMIT_WAL */ |
| 37609 | #endif /* _WAL_H_ */ |
| 37610 | |
| 37611 | /************** End of wal.h *************************************************/ |
| 37612 | /************** Continuing where we left off in pager.c **********************/ |
| 37613 | #line 24 "tsrc/pager.c" |
| 37614 | |
| 37615 | |
| 37616 | /******************* NOTES ON THE DESIGN OF THE PAGER ************************ |
| 37617 | ** |
| 37618 | ** This comment block describes invariants that hold when using a rollback |
| @@ -44422,11 +44355,10 @@ | |
| 44422 | |
| 44423 | #endif /* SQLITE_OMIT_DISKIO */ |
| 44424 | |
| 44425 | /************** End of pager.c ***********************************************/ |
| 44426 | /************** Begin file wal.c *********************************************/ |
| 44427 | #line 1 "tsrc/wal.c" |
| 44428 | /* |
| 44429 | ** 2010 February 1 |
| 44430 | ** |
| 44431 | ** The author disclaims copyright to this source code. In place of |
| 44432 | ** a legal notice, here is a blessing: |
| @@ -47377,11 +47309,10 @@ | |
| 47377 | |
| 47378 | #endif /* #ifndef SQLITE_OMIT_WAL */ |
| 47379 | |
| 47380 | /************** End of wal.c *************************************************/ |
| 47381 | /************** Begin file btmutex.c *****************************************/ |
| 47382 | #line 1 "tsrc/btmutex.c" |
| 47383 | /* |
| 47384 | ** 2007 August 27 |
| 47385 | ** |
| 47386 | ** The author disclaims copyright to this source code. In place of |
| 47387 | ** a legal notice, here is a blessing: |
| @@ -47397,11 +47328,10 @@ | |
| 47397 | ** big and we want to break it down some. This packaged seemed like |
| 47398 | ** a good breakout. |
| 47399 | */ |
| 47400 | /************** Include btreeInt.h in the middle of btmutex.c ****************/ |
| 47401 | /************** Begin file btreeInt.h ****************************************/ |
| 47402 | #line 1 "tsrc/btreeInt.h" |
| 47403 | /* |
| 47404 | ** 2004 April 6 |
| 47405 | ** |
| 47406 | ** The author disclaims copyright to this source code. In place of |
| 47407 | ** a legal notice, here is a blessing: |
| @@ -48043,11 +47973,10 @@ | |
| 48043 | #define get4byte sqlite3Get4byte |
| 48044 | #define put4byte sqlite3Put4byte |
| 48045 | |
| 48046 | /************** End of btreeInt.h ********************************************/ |
| 48047 | /************** Continuing where we left off in btmutex.c ********************/ |
| 48048 | #line 19 "tsrc/btmutex.c" |
| 48049 | #ifndef SQLITE_OMIT_SHARED_CACHE |
| 48050 | #if SQLITE_THREADSAFE |
| 48051 | |
| 48052 | /* |
| 48053 | ** Obtain the BtShared mutex associated with B-Tree handle p. Also, |
| @@ -48316,11 +48245,10 @@ | |
| 48316 | #endif /* if SQLITE_THREADSAFE */ |
| 48317 | #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */ |
| 48318 | |
| 48319 | /************** End of btmutex.c *********************************************/ |
| 48320 | /************** Begin file btree.c *******************************************/ |
| 48321 | #line 1 "tsrc/btree.c" |
| 48322 | /* |
| 48323 | ** 2004 April 6 |
| 48324 | ** |
| 48325 | ** The author disclaims copyright to this source code. In place of |
| 48326 | ** a legal notice, here is a blessing: |
| @@ -48982,11 +48910,11 @@ | |
| 48982 | assert( nKey==(i64)(int)nKey ); |
| 48983 | pIdxKey = sqlite3VdbeAllocUnpackedRecord( |
| 48984 | pCur->pKeyInfo, aSpace, sizeof(aSpace), &pFree |
| 48985 | ); |
| 48986 | if( pIdxKey==0 ) return SQLITE_NOMEM; |
| 48987 | sqlite3VdbeRecordUnpack(pCur->pKeyInfo, nKey, pKey, pIdxKey); |
| 48988 | }else{ |
| 48989 | pIdxKey = 0; |
| 48990 | } |
| 48991 | rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes); |
| 48992 | if( pFree ){ |
| @@ -56504,11 +56432,10 @@ | |
| 56504 | return rc; |
| 56505 | } |
| 56506 | |
| 56507 | /************** End of btree.c ***********************************************/ |
| 56508 | /************** Begin file backup.c ******************************************/ |
| 56509 | #line 1 "tsrc/backup.c" |
| 56510 | /* |
| 56511 | ** 2009 January 28 |
| 56512 | ** |
| 56513 | ** The author disclaims copyright to this source code. In place of |
| 56514 | ** a legal notice, here is a blessing: |
| @@ -57211,11 +57138,10 @@ | |
| 57211 | } |
| 57212 | #endif /* SQLITE_OMIT_VACUUM */ |
| 57213 | |
| 57214 | /************** End of backup.c **********************************************/ |
| 57215 | /************** Begin file vdbemem.c *****************************************/ |
| 57216 | #line 1 "tsrc/vdbemem.c" |
| 57217 | /* |
| 57218 | ** 2004 May 26 |
| 57219 | ** |
| 57220 | ** The author disclaims copyright to this source code. In place of |
| 57221 | ** a legal notice, here is a blessing: |
| @@ -58366,11 +58292,10 @@ | |
| 58366 | return 0; |
| 58367 | } |
| 58368 | |
| 58369 | /************** End of vdbemem.c *********************************************/ |
| 58370 | /************** Begin file vdbeaux.c *****************************************/ |
| 58371 | #line 1 "tsrc/vdbeaux.c" |
| 58372 | /* |
| 58373 | ** 2003 September 6 |
| 58374 | ** |
| 58375 | ** The author disclaims copyright to this source code. In place of |
| 58376 | ** a legal notice, here is a blessing: |
| @@ -59037,22 +58962,19 @@ | |
| 59037 | p->pNext = pVdbe->pProgram; |
| 59038 | pVdbe->pProgram = p; |
| 59039 | } |
| 59040 | |
| 59041 | /* |
| 59042 | ** Change N opcodes starting at addr to No-ops. |
| 59043 | */ |
| 59044 | SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr, int N){ |
| 59045 | if( p->aOp ){ |
| 59046 | VdbeOp *pOp = &p->aOp[addr]; |
| 59047 | sqlite3 *db = p->db; |
| 59048 | while( N-- ){ |
| 59049 | freeP4(db, pOp->p4type, pOp->p4.p); |
| 59050 | memset(pOp, 0, sizeof(pOp[0])); |
| 59051 | pOp->opcode = OP_Noop; |
| 59052 | pOp++; |
| 59053 | } |
| 59054 | } |
| 59055 | } |
| 59056 | |
| 59057 | /* |
| 59058 | ** Change the value of the P4 operand for a specific instruction. |
| @@ -59204,11 +59126,11 @@ | |
| 59204 | ** check the value of p->nOp-1 before continuing. |
| 59205 | */ |
| 59206 | SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){ |
| 59207 | /* C89 specifies that the constant "dummy" will be initialized to all |
| 59208 | ** zeros, which is correct. MSVC generates a warning, nevertheless. */ |
| 59209 | static const VdbeOp dummy; /* Ignore the MSVC warning about no initializer */ |
| 59210 | assert( p->magic==VDBE_MAGIC_INIT ); |
| 59211 | if( addr<0 ){ |
| 59212 | #ifdef SQLITE_OMIT_TRACE |
| 59213 | if( p->nOp==0 ) return (VdbeOp*)&dummy; |
| 59214 | #endif |
| @@ -61609,11 +61531,10 @@ | |
| 61609 | } |
| 61610 | } |
| 61611 | |
| 61612 | /************** End of vdbeaux.c *********************************************/ |
| 61613 | /************** Begin file vdbeapi.c *****************************************/ |
| 61614 | #line 1 "tsrc/vdbeapi.c" |
| 61615 | /* |
| 61616 | ** 2004 May 26 |
| 61617 | ** |
| 61618 | ** The author disclaims copyright to this source code. In place of |
| 61619 | ** a legal notice, here is a blessing: |
| @@ -62917,11 +62838,10 @@ | |
| 62917 | return v; |
| 62918 | } |
| 62919 | |
| 62920 | /************** End of vdbeapi.c *********************************************/ |
| 62921 | /************** Begin file vdbetrace.c ***************************************/ |
| 62922 | #line 1 "tsrc/vdbetrace.c" |
| 62923 | /* |
| 62924 | ** 2009 November 25 |
| 62925 | ** |
| 62926 | ** The author disclaims copyright to this source code. In place of |
| 62927 | ** a legal notice, here is a blessing: |
| @@ -63073,11 +62993,10 @@ | |
| 63073 | |
| 63074 | #endif /* #ifndef SQLITE_OMIT_TRACE */ |
| 63075 | |
| 63076 | /************** End of vdbetrace.c *******************************************/ |
| 63077 | /************** Begin file vdbe.c ********************************************/ |
| 63078 | #line 1 "tsrc/vdbe.c" |
| 63079 | /* |
| 63080 | ** 2001 September 15 |
| 63081 | ** |
| 63082 | ** The author disclaims copyright to this source code. In place of |
| 63083 | ** a legal notice, here is a blessing: |
| @@ -63543,11 +63462,10 @@ | |
| 63543 | ** hwtime.h contains inline assembler code for implementing |
| 63544 | ** high-performance timing routines. |
| 63545 | */ |
| 63546 | /************** Include hwtime.h in the middle of vdbe.c *********************/ |
| 63547 | /************** Begin file hwtime.h ******************************************/ |
| 63548 | #line 1 "tsrc/hwtime.h" |
| 63549 | /* |
| 63550 | ** 2008 May 27 |
| 63551 | ** |
| 63552 | ** The author disclaims copyright to this source code. In place of |
| 63553 | ** a legal notice, here is a blessing: |
| @@ -63632,11 +63550,10 @@ | |
| 63632 | |
| 63633 | #endif /* !defined(_HWTIME_H_) */ |
| 63634 | |
| 63635 | /************** End of hwtime.h **********************************************/ |
| 63636 | /************** Continuing where we left off in vdbe.c ***********************/ |
| 63637 | #line 471 "tsrc/vdbe.c" |
| 63638 | |
| 63639 | #endif |
| 63640 | |
| 63641 | /* |
| 63642 | ** The CHECK_FOR_INTERRUPT macro defined here looks to see if the |
| @@ -65627,10 +65544,20 @@ | |
| 65627 | sqlite3VdbeMemSetInt64(pOut, ~sqlite3VdbeIntValue(pIn1)); |
| 65628 | } |
| 65629 | break; |
| 65630 | } |
| 65631 | |
| 65632 | /* Opcode: If P1 P2 P3 * * |
| 65633 | ** |
| 65634 | ** Jump to P2 if the value in register P1 is true. The value |
| 65635 | ** is considered true if it is numeric and non-zero. If the value |
| 65636 | ** in P1 is NULL then take the jump if P3 is true. |
| @@ -65639,10 +65566,11 @@ | |
| 65639 | ** |
| 65640 | ** Jump to P2 if the value in register P1 is False. The value |
| 65641 | ** is considered true if it has a numeric value of zero. If the value |
| 65642 | ** in P1 is NULL then take the jump if P3 is true. |
| 65643 | */ |
| 65644 | case OP_If: /* jump, in1 */ |
| 65645 | case OP_IfNot: { /* jump, in1 */ |
| 65646 | #if 0 /* local variables moved into u.al */ |
| 65647 | int c; |
| 65648 | #endif /* local variables moved into u.al */ |
| @@ -65657,10 +65585,16 @@ | |
| 65657 | #endif |
| 65658 | if( pOp->opcode==OP_IfNot ) u.al.c = !u.al.c; |
| 65659 | } |
| 65660 | if( u.al.c ){ |
| 65661 | pc = pOp->p2-1; |
| 65662 | } |
| 65663 | break; |
| 65664 | } |
| 65665 | |
| 65666 | /* Opcode: IsNull P1 P2 * * * |
| @@ -69860,11 +69794,10 @@ | |
| 69860 | goto vdbe_error_halt; |
| 69861 | } |
| 69862 | |
| 69863 | /************** End of vdbe.c ************************************************/ |
| 69864 | /************** Begin file vdbeblob.c ****************************************/ |
| 69865 | #line 1 "tsrc/vdbeblob.c" |
| 69866 | /* |
| 69867 | ** 2007 May 1 |
| 69868 | ** |
| 69869 | ** The author disclaims copyright to this source code. In place of |
| 69870 | ** a legal notice, here is a blessing: |
| @@ -70134,21 +70067,21 @@ | |
| 70134 | /* Make sure a mutex is held on the table to be accessed */ |
| 70135 | sqlite3VdbeUsesBtree(v, iDb); |
| 70136 | |
| 70137 | /* Configure the OP_TableLock instruction */ |
| 70138 | #ifdef SQLITE_OMIT_SHARED_CACHE |
| 70139 | sqlite3VdbeChangeToNoop(v, 2, 1); |
| 70140 | #else |
| 70141 | sqlite3VdbeChangeP1(v, 2, iDb); |
| 70142 | sqlite3VdbeChangeP2(v, 2, pTab->tnum); |
| 70143 | sqlite3VdbeChangeP3(v, 2, flags); |
| 70144 | sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT); |
| 70145 | #endif |
| 70146 | |
| 70147 | /* Remove either the OP_OpenWrite or OpenRead. Set the P2 |
| 70148 | ** parameter of the other to pTab->tnum. */ |
| 70149 | sqlite3VdbeChangeToNoop(v, 4 - flags, 1); |
| 70150 | sqlite3VdbeChangeP2(v, 3 + flags, pTab->tnum); |
| 70151 | sqlite3VdbeChangeP3(v, 3 + flags, iDb); |
| 70152 | |
| 70153 | /* Configure the number of columns. Configure the cursor to |
| 70154 | ** think that the table has one more column than it really |
| @@ -70331,11 +70264,10 @@ | |
| 70331 | |
| 70332 | #endif /* #ifndef SQLITE_OMIT_INCRBLOB */ |
| 70333 | |
| 70334 | /************** End of vdbeblob.c ********************************************/ |
| 70335 | /************** Begin file vdbesort.c ****************************************/ |
| 70336 | #line 1 "tsrc/vdbesort.c" |
| 70337 | /* |
| 70338 | ** 2011 July 9 |
| 70339 | ** |
| 70340 | ** The author disclaims copyright to this source code. In place of |
| 70341 | ** a legal notice, here is a blessing: |
| @@ -70492,12 +70424,16 @@ | |
| 70492 | int rc; /* Return Code */ |
| 70493 | int nRead; /* Number of bytes read */ |
| 70494 | int nRec = 0; /* Size of record in bytes */ |
| 70495 | int iOff = 0; /* Size of serialized size varint in bytes */ |
| 70496 | |
| 70497 | nRead = pIter->iEof - pIter->iReadOff; |
| 70498 | if( nRead>5 ) nRead = 5; |
| 70499 | if( nRead<=0 ){ |
| 70500 | /* This is an EOF condition */ |
| 70501 | vdbeSorterIterZero(db, pIter); |
| 70502 | return SQLITE_OK; |
| 70503 | } |
| @@ -71211,11 +71147,10 @@ | |
| 71211 | |
| 71212 | #endif /* #ifndef SQLITE_OMIT_MERGE_SORT */ |
| 71213 | |
| 71214 | /************** End of vdbesort.c ********************************************/ |
| 71215 | /************** Begin file journal.c *****************************************/ |
| 71216 | #line 1 "tsrc/journal.c" |
| 71217 | /* |
| 71218 | ** 2007 August 22 |
| 71219 | ** |
| 71220 | ** The author disclaims copyright to this source code. In place of |
| 71221 | ** a legal notice, here is a blessing: |
| @@ -71452,11 +71387,10 @@ | |
| 71452 | } |
| 71453 | #endif |
| 71454 | |
| 71455 | /************** End of journal.c *********************************************/ |
| 71456 | /************** Begin file memjournal.c **************************************/ |
| 71457 | #line 1 "tsrc/memjournal.c" |
| 71458 | /* |
| 71459 | ** 2008 October 7 |
| 71460 | ** |
| 71461 | ** The author disclaims copyright to this source code. In place of |
| 71462 | ** a legal notice, here is a blessing: |
| @@ -71714,11 +71648,10 @@ | |
| 71714 | return sizeof(MemJournal); |
| 71715 | } |
| 71716 | |
| 71717 | /************** End of memjournal.c ******************************************/ |
| 71718 | /************** Begin file walker.c ******************************************/ |
| 71719 | #line 1 "tsrc/walker.c" |
| 71720 | /* |
| 71721 | ** 2008 August 16 |
| 71722 | ** |
| 71723 | ** The author disclaims copyright to this source code. In place of |
| 71724 | ** a legal notice, here is a blessing: |
| @@ -71853,11 +71786,10 @@ | |
| 71853 | return rc & WRC_Abort; |
| 71854 | } |
| 71855 | |
| 71856 | /************** End of walker.c **********************************************/ |
| 71857 | /************** Begin file resolve.c *****************************************/ |
| 71858 | #line 1 "tsrc/resolve.c" |
| 71859 | /* |
| 71860 | ** 2008 August 18 |
| 71861 | ** |
| 71862 | ** The author disclaims copyright to this source code. In place of |
| 71863 | ** a legal notice, here is a blessing: |
| @@ -73074,11 +73006,10 @@ | |
| 73074 | sqlite3WalkSelect(&w, p); |
| 73075 | } |
| 73076 | |
| 73077 | /************** End of resolve.c *********************************************/ |
| 73078 | /************** Begin file expr.c ********************************************/ |
| 73079 | #line 1 "tsrc/expr.c" |
| 73080 | /* |
| 73081 | ** 2001 September 15 |
| 73082 | ** |
| 73083 | ** The author disclaims copyright to this source code. In place of |
| 73084 | ** a legal notice, here is a blessing: |
| @@ -73977,11 +73908,12 @@ | |
| 73977 | pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase); |
| 73978 | pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName); |
| 73979 | pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias); |
| 73980 | pNewItem->jointype = pOldItem->jointype; |
| 73981 | pNewItem->iCursor = pOldItem->iCursor; |
| 73982 | pNewItem->isPopulated = pOldItem->isPopulated; |
| 73983 | pNewItem->isCorrelated = pOldItem->isCorrelated; |
| 73984 | pNewItem->zIndex = sqlite3DbStrDup(db, pOldItem->zIndex); |
| 73985 | pNewItem->notIndexed = pOldItem->notIndexed; |
| 73986 | pNewItem->pIndex = pOldItem->pIndex; |
| 73987 | pTab = pNewItem->pTab = pOldItem->pTab; |
| @@ -74537,12 +74469,11 @@ | |
| 74537 | assert(v); |
| 74538 | if( iCol<0 ){ |
| 74539 | int iMem = ++pParse->nMem; |
| 74540 | int iAddr; |
| 74541 | |
| 74542 | iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem); |
| 74543 | sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem); |
| 74544 | |
| 74545 | sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead); |
| 74546 | eType = IN_INDEX_ROWID; |
| 74547 | |
| 74548 | sqlite3VdbeJumpHere(v, iAddr); |
| @@ -74569,12 +74500,11 @@ | |
| 74569 | int iMem = ++pParse->nMem; |
| 74570 | int iAddr; |
| 74571 | char *pKey; |
| 74572 | |
| 74573 | pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx); |
| 74574 | iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem); |
| 74575 | sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem); |
| 74576 | |
| 74577 | sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb, |
| 74578 | pKey,P4_KEYINFO_HANDOFF); |
| 74579 | VdbeComment((v, "%s", pIdx->zName)); |
| 74580 | eType = IN_INDEX_INDEX; |
| @@ -74655,10 +74585,11 @@ | |
| 74655 | ){ |
| 74656 | int testAddr = 0; /* One-time test address */ |
| 74657 | int rReg = 0; /* Register storing resulting */ |
| 74658 | Vdbe *v = sqlite3GetVdbe(pParse); |
| 74659 | if( NEVER(v==0) ) return 0; |
| 74660 | sqlite3ExprCachePush(pParse); |
| 74661 | |
| 74662 | /* This code must be run in its entirety every time it is encountered |
| 74663 | ** if any of the following is true: |
| 74664 | ** |
| @@ -74669,12 +74600,11 @@ | |
| 74669 | ** If all of the above are false, then we can run this code just once |
| 74670 | ** save the results, and reuse the same result on subsequent invocations. |
| 74671 | */ |
| 74672 | if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){ |
| 74673 | int mem = ++pParse->nMem; |
| 74674 | sqlite3VdbeAddOp1(v, OP_If, mem); |
| 74675 | testAddr = sqlite3VdbeAddOp2(v, OP_Integer, 1, mem); |
| 74676 | assert( testAddr>0 || pParse->db->mallocFailed ); |
| 74677 | } |
| 74678 | |
| 74679 | #ifndef SQLITE_OMIT_EXPLAIN |
| 74680 | if( pParse->explain==2 ){ |
| @@ -74770,11 +74700,11 @@ | |
| 74770 | ** disable the test that was generated above that makes sure |
| 74771 | ** this code only executes once. Because for a non-constant |
| 74772 | ** expression we need to rerun this code each time. |
| 74773 | */ |
| 74774 | if( testAddr && !sqlite3ExprIsConstant(pE2) ){ |
| 74775 | sqlite3VdbeChangeToNoop(v, testAddr-1, 2); |
| 74776 | testAddr = 0; |
| 74777 | } |
| 74778 | |
| 74779 | /* Evaluate the expression and insert it into the temp table */ |
| 74780 | if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){ |
| @@ -74841,11 +74771,11 @@ | |
| 74841 | break; |
| 74842 | } |
| 74843 | } |
| 74844 | |
| 74845 | if( testAddr ){ |
| 74846 | sqlite3VdbeJumpHere(v, testAddr-1); |
| 74847 | } |
| 74848 | sqlite3ExprCachePop(pParse, 1); |
| 74849 | |
| 74850 | return rReg; |
| 74851 | } |
| @@ -76835,11 +76765,10 @@ | |
| 76835 | } |
| 76836 | } |
| 76837 | |
| 76838 | /************** End of expr.c ************************************************/ |
| 76839 | /************** Begin file alter.c *******************************************/ |
| 76840 | #line 1 "tsrc/alter.c" |
| 76841 | /* |
| 76842 | ** 2005 February 15 |
| 76843 | ** |
| 76844 | ** The author disclaims copyright to this source code. In place of |
| 76845 | ** a legal notice, here is a blessing: |
| @@ -77664,11 +77593,10 @@ | |
| 77664 | } |
| 77665 | #endif /* SQLITE_ALTER_TABLE */ |
| 77666 | |
| 77667 | /************** End of alter.c ***********************************************/ |
| 77668 | /************** Begin file analyze.c *****************************************/ |
| 77669 | #line 1 "tsrc/analyze.c" |
| 77670 | /* |
| 77671 | ** 2005 July 8 |
| 77672 | ** |
| 77673 | ** The author disclaims copyright to this source code. In place of |
| 77674 | ** a legal notice, here is a blessing: |
| @@ -78386,11 +78314,10 @@ | |
| 78386 | |
| 78387 | #endif /* SQLITE_OMIT_ANALYZE */ |
| 78388 | |
| 78389 | /************** End of analyze.c *********************************************/ |
| 78390 | /************** Begin file attach.c ******************************************/ |
| 78391 | #line 1 "tsrc/attach.c" |
| 78392 | /* |
| 78393 | ** 2003 April 6 |
| 78394 | ** |
| 78395 | ** The author disclaims copyright to this source code. In place of |
| 78396 | ** a legal notice, here is a blessing: |
| @@ -78946,11 +78873,10 @@ | |
| 78946 | } |
| 78947 | #endif |
| 78948 | |
| 78949 | /************** End of attach.c **********************************************/ |
| 78950 | /************** Begin file auth.c ********************************************/ |
| 78951 | #line 1 "tsrc/auth.c" |
| 78952 | /* |
| 78953 | ** 2003 January 11 |
| 78954 | ** |
| 78955 | ** The author disclaims copyright to this source code. In place of |
| 78956 | ** a legal notice, here is a blessing: |
| @@ -79198,11 +79124,10 @@ | |
| 79198 | |
| 79199 | #endif /* SQLITE_OMIT_AUTHORIZATION */ |
| 79200 | |
| 79201 | /************** End of auth.c ************************************************/ |
| 79202 | /************** Begin file build.c *******************************************/ |
| 79203 | #line 1 "tsrc/build.c" |
| 79204 | /* |
| 79205 | ** 2001 September 15 |
| 79206 | ** |
| 79207 | ** The author disclaims copyright to this source code. In place of |
| 79208 | ** a legal notice, here is a blessing: |
| @@ -83002,11 +82927,10 @@ | |
| 83002 | return pKey; |
| 83003 | } |
| 83004 | |
| 83005 | /************** End of build.c ***********************************************/ |
| 83006 | /************** Begin file callback.c ****************************************/ |
| 83007 | #line 1 "tsrc/callback.c" |
| 83008 | /* |
| 83009 | ** 2005 May 23 |
| 83010 | ** |
| 83011 | ** The author disclaims copyright to this source code. In place of |
| 83012 | ** a legal notice, here is a blessing: |
| @@ -83462,11 +83386,10 @@ | |
| 83462 | return p; |
| 83463 | } |
| 83464 | |
| 83465 | /************** End of callback.c ********************************************/ |
| 83466 | /************** Begin file delete.c ******************************************/ |
| 83467 | #line 1 "tsrc/delete.c" |
| 83468 | /* |
| 83469 | ** 2001 September 15 |
| 83470 | ** |
| 83471 | ** The author disclaims copyright to this source code. In place of |
| 83472 | ** a legal notice, here is a blessing: |
| @@ -84117,11 +84040,10 @@ | |
| 84117 | return regBase; |
| 84118 | } |
| 84119 | |
| 84120 | /************** End of delete.c **********************************************/ |
| 84121 | /************** Begin file func.c ********************************************/ |
| 84122 | #line 1 "tsrc/func.c" |
| 84123 | /* |
| 84124 | ** 2002 February 23 |
| 84125 | ** |
| 84126 | ** The author disclaims copyright to this source code. In place of |
| 84127 | ** a legal notice, here is a blessing: |
| @@ -85726,11 +85648,10 @@ | |
| 85726 | #endif |
| 85727 | } |
| 85728 | |
| 85729 | /************** End of func.c ************************************************/ |
| 85730 | /************** Begin file fkey.c ********************************************/ |
| 85731 | #line 1 "tsrc/fkey.c" |
| 85732 | /* |
| 85733 | ** |
| 85734 | ** The author disclaims copyright to this source code. In place of |
| 85735 | ** a legal notice, here is a blessing: |
| 85736 | ** |
| @@ -86947,11 +86868,10 @@ | |
| 86947 | } |
| 86948 | #endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */ |
| 86949 | |
| 86950 | /************** End of fkey.c ************************************************/ |
| 86951 | /************** Begin file insert.c ******************************************/ |
| 86952 | #line 1 "tsrc/insert.c" |
| 86953 | /* |
| 86954 | ** 2001 September 15 |
| 86955 | ** |
| 86956 | ** The author disclaims copyright to this source code. In place of |
| 86957 | ** a legal notice, here is a blessing: |
| @@ -88793,11 +88713,10 @@ | |
| 88793 | } |
| 88794 | #endif /* SQLITE_OMIT_XFER_OPT */ |
| 88795 | |
| 88796 | /************** End of insert.c **********************************************/ |
| 88797 | /************** Begin file legacy.c ******************************************/ |
| 88798 | #line 1 "tsrc/legacy.c" |
| 88799 | /* |
| 88800 | ** 2001 September 15 |
| 88801 | ** |
| 88802 | ** The author disclaims copyright to this source code. In place of |
| 88803 | ** a legal notice, here is a blessing: |
| @@ -88941,11 +88860,10 @@ | |
| 88941 | return rc; |
| 88942 | } |
| 88943 | |
| 88944 | /************** End of legacy.c **********************************************/ |
| 88945 | /************** Begin file loadext.c *****************************************/ |
| 88946 | #line 1 "tsrc/loadext.c" |
| 88947 | /* |
| 88948 | ** 2006 June 7 |
| 88949 | ** |
| 88950 | ** The author disclaims copyright to this source code. In place of |
| 88951 | ** a legal notice, here is a blessing: |
| @@ -88962,11 +88880,10 @@ | |
| 88962 | #ifndef SQLITE_CORE |
| 88963 | #define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */ |
| 88964 | #endif |
| 88965 | /************** Include sqlite3ext.h in the middle of loadext.c **************/ |
| 88966 | /************** Begin file sqlite3ext.h **************************************/ |
| 88967 | #line 1 "tsrc/sqlite3ext.h" |
| 88968 | /* |
| 88969 | ** 2006 June 7 |
| 88970 | ** |
| 88971 | ** The author disclaims copyright to this source code. In place of |
| 88972 | ** a legal notice, here is a blessing: |
| @@ -89391,11 +89308,10 @@ | |
| 89391 | |
| 89392 | #endif /* _SQLITE3EXT_H_ */ |
| 89393 | |
| 89394 | /************** End of sqlite3ext.h ******************************************/ |
| 89395 | /************** Continuing where we left off in loadext.c ********************/ |
| 89396 | #line 20 "tsrc/loadext.c" |
| 89397 | /* #include <string.h> */ |
| 89398 | |
| 89399 | #ifndef SQLITE_OMIT_LOAD_EXTENSION |
| 89400 | |
| 89401 | /* |
| @@ -90031,11 +89947,10 @@ | |
| 90031 | } |
| 90032 | } |
| 90033 | |
| 90034 | /************** End of loadext.c *********************************************/ |
| 90035 | /************** Begin file pragma.c ******************************************/ |
| 90036 | #line 1 "tsrc/pragma.c" |
| 90037 | /* |
| 90038 | ** 2003 April 6 |
| 90039 | ** |
| 90040 | ** The author disclaims copyright to this source code. In place of |
| 90041 | ** a legal notice, here is a blessing: |
| @@ -91560,11 +91475,10 @@ | |
| 91560 | |
| 91561 | #endif /* SQLITE_OMIT_PRAGMA */ |
| 91562 | |
| 91563 | /************** End of pragma.c **********************************************/ |
| 91564 | /************** Begin file prepare.c *****************************************/ |
| 91565 | #line 1 "tsrc/prepare.c" |
| 91566 | /* |
| 91567 | ** 2005 May 25 |
| 91568 | ** |
| 91569 | ** The author disclaims copyright to this source code. In place of |
| 91570 | ** a legal notice, here is a blessing: |
| @@ -92421,11 +92335,10 @@ | |
| 92421 | |
| 92422 | #endif /* SQLITE_OMIT_UTF16 */ |
| 92423 | |
| 92424 | /************** End of prepare.c *********************************************/ |
| 92425 | /************** Begin file select.c ******************************************/ |
| 92426 | #line 1 "tsrc/select.c" |
| 92427 | /* |
| 92428 | ** 2001 September 15 |
| 92429 | ** |
| 92430 | ** The author disclaims copyright to this source code. In place of |
| 92431 | ** a legal notice, here is a blessing: |
| @@ -92512,10 +92425,12 @@ | |
| 92512 | pNew->addrOpenEphm[2] = -1; |
| 92513 | if( db->mallocFailed ) { |
| 92514 | clearSelect(db, pNew); |
| 92515 | if( pNew!=&standin ) sqlite3DbFree(db, pNew); |
| 92516 | pNew = 0; |
| 92517 | } |
| 92518 | return pNew; |
| 92519 | } |
| 92520 | |
| 92521 | /* |
| @@ -96224,11 +96139,15 @@ | |
| 96224 | struct SrcList_item *pItem = &pTabList->a[i]; |
| 96225 | SelectDest dest; |
| 96226 | Select *pSub = pItem->pSelect; |
| 96227 | int isAggSub; |
| 96228 | |
| 96229 | if( pSub==0 || pItem->isPopulated ) continue; |
| 96230 | |
| 96231 | /* Increment Parse.nHeight by the height of the largest expression |
| 96232 | ** tree refered to by this, the parent select. The child select |
| 96233 | ** may contain expression trees of at most |
| 96234 | ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit |
| @@ -96235,25 +96154,48 @@ | |
| 96235 | ** more conservative than necessary, but much easier than enforcing |
| 96236 | ** an exact limit. |
| 96237 | */ |
| 96238 | pParse->nHeight += sqlite3SelectExprHeight(p); |
| 96239 | |
| 96240 | /* Check to see if the subquery can be absorbed into the parent. */ |
| 96241 | isAggSub = (pSub->selFlags & SF_Aggregate)!=0; |
| 96242 | if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){ |
| 96243 | if( isAggSub ){ |
| 96244 | isAgg = 1; |
| 96245 | p->selFlags |= SF_Aggregate; |
| 96246 | } |
| 96247 | i = -1; |
| 96248 | }else{ |
| 96249 | sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor); |
| 96250 | assert( pItem->isPopulated==0 ); |
| 96251 | explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId); |
| 96252 | sqlite3Select(pParse, pSub, &dest); |
| 96253 | pItem->isPopulated = 1; |
| 96254 | pItem->pTab->nRowEst = (unsigned)pSub->nSelectRow; |
| 96255 | } |
| 96256 | if( /*pParse->nErr ||*/ db->mallocFailed ){ |
| 96257 | goto select_end; |
| 96258 | } |
| 96259 | pParse->nHeight -= sqlite3SelectExprHeight(p); |
| @@ -96390,11 +96332,11 @@ | |
| 96390 | /* If sorting index that was created by a prior OP_OpenEphemeral |
| 96391 | ** instruction ended up not being needed, then change the OP_OpenEphemeral |
| 96392 | ** into an OP_Noop. |
| 96393 | */ |
| 96394 | if( addrSortIndex>=0 && pOrderBy==0 ){ |
| 96395 | sqlite3VdbeChangeToNoop(v, addrSortIndex, 1); |
| 96396 | p->addrOpenEphm[2] = -1; |
| 96397 | } |
| 96398 | |
| 96399 | if( pWInfo->eDistinct ){ |
| 96400 | VdbeOp *pOp; /* No longer required OpenEphemeral instr. */ |
| @@ -96673,11 +96615,11 @@ | |
| 96673 | */ |
| 96674 | if( groupBySort ){ |
| 96675 | sqlite3VdbeAddOp2(v, OP_SorterNext, sAggInfo.sortingIdx, addrTopOfLoop); |
| 96676 | }else{ |
| 96677 | sqlite3WhereEnd(pWInfo); |
| 96678 | sqlite3VdbeChangeToNoop(v, addrSortingIdx, 1); |
| 96679 | } |
| 96680 | |
| 96681 | /* Output the final row of result |
| 96682 | */ |
| 96683 | sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow); |
| @@ -96981,11 +96923,10 @@ | |
| 96981 | *****************************************************************************/ |
| 96982 | #endif /* defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */ |
| 96983 | |
| 96984 | /************** End of select.c **********************************************/ |
| 96985 | /************** Begin file table.c *******************************************/ |
| 96986 | #line 1 "tsrc/table.c" |
| 96987 | /* |
| 96988 | ** 2001 September 15 |
| 96989 | ** |
| 96990 | ** The author disclaims copyright to this source code. In place of |
| 96991 | ** a legal notice, here is a blessing: |
| @@ -97181,11 +97122,10 @@ | |
| 97181 | |
| 97182 | #endif /* SQLITE_OMIT_GET_TABLE */ |
| 97183 | |
| 97184 | /************** End of table.c ***********************************************/ |
| 97185 | /************** Begin file trigger.c *****************************************/ |
| 97186 | #line 1 "tsrc/trigger.c" |
| 97187 | /* |
| 97188 | ** |
| 97189 | ** The author disclaims copyright to this source code. In place of |
| 97190 | ** a legal notice, here is a blessing: |
| 97191 | ** |
| @@ -98307,11 +98247,10 @@ | |
| 98307 | |
| 98308 | #endif /* !defined(SQLITE_OMIT_TRIGGER) */ |
| 98309 | |
| 98310 | /************** End of trigger.c *********************************************/ |
| 98311 | /************** Begin file update.c ******************************************/ |
| 98312 | #line 1 "tsrc/update.c" |
| 98313 | /* |
| 98314 | ** 2001 September 15 |
| 98315 | ** |
| 98316 | ** The author disclaims copyright to this source code. In place of |
| 98317 | ** a legal notice, here is a blessing: |
| @@ -98980,11 +98919,10 @@ | |
| 98980 | } |
| 98981 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 98982 | |
| 98983 | /************** End of update.c **********************************************/ |
| 98984 | /************** Begin file vacuum.c ******************************************/ |
| 98985 | #line 1 "tsrc/vacuum.c" |
| 98986 | /* |
| 98987 | ** 2003 April 6 |
| 98988 | ** |
| 98989 | ** The author disclaims copyright to this source code. In place of |
| 98990 | ** a legal notice, here is a blessing: |
| @@ -99327,11 +99265,10 @@ | |
| 99327 | |
| 99328 | #endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */ |
| 99329 | |
| 99330 | /************** End of vacuum.c **********************************************/ |
| 99331 | /************** Begin file vtab.c ********************************************/ |
| 99332 | #line 1 "tsrc/vtab.c" |
| 99333 | /* |
| 99334 | ** 2006 June 10 |
| 99335 | ** |
| 99336 | ** The author disclaims copyright to this source code. In place of |
| 99337 | ** a legal notice, here is a blessing: |
| @@ -100396,11 +100333,10 @@ | |
| 100396 | |
| 100397 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 100398 | |
| 100399 | /************** End of vtab.c ************************************************/ |
| 100400 | /************** Begin file where.c *******************************************/ |
| 100401 | #line 1 "tsrc/where.c" |
| 100402 | /* |
| 100403 | ** 2001 September 15 |
| 100404 | ** |
| 100405 | ** The author disclaims copyright to this source code. In place of |
| 100406 | ** a legal notice, here is a blessing: |
| @@ -100865,15 +100801,23 @@ | |
| 100865 | return mask; |
| 100866 | } |
| 100867 | static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){ |
| 100868 | Bitmask mask = 0; |
| 100869 | while( pS ){ |
| 100870 | mask |= exprListTableUsage(pMaskSet, pS->pEList); |
| 100871 | mask |= exprListTableUsage(pMaskSet, pS->pGroupBy); |
| 100872 | mask |= exprListTableUsage(pMaskSet, pS->pOrderBy); |
| 100873 | mask |= exprTableUsage(pMaskSet, pS->pWhere); |
| 100874 | mask |= exprTableUsage(pMaskSet, pS->pHaving); |
| 100875 | pS = pS->pPrior; |
| 100876 | } |
| 100877 | return mask; |
| 100878 | } |
| 100879 | |
| @@ -102392,12 +102336,11 @@ | |
| 102392 | /* Generate code to skip over the creation and initialization of the |
| 102393 | ** transient index on 2nd and subsequent iterations of the loop. */ |
| 102394 | v = pParse->pVdbe; |
| 102395 | assert( v!=0 ); |
| 102396 | regIsInit = ++pParse->nMem; |
| 102397 | addrInit = sqlite3VdbeAddOp1(v, OP_If, regIsInit); |
| 102398 | sqlite3VdbeAddOp2(v, OP_Integer, 1, regIsInit); |
| 102399 | |
| 102400 | /* Count the number of columns that will be added to the index |
| 102401 | ** and used to match WHERE clause constraints */ |
| 102402 | nColumn = 0; |
| 102403 | pTable = pSrc->pTab; |
| @@ -105583,11 +105526,10 @@ | |
| 105583 | return; |
| 105584 | } |
| 105585 | |
| 105586 | /************** End of where.c ***********************************************/ |
| 105587 | /************** Begin file parse.c *******************************************/ |
| 105588 | #line 1 "tsrc/parse.c" |
| 105589 | /* Driver template for the LEMON parser generator. |
| 105590 | ** The author disclaims copyright to this source code. |
| 105591 | ** |
| 105592 | ** This version of "lempar.c" is modified, slightly, for use by SQLite. |
| 105593 | ** The only modifications are the addition of a couple of NEVER() |
| @@ -105596,11 +105538,10 @@ | |
| 105596 | ** specific grammar used by SQLite. |
| 105597 | */ |
| 105598 | /* First off, code is included that follows the "include" declaration |
| 105599 | ** in the input grammar file. */ |
| 105600 | /* #include <stdio.h> */ |
| 105601 | #line 51 "parse.y" |
| 105602 | |
| 105603 | |
| 105604 | /* |
| 105605 | ** Disable all error recovery processing in the parser push-down |
| 105606 | ** automaton. |
| @@ -105644,11 +105585,10 @@ | |
| 105644 | /* |
| 105645 | ** An instance of this structure holds the ATTACH key and the key type. |
| 105646 | */ |
| 105647 | struct AttachKey { int type; Token key; }; |
| 105648 | |
| 105649 | #line 722 "parse.y" |
| 105650 | |
| 105651 | /* This is a utility routine used to set the ExprSpan.zStart and |
| 105652 | ** ExprSpan.zEnd values of pOut so that the span covers the complete |
| 105653 | ** range of text beginning with pStart and going to the end of pEnd. |
| 105654 | */ |
| @@ -105664,11 +105604,10 @@ | |
| 105664 | static void spanExpr(ExprSpan *pOut, Parse *pParse, int op, Token *pValue){ |
| 105665 | pOut->pExpr = sqlite3PExpr(pParse, op, 0, 0, pValue); |
| 105666 | pOut->zStart = pValue->z; |
| 105667 | pOut->zEnd = &pValue->z[pValue->n]; |
| 105668 | } |
| 105669 | #line 817 "parse.y" |
| 105670 | |
| 105671 | /* This routine constructs a binary expression node out of two ExprSpan |
| 105672 | ** objects and uses the result to populate a new ExprSpan object. |
| 105673 | */ |
| 105674 | static void spanBinaryExpr( |
| @@ -105680,11 +105619,10 @@ | |
| 105680 | ){ |
| 105681 | pOut->pExpr = sqlite3PExpr(pParse, op, pLeft->pExpr, pRight->pExpr, 0); |
| 105682 | pOut->zStart = pLeft->zStart; |
| 105683 | pOut->zEnd = pRight->zEnd; |
| 105684 | } |
| 105685 | #line 873 "parse.y" |
| 105686 | |
| 105687 | /* Construct an expression node for a unary postfix operator |
| 105688 | */ |
| 105689 | static void spanUnaryPostfix( |
| 105690 | ExprSpan *pOut, /* Write the new expression node here */ |
| @@ -105695,11 +105633,10 @@ | |
| 105695 | ){ |
| 105696 | pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0); |
| 105697 | pOut->zStart = pOperand->zStart; |
| 105698 | pOut->zEnd = &pPostOp->z[pPostOp->n]; |
| 105699 | } |
| 105700 | #line 892 "parse.y" |
| 105701 | |
| 105702 | /* A routine to convert a binary TK_IS or TK_ISNOT expression into a |
| 105703 | ** unary TK_ISNULL or TK_NOTNULL expression. */ |
| 105704 | static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){ |
| 105705 | sqlite3 *db = pParse->db; |
| @@ -105707,11 +105644,10 @@ | |
| 105707 | pA->op = (u8)op; |
| 105708 | sqlite3ExprDelete(db, pA->pRight); |
| 105709 | pA->pRight = 0; |
| 105710 | } |
| 105711 | } |
| 105712 | #line 920 "parse.y" |
| 105713 | |
| 105714 | /* Construct an expression node for a unary prefix operator |
| 105715 | */ |
| 105716 | static void spanUnaryPrefix( |
| 105717 | ExprSpan *pOut, /* Write the new expression node here */ |
| @@ -105722,11 +105658,10 @@ | |
| 105722 | ){ |
| 105723 | pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0); |
| 105724 | pOut->zStart = pPreOp->z; |
| 105725 | pOut->zEnd = pOperand->zEnd; |
| 105726 | } |
| 105727 | #line 141 "parse.c" |
| 105728 | /* Next is all token values, in a form suitable for use by makeheaders. |
| 105729 | ** This section will be null unless lemon is run with the -m switch. |
| 105730 | */ |
| 105731 | /* |
| 105732 | ** These constants (all generated automatically by the parser generator) |
| @@ -106978,21 +106913,17 @@ | |
| 106978 | ** inside the C code. |
| 106979 | */ |
| 106980 | case 160: /* select */ |
| 106981 | case 194: /* oneselect */ |
| 106982 | { |
| 106983 | #line 403 "parse.y" |
| 106984 | sqlite3SelectDelete(pParse->db, (yypminor->yy387)); |
| 106985 | #line 1399 "parse.c" |
| 106986 | } |
| 106987 | break; |
| 106988 | case 174: /* term */ |
| 106989 | case 175: /* expr */ |
| 106990 | { |
| 106991 | #line 720 "parse.y" |
| 106992 | sqlite3ExprDelete(pParse->db, (yypminor->yy118).pExpr); |
| 106993 | #line 1407 "parse.c" |
| 106994 | } |
| 106995 | break; |
| 106996 | case 179: /* idxlist_opt */ |
| 106997 | case 187: /* idxlist */ |
| 106998 | case 197: /* selcollist */ |
| @@ -107004,23 +106935,19 @@ | |
| 107004 | case 217: /* setlist */ |
| 107005 | case 220: /* itemlist */ |
| 107006 | case 221: /* exprlist */ |
| 107007 | case 226: /* case_exprlist */ |
| 107008 | { |
| 107009 | #line 1103 "parse.y" |
| 107010 | sqlite3ExprListDelete(pParse->db, (yypminor->yy322)); |
| 107011 | #line 1425 "parse.c" |
| 107012 | } |
| 107013 | break; |
| 107014 | case 193: /* fullname */ |
| 107015 | case 198: /* from */ |
| 107016 | case 206: /* seltablist */ |
| 107017 | case 207: /* stl_prefix */ |
| 107018 | { |
| 107019 | #line 534 "parse.y" |
| 107020 | sqlite3SrcListDelete(pParse->db, (yypminor->yy259)); |
| 107021 | #line 1435 "parse.c" |
| 107022 | } |
| 107023 | break; |
| 107024 | case 199: /* where_opt */ |
| 107025 | case 201: /* having_opt */ |
| 107026 | case 210: /* on_opt */ |
| @@ -107028,37 +106955,29 @@ | |
| 107028 | case 225: /* case_operand */ |
| 107029 | case 227: /* case_else */ |
| 107030 | case 238: /* when_clause */ |
| 107031 | case 243: /* key_opt */ |
| 107032 | { |
| 107033 | #line 644 "parse.y" |
| 107034 | sqlite3ExprDelete(pParse->db, (yypminor->yy314)); |
| 107035 | #line 1449 "parse.c" |
| 107036 | } |
| 107037 | break; |
| 107038 | case 211: /* using_opt */ |
| 107039 | case 213: /* inscollist */ |
| 107040 | case 219: /* inscollist_opt */ |
| 107041 | { |
| 107042 | #line 566 "parse.y" |
| 107043 | sqlite3IdListDelete(pParse->db, (yypminor->yy384)); |
| 107044 | #line 1458 "parse.c" |
| 107045 | } |
| 107046 | break; |
| 107047 | case 234: /* trigger_cmd_list */ |
| 107048 | case 239: /* trigger_cmd */ |
| 107049 | { |
| 107050 | #line 1210 "parse.y" |
| 107051 | sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy203)); |
| 107052 | #line 1466 "parse.c" |
| 107053 | } |
| 107054 | break; |
| 107055 | case 236: /* trigger_event */ |
| 107056 | { |
| 107057 | #line 1196 "parse.y" |
| 107058 | sqlite3IdListDelete(pParse->db, (yypminor->yy90).b); |
| 107059 | #line 1473 "parse.c" |
| 107060 | } |
| 107061 | break; |
| 107062 | default: break; /* If no destructor action specified: do nothing */ |
| 107063 | } |
| 107064 | } |
| @@ -107240,16 +107159,14 @@ | |
| 107240 | } |
| 107241 | #endif |
| 107242 | while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); |
| 107243 | /* Here code is inserted which will execute if the parser |
| 107244 | ** stack every overflows */ |
| 107245 | #line 38 "parse.y" |
| 107246 | |
| 107247 | UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */ |
| 107248 | sqlite3ErrorMsg(pParse, "parser stack overflow"); |
| 107249 | pParse->parseError = 1; |
| 107250 | #line 1664 "parse.c" |
| 107251 | sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */ |
| 107252 | } |
| 107253 | |
| 107254 | /* |
| 107255 | ** Perform a shift action. |
| @@ -107686,94 +107603,66 @@ | |
| 107686 | ** { ... } // User supplied code |
| 107687 | ** #line <lineno> <thisfile> |
| 107688 | ** break; |
| 107689 | */ |
| 107690 | case 5: /* explain ::= */ |
| 107691 | #line 107 "parse.y" |
| 107692 | { sqlite3BeginParse(pParse, 0); } |
| 107693 | #line 2107 "parse.c" |
| 107694 | break; |
| 107695 | case 6: /* explain ::= EXPLAIN */ |
| 107696 | #line 109 "parse.y" |
| 107697 | { sqlite3BeginParse(pParse, 1); } |
| 107698 | #line 2112 "parse.c" |
| 107699 | break; |
| 107700 | case 7: /* explain ::= EXPLAIN QUERY PLAN */ |
| 107701 | #line 110 "parse.y" |
| 107702 | { sqlite3BeginParse(pParse, 2); } |
| 107703 | #line 2117 "parse.c" |
| 107704 | break; |
| 107705 | case 8: /* cmdx ::= cmd */ |
| 107706 | #line 112 "parse.y" |
| 107707 | { sqlite3FinishCoding(pParse); } |
| 107708 | #line 2122 "parse.c" |
| 107709 | break; |
| 107710 | case 9: /* cmd ::= BEGIN transtype trans_opt */ |
| 107711 | #line 117 "parse.y" |
| 107712 | {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy4);} |
| 107713 | #line 2127 "parse.c" |
| 107714 | break; |
| 107715 | case 13: /* transtype ::= */ |
| 107716 | #line 122 "parse.y" |
| 107717 | {yygotominor.yy4 = TK_DEFERRED;} |
| 107718 | #line 2132 "parse.c" |
| 107719 | break; |
| 107720 | case 14: /* transtype ::= DEFERRED */ |
| 107721 | case 15: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==15); |
| 107722 | case 16: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==16); |
| 107723 | case 115: /* multiselect_op ::= UNION */ yytestcase(yyruleno==115); |
| 107724 | case 117: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==117); |
| 107725 | #line 123 "parse.y" |
| 107726 | {yygotominor.yy4 = yymsp[0].major;} |
| 107727 | #line 2141 "parse.c" |
| 107728 | break; |
| 107729 | case 17: /* cmd ::= COMMIT trans_opt */ |
| 107730 | case 18: /* cmd ::= END trans_opt */ yytestcase(yyruleno==18); |
| 107731 | #line 126 "parse.y" |
| 107732 | {sqlite3CommitTransaction(pParse);} |
| 107733 | #line 2147 "parse.c" |
| 107734 | break; |
| 107735 | case 19: /* cmd ::= ROLLBACK trans_opt */ |
| 107736 | #line 128 "parse.y" |
| 107737 | {sqlite3RollbackTransaction(pParse);} |
| 107738 | #line 2152 "parse.c" |
| 107739 | break; |
| 107740 | case 22: /* cmd ::= SAVEPOINT nm */ |
| 107741 | #line 132 "parse.y" |
| 107742 | { |
| 107743 | sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0); |
| 107744 | } |
| 107745 | #line 2159 "parse.c" |
| 107746 | break; |
| 107747 | case 23: /* cmd ::= RELEASE savepoint_opt nm */ |
| 107748 | #line 135 "parse.y" |
| 107749 | { |
| 107750 | sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0); |
| 107751 | } |
| 107752 | #line 2166 "parse.c" |
| 107753 | break; |
| 107754 | case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */ |
| 107755 | #line 138 "parse.y" |
| 107756 | { |
| 107757 | sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0); |
| 107758 | } |
| 107759 | #line 2173 "parse.c" |
| 107760 | break; |
| 107761 | case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */ |
| 107762 | #line 145 "parse.y" |
| 107763 | { |
| 107764 | sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy4,0,0,yymsp[-2].minor.yy4); |
| 107765 | } |
| 107766 | #line 2180 "parse.c" |
| 107767 | break; |
| 107768 | case 27: /* createkw ::= CREATE */ |
| 107769 | #line 148 "parse.y" |
| 107770 | { |
| 107771 | pParse->db->lookaside.bEnabled = 0; |
| 107772 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 107773 | } |
| 107774 | #line 2188 "parse.c" |
| 107775 | break; |
| 107776 | case 28: /* ifnotexists ::= */ |
| 107777 | case 31: /* temp ::= */ yytestcase(yyruleno==31); |
| 107778 | case 70: /* autoinc ::= */ yytestcase(yyruleno==70); |
| 107779 | case 83: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==83); |
| @@ -107783,56 +107672,44 @@ | |
| 107783 | case 109: /* ifexists ::= */ yytestcase(yyruleno==109); |
| 107784 | case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120); |
| 107785 | case 121: /* distinct ::= */ yytestcase(yyruleno==121); |
| 107786 | case 222: /* between_op ::= BETWEEN */ yytestcase(yyruleno==222); |
| 107787 | case 225: /* in_op ::= IN */ yytestcase(yyruleno==225); |
| 107788 | #line 153 "parse.y" |
| 107789 | {yygotominor.yy4 = 0;} |
| 107790 | #line 2204 "parse.c" |
| 107791 | break; |
| 107792 | case 29: /* ifnotexists ::= IF NOT EXISTS */ |
| 107793 | case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30); |
| 107794 | case 71: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==71); |
| 107795 | case 86: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==86); |
| 107796 | case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108); |
| 107797 | case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119); |
| 107798 | case 223: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==223); |
| 107799 | case 226: /* in_op ::= NOT IN */ yytestcase(yyruleno==226); |
| 107800 | #line 154 "parse.y" |
| 107801 | {yygotominor.yy4 = 1;} |
| 107802 | #line 2216 "parse.c" |
| 107803 | break; |
| 107804 | case 32: /* create_table_args ::= LP columnlist conslist_opt RP */ |
| 107805 | #line 160 "parse.y" |
| 107806 | { |
| 107807 | sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0); |
| 107808 | } |
| 107809 | #line 2223 "parse.c" |
| 107810 | break; |
| 107811 | case 33: /* create_table_args ::= AS select */ |
| 107812 | #line 163 "parse.y" |
| 107813 | { |
| 107814 | sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy387); |
| 107815 | sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387); |
| 107816 | } |
| 107817 | #line 2231 "parse.c" |
| 107818 | break; |
| 107819 | case 36: /* column ::= columnid type carglist */ |
| 107820 | #line 175 "parse.y" |
| 107821 | { |
| 107822 | yygotominor.yy0.z = yymsp[-2].minor.yy0.z; |
| 107823 | yygotominor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n; |
| 107824 | } |
| 107825 | #line 2239 "parse.c" |
| 107826 | break; |
| 107827 | case 37: /* columnid ::= nm */ |
| 107828 | #line 179 "parse.y" |
| 107829 | { |
| 107830 | sqlite3AddColumn(pParse,&yymsp[0].minor.yy0); |
| 107831 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 107832 | } |
| 107833 | #line 2247 "parse.c" |
| 107834 | break; |
| 107835 | case 38: /* id ::= ID */ |
| 107836 | case 39: /* id ::= INDEXED */ yytestcase(yyruleno==39); |
| 107837 | case 40: /* ids ::= ID|STRING */ yytestcase(yyruleno==40); |
| 107838 | case 41: /* nm ::= id */ yytestcase(yyruleno==41); |
| @@ -107852,373 +107729,256 @@ | |
| 107852 | case 264: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==264); |
| 107853 | case 265: /* plus_num ::= plus_opt number */ yytestcase(yyruleno==265); |
| 107854 | case 266: /* minus_num ::= MINUS number */ yytestcase(yyruleno==266); |
| 107855 | case 267: /* number ::= INTEGER|FLOAT */ yytestcase(yyruleno==267); |
| 107856 | case 285: /* trnm ::= nm */ yytestcase(yyruleno==285); |
| 107857 | #line 189 "parse.y" |
| 107858 | {yygotominor.yy0 = yymsp[0].minor.yy0;} |
| 107859 | #line 2273 "parse.c" |
| 107860 | break; |
| 107861 | case 45: /* type ::= typetoken */ |
| 107862 | #line 251 "parse.y" |
| 107863 | {sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);} |
| 107864 | #line 2278 "parse.c" |
| 107865 | break; |
| 107866 | case 47: /* typetoken ::= typename LP signed RP */ |
| 107867 | #line 253 "parse.y" |
| 107868 | { |
| 107869 | yygotominor.yy0.z = yymsp[-3].minor.yy0.z; |
| 107870 | yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z); |
| 107871 | } |
| 107872 | #line 2286 "parse.c" |
| 107873 | break; |
| 107874 | case 48: /* typetoken ::= typename LP signed COMMA signed RP */ |
| 107875 | #line 257 "parse.y" |
| 107876 | { |
| 107877 | yygotominor.yy0.z = yymsp[-5].minor.yy0.z; |
| 107878 | yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z); |
| 107879 | } |
| 107880 | #line 2294 "parse.c" |
| 107881 | break; |
| 107882 | case 50: /* typename ::= typename ids */ |
| 107883 | #line 263 "parse.y" |
| 107884 | {yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);} |
| 107885 | #line 2299 "parse.c" |
| 107886 | break; |
| 107887 | case 57: /* ccons ::= DEFAULT term */ |
| 107888 | case 59: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==59); |
| 107889 | #line 274 "parse.y" |
| 107890 | {sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy118);} |
| 107891 | #line 2305 "parse.c" |
| 107892 | break; |
| 107893 | case 58: /* ccons ::= DEFAULT LP expr RP */ |
| 107894 | #line 275 "parse.y" |
| 107895 | {sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy118);} |
| 107896 | #line 2310 "parse.c" |
| 107897 | break; |
| 107898 | case 60: /* ccons ::= DEFAULT MINUS term */ |
| 107899 | #line 277 "parse.y" |
| 107900 | { |
| 107901 | ExprSpan v; |
| 107902 | v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy118.pExpr, 0, 0); |
| 107903 | v.zStart = yymsp[-1].minor.yy0.z; |
| 107904 | v.zEnd = yymsp[0].minor.yy118.zEnd; |
| 107905 | sqlite3AddDefaultValue(pParse,&v); |
| 107906 | } |
| 107907 | #line 2321 "parse.c" |
| 107908 | break; |
| 107909 | case 61: /* ccons ::= DEFAULT id */ |
| 107910 | #line 284 "parse.y" |
| 107911 | { |
| 107912 | ExprSpan v; |
| 107913 | spanExpr(&v, pParse, TK_STRING, &yymsp[0].minor.yy0); |
| 107914 | sqlite3AddDefaultValue(pParse,&v); |
| 107915 | } |
| 107916 | #line 2330 "parse.c" |
| 107917 | break; |
| 107918 | case 63: /* ccons ::= NOT NULL onconf */ |
| 107919 | #line 294 "parse.y" |
| 107920 | {sqlite3AddNotNull(pParse, yymsp[0].minor.yy4);} |
| 107921 | #line 2335 "parse.c" |
| 107922 | break; |
| 107923 | case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */ |
| 107924 | #line 296 "parse.y" |
| 107925 | {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy4,yymsp[0].minor.yy4,yymsp[-2].minor.yy4);} |
| 107926 | #line 2340 "parse.c" |
| 107927 | break; |
| 107928 | case 65: /* ccons ::= UNIQUE onconf */ |
| 107929 | #line 297 "parse.y" |
| 107930 | {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy4,0,0,0,0);} |
| 107931 | #line 2345 "parse.c" |
| 107932 | break; |
| 107933 | case 66: /* ccons ::= CHECK LP expr RP */ |
| 107934 | #line 298 "parse.y" |
| 107935 | {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy118.pExpr);} |
| 107936 | #line 2350 "parse.c" |
| 107937 | break; |
| 107938 | case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */ |
| 107939 | #line 300 "parse.y" |
| 107940 | {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy322,yymsp[0].minor.yy4);} |
| 107941 | #line 2355 "parse.c" |
| 107942 | break; |
| 107943 | case 68: /* ccons ::= defer_subclause */ |
| 107944 | #line 301 "parse.y" |
| 107945 | {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy4);} |
| 107946 | #line 2360 "parse.c" |
| 107947 | break; |
| 107948 | case 69: /* ccons ::= COLLATE ids */ |
| 107949 | #line 302 "parse.y" |
| 107950 | {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);} |
| 107951 | #line 2365 "parse.c" |
| 107952 | break; |
| 107953 | case 72: /* refargs ::= */ |
| 107954 | #line 315 "parse.y" |
| 107955 | { yygotominor.yy4 = OE_None*0x0101; /* EV: R-19803-45884 */} |
| 107956 | #line 2370 "parse.c" |
| 107957 | break; |
| 107958 | case 73: /* refargs ::= refargs refarg */ |
| 107959 | #line 316 "parse.y" |
| 107960 | { yygotominor.yy4 = (yymsp[-1].minor.yy4 & ~yymsp[0].minor.yy215.mask) | yymsp[0].minor.yy215.value; } |
| 107961 | #line 2375 "parse.c" |
| 107962 | break; |
| 107963 | case 74: /* refarg ::= MATCH nm */ |
| 107964 | case 75: /* refarg ::= ON INSERT refact */ yytestcase(yyruleno==75); |
| 107965 | #line 318 "parse.y" |
| 107966 | { yygotominor.yy215.value = 0; yygotominor.yy215.mask = 0x000000; } |
| 107967 | #line 2381 "parse.c" |
| 107968 | break; |
| 107969 | case 76: /* refarg ::= ON DELETE refact */ |
| 107970 | #line 320 "parse.y" |
| 107971 | { yygotominor.yy215.value = yymsp[0].minor.yy4; yygotominor.yy215.mask = 0x0000ff; } |
| 107972 | #line 2386 "parse.c" |
| 107973 | break; |
| 107974 | case 77: /* refarg ::= ON UPDATE refact */ |
| 107975 | #line 321 "parse.y" |
| 107976 | { yygotominor.yy215.value = yymsp[0].minor.yy4<<8; yygotominor.yy215.mask = 0x00ff00; } |
| 107977 | #line 2391 "parse.c" |
| 107978 | break; |
| 107979 | case 78: /* refact ::= SET NULL */ |
| 107980 | #line 323 "parse.y" |
| 107981 | { yygotominor.yy4 = OE_SetNull; /* EV: R-33326-45252 */} |
| 107982 | #line 2396 "parse.c" |
| 107983 | break; |
| 107984 | case 79: /* refact ::= SET DEFAULT */ |
| 107985 | #line 324 "parse.y" |
| 107986 | { yygotominor.yy4 = OE_SetDflt; /* EV: R-33326-45252 */} |
| 107987 | #line 2401 "parse.c" |
| 107988 | break; |
| 107989 | case 80: /* refact ::= CASCADE */ |
| 107990 | #line 325 "parse.y" |
| 107991 | { yygotominor.yy4 = OE_Cascade; /* EV: R-33326-45252 */} |
| 107992 | #line 2406 "parse.c" |
| 107993 | break; |
| 107994 | case 81: /* refact ::= RESTRICT */ |
| 107995 | #line 326 "parse.y" |
| 107996 | { yygotominor.yy4 = OE_Restrict; /* EV: R-33326-45252 */} |
| 107997 | #line 2411 "parse.c" |
| 107998 | break; |
| 107999 | case 82: /* refact ::= NO ACTION */ |
| 108000 | #line 327 "parse.y" |
| 108001 | { yygotominor.yy4 = OE_None; /* EV: R-33326-45252 */} |
| 108002 | #line 2416 "parse.c" |
| 108003 | break; |
| 108004 | case 84: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ |
| 108005 | case 99: /* defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==99); |
| 108006 | case 101: /* onconf ::= ON CONFLICT resolvetype */ yytestcase(yyruleno==101); |
| 108007 | case 104: /* resolvetype ::= raisetype */ yytestcase(yyruleno==104); |
| 108008 | #line 330 "parse.y" |
| 108009 | {yygotominor.yy4 = yymsp[0].minor.yy4;} |
| 108010 | #line 2424 "parse.c" |
| 108011 | break; |
| 108012 | case 88: /* conslist_opt ::= */ |
| 108013 | #line 339 "parse.y" |
| 108014 | {yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;} |
| 108015 | #line 2429 "parse.c" |
| 108016 | break; |
| 108017 | case 89: /* conslist_opt ::= COMMA conslist */ |
| 108018 | #line 340 "parse.y" |
| 108019 | {yygotominor.yy0 = yymsp[-1].minor.yy0;} |
| 108020 | #line 2434 "parse.c" |
| 108021 | break; |
| 108022 | case 94: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */ |
| 108023 | #line 346 "parse.y" |
| 108024 | {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy322,yymsp[0].minor.yy4,yymsp[-2].minor.yy4,0);} |
| 108025 | #line 2439 "parse.c" |
| 108026 | break; |
| 108027 | case 95: /* tcons ::= UNIQUE LP idxlist RP onconf */ |
| 108028 | #line 348 "parse.y" |
| 108029 | {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy322,yymsp[0].minor.yy4,0,0,0,0);} |
| 108030 | #line 2444 "parse.c" |
| 108031 | break; |
| 108032 | case 96: /* tcons ::= CHECK LP expr RP onconf */ |
| 108033 | #line 350 "parse.y" |
| 108034 | {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy118.pExpr);} |
| 108035 | #line 2449 "parse.c" |
| 108036 | break; |
| 108037 | case 97: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */ |
| 108038 | #line 352 "parse.y" |
| 108039 | { |
| 108040 | sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy322, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[-1].minor.yy4); |
| 108041 | sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy4); |
| 108042 | } |
| 108043 | #line 2457 "parse.c" |
| 108044 | break; |
| 108045 | case 100: /* onconf ::= */ |
| 108046 | #line 366 "parse.y" |
| 108047 | {yygotominor.yy4 = OE_Default;} |
| 108048 | #line 2462 "parse.c" |
| 108049 | break; |
| 108050 | case 102: /* orconf ::= */ |
| 108051 | #line 368 "parse.y" |
| 108052 | {yygotominor.yy210 = OE_Default;} |
| 108053 | #line 2467 "parse.c" |
| 108054 | break; |
| 108055 | case 103: /* orconf ::= OR resolvetype */ |
| 108056 | #line 369 "parse.y" |
| 108057 | {yygotominor.yy210 = (u8)yymsp[0].minor.yy4;} |
| 108058 | #line 2472 "parse.c" |
| 108059 | break; |
| 108060 | case 105: /* resolvetype ::= IGNORE */ |
| 108061 | #line 371 "parse.y" |
| 108062 | {yygotominor.yy4 = OE_Ignore;} |
| 108063 | #line 2477 "parse.c" |
| 108064 | break; |
| 108065 | case 106: /* resolvetype ::= REPLACE */ |
| 108066 | #line 372 "parse.y" |
| 108067 | {yygotominor.yy4 = OE_Replace;} |
| 108068 | #line 2482 "parse.c" |
| 108069 | break; |
| 108070 | case 107: /* cmd ::= DROP TABLE ifexists fullname */ |
| 108071 | #line 376 "parse.y" |
| 108072 | { |
| 108073 | sqlite3DropTable(pParse, yymsp[0].minor.yy259, 0, yymsp[-1].minor.yy4); |
| 108074 | } |
| 108075 | #line 2489 "parse.c" |
| 108076 | break; |
| 108077 | case 110: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */ |
| 108078 | #line 386 "parse.y" |
| 108079 | { |
| 108080 | sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy387, yymsp[-6].minor.yy4, yymsp[-4].minor.yy4); |
| 108081 | } |
| 108082 | #line 2496 "parse.c" |
| 108083 | break; |
| 108084 | case 111: /* cmd ::= DROP VIEW ifexists fullname */ |
| 108085 | #line 389 "parse.y" |
| 108086 | { |
| 108087 | sqlite3DropTable(pParse, yymsp[0].minor.yy259, 1, yymsp[-1].minor.yy4); |
| 108088 | } |
| 108089 | #line 2503 "parse.c" |
| 108090 | break; |
| 108091 | case 112: /* cmd ::= select */ |
| 108092 | #line 396 "parse.y" |
| 108093 | { |
| 108094 | SelectDest dest = {SRT_Output, 0, 0, 0, 0}; |
| 108095 | sqlite3Select(pParse, yymsp[0].minor.yy387, &dest); |
| 108096 | sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387); |
| 108097 | } |
| 108098 | #line 2512 "parse.c" |
| 108099 | break; |
| 108100 | case 113: /* select ::= oneselect */ |
| 108101 | #line 407 "parse.y" |
| 108102 | {yygotominor.yy387 = yymsp[0].minor.yy387;} |
| 108103 | #line 2517 "parse.c" |
| 108104 | break; |
| 108105 | case 114: /* select ::= select multiselect_op oneselect */ |
| 108106 | #line 409 "parse.y" |
| 108107 | { |
| 108108 | if( yymsp[0].minor.yy387 ){ |
| 108109 | yymsp[0].minor.yy387->op = (u8)yymsp[-1].minor.yy4; |
| 108110 | yymsp[0].minor.yy387->pPrior = yymsp[-2].minor.yy387; |
| 108111 | }else{ |
| 108112 | sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy387); |
| 108113 | } |
| 108114 | yygotominor.yy387 = yymsp[0].minor.yy387; |
| 108115 | } |
| 108116 | #line 2530 "parse.c" |
| 108117 | break; |
| 108118 | case 116: /* multiselect_op ::= UNION ALL */ |
| 108119 | #line 420 "parse.y" |
| 108120 | {yygotominor.yy4 = TK_ALL;} |
| 108121 | #line 2535 "parse.c" |
| 108122 | break; |
| 108123 | case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ |
| 108124 | #line 424 "parse.y" |
| 108125 | { |
| 108126 | yygotominor.yy387 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy322,yymsp[-5].minor.yy259,yymsp[-4].minor.yy314,yymsp[-3].minor.yy322,yymsp[-2].minor.yy314,yymsp[-1].minor.yy322,yymsp[-7].minor.yy4,yymsp[0].minor.yy292.pLimit,yymsp[0].minor.yy292.pOffset); |
| 108127 | } |
| 108128 | #line 2542 "parse.c" |
| 108129 | break; |
| 108130 | case 122: /* sclp ::= selcollist COMMA */ |
| 108131 | case 247: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==247); |
| 108132 | #line 445 "parse.y" |
| 108133 | {yygotominor.yy322 = yymsp[-1].minor.yy322;} |
| 108134 | #line 2548 "parse.c" |
| 108135 | break; |
| 108136 | case 123: /* sclp ::= */ |
| 108137 | case 151: /* orderby_opt ::= */ yytestcase(yyruleno==151); |
| 108138 | case 159: /* groupby_opt ::= */ yytestcase(yyruleno==159); |
| 108139 | case 240: /* exprlist ::= */ yytestcase(yyruleno==240); |
| 108140 | case 246: /* idxlist_opt ::= */ yytestcase(yyruleno==246); |
| 108141 | #line 446 "parse.y" |
| 108142 | {yygotominor.yy322 = 0;} |
| 108143 | #line 2557 "parse.c" |
| 108144 | break; |
| 108145 | case 124: /* selcollist ::= sclp expr as */ |
| 108146 | #line 447 "parse.y" |
| 108147 | { |
| 108148 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy322, yymsp[-1].minor.yy118.pExpr); |
| 108149 | if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[0].minor.yy0, 1); |
| 108150 | sqlite3ExprListSetSpan(pParse,yygotominor.yy322,&yymsp[-1].minor.yy118); |
| 108151 | } |
| 108152 | #line 2566 "parse.c" |
| 108153 | break; |
| 108154 | case 125: /* selcollist ::= sclp STAR */ |
| 108155 | #line 452 "parse.y" |
| 108156 | { |
| 108157 | Expr *p = sqlite3Expr(pParse->db, TK_ALL, 0); |
| 108158 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy322, p); |
| 108159 | } |
| 108160 | #line 2574 "parse.c" |
| 108161 | break; |
| 108162 | case 126: /* selcollist ::= sclp nm DOT STAR */ |
| 108163 | #line 456 "parse.y" |
| 108164 | { |
| 108165 | Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0); |
| 108166 | Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108167 | Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0); |
| 108168 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, pDot); |
| 108169 | } |
| 108170 | #line 2584 "parse.c" |
| 108171 | break; |
| 108172 | case 129: /* as ::= */ |
| 108173 | #line 469 "parse.y" |
| 108174 | {yygotominor.yy0.n = 0;} |
| 108175 | #line 2589 "parse.c" |
| 108176 | break; |
| 108177 | case 130: /* from ::= */ |
| 108178 | #line 481 "parse.y" |
| 108179 | {yygotominor.yy259 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy259));} |
| 108180 | #line 2594 "parse.c" |
| 108181 | break; |
| 108182 | case 131: /* from ::= FROM seltablist */ |
| 108183 | #line 482 "parse.y" |
| 108184 | { |
| 108185 | yygotominor.yy259 = yymsp[0].minor.yy259; |
| 108186 | sqlite3SrcListShiftJoinType(yygotominor.yy259); |
| 108187 | } |
| 108188 | #line 2602 "parse.c" |
| 108189 | break; |
| 108190 | case 132: /* stl_prefix ::= seltablist joinop */ |
| 108191 | #line 490 "parse.y" |
| 108192 | { |
| 108193 | yygotominor.yy259 = yymsp[-1].minor.yy259; |
| 108194 | if( ALWAYS(yygotominor.yy259 && yygotominor.yy259->nSrc>0) ) yygotominor.yy259->a[yygotominor.yy259->nSrc-1].jointype = (u8)yymsp[0].minor.yy4; |
| 108195 | } |
| 108196 | #line 2610 "parse.c" |
| 108197 | break; |
| 108198 | case 133: /* stl_prefix ::= */ |
| 108199 | #line 494 "parse.y" |
| 108200 | {yygotominor.yy259 = 0;} |
| 108201 | #line 2615 "parse.c" |
| 108202 | break; |
| 108203 | case 134: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */ |
| 108204 | #line 495 "parse.y" |
| 108205 | { |
| 108206 | yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy314,yymsp[0].minor.yy384); |
| 108207 | sqlite3SrcListIndexedBy(pParse, yygotominor.yy259, &yymsp[-2].minor.yy0); |
| 108208 | } |
| 108209 | #line 2623 "parse.c" |
| 108210 | break; |
| 108211 | case 135: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */ |
| 108212 | #line 501 "parse.y" |
| 108213 | { |
| 108214 | yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy387,yymsp[-1].minor.yy314,yymsp[0].minor.yy384); |
| 108215 | } |
| 108216 | #line 2630 "parse.c" |
| 108217 | break; |
| 108218 | case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ |
| 108219 | #line 505 "parse.y" |
| 108220 | { |
| 108221 | if( yymsp[-6].minor.yy259==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy314==0 && yymsp[0].minor.yy384==0 ){ |
| 108222 | yygotominor.yy259 = yymsp[-4].minor.yy259; |
| 108223 | }else{ |
| 108224 | Select *pSubquery; |
| @@ -108225,260 +107985,180 @@ | |
| 108225 | sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy259); |
| 108226 | pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy259,0,0,0,0,0,0,0); |
| 108227 | yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy314,yymsp[0].minor.yy384); |
| 108228 | } |
| 108229 | } |
| 108230 | #line 2644 "parse.c" |
| 108231 | break; |
| 108232 | case 137: /* dbnm ::= */ |
| 108233 | case 146: /* indexed_opt ::= */ yytestcase(yyruleno==146); |
| 108234 | #line 530 "parse.y" |
| 108235 | {yygotominor.yy0.z=0; yygotominor.yy0.n=0;} |
| 108236 | #line 2650 "parse.c" |
| 108237 | break; |
| 108238 | case 139: /* fullname ::= nm dbnm */ |
| 108239 | #line 535 "parse.y" |
| 108240 | {yygotominor.yy259 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);} |
| 108241 | #line 2655 "parse.c" |
| 108242 | break; |
| 108243 | case 140: /* joinop ::= COMMA|JOIN */ |
| 108244 | #line 539 "parse.y" |
| 108245 | { yygotominor.yy4 = JT_INNER; } |
| 108246 | #line 2660 "parse.c" |
| 108247 | break; |
| 108248 | case 141: /* joinop ::= JOIN_KW JOIN */ |
| 108249 | #line 540 "parse.y" |
| 108250 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); } |
| 108251 | #line 2665 "parse.c" |
| 108252 | break; |
| 108253 | case 142: /* joinop ::= JOIN_KW nm JOIN */ |
| 108254 | #line 541 "parse.y" |
| 108255 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); } |
| 108256 | #line 2670 "parse.c" |
| 108257 | break; |
| 108258 | case 143: /* joinop ::= JOIN_KW nm nm JOIN */ |
| 108259 | #line 543 "parse.y" |
| 108260 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); } |
| 108261 | #line 2675 "parse.c" |
| 108262 | break; |
| 108263 | case 144: /* on_opt ::= ON expr */ |
| 108264 | case 155: /* sortitem ::= expr */ yytestcase(yyruleno==155); |
| 108265 | case 162: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==162); |
| 108266 | case 169: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==169); |
| 108267 | case 235: /* case_else ::= ELSE expr */ yytestcase(yyruleno==235); |
| 108268 | case 237: /* case_operand ::= expr */ yytestcase(yyruleno==237); |
| 108269 | #line 547 "parse.y" |
| 108270 | {yygotominor.yy314 = yymsp[0].minor.yy118.pExpr;} |
| 108271 | #line 2685 "parse.c" |
| 108272 | break; |
| 108273 | case 145: /* on_opt ::= */ |
| 108274 | case 161: /* having_opt ::= */ yytestcase(yyruleno==161); |
| 108275 | case 168: /* where_opt ::= */ yytestcase(yyruleno==168); |
| 108276 | case 236: /* case_else ::= */ yytestcase(yyruleno==236); |
| 108277 | case 238: /* case_operand ::= */ yytestcase(yyruleno==238); |
| 108278 | #line 548 "parse.y" |
| 108279 | {yygotominor.yy314 = 0;} |
| 108280 | #line 2694 "parse.c" |
| 108281 | break; |
| 108282 | case 148: /* indexed_opt ::= NOT INDEXED */ |
| 108283 | #line 563 "parse.y" |
| 108284 | {yygotominor.yy0.z=0; yygotominor.yy0.n=1;} |
| 108285 | #line 2699 "parse.c" |
| 108286 | break; |
| 108287 | case 149: /* using_opt ::= USING LP inscollist RP */ |
| 108288 | case 181: /* inscollist_opt ::= LP inscollist RP */ yytestcase(yyruleno==181); |
| 108289 | #line 567 "parse.y" |
| 108290 | {yygotominor.yy384 = yymsp[-1].minor.yy384;} |
| 108291 | #line 2705 "parse.c" |
| 108292 | break; |
| 108293 | case 150: /* using_opt ::= */ |
| 108294 | case 180: /* inscollist_opt ::= */ yytestcase(yyruleno==180); |
| 108295 | #line 568 "parse.y" |
| 108296 | {yygotominor.yy384 = 0;} |
| 108297 | #line 2711 "parse.c" |
| 108298 | break; |
| 108299 | case 152: /* orderby_opt ::= ORDER BY sortlist */ |
| 108300 | case 160: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==160); |
| 108301 | case 239: /* exprlist ::= nexprlist */ yytestcase(yyruleno==239); |
| 108302 | #line 579 "parse.y" |
| 108303 | {yygotominor.yy322 = yymsp[0].minor.yy322;} |
| 108304 | #line 2718 "parse.c" |
| 108305 | break; |
| 108306 | case 153: /* sortlist ::= sortlist COMMA sortitem sortorder */ |
| 108307 | #line 580 "parse.y" |
| 108308 | { |
| 108309 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322,yymsp[-1].minor.yy314); |
| 108310 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108311 | } |
| 108312 | #line 2726 "parse.c" |
| 108313 | break; |
| 108314 | case 154: /* sortlist ::= sortitem sortorder */ |
| 108315 | #line 584 "parse.y" |
| 108316 | { |
| 108317 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy314); |
| 108318 | if( yygotominor.yy322 && ALWAYS(yygotominor.yy322->a) ) yygotominor.yy322->a[0].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108319 | } |
| 108320 | #line 2734 "parse.c" |
| 108321 | break; |
| 108322 | case 156: /* sortorder ::= ASC */ |
| 108323 | case 158: /* sortorder ::= */ yytestcase(yyruleno==158); |
| 108324 | #line 592 "parse.y" |
| 108325 | {yygotominor.yy4 = SQLITE_SO_ASC;} |
| 108326 | #line 2740 "parse.c" |
| 108327 | break; |
| 108328 | case 157: /* sortorder ::= DESC */ |
| 108329 | #line 593 "parse.y" |
| 108330 | {yygotominor.yy4 = SQLITE_SO_DESC;} |
| 108331 | #line 2745 "parse.c" |
| 108332 | break; |
| 108333 | case 163: /* limit_opt ::= */ |
| 108334 | #line 619 "parse.y" |
| 108335 | {yygotominor.yy292.pLimit = 0; yygotominor.yy292.pOffset = 0;} |
| 108336 | #line 2750 "parse.c" |
| 108337 | break; |
| 108338 | case 164: /* limit_opt ::= LIMIT expr */ |
| 108339 | #line 620 "parse.y" |
| 108340 | {yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr; yygotominor.yy292.pOffset = 0;} |
| 108341 | #line 2755 "parse.c" |
| 108342 | break; |
| 108343 | case 165: /* limit_opt ::= LIMIT expr OFFSET expr */ |
| 108344 | #line 622 "parse.y" |
| 108345 | {yygotominor.yy292.pLimit = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pOffset = yymsp[0].minor.yy118.pExpr;} |
| 108346 | #line 2760 "parse.c" |
| 108347 | break; |
| 108348 | case 166: /* limit_opt ::= LIMIT expr COMMA expr */ |
| 108349 | #line 624 "parse.y" |
| 108350 | {yygotominor.yy292.pOffset = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr;} |
| 108351 | #line 2765 "parse.c" |
| 108352 | break; |
| 108353 | case 167: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */ |
| 108354 | #line 637 "parse.y" |
| 108355 | { |
| 108356 | sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy259, &yymsp[-1].minor.yy0); |
| 108357 | sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy259,yymsp[0].minor.yy314); |
| 108358 | } |
| 108359 | #line 2773 "parse.c" |
| 108360 | break; |
| 108361 | case 170: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */ |
| 108362 | #line 660 "parse.y" |
| 108363 | { |
| 108364 | sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy259, &yymsp[-3].minor.yy0); |
| 108365 | sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy322,"set list"); |
| 108366 | sqlite3Update(pParse,yymsp[-4].minor.yy259,yymsp[-1].minor.yy322,yymsp[0].minor.yy314,yymsp[-5].minor.yy210); |
| 108367 | } |
| 108368 | #line 2782 "parse.c" |
| 108369 | break; |
| 108370 | case 171: /* setlist ::= setlist COMMA nm EQ expr */ |
| 108371 | #line 670 "parse.y" |
| 108372 | { |
| 108373 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108374 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108375 | } |
| 108376 | #line 2790 "parse.c" |
| 108377 | break; |
| 108378 | case 172: /* setlist ::= nm EQ expr */ |
| 108379 | #line 674 "parse.y" |
| 108380 | { |
| 108381 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy118.pExpr); |
| 108382 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108383 | } |
| 108384 | #line 2798 "parse.c" |
| 108385 | break; |
| 108386 | case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */ |
| 108387 | #line 683 "parse.y" |
| 108388 | {sqlite3Insert(pParse, yymsp[-5].minor.yy259, yymsp[-1].minor.yy322, 0, yymsp[-4].minor.yy384, yymsp[-7].minor.yy210);} |
| 108389 | #line 2803 "parse.c" |
| 108390 | break; |
| 108391 | case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */ |
| 108392 | #line 685 "parse.y" |
| 108393 | {sqlite3Insert(pParse, yymsp[-2].minor.yy259, 0, yymsp[0].minor.yy387, yymsp[-1].minor.yy384, yymsp[-4].minor.yy210);} |
| 108394 | #line 2808 "parse.c" |
| 108395 | break; |
| 108396 | case 175: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */ |
| 108397 | #line 687 "parse.y" |
| 108398 | {sqlite3Insert(pParse, yymsp[-3].minor.yy259, 0, 0, yymsp[-2].minor.yy384, yymsp[-5].minor.yy210);} |
| 108399 | #line 2813 "parse.c" |
| 108400 | break; |
| 108401 | case 176: /* insert_cmd ::= INSERT orconf */ |
| 108402 | #line 690 "parse.y" |
| 108403 | {yygotominor.yy210 = yymsp[0].minor.yy210;} |
| 108404 | #line 2818 "parse.c" |
| 108405 | break; |
| 108406 | case 177: /* insert_cmd ::= REPLACE */ |
| 108407 | #line 691 "parse.y" |
| 108408 | {yygotominor.yy210 = OE_Replace;} |
| 108409 | #line 2823 "parse.c" |
| 108410 | break; |
| 108411 | case 178: /* itemlist ::= itemlist COMMA expr */ |
| 108412 | case 241: /* nexprlist ::= nexprlist COMMA expr */ yytestcase(yyruleno==241); |
| 108413 | #line 698 "parse.y" |
| 108414 | {yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy118.pExpr);} |
| 108415 | #line 2829 "parse.c" |
| 108416 | break; |
| 108417 | case 179: /* itemlist ::= expr */ |
| 108418 | case 242: /* nexprlist ::= expr */ yytestcase(yyruleno==242); |
| 108419 | #line 700 "parse.y" |
| 108420 | {yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy118.pExpr);} |
| 108421 | #line 2835 "parse.c" |
| 108422 | break; |
| 108423 | case 182: /* inscollist ::= inscollist COMMA nm */ |
| 108424 | #line 710 "parse.y" |
| 108425 | {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy384,&yymsp[0].minor.yy0);} |
| 108426 | #line 2840 "parse.c" |
| 108427 | break; |
| 108428 | case 183: /* inscollist ::= nm */ |
| 108429 | #line 712 "parse.y" |
| 108430 | {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);} |
| 108431 | #line 2845 "parse.c" |
| 108432 | break; |
| 108433 | case 184: /* expr ::= term */ |
| 108434 | #line 743 "parse.y" |
| 108435 | {yygotominor.yy118 = yymsp[0].minor.yy118;} |
| 108436 | #line 2850 "parse.c" |
| 108437 | break; |
| 108438 | case 185: /* expr ::= LP expr RP */ |
| 108439 | #line 744 "parse.y" |
| 108440 | {yygotominor.yy118.pExpr = yymsp[-1].minor.yy118.pExpr; spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);} |
| 108441 | #line 2855 "parse.c" |
| 108442 | break; |
| 108443 | case 186: /* term ::= NULL */ |
| 108444 | case 191: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==191); |
| 108445 | case 192: /* term ::= STRING */ yytestcase(yyruleno==192); |
| 108446 | #line 745 "parse.y" |
| 108447 | {spanExpr(&yygotominor.yy118, pParse, yymsp[0].major, &yymsp[0].minor.yy0);} |
| 108448 | #line 2862 "parse.c" |
| 108449 | break; |
| 108450 | case 187: /* expr ::= id */ |
| 108451 | case 188: /* expr ::= JOIN_KW */ yytestcase(yyruleno==188); |
| 108452 | #line 746 "parse.y" |
| 108453 | {spanExpr(&yygotominor.yy118, pParse, TK_ID, &yymsp[0].minor.yy0);} |
| 108454 | #line 2868 "parse.c" |
| 108455 | break; |
| 108456 | case 189: /* expr ::= nm DOT nm */ |
| 108457 | #line 748 "parse.y" |
| 108458 | { |
| 108459 | Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108460 | Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0); |
| 108461 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0); |
| 108462 | spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); |
| 108463 | } |
| 108464 | #line 2878 "parse.c" |
| 108465 | break; |
| 108466 | case 190: /* expr ::= nm DOT nm DOT nm */ |
| 108467 | #line 754 "parse.y" |
| 108468 | { |
| 108469 | Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0); |
| 108470 | Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108471 | Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0); |
| 108472 | Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0); |
| 108473 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0); |
| 108474 | spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); |
| 108475 | } |
| 108476 | #line 2890 "parse.c" |
| 108477 | break; |
| 108478 | case 193: /* expr ::= REGISTER */ |
| 108479 | #line 764 "parse.y" |
| 108480 | { |
| 108481 | /* When doing a nested parse, one can include terms in an expression |
| 108482 | ** that look like this: #1 #2 ... These terms refer to registers |
| 108483 | ** in the virtual machine. #N is the N-th register. */ |
| 108484 | if( pParse->nested==0 ){ |
| @@ -108488,40 +108168,32 @@ | |
| 108488 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &yymsp[0].minor.yy0); |
| 108489 | if( yygotominor.yy118.pExpr ) sqlite3GetInt32(&yymsp[0].minor.yy0.z[1], &yygotominor.yy118.pExpr->iTable); |
| 108490 | } |
| 108491 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108492 | } |
| 108493 | #line 2907 "parse.c" |
| 108494 | break; |
| 108495 | case 194: /* expr ::= VARIABLE */ |
| 108496 | #line 777 "parse.y" |
| 108497 | { |
| 108498 | spanExpr(&yygotominor.yy118, pParse, TK_VARIABLE, &yymsp[0].minor.yy0); |
| 108499 | sqlite3ExprAssignVarNumber(pParse, yygotominor.yy118.pExpr); |
| 108500 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108501 | } |
| 108502 | #line 2916 "parse.c" |
| 108503 | break; |
| 108504 | case 195: /* expr ::= expr COLLATE ids */ |
| 108505 | #line 782 "parse.y" |
| 108506 | { |
| 108507 | yygotominor.yy118.pExpr = sqlite3ExprSetCollByToken(pParse, yymsp[-2].minor.yy118.pExpr, &yymsp[0].minor.yy0); |
| 108508 | yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart; |
| 108509 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108510 | } |
| 108511 | #line 2925 "parse.c" |
| 108512 | break; |
| 108513 | case 196: /* expr ::= CAST LP expr AS typetoken RP */ |
| 108514 | #line 788 "parse.y" |
| 108515 | { |
| 108516 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy118.pExpr, 0, &yymsp[-1].minor.yy0); |
| 108517 | spanSet(&yygotominor.yy118,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0); |
| 108518 | } |
| 108519 | #line 2933 "parse.c" |
| 108520 | break; |
| 108521 | case 197: /* expr ::= ID LP distinct exprlist RP */ |
| 108522 | #line 793 "parse.y" |
| 108523 | { |
| 108524 | if( yymsp[-1].minor.yy322 && yymsp[-1].minor.yy322->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){ |
| 108525 | sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0); |
| 108526 | } |
| 108527 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0); |
| @@ -108528,59 +108200,47 @@ | |
| 108528 | spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); |
| 108529 | if( yymsp[-2].minor.yy4 && yygotominor.yy118.pExpr ){ |
| 108530 | yygotominor.yy118.pExpr->flags |= EP_Distinct; |
| 108531 | } |
| 108532 | } |
| 108533 | #line 2947 "parse.c" |
| 108534 | break; |
| 108535 | case 198: /* expr ::= ID LP STAR RP */ |
| 108536 | #line 803 "parse.y" |
| 108537 | { |
| 108538 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0); |
| 108539 | spanSet(&yygotominor.yy118,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); |
| 108540 | } |
| 108541 | #line 2955 "parse.c" |
| 108542 | break; |
| 108543 | case 199: /* term ::= CTIME_KW */ |
| 108544 | #line 807 "parse.y" |
| 108545 | { |
| 108546 | /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are |
| 108547 | ** treated as functions that return constants */ |
| 108548 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0); |
| 108549 | if( yygotominor.yy118.pExpr ){ |
| 108550 | yygotominor.yy118.pExpr->op = TK_CONST_FUNC; |
| 108551 | } |
| 108552 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108553 | } |
| 108554 | #line 2968 "parse.c" |
| 108555 | break; |
| 108556 | case 200: /* expr ::= expr AND expr */ |
| 108557 | case 201: /* expr ::= expr OR expr */ yytestcase(yyruleno==201); |
| 108558 | case 202: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==202); |
| 108559 | case 203: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==203); |
| 108560 | case 204: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==204); |
| 108561 | case 205: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==205); |
| 108562 | case 206: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==206); |
| 108563 | case 207: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==207); |
| 108564 | #line 834 "parse.y" |
| 108565 | {spanBinaryExpr(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);} |
| 108566 | #line 2980 "parse.c" |
| 108567 | break; |
| 108568 | case 208: /* likeop ::= LIKE_KW */ |
| 108569 | case 210: /* likeop ::= MATCH */ yytestcase(yyruleno==210); |
| 108570 | #line 847 "parse.y" |
| 108571 | {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 0;} |
| 108572 | #line 2986 "parse.c" |
| 108573 | break; |
| 108574 | case 209: /* likeop ::= NOT LIKE_KW */ |
| 108575 | case 211: /* likeop ::= NOT MATCH */ yytestcase(yyruleno==211); |
| 108576 | #line 848 "parse.y" |
| 108577 | {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 1;} |
| 108578 | #line 2992 "parse.c" |
| 108579 | break; |
| 108580 | case 212: /* expr ::= expr likeop expr */ |
| 108581 | #line 851 "parse.y" |
| 108582 | { |
| 108583 | ExprList *pList; |
| 108584 | pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy118.pExpr); |
| 108585 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy118.pExpr); |
| 108586 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy342.eOperator); |
| @@ -108587,14 +108247,12 @@ | |
| 108587 | if( yymsp[-1].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108588 | yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart; |
| 108589 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108590 | if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc; |
| 108591 | } |
| 108592 | #line 3006 "parse.c" |
| 108593 | break; |
| 108594 | case 213: /* expr ::= expr likeop expr ESCAPE expr */ |
| 108595 | #line 861 "parse.y" |
| 108596 | { |
| 108597 | ExprList *pList; |
| 108598 | pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108599 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy118.pExpr); |
| 108600 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr); |
| @@ -108602,56 +108260,40 @@ | |
| 108602 | if( yymsp[-3].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108603 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108604 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108605 | if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc; |
| 108606 | } |
| 108607 | #line 3021 "parse.c" |
| 108608 | break; |
| 108609 | case 214: /* expr ::= expr ISNULL|NOTNULL */ |
| 108610 | #line 889 "parse.y" |
| 108611 | {spanUnaryPostfix(&yygotominor.yy118,pParse,yymsp[0].major,&yymsp[-1].minor.yy118,&yymsp[0].minor.yy0);} |
| 108612 | #line 3026 "parse.c" |
| 108613 | break; |
| 108614 | case 215: /* expr ::= expr NOT NULL */ |
| 108615 | #line 890 "parse.y" |
| 108616 | {spanUnaryPostfix(&yygotominor.yy118,pParse,TK_NOTNULL,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy0);} |
| 108617 | #line 3031 "parse.c" |
| 108618 | break; |
| 108619 | case 216: /* expr ::= expr IS expr */ |
| 108620 | #line 911 "parse.y" |
| 108621 | { |
| 108622 | spanBinaryExpr(&yygotominor.yy118,pParse,TK_IS,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118); |
| 108623 | binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_ISNULL); |
| 108624 | } |
| 108625 | #line 3039 "parse.c" |
| 108626 | break; |
| 108627 | case 217: /* expr ::= expr IS NOT expr */ |
| 108628 | #line 915 "parse.y" |
| 108629 | { |
| 108630 | spanBinaryExpr(&yygotominor.yy118,pParse,TK_ISNOT,&yymsp[-3].minor.yy118,&yymsp[0].minor.yy118); |
| 108631 | binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_NOTNULL); |
| 108632 | } |
| 108633 | #line 3047 "parse.c" |
| 108634 | break; |
| 108635 | case 218: /* expr ::= NOT expr */ |
| 108636 | case 219: /* expr ::= BITNOT expr */ yytestcase(yyruleno==219); |
| 108637 | #line 938 "parse.y" |
| 108638 | {spanUnaryPrefix(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108639 | #line 3053 "parse.c" |
| 108640 | break; |
| 108641 | case 220: /* expr ::= MINUS expr */ |
| 108642 | #line 941 "parse.y" |
| 108643 | {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UMINUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108644 | #line 3058 "parse.c" |
| 108645 | break; |
| 108646 | case 221: /* expr ::= PLUS expr */ |
| 108647 | #line 943 "parse.y" |
| 108648 | {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UPLUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108649 | #line 3063 "parse.c" |
| 108650 | break; |
| 108651 | case 224: /* expr ::= expr between_op expr AND expr */ |
| 108652 | #line 948 "parse.y" |
| 108653 | { |
| 108654 | ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108655 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr); |
| 108656 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy118.pExpr, 0, 0); |
| 108657 | if( yygotominor.yy118.pExpr ){ |
| @@ -108661,14 +108303,12 @@ | |
| 108661 | } |
| 108662 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108663 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108664 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108665 | } |
| 108666 | #line 3080 "parse.c" |
| 108667 | break; |
| 108668 | case 227: /* expr ::= expr in_op LP exprlist RP */ |
| 108669 | #line 965 "parse.y" |
| 108670 | { |
| 108671 | if( yymsp[-1].minor.yy322==0 ){ |
| 108672 | /* Expressions of the form |
| 108673 | ** |
| 108674 | ** expr1 IN () |
| @@ -108690,14 +108330,12 @@ | |
| 108690 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108691 | } |
| 108692 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108693 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108694 | } |
| 108695 | #line 3109 "parse.c" |
| 108696 | break; |
| 108697 | case 228: /* expr ::= LP select RP */ |
| 108698 | #line 990 "parse.y" |
| 108699 | { |
| 108700 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0); |
| 108701 | if( yygotominor.yy118.pExpr ){ |
| 108702 | yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387; |
| 108703 | ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect); |
| @@ -108706,14 +108344,12 @@ | |
| 108706 | sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387); |
| 108707 | } |
| 108708 | yygotominor.yy118.zStart = yymsp[-2].minor.yy0.z; |
| 108709 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108710 | } |
| 108711 | #line 3125 "parse.c" |
| 108712 | break; |
| 108713 | case 229: /* expr ::= expr in_op LP select RP */ |
| 108714 | #line 1002 "parse.y" |
| 108715 | { |
| 108716 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy118.pExpr, 0, 0); |
| 108717 | if( yygotominor.yy118.pExpr ){ |
| 108718 | yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387; |
| 108719 | ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect); |
| @@ -108723,14 +108359,12 @@ | |
| 108723 | } |
| 108724 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108725 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108726 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108727 | } |
| 108728 | #line 3142 "parse.c" |
| 108729 | break; |
| 108730 | case 230: /* expr ::= expr in_op nm dbnm */ |
| 108731 | #line 1015 "parse.y" |
| 108732 | { |
| 108733 | SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0); |
| 108734 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy118.pExpr, 0, 0); |
| 108735 | if( yygotominor.yy118.pExpr ){ |
| 108736 | yygotominor.yy118.pExpr->x.pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0); |
| @@ -108741,14 +108375,12 @@ | |
| 108741 | } |
| 108742 | if( yymsp[-2].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108743 | yygotominor.yy118.zStart = yymsp[-3].minor.yy118.zStart; |
| 108744 | yygotominor.yy118.zEnd = yymsp[0].minor.yy0.z ? &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] : &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]; |
| 108745 | } |
| 108746 | #line 3160 "parse.c" |
| 108747 | break; |
| 108748 | case 231: /* expr ::= EXISTS LP select RP */ |
| 108749 | #line 1029 "parse.y" |
| 108750 | { |
| 108751 | Expr *p = yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0); |
| 108752 | if( p ){ |
| 108753 | p->x.pSelect = yymsp[-1].minor.yy387; |
| 108754 | ExprSetProperty(p, EP_xIsSelect); |
| @@ -108757,14 +108389,12 @@ | |
| 108757 | sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387); |
| 108758 | } |
| 108759 | yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z; |
| 108760 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108761 | } |
| 108762 | #line 3176 "parse.c" |
| 108763 | break; |
| 108764 | case 232: /* expr ::= CASE case_operand case_exprlist case_else END */ |
| 108765 | #line 1044 "parse.y" |
| 108766 | { |
| 108767 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy314, yymsp[-1].minor.yy314, 0); |
| 108768 | if( yygotominor.yy118.pExpr ){ |
| 108769 | yygotominor.yy118.pExpr->x.pList = yymsp[-2].minor.yy322; |
| 108770 | sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr); |
| @@ -108772,50 +108402,38 @@ | |
| 108772 | sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy322); |
| 108773 | } |
| 108774 | yygotominor.yy118.zStart = yymsp[-4].minor.yy0.z; |
| 108775 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108776 | } |
| 108777 | #line 3191 "parse.c" |
| 108778 | break; |
| 108779 | case 233: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ |
| 108780 | #line 1057 "parse.y" |
| 108781 | { |
| 108782 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy118.pExpr); |
| 108783 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108784 | } |
| 108785 | #line 3199 "parse.c" |
| 108786 | break; |
| 108787 | case 234: /* case_exprlist ::= WHEN expr THEN expr */ |
| 108788 | #line 1061 "parse.y" |
| 108789 | { |
| 108790 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108791 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108792 | } |
| 108793 | #line 3207 "parse.c" |
| 108794 | break; |
| 108795 | case 243: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */ |
| 108796 | #line 1090 "parse.y" |
| 108797 | { |
| 108798 | sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0, |
| 108799 | sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy322, yymsp[-9].minor.yy4, |
| 108800 | &yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy4); |
| 108801 | } |
| 108802 | #line 3216 "parse.c" |
| 108803 | break; |
| 108804 | case 244: /* uniqueflag ::= UNIQUE */ |
| 108805 | case 298: /* raisetype ::= ABORT */ yytestcase(yyruleno==298); |
| 108806 | #line 1097 "parse.y" |
| 108807 | {yygotominor.yy4 = OE_Abort;} |
| 108808 | #line 3222 "parse.c" |
| 108809 | break; |
| 108810 | case 245: /* uniqueflag ::= */ |
| 108811 | #line 1098 "parse.y" |
| 108812 | {yygotominor.yy4 = OE_None;} |
| 108813 | #line 3227 "parse.c" |
| 108814 | break; |
| 108815 | case 248: /* idxlist ::= idxlist COMMA nm collate sortorder */ |
| 108816 | #line 1107 "parse.y" |
| 108817 | { |
| 108818 | Expr *p = 0; |
| 108819 | if( yymsp[-1].minor.yy0.n>0 ){ |
| 108820 | p = sqlite3Expr(pParse->db, TK_COLUMN, 0); |
| 108821 | sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0); |
| @@ -108823,14 +108441,12 @@ | |
| 108823 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, p); |
| 108824 | sqlite3ExprListSetName(pParse,yygotominor.yy322,&yymsp[-2].minor.yy0,1); |
| 108825 | sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index"); |
| 108826 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108827 | } |
| 108828 | #line 3242 "parse.c" |
| 108829 | break; |
| 108830 | case 249: /* idxlist ::= nm collate sortorder */ |
| 108831 | #line 1118 "parse.y" |
| 108832 | { |
| 108833 | Expr *p = 0; |
| 108834 | if( yymsp[-1].minor.yy0.n>0 ){ |
| 108835 | p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0); |
| 108836 | sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0); |
| @@ -108838,307 +108454,214 @@ | |
| 108838 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, p); |
| 108839 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108840 | sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index"); |
| 108841 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108842 | } |
| 108843 | #line 3257 "parse.c" |
| 108844 | break; |
| 108845 | case 250: /* collate ::= */ |
| 108846 | #line 1131 "parse.y" |
| 108847 | {yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;} |
| 108848 | #line 3262 "parse.c" |
| 108849 | break; |
| 108850 | case 252: /* cmd ::= DROP INDEX ifexists fullname */ |
| 108851 | #line 1137 "parse.y" |
| 108852 | {sqlite3DropIndex(pParse, yymsp[0].minor.yy259, yymsp[-1].minor.yy4);} |
| 108853 | #line 3267 "parse.c" |
| 108854 | break; |
| 108855 | case 253: /* cmd ::= VACUUM */ |
| 108856 | case 254: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==254); |
| 108857 | #line 1143 "parse.y" |
| 108858 | {sqlite3Vacuum(pParse);} |
| 108859 | #line 3273 "parse.c" |
| 108860 | break; |
| 108861 | case 255: /* cmd ::= PRAGMA nm dbnm */ |
| 108862 | #line 1151 "parse.y" |
| 108863 | {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);} |
| 108864 | #line 3278 "parse.c" |
| 108865 | break; |
| 108866 | case 256: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ |
| 108867 | #line 1152 "parse.y" |
| 108868 | {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);} |
| 108869 | #line 3283 "parse.c" |
| 108870 | break; |
| 108871 | case 257: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ |
| 108872 | #line 1153 "parse.y" |
| 108873 | {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);} |
| 108874 | #line 3288 "parse.c" |
| 108875 | break; |
| 108876 | case 258: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ |
| 108877 | #line 1155 "parse.y" |
| 108878 | {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);} |
| 108879 | #line 3293 "parse.c" |
| 108880 | break; |
| 108881 | case 259: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ |
| 108882 | #line 1157 "parse.y" |
| 108883 | {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);} |
| 108884 | #line 3298 "parse.c" |
| 108885 | break; |
| 108886 | case 270: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ |
| 108887 | #line 1175 "parse.y" |
| 108888 | { |
| 108889 | Token all; |
| 108890 | all.z = yymsp[-3].minor.yy0.z; |
| 108891 | all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n; |
| 108892 | sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy203, &all); |
| 108893 | } |
| 108894 | #line 3308 "parse.c" |
| 108895 | break; |
| 108896 | case 271: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ |
| 108897 | #line 1184 "parse.y" |
| 108898 | { |
| 108899 | sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy4, yymsp[-4].minor.yy90.a, yymsp[-4].minor.yy90.b, yymsp[-2].minor.yy259, yymsp[0].minor.yy314, yymsp[-10].minor.yy4, yymsp[-8].minor.yy4); |
| 108900 | yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); |
| 108901 | } |
| 108902 | #line 3316 "parse.c" |
| 108903 | break; |
| 108904 | case 272: /* trigger_time ::= BEFORE */ |
| 108905 | case 275: /* trigger_time ::= */ yytestcase(yyruleno==275); |
| 108906 | #line 1190 "parse.y" |
| 108907 | { yygotominor.yy4 = TK_BEFORE; } |
| 108908 | #line 3322 "parse.c" |
| 108909 | break; |
| 108910 | case 273: /* trigger_time ::= AFTER */ |
| 108911 | #line 1191 "parse.y" |
| 108912 | { yygotominor.yy4 = TK_AFTER; } |
| 108913 | #line 3327 "parse.c" |
| 108914 | break; |
| 108915 | case 274: /* trigger_time ::= INSTEAD OF */ |
| 108916 | #line 1192 "parse.y" |
| 108917 | { yygotominor.yy4 = TK_INSTEAD;} |
| 108918 | #line 3332 "parse.c" |
| 108919 | break; |
| 108920 | case 276: /* trigger_event ::= DELETE|INSERT */ |
| 108921 | case 277: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==277); |
| 108922 | #line 1197 "parse.y" |
| 108923 | {yygotominor.yy90.a = yymsp[0].major; yygotominor.yy90.b = 0;} |
| 108924 | #line 3338 "parse.c" |
| 108925 | break; |
| 108926 | case 278: /* trigger_event ::= UPDATE OF inscollist */ |
| 108927 | #line 1199 "parse.y" |
| 108928 | {yygotominor.yy90.a = TK_UPDATE; yygotominor.yy90.b = yymsp[0].minor.yy384;} |
| 108929 | #line 3343 "parse.c" |
| 108930 | break; |
| 108931 | case 281: /* when_clause ::= */ |
| 108932 | case 303: /* key_opt ::= */ yytestcase(yyruleno==303); |
| 108933 | #line 1206 "parse.y" |
| 108934 | { yygotominor.yy314 = 0; } |
| 108935 | #line 3349 "parse.c" |
| 108936 | break; |
| 108937 | case 282: /* when_clause ::= WHEN expr */ |
| 108938 | case 304: /* key_opt ::= KEY expr */ yytestcase(yyruleno==304); |
| 108939 | #line 1207 "parse.y" |
| 108940 | { yygotominor.yy314 = yymsp[0].minor.yy118.pExpr; } |
| 108941 | #line 3355 "parse.c" |
| 108942 | break; |
| 108943 | case 283: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ |
| 108944 | #line 1211 "parse.y" |
| 108945 | { |
| 108946 | assert( yymsp[-2].minor.yy203!=0 ); |
| 108947 | yymsp[-2].minor.yy203->pLast->pNext = yymsp[-1].minor.yy203; |
| 108948 | yymsp[-2].minor.yy203->pLast = yymsp[-1].minor.yy203; |
| 108949 | yygotominor.yy203 = yymsp[-2].minor.yy203; |
| 108950 | } |
| 108951 | #line 3365 "parse.c" |
| 108952 | break; |
| 108953 | case 284: /* trigger_cmd_list ::= trigger_cmd SEMI */ |
| 108954 | #line 1217 "parse.y" |
| 108955 | { |
| 108956 | assert( yymsp[-1].minor.yy203!=0 ); |
| 108957 | yymsp[-1].minor.yy203->pLast = yymsp[-1].minor.yy203; |
| 108958 | yygotominor.yy203 = yymsp[-1].minor.yy203; |
| 108959 | } |
| 108960 | #line 3374 "parse.c" |
| 108961 | break; |
| 108962 | case 286: /* trnm ::= nm DOT nm */ |
| 108963 | #line 1229 "parse.y" |
| 108964 | { |
| 108965 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 108966 | sqlite3ErrorMsg(pParse, |
| 108967 | "qualified table names are not allowed on INSERT, UPDATE, and DELETE " |
| 108968 | "statements within triggers"); |
| 108969 | } |
| 108970 | #line 3384 "parse.c" |
| 108971 | break; |
| 108972 | case 288: /* tridxby ::= INDEXED BY nm */ |
| 108973 | #line 1241 "parse.y" |
| 108974 | { |
| 108975 | sqlite3ErrorMsg(pParse, |
| 108976 | "the INDEXED BY clause is not allowed on UPDATE or DELETE statements " |
| 108977 | "within triggers"); |
| 108978 | } |
| 108979 | #line 3393 "parse.c" |
| 108980 | break; |
| 108981 | case 289: /* tridxby ::= NOT INDEXED */ |
| 108982 | #line 1246 "parse.y" |
| 108983 | { |
| 108984 | sqlite3ErrorMsg(pParse, |
| 108985 | "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements " |
| 108986 | "within triggers"); |
| 108987 | } |
| 108988 | #line 3402 "parse.c" |
| 108989 | break; |
| 108990 | case 290: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */ |
| 108991 | #line 1259 "parse.y" |
| 108992 | { yygotominor.yy203 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy322, yymsp[0].minor.yy314, yymsp[-5].minor.yy210); } |
| 108993 | #line 3407 "parse.c" |
| 108994 | break; |
| 108995 | case 291: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */ |
| 108996 | #line 1264 "parse.y" |
| 108997 | {yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy384, yymsp[-1].minor.yy322, 0, yymsp[-7].minor.yy210);} |
| 108998 | #line 3412 "parse.c" |
| 108999 | break; |
| 109000 | case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */ |
| 109001 | #line 1267 "parse.y" |
| 109002 | {yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy384, 0, yymsp[0].minor.yy387, yymsp[-4].minor.yy210);} |
| 109003 | #line 3417 "parse.c" |
| 109004 | break; |
| 109005 | case 293: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */ |
| 109006 | #line 1271 "parse.y" |
| 109007 | {yygotominor.yy203 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy314);} |
| 109008 | #line 3422 "parse.c" |
| 109009 | break; |
| 109010 | case 294: /* trigger_cmd ::= select */ |
| 109011 | #line 1274 "parse.y" |
| 109012 | {yygotominor.yy203 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy387); } |
| 109013 | #line 3427 "parse.c" |
| 109014 | break; |
| 109015 | case 295: /* expr ::= RAISE LP IGNORE RP */ |
| 109016 | #line 1277 "parse.y" |
| 109017 | { |
| 109018 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0); |
| 109019 | if( yygotominor.yy118.pExpr ){ |
| 109020 | yygotominor.yy118.pExpr->affinity = OE_Ignore; |
| 109021 | } |
| 109022 | yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z; |
| 109023 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 109024 | } |
| 109025 | #line 3439 "parse.c" |
| 109026 | break; |
| 109027 | case 296: /* expr ::= RAISE LP raisetype COMMA nm RP */ |
| 109028 | #line 1285 "parse.y" |
| 109029 | { |
| 109030 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); |
| 109031 | if( yygotominor.yy118.pExpr ) { |
| 109032 | yygotominor.yy118.pExpr->affinity = (char)yymsp[-3].minor.yy4; |
| 109033 | } |
| 109034 | yygotominor.yy118.zStart = yymsp[-5].minor.yy0.z; |
| 109035 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 109036 | } |
| 109037 | #line 3451 "parse.c" |
| 109038 | break; |
| 109039 | case 297: /* raisetype ::= ROLLBACK */ |
| 109040 | #line 1296 "parse.y" |
| 109041 | {yygotominor.yy4 = OE_Rollback;} |
| 109042 | #line 3456 "parse.c" |
| 109043 | break; |
| 109044 | case 299: /* raisetype ::= FAIL */ |
| 109045 | #line 1298 "parse.y" |
| 109046 | {yygotominor.yy4 = OE_Fail;} |
| 109047 | #line 3461 "parse.c" |
| 109048 | break; |
| 109049 | case 300: /* cmd ::= DROP TRIGGER ifexists fullname */ |
| 109050 | #line 1303 "parse.y" |
| 109051 | { |
| 109052 | sqlite3DropTrigger(pParse,yymsp[0].minor.yy259,yymsp[-1].minor.yy4); |
| 109053 | } |
| 109054 | #line 3468 "parse.c" |
| 109055 | break; |
| 109056 | case 301: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ |
| 109057 | #line 1310 "parse.y" |
| 109058 | { |
| 109059 | sqlite3Attach(pParse, yymsp[-3].minor.yy118.pExpr, yymsp[-1].minor.yy118.pExpr, yymsp[0].minor.yy314); |
| 109060 | } |
| 109061 | #line 3475 "parse.c" |
| 109062 | break; |
| 109063 | case 302: /* cmd ::= DETACH database_kw_opt expr */ |
| 109064 | #line 1313 "parse.y" |
| 109065 | { |
| 109066 | sqlite3Detach(pParse, yymsp[0].minor.yy118.pExpr); |
| 109067 | } |
| 109068 | #line 3482 "parse.c" |
| 109069 | break; |
| 109070 | case 307: /* cmd ::= REINDEX */ |
| 109071 | #line 1328 "parse.y" |
| 109072 | {sqlite3Reindex(pParse, 0, 0);} |
| 109073 | #line 3487 "parse.c" |
| 109074 | break; |
| 109075 | case 308: /* cmd ::= REINDEX nm dbnm */ |
| 109076 | #line 1329 "parse.y" |
| 109077 | {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} |
| 109078 | #line 3492 "parse.c" |
| 109079 | break; |
| 109080 | case 309: /* cmd ::= ANALYZE */ |
| 109081 | #line 1334 "parse.y" |
| 109082 | {sqlite3Analyze(pParse, 0, 0);} |
| 109083 | #line 3497 "parse.c" |
| 109084 | break; |
| 109085 | case 310: /* cmd ::= ANALYZE nm dbnm */ |
| 109086 | #line 1335 "parse.y" |
| 109087 | {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} |
| 109088 | #line 3502 "parse.c" |
| 109089 | break; |
| 109090 | case 311: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ |
| 109091 | #line 1340 "parse.y" |
| 109092 | { |
| 109093 | sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy259,&yymsp[0].minor.yy0); |
| 109094 | } |
| 109095 | #line 3509 "parse.c" |
| 109096 | break; |
| 109097 | case 312: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */ |
| 109098 | #line 1343 "parse.y" |
| 109099 | { |
| 109100 | sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0); |
| 109101 | } |
| 109102 | #line 3516 "parse.c" |
| 109103 | break; |
| 109104 | case 313: /* add_column_fullname ::= fullname */ |
| 109105 | #line 1346 "parse.y" |
| 109106 | { |
| 109107 | pParse->db->lookaside.bEnabled = 0; |
| 109108 | sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy259); |
| 109109 | } |
| 109110 | #line 3524 "parse.c" |
| 109111 | break; |
| 109112 | case 316: /* cmd ::= create_vtab */ |
| 109113 | #line 1356 "parse.y" |
| 109114 | {sqlite3VtabFinishParse(pParse,0);} |
| 109115 | #line 3529 "parse.c" |
| 109116 | break; |
| 109117 | case 317: /* cmd ::= create_vtab LP vtabarglist RP */ |
| 109118 | #line 1357 "parse.y" |
| 109119 | {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);} |
| 109120 | #line 3534 "parse.c" |
| 109121 | break; |
| 109122 | case 318: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */ |
| 109123 | #line 1358 "parse.y" |
| 109124 | { |
| 109125 | sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); |
| 109126 | } |
| 109127 | #line 3541 "parse.c" |
| 109128 | break; |
| 109129 | case 321: /* vtabarg ::= */ |
| 109130 | #line 1363 "parse.y" |
| 109131 | {sqlite3VtabArgInit(pParse);} |
| 109132 | #line 3546 "parse.c" |
| 109133 | break; |
| 109134 | case 323: /* vtabargtoken ::= ANY */ |
| 109135 | case 324: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==324); |
| 109136 | case 325: /* lp ::= LP */ yytestcase(yyruleno==325); |
| 109137 | #line 1365 "parse.y" |
| 109138 | {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);} |
| 109139 | #line 3553 "parse.c" |
| 109140 | break; |
| 109141 | default: |
| 109142 | /* (0) input ::= cmdlist */ yytestcase(yyruleno==0); |
| 109143 | /* (1) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==1); |
| 109144 | /* (2) cmdlist ::= ecmd */ yytestcase(yyruleno==2); |
| @@ -109236,17 +108759,15 @@ | |
| 109236 | int yymajor, /* The major type of the error token */ |
| 109237 | YYMINORTYPE yyminor /* The minor type of the error token */ |
| 109238 | ){ |
| 109239 | sqlite3ParserARG_FETCH; |
| 109240 | #define TOKEN (yyminor.yy0) |
| 109241 | #line 32 "parse.y" |
| 109242 | |
| 109243 | UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */ |
| 109244 | assert( TOKEN.z[0] ); /* The tokenizer always gives us a token */ |
| 109245 | sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN); |
| 109246 | pParse->parseError = 1; |
| 109247 | #line 3661 "parse.c" |
| 109248 | sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */ |
| 109249 | } |
| 109250 | |
| 109251 | /* |
| 109252 | ** The following is executed when the parser accepts |
| @@ -109436,11 +108957,10 @@ | |
| 109436 | return; |
| 109437 | } |
| 109438 | |
| 109439 | /************** End of parse.c ***********************************************/ |
| 109440 | /************** Begin file tokenize.c ****************************************/ |
| 109441 | #line 1 "tsrc/tokenize.c" |
| 109442 | /* |
| 109443 | ** 2001 September 15 |
| 109444 | ** |
| 109445 | ** The author disclaims copyright to this source code. In place of |
| 109446 | ** a legal notice, here is a blessing: |
| @@ -109502,11 +109022,10 @@ | |
| 109502 | ** named keywordhash.h and then included into this source file by |
| 109503 | ** the #include below. |
| 109504 | */ |
| 109505 | /************** Include keywordhash.h in the middle of tokenize.c ************/ |
| 109506 | /************** Begin file keywordhash.h *************************************/ |
| 109507 | #line 1 "tsrc/keywordhash.h" |
| 109508 | /***** This file contains automatically generated code ****** |
| 109509 | ** |
| 109510 | ** The code in this file has been automatically generated by |
| 109511 | ** |
| 109512 | ** sqlite/tool/mkkeywordhash.c |
| @@ -109776,11 +109295,10 @@ | |
| 109776 | } |
| 109777 | #define SQLITE_N_KEYWORD 121 |
| 109778 | |
| 109779 | /************** End of keywordhash.h *****************************************/ |
| 109780 | /************** Continuing where we left off in tokenize.c *******************/ |
| 109781 | #line 66 "tsrc/tokenize.c" |
| 109782 | |
| 109783 | |
| 109784 | /* |
| 109785 | ** If X is a character that can be used in an identifier then |
| 109786 | ** IdChar(X) will be true. Otherwise it is false. |
| @@ -110241,11 +109759,10 @@ | |
| 110241 | return nErr; |
| 110242 | } |
| 110243 | |
| 110244 | /************** End of tokenize.c ********************************************/ |
| 110245 | /************** Begin file complete.c ****************************************/ |
| 110246 | #line 1 "tsrc/complete.c" |
| 110247 | /* |
| 110248 | ** 2001 September 15 |
| 110249 | ** |
| 110250 | ** The author disclaims copyright to this source code. In place of |
| 110251 | ** a legal notice, here is a blessing: |
| @@ -110527,11 +110044,10 @@ | |
| 110527 | #endif /* SQLITE_OMIT_UTF16 */ |
| 110528 | #endif /* SQLITE_OMIT_COMPLETE */ |
| 110529 | |
| 110530 | /************** End of complete.c ********************************************/ |
| 110531 | /************** Begin file main.c ********************************************/ |
| 110532 | #line 1 "tsrc/main.c" |
| 110533 | /* |
| 110534 | ** 2001 September 15 |
| 110535 | ** |
| 110536 | ** The author disclaims copyright to this source code. In place of |
| 110537 | ** a legal notice, here is a blessing: |
| @@ -110548,11 +110064,10 @@ | |
| 110548 | */ |
| 110549 | |
| 110550 | #ifdef SQLITE_ENABLE_FTS3 |
| 110551 | /************** Include fts3.h in the middle of main.c ***********************/ |
| 110552 | /************** Begin file fts3.h ********************************************/ |
| 110553 | #line 1 "tsrc/fts3.h" |
| 110554 | /* |
| 110555 | ** 2006 Oct 10 |
| 110556 | ** |
| 110557 | ** The author disclaims copyright to this source code. In place of |
| 110558 | ** a legal notice, here is a blessing: |
| @@ -110577,16 +110092,14 @@ | |
| 110577 | } /* extern "C" */ |
| 110578 | #endif /* __cplusplus */ |
| 110579 | |
| 110580 | /************** End of fts3.h ************************************************/ |
| 110581 | /************** Continuing where we left off in main.c ***********************/ |
| 110582 | #line 21 "tsrc/main.c" |
| 110583 | #endif |
| 110584 | #ifdef SQLITE_ENABLE_RTREE |
| 110585 | /************** Include rtree.h in the middle of main.c **********************/ |
| 110586 | /************** Begin file rtree.h *******************************************/ |
| 110587 | #line 1 "tsrc/rtree.h" |
| 110588 | /* |
| 110589 | ** 2008 May 26 |
| 110590 | ** |
| 110591 | ** The author disclaims copyright to this source code. In place of |
| 110592 | ** a legal notice, here is a blessing: |
| @@ -110611,16 +110124,14 @@ | |
| 110611 | } /* extern "C" */ |
| 110612 | #endif /* __cplusplus */ |
| 110613 | |
| 110614 | /************** End of rtree.h ***********************************************/ |
| 110615 | /************** Continuing where we left off in main.c ***********************/ |
| 110616 | #line 24 "tsrc/main.c" |
| 110617 | #endif |
| 110618 | #ifdef SQLITE_ENABLE_ICU |
| 110619 | /************** Include sqliteicu.h in the middle of main.c ******************/ |
| 110620 | /************** Begin file sqliteicu.h ***************************************/ |
| 110621 | #line 1 "tsrc/sqliteicu.h" |
| 110622 | /* |
| 110623 | ** 2008 May 26 |
| 110624 | ** |
| 110625 | ** The author disclaims copyright to this source code. In place of |
| 110626 | ** a legal notice, here is a blessing: |
| @@ -110646,11 +110157,10 @@ | |
| 110646 | #endif /* __cplusplus */ |
| 110647 | |
| 110648 | |
| 110649 | /************** End of sqliteicu.h *******************************************/ |
| 110650 | /************** Continuing where we left off in main.c ***********************/ |
| 110651 | #line 27 "tsrc/main.c" |
| 110652 | #endif |
| 110653 | |
| 110654 | #ifndef SQLITE_AMALGAMATION |
| 110655 | /* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant |
| 110656 | ** contains the text of SQLITE_VERSION macro. |
| @@ -113577,11 +113087,10 @@ | |
| 113577 | return 0; |
| 113578 | } |
| 113579 | |
| 113580 | /************** End of main.c ************************************************/ |
| 113581 | /************** Begin file notify.c ******************************************/ |
| 113582 | #line 1 "tsrc/notify.c" |
| 113583 | /* |
| 113584 | ** 2009 March 3 |
| 113585 | ** |
| 113586 | ** The author disclaims copyright to this source code. In place of |
| 113587 | ** a legal notice, here is a blessing: |
| @@ -113911,11 +113420,10 @@ | |
| 113911 | } |
| 113912 | #endif |
| 113913 | |
| 113914 | /************** End of notify.c **********************************************/ |
| 113915 | /************** Begin file fts3.c ********************************************/ |
| 113916 | #line 1 "tsrc/fts3.c" |
| 113917 | /* |
| 113918 | ** 2006 Oct 10 |
| 113919 | ** |
| 113920 | ** The author disclaims copyright to this source code. In place of |
| 113921 | ** a legal notice, here is a blessing: |
| @@ -114208,11 +113716,10 @@ | |
| 114208 | ** into a single segment. |
| 114209 | */ |
| 114210 | |
| 114211 | /************** Include fts3Int.h in the middle of fts3.c ********************/ |
| 114212 | /************** Begin file fts3Int.h *****************************************/ |
| 114213 | #line 1 "tsrc/fts3Int.h" |
| 114214 | /* |
| 114215 | ** 2009 Nov 12 |
| 114216 | ** |
| 114217 | ** The author disclaims copyright to this source code. In place of |
| 114218 | ** a legal notice, here is a blessing: |
| @@ -114247,11 +113754,10 @@ | |
| 114247 | SQLITE_API extern const sqlite3_api_routines *sqlite3_api; |
| 114248 | #endif |
| 114249 | |
| 114250 | /************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/ |
| 114251 | /************** Begin file fts3_tokenizer.h **********************************/ |
| 114252 | #line 1 "tsrc/fts3_tokenizer.h" |
| 114253 | /* |
| 114254 | ** 2006 July 10 |
| 114255 | ** |
| 114256 | ** The author disclaims copyright to this source code. |
| 114257 | ** |
| @@ -114402,14 +113908,12 @@ | |
| 114402 | |
| 114403 | #endif /* _FTS3_TOKENIZER_H_ */ |
| 114404 | |
| 114405 | /************** End of fts3_tokenizer.h **************************************/ |
| 114406 | /************** Continuing where we left off in fts3Int.h ********************/ |
| 114407 | #line 40 "tsrc/fts3Int.h" |
| 114408 | /************** Include fts3_hash.h in the middle of fts3Int.h ***************/ |
| 114409 | /************** Begin file fts3_hash.h ***************************************/ |
| 114410 | #line 1 "tsrc/fts3_hash.h" |
| 114411 | /* |
| 114412 | ** 2001 September 22 |
| 114413 | ** |
| 114414 | ** The author disclaims copyright to this source code. In place of |
| 114415 | ** a legal notice, here is a blessing: |
| @@ -114521,11 +114025,10 @@ | |
| 114521 | |
| 114522 | #endif /* _FTS3_HASH_H_ */ |
| 114523 | |
| 114524 | /************** End of fts3_hash.h *******************************************/ |
| 114525 | /************** Continuing where we left off in fts3Int.h ********************/ |
| 114526 | #line 41 "tsrc/fts3Int.h" |
| 114527 | |
| 114528 | /* |
| 114529 | ** This constant controls how often segments are merged. Once there are |
| 114530 | ** FTS3_MERGE_COUNT segments of level N, they are merged into a single |
| 114531 | ** segment of level N+1. |
| @@ -114998,11 +114501,10 @@ | |
| 114998 | #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */ |
| 114999 | #endif /* _FTSINT_H */ |
| 115000 | |
| 115001 | /************** End of fts3Int.h *********************************************/ |
| 115002 | /************** Continuing where we left off in fts3.c ***********************/ |
| 115003 | #line 296 "tsrc/fts3.c" |
| 115004 | #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) |
| 115005 | |
| 115006 | #if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE) |
| 115007 | # define SQLITE_CORE 1 |
| 115008 | #endif |
| @@ -119548,11 +119050,10 @@ | |
| 119548 | |
| 119549 | #endif |
| 119550 | |
| 119551 | /************** End of fts3.c ************************************************/ |
| 119552 | /************** Begin file fts3_aux.c ****************************************/ |
| 119553 | #line 1 "tsrc/fts3_aux.c" |
| 119554 | /* |
| 119555 | ** 2011 Jan 27 |
| 119556 | ** |
| 119557 | ** The author disclaims copyright to this source code. In place of |
| 119558 | ** a legal notice, here is a blessing: |
| @@ -120025,11 +119526,10 @@ | |
| 120025 | |
| 120026 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 120027 | |
| 120028 | /************** End of fts3_aux.c ********************************************/ |
| 120029 | /************** Begin file fts3_expr.c ***************************************/ |
| 120030 | #line 1 "tsrc/fts3_expr.c" |
| 120031 | /* |
| 120032 | ** 2008 Nov 28 |
| 120033 | ** |
| 120034 | ** The author disclaims copyright to this source code. In place of |
| 120035 | ** a legal notice, here is a blessing: |
| @@ -120992,11 +120492,10 @@ | |
| 120992 | #endif |
| 120993 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 120994 | |
| 120995 | /************** End of fts3_expr.c *******************************************/ |
| 120996 | /************** Begin file fts3_hash.c ***************************************/ |
| 120997 | #line 1 "tsrc/fts3_hash.c" |
| 120998 | /* |
| 120999 | ** 2001 September 22 |
| 121000 | ** |
| 121001 | ** The author disclaims copyright to this source code. In place of |
| 121002 | ** a legal notice, here is a blessing: |
| @@ -121377,11 +120876,10 @@ | |
| 121377 | |
| 121378 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 121379 | |
| 121380 | /************** End of fts3_hash.c *******************************************/ |
| 121381 | /************** Begin file fts3_porter.c *************************************/ |
| 121382 | #line 1 "tsrc/fts3_porter.c" |
| 121383 | /* |
| 121384 | ** 2006 September 30 |
| 121385 | ** |
| 121386 | ** The author disclaims copyright to this source code. In place of |
| 121387 | ** a legal notice, here is a blessing: |
| @@ -122024,11 +121522,10 @@ | |
| 122024 | |
| 122025 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122026 | |
| 122027 | /************** End of fts3_porter.c *****************************************/ |
| 122028 | /************** Begin file fts3_tokenizer.c **********************************/ |
| 122029 | #line 1 "tsrc/fts3_tokenizer.c" |
| 122030 | /* |
| 122031 | ** 2007 June 22 |
| 122032 | ** |
| 122033 | ** The author disclaims copyright to this source code. In place of |
| 122034 | ** a legal notice, here is a blessing: |
| @@ -122516,11 +122013,10 @@ | |
| 122516 | |
| 122517 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122518 | |
| 122519 | /************** End of fts3_tokenizer.c **************************************/ |
| 122520 | /************** Begin file fts3_tokenizer1.c *********************************/ |
| 122521 | #line 1 "tsrc/fts3_tokenizer1.c" |
| 122522 | /* |
| 122523 | ** 2006 Oct 10 |
| 122524 | ** |
| 122525 | ** The author disclaims copyright to this source code. In place of |
| 122526 | ** a legal notice, here is a blessing: |
| @@ -122751,11 +122247,10 @@ | |
| 122751 | |
| 122752 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122753 | |
| 122754 | /************** End of fts3_tokenizer1.c *************************************/ |
| 122755 | /************** Begin file fts3_write.c **************************************/ |
| 122756 | #line 1 "tsrc/fts3_write.c" |
| 122757 | /* |
| 122758 | ** 2009 Oct 23 |
| 122759 | ** |
| 122760 | ** The author disclaims copyright to this source code. In place of |
| 122761 | ** a legal notice, here is a blessing: |
| @@ -126022,11 +125517,10 @@ | |
| 126022 | |
| 126023 | #endif |
| 126024 | |
| 126025 | /************** End of fts3_write.c ******************************************/ |
| 126026 | /************** Begin file fts3_snippet.c ************************************/ |
| 126027 | #line 1 "tsrc/fts3_snippet.c" |
| 126028 | /* |
| 126029 | ** 2009 Oct 23 |
| 126030 | ** |
| 126031 | ** The author disclaims copyright to this source code. In place of |
| 126032 | ** a legal notice, here is a blessing: |
| @@ -127524,11 +127018,10 @@ | |
| 127524 | |
| 127525 | #endif |
| 127526 | |
| 127527 | /************** End of fts3_snippet.c ****************************************/ |
| 127528 | /************** Begin file rtree.c *******************************************/ |
| 127529 | #line 1 "tsrc/rtree.c" |
| 127530 | /* |
| 127531 | ** 2001 September 15 |
| 127532 | ** |
| 127533 | ** The author disclaims copyright to this source code. In place of |
| 127534 | ** a legal notice, here is a blessing: |
| @@ -130806,11 +130299,10 @@ | |
| 130806 | |
| 130807 | #endif |
| 130808 | |
| 130809 | /************** End of rtree.c ***********************************************/ |
| 130810 | /************** Begin file icu.c *********************************************/ |
| 130811 | #line 1 "tsrc/icu.c" |
| 130812 | /* |
| 130813 | ** 2007 May 6 |
| 130814 | ** |
| 130815 | ** The author disclaims copyright to this source code. In place of |
| 130816 | ** a legal notice, here is a blessing: |
| @@ -131309,11 +130801,10 @@ | |
| 131309 | |
| 131310 | #endif |
| 131311 | |
| 131312 | /************** End of icu.c *************************************************/ |
| 131313 | /************** Begin file fts3_icu.c ****************************************/ |
| 131314 | #line 1 "tsrc/fts3_icu.c" |
| 131315 | /* |
| 131316 | ** 2007 June 22 |
| 131317 | ** |
| 131318 | ** The author disclaims copyright to this source code. In place of |
| 131319 | ** a legal notice, here is a blessing: |
| 131320 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -24,11 +24,10 @@ | |
| 24 | #endif |
| 25 | #ifndef SQLITE_API |
| 26 | # define SQLITE_API |
| 27 | #endif |
| 28 | /************** Begin file sqliteInt.h ***************************************/ |
| 29 | /* |
| 30 | ** 2001 September 15 |
| 31 | ** |
| 32 | ** The author disclaims copyright to this source code. In place of |
| 33 | ** a legal notice, here is a blessing: |
| @@ -79,11 +78,10 @@ | |
| 78 | #include "config.h" |
| 79 | #endif |
| 80 | |
| 81 | /************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/ |
| 82 | /************** Begin file sqliteLimit.h *************************************/ |
| 83 | /* |
| 84 | ** 2007 May 7 |
| 85 | ** |
| 86 | ** The author disclaims copyright to this source code. In place of |
| 87 | ** a legal notice, here is a blessing: |
| @@ -291,11 +289,10 @@ | |
| 289 | # define SQLITE_MAX_TRIGGER_DEPTH 1000 |
| 290 | #endif |
| 291 | |
| 292 | /************** End of sqliteLimit.h *****************************************/ |
| 293 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 294 | |
| 295 | /* Disable nuisance warnings on Borland compilers */ |
| 296 | #if defined(__BORLANDC__) |
| 297 | #pragma warn -rch /* unreachable code */ |
| 298 | #pragma warn -ccc /* Condition is always true or false */ |
| @@ -548,11 +545,10 @@ | |
| 545 | # define unlikely(X) !!(X) |
| 546 | #endif |
| 547 | |
| 548 | /************** Include sqlite3.h in the middle of sqliteInt.h ***************/ |
| 549 | /************** Begin file sqlite3.h *****************************************/ |
| 550 | /* |
| 551 | ** 2001 September 15 |
| 552 | ** |
| 553 | ** The author disclaims copyright to this source code. In place of |
| 554 | ** a legal notice, here is a blessing: |
| @@ -660,11 +656,11 @@ | |
| 656 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 657 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 658 | */ |
| 659 | #define SQLITE_VERSION "3.7.8" |
| 660 | #define SQLITE_VERSION_NUMBER 3007008 |
| 661 | #define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8" |
| 662 | |
| 663 | /* |
| 664 | ** CAPI3REF: Run-Time Library Version Numbers |
| 665 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 666 | ** |
| @@ -7309,14 +7305,12 @@ | |
| 7305 | #endif /* ifndef _SQLITE3RTREE_H_ */ |
| 7306 | |
| 7307 | |
| 7308 | /************** End of sqlite3.h *********************************************/ |
| 7309 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 7310 | /************** Include hash.h in the middle of sqliteInt.h ******************/ |
| 7311 | /************** Begin file hash.h ********************************************/ |
| 7312 | /* |
| 7313 | ** 2001 September 22 |
| 7314 | ** |
| 7315 | ** The author disclaims copyright to this source code. In place of |
| 7316 | ** a legal notice, here is a blessing: |
| @@ -7412,14 +7406,12 @@ | |
| 7406 | |
| 7407 | #endif /* _SQLITE_HASH_H_ */ |
| 7408 | |
| 7409 | /************** End of hash.h ************************************************/ |
| 7410 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 7411 | /************** Include parse.h in the middle of sqliteInt.h *****************/ |
| 7412 | /************** Begin file parse.h *******************************************/ |
| 7413 | #define TK_SEMI 1 |
| 7414 | #define TK_EXPLAIN 2 |
| 7415 | #define TK_QUERY 3 |
| 7416 | #define TK_PLAN 4 |
| 7417 | #define TK_BEGIN 5 |
| @@ -7576,11 +7568,10 @@ | |
| 7568 | #define TK_UMINUS 156 |
| 7569 | #define TK_UPLUS 157 |
| 7570 | |
| 7571 | /************** End of parse.h ***********************************************/ |
| 7572 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 7573 | #include <stdio.h> |
| 7574 | #include <stdlib.h> |
| 7575 | #include <string.h> |
| 7576 | #include <assert.h> |
| 7577 | #include <stddef.h> |
| @@ -7920,11 +7911,10 @@ | |
| 7911 | ** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque |
| 7912 | ** pointer types (i.e. FuncDef) defined above. |
| 7913 | */ |
| 7914 | /************** Include btree.h in the middle of sqliteInt.h *****************/ |
| 7915 | /************** Begin file btree.h *******************************************/ |
| 7916 | /* |
| 7917 | ** 2001 September 15 |
| 7918 | ** |
| 7919 | ** The author disclaims copyright to this source code. In place of |
| 7920 | ** a legal notice, here is a blessing: |
| @@ -8165,14 +8155,12 @@ | |
| 8155 | |
| 8156 | #endif /* _BTREE_H_ */ |
| 8157 | |
| 8158 | /************** End of btree.h ***********************************************/ |
| 8159 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8160 | /************** Include vdbe.h in the middle of sqliteInt.h ******************/ |
| 8161 | /************** Begin file vdbe.h ********************************************/ |
| 8162 | /* |
| 8163 | ** 2001 September 15 |
| 8164 | ** |
| 8165 | ** The author disclaims copyright to this source code. In place of |
| 8166 | ** a legal notice, here is a blessing: |
| @@ -8333,11 +8321,10 @@ | |
| 8321 | ** The makefile scans the vdbe.c source file and creates the "opcodes.h" |
| 8322 | ** header file that defines a number for each opcode used by the VDBE. |
| 8323 | */ |
| 8324 | /************** Include opcodes.h in the middle of vdbe.h ********************/ |
| 8325 | /************** Begin file opcodes.h *****************************************/ |
| 8326 | /* Automatically generated. Do not edit */ |
| 8327 | /* See the mkopcodeh.awk script for details */ |
| 8328 | #define OP_Goto 1 |
| 8329 | #define OP_Gosub 2 |
| 8330 | #define OP_Return 3 |
| @@ -8387,108 +8374,109 @@ | |
| 8374 | #define OP_Jump 25 |
| 8375 | #define OP_And 69 /* same as TK_AND */ |
| 8376 | #define OP_Or 68 /* same as TK_OR */ |
| 8377 | #define OP_Not 19 /* same as TK_NOT */ |
| 8378 | #define OP_BitNot 93 /* same as TK_BITNOT */ |
| 8379 | #define OP_Once 26 |
| 8380 | #define OP_If 27 |
| 8381 | #define OP_IfNot 28 |
| 8382 | #define OP_IsNull 73 /* same as TK_ISNULL */ |
| 8383 | #define OP_NotNull 74 /* same as TK_NOTNULL */ |
| 8384 | #define OP_Column 29 |
| 8385 | #define OP_Affinity 30 |
| 8386 | #define OP_MakeRecord 31 |
| 8387 | #define OP_Count 32 |
| 8388 | #define OP_Savepoint 33 |
| 8389 | #define OP_AutoCommit 34 |
| 8390 | #define OP_Transaction 35 |
| 8391 | #define OP_ReadCookie 36 |
| 8392 | #define OP_SetCookie 37 |
| 8393 | #define OP_VerifyCookie 38 |
| 8394 | #define OP_OpenRead 39 |
| 8395 | #define OP_OpenWrite 40 |
| 8396 | #define OP_OpenAutoindex 41 |
| 8397 | #define OP_OpenEphemeral 42 |
| 8398 | #define OP_SorterOpen 43 |
| 8399 | #define OP_OpenPseudo 44 |
| 8400 | #define OP_Close 45 |
| 8401 | #define OP_SeekLt 46 |
| 8402 | #define OP_SeekLe 47 |
| 8403 | #define OP_SeekGe 48 |
| 8404 | #define OP_SeekGt 49 |
| 8405 | #define OP_Seek 50 |
| 8406 | #define OP_NotFound 51 |
| 8407 | #define OP_Found 52 |
| 8408 | #define OP_IsUnique 53 |
| 8409 | #define OP_NotExists 54 |
| 8410 | #define OP_Sequence 55 |
| 8411 | #define OP_NewRowid 56 |
| 8412 | #define OP_Insert 57 |
| 8413 | #define OP_InsertInt 58 |
| 8414 | #define OP_Delete 59 |
| 8415 | #define OP_ResetCount 60 |
| 8416 | #define OP_SorterCompare 61 |
| 8417 | #define OP_SorterData 62 |
| 8418 | #define OP_RowKey 63 |
| 8419 | #define OP_RowData 64 |
| 8420 | #define OP_Rowid 65 |
| 8421 | #define OP_NullRow 66 |
| 8422 | #define OP_Last 67 |
| 8423 | #define OP_SorterSort 70 |
| 8424 | #define OP_Sort 71 |
| 8425 | #define OP_Rewind 72 |
| 8426 | #define OP_SorterNext 81 |
| 8427 | #define OP_Prev 92 |
| 8428 | #define OP_Next 95 |
| 8429 | #define OP_SorterInsert 96 |
| 8430 | #define OP_IdxInsert 97 |
| 8431 | #define OP_IdxDelete 98 |
| 8432 | #define OP_IdxRowid 99 |
| 8433 | #define OP_IdxLT 100 |
| 8434 | #define OP_IdxGE 101 |
| 8435 | #define OP_Destroy 102 |
| 8436 | #define OP_Clear 103 |
| 8437 | #define OP_CreateIndex 104 |
| 8438 | #define OP_CreateTable 105 |
| 8439 | #define OP_ParseSchema 106 |
| 8440 | #define OP_LoadAnalysis 107 |
| 8441 | #define OP_DropTable 108 |
| 8442 | #define OP_DropIndex 109 |
| 8443 | #define OP_DropTrigger 110 |
| 8444 | #define OP_IntegrityCk 111 |
| 8445 | #define OP_RowSetAdd 112 |
| 8446 | #define OP_RowSetRead 113 |
| 8447 | #define OP_RowSetTest 114 |
| 8448 | #define OP_Program 115 |
| 8449 | #define OP_Param 116 |
| 8450 | #define OP_FkCounter 117 |
| 8451 | #define OP_FkIfZero 118 |
| 8452 | #define OP_MemMax 119 |
| 8453 | #define OP_IfPos 120 |
| 8454 | #define OP_IfNeg 121 |
| 8455 | #define OP_IfZero 122 |
| 8456 | #define OP_AggStep 123 |
| 8457 | #define OP_AggFinal 124 |
| 8458 | #define OP_Checkpoint 125 |
| 8459 | #define OP_JournalMode 126 |
| 8460 | #define OP_Vacuum 127 |
| 8461 | #define OP_IncrVacuum 128 |
| 8462 | #define OP_Expire 129 |
| 8463 | #define OP_TableLock 131 |
| 8464 | #define OP_VBegin 132 |
| 8465 | #define OP_VCreate 133 |
| 8466 | #define OP_VDestroy 134 |
| 8467 | #define OP_VOpen 135 |
| 8468 | #define OP_VFilter 136 |
| 8469 | #define OP_VColumn 137 |
| 8470 | #define OP_VNext 138 |
| 8471 | #define OP_VRename 139 |
| 8472 | #define OP_VUpdate 140 |
| 8473 | #define OP_Pagecount 146 |
| 8474 | #define OP_MaxPgcnt 147 |
| 8475 | #define OP_Trace 148 |
| 8476 | #define OP_Noop 149 |
| 8477 | #define OP_Explain 150 |
| 8478 | |
| 8479 | |
| 8480 | /* Properties such as "out2" or "jump" that are specified in |
| 8481 | ** comments following the "case" for each opcode in the vdbe.c |
| 8482 | ** are encoded into bitvectors as follows: |
| @@ -8502,30 +8490,29 @@ | |
| 8490 | #define OPFLG_OUT3 0x0040 /* out3: P3 is an output */ |
| 8491 | #define OPFLG_INITIALIZER {\ |
| 8492 | /* 0 */ 0x00, 0x01, 0x05, 0x04, 0x04, 0x10, 0x00, 0x02,\ |
| 8493 | /* 8 */ 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x24, 0x24,\ |
| 8494 | /* 16 */ 0x00, 0x00, 0x00, 0x24, 0x04, 0x05, 0x04, 0x00,\ |
| 8495 | /* 24 */ 0x00, 0x01, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00,\ |
| 8496 | /* 32 */ 0x02, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00,\ |
| 8497 | /* 40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11,\ |
| 8498 | /* 48 */ 0x11, 0x11, 0x08, 0x11, 0x11, 0x11, 0x11, 0x02,\ |
| 8499 | /* 56 */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ |
| 8500 | /* 64 */ 0x00, 0x02, 0x00, 0x01, 0x4c, 0x4c, 0x01, 0x01,\ |
| 8501 | /* 72 */ 0x01, 0x05, 0x05, 0x15, 0x15, 0x15, 0x15, 0x15,\ |
| 8502 | /* 80 */ 0x15, 0x01, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c,\ |
| 8503 | /* 88 */ 0x4c, 0x4c, 0x4c, 0x4c, 0x01, 0x24, 0x02, 0x01,\ |
| 8504 | /* 96 */ 0x08, 0x08, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00,\ |
| 8505 | /* 104 */ 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ |
| 8506 | /* 112 */ 0x0c, 0x45, 0x15, 0x01, 0x02, 0x00, 0x01, 0x08,\ |
| 8507 | /* 120 */ 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00,\ |
| 8508 | /* 128 */ 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\ |
| 8509 | /* 136 */ 0x01, 0x00, 0x01, 0x00, 0x00, 0x04, 0x04, 0x04,\ |
| 8510 | /* 144 */ 0x04, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00,} |
| 8511 | |
| 8512 | /************** End of opcodes.h *********************************************/ |
| 8513 | /************** Continuing where we left off in vdbe.h ***********************/ |
| 8514 | |
| 8515 | /* |
| 8516 | ** Prototypes for the VDBE interface. See comments on the implementation |
| 8517 | ** for a description of what each of these routines does. |
| 8518 | */ |
| @@ -8541,11 +8528,11 @@ | |
| 8528 | SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1); |
| 8529 | SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2); |
| 8530 | SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3); |
| 8531 | SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5); |
| 8532 | SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr); |
| 8533 | SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr); |
| 8534 | SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N); |
| 8535 | SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int); |
| 8536 | SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int); |
| 8537 | SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*); |
| 8538 | SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*); |
| @@ -8596,14 +8583,12 @@ | |
| 8583 | |
| 8584 | #endif |
| 8585 | |
| 8586 | /************** End of vdbe.h ************************************************/ |
| 8587 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8588 | /************** Include pager.h in the middle of sqliteInt.h *****************/ |
| 8589 | /************** Begin file pager.h *******************************************/ |
| 8590 | /* |
| 8591 | ** 2001 September 15 |
| 8592 | ** |
| 8593 | ** The author disclaims copyright to this source code. In place of |
| 8594 | ** a legal notice, here is a blessing: |
| @@ -8785,14 +8770,12 @@ | |
| 8770 | |
| 8771 | #endif /* _PAGER_H_ */ |
| 8772 | |
| 8773 | /************** End of pager.h ***********************************************/ |
| 8774 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8775 | /************** Include pcache.h in the middle of sqliteInt.h ****************/ |
| 8776 | /************** Begin file pcache.h ******************************************/ |
| 8777 | /* |
| 8778 | ** 2008 August 05 |
| 8779 | ** |
| 8780 | ** The author disclaims copyright to this source code. In place of |
| 8781 | ** a legal notice, here is a blessing: |
| @@ -8947,15 +8930,13 @@ | |
| 8930 | |
| 8931 | #endif /* _PCACHE_H_ */ |
| 8932 | |
| 8933 | /************** End of pcache.h **********************************************/ |
| 8934 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 8935 | |
| 8936 | /************** Include os.h in the middle of sqliteInt.h ********************/ |
| 8937 | /************** Begin file os.h **********************************************/ |
| 8938 | /* |
| 8939 | ** 2001 September 16 |
| 8940 | ** |
| 8941 | ** The author disclaims copyright to this source code. In place of |
| 8942 | ** a legal notice, here is a blessing: |
| @@ -9234,14 +9215,12 @@ | |
| 9215 | |
| 9216 | #endif /* _SQLITE_OS_H_ */ |
| 9217 | |
| 9218 | /************** End of os.h **************************************************/ |
| 9219 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 9220 | /************** Include mutex.h in the middle of sqliteInt.h *****************/ |
| 9221 | /************** Begin file mutex.h *******************************************/ |
| 9222 | /* |
| 9223 | ** 2007 August 28 |
| 9224 | ** |
| 9225 | ** The author disclaims copyright to this source code. In place of |
| 9226 | ** a legal notice, here is a blessing: |
| @@ -9312,11 +9291,10 @@ | |
| 9291 | #define sqlite3MutexEnd() |
| 9292 | #endif /* defined(SQLITE_MUTEX_OMIT) */ |
| 9293 | |
| 9294 | /************** End of mutex.h ***********************************************/ |
| 9295 | /************** Continuing where we left off in sqliteInt.h ******************/ |
| 9296 | |
| 9297 | |
| 9298 | /* |
| 9299 | ** Each database file to be accessed by the system is an instance |
| 9300 | ** of the following structure. There are normally two of these structures |
| @@ -10509,11 +10487,12 @@ | |
| 10487 | char *zDatabase; /* Name of database holding this table */ |
| 10488 | char *zName; /* Name of the table */ |
| 10489 | char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */ |
| 10490 | Table *pTab; /* An SQL table corresponding to zName */ |
| 10491 | Select *pSelect; /* A SELECT statement used in place of a table name */ |
| 10492 | int addrFillSub; /* Address of subroutine to manifest a subquery */ |
| 10493 | int regReturn; /* Register holding return address of addrFillSub */ |
| 10494 | u8 jointype; /* Type of join between this able and the previous */ |
| 10495 | u8 notIndexed; /* True if there is a NOT INDEXED clause */ |
| 10496 | u8 isCorrelated; /* True if sub-query is correlated */ |
| 10497 | #ifndef SQLITE_OMIT_EXPLAIN |
| 10498 | u8 iSelectId; /* If pSelect!=0, the id of the sub-select in EQP */ |
| @@ -11915,11 +11894,10 @@ | |
| 11894 | |
| 11895 | #endif /* _SQLITEINT_H_ */ |
| 11896 | |
| 11897 | /************** End of sqliteInt.h *******************************************/ |
| 11898 | /************** Begin file global.c ******************************************/ |
| 11899 | /* |
| 11900 | ** 2008 June 13 |
| 11901 | ** |
| 11902 | ** The author disclaims copyright to this source code. In place of |
| 11903 | ** a legal notice, here is a blessing: |
| @@ -12138,11 +12116,10 @@ | |
| 12116 | */ |
| 12117 | SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER; |
| 12118 | |
| 12119 | /************** End of global.c **********************************************/ |
| 12120 | /************** Begin file ctime.c *******************************************/ |
| 12121 | /* |
| 12122 | ** 2010 February 23 |
| 12123 | ** |
| 12124 | ** The author disclaims copyright to this source code. In place of |
| 12125 | ** a legal notice, here is a blessing: |
| @@ -12543,11 +12520,10 @@ | |
| 12520 | |
| 12521 | #endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ |
| 12522 | |
| 12523 | /************** End of ctime.c ***********************************************/ |
| 12524 | /************** Begin file status.c ******************************************/ |
| 12525 | /* |
| 12526 | ** 2008 June 18 |
| 12527 | ** |
| 12528 | ** The author disclaims copyright to this source code. In place of |
| 12529 | ** a legal notice, here is a blessing: |
| @@ -12561,11 +12537,10 @@ | |
| 12537 | ** This module implements the sqlite3_status() interface and related |
| 12538 | ** functionality. |
| 12539 | */ |
| 12540 | /************** Include vdbeInt.h in the middle of status.c ******************/ |
| 12541 | /************** Begin file vdbeInt.h *****************************************/ |
| 12542 | /* |
| 12543 | ** 2003 September 6 |
| 12544 | ** |
| 12545 | ** The author disclaims copyright to this source code. In place of |
| 12546 | ** a legal notice, here is a blessing: |
| @@ -13013,11 +12988,10 @@ | |
| 12988 | |
| 12989 | #endif /* !defined(_VDBEINT_H_) */ |
| 12990 | |
| 12991 | /************** End of vdbeInt.h *********************************************/ |
| 12992 | /************** Continuing where we left off in status.c *********************/ |
| 12993 | |
| 12994 | /* |
| 12995 | ** Variables in which to record status information. |
| 12996 | */ |
| 12997 | typedef struct sqlite3StatType sqlite3StatType; |
| @@ -13227,11 +13201,10 @@ | |
| 13201 | return rc; |
| 13202 | } |
| 13203 | |
| 13204 | /************** End of status.c **********************************************/ |
| 13205 | /************** Begin file date.c ********************************************/ |
| 13206 | /* |
| 13207 | ** 2003 October 31 |
| 13208 | ** |
| 13209 | ** The author disclaims copyright to this source code. In place of |
| 13210 | ** a legal notice, here is a blessing: |
| @@ -14355,11 +14328,10 @@ | |
| 14328 | } |
| 14329 | } |
| 14330 | |
| 14331 | /************** End of date.c ************************************************/ |
| 14332 | /************** Begin file os.c **********************************************/ |
| 14333 | /* |
| 14334 | ** 2005 November 29 |
| 14335 | ** |
| 14336 | ** The author disclaims copyright to this source code. In place of |
| 14337 | ** a legal notice, here is a blessing: |
| @@ -14689,11 +14661,10 @@ | |
| 14661 | return SQLITE_OK; |
| 14662 | } |
| 14663 | |
| 14664 | /************** End of os.c **************************************************/ |
| 14665 | /************** Begin file fault.c *******************************************/ |
| 14666 | /* |
| 14667 | ** 2008 Jan 22 |
| 14668 | ** |
| 14669 | ** The author disclaims copyright to this source code. In place of |
| 14670 | ** a legal notice, here is a blessing: |
| @@ -14779,11 +14750,10 @@ | |
| 14750 | |
| 14751 | #endif /* #ifndef SQLITE_OMIT_BUILTIN_TEST */ |
| 14752 | |
| 14753 | /************** End of fault.c ***********************************************/ |
| 14754 | /************** Begin file mem0.c ********************************************/ |
| 14755 | /* |
| 14756 | ** 2008 October 28 |
| 14757 | ** |
| 14758 | ** The author disclaims copyright to this source code. In place of |
| 14759 | ** a legal notice, here is a blessing: |
| @@ -14841,11 +14811,10 @@ | |
| 14811 | |
| 14812 | #endif /* SQLITE_ZERO_MALLOC */ |
| 14813 | |
| 14814 | /************** End of mem0.c ************************************************/ |
| 14815 | /************** Begin file mem1.c ********************************************/ |
| 14816 | /* |
| 14817 | ** 2007 August 14 |
| 14818 | ** |
| 14819 | ** The author disclaims copyright to this source code. In place of |
| 14820 | ** a legal notice, here is a blessing: |
| @@ -14994,11 +14963,10 @@ | |
| 14963 | |
| 14964 | #endif /* SQLITE_SYSTEM_MALLOC */ |
| 14965 | |
| 14966 | /************** End of mem1.c ************************************************/ |
| 14967 | /************** Begin file mem2.c ********************************************/ |
| 14968 | /* |
| 14969 | ** 2007 August 15 |
| 14970 | ** |
| 14971 | ** The author disclaims copyright to this source code. In place of |
| 14972 | ** a legal notice, here is a blessing: |
| @@ -15525,11 +15493,10 @@ | |
| 15493 | |
| 15494 | #endif /* SQLITE_MEMDEBUG */ |
| 15495 | |
| 15496 | /************** End of mem2.c ************************************************/ |
| 15497 | /************** Begin file mem3.c ********************************************/ |
| 15498 | /* |
| 15499 | ** 2007 October 14 |
| 15500 | ** |
| 15501 | ** The author disclaims copyright to this source code. In place of |
| 15502 | ** a legal notice, here is a blessing: |
| @@ -16215,11 +16182,10 @@ | |
| 16182 | |
| 16183 | #endif /* SQLITE_ENABLE_MEMSYS3 */ |
| 16184 | |
| 16185 | /************** End of mem3.c ************************************************/ |
| 16186 | /************** Begin file mem5.c ********************************************/ |
| 16187 | /* |
| 16188 | ** 2007 October 14 |
| 16189 | ** |
| 16190 | ** The author disclaims copyright to this source code. In place of |
| 16191 | ** a legal notice, here is a blessing: |
| @@ -16799,11 +16765,10 @@ | |
| 16765 | |
| 16766 | #endif /* SQLITE_ENABLE_MEMSYS5 */ |
| 16767 | |
| 16768 | /************** End of mem5.c ************************************************/ |
| 16769 | /************** Begin file mutex.c *******************************************/ |
| 16770 | /* |
| 16771 | ** 2007 August 14 |
| 16772 | ** |
| 16773 | ** The author disclaims copyright to this source code. In place of |
| 16774 | ** a legal notice, here is a blessing: |
| @@ -16955,11 +16920,10 @@ | |
| 16920 | |
| 16921 | #endif /* SQLITE_MUTEX_OMIT */ |
| 16922 | |
| 16923 | /************** End of mutex.c ***********************************************/ |
| 16924 | /************** Begin file mutex_noop.c **************************************/ |
| 16925 | /* |
| 16926 | ** 2008 October 07 |
| 16927 | ** |
| 16928 | ** The author disclaims copyright to this source code. In place of |
| 16929 | ** a legal notice, here is a blessing: |
| @@ -17164,11 +17128,10 @@ | |
| 17128 | #endif /* SQLITE_MUTEX_NOOP */ |
| 17129 | #endif /* SQLITE_MUTEX_OMIT */ |
| 17130 | |
| 17131 | /************** End of mutex_noop.c ******************************************/ |
| 17132 | /************** Begin file mutex_os2.c ***************************************/ |
| 17133 | /* |
| 17134 | ** 2007 August 28 |
| 17135 | ** |
| 17136 | ** The author disclaims copyright to this source code. In place of |
| 17137 | ** a legal notice, here is a blessing: |
| @@ -17441,11 +17404,10 @@ | |
| 17404 | } |
| 17405 | #endif /* SQLITE_MUTEX_OS2 */ |
| 17406 | |
| 17407 | /************** End of mutex_os2.c *******************************************/ |
| 17408 | /************** Begin file mutex_unix.c **************************************/ |
| 17409 | /* |
| 17410 | ** 2007 August 28 |
| 17411 | ** |
| 17412 | ** The author disclaims copyright to this source code. In place of |
| 17413 | ** a legal notice, here is a blessing: |
| @@ -17795,11 +17757,10 @@ | |
| 17757 | |
| 17758 | #endif /* SQLITE_MUTEX_PTHREAD */ |
| 17759 | |
| 17760 | /************** End of mutex_unix.c ******************************************/ |
| 17761 | /************** Begin file mutex_w32.c ***************************************/ |
| 17762 | /* |
| 17763 | ** 2007 August 14 |
| 17764 | ** |
| 17765 | ** The author disclaims copyright to this source code. In place of |
| 17766 | ** a legal notice, here is a blessing: |
| @@ -18130,11 +18091,10 @@ | |
| 18091 | } |
| 18092 | #endif /* SQLITE_MUTEX_W32 */ |
| 18093 | |
| 18094 | /************** End of mutex_w32.c *******************************************/ |
| 18095 | /************** Begin file malloc.c ******************************************/ |
| 18096 | /* |
| 18097 | ** 2001 September 15 |
| 18098 | ** |
| 18099 | ** The author disclaims copyright to this source code. In place of |
| 18100 | ** a legal notice, here is a blessing: |
| @@ -18910,11 +18870,10 @@ | |
| 18870 | return rc & (db ? db->errMask : 0xff); |
| 18871 | } |
| 18872 | |
| 18873 | /************** End of malloc.c **********************************************/ |
| 18874 | /************** Begin file printf.c ******************************************/ |
| 18875 | /* |
| 18876 | ** The "printf" code that follows dates from the 1980's. It is in |
| 18877 | ** the public domain. The original comments are included here for |
| 18878 | ** completeness. They are very out-of-date but might be useful as |
| 18879 | ** an historical reference. Most of the "enhancements" have been backed |
| @@ -19942,11 +19901,10 @@ | |
| 19901 | } |
| 19902 | #endif |
| 19903 | |
| 19904 | /************** End of printf.c **********************************************/ |
| 19905 | /************** Begin file random.c ******************************************/ |
| 19906 | /* |
| 19907 | ** 2001 September 15 |
| 19908 | ** |
| 19909 | ** The author disclaims copyright to this source code. In place of |
| 19910 | ** a legal notice, here is a blessing: |
| @@ -20090,11 +20048,10 @@ | |
| 20048 | } |
| 20049 | #endif /* SQLITE_OMIT_BUILTIN_TEST */ |
| 20050 | |
| 20051 | /************** End of random.c **********************************************/ |
| 20052 | /************** Begin file utf.c *********************************************/ |
| 20053 | /* |
| 20054 | ** 2004 April 13 |
| 20055 | ** |
| 20056 | ** The author disclaims copyright to this source code. In place of |
| 20057 | ** a legal notice, here is a blessing: |
| @@ -20652,11 +20609,10 @@ | |
| 20609 | #endif /* SQLITE_TEST */ |
| 20610 | #endif /* SQLITE_OMIT_UTF16 */ |
| 20611 | |
| 20612 | /************** End of utf.c *************************************************/ |
| 20613 | /************** Begin file util.c ********************************************/ |
| 20614 | /* |
| 20615 | ** 2001 September 15 |
| 20616 | ** |
| 20617 | ** The author disclaims copyright to this source code. In place of |
| 20618 | ** a legal notice, here is a blessing: |
| @@ -21835,11 +21791,10 @@ | |
| 21791 | } |
| 21792 | #endif |
| 21793 | |
| 21794 | /************** End of util.c ************************************************/ |
| 21795 | /************** Begin file hash.c ********************************************/ |
| 21796 | /* |
| 21797 | ** 2001 September 22 |
| 21798 | ** |
| 21799 | ** The author disclaims copyright to this source code. In place of |
| 21800 | ** a legal notice, here is a blessing: |
| @@ -22115,11 +22070,10 @@ | |
| 22070 | return 0; |
| 22071 | } |
| 22072 | |
| 22073 | /************** End of hash.c ************************************************/ |
| 22074 | /************** Begin file opcodes.c *****************************************/ |
| 22075 | /* Automatically generated. Do not edit */ |
| 22076 | /* See the mkopcodec.awk script for details. */ |
| 22077 | #if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG) |
| 22078 | SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){ |
| 22079 | static const char *const azName[] = { "?", |
| @@ -22146,66 +22100,66 @@ | |
| 22100 | /* 21 */ "MustBeInt", |
| 22101 | /* 22 */ "RealAffinity", |
| 22102 | /* 23 */ "Permutation", |
| 22103 | /* 24 */ "Compare", |
| 22104 | /* 25 */ "Jump", |
| 22105 | /* 26 */ "Once", |
| 22106 | /* 27 */ "If", |
| 22107 | /* 28 */ "IfNot", |
| 22108 | /* 29 */ "Column", |
| 22109 | /* 30 */ "Affinity", |
| 22110 | /* 31 */ "MakeRecord", |
| 22111 | /* 32 */ "Count", |
| 22112 | /* 33 */ "Savepoint", |
| 22113 | /* 34 */ "AutoCommit", |
| 22114 | /* 35 */ "Transaction", |
| 22115 | /* 36 */ "ReadCookie", |
| 22116 | /* 37 */ "SetCookie", |
| 22117 | /* 38 */ "VerifyCookie", |
| 22118 | /* 39 */ "OpenRead", |
| 22119 | /* 40 */ "OpenWrite", |
| 22120 | /* 41 */ "OpenAutoindex", |
| 22121 | /* 42 */ "OpenEphemeral", |
| 22122 | /* 43 */ "SorterOpen", |
| 22123 | /* 44 */ "OpenPseudo", |
| 22124 | /* 45 */ "Close", |
| 22125 | /* 46 */ "SeekLt", |
| 22126 | /* 47 */ "SeekLe", |
| 22127 | /* 48 */ "SeekGe", |
| 22128 | /* 49 */ "SeekGt", |
| 22129 | /* 50 */ "Seek", |
| 22130 | /* 51 */ "NotFound", |
| 22131 | /* 52 */ "Found", |
| 22132 | /* 53 */ "IsUnique", |
| 22133 | /* 54 */ "NotExists", |
| 22134 | /* 55 */ "Sequence", |
| 22135 | /* 56 */ "NewRowid", |
| 22136 | /* 57 */ "Insert", |
| 22137 | /* 58 */ "InsertInt", |
| 22138 | /* 59 */ "Delete", |
| 22139 | /* 60 */ "ResetCount", |
| 22140 | /* 61 */ "SorterCompare", |
| 22141 | /* 62 */ "SorterData", |
| 22142 | /* 63 */ "RowKey", |
| 22143 | /* 64 */ "RowData", |
| 22144 | /* 65 */ "Rowid", |
| 22145 | /* 66 */ "NullRow", |
| 22146 | /* 67 */ "Last", |
| 22147 | /* 68 */ "Or", |
| 22148 | /* 69 */ "And", |
| 22149 | /* 70 */ "SorterSort", |
| 22150 | /* 71 */ "Sort", |
| 22151 | /* 72 */ "Rewind", |
| 22152 | /* 73 */ "IsNull", |
| 22153 | /* 74 */ "NotNull", |
| 22154 | /* 75 */ "Ne", |
| 22155 | /* 76 */ "Eq", |
| 22156 | /* 77 */ "Gt", |
| 22157 | /* 78 */ "Le", |
| 22158 | /* 79 */ "Lt", |
| 22159 | /* 80 */ "Ge", |
| 22160 | /* 81 */ "SorterNext", |
| 22161 | /* 82 */ "BitAnd", |
| 22162 | /* 83 */ "BitOr", |
| 22163 | /* 84 */ "ShiftLeft", |
| 22164 | /* 85 */ "ShiftRight", |
| 22165 | /* 86 */ "Add", |
| @@ -22212,76 +22166,76 @@ | |
| 22166 | /* 87 */ "Subtract", |
| 22167 | /* 88 */ "Multiply", |
| 22168 | /* 89 */ "Divide", |
| 22169 | /* 90 */ "Remainder", |
| 22170 | /* 91 */ "Concat", |
| 22171 | /* 92 */ "Prev", |
| 22172 | /* 93 */ "BitNot", |
| 22173 | /* 94 */ "String8", |
| 22174 | /* 95 */ "Next", |
| 22175 | /* 96 */ "SorterInsert", |
| 22176 | /* 97 */ "IdxInsert", |
| 22177 | /* 98 */ "IdxDelete", |
| 22178 | /* 99 */ "IdxRowid", |
| 22179 | /* 100 */ "IdxLT", |
| 22180 | /* 101 */ "IdxGE", |
| 22181 | /* 102 */ "Destroy", |
| 22182 | /* 103 */ "Clear", |
| 22183 | /* 104 */ "CreateIndex", |
| 22184 | /* 105 */ "CreateTable", |
| 22185 | /* 106 */ "ParseSchema", |
| 22186 | /* 107 */ "LoadAnalysis", |
| 22187 | /* 108 */ "DropTable", |
| 22188 | /* 109 */ "DropIndex", |
| 22189 | /* 110 */ "DropTrigger", |
| 22190 | /* 111 */ "IntegrityCk", |
| 22191 | /* 112 */ "RowSetAdd", |
| 22192 | /* 113 */ "RowSetRead", |
| 22193 | /* 114 */ "RowSetTest", |
| 22194 | /* 115 */ "Program", |
| 22195 | /* 116 */ "Param", |
| 22196 | /* 117 */ "FkCounter", |
| 22197 | /* 118 */ "FkIfZero", |
| 22198 | /* 119 */ "MemMax", |
| 22199 | /* 120 */ "IfPos", |
| 22200 | /* 121 */ "IfNeg", |
| 22201 | /* 122 */ "IfZero", |
| 22202 | /* 123 */ "AggStep", |
| 22203 | /* 124 */ "AggFinal", |
| 22204 | /* 125 */ "Checkpoint", |
| 22205 | /* 126 */ "JournalMode", |
| 22206 | /* 127 */ "Vacuum", |
| 22207 | /* 128 */ "IncrVacuum", |
| 22208 | /* 129 */ "Expire", |
| 22209 | /* 130 */ "Real", |
| 22210 | /* 131 */ "TableLock", |
| 22211 | /* 132 */ "VBegin", |
| 22212 | /* 133 */ "VCreate", |
| 22213 | /* 134 */ "VDestroy", |
| 22214 | /* 135 */ "VOpen", |
| 22215 | /* 136 */ "VFilter", |
| 22216 | /* 137 */ "VColumn", |
| 22217 | /* 138 */ "VNext", |
| 22218 | /* 139 */ "VRename", |
| 22219 | /* 140 */ "VUpdate", |
| 22220 | /* 141 */ "ToText", |
| 22221 | /* 142 */ "ToBlob", |
| 22222 | /* 143 */ "ToNumeric", |
| 22223 | /* 144 */ "ToInt", |
| 22224 | /* 145 */ "ToReal", |
| 22225 | /* 146 */ "Pagecount", |
| 22226 | /* 147 */ "MaxPgcnt", |
| 22227 | /* 148 */ "Trace", |
| 22228 | /* 149 */ "Noop", |
| 22229 | /* 150 */ "Explain", |
| 22230 | }; |
| 22231 | return azName[i]; |
| 22232 | } |
| 22233 | #endif |
| 22234 | |
| 22235 | /************** End of opcodes.c *********************************************/ |
| 22236 | /************** Begin file os_os2.c ******************************************/ |
| 22237 | /* |
| 22238 | ** 2006 Feb 14 |
| 22239 | ** |
| 22240 | ** The author disclaims copyright to this source code. In place of |
| 22241 | ** a legal notice, here is a blessing: |
| @@ -22334,11 +22288,10 @@ | |
| 22288 | /* |
| 22289 | ** Include code that is common to all os_*.c files |
| 22290 | */ |
| 22291 | /************** Include os_common.h in the middle of os_os2.c ****************/ |
| 22292 | /************** Begin file os_common.h ***************************************/ |
| 22293 | /* |
| 22294 | ** 2004 May 22 |
| 22295 | ** |
| 22296 | ** The author disclaims copyright to this source code. In place of |
| 22297 | ** a legal notice, here is a blessing: |
| @@ -22388,11 +22341,10 @@ | |
| 22341 | ** hwtime.h contains inline assembler code for implementing |
| 22342 | ** high-performance timing routines. |
| 22343 | */ |
| 22344 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 22345 | /************** Begin file hwtime.h ******************************************/ |
| 22346 | /* |
| 22347 | ** 2008 May 27 |
| 22348 | ** |
| 22349 | ** The author disclaims copyright to this source code. In place of |
| 22350 | ** a legal notice, here is a blessing: |
| @@ -22477,11 +22429,10 @@ | |
| 22429 | |
| 22430 | #endif /* !defined(_HWTIME_H_) */ |
| 22431 | |
| 22432 | /************** End of hwtime.h **********************************************/ |
| 22433 | /************** Continuing where we left off in os_common.h ******************/ |
| 22434 | |
| 22435 | static sqlite_uint64 g_start; |
| 22436 | static sqlite_uint64 g_elapsed; |
| 22437 | #define TIMER_START g_start=sqlite3Hwtime() |
| 22438 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| @@ -22544,11 +22495,10 @@ | |
| 22495 | |
| 22496 | #endif /* !defined(_OS_COMMON_H_) */ |
| 22497 | |
| 22498 | /************** End of os_common.h *******************************************/ |
| 22499 | /************** Continuing where we left off in os_os2.c *********************/ |
| 22500 | |
| 22501 | /* Forward references */ |
| 22502 | typedef struct os2File os2File; /* The file structure */ |
| 22503 | typedef struct os2ShmNode os2ShmNode; /* A shared descritive memory node */ |
| 22504 | typedef struct os2ShmLink os2ShmLink; /* A connection to shared-memory */ |
| @@ -24416,11 +24366,10 @@ | |
| 24366 | |
| 24367 | #endif /* SQLITE_OS_OS2 */ |
| 24368 | |
| 24369 | /************** End of os_os2.c **********************************************/ |
| 24370 | /************** Begin file os_unix.c *****************************************/ |
| 24371 | /* |
| 24372 | ** 2004 May 22 |
| 24373 | ** |
| 24374 | ** The author disclaims copyright to this source code. In place of |
| 24375 | ** a legal notice, here is a blessing: |
| @@ -24681,11 +24630,10 @@ | |
| 24630 | /* |
| 24631 | ** Include code that is common to all os_*.c files |
| 24632 | */ |
| 24633 | /************** Include os_common.h in the middle of os_unix.c ***************/ |
| 24634 | /************** Begin file os_common.h ***************************************/ |
| 24635 | /* |
| 24636 | ** 2004 May 22 |
| 24637 | ** |
| 24638 | ** The author disclaims copyright to this source code. In place of |
| 24639 | ** a legal notice, here is a blessing: |
| @@ -24735,11 +24683,10 @@ | |
| 24683 | ** hwtime.h contains inline assembler code for implementing |
| 24684 | ** high-performance timing routines. |
| 24685 | */ |
| 24686 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 24687 | /************** Begin file hwtime.h ******************************************/ |
| 24688 | /* |
| 24689 | ** 2008 May 27 |
| 24690 | ** |
| 24691 | ** The author disclaims copyright to this source code. In place of |
| 24692 | ** a legal notice, here is a blessing: |
| @@ -24824,11 +24771,10 @@ | |
| 24771 | |
| 24772 | #endif /* !defined(_HWTIME_H_) */ |
| 24773 | |
| 24774 | /************** End of hwtime.h **********************************************/ |
| 24775 | /************** Continuing where we left off in os_common.h ******************/ |
| 24776 | |
| 24777 | static sqlite_uint64 g_start; |
| 24778 | static sqlite_uint64 g_elapsed; |
| 24779 | #define TIMER_START g_start=sqlite3Hwtime() |
| 24780 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| @@ -24891,11 +24837,10 @@ | |
| 24837 | |
| 24838 | #endif /* !defined(_OS_COMMON_H_) */ |
| 24839 | |
| 24840 | /************** End of os_common.h *******************************************/ |
| 24841 | /************** Continuing where we left off in os_unix.c ********************/ |
| 24842 | |
| 24843 | /* |
| 24844 | ** Define various macros that are missing from some systems. |
| 24845 | */ |
| 24846 | #ifndef O_LARGEFILE |
| @@ -31401,11 +31346,10 @@ | |
| 31346 | |
| 31347 | #endif /* SQLITE_OS_UNIX */ |
| 31348 | |
| 31349 | /************** End of os_unix.c *********************************************/ |
| 31350 | /************** Begin file os_win.c ******************************************/ |
| 31351 | /* |
| 31352 | ** 2004 May 22 |
| 31353 | ** |
| 31354 | ** The author disclaims copyright to this source code. In place of |
| 31355 | ** a legal notice, here is a blessing: |
| @@ -31463,11 +31407,10 @@ | |
| 31407 | /* |
| 31408 | ** Include code that is common to all os_*.c files |
| 31409 | */ |
| 31410 | /************** Include os_common.h in the middle of os_win.c ****************/ |
| 31411 | /************** Begin file os_common.h ***************************************/ |
| 31412 | /* |
| 31413 | ** 2004 May 22 |
| 31414 | ** |
| 31415 | ** The author disclaims copyright to this source code. In place of |
| 31416 | ** a legal notice, here is a blessing: |
| @@ -31517,11 +31460,10 @@ | |
| 31460 | ** hwtime.h contains inline assembler code for implementing |
| 31461 | ** high-performance timing routines. |
| 31462 | */ |
| 31463 | /************** Include hwtime.h in the middle of os_common.h ****************/ |
| 31464 | /************** Begin file hwtime.h ******************************************/ |
| 31465 | /* |
| 31466 | ** 2008 May 27 |
| 31467 | ** |
| 31468 | ** The author disclaims copyright to this source code. In place of |
| 31469 | ** a legal notice, here is a blessing: |
| @@ -31606,11 +31548,10 @@ | |
| 31548 | |
| 31549 | #endif /* !defined(_HWTIME_H_) */ |
| 31550 | |
| 31551 | /************** End of hwtime.h **********************************************/ |
| 31552 | /************** Continuing where we left off in os_common.h ******************/ |
| 31553 | |
| 31554 | static sqlite_uint64 g_start; |
| 31555 | static sqlite_uint64 g_elapsed; |
| 31556 | #define TIMER_START g_start=sqlite3Hwtime() |
| 31557 | #define TIMER_END g_elapsed=sqlite3Hwtime()-g_start |
| @@ -31673,11 +31614,10 @@ | |
| 31614 | |
| 31615 | #endif /* !defined(_OS_COMMON_H_) */ |
| 31616 | |
| 31617 | /************** End of os_common.h *******************************************/ |
| 31618 | /************** Continuing where we left off in os_win.c *********************/ |
| 31619 | |
| 31620 | /* |
| 31621 | ** Some microsoft compilers lack this definition. |
| 31622 | */ |
| 31623 | #ifndef INVALID_FILE_ATTRIBUTES |
| @@ -34809,11 +34749,10 @@ | |
| 34749 | |
| 34750 | #endif /* SQLITE_OS_WIN */ |
| 34751 | |
| 34752 | /************** End of os_win.c **********************************************/ |
| 34753 | /************** Begin file bitvec.c ******************************************/ |
| 34754 | /* |
| 34755 | ** 2008 February 16 |
| 34756 | ** |
| 34757 | ** The author disclaims copyright to this source code. In place of |
| 34758 | ** a legal notice, here is a blessing: |
| @@ -35220,11 +35159,10 @@ | |
| 35159 | } |
| 35160 | #endif /* SQLITE_OMIT_BUILTIN_TEST */ |
| 35161 | |
| 35162 | /************** End of bitvec.c **********************************************/ |
| 35163 | /************** Begin file pcache.c ******************************************/ |
| 35164 | /* |
| 35165 | ** 2008 August 05 |
| 35166 | ** |
| 35167 | ** The author disclaims copyright to this source code. In place of |
| 35168 | ** a legal notice, here is a blessing: |
| @@ -35817,11 +35755,10 @@ | |
| 35755 | } |
| 35756 | #endif |
| 35757 | |
| 35758 | /************** End of pcache.c **********************************************/ |
| 35759 | /************** Begin file pcache1.c *****************************************/ |
| 35760 | /* |
| 35761 | ** 2008 November 05 |
| 35762 | ** |
| 35763 | ** The author disclaims copyright to this source code. In place of |
| 35764 | ** a legal notice, here is a blessing: |
| @@ -37034,11 +36971,10 @@ | |
| 36971 | } |
| 36972 | #endif |
| 36973 | |
| 36974 | /************** End of pcache1.c *********************************************/ |
| 36975 | /************** Begin file rowset.c ******************************************/ |
| 36976 | /* |
| 36977 | ** 2008 December 3 |
| 36978 | ** |
| 36979 | ** The author disclaims copyright to this source code. In place of |
| 36980 | ** a legal notice, here is a blessing: |
| @@ -37459,11 +37395,10 @@ | |
| 37395 | return 0; |
| 37396 | } |
| 37397 | |
| 37398 | /************** End of rowset.c **********************************************/ |
| 37399 | /************** Begin file pager.c *******************************************/ |
| 37400 | /* |
| 37401 | ** 2001 September 15 |
| 37402 | ** |
| 37403 | ** The author disclaims copyright to this source code. In place of |
| 37404 | ** a legal notice, here is a blessing: |
| @@ -37483,11 +37418,10 @@ | |
| 37418 | ** another is writing. |
| 37419 | */ |
| 37420 | #ifndef SQLITE_OMIT_DISKIO |
| 37421 | /************** Include wal.h in the middle of pager.c ***********************/ |
| 37422 | /************** Begin file wal.h *********************************************/ |
| 37423 | /* |
| 37424 | ** 2010 February 1 |
| 37425 | ** |
| 37426 | ** The author disclaims copyright to this source code. In place of |
| 37427 | ** a legal notice, here is a blessing: |
| @@ -37608,11 +37542,10 @@ | |
| 37542 | #endif /* ifndef SQLITE_OMIT_WAL */ |
| 37543 | #endif /* _WAL_H_ */ |
| 37544 | |
| 37545 | /************** End of wal.h *************************************************/ |
| 37546 | /************** Continuing where we left off in pager.c **********************/ |
| 37547 | |
| 37548 | |
| 37549 | /******************* NOTES ON THE DESIGN OF THE PAGER ************************ |
| 37550 | ** |
| 37551 | ** This comment block describes invariants that hold when using a rollback |
| @@ -44422,11 +44355,10 @@ | |
| 44355 | |
| 44356 | #endif /* SQLITE_OMIT_DISKIO */ |
| 44357 | |
| 44358 | /************** End of pager.c ***********************************************/ |
| 44359 | /************** Begin file wal.c *********************************************/ |
| 44360 | /* |
| 44361 | ** 2010 February 1 |
| 44362 | ** |
| 44363 | ** The author disclaims copyright to this source code. In place of |
| 44364 | ** a legal notice, here is a blessing: |
| @@ -47377,11 +47309,10 @@ | |
| 47309 | |
| 47310 | #endif /* #ifndef SQLITE_OMIT_WAL */ |
| 47311 | |
| 47312 | /************** End of wal.c *************************************************/ |
| 47313 | /************** Begin file btmutex.c *****************************************/ |
| 47314 | /* |
| 47315 | ** 2007 August 27 |
| 47316 | ** |
| 47317 | ** The author disclaims copyright to this source code. In place of |
| 47318 | ** a legal notice, here is a blessing: |
| @@ -47397,11 +47328,10 @@ | |
| 47328 | ** big and we want to break it down some. This packaged seemed like |
| 47329 | ** a good breakout. |
| 47330 | */ |
| 47331 | /************** Include btreeInt.h in the middle of btmutex.c ****************/ |
| 47332 | /************** Begin file btreeInt.h ****************************************/ |
| 47333 | /* |
| 47334 | ** 2004 April 6 |
| 47335 | ** |
| 47336 | ** The author disclaims copyright to this source code. In place of |
| 47337 | ** a legal notice, here is a blessing: |
| @@ -48043,11 +47973,10 @@ | |
| 47973 | #define get4byte sqlite3Get4byte |
| 47974 | #define put4byte sqlite3Put4byte |
| 47975 | |
| 47976 | /************** End of btreeInt.h ********************************************/ |
| 47977 | /************** Continuing where we left off in btmutex.c ********************/ |
| 47978 | #ifndef SQLITE_OMIT_SHARED_CACHE |
| 47979 | #if SQLITE_THREADSAFE |
| 47980 | |
| 47981 | /* |
| 47982 | ** Obtain the BtShared mutex associated with B-Tree handle p. Also, |
| @@ -48316,11 +48245,10 @@ | |
| 48245 | #endif /* if SQLITE_THREADSAFE */ |
| 48246 | #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */ |
| 48247 | |
| 48248 | /************** End of btmutex.c *********************************************/ |
| 48249 | /************** Begin file btree.c *******************************************/ |
| 48250 | /* |
| 48251 | ** 2004 April 6 |
| 48252 | ** |
| 48253 | ** The author disclaims copyright to this source code. In place of |
| 48254 | ** a legal notice, here is a blessing: |
| @@ -48982,11 +48910,11 @@ | |
| 48910 | assert( nKey==(i64)(int)nKey ); |
| 48911 | pIdxKey = sqlite3VdbeAllocUnpackedRecord( |
| 48912 | pCur->pKeyInfo, aSpace, sizeof(aSpace), &pFree |
| 48913 | ); |
| 48914 | if( pIdxKey==0 ) return SQLITE_NOMEM; |
| 48915 | sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey, pIdxKey); |
| 48916 | }else{ |
| 48917 | pIdxKey = 0; |
| 48918 | } |
| 48919 | rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes); |
| 48920 | if( pFree ){ |
| @@ -56504,11 +56432,10 @@ | |
| 56432 | return rc; |
| 56433 | } |
| 56434 | |
| 56435 | /************** End of btree.c ***********************************************/ |
| 56436 | /************** Begin file backup.c ******************************************/ |
| 56437 | /* |
| 56438 | ** 2009 January 28 |
| 56439 | ** |
| 56440 | ** The author disclaims copyright to this source code. In place of |
| 56441 | ** a legal notice, here is a blessing: |
| @@ -57211,11 +57138,10 @@ | |
| 57138 | } |
| 57139 | #endif /* SQLITE_OMIT_VACUUM */ |
| 57140 | |
| 57141 | /************** End of backup.c **********************************************/ |
| 57142 | /************** Begin file vdbemem.c *****************************************/ |
| 57143 | /* |
| 57144 | ** 2004 May 26 |
| 57145 | ** |
| 57146 | ** The author disclaims copyright to this source code. In place of |
| 57147 | ** a legal notice, here is a blessing: |
| @@ -58366,11 +58292,10 @@ | |
| 58292 | return 0; |
| 58293 | } |
| 58294 | |
| 58295 | /************** End of vdbemem.c *********************************************/ |
| 58296 | /************** Begin file vdbeaux.c *****************************************/ |
| 58297 | /* |
| 58298 | ** 2003 September 6 |
| 58299 | ** |
| 58300 | ** The author disclaims copyright to this source code. In place of |
| 58301 | ** a legal notice, here is a blessing: |
| @@ -59037,22 +58962,19 @@ | |
| 58962 | p->pNext = pVdbe->pProgram; |
| 58963 | pVdbe->pProgram = p; |
| 58964 | } |
| 58965 | |
| 58966 | /* |
| 58967 | ** Change the opcode at addr into OP_Noop |
| 58968 | */ |
| 58969 | SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr){ |
| 58970 | if( p->aOp ){ |
| 58971 | VdbeOp *pOp = &p->aOp[addr]; |
| 58972 | sqlite3 *db = p->db; |
| 58973 | freeP4(db, pOp->p4type, pOp->p4.p); |
| 58974 | memset(pOp, 0, sizeof(pOp[0])); |
| 58975 | pOp->opcode = OP_Noop; |
| 58976 | } |
| 58977 | } |
| 58978 | |
| 58979 | /* |
| 58980 | ** Change the value of the P4 operand for a specific instruction. |
| @@ -59204,11 +59126,11 @@ | |
| 59126 | ** check the value of p->nOp-1 before continuing. |
| 59127 | */ |
| 59128 | SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){ |
| 59129 | /* C89 specifies that the constant "dummy" will be initialized to all |
| 59130 | ** zeros, which is correct. MSVC generates a warning, nevertheless. */ |
| 59131 | static VdbeOp dummy; /* Ignore the MSVC warning about no initializer */ |
| 59132 | assert( p->magic==VDBE_MAGIC_INIT ); |
| 59133 | if( addr<0 ){ |
| 59134 | #ifdef SQLITE_OMIT_TRACE |
| 59135 | if( p->nOp==0 ) return (VdbeOp*)&dummy; |
| 59136 | #endif |
| @@ -61609,11 +61531,10 @@ | |
| 61531 | } |
| 61532 | } |
| 61533 | |
| 61534 | /************** End of vdbeaux.c *********************************************/ |
| 61535 | /************** Begin file vdbeapi.c *****************************************/ |
| 61536 | /* |
| 61537 | ** 2004 May 26 |
| 61538 | ** |
| 61539 | ** The author disclaims copyright to this source code. In place of |
| 61540 | ** a legal notice, here is a blessing: |
| @@ -62917,11 +62838,10 @@ | |
| 62838 | return v; |
| 62839 | } |
| 62840 | |
| 62841 | /************** End of vdbeapi.c *********************************************/ |
| 62842 | /************** Begin file vdbetrace.c ***************************************/ |
| 62843 | /* |
| 62844 | ** 2009 November 25 |
| 62845 | ** |
| 62846 | ** The author disclaims copyright to this source code. In place of |
| 62847 | ** a legal notice, here is a blessing: |
| @@ -63073,11 +62993,10 @@ | |
| 62993 | |
| 62994 | #endif /* #ifndef SQLITE_OMIT_TRACE */ |
| 62995 | |
| 62996 | /************** End of vdbetrace.c *******************************************/ |
| 62997 | /************** Begin file vdbe.c ********************************************/ |
| 62998 | /* |
| 62999 | ** 2001 September 15 |
| 63000 | ** |
| 63001 | ** The author disclaims copyright to this source code. In place of |
| 63002 | ** a legal notice, here is a blessing: |
| @@ -63543,11 +63462,10 @@ | |
| 63462 | ** hwtime.h contains inline assembler code for implementing |
| 63463 | ** high-performance timing routines. |
| 63464 | */ |
| 63465 | /************** Include hwtime.h in the middle of vdbe.c *********************/ |
| 63466 | /************** Begin file hwtime.h ******************************************/ |
| 63467 | /* |
| 63468 | ** 2008 May 27 |
| 63469 | ** |
| 63470 | ** The author disclaims copyright to this source code. In place of |
| 63471 | ** a legal notice, here is a blessing: |
| @@ -63632,11 +63550,10 @@ | |
| 63550 | |
| 63551 | #endif /* !defined(_HWTIME_H_) */ |
| 63552 | |
| 63553 | /************** End of hwtime.h **********************************************/ |
| 63554 | /************** Continuing where we left off in vdbe.c ***********************/ |
| 63555 | |
| 63556 | #endif |
| 63557 | |
| 63558 | /* |
| 63559 | ** The CHECK_FOR_INTERRUPT macro defined here looks to see if the |
| @@ -65627,10 +65544,20 @@ | |
| 65544 | sqlite3VdbeMemSetInt64(pOut, ~sqlite3VdbeIntValue(pIn1)); |
| 65545 | } |
| 65546 | break; |
| 65547 | } |
| 65548 | |
| 65549 | /* Opcode: Once P1 P2 * * * |
| 65550 | ** |
| 65551 | ** Jump to P2 if the value in register P1 is a not null or zero. If |
| 65552 | ** the value is NULL or zero, fall through and change the P1 register |
| 65553 | ** to an integer 1. |
| 65554 | ** |
| 65555 | ** When P1 is not used otherwise in a program, this opcode falls through |
| 65556 | ** once and jumps on all subsequent invocations. It is the equivalent |
| 65557 | ** of "OP_If P1 P2", followed by "OP_Integer 1 P1". |
| 65558 | */ |
| 65559 | /* Opcode: If P1 P2 P3 * * |
| 65560 | ** |
| 65561 | ** Jump to P2 if the value in register P1 is true. The value |
| 65562 | ** is considered true if it is numeric and non-zero. If the value |
| 65563 | ** in P1 is NULL then take the jump if P3 is true. |
| @@ -65639,10 +65566,11 @@ | |
| 65566 | ** |
| 65567 | ** Jump to P2 if the value in register P1 is False. The value |
| 65568 | ** is considered true if it has a numeric value of zero. If the value |
| 65569 | ** in P1 is NULL then take the jump if P3 is true. |
| 65570 | */ |
| 65571 | case OP_Once: /* jump, in1 */ |
| 65572 | case OP_If: /* jump, in1 */ |
| 65573 | case OP_IfNot: { /* jump, in1 */ |
| 65574 | #if 0 /* local variables moved into u.al */ |
| 65575 | int c; |
| 65576 | #endif /* local variables moved into u.al */ |
| @@ -65657,10 +65585,16 @@ | |
| 65585 | #endif |
| 65586 | if( pOp->opcode==OP_IfNot ) u.al.c = !u.al.c; |
| 65587 | } |
| 65588 | if( u.al.c ){ |
| 65589 | pc = pOp->p2-1; |
| 65590 | }else if( pOp->opcode==OP_Once ){ |
| 65591 | assert( (pIn1->flags & (MEM_Agg|MEM_Dyn|MEM_RowSet|MEM_Frame))==0 ); |
| 65592 | memAboutToChange(p, pIn1); |
| 65593 | pIn1->flags = MEM_Int; |
| 65594 | pIn1->u.i = 1; |
| 65595 | REGISTER_TRACE(pOp->p1, pIn1); |
| 65596 | } |
| 65597 | break; |
| 65598 | } |
| 65599 | |
| 65600 | /* Opcode: IsNull P1 P2 * * * |
| @@ -69860,11 +69794,10 @@ | |
| 69794 | goto vdbe_error_halt; |
| 69795 | } |
| 69796 | |
| 69797 | /************** End of vdbe.c ************************************************/ |
| 69798 | /************** Begin file vdbeblob.c ****************************************/ |
| 69799 | /* |
| 69800 | ** 2007 May 1 |
| 69801 | ** |
| 69802 | ** The author disclaims copyright to this source code. In place of |
| 69803 | ** a legal notice, here is a blessing: |
| @@ -70134,21 +70067,21 @@ | |
| 70067 | /* Make sure a mutex is held on the table to be accessed */ |
| 70068 | sqlite3VdbeUsesBtree(v, iDb); |
| 70069 | |
| 70070 | /* Configure the OP_TableLock instruction */ |
| 70071 | #ifdef SQLITE_OMIT_SHARED_CACHE |
| 70072 | sqlite3VdbeChangeToNoop(v, 2); |
| 70073 | #else |
| 70074 | sqlite3VdbeChangeP1(v, 2, iDb); |
| 70075 | sqlite3VdbeChangeP2(v, 2, pTab->tnum); |
| 70076 | sqlite3VdbeChangeP3(v, 2, flags); |
| 70077 | sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT); |
| 70078 | #endif |
| 70079 | |
| 70080 | /* Remove either the OP_OpenWrite or OpenRead. Set the P2 |
| 70081 | ** parameter of the other to pTab->tnum. */ |
| 70082 | sqlite3VdbeChangeToNoop(v, 4 - flags); |
| 70083 | sqlite3VdbeChangeP2(v, 3 + flags, pTab->tnum); |
| 70084 | sqlite3VdbeChangeP3(v, 3 + flags, iDb); |
| 70085 | |
| 70086 | /* Configure the number of columns. Configure the cursor to |
| 70087 | ** think that the table has one more column than it really |
| @@ -70331,11 +70264,10 @@ | |
| 70264 | |
| 70265 | #endif /* #ifndef SQLITE_OMIT_INCRBLOB */ |
| 70266 | |
| 70267 | /************** End of vdbeblob.c ********************************************/ |
| 70268 | /************** Begin file vdbesort.c ****************************************/ |
| 70269 | /* |
| 70270 | ** 2011 July 9 |
| 70271 | ** |
| 70272 | ** The author disclaims copyright to this source code. In place of |
| 70273 | ** a legal notice, here is a blessing: |
| @@ -70492,12 +70424,16 @@ | |
| 70424 | int rc; /* Return Code */ |
| 70425 | int nRead; /* Number of bytes read */ |
| 70426 | int nRec = 0; /* Size of record in bytes */ |
| 70427 | int iOff = 0; /* Size of serialized size varint in bytes */ |
| 70428 | |
| 70429 | assert( pIter->iEof>=pIter->iReadOff ); |
| 70430 | if( pIter->iEof-pIter->iReadOff>5 ){ |
| 70431 | nRead = 5; |
| 70432 | }else{ |
| 70433 | nRead = (int)(pIter->iEof - pIter->iReadOff); |
| 70434 | } |
| 70435 | if( nRead<=0 ){ |
| 70436 | /* This is an EOF condition */ |
| 70437 | vdbeSorterIterZero(db, pIter); |
| 70438 | return SQLITE_OK; |
| 70439 | } |
| @@ -71211,11 +71147,10 @@ | |
| 71147 | |
| 71148 | #endif /* #ifndef SQLITE_OMIT_MERGE_SORT */ |
| 71149 | |
| 71150 | /************** End of vdbesort.c ********************************************/ |
| 71151 | /************** Begin file journal.c *****************************************/ |
| 71152 | /* |
| 71153 | ** 2007 August 22 |
| 71154 | ** |
| 71155 | ** The author disclaims copyright to this source code. In place of |
| 71156 | ** a legal notice, here is a blessing: |
| @@ -71452,11 +71387,10 @@ | |
| 71387 | } |
| 71388 | #endif |
| 71389 | |
| 71390 | /************** End of journal.c *********************************************/ |
| 71391 | /************** Begin file memjournal.c **************************************/ |
| 71392 | /* |
| 71393 | ** 2008 October 7 |
| 71394 | ** |
| 71395 | ** The author disclaims copyright to this source code. In place of |
| 71396 | ** a legal notice, here is a blessing: |
| @@ -71714,11 +71648,10 @@ | |
| 71648 | return sizeof(MemJournal); |
| 71649 | } |
| 71650 | |
| 71651 | /************** End of memjournal.c ******************************************/ |
| 71652 | /************** Begin file walker.c ******************************************/ |
| 71653 | /* |
| 71654 | ** 2008 August 16 |
| 71655 | ** |
| 71656 | ** The author disclaims copyright to this source code. In place of |
| 71657 | ** a legal notice, here is a blessing: |
| @@ -71853,11 +71786,10 @@ | |
| 71786 | return rc & WRC_Abort; |
| 71787 | } |
| 71788 | |
| 71789 | /************** End of walker.c **********************************************/ |
| 71790 | /************** Begin file resolve.c *****************************************/ |
| 71791 | /* |
| 71792 | ** 2008 August 18 |
| 71793 | ** |
| 71794 | ** The author disclaims copyright to this source code. In place of |
| 71795 | ** a legal notice, here is a blessing: |
| @@ -73074,11 +73006,10 @@ | |
| 73006 | sqlite3WalkSelect(&w, p); |
| 73007 | } |
| 73008 | |
| 73009 | /************** End of resolve.c *********************************************/ |
| 73010 | /************** Begin file expr.c ********************************************/ |
| 73011 | /* |
| 73012 | ** 2001 September 15 |
| 73013 | ** |
| 73014 | ** The author disclaims copyright to this source code. In place of |
| 73015 | ** a legal notice, here is a blessing: |
| @@ -73977,11 +73908,12 @@ | |
| 73908 | pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase); |
| 73909 | pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName); |
| 73910 | pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias); |
| 73911 | pNewItem->jointype = pOldItem->jointype; |
| 73912 | pNewItem->iCursor = pOldItem->iCursor; |
| 73913 | pNewItem->addrFillSub = pOldItem->addrFillSub; |
| 73914 | pNewItem->regReturn = pOldItem->regReturn; |
| 73915 | pNewItem->isCorrelated = pOldItem->isCorrelated; |
| 73916 | pNewItem->zIndex = sqlite3DbStrDup(db, pOldItem->zIndex); |
| 73917 | pNewItem->notIndexed = pOldItem->notIndexed; |
| 73918 | pNewItem->pIndex = pOldItem->pIndex; |
| 73919 | pTab = pNewItem->pTab = pOldItem->pTab; |
| @@ -74537,12 +74469,11 @@ | |
| 74469 | assert(v); |
| 74470 | if( iCol<0 ){ |
| 74471 | int iMem = ++pParse->nMem; |
| 74472 | int iAddr; |
| 74473 | |
| 74474 | iAddr = sqlite3VdbeAddOp1(v, OP_Once, iMem); |
| 74475 | |
| 74476 | sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead); |
| 74477 | eType = IN_INDEX_ROWID; |
| 74478 | |
| 74479 | sqlite3VdbeJumpHere(v, iAddr); |
| @@ -74569,12 +74500,11 @@ | |
| 74500 | int iMem = ++pParse->nMem; |
| 74501 | int iAddr; |
| 74502 | char *pKey; |
| 74503 | |
| 74504 | pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx); |
| 74505 | iAddr = sqlite3VdbeAddOp1(v, OP_Once, iMem); |
| 74506 | |
| 74507 | sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb, |
| 74508 | pKey,P4_KEYINFO_HANDOFF); |
| 74509 | VdbeComment((v, "%s", pIdx->zName)); |
| 74510 | eType = IN_INDEX_INDEX; |
| @@ -74655,10 +74585,11 @@ | |
| 74585 | ){ |
| 74586 | int testAddr = 0; /* One-time test address */ |
| 74587 | int rReg = 0; /* Register storing resulting */ |
| 74588 | Vdbe *v = sqlite3GetVdbe(pParse); |
| 74589 | if( NEVER(v==0) ) return 0; |
| 74590 | assert( sqlite3VdbeCurrentAddr(v)>0 ); |
| 74591 | sqlite3ExprCachePush(pParse); |
| 74592 | |
| 74593 | /* This code must be run in its entirety every time it is encountered |
| 74594 | ** if any of the following is true: |
| 74595 | ** |
| @@ -74669,12 +74600,11 @@ | |
| 74600 | ** If all of the above are false, then we can run this code just once |
| 74601 | ** save the results, and reuse the same result on subsequent invocations. |
| 74602 | */ |
| 74603 | if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){ |
| 74604 | int mem = ++pParse->nMem; |
| 74605 | testAddr = sqlite3VdbeAddOp1(v, OP_Once, mem); |
| 74606 | assert( testAddr>0 || pParse->db->mallocFailed ); |
| 74607 | } |
| 74608 | |
| 74609 | #ifndef SQLITE_OMIT_EXPLAIN |
| 74610 | if( pParse->explain==2 ){ |
| @@ -74770,11 +74700,11 @@ | |
| 74700 | ** disable the test that was generated above that makes sure |
| 74701 | ** this code only executes once. Because for a non-constant |
| 74702 | ** expression we need to rerun this code each time. |
| 74703 | */ |
| 74704 | if( testAddr && !sqlite3ExprIsConstant(pE2) ){ |
| 74705 | sqlite3VdbeChangeToNoop(v, testAddr); |
| 74706 | testAddr = 0; |
| 74707 | } |
| 74708 | |
| 74709 | /* Evaluate the expression and insert it into the temp table */ |
| 74710 | if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){ |
| @@ -74841,11 +74771,11 @@ | |
| 74771 | break; |
| 74772 | } |
| 74773 | } |
| 74774 | |
| 74775 | if( testAddr ){ |
| 74776 | sqlite3VdbeJumpHere(v, testAddr); |
| 74777 | } |
| 74778 | sqlite3ExprCachePop(pParse, 1); |
| 74779 | |
| 74780 | return rReg; |
| 74781 | } |
| @@ -76835,11 +76765,10 @@ | |
| 76765 | } |
| 76766 | } |
| 76767 | |
| 76768 | /************** End of expr.c ************************************************/ |
| 76769 | /************** Begin file alter.c *******************************************/ |
| 76770 | /* |
| 76771 | ** 2005 February 15 |
| 76772 | ** |
| 76773 | ** The author disclaims copyright to this source code. In place of |
| 76774 | ** a legal notice, here is a blessing: |
| @@ -77664,11 +77593,10 @@ | |
| 77593 | } |
| 77594 | #endif /* SQLITE_ALTER_TABLE */ |
| 77595 | |
| 77596 | /************** End of alter.c ***********************************************/ |
| 77597 | /************** Begin file analyze.c *****************************************/ |
| 77598 | /* |
| 77599 | ** 2005 July 8 |
| 77600 | ** |
| 77601 | ** The author disclaims copyright to this source code. In place of |
| 77602 | ** a legal notice, here is a blessing: |
| @@ -78386,11 +78314,10 @@ | |
| 78314 | |
| 78315 | #endif /* SQLITE_OMIT_ANALYZE */ |
| 78316 | |
| 78317 | /************** End of analyze.c *********************************************/ |
| 78318 | /************** Begin file attach.c ******************************************/ |
| 78319 | /* |
| 78320 | ** 2003 April 6 |
| 78321 | ** |
| 78322 | ** The author disclaims copyright to this source code. In place of |
| 78323 | ** a legal notice, here is a blessing: |
| @@ -78946,11 +78873,10 @@ | |
| 78873 | } |
| 78874 | #endif |
| 78875 | |
| 78876 | /************** End of attach.c **********************************************/ |
| 78877 | /************** Begin file auth.c ********************************************/ |
| 78878 | /* |
| 78879 | ** 2003 January 11 |
| 78880 | ** |
| 78881 | ** The author disclaims copyright to this source code. In place of |
| 78882 | ** a legal notice, here is a blessing: |
| @@ -79198,11 +79124,10 @@ | |
| 79124 | |
| 79125 | #endif /* SQLITE_OMIT_AUTHORIZATION */ |
| 79126 | |
| 79127 | /************** End of auth.c ************************************************/ |
| 79128 | /************** Begin file build.c *******************************************/ |
| 79129 | /* |
| 79130 | ** 2001 September 15 |
| 79131 | ** |
| 79132 | ** The author disclaims copyright to this source code. In place of |
| 79133 | ** a legal notice, here is a blessing: |
| @@ -83002,11 +82927,10 @@ | |
| 82927 | return pKey; |
| 82928 | } |
| 82929 | |
| 82930 | /************** End of build.c ***********************************************/ |
| 82931 | /************** Begin file callback.c ****************************************/ |
| 82932 | /* |
| 82933 | ** 2005 May 23 |
| 82934 | ** |
| 82935 | ** The author disclaims copyright to this source code. In place of |
| 82936 | ** a legal notice, here is a blessing: |
| @@ -83462,11 +83386,10 @@ | |
| 83386 | return p; |
| 83387 | } |
| 83388 | |
| 83389 | /************** End of callback.c ********************************************/ |
| 83390 | /************** Begin file delete.c ******************************************/ |
| 83391 | /* |
| 83392 | ** 2001 September 15 |
| 83393 | ** |
| 83394 | ** The author disclaims copyright to this source code. In place of |
| 83395 | ** a legal notice, here is a blessing: |
| @@ -84117,11 +84040,10 @@ | |
| 84040 | return regBase; |
| 84041 | } |
| 84042 | |
| 84043 | /************** End of delete.c **********************************************/ |
| 84044 | /************** Begin file func.c ********************************************/ |
| 84045 | /* |
| 84046 | ** 2002 February 23 |
| 84047 | ** |
| 84048 | ** The author disclaims copyright to this source code. In place of |
| 84049 | ** a legal notice, here is a blessing: |
| @@ -85726,11 +85648,10 @@ | |
| 85648 | #endif |
| 85649 | } |
| 85650 | |
| 85651 | /************** End of func.c ************************************************/ |
| 85652 | /************** Begin file fkey.c ********************************************/ |
| 85653 | /* |
| 85654 | ** |
| 85655 | ** The author disclaims copyright to this source code. In place of |
| 85656 | ** a legal notice, here is a blessing: |
| 85657 | ** |
| @@ -86947,11 +86868,10 @@ | |
| 86868 | } |
| 86869 | #endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */ |
| 86870 | |
| 86871 | /************** End of fkey.c ************************************************/ |
| 86872 | /************** Begin file insert.c ******************************************/ |
| 86873 | /* |
| 86874 | ** 2001 September 15 |
| 86875 | ** |
| 86876 | ** The author disclaims copyright to this source code. In place of |
| 86877 | ** a legal notice, here is a blessing: |
| @@ -88793,11 +88713,10 @@ | |
| 88713 | } |
| 88714 | #endif /* SQLITE_OMIT_XFER_OPT */ |
| 88715 | |
| 88716 | /************** End of insert.c **********************************************/ |
| 88717 | /************** Begin file legacy.c ******************************************/ |
| 88718 | /* |
| 88719 | ** 2001 September 15 |
| 88720 | ** |
| 88721 | ** The author disclaims copyright to this source code. In place of |
| 88722 | ** a legal notice, here is a blessing: |
| @@ -88941,11 +88860,10 @@ | |
| 88860 | return rc; |
| 88861 | } |
| 88862 | |
| 88863 | /************** End of legacy.c **********************************************/ |
| 88864 | /************** Begin file loadext.c *****************************************/ |
| 88865 | /* |
| 88866 | ** 2006 June 7 |
| 88867 | ** |
| 88868 | ** The author disclaims copyright to this source code. In place of |
| 88869 | ** a legal notice, here is a blessing: |
| @@ -88962,11 +88880,10 @@ | |
| 88880 | #ifndef SQLITE_CORE |
| 88881 | #define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */ |
| 88882 | #endif |
| 88883 | /************** Include sqlite3ext.h in the middle of loadext.c **************/ |
| 88884 | /************** Begin file sqlite3ext.h **************************************/ |
| 88885 | /* |
| 88886 | ** 2006 June 7 |
| 88887 | ** |
| 88888 | ** The author disclaims copyright to this source code. In place of |
| 88889 | ** a legal notice, here is a blessing: |
| @@ -89391,11 +89308,10 @@ | |
| 89308 | |
| 89309 | #endif /* _SQLITE3EXT_H_ */ |
| 89310 | |
| 89311 | /************** End of sqlite3ext.h ******************************************/ |
| 89312 | /************** Continuing where we left off in loadext.c ********************/ |
| 89313 | /* #include <string.h> */ |
| 89314 | |
| 89315 | #ifndef SQLITE_OMIT_LOAD_EXTENSION |
| 89316 | |
| 89317 | /* |
| @@ -90031,11 +89947,10 @@ | |
| 89947 | } |
| 89948 | } |
| 89949 | |
| 89950 | /************** End of loadext.c *********************************************/ |
| 89951 | /************** Begin file pragma.c ******************************************/ |
| 89952 | /* |
| 89953 | ** 2003 April 6 |
| 89954 | ** |
| 89955 | ** The author disclaims copyright to this source code. In place of |
| 89956 | ** a legal notice, here is a blessing: |
| @@ -91560,11 +91475,10 @@ | |
| 91475 | |
| 91476 | #endif /* SQLITE_OMIT_PRAGMA */ |
| 91477 | |
| 91478 | /************** End of pragma.c **********************************************/ |
| 91479 | /************** Begin file prepare.c *****************************************/ |
| 91480 | /* |
| 91481 | ** 2005 May 25 |
| 91482 | ** |
| 91483 | ** The author disclaims copyright to this source code. In place of |
| 91484 | ** a legal notice, here is a blessing: |
| @@ -92421,11 +92335,10 @@ | |
| 92335 | |
| 92336 | #endif /* SQLITE_OMIT_UTF16 */ |
| 92337 | |
| 92338 | /************** End of prepare.c *********************************************/ |
| 92339 | /************** Begin file select.c ******************************************/ |
| 92340 | /* |
| 92341 | ** 2001 September 15 |
| 92342 | ** |
| 92343 | ** The author disclaims copyright to this source code. In place of |
| 92344 | ** a legal notice, here is a blessing: |
| @@ -92512,10 +92425,12 @@ | |
| 92425 | pNew->addrOpenEphm[2] = -1; |
| 92426 | if( db->mallocFailed ) { |
| 92427 | clearSelect(db, pNew); |
| 92428 | if( pNew!=&standin ) sqlite3DbFree(db, pNew); |
| 92429 | pNew = 0; |
| 92430 | }else{ |
| 92431 | assert( pNew->pSrc!=0 || pParse->nErr>0 ); |
| 92432 | } |
| 92433 | return pNew; |
| 92434 | } |
| 92435 | |
| 92436 | /* |
| @@ -96224,11 +96139,15 @@ | |
| 96139 | struct SrcList_item *pItem = &pTabList->a[i]; |
| 96140 | SelectDest dest; |
| 96141 | Select *pSub = pItem->pSelect; |
| 96142 | int isAggSub; |
| 96143 | |
| 96144 | if( pSub==0 ) continue; |
| 96145 | if( pItem->addrFillSub ){ |
| 96146 | sqlite3VdbeAddOp2(v, OP_Gosub, pItem->regReturn, pItem->addrFillSub); |
| 96147 | continue; |
| 96148 | } |
| 96149 | |
| 96150 | /* Increment Parse.nHeight by the height of the largest expression |
| 96151 | ** tree refered to by this, the parent select. The child select |
| 96152 | ** may contain expression trees of at most |
| 96153 | ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit |
| @@ -96235,25 +96154,48 @@ | |
| 96154 | ** more conservative than necessary, but much easier than enforcing |
| 96155 | ** an exact limit. |
| 96156 | */ |
| 96157 | pParse->nHeight += sqlite3SelectExprHeight(p); |
| 96158 | |
| 96159 | isAggSub = (pSub->selFlags & SF_Aggregate)!=0; |
| 96160 | if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){ |
| 96161 | /* This subquery can be absorbed into its parent. */ |
| 96162 | if( isAggSub ){ |
| 96163 | isAgg = 1; |
| 96164 | p->selFlags |= SF_Aggregate; |
| 96165 | } |
| 96166 | i = -1; |
| 96167 | }else{ |
| 96168 | /* Generate a subroutine that will fill an ephemeral table with |
| 96169 | ** the content of this subquery. pItem->addrFillSub will point |
| 96170 | ** to the address of the generated subroutine. pItem->regReturn |
| 96171 | ** is a register allocated to hold the subroutine return address |
| 96172 | */ |
| 96173 | int topAddr; |
| 96174 | int onceAddr = 0; |
| 96175 | int retAddr; |
| 96176 | assert( pItem->addrFillSub==0 ); |
| 96177 | pItem->regReturn = ++pParse->nMem; |
| 96178 | topAddr = sqlite3VdbeAddOp2(v, OP_Integer, 0, pItem->regReturn); |
| 96179 | pItem->addrFillSub = topAddr+1; |
| 96180 | VdbeNoopComment((v, "materialize %s", pItem->pTab->zName)); |
| 96181 | if( pItem->isCorrelated==0 && pParse->pTriggerTab==0 ){ |
| 96182 | /* If the subquery is no correlated and if we are not inside of |
| 96183 | ** a trigger, then we only need to compute the value of the subquery |
| 96184 | ** once. */ |
| 96185 | int regOnce = ++pParse->nMem; |
| 96186 | onceAddr = sqlite3VdbeAddOp1(v, OP_Once, regOnce); |
| 96187 | } |
| 96188 | sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor); |
| 96189 | explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId); |
| 96190 | sqlite3Select(pParse, pSub, &dest); |
| 96191 | pItem->pTab->nRowEst = (unsigned)pSub->nSelectRow; |
| 96192 | if( onceAddr ) sqlite3VdbeJumpHere(v, onceAddr); |
| 96193 | retAddr = sqlite3VdbeAddOp1(v, OP_Return, pItem->regReturn); |
| 96194 | VdbeComment((v, "end %s", pItem->pTab->zName)); |
| 96195 | sqlite3VdbeChangeP1(v, topAddr, retAddr); |
| 96196 | |
| 96197 | } |
| 96198 | if( /*pParse->nErr ||*/ db->mallocFailed ){ |
| 96199 | goto select_end; |
| 96200 | } |
| 96201 | pParse->nHeight -= sqlite3SelectExprHeight(p); |
| @@ -96390,11 +96332,11 @@ | |
| 96332 | /* If sorting index that was created by a prior OP_OpenEphemeral |
| 96333 | ** instruction ended up not being needed, then change the OP_OpenEphemeral |
| 96334 | ** into an OP_Noop. |
| 96335 | */ |
| 96336 | if( addrSortIndex>=0 && pOrderBy==0 ){ |
| 96337 | sqlite3VdbeChangeToNoop(v, addrSortIndex); |
| 96338 | p->addrOpenEphm[2] = -1; |
| 96339 | } |
| 96340 | |
| 96341 | if( pWInfo->eDistinct ){ |
| 96342 | VdbeOp *pOp; /* No longer required OpenEphemeral instr. */ |
| @@ -96673,11 +96615,11 @@ | |
| 96615 | */ |
| 96616 | if( groupBySort ){ |
| 96617 | sqlite3VdbeAddOp2(v, OP_SorterNext, sAggInfo.sortingIdx, addrTopOfLoop); |
| 96618 | }else{ |
| 96619 | sqlite3WhereEnd(pWInfo); |
| 96620 | sqlite3VdbeChangeToNoop(v, addrSortingIdx); |
| 96621 | } |
| 96622 | |
| 96623 | /* Output the final row of result |
| 96624 | */ |
| 96625 | sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow); |
| @@ -96981,11 +96923,10 @@ | |
| 96923 | *****************************************************************************/ |
| 96924 | #endif /* defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */ |
| 96925 | |
| 96926 | /************** End of select.c **********************************************/ |
| 96927 | /************** Begin file table.c *******************************************/ |
| 96928 | /* |
| 96929 | ** 2001 September 15 |
| 96930 | ** |
| 96931 | ** The author disclaims copyright to this source code. In place of |
| 96932 | ** a legal notice, here is a blessing: |
| @@ -97181,11 +97122,10 @@ | |
| 97122 | |
| 97123 | #endif /* SQLITE_OMIT_GET_TABLE */ |
| 97124 | |
| 97125 | /************** End of table.c ***********************************************/ |
| 97126 | /************** Begin file trigger.c *****************************************/ |
| 97127 | /* |
| 97128 | ** |
| 97129 | ** The author disclaims copyright to this source code. In place of |
| 97130 | ** a legal notice, here is a blessing: |
| 97131 | ** |
| @@ -98307,11 +98247,10 @@ | |
| 98247 | |
| 98248 | #endif /* !defined(SQLITE_OMIT_TRIGGER) */ |
| 98249 | |
| 98250 | /************** End of trigger.c *********************************************/ |
| 98251 | /************** Begin file update.c ******************************************/ |
| 98252 | /* |
| 98253 | ** 2001 September 15 |
| 98254 | ** |
| 98255 | ** The author disclaims copyright to this source code. In place of |
| 98256 | ** a legal notice, here is a blessing: |
| @@ -98980,11 +98919,10 @@ | |
| 98919 | } |
| 98920 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 98921 | |
| 98922 | /************** End of update.c **********************************************/ |
| 98923 | /************** Begin file vacuum.c ******************************************/ |
| 98924 | /* |
| 98925 | ** 2003 April 6 |
| 98926 | ** |
| 98927 | ** The author disclaims copyright to this source code. In place of |
| 98928 | ** a legal notice, here is a blessing: |
| @@ -99327,11 +99265,10 @@ | |
| 99265 | |
| 99266 | #endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */ |
| 99267 | |
| 99268 | /************** End of vacuum.c **********************************************/ |
| 99269 | /************** Begin file vtab.c ********************************************/ |
| 99270 | /* |
| 99271 | ** 2006 June 10 |
| 99272 | ** |
| 99273 | ** The author disclaims copyright to this source code. In place of |
| 99274 | ** a legal notice, here is a blessing: |
| @@ -100396,11 +100333,10 @@ | |
| 100333 | |
| 100334 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 100335 | |
| 100336 | /************** End of vtab.c ************************************************/ |
| 100337 | /************** Begin file where.c *******************************************/ |
| 100338 | /* |
| 100339 | ** 2001 September 15 |
| 100340 | ** |
| 100341 | ** The author disclaims copyright to this source code. In place of |
| 100342 | ** a legal notice, here is a blessing: |
| @@ -100865,15 +100801,23 @@ | |
| 100801 | return mask; |
| 100802 | } |
| 100803 | static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){ |
| 100804 | Bitmask mask = 0; |
| 100805 | while( pS ){ |
| 100806 | SrcList *pSrc = pS->pSrc; |
| 100807 | mask |= exprListTableUsage(pMaskSet, pS->pEList); |
| 100808 | mask |= exprListTableUsage(pMaskSet, pS->pGroupBy); |
| 100809 | mask |= exprListTableUsage(pMaskSet, pS->pOrderBy); |
| 100810 | mask |= exprTableUsage(pMaskSet, pS->pWhere); |
| 100811 | mask |= exprTableUsage(pMaskSet, pS->pHaving); |
| 100812 | if( ALWAYS(pSrc!=0) ){ |
| 100813 | int i; |
| 100814 | for(i=0; i<pSrc->nSrc; i++){ |
| 100815 | mask |= exprSelectTableUsage(pMaskSet, pSrc->a[i].pSelect); |
| 100816 | mask |= exprTableUsage(pMaskSet, pSrc->a[i].pOn); |
| 100817 | } |
| 100818 | } |
| 100819 | pS = pS->pPrior; |
| 100820 | } |
| 100821 | return mask; |
| 100822 | } |
| 100823 | |
| @@ -102392,12 +102336,11 @@ | |
| 102336 | /* Generate code to skip over the creation and initialization of the |
| 102337 | ** transient index on 2nd and subsequent iterations of the loop. */ |
| 102338 | v = pParse->pVdbe; |
| 102339 | assert( v!=0 ); |
| 102340 | regIsInit = ++pParse->nMem; |
| 102341 | addrInit = sqlite3VdbeAddOp1(v, OP_Once, regIsInit); |
| 102342 | |
| 102343 | /* Count the number of columns that will be added to the index |
| 102344 | ** and used to match WHERE clause constraints */ |
| 102345 | nColumn = 0; |
| 102346 | pTable = pSrc->pTab; |
| @@ -105583,11 +105526,10 @@ | |
| 105526 | return; |
| 105527 | } |
| 105528 | |
| 105529 | /************** End of where.c ***********************************************/ |
| 105530 | /************** Begin file parse.c *******************************************/ |
| 105531 | /* Driver template for the LEMON parser generator. |
| 105532 | ** The author disclaims copyright to this source code. |
| 105533 | ** |
| 105534 | ** This version of "lempar.c" is modified, slightly, for use by SQLite. |
| 105535 | ** The only modifications are the addition of a couple of NEVER() |
| @@ -105596,11 +105538,10 @@ | |
| 105538 | ** specific grammar used by SQLite. |
| 105539 | */ |
| 105540 | /* First off, code is included that follows the "include" declaration |
| 105541 | ** in the input grammar file. */ |
| 105542 | /* #include <stdio.h> */ |
| 105543 | |
| 105544 | |
| 105545 | /* |
| 105546 | ** Disable all error recovery processing in the parser push-down |
| 105547 | ** automaton. |
| @@ -105644,11 +105585,10 @@ | |
| 105585 | /* |
| 105586 | ** An instance of this structure holds the ATTACH key and the key type. |
| 105587 | */ |
| 105588 | struct AttachKey { int type; Token key; }; |
| 105589 | |
| 105590 | |
| 105591 | /* This is a utility routine used to set the ExprSpan.zStart and |
| 105592 | ** ExprSpan.zEnd values of pOut so that the span covers the complete |
| 105593 | ** range of text beginning with pStart and going to the end of pEnd. |
| 105594 | */ |
| @@ -105664,11 +105604,10 @@ | |
| 105604 | static void spanExpr(ExprSpan *pOut, Parse *pParse, int op, Token *pValue){ |
| 105605 | pOut->pExpr = sqlite3PExpr(pParse, op, 0, 0, pValue); |
| 105606 | pOut->zStart = pValue->z; |
| 105607 | pOut->zEnd = &pValue->z[pValue->n]; |
| 105608 | } |
| 105609 | |
| 105610 | /* This routine constructs a binary expression node out of two ExprSpan |
| 105611 | ** objects and uses the result to populate a new ExprSpan object. |
| 105612 | */ |
| 105613 | static void spanBinaryExpr( |
| @@ -105680,11 +105619,10 @@ | |
| 105619 | ){ |
| 105620 | pOut->pExpr = sqlite3PExpr(pParse, op, pLeft->pExpr, pRight->pExpr, 0); |
| 105621 | pOut->zStart = pLeft->zStart; |
| 105622 | pOut->zEnd = pRight->zEnd; |
| 105623 | } |
| 105624 | |
| 105625 | /* Construct an expression node for a unary postfix operator |
| 105626 | */ |
| 105627 | static void spanUnaryPostfix( |
| 105628 | ExprSpan *pOut, /* Write the new expression node here */ |
| @@ -105695,11 +105633,10 @@ | |
| 105633 | ){ |
| 105634 | pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0); |
| 105635 | pOut->zStart = pOperand->zStart; |
| 105636 | pOut->zEnd = &pPostOp->z[pPostOp->n]; |
| 105637 | } |
| 105638 | |
| 105639 | /* A routine to convert a binary TK_IS or TK_ISNOT expression into a |
| 105640 | ** unary TK_ISNULL or TK_NOTNULL expression. */ |
| 105641 | static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){ |
| 105642 | sqlite3 *db = pParse->db; |
| @@ -105707,11 +105644,10 @@ | |
| 105644 | pA->op = (u8)op; |
| 105645 | sqlite3ExprDelete(db, pA->pRight); |
| 105646 | pA->pRight = 0; |
| 105647 | } |
| 105648 | } |
| 105649 | |
| 105650 | /* Construct an expression node for a unary prefix operator |
| 105651 | */ |
| 105652 | static void spanUnaryPrefix( |
| 105653 | ExprSpan *pOut, /* Write the new expression node here */ |
| @@ -105722,11 +105658,10 @@ | |
| 105658 | ){ |
| 105659 | pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0); |
| 105660 | pOut->zStart = pPreOp->z; |
| 105661 | pOut->zEnd = pOperand->zEnd; |
| 105662 | } |
| 105663 | /* Next is all token values, in a form suitable for use by makeheaders. |
| 105664 | ** This section will be null unless lemon is run with the -m switch. |
| 105665 | */ |
| 105666 | /* |
| 105667 | ** These constants (all generated automatically by the parser generator) |
| @@ -106978,21 +106913,17 @@ | |
| 106913 | ** inside the C code. |
| 106914 | */ |
| 106915 | case 160: /* select */ |
| 106916 | case 194: /* oneselect */ |
| 106917 | { |
| 106918 | sqlite3SelectDelete(pParse->db, (yypminor->yy387)); |
| 106919 | } |
| 106920 | break; |
| 106921 | case 174: /* term */ |
| 106922 | case 175: /* expr */ |
| 106923 | { |
| 106924 | sqlite3ExprDelete(pParse->db, (yypminor->yy118).pExpr); |
| 106925 | } |
| 106926 | break; |
| 106927 | case 179: /* idxlist_opt */ |
| 106928 | case 187: /* idxlist */ |
| 106929 | case 197: /* selcollist */ |
| @@ -107004,23 +106935,19 @@ | |
| 106935 | case 217: /* setlist */ |
| 106936 | case 220: /* itemlist */ |
| 106937 | case 221: /* exprlist */ |
| 106938 | case 226: /* case_exprlist */ |
| 106939 | { |
| 106940 | sqlite3ExprListDelete(pParse->db, (yypminor->yy322)); |
| 106941 | } |
| 106942 | break; |
| 106943 | case 193: /* fullname */ |
| 106944 | case 198: /* from */ |
| 106945 | case 206: /* seltablist */ |
| 106946 | case 207: /* stl_prefix */ |
| 106947 | { |
| 106948 | sqlite3SrcListDelete(pParse->db, (yypminor->yy259)); |
| 106949 | } |
| 106950 | break; |
| 106951 | case 199: /* where_opt */ |
| 106952 | case 201: /* having_opt */ |
| 106953 | case 210: /* on_opt */ |
| @@ -107028,37 +106955,29 @@ | |
| 106955 | case 225: /* case_operand */ |
| 106956 | case 227: /* case_else */ |
| 106957 | case 238: /* when_clause */ |
| 106958 | case 243: /* key_opt */ |
| 106959 | { |
| 106960 | sqlite3ExprDelete(pParse->db, (yypminor->yy314)); |
| 106961 | } |
| 106962 | break; |
| 106963 | case 211: /* using_opt */ |
| 106964 | case 213: /* inscollist */ |
| 106965 | case 219: /* inscollist_opt */ |
| 106966 | { |
| 106967 | sqlite3IdListDelete(pParse->db, (yypminor->yy384)); |
| 106968 | } |
| 106969 | break; |
| 106970 | case 234: /* trigger_cmd_list */ |
| 106971 | case 239: /* trigger_cmd */ |
| 106972 | { |
| 106973 | sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy203)); |
| 106974 | } |
| 106975 | break; |
| 106976 | case 236: /* trigger_event */ |
| 106977 | { |
| 106978 | sqlite3IdListDelete(pParse->db, (yypminor->yy90).b); |
| 106979 | } |
| 106980 | break; |
| 106981 | default: break; /* If no destructor action specified: do nothing */ |
| 106982 | } |
| 106983 | } |
| @@ -107240,16 +107159,14 @@ | |
| 107159 | } |
| 107160 | #endif |
| 107161 | while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); |
| 107162 | /* Here code is inserted which will execute if the parser |
| 107163 | ** stack every overflows */ |
| 107164 | |
| 107165 | UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */ |
| 107166 | sqlite3ErrorMsg(pParse, "parser stack overflow"); |
| 107167 | pParse->parseError = 1; |
| 107168 | sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */ |
| 107169 | } |
| 107170 | |
| 107171 | /* |
| 107172 | ** Perform a shift action. |
| @@ -107686,94 +107603,66 @@ | |
| 107603 | ** { ... } // User supplied code |
| 107604 | ** #line <lineno> <thisfile> |
| 107605 | ** break; |
| 107606 | */ |
| 107607 | case 5: /* explain ::= */ |
| 107608 | { sqlite3BeginParse(pParse, 0); } |
| 107609 | break; |
| 107610 | case 6: /* explain ::= EXPLAIN */ |
| 107611 | { sqlite3BeginParse(pParse, 1); } |
| 107612 | break; |
| 107613 | case 7: /* explain ::= EXPLAIN QUERY PLAN */ |
| 107614 | { sqlite3BeginParse(pParse, 2); } |
| 107615 | break; |
| 107616 | case 8: /* cmdx ::= cmd */ |
| 107617 | { sqlite3FinishCoding(pParse); } |
| 107618 | break; |
| 107619 | case 9: /* cmd ::= BEGIN transtype trans_opt */ |
| 107620 | {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy4);} |
| 107621 | break; |
| 107622 | case 13: /* transtype ::= */ |
| 107623 | {yygotominor.yy4 = TK_DEFERRED;} |
| 107624 | break; |
| 107625 | case 14: /* transtype ::= DEFERRED */ |
| 107626 | case 15: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==15); |
| 107627 | case 16: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==16); |
| 107628 | case 115: /* multiselect_op ::= UNION */ yytestcase(yyruleno==115); |
| 107629 | case 117: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==117); |
| 107630 | {yygotominor.yy4 = yymsp[0].major;} |
| 107631 | break; |
| 107632 | case 17: /* cmd ::= COMMIT trans_opt */ |
| 107633 | case 18: /* cmd ::= END trans_opt */ yytestcase(yyruleno==18); |
| 107634 | {sqlite3CommitTransaction(pParse);} |
| 107635 | break; |
| 107636 | case 19: /* cmd ::= ROLLBACK trans_opt */ |
| 107637 | {sqlite3RollbackTransaction(pParse);} |
| 107638 | break; |
| 107639 | case 22: /* cmd ::= SAVEPOINT nm */ |
| 107640 | { |
| 107641 | sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0); |
| 107642 | } |
| 107643 | break; |
| 107644 | case 23: /* cmd ::= RELEASE savepoint_opt nm */ |
| 107645 | { |
| 107646 | sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0); |
| 107647 | } |
| 107648 | break; |
| 107649 | case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */ |
| 107650 | { |
| 107651 | sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0); |
| 107652 | } |
| 107653 | break; |
| 107654 | case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */ |
| 107655 | { |
| 107656 | sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy4,0,0,yymsp[-2].minor.yy4); |
| 107657 | } |
| 107658 | break; |
| 107659 | case 27: /* createkw ::= CREATE */ |
| 107660 | { |
| 107661 | pParse->db->lookaside.bEnabled = 0; |
| 107662 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 107663 | } |
| 107664 | break; |
| 107665 | case 28: /* ifnotexists ::= */ |
| 107666 | case 31: /* temp ::= */ yytestcase(yyruleno==31); |
| 107667 | case 70: /* autoinc ::= */ yytestcase(yyruleno==70); |
| 107668 | case 83: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==83); |
| @@ -107783,56 +107672,44 @@ | |
| 107672 | case 109: /* ifexists ::= */ yytestcase(yyruleno==109); |
| 107673 | case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120); |
| 107674 | case 121: /* distinct ::= */ yytestcase(yyruleno==121); |
| 107675 | case 222: /* between_op ::= BETWEEN */ yytestcase(yyruleno==222); |
| 107676 | case 225: /* in_op ::= IN */ yytestcase(yyruleno==225); |
| 107677 | {yygotominor.yy4 = 0;} |
| 107678 | break; |
| 107679 | case 29: /* ifnotexists ::= IF NOT EXISTS */ |
| 107680 | case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30); |
| 107681 | case 71: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==71); |
| 107682 | case 86: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==86); |
| 107683 | case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108); |
| 107684 | case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119); |
| 107685 | case 223: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==223); |
| 107686 | case 226: /* in_op ::= NOT IN */ yytestcase(yyruleno==226); |
| 107687 | {yygotominor.yy4 = 1;} |
| 107688 | break; |
| 107689 | case 32: /* create_table_args ::= LP columnlist conslist_opt RP */ |
| 107690 | { |
| 107691 | sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0); |
| 107692 | } |
| 107693 | break; |
| 107694 | case 33: /* create_table_args ::= AS select */ |
| 107695 | { |
| 107696 | sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy387); |
| 107697 | sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387); |
| 107698 | } |
| 107699 | break; |
| 107700 | case 36: /* column ::= columnid type carglist */ |
| 107701 | { |
| 107702 | yygotominor.yy0.z = yymsp[-2].minor.yy0.z; |
| 107703 | yygotominor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n; |
| 107704 | } |
| 107705 | break; |
| 107706 | case 37: /* columnid ::= nm */ |
| 107707 | { |
| 107708 | sqlite3AddColumn(pParse,&yymsp[0].minor.yy0); |
| 107709 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 107710 | } |
| 107711 | break; |
| 107712 | case 38: /* id ::= ID */ |
| 107713 | case 39: /* id ::= INDEXED */ yytestcase(yyruleno==39); |
| 107714 | case 40: /* ids ::= ID|STRING */ yytestcase(yyruleno==40); |
| 107715 | case 41: /* nm ::= id */ yytestcase(yyruleno==41); |
| @@ -107852,373 +107729,256 @@ | |
| 107729 | case 264: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==264); |
| 107730 | case 265: /* plus_num ::= plus_opt number */ yytestcase(yyruleno==265); |
| 107731 | case 266: /* minus_num ::= MINUS number */ yytestcase(yyruleno==266); |
| 107732 | case 267: /* number ::= INTEGER|FLOAT */ yytestcase(yyruleno==267); |
| 107733 | case 285: /* trnm ::= nm */ yytestcase(yyruleno==285); |
| 107734 | {yygotominor.yy0 = yymsp[0].minor.yy0;} |
| 107735 | break; |
| 107736 | case 45: /* type ::= typetoken */ |
| 107737 | {sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);} |
| 107738 | break; |
| 107739 | case 47: /* typetoken ::= typename LP signed RP */ |
| 107740 | { |
| 107741 | yygotominor.yy0.z = yymsp[-3].minor.yy0.z; |
| 107742 | yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z); |
| 107743 | } |
| 107744 | break; |
| 107745 | case 48: /* typetoken ::= typename LP signed COMMA signed RP */ |
| 107746 | { |
| 107747 | yygotominor.yy0.z = yymsp[-5].minor.yy0.z; |
| 107748 | yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z); |
| 107749 | } |
| 107750 | break; |
| 107751 | case 50: /* typename ::= typename ids */ |
| 107752 | {yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);} |
| 107753 | break; |
| 107754 | case 57: /* ccons ::= DEFAULT term */ |
| 107755 | case 59: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==59); |
| 107756 | {sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy118);} |
| 107757 | break; |
| 107758 | case 58: /* ccons ::= DEFAULT LP expr RP */ |
| 107759 | {sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy118);} |
| 107760 | break; |
| 107761 | case 60: /* ccons ::= DEFAULT MINUS term */ |
| 107762 | { |
| 107763 | ExprSpan v; |
| 107764 | v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy118.pExpr, 0, 0); |
| 107765 | v.zStart = yymsp[-1].minor.yy0.z; |
| 107766 | v.zEnd = yymsp[0].minor.yy118.zEnd; |
| 107767 | sqlite3AddDefaultValue(pParse,&v); |
| 107768 | } |
| 107769 | break; |
| 107770 | case 61: /* ccons ::= DEFAULT id */ |
| 107771 | { |
| 107772 | ExprSpan v; |
| 107773 | spanExpr(&v, pParse, TK_STRING, &yymsp[0].minor.yy0); |
| 107774 | sqlite3AddDefaultValue(pParse,&v); |
| 107775 | } |
| 107776 | break; |
| 107777 | case 63: /* ccons ::= NOT NULL onconf */ |
| 107778 | {sqlite3AddNotNull(pParse, yymsp[0].minor.yy4);} |
| 107779 | break; |
| 107780 | case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */ |
| 107781 | {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy4,yymsp[0].minor.yy4,yymsp[-2].minor.yy4);} |
| 107782 | break; |
| 107783 | case 65: /* ccons ::= UNIQUE onconf */ |
| 107784 | {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy4,0,0,0,0);} |
| 107785 | break; |
| 107786 | case 66: /* ccons ::= CHECK LP expr RP */ |
| 107787 | {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy118.pExpr);} |
| 107788 | break; |
| 107789 | case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */ |
| 107790 | {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy322,yymsp[0].minor.yy4);} |
| 107791 | break; |
| 107792 | case 68: /* ccons ::= defer_subclause */ |
| 107793 | {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy4);} |
| 107794 | break; |
| 107795 | case 69: /* ccons ::= COLLATE ids */ |
| 107796 | {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);} |
| 107797 | break; |
| 107798 | case 72: /* refargs ::= */ |
| 107799 | { yygotominor.yy4 = OE_None*0x0101; /* EV: R-19803-45884 */} |
| 107800 | break; |
| 107801 | case 73: /* refargs ::= refargs refarg */ |
| 107802 | { yygotominor.yy4 = (yymsp[-1].minor.yy4 & ~yymsp[0].minor.yy215.mask) | yymsp[0].minor.yy215.value; } |
| 107803 | break; |
| 107804 | case 74: /* refarg ::= MATCH nm */ |
| 107805 | case 75: /* refarg ::= ON INSERT refact */ yytestcase(yyruleno==75); |
| 107806 | { yygotominor.yy215.value = 0; yygotominor.yy215.mask = 0x000000; } |
| 107807 | break; |
| 107808 | case 76: /* refarg ::= ON DELETE refact */ |
| 107809 | { yygotominor.yy215.value = yymsp[0].minor.yy4; yygotominor.yy215.mask = 0x0000ff; } |
| 107810 | break; |
| 107811 | case 77: /* refarg ::= ON UPDATE refact */ |
| 107812 | { yygotominor.yy215.value = yymsp[0].minor.yy4<<8; yygotominor.yy215.mask = 0x00ff00; } |
| 107813 | break; |
| 107814 | case 78: /* refact ::= SET NULL */ |
| 107815 | { yygotominor.yy4 = OE_SetNull; /* EV: R-33326-45252 */} |
| 107816 | break; |
| 107817 | case 79: /* refact ::= SET DEFAULT */ |
| 107818 | { yygotominor.yy4 = OE_SetDflt; /* EV: R-33326-45252 */} |
| 107819 | break; |
| 107820 | case 80: /* refact ::= CASCADE */ |
| 107821 | { yygotominor.yy4 = OE_Cascade; /* EV: R-33326-45252 */} |
| 107822 | break; |
| 107823 | case 81: /* refact ::= RESTRICT */ |
| 107824 | { yygotominor.yy4 = OE_Restrict; /* EV: R-33326-45252 */} |
| 107825 | break; |
| 107826 | case 82: /* refact ::= NO ACTION */ |
| 107827 | { yygotominor.yy4 = OE_None; /* EV: R-33326-45252 */} |
| 107828 | break; |
| 107829 | case 84: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ |
| 107830 | case 99: /* defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==99); |
| 107831 | case 101: /* onconf ::= ON CONFLICT resolvetype */ yytestcase(yyruleno==101); |
| 107832 | case 104: /* resolvetype ::= raisetype */ yytestcase(yyruleno==104); |
| 107833 | {yygotominor.yy4 = yymsp[0].minor.yy4;} |
| 107834 | break; |
| 107835 | case 88: /* conslist_opt ::= */ |
| 107836 | {yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;} |
| 107837 | break; |
| 107838 | case 89: /* conslist_opt ::= COMMA conslist */ |
| 107839 | {yygotominor.yy0 = yymsp[-1].minor.yy0;} |
| 107840 | break; |
| 107841 | case 94: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */ |
| 107842 | {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy322,yymsp[0].minor.yy4,yymsp[-2].minor.yy4,0);} |
| 107843 | break; |
| 107844 | case 95: /* tcons ::= UNIQUE LP idxlist RP onconf */ |
| 107845 | {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy322,yymsp[0].minor.yy4,0,0,0,0);} |
| 107846 | break; |
| 107847 | case 96: /* tcons ::= CHECK LP expr RP onconf */ |
| 107848 | {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy118.pExpr);} |
| 107849 | break; |
| 107850 | case 97: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */ |
| 107851 | { |
| 107852 | sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy322, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[-1].minor.yy4); |
| 107853 | sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy4); |
| 107854 | } |
| 107855 | break; |
| 107856 | case 100: /* onconf ::= */ |
| 107857 | {yygotominor.yy4 = OE_Default;} |
| 107858 | break; |
| 107859 | case 102: /* orconf ::= */ |
| 107860 | {yygotominor.yy210 = OE_Default;} |
| 107861 | break; |
| 107862 | case 103: /* orconf ::= OR resolvetype */ |
| 107863 | {yygotominor.yy210 = (u8)yymsp[0].minor.yy4;} |
| 107864 | break; |
| 107865 | case 105: /* resolvetype ::= IGNORE */ |
| 107866 | {yygotominor.yy4 = OE_Ignore;} |
| 107867 | break; |
| 107868 | case 106: /* resolvetype ::= REPLACE */ |
| 107869 | {yygotominor.yy4 = OE_Replace;} |
| 107870 | break; |
| 107871 | case 107: /* cmd ::= DROP TABLE ifexists fullname */ |
| 107872 | { |
| 107873 | sqlite3DropTable(pParse, yymsp[0].minor.yy259, 0, yymsp[-1].minor.yy4); |
| 107874 | } |
| 107875 | break; |
| 107876 | case 110: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */ |
| 107877 | { |
| 107878 | sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy387, yymsp[-6].minor.yy4, yymsp[-4].minor.yy4); |
| 107879 | } |
| 107880 | break; |
| 107881 | case 111: /* cmd ::= DROP VIEW ifexists fullname */ |
| 107882 | { |
| 107883 | sqlite3DropTable(pParse, yymsp[0].minor.yy259, 1, yymsp[-1].minor.yy4); |
| 107884 | } |
| 107885 | break; |
| 107886 | case 112: /* cmd ::= select */ |
| 107887 | { |
| 107888 | SelectDest dest = {SRT_Output, 0, 0, 0, 0}; |
| 107889 | sqlite3Select(pParse, yymsp[0].minor.yy387, &dest); |
| 107890 | sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387); |
| 107891 | } |
| 107892 | break; |
| 107893 | case 113: /* select ::= oneselect */ |
| 107894 | {yygotominor.yy387 = yymsp[0].minor.yy387;} |
| 107895 | break; |
| 107896 | case 114: /* select ::= select multiselect_op oneselect */ |
| 107897 | { |
| 107898 | if( yymsp[0].minor.yy387 ){ |
| 107899 | yymsp[0].minor.yy387->op = (u8)yymsp[-1].minor.yy4; |
| 107900 | yymsp[0].minor.yy387->pPrior = yymsp[-2].minor.yy387; |
| 107901 | }else{ |
| 107902 | sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy387); |
| 107903 | } |
| 107904 | yygotominor.yy387 = yymsp[0].minor.yy387; |
| 107905 | } |
| 107906 | break; |
| 107907 | case 116: /* multiselect_op ::= UNION ALL */ |
| 107908 | {yygotominor.yy4 = TK_ALL;} |
| 107909 | break; |
| 107910 | case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ |
| 107911 | { |
| 107912 | yygotominor.yy387 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy322,yymsp[-5].minor.yy259,yymsp[-4].minor.yy314,yymsp[-3].minor.yy322,yymsp[-2].minor.yy314,yymsp[-1].minor.yy322,yymsp[-7].minor.yy4,yymsp[0].minor.yy292.pLimit,yymsp[0].minor.yy292.pOffset); |
| 107913 | } |
| 107914 | break; |
| 107915 | case 122: /* sclp ::= selcollist COMMA */ |
| 107916 | case 247: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==247); |
| 107917 | {yygotominor.yy322 = yymsp[-1].minor.yy322;} |
| 107918 | break; |
| 107919 | case 123: /* sclp ::= */ |
| 107920 | case 151: /* orderby_opt ::= */ yytestcase(yyruleno==151); |
| 107921 | case 159: /* groupby_opt ::= */ yytestcase(yyruleno==159); |
| 107922 | case 240: /* exprlist ::= */ yytestcase(yyruleno==240); |
| 107923 | case 246: /* idxlist_opt ::= */ yytestcase(yyruleno==246); |
| 107924 | {yygotominor.yy322 = 0;} |
| 107925 | break; |
| 107926 | case 124: /* selcollist ::= sclp expr as */ |
| 107927 | { |
| 107928 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy322, yymsp[-1].minor.yy118.pExpr); |
| 107929 | if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[0].minor.yy0, 1); |
| 107930 | sqlite3ExprListSetSpan(pParse,yygotominor.yy322,&yymsp[-1].minor.yy118); |
| 107931 | } |
| 107932 | break; |
| 107933 | case 125: /* selcollist ::= sclp STAR */ |
| 107934 | { |
| 107935 | Expr *p = sqlite3Expr(pParse->db, TK_ALL, 0); |
| 107936 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy322, p); |
| 107937 | } |
| 107938 | break; |
| 107939 | case 126: /* selcollist ::= sclp nm DOT STAR */ |
| 107940 | { |
| 107941 | Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0); |
| 107942 | Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 107943 | Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0); |
| 107944 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, pDot); |
| 107945 | } |
| 107946 | break; |
| 107947 | case 129: /* as ::= */ |
| 107948 | {yygotominor.yy0.n = 0;} |
| 107949 | break; |
| 107950 | case 130: /* from ::= */ |
| 107951 | {yygotominor.yy259 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy259));} |
| 107952 | break; |
| 107953 | case 131: /* from ::= FROM seltablist */ |
| 107954 | { |
| 107955 | yygotominor.yy259 = yymsp[0].minor.yy259; |
| 107956 | sqlite3SrcListShiftJoinType(yygotominor.yy259); |
| 107957 | } |
| 107958 | break; |
| 107959 | case 132: /* stl_prefix ::= seltablist joinop */ |
| 107960 | { |
| 107961 | yygotominor.yy259 = yymsp[-1].minor.yy259; |
| 107962 | if( ALWAYS(yygotominor.yy259 && yygotominor.yy259->nSrc>0) ) yygotominor.yy259->a[yygotominor.yy259->nSrc-1].jointype = (u8)yymsp[0].minor.yy4; |
| 107963 | } |
| 107964 | break; |
| 107965 | case 133: /* stl_prefix ::= */ |
| 107966 | {yygotominor.yy259 = 0;} |
| 107967 | break; |
| 107968 | case 134: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */ |
| 107969 | { |
| 107970 | yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy314,yymsp[0].minor.yy384); |
| 107971 | sqlite3SrcListIndexedBy(pParse, yygotominor.yy259, &yymsp[-2].minor.yy0); |
| 107972 | } |
| 107973 | break; |
| 107974 | case 135: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */ |
| 107975 | { |
| 107976 | yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy387,yymsp[-1].minor.yy314,yymsp[0].minor.yy384); |
| 107977 | } |
| 107978 | break; |
| 107979 | case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ |
| 107980 | { |
| 107981 | if( yymsp[-6].minor.yy259==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy314==0 && yymsp[0].minor.yy384==0 ){ |
| 107982 | yygotominor.yy259 = yymsp[-4].minor.yy259; |
| 107983 | }else{ |
| 107984 | Select *pSubquery; |
| @@ -108225,260 +107985,180 @@ | |
| 107985 | sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy259); |
| 107986 | pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy259,0,0,0,0,0,0,0); |
| 107987 | yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy314,yymsp[0].minor.yy384); |
| 107988 | } |
| 107989 | } |
| 107990 | break; |
| 107991 | case 137: /* dbnm ::= */ |
| 107992 | case 146: /* indexed_opt ::= */ yytestcase(yyruleno==146); |
| 107993 | {yygotominor.yy0.z=0; yygotominor.yy0.n=0;} |
| 107994 | break; |
| 107995 | case 139: /* fullname ::= nm dbnm */ |
| 107996 | {yygotominor.yy259 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);} |
| 107997 | break; |
| 107998 | case 140: /* joinop ::= COMMA|JOIN */ |
| 107999 | { yygotominor.yy4 = JT_INNER; } |
| 108000 | break; |
| 108001 | case 141: /* joinop ::= JOIN_KW JOIN */ |
| 108002 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); } |
| 108003 | break; |
| 108004 | case 142: /* joinop ::= JOIN_KW nm JOIN */ |
| 108005 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); } |
| 108006 | break; |
| 108007 | case 143: /* joinop ::= JOIN_KW nm nm JOIN */ |
| 108008 | { yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); } |
| 108009 | break; |
| 108010 | case 144: /* on_opt ::= ON expr */ |
| 108011 | case 155: /* sortitem ::= expr */ yytestcase(yyruleno==155); |
| 108012 | case 162: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==162); |
| 108013 | case 169: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==169); |
| 108014 | case 235: /* case_else ::= ELSE expr */ yytestcase(yyruleno==235); |
| 108015 | case 237: /* case_operand ::= expr */ yytestcase(yyruleno==237); |
| 108016 | {yygotominor.yy314 = yymsp[0].minor.yy118.pExpr;} |
| 108017 | break; |
| 108018 | case 145: /* on_opt ::= */ |
| 108019 | case 161: /* having_opt ::= */ yytestcase(yyruleno==161); |
| 108020 | case 168: /* where_opt ::= */ yytestcase(yyruleno==168); |
| 108021 | case 236: /* case_else ::= */ yytestcase(yyruleno==236); |
| 108022 | case 238: /* case_operand ::= */ yytestcase(yyruleno==238); |
| 108023 | {yygotominor.yy314 = 0;} |
| 108024 | break; |
| 108025 | case 148: /* indexed_opt ::= NOT INDEXED */ |
| 108026 | {yygotominor.yy0.z=0; yygotominor.yy0.n=1;} |
| 108027 | break; |
| 108028 | case 149: /* using_opt ::= USING LP inscollist RP */ |
| 108029 | case 181: /* inscollist_opt ::= LP inscollist RP */ yytestcase(yyruleno==181); |
| 108030 | {yygotominor.yy384 = yymsp[-1].minor.yy384;} |
| 108031 | break; |
| 108032 | case 150: /* using_opt ::= */ |
| 108033 | case 180: /* inscollist_opt ::= */ yytestcase(yyruleno==180); |
| 108034 | {yygotominor.yy384 = 0;} |
| 108035 | break; |
| 108036 | case 152: /* orderby_opt ::= ORDER BY sortlist */ |
| 108037 | case 160: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==160); |
| 108038 | case 239: /* exprlist ::= nexprlist */ yytestcase(yyruleno==239); |
| 108039 | {yygotominor.yy322 = yymsp[0].minor.yy322;} |
| 108040 | break; |
| 108041 | case 153: /* sortlist ::= sortlist COMMA sortitem sortorder */ |
| 108042 | { |
| 108043 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322,yymsp[-1].minor.yy314); |
| 108044 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108045 | } |
| 108046 | break; |
| 108047 | case 154: /* sortlist ::= sortitem sortorder */ |
| 108048 | { |
| 108049 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy314); |
| 108050 | if( yygotominor.yy322 && ALWAYS(yygotominor.yy322->a) ) yygotominor.yy322->a[0].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108051 | } |
| 108052 | break; |
| 108053 | case 156: /* sortorder ::= ASC */ |
| 108054 | case 158: /* sortorder ::= */ yytestcase(yyruleno==158); |
| 108055 | {yygotominor.yy4 = SQLITE_SO_ASC;} |
| 108056 | break; |
| 108057 | case 157: /* sortorder ::= DESC */ |
| 108058 | {yygotominor.yy4 = SQLITE_SO_DESC;} |
| 108059 | break; |
| 108060 | case 163: /* limit_opt ::= */ |
| 108061 | {yygotominor.yy292.pLimit = 0; yygotominor.yy292.pOffset = 0;} |
| 108062 | break; |
| 108063 | case 164: /* limit_opt ::= LIMIT expr */ |
| 108064 | {yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr; yygotominor.yy292.pOffset = 0;} |
| 108065 | break; |
| 108066 | case 165: /* limit_opt ::= LIMIT expr OFFSET expr */ |
| 108067 | {yygotominor.yy292.pLimit = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pOffset = yymsp[0].minor.yy118.pExpr;} |
| 108068 | break; |
| 108069 | case 166: /* limit_opt ::= LIMIT expr COMMA expr */ |
| 108070 | {yygotominor.yy292.pOffset = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr;} |
| 108071 | break; |
| 108072 | case 167: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */ |
| 108073 | { |
| 108074 | sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy259, &yymsp[-1].minor.yy0); |
| 108075 | sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy259,yymsp[0].minor.yy314); |
| 108076 | } |
| 108077 | break; |
| 108078 | case 170: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */ |
| 108079 | { |
| 108080 | sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy259, &yymsp[-3].minor.yy0); |
| 108081 | sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy322,"set list"); |
| 108082 | sqlite3Update(pParse,yymsp[-4].minor.yy259,yymsp[-1].minor.yy322,yymsp[0].minor.yy314,yymsp[-5].minor.yy210); |
| 108083 | } |
| 108084 | break; |
| 108085 | case 171: /* setlist ::= setlist COMMA nm EQ expr */ |
| 108086 | { |
| 108087 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108088 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108089 | } |
| 108090 | break; |
| 108091 | case 172: /* setlist ::= nm EQ expr */ |
| 108092 | { |
| 108093 | yygotominor.yy322 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy118.pExpr); |
| 108094 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108095 | } |
| 108096 | break; |
| 108097 | case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */ |
| 108098 | {sqlite3Insert(pParse, yymsp[-5].minor.yy259, yymsp[-1].minor.yy322, 0, yymsp[-4].minor.yy384, yymsp[-7].minor.yy210);} |
| 108099 | break; |
| 108100 | case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */ |
| 108101 | {sqlite3Insert(pParse, yymsp[-2].minor.yy259, 0, yymsp[0].minor.yy387, yymsp[-1].minor.yy384, yymsp[-4].minor.yy210);} |
| 108102 | break; |
| 108103 | case 175: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */ |
| 108104 | {sqlite3Insert(pParse, yymsp[-3].minor.yy259, 0, 0, yymsp[-2].minor.yy384, yymsp[-5].minor.yy210);} |
| 108105 | break; |
| 108106 | case 176: /* insert_cmd ::= INSERT orconf */ |
| 108107 | {yygotominor.yy210 = yymsp[0].minor.yy210;} |
| 108108 | break; |
| 108109 | case 177: /* insert_cmd ::= REPLACE */ |
| 108110 | {yygotominor.yy210 = OE_Replace;} |
| 108111 | break; |
| 108112 | case 178: /* itemlist ::= itemlist COMMA expr */ |
| 108113 | case 241: /* nexprlist ::= nexprlist COMMA expr */ yytestcase(yyruleno==241); |
| 108114 | {yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy118.pExpr);} |
| 108115 | break; |
| 108116 | case 179: /* itemlist ::= expr */ |
| 108117 | case 242: /* nexprlist ::= expr */ yytestcase(yyruleno==242); |
| 108118 | {yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy118.pExpr);} |
| 108119 | break; |
| 108120 | case 182: /* inscollist ::= inscollist COMMA nm */ |
| 108121 | {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy384,&yymsp[0].minor.yy0);} |
| 108122 | break; |
| 108123 | case 183: /* inscollist ::= nm */ |
| 108124 | {yygotominor.yy384 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);} |
| 108125 | break; |
| 108126 | case 184: /* expr ::= term */ |
| 108127 | {yygotominor.yy118 = yymsp[0].minor.yy118;} |
| 108128 | break; |
| 108129 | case 185: /* expr ::= LP expr RP */ |
| 108130 | {yygotominor.yy118.pExpr = yymsp[-1].minor.yy118.pExpr; spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);} |
| 108131 | break; |
| 108132 | case 186: /* term ::= NULL */ |
| 108133 | case 191: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==191); |
| 108134 | case 192: /* term ::= STRING */ yytestcase(yyruleno==192); |
| 108135 | {spanExpr(&yygotominor.yy118, pParse, yymsp[0].major, &yymsp[0].minor.yy0);} |
| 108136 | break; |
| 108137 | case 187: /* expr ::= id */ |
| 108138 | case 188: /* expr ::= JOIN_KW */ yytestcase(yyruleno==188); |
| 108139 | {spanExpr(&yygotominor.yy118, pParse, TK_ID, &yymsp[0].minor.yy0);} |
| 108140 | break; |
| 108141 | case 189: /* expr ::= nm DOT nm */ |
| 108142 | { |
| 108143 | Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108144 | Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0); |
| 108145 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0); |
| 108146 | spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); |
| 108147 | } |
| 108148 | break; |
| 108149 | case 190: /* expr ::= nm DOT nm DOT nm */ |
| 108150 | { |
| 108151 | Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0); |
| 108152 | Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0); |
| 108153 | Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0); |
| 108154 | Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0); |
| 108155 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0); |
| 108156 | spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); |
| 108157 | } |
| 108158 | break; |
| 108159 | case 193: /* expr ::= REGISTER */ |
| 108160 | { |
| 108161 | /* When doing a nested parse, one can include terms in an expression |
| 108162 | ** that look like this: #1 #2 ... These terms refer to registers |
| 108163 | ** in the virtual machine. #N is the N-th register. */ |
| 108164 | if( pParse->nested==0 ){ |
| @@ -108488,40 +108168,32 @@ | |
| 108168 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &yymsp[0].minor.yy0); |
| 108169 | if( yygotominor.yy118.pExpr ) sqlite3GetInt32(&yymsp[0].minor.yy0.z[1], &yygotominor.yy118.pExpr->iTable); |
| 108170 | } |
| 108171 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108172 | } |
| 108173 | break; |
| 108174 | case 194: /* expr ::= VARIABLE */ |
| 108175 | { |
| 108176 | spanExpr(&yygotominor.yy118, pParse, TK_VARIABLE, &yymsp[0].minor.yy0); |
| 108177 | sqlite3ExprAssignVarNumber(pParse, yygotominor.yy118.pExpr); |
| 108178 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108179 | } |
| 108180 | break; |
| 108181 | case 195: /* expr ::= expr COLLATE ids */ |
| 108182 | { |
| 108183 | yygotominor.yy118.pExpr = sqlite3ExprSetCollByToken(pParse, yymsp[-2].minor.yy118.pExpr, &yymsp[0].minor.yy0); |
| 108184 | yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart; |
| 108185 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108186 | } |
| 108187 | break; |
| 108188 | case 196: /* expr ::= CAST LP expr AS typetoken RP */ |
| 108189 | { |
| 108190 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy118.pExpr, 0, &yymsp[-1].minor.yy0); |
| 108191 | spanSet(&yygotominor.yy118,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0); |
| 108192 | } |
| 108193 | break; |
| 108194 | case 197: /* expr ::= ID LP distinct exprlist RP */ |
| 108195 | { |
| 108196 | if( yymsp[-1].minor.yy322 && yymsp[-1].minor.yy322->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){ |
| 108197 | sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0); |
| 108198 | } |
| 108199 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0); |
| @@ -108528,59 +108200,47 @@ | |
| 108200 | spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); |
| 108201 | if( yymsp[-2].minor.yy4 && yygotominor.yy118.pExpr ){ |
| 108202 | yygotominor.yy118.pExpr->flags |= EP_Distinct; |
| 108203 | } |
| 108204 | } |
| 108205 | break; |
| 108206 | case 198: /* expr ::= ID LP STAR RP */ |
| 108207 | { |
| 108208 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0); |
| 108209 | spanSet(&yygotominor.yy118,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); |
| 108210 | } |
| 108211 | break; |
| 108212 | case 199: /* term ::= CTIME_KW */ |
| 108213 | { |
| 108214 | /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are |
| 108215 | ** treated as functions that return constants */ |
| 108216 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0); |
| 108217 | if( yygotominor.yy118.pExpr ){ |
| 108218 | yygotominor.yy118.pExpr->op = TK_CONST_FUNC; |
| 108219 | } |
| 108220 | spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); |
| 108221 | } |
| 108222 | break; |
| 108223 | case 200: /* expr ::= expr AND expr */ |
| 108224 | case 201: /* expr ::= expr OR expr */ yytestcase(yyruleno==201); |
| 108225 | case 202: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==202); |
| 108226 | case 203: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==203); |
| 108227 | case 204: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==204); |
| 108228 | case 205: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==205); |
| 108229 | case 206: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==206); |
| 108230 | case 207: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==207); |
| 108231 | {spanBinaryExpr(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);} |
| 108232 | break; |
| 108233 | case 208: /* likeop ::= LIKE_KW */ |
| 108234 | case 210: /* likeop ::= MATCH */ yytestcase(yyruleno==210); |
| 108235 | {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 0;} |
| 108236 | break; |
| 108237 | case 209: /* likeop ::= NOT LIKE_KW */ |
| 108238 | case 211: /* likeop ::= NOT MATCH */ yytestcase(yyruleno==211); |
| 108239 | {yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 1;} |
| 108240 | break; |
| 108241 | case 212: /* expr ::= expr likeop expr */ |
| 108242 | { |
| 108243 | ExprList *pList; |
| 108244 | pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy118.pExpr); |
| 108245 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy118.pExpr); |
| 108246 | yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy342.eOperator); |
| @@ -108587,14 +108247,12 @@ | |
| 108247 | if( yymsp[-1].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108248 | yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart; |
| 108249 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108250 | if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc; |
| 108251 | } |
| 108252 | break; |
| 108253 | case 213: /* expr ::= expr likeop expr ESCAPE expr */ |
| 108254 | { |
| 108255 | ExprList *pList; |
| 108256 | pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108257 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy118.pExpr); |
| 108258 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr); |
| @@ -108602,56 +108260,40 @@ | |
| 108260 | if( yymsp[-3].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108261 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108262 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108263 | if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc; |
| 108264 | } |
| 108265 | break; |
| 108266 | case 214: /* expr ::= expr ISNULL|NOTNULL */ |
| 108267 | {spanUnaryPostfix(&yygotominor.yy118,pParse,yymsp[0].major,&yymsp[-1].minor.yy118,&yymsp[0].minor.yy0);} |
| 108268 | break; |
| 108269 | case 215: /* expr ::= expr NOT NULL */ |
| 108270 | {spanUnaryPostfix(&yygotominor.yy118,pParse,TK_NOTNULL,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy0);} |
| 108271 | break; |
| 108272 | case 216: /* expr ::= expr IS expr */ |
| 108273 | { |
| 108274 | spanBinaryExpr(&yygotominor.yy118,pParse,TK_IS,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118); |
| 108275 | binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_ISNULL); |
| 108276 | } |
| 108277 | break; |
| 108278 | case 217: /* expr ::= expr IS NOT expr */ |
| 108279 | { |
| 108280 | spanBinaryExpr(&yygotominor.yy118,pParse,TK_ISNOT,&yymsp[-3].minor.yy118,&yymsp[0].minor.yy118); |
| 108281 | binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_NOTNULL); |
| 108282 | } |
| 108283 | break; |
| 108284 | case 218: /* expr ::= NOT expr */ |
| 108285 | case 219: /* expr ::= BITNOT expr */ yytestcase(yyruleno==219); |
| 108286 | {spanUnaryPrefix(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108287 | break; |
| 108288 | case 220: /* expr ::= MINUS expr */ |
| 108289 | {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UMINUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108290 | break; |
| 108291 | case 221: /* expr ::= PLUS expr */ |
| 108292 | {spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UPLUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);} |
| 108293 | break; |
| 108294 | case 224: /* expr ::= expr between_op expr AND expr */ |
| 108295 | { |
| 108296 | ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108297 | pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr); |
| 108298 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy118.pExpr, 0, 0); |
| 108299 | if( yygotominor.yy118.pExpr ){ |
| @@ -108661,14 +108303,12 @@ | |
| 108303 | } |
| 108304 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108305 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108306 | yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd; |
| 108307 | } |
| 108308 | break; |
| 108309 | case 227: /* expr ::= expr in_op LP exprlist RP */ |
| 108310 | { |
| 108311 | if( yymsp[-1].minor.yy322==0 ){ |
| 108312 | /* Expressions of the form |
| 108313 | ** |
| 108314 | ** expr1 IN () |
| @@ -108690,14 +108330,12 @@ | |
| 108330 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108331 | } |
| 108332 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108333 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108334 | } |
| 108335 | break; |
| 108336 | case 228: /* expr ::= LP select RP */ |
| 108337 | { |
| 108338 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0); |
| 108339 | if( yygotominor.yy118.pExpr ){ |
| 108340 | yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387; |
| 108341 | ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect); |
| @@ -108706,14 +108344,12 @@ | |
| 108344 | sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387); |
| 108345 | } |
| 108346 | yygotominor.yy118.zStart = yymsp[-2].minor.yy0.z; |
| 108347 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108348 | } |
| 108349 | break; |
| 108350 | case 229: /* expr ::= expr in_op LP select RP */ |
| 108351 | { |
| 108352 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy118.pExpr, 0, 0); |
| 108353 | if( yygotominor.yy118.pExpr ){ |
| 108354 | yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387; |
| 108355 | ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect); |
| @@ -108723,14 +108359,12 @@ | |
| 108359 | } |
| 108360 | if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108361 | yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart; |
| 108362 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108363 | } |
| 108364 | break; |
| 108365 | case 230: /* expr ::= expr in_op nm dbnm */ |
| 108366 | { |
| 108367 | SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0); |
| 108368 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy118.pExpr, 0, 0); |
| 108369 | if( yygotominor.yy118.pExpr ){ |
| 108370 | yygotominor.yy118.pExpr->x.pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0); |
| @@ -108741,14 +108375,12 @@ | |
| 108375 | } |
| 108376 | if( yymsp[-2].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0); |
| 108377 | yygotominor.yy118.zStart = yymsp[-3].minor.yy118.zStart; |
| 108378 | yygotominor.yy118.zEnd = yymsp[0].minor.yy0.z ? &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] : &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]; |
| 108379 | } |
| 108380 | break; |
| 108381 | case 231: /* expr ::= EXISTS LP select RP */ |
| 108382 | { |
| 108383 | Expr *p = yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0); |
| 108384 | if( p ){ |
| 108385 | p->x.pSelect = yymsp[-1].minor.yy387; |
| 108386 | ExprSetProperty(p, EP_xIsSelect); |
| @@ -108757,14 +108389,12 @@ | |
| 108389 | sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387); |
| 108390 | } |
| 108391 | yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z; |
| 108392 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108393 | } |
| 108394 | break; |
| 108395 | case 232: /* expr ::= CASE case_operand case_exprlist case_else END */ |
| 108396 | { |
| 108397 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy314, yymsp[-1].minor.yy314, 0); |
| 108398 | if( yygotominor.yy118.pExpr ){ |
| 108399 | yygotominor.yy118.pExpr->x.pList = yymsp[-2].minor.yy322; |
| 108400 | sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr); |
| @@ -108772,50 +108402,38 @@ | |
| 108402 | sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy322); |
| 108403 | } |
| 108404 | yygotominor.yy118.zStart = yymsp[-4].minor.yy0.z; |
| 108405 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108406 | } |
| 108407 | break; |
| 108408 | case 233: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ |
| 108409 | { |
| 108410 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy118.pExpr); |
| 108411 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108412 | } |
| 108413 | break; |
| 108414 | case 234: /* case_exprlist ::= WHEN expr THEN expr */ |
| 108415 | { |
| 108416 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr); |
| 108417 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr); |
| 108418 | } |
| 108419 | break; |
| 108420 | case 243: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */ |
| 108421 | { |
| 108422 | sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0, |
| 108423 | sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy322, yymsp[-9].minor.yy4, |
| 108424 | &yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy4); |
| 108425 | } |
| 108426 | break; |
| 108427 | case 244: /* uniqueflag ::= UNIQUE */ |
| 108428 | case 298: /* raisetype ::= ABORT */ yytestcase(yyruleno==298); |
| 108429 | {yygotominor.yy4 = OE_Abort;} |
| 108430 | break; |
| 108431 | case 245: /* uniqueflag ::= */ |
| 108432 | {yygotominor.yy4 = OE_None;} |
| 108433 | break; |
| 108434 | case 248: /* idxlist ::= idxlist COMMA nm collate sortorder */ |
| 108435 | { |
| 108436 | Expr *p = 0; |
| 108437 | if( yymsp[-1].minor.yy0.n>0 ){ |
| 108438 | p = sqlite3Expr(pParse->db, TK_COLUMN, 0); |
| 108439 | sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0); |
| @@ -108823,14 +108441,12 @@ | |
| 108441 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, p); |
| 108442 | sqlite3ExprListSetName(pParse,yygotominor.yy322,&yymsp[-2].minor.yy0,1); |
| 108443 | sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index"); |
| 108444 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108445 | } |
| 108446 | break; |
| 108447 | case 249: /* idxlist ::= nm collate sortorder */ |
| 108448 | { |
| 108449 | Expr *p = 0; |
| 108450 | if( yymsp[-1].minor.yy0.n>0 ){ |
| 108451 | p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0); |
| 108452 | sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0); |
| @@ -108838,307 +108454,214 @@ | |
| 108454 | yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, p); |
| 108455 | sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1); |
| 108456 | sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index"); |
| 108457 | if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4; |
| 108458 | } |
| 108459 | break; |
| 108460 | case 250: /* collate ::= */ |
| 108461 | {yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;} |
| 108462 | break; |
| 108463 | case 252: /* cmd ::= DROP INDEX ifexists fullname */ |
| 108464 | {sqlite3DropIndex(pParse, yymsp[0].minor.yy259, yymsp[-1].minor.yy4);} |
| 108465 | break; |
| 108466 | case 253: /* cmd ::= VACUUM */ |
| 108467 | case 254: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==254); |
| 108468 | {sqlite3Vacuum(pParse);} |
| 108469 | break; |
| 108470 | case 255: /* cmd ::= PRAGMA nm dbnm */ |
| 108471 | {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);} |
| 108472 | break; |
| 108473 | case 256: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ |
| 108474 | {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);} |
| 108475 | break; |
| 108476 | case 257: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ |
| 108477 | {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);} |
| 108478 | break; |
| 108479 | case 258: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ |
| 108480 | {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);} |
| 108481 | break; |
| 108482 | case 259: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ |
| 108483 | {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);} |
| 108484 | break; |
| 108485 | case 270: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ |
| 108486 | { |
| 108487 | Token all; |
| 108488 | all.z = yymsp[-3].minor.yy0.z; |
| 108489 | all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n; |
| 108490 | sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy203, &all); |
| 108491 | } |
| 108492 | break; |
| 108493 | case 271: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ |
| 108494 | { |
| 108495 | sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy4, yymsp[-4].minor.yy90.a, yymsp[-4].minor.yy90.b, yymsp[-2].minor.yy259, yymsp[0].minor.yy314, yymsp[-10].minor.yy4, yymsp[-8].minor.yy4); |
| 108496 | yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); |
| 108497 | } |
| 108498 | break; |
| 108499 | case 272: /* trigger_time ::= BEFORE */ |
| 108500 | case 275: /* trigger_time ::= */ yytestcase(yyruleno==275); |
| 108501 | { yygotominor.yy4 = TK_BEFORE; } |
| 108502 | break; |
| 108503 | case 273: /* trigger_time ::= AFTER */ |
| 108504 | { yygotominor.yy4 = TK_AFTER; } |
| 108505 | break; |
| 108506 | case 274: /* trigger_time ::= INSTEAD OF */ |
| 108507 | { yygotominor.yy4 = TK_INSTEAD;} |
| 108508 | break; |
| 108509 | case 276: /* trigger_event ::= DELETE|INSERT */ |
| 108510 | case 277: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==277); |
| 108511 | {yygotominor.yy90.a = yymsp[0].major; yygotominor.yy90.b = 0;} |
| 108512 | break; |
| 108513 | case 278: /* trigger_event ::= UPDATE OF inscollist */ |
| 108514 | {yygotominor.yy90.a = TK_UPDATE; yygotominor.yy90.b = yymsp[0].minor.yy384;} |
| 108515 | break; |
| 108516 | case 281: /* when_clause ::= */ |
| 108517 | case 303: /* key_opt ::= */ yytestcase(yyruleno==303); |
| 108518 | { yygotominor.yy314 = 0; } |
| 108519 | break; |
| 108520 | case 282: /* when_clause ::= WHEN expr */ |
| 108521 | case 304: /* key_opt ::= KEY expr */ yytestcase(yyruleno==304); |
| 108522 | { yygotominor.yy314 = yymsp[0].minor.yy118.pExpr; } |
| 108523 | break; |
| 108524 | case 283: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ |
| 108525 | { |
| 108526 | assert( yymsp[-2].minor.yy203!=0 ); |
| 108527 | yymsp[-2].minor.yy203->pLast->pNext = yymsp[-1].minor.yy203; |
| 108528 | yymsp[-2].minor.yy203->pLast = yymsp[-1].minor.yy203; |
| 108529 | yygotominor.yy203 = yymsp[-2].minor.yy203; |
| 108530 | } |
| 108531 | break; |
| 108532 | case 284: /* trigger_cmd_list ::= trigger_cmd SEMI */ |
| 108533 | { |
| 108534 | assert( yymsp[-1].minor.yy203!=0 ); |
| 108535 | yymsp[-1].minor.yy203->pLast = yymsp[-1].minor.yy203; |
| 108536 | yygotominor.yy203 = yymsp[-1].minor.yy203; |
| 108537 | } |
| 108538 | break; |
| 108539 | case 286: /* trnm ::= nm DOT nm */ |
| 108540 | { |
| 108541 | yygotominor.yy0 = yymsp[0].minor.yy0; |
| 108542 | sqlite3ErrorMsg(pParse, |
| 108543 | "qualified table names are not allowed on INSERT, UPDATE, and DELETE " |
| 108544 | "statements within triggers"); |
| 108545 | } |
| 108546 | break; |
| 108547 | case 288: /* tridxby ::= INDEXED BY nm */ |
| 108548 | { |
| 108549 | sqlite3ErrorMsg(pParse, |
| 108550 | "the INDEXED BY clause is not allowed on UPDATE or DELETE statements " |
| 108551 | "within triggers"); |
| 108552 | } |
| 108553 | break; |
| 108554 | case 289: /* tridxby ::= NOT INDEXED */ |
| 108555 | { |
| 108556 | sqlite3ErrorMsg(pParse, |
| 108557 | "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements " |
| 108558 | "within triggers"); |
| 108559 | } |
| 108560 | break; |
| 108561 | case 290: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */ |
| 108562 | { yygotominor.yy203 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy322, yymsp[0].minor.yy314, yymsp[-5].minor.yy210); } |
| 108563 | break; |
| 108564 | case 291: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */ |
| 108565 | {yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy384, yymsp[-1].minor.yy322, 0, yymsp[-7].minor.yy210);} |
| 108566 | break; |
| 108567 | case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */ |
| 108568 | {yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy384, 0, yymsp[0].minor.yy387, yymsp[-4].minor.yy210);} |
| 108569 | break; |
| 108570 | case 293: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */ |
| 108571 | {yygotominor.yy203 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy314);} |
| 108572 | break; |
| 108573 | case 294: /* trigger_cmd ::= select */ |
| 108574 | {yygotominor.yy203 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy387); } |
| 108575 | break; |
| 108576 | case 295: /* expr ::= RAISE LP IGNORE RP */ |
| 108577 | { |
| 108578 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0); |
| 108579 | if( yygotominor.yy118.pExpr ){ |
| 108580 | yygotominor.yy118.pExpr->affinity = OE_Ignore; |
| 108581 | } |
| 108582 | yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z; |
| 108583 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108584 | } |
| 108585 | break; |
| 108586 | case 296: /* expr ::= RAISE LP raisetype COMMA nm RP */ |
| 108587 | { |
| 108588 | yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); |
| 108589 | if( yygotominor.yy118.pExpr ) { |
| 108590 | yygotominor.yy118.pExpr->affinity = (char)yymsp[-3].minor.yy4; |
| 108591 | } |
| 108592 | yygotominor.yy118.zStart = yymsp[-5].minor.yy0.z; |
| 108593 | yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; |
| 108594 | } |
| 108595 | break; |
| 108596 | case 297: /* raisetype ::= ROLLBACK */ |
| 108597 | {yygotominor.yy4 = OE_Rollback;} |
| 108598 | break; |
| 108599 | case 299: /* raisetype ::= FAIL */ |
| 108600 | {yygotominor.yy4 = OE_Fail;} |
| 108601 | break; |
| 108602 | case 300: /* cmd ::= DROP TRIGGER ifexists fullname */ |
| 108603 | { |
| 108604 | sqlite3DropTrigger(pParse,yymsp[0].minor.yy259,yymsp[-1].minor.yy4); |
| 108605 | } |
| 108606 | break; |
| 108607 | case 301: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ |
| 108608 | { |
| 108609 | sqlite3Attach(pParse, yymsp[-3].minor.yy118.pExpr, yymsp[-1].minor.yy118.pExpr, yymsp[0].minor.yy314); |
| 108610 | } |
| 108611 | break; |
| 108612 | case 302: /* cmd ::= DETACH database_kw_opt expr */ |
| 108613 | { |
| 108614 | sqlite3Detach(pParse, yymsp[0].minor.yy118.pExpr); |
| 108615 | } |
| 108616 | break; |
| 108617 | case 307: /* cmd ::= REINDEX */ |
| 108618 | {sqlite3Reindex(pParse, 0, 0);} |
| 108619 | break; |
| 108620 | case 308: /* cmd ::= REINDEX nm dbnm */ |
| 108621 | {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} |
| 108622 | break; |
| 108623 | case 309: /* cmd ::= ANALYZE */ |
| 108624 | {sqlite3Analyze(pParse, 0, 0);} |
| 108625 | break; |
| 108626 | case 310: /* cmd ::= ANALYZE nm dbnm */ |
| 108627 | {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} |
| 108628 | break; |
| 108629 | case 311: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ |
| 108630 | { |
| 108631 | sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy259,&yymsp[0].minor.yy0); |
| 108632 | } |
| 108633 | break; |
| 108634 | case 312: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */ |
| 108635 | { |
| 108636 | sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0); |
| 108637 | } |
| 108638 | break; |
| 108639 | case 313: /* add_column_fullname ::= fullname */ |
| 108640 | { |
| 108641 | pParse->db->lookaside.bEnabled = 0; |
| 108642 | sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy259); |
| 108643 | } |
| 108644 | break; |
| 108645 | case 316: /* cmd ::= create_vtab */ |
| 108646 | {sqlite3VtabFinishParse(pParse,0);} |
| 108647 | break; |
| 108648 | case 317: /* cmd ::= create_vtab LP vtabarglist RP */ |
| 108649 | {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);} |
| 108650 | break; |
| 108651 | case 318: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */ |
| 108652 | { |
| 108653 | sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); |
| 108654 | } |
| 108655 | break; |
| 108656 | case 321: /* vtabarg ::= */ |
| 108657 | {sqlite3VtabArgInit(pParse);} |
| 108658 | break; |
| 108659 | case 323: /* vtabargtoken ::= ANY */ |
| 108660 | case 324: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==324); |
| 108661 | case 325: /* lp ::= LP */ yytestcase(yyruleno==325); |
| 108662 | {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);} |
| 108663 | break; |
| 108664 | default: |
| 108665 | /* (0) input ::= cmdlist */ yytestcase(yyruleno==0); |
| 108666 | /* (1) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==1); |
| 108667 | /* (2) cmdlist ::= ecmd */ yytestcase(yyruleno==2); |
| @@ -109236,17 +108759,15 @@ | |
| 108759 | int yymajor, /* The major type of the error token */ |
| 108760 | YYMINORTYPE yyminor /* The minor type of the error token */ |
| 108761 | ){ |
| 108762 | sqlite3ParserARG_FETCH; |
| 108763 | #define TOKEN (yyminor.yy0) |
| 108764 | |
| 108765 | UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */ |
| 108766 | assert( TOKEN.z[0] ); /* The tokenizer always gives us a token */ |
| 108767 | sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN); |
| 108768 | pParse->parseError = 1; |
| 108769 | sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */ |
| 108770 | } |
| 108771 | |
| 108772 | /* |
| 108773 | ** The following is executed when the parser accepts |
| @@ -109436,11 +108957,10 @@ | |
| 108957 | return; |
| 108958 | } |
| 108959 | |
| 108960 | /************** End of parse.c ***********************************************/ |
| 108961 | /************** Begin file tokenize.c ****************************************/ |
| 108962 | /* |
| 108963 | ** 2001 September 15 |
| 108964 | ** |
| 108965 | ** The author disclaims copyright to this source code. In place of |
| 108966 | ** a legal notice, here is a blessing: |
| @@ -109502,11 +109022,10 @@ | |
| 109022 | ** named keywordhash.h and then included into this source file by |
| 109023 | ** the #include below. |
| 109024 | */ |
| 109025 | /************** Include keywordhash.h in the middle of tokenize.c ************/ |
| 109026 | /************** Begin file keywordhash.h *************************************/ |
| 109027 | /***** This file contains automatically generated code ****** |
| 109028 | ** |
| 109029 | ** The code in this file has been automatically generated by |
| 109030 | ** |
| 109031 | ** sqlite/tool/mkkeywordhash.c |
| @@ -109776,11 +109295,10 @@ | |
| 109295 | } |
| 109296 | #define SQLITE_N_KEYWORD 121 |
| 109297 | |
| 109298 | /************** End of keywordhash.h *****************************************/ |
| 109299 | /************** Continuing where we left off in tokenize.c *******************/ |
| 109300 | |
| 109301 | |
| 109302 | /* |
| 109303 | ** If X is a character that can be used in an identifier then |
| 109304 | ** IdChar(X) will be true. Otherwise it is false. |
| @@ -110241,11 +109759,10 @@ | |
| 109759 | return nErr; |
| 109760 | } |
| 109761 | |
| 109762 | /************** End of tokenize.c ********************************************/ |
| 109763 | /************** Begin file complete.c ****************************************/ |
| 109764 | /* |
| 109765 | ** 2001 September 15 |
| 109766 | ** |
| 109767 | ** The author disclaims copyright to this source code. In place of |
| 109768 | ** a legal notice, here is a blessing: |
| @@ -110527,11 +110044,10 @@ | |
| 110044 | #endif /* SQLITE_OMIT_UTF16 */ |
| 110045 | #endif /* SQLITE_OMIT_COMPLETE */ |
| 110046 | |
| 110047 | /************** End of complete.c ********************************************/ |
| 110048 | /************** Begin file main.c ********************************************/ |
| 110049 | /* |
| 110050 | ** 2001 September 15 |
| 110051 | ** |
| 110052 | ** The author disclaims copyright to this source code. In place of |
| 110053 | ** a legal notice, here is a blessing: |
| @@ -110548,11 +110064,10 @@ | |
| 110064 | */ |
| 110065 | |
| 110066 | #ifdef SQLITE_ENABLE_FTS3 |
| 110067 | /************** Include fts3.h in the middle of main.c ***********************/ |
| 110068 | /************** Begin file fts3.h ********************************************/ |
| 110069 | /* |
| 110070 | ** 2006 Oct 10 |
| 110071 | ** |
| 110072 | ** The author disclaims copyright to this source code. In place of |
| 110073 | ** a legal notice, here is a blessing: |
| @@ -110577,16 +110092,14 @@ | |
| 110092 | } /* extern "C" */ |
| 110093 | #endif /* __cplusplus */ |
| 110094 | |
| 110095 | /************** End of fts3.h ************************************************/ |
| 110096 | /************** Continuing where we left off in main.c ***********************/ |
| 110097 | #endif |
| 110098 | #ifdef SQLITE_ENABLE_RTREE |
| 110099 | /************** Include rtree.h in the middle of main.c **********************/ |
| 110100 | /************** Begin file rtree.h *******************************************/ |
| 110101 | /* |
| 110102 | ** 2008 May 26 |
| 110103 | ** |
| 110104 | ** The author disclaims copyright to this source code. In place of |
| 110105 | ** a legal notice, here is a blessing: |
| @@ -110611,16 +110124,14 @@ | |
| 110124 | } /* extern "C" */ |
| 110125 | #endif /* __cplusplus */ |
| 110126 | |
| 110127 | /************** End of rtree.h ***********************************************/ |
| 110128 | /************** Continuing where we left off in main.c ***********************/ |
| 110129 | #endif |
| 110130 | #ifdef SQLITE_ENABLE_ICU |
| 110131 | /************** Include sqliteicu.h in the middle of main.c ******************/ |
| 110132 | /************** Begin file sqliteicu.h ***************************************/ |
| 110133 | /* |
| 110134 | ** 2008 May 26 |
| 110135 | ** |
| 110136 | ** The author disclaims copyright to this source code. In place of |
| 110137 | ** a legal notice, here is a blessing: |
| @@ -110646,11 +110157,10 @@ | |
| 110157 | #endif /* __cplusplus */ |
| 110158 | |
| 110159 | |
| 110160 | /************** End of sqliteicu.h *******************************************/ |
| 110161 | /************** Continuing where we left off in main.c ***********************/ |
| 110162 | #endif |
| 110163 | |
| 110164 | #ifndef SQLITE_AMALGAMATION |
| 110165 | /* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant |
| 110166 | ** contains the text of SQLITE_VERSION macro. |
| @@ -113577,11 +113087,10 @@ | |
| 113087 | return 0; |
| 113088 | } |
| 113089 | |
| 113090 | /************** End of main.c ************************************************/ |
| 113091 | /************** Begin file notify.c ******************************************/ |
| 113092 | /* |
| 113093 | ** 2009 March 3 |
| 113094 | ** |
| 113095 | ** The author disclaims copyright to this source code. In place of |
| 113096 | ** a legal notice, here is a blessing: |
| @@ -113911,11 +113420,10 @@ | |
| 113420 | } |
| 113421 | #endif |
| 113422 | |
| 113423 | /************** End of notify.c **********************************************/ |
| 113424 | /************** Begin file fts3.c ********************************************/ |
| 113425 | /* |
| 113426 | ** 2006 Oct 10 |
| 113427 | ** |
| 113428 | ** The author disclaims copyright to this source code. In place of |
| 113429 | ** a legal notice, here is a blessing: |
| @@ -114208,11 +113716,10 @@ | |
| 113716 | ** into a single segment. |
| 113717 | */ |
| 113718 | |
| 113719 | /************** Include fts3Int.h in the middle of fts3.c ********************/ |
| 113720 | /************** Begin file fts3Int.h *****************************************/ |
| 113721 | /* |
| 113722 | ** 2009 Nov 12 |
| 113723 | ** |
| 113724 | ** The author disclaims copyright to this source code. In place of |
| 113725 | ** a legal notice, here is a blessing: |
| @@ -114247,11 +113754,10 @@ | |
| 113754 | SQLITE_API extern const sqlite3_api_routines *sqlite3_api; |
| 113755 | #endif |
| 113756 | |
| 113757 | /************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/ |
| 113758 | /************** Begin file fts3_tokenizer.h **********************************/ |
| 113759 | /* |
| 113760 | ** 2006 July 10 |
| 113761 | ** |
| 113762 | ** The author disclaims copyright to this source code. |
| 113763 | ** |
| @@ -114402,14 +113908,12 @@ | |
| 113908 | |
| 113909 | #endif /* _FTS3_TOKENIZER_H_ */ |
| 113910 | |
| 113911 | /************** End of fts3_tokenizer.h **************************************/ |
| 113912 | /************** Continuing where we left off in fts3Int.h ********************/ |
| 113913 | /************** Include fts3_hash.h in the middle of fts3Int.h ***************/ |
| 113914 | /************** Begin file fts3_hash.h ***************************************/ |
| 113915 | /* |
| 113916 | ** 2001 September 22 |
| 113917 | ** |
| 113918 | ** The author disclaims copyright to this source code. In place of |
| 113919 | ** a legal notice, here is a blessing: |
| @@ -114521,11 +114025,10 @@ | |
| 114025 | |
| 114026 | #endif /* _FTS3_HASH_H_ */ |
| 114027 | |
| 114028 | /************** End of fts3_hash.h *******************************************/ |
| 114029 | /************** Continuing where we left off in fts3Int.h ********************/ |
| 114030 | |
| 114031 | /* |
| 114032 | ** This constant controls how often segments are merged. Once there are |
| 114033 | ** FTS3_MERGE_COUNT segments of level N, they are merged into a single |
| 114034 | ** segment of level N+1. |
| @@ -114998,11 +114501,10 @@ | |
| 114501 | #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */ |
| 114502 | #endif /* _FTSINT_H */ |
| 114503 | |
| 114504 | /************** End of fts3Int.h *********************************************/ |
| 114505 | /************** Continuing where we left off in fts3.c ***********************/ |
| 114506 | #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) |
| 114507 | |
| 114508 | #if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE) |
| 114509 | # define SQLITE_CORE 1 |
| 114510 | #endif |
| @@ -119548,11 +119050,10 @@ | |
| 119050 | |
| 119051 | #endif |
| 119052 | |
| 119053 | /************** End of fts3.c ************************************************/ |
| 119054 | /************** Begin file fts3_aux.c ****************************************/ |
| 119055 | /* |
| 119056 | ** 2011 Jan 27 |
| 119057 | ** |
| 119058 | ** The author disclaims copyright to this source code. In place of |
| 119059 | ** a legal notice, here is a blessing: |
| @@ -120025,11 +119526,10 @@ | |
| 119526 | |
| 119527 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 119528 | |
| 119529 | /************** End of fts3_aux.c ********************************************/ |
| 119530 | /************** Begin file fts3_expr.c ***************************************/ |
| 119531 | /* |
| 119532 | ** 2008 Nov 28 |
| 119533 | ** |
| 119534 | ** The author disclaims copyright to this source code. In place of |
| 119535 | ** a legal notice, here is a blessing: |
| @@ -120992,11 +120492,10 @@ | |
| 120492 | #endif |
| 120493 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 120494 | |
| 120495 | /************** End of fts3_expr.c *******************************************/ |
| 120496 | /************** Begin file fts3_hash.c ***************************************/ |
| 120497 | /* |
| 120498 | ** 2001 September 22 |
| 120499 | ** |
| 120500 | ** The author disclaims copyright to this source code. In place of |
| 120501 | ** a legal notice, here is a blessing: |
| @@ -121377,11 +120876,10 @@ | |
| 120876 | |
| 120877 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 120878 | |
| 120879 | /************** End of fts3_hash.c *******************************************/ |
| 120880 | /************** Begin file fts3_porter.c *************************************/ |
| 120881 | /* |
| 120882 | ** 2006 September 30 |
| 120883 | ** |
| 120884 | ** The author disclaims copyright to this source code. In place of |
| 120885 | ** a legal notice, here is a blessing: |
| @@ -122024,11 +121522,10 @@ | |
| 121522 | |
| 121523 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 121524 | |
| 121525 | /************** End of fts3_porter.c *****************************************/ |
| 121526 | /************** Begin file fts3_tokenizer.c **********************************/ |
| 121527 | /* |
| 121528 | ** 2007 June 22 |
| 121529 | ** |
| 121530 | ** The author disclaims copyright to this source code. In place of |
| 121531 | ** a legal notice, here is a blessing: |
| @@ -122516,11 +122013,10 @@ | |
| 122013 | |
| 122014 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122015 | |
| 122016 | /************** End of fts3_tokenizer.c **************************************/ |
| 122017 | /************** Begin file fts3_tokenizer1.c *********************************/ |
| 122018 | /* |
| 122019 | ** 2006 Oct 10 |
| 122020 | ** |
| 122021 | ** The author disclaims copyright to this source code. In place of |
| 122022 | ** a legal notice, here is a blessing: |
| @@ -122751,11 +122247,10 @@ | |
| 122247 | |
| 122248 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
| 122249 | |
| 122250 | /************** End of fts3_tokenizer1.c *************************************/ |
| 122251 | /************** Begin file fts3_write.c **************************************/ |
| 122252 | /* |
| 122253 | ** 2009 Oct 23 |
| 122254 | ** |
| 122255 | ** The author disclaims copyright to this source code. In place of |
| 122256 | ** a legal notice, here is a blessing: |
| @@ -126022,11 +125517,10 @@ | |
| 125517 | |
| 125518 | #endif |
| 125519 | |
| 125520 | /************** End of fts3_write.c ******************************************/ |
| 125521 | /************** Begin file fts3_snippet.c ************************************/ |
| 125522 | /* |
| 125523 | ** 2009 Oct 23 |
| 125524 | ** |
| 125525 | ** The author disclaims copyright to this source code. In place of |
| 125526 | ** a legal notice, here is a blessing: |
| @@ -127524,11 +127018,10 @@ | |
| 127018 | |
| 127019 | #endif |
| 127020 | |
| 127021 | /************** End of fts3_snippet.c ****************************************/ |
| 127022 | /************** Begin file rtree.c *******************************************/ |
| 127023 | /* |
| 127024 | ** 2001 September 15 |
| 127025 | ** |
| 127026 | ** The author disclaims copyright to this source code. In place of |
| 127027 | ** a legal notice, here is a blessing: |
| @@ -130806,11 +130299,10 @@ | |
| 130299 | |
| 130300 | #endif |
| 130301 | |
| 130302 | /************** End of rtree.c ***********************************************/ |
| 130303 | /************** Begin file icu.c *********************************************/ |
| 130304 | /* |
| 130305 | ** 2007 May 6 |
| 130306 | ** |
| 130307 | ** The author disclaims copyright to this source code. In place of |
| 130308 | ** a legal notice, here is a blessing: |
| @@ -131309,11 +130801,10 @@ | |
| 130801 | |
| 130802 | #endif |
| 130803 | |
| 130804 | /************** End of icu.c *************************************************/ |
| 130805 | /************** Begin file fts3_icu.c ****************************************/ |
| 130806 | /* |
| 130807 | ** 2007 June 22 |
| 130808 | ** |
| 130809 | ** The author disclaims copyright to this source code. In place of |
| 130810 | ** a legal notice, here is a blessing: |
| 130811 |
+1
-1
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -107,11 +107,11 @@ | ||
| 107 | 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | 109 | */ |
| 110 | 110 | #define SQLITE_VERSION "3.7.8" |
| 111 | 111 | #define SQLITE_VERSION_NUMBER 3007008 |
| 112 | -#define SQLITE_SOURCE_ID "2011-09-14 13:41:40 a1f3aeeb0988c848d40ce8f6da6e902935a997e2" | |
| 112 | +#define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8" | |
| 113 | 113 | |
| 114 | 114 | /* |
| 115 | 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | 117 | ** |
| 118 | 118 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -107,11 +107,11 @@ | |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.7.8" |
| 111 | #define SQLITE_VERSION_NUMBER 3007008 |
| 112 | #define SQLITE_SOURCE_ID "2011-09-14 13:41:40 a1f3aeeb0988c848d40ce8f6da6e902935a997e2" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -107,11 +107,11 @@ | |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.7.8" |
| 111 | #define SQLITE_VERSION_NUMBER 3007008 |
| 112 | #define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |