| | @@ -16,11 +16,11 @@ |
| 16 | 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | 19 | ** |
| 20 | 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | | -** a435d786fe0e245e352d08d2e2ddf8c1e151 with changes in files: |
| 21 | +** a3332bd623d997921c3186433cd1eab0c941 with changes in files: |
| 22 | 22 | ** |
| 23 | 23 | ** |
| 24 | 24 | */ |
| 25 | 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | 26 | #define SQLITE_CORE 1 |
| | @@ -467,14 +467,14 @@ |
| 467 | 467 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 468 | 468 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 469 | 469 | */ |
| 470 | 470 | #define SQLITE_VERSION "3.54.0" |
| 471 | 471 | #define SQLITE_VERSION_NUMBER 3054000 |
| 472 | | -#define SQLITE_SOURCE_ID "2026-10-06 18:52:47 a435d786fe0e245e352d08d2e2ddf8c1e15154809e3b471810cc327e9d90ef85" |
| 472 | +#define SQLITE_SOURCE_ID "2026-10-09 11:47:51 a3332bd623d997921c3186433cd1eab0c9413aa0f68d93b1731cf80128ec3a36" |
| 473 | 473 | #define SQLITE_SCM_BRANCH "trunk" |
| 474 | 474 | #define SQLITE_SCM_TAGS "" |
| 475 | | -#define SQLITE_SCM_DATETIME "2026-10-06T18:52:47.576Z" |
| 475 | +#define SQLITE_SCM_DATETIME "2026-10-09T11:47:51.732Z" |
| 476 | 476 | |
| 477 | 477 | /* |
| 478 | 478 | ** CAPI3REF: Run-Time Library Version Numbers |
| 479 | 479 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 480 | 480 | ** |
| | @@ -17890,88 +17890,88 @@ |
| 17890 | 17890 | #define OP_IfNullRow 20 /* jump, synopsis: if P1.nullRow then r[P3]=NULL, goto P2 */ |
| 17891 | 17891 | #define OP_SeekLT 21 /* jump0, synopsis: key=r[P3@P4] */ |
| 17892 | 17892 | #define OP_SeekLE 22 /* jump0, synopsis: key=r[P3@P4] */ |
| 17893 | 17893 | #define OP_SeekGE 23 /* jump0, synopsis: key=r[P3@P4] */ |
| 17894 | 17894 | #define OP_SeekGT 24 /* jump0, synopsis: key=r[P3@P4] */ |
| 17895 | | -#define OP_IfNotOpen 25 /* jump, synopsis: if( !csr[P1] ) goto P2 */ |
| 17896 | | -#define OP_IfNoHope 26 /* jump, synopsis: key=r[P3@P4] */ |
| 17897 | | -#define OP_NoConflict 27 /* jump, synopsis: key=r[P3@P4] */ |
| 17898 | | -#define OP_NotFound 28 /* jump, synopsis: key=r[P3@P4] */ |
| 17899 | | -#define OP_Found 29 /* jump, synopsis: key=r[P3@P4] */ |
| 17900 | | -#define OP_SeekRowid 30 /* jump0, synopsis: intkey=r[P3] */ |
| 17901 | | -#define OP_NotExists 31 /* jump, synopsis: intkey=r[P3] */ |
| 17902 | | -#define OP_Last 32 /* jump0 */ |
| 17903 | | -#define OP_IfSizeBetween 33 /* jump */ |
| 17904 | | -#define OP_SorterSort 34 /* jump */ |
| 17905 | | -#define OP_Sort 35 /* jump */ |
| 17906 | | -#define OP_Rewind 36 /* jump0 */ |
| 17907 | | -#define OP_IfEmpty 37 /* jump, synopsis: if( empty(P1) ) goto P2 */ |
| 17908 | | -#define OP_SorterNext 38 /* jump */ |
| 17909 | | -#define OP_Prev 39 /* jump */ |
| 17910 | | -#define OP_Next 40 /* jump */ |
| 17911 | | -#define OP_IdxLE 41 /* jump, synopsis: key=r[P3@P4] */ |
| 17912 | | -#define OP_IdxGT 42 /* jump, synopsis: key=r[P3@P4] */ |
| 17895 | +#define OP_IfNoHope 25 /* jump, synopsis: key=r[P3@P4] */ |
| 17896 | +#define OP_NoConflict 26 /* jump, synopsis: key=r[P3@P4] */ |
| 17897 | +#define OP_NotFound 27 /* jump, synopsis: key=r[P3@P4] */ |
| 17898 | +#define OP_Found 28 /* jump, synopsis: key=r[P3@P4] */ |
| 17899 | +#define OP_SeekRowid 29 /* jump0, synopsis: intkey=r[P3] */ |
| 17900 | +#define OP_NotExists 30 /* jump, synopsis: intkey=r[P3] */ |
| 17901 | +#define OP_Last 31 /* jump0 */ |
| 17902 | +#define OP_IfSizeBetween 32 /* jump */ |
| 17903 | +#define OP_SorterSort 33 /* jump */ |
| 17904 | +#define OP_Sort 34 /* jump */ |
| 17905 | +#define OP_Rewind 35 /* jump0 */ |
| 17906 | +#define OP_IfEmpty 36 /* jump, synopsis: if( empty(P1) ) goto P2 */ |
| 17907 | +#define OP_SorterNext 37 /* jump */ |
| 17908 | +#define OP_Prev 38 /* jump */ |
| 17909 | +#define OP_Next 39 /* jump */ |
| 17910 | +#define OP_IdxLE 40 /* jump, synopsis: key=r[P3@P4] */ |
| 17911 | +#define OP_IdxGT 41 /* jump, synopsis: key=r[P3@P4] */ |
| 17912 | +#define OP_IdxLT 42 /* jump, synopsis: key=r[P3@P4] */ |
| 17913 | 17913 | #define OP_Or 43 /* same as TK_OR, synopsis: r[P3]=(r[P1] || r[P2]) */ |
| 17914 | 17914 | #define OP_And 44 /* same as TK_AND, synopsis: r[P3]=(r[P1] && r[P2]) */ |
| 17915 | | -#define OP_IdxLT 45 /* jump, synopsis: key=r[P3@P4] */ |
| 17916 | | -#define OP_IdxGE 46 /* jump, synopsis: key=r[P3@P4] */ |
| 17917 | | -#define OP_IFindKey 47 /* jump */ |
| 17918 | | -#define OP_RowSetRead 48 /* jump, synopsis: r[P3]=rowset(P1) */ |
| 17919 | | -#define OP_RowSetTest 49 /* jump, synopsis: if r[P3] in rowset(P1) goto P2 */ |
| 17920 | | -#define OP_Program 50 /* jump0 */ |
| 17915 | +#define OP_IdxGE 45 /* jump, synopsis: key=r[P3@P4] */ |
| 17916 | +#define OP_IFindKey 46 /* jump */ |
| 17917 | +#define OP_RowSetRead 47 /* jump, synopsis: r[P3]=rowset(P1) */ |
| 17918 | +#define OP_RowSetTest 48 /* jump, synopsis: if r[P3] in rowset(P1) goto P2 */ |
| 17919 | +#define OP_Program 49 /* jump0 */ |
| 17920 | +#define OP_FkIfZero 50 /* jump, synopsis: if fkctr[P1]==0 goto P2 */ |
| 17921 | 17921 | #define OP_IsNull 51 /* jump, same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */ |
| 17922 | 17922 | #define OP_NotNull 52 /* jump, same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */ |
| 17923 | 17923 | #define OP_Ne 53 /* jump, same as TK_NE, synopsis: IF r[P3]!=r[P1] */ |
| 17924 | 17924 | #define OP_Eq 54 /* jump, same as TK_EQ, synopsis: IF r[P3]==r[P1] */ |
| 17925 | 17925 | #define OP_Gt 55 /* jump, same as TK_GT, synopsis: IF r[P3]>r[P1] */ |
| 17926 | 17926 | #define OP_Le 56 /* jump, same as TK_LE, synopsis: IF r[P3]<=r[P1] */ |
| 17927 | 17927 | #define OP_Lt 57 /* jump, same as TK_LT, synopsis: IF r[P3]<r[P1] */ |
| 17928 | 17928 | #define OP_Ge 58 /* jump, same as TK_GE, synopsis: IF r[P3]>=r[P1] */ |
| 17929 | 17929 | #define OP_ElseEq 59 /* jump, same as TK_ESCAPE */ |
| 17930 | | -#define OP_FkIfZero 60 /* jump, synopsis: if fkctr[P1]==0 goto P2 */ |
| 17931 | | -#define OP_IfPos 61 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */ |
| 17932 | | -#define OP_IfNotZero 62 /* jump, synopsis: if r[P1]!=0 then r[P1]--, goto P2 */ |
| 17933 | | -#define OP_DecrJumpZero 63 /* jump, synopsis: if (--r[P1])==0 goto P2 */ |
| 17934 | | -#define OP_IncrVacuum 64 /* jump */ |
| 17935 | | -#define OP_VNext 65 /* jump */ |
| 17936 | | -#define OP_Filter 66 /* jump, synopsis: if key(P3@P4) not in filter(P1) goto P2 */ |
| 17937 | | -#define OP_PureFunc 67 /* synopsis: r[P3]=func(r[P2@NP]) */ |
| 17938 | | -#define OP_Function 68 /* synopsis: r[P3]=func(r[P2@NP]) */ |
| 17939 | | -#define OP_Return 69 |
| 17940 | | -#define OP_EndCoroutine 70 |
| 17941 | | -#define OP_HaltIfNull 71 /* synopsis: if r[P3]=null halt */ |
| 17942 | | -#define OP_Halt 72 |
| 17943 | | -#define OP_Integer 73 /* synopsis: r[P2]=P1 */ |
| 17944 | | -#define OP_Int64 74 /* synopsis: r[P2]=PINT13 */ |
| 17945 | | -#define OP_String 75 /* synopsis: r[P2]='P4' (len=P1) */ |
| 17946 | | -#define OP_BeginSubrtn 76 /* synopsis: r[P2]=NULL */ |
| 17947 | | -#define OP_Null 77 /* synopsis: r[P2..P3]=NULL */ |
| 17948 | | -#define OP_SoftNull 78 /* synopsis: r[P1]=NULL */ |
| 17949 | | -#define OP_Blob 79 /* synopsis: r[P2]=P4 (len=P1) */ |
| 17950 | | -#define OP_Variable 80 /* synopsis: r[P2]=parameter(P1) */ |
| 17951 | | -#define OP_Move 81 /* synopsis: r[P2@P3]=r[P1@P3] */ |
| 17952 | | -#define OP_Copy 82 /* synopsis: r[P2@P3+1]=r[P1@P3+1] */ |
| 17953 | | -#define OP_SCopy 83 /* synopsis: r[P2]=r[P1] */ |
| 17954 | | -#define OP_IntCopy 84 /* synopsis: r[P2]=r[P1] */ |
| 17955 | | -#define OP_FkCheck 85 |
| 17956 | | -#define OP_ResultRow 86 /* synopsis: output=r[P1@P2] */ |
| 17957 | | -#define OP_CollSeq 87 |
| 17958 | | -#define OP_AddImm 88 /* synopsis: r[P1]=r[P1]+P2 */ |
| 17959 | | -#define OP_RealAffinity 89 |
| 17960 | | -#define OP_Cast 90 /* synopsis: affinity(r[P1]) */ |
| 17961 | | -#define OP_Permutation 91 |
| 17962 | | -#define OP_Compare 92 /* synopsis: r[P1@P3] <-> r[P2@P3] */ |
| 17963 | | -#define OP_IsTrue 93 /* synopsis: r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4 */ |
| 17964 | | -#define OP_ZeroOrNull 94 /* synopsis: r[P2] = 0 OR NULL */ |
| 17965 | | -#define OP_Offset 95 /* synopsis: r[P3] = sqlite_offset(P1) */ |
| 17966 | | -#define OP_Column 96 /* synopsis: r[P3]=PX cursor P1 column P2 */ |
| 17967 | | -#define OP_TypeCheck 97 /* synopsis: typecheck(r[P1@P2]) */ |
| 17968 | | -#define OP_Affinity 98 /* synopsis: affinity(r[P1@P2]) */ |
| 17969 | | -#define OP_MakeRecord 99 /* synopsis: r[P3]=mkrec(r[P1@P2]) */ |
| 17970 | | -#define OP_Count 100 /* synopsis: r[P2]=count() */ |
| 17971 | | -#define OP_ReadCookie 101 |
| 17972 | | -#define OP_SetCookie 102 |
| 17930 | +#define OP_IfPos 60 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */ |
| 17931 | +#define OP_IfNotZero 61 /* jump, synopsis: if r[P1]!=0 then r[P1]--, goto P2 */ |
| 17932 | +#define OP_DecrJumpZero 62 /* jump, synopsis: if (--r[P1])==0 goto P2 */ |
| 17933 | +#define OP_IncrVacuum 63 /* jump */ |
| 17934 | +#define OP_VNext 64 /* jump */ |
| 17935 | +#define OP_Filter 65 /* jump, synopsis: if key(P3@P4) not in filter(P1) goto P2 */ |
| 17936 | +#define OP_PureFunc 66 /* synopsis: r[P3]=func(r[P2@NP]) */ |
| 17937 | +#define OP_Function 67 /* synopsis: r[P3]=func(r[P2@NP]) */ |
| 17938 | +#define OP_Return 68 |
| 17939 | +#define OP_EndCoroutine 69 |
| 17940 | +#define OP_HaltIfNull 70 /* synopsis: if r[P3]=null halt */ |
| 17941 | +#define OP_Halt 71 |
| 17942 | +#define OP_Integer 72 /* synopsis: r[P2]=P1 */ |
| 17943 | +#define OP_Int64 73 /* synopsis: r[P2]=PINT13 */ |
| 17944 | +#define OP_String 74 /* synopsis: r[P2]='P4' (len=P1) */ |
| 17945 | +#define OP_BeginSubrtn 75 /* synopsis: r[P2]=NULL */ |
| 17946 | +#define OP_Null 76 /* synopsis: r[P2..P3]=NULL */ |
| 17947 | +#define OP_SoftNull 77 /* synopsis: r[P1]=NULL */ |
| 17948 | +#define OP_Blob 78 /* synopsis: r[P2]=P4 (len=P1) */ |
| 17949 | +#define OP_Variable 79 /* synopsis: r[P2]=parameter(P1) */ |
| 17950 | +#define OP_Move 80 /* synopsis: r[P2@P3]=r[P1@P3] */ |
| 17951 | +#define OP_Copy 81 /* synopsis: r[P2@P3+1]=r[P1@P3+1] */ |
| 17952 | +#define OP_SCopy 82 /* synopsis: r[P2]=r[P1] */ |
| 17953 | +#define OP_IntCopy 83 /* synopsis: r[P2]=r[P1] */ |
| 17954 | +#define OP_FkCheck 84 |
| 17955 | +#define OP_ResultRow 85 /* synopsis: output=r[P1@P2] */ |
| 17956 | +#define OP_CollSeq 86 |
| 17957 | +#define OP_AddImm 87 /* synopsis: r[P1]=r[P1]+P2 */ |
| 17958 | +#define OP_RealAffinity 88 |
| 17959 | +#define OP_Cast 89 /* synopsis: affinity(r[P1]) */ |
| 17960 | +#define OP_Permutation 90 |
| 17961 | +#define OP_Compare 91 /* synopsis: r[P1@P3] <-> r[P2@P3] */ |
| 17962 | +#define OP_IsTrue 92 /* synopsis: r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4 */ |
| 17963 | +#define OP_ZeroOrNull 93 /* synopsis: r[P2] = 0 OR NULL */ |
| 17964 | +#define OP_Offset 94 /* synopsis: r[P3] = sqlite_offset(P1) */ |
| 17965 | +#define OP_Column 95 /* synopsis: r[P3]=PX cursor P1 column P2 */ |
| 17966 | +#define OP_TypeCheck 96 /* synopsis: typecheck(r[P1@P2]) */ |
| 17967 | +#define OP_Affinity 97 /* synopsis: affinity(r[P1@P2]) */ |
| 17968 | +#define OP_MakeRecord 98 /* synopsis: r[P3]=mkrec(r[P1@P2]) */ |
| 17969 | +#define OP_Count 99 /* synopsis: r[P2]=count() */ |
| 17970 | +#define OP_ReadCookie 100 |
| 17971 | +#define OP_SetCookie 101 |
| 17972 | +#define OP_ReopenIdx 102 /* synopsis: root=P2 iDb=P3 */ |
| 17973 | 17973 | #define OP_BitAnd 103 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */ |
| 17974 | 17974 | #define OP_BitOr 104 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */ |
| 17975 | 17975 | #define OP_ShiftLeft 105 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */ |
| 17976 | 17976 | #define OP_ShiftRight 106 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */ |
| 17977 | 17977 | #define OP_Add 107 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */ |
| | @@ -17978,89 +17978,88 @@ |
| 17978 | 17978 | #define OP_Subtract 108 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */ |
| 17979 | 17979 | #define OP_Multiply 109 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */ |
| 17980 | 17980 | #define OP_Divide 110 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */ |
| 17981 | 17981 | #define OP_Remainder 111 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */ |
| 17982 | 17982 | #define OP_Concat 112 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */ |
| 17983 | | -#define OP_ReopenIdx 113 /* synopsis: root=P2 iDb=P3 */ |
| 17984 | | -#define OP_OpenRead 114 /* synopsis: root=P2 iDb=P3 */ |
| 17983 | +#define OP_OpenRead 113 /* synopsis: root=P2 iDb=P3 */ |
| 17984 | +#define OP_OpenWrite 114 /* synopsis: root=P2 iDb=P3 */ |
| 17985 | 17985 | #define OP_BitNot 115 /* same as TK_BITNOT, synopsis: r[P2]= ~r[P1] */ |
| 17986 | | -#define OP_OpenWrite 116 /* synopsis: root=P2 iDb=P3 */ |
| 17987 | | -#define OP_OpenDup 117 |
| 17986 | +#define OP_OpenDup 116 |
| 17987 | +#define OP_OpenAutoindex 117 /* synopsis: nColumn=P2 */ |
| 17988 | 17988 | #define OP_String8 118 /* same as TK_STRING, synopsis: r[P2]='P4' */ |
| 17989 | | -#define OP_OpenAutoindex 119 /* synopsis: nColumn=P2 */ |
| 17990 | | -#define OP_OpenEphemeral 120 /* synopsis: nColumn=P2 */ |
| 17991 | | -#define OP_SorterOpen 121 |
| 17992 | | -#define OP_SequenceTest 122 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */ |
| 17993 | | -#define OP_OpenPseudo 123 /* synopsis: P3 columns in r[P2] */ |
| 17994 | | -#define OP_Close 124 |
| 17995 | | -#define OP_ColumnsUsed 125 /* synopsis: Cursor P1 uses columns PHEX23 */ |
| 17996 | | -#define OP_SeekScan 126 /* synopsis: Scan-ahead up to P1 rows */ |
| 17997 | | -#define OP_SeekHit 127 /* synopsis: set P2<=seekHit<=P3 */ |
| 17998 | | -#define OP_Sequence 128 /* synopsis: r[P2]=cursor[P1].ctr++ */ |
| 17999 | | -#define OP_NewRowid 129 /* synopsis: r[P2]=rowid */ |
| 18000 | | -#define OP_Insert 130 /* synopsis: intkey=r[P3] data=r[P2] */ |
| 18001 | | -#define OP_RowCell 131 |
| 18002 | | -#define OP_Delete 132 |
| 18003 | | -#define OP_ResetCount 133 |
| 18004 | | -#define OP_SorterCompare 134 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */ |
| 18005 | | -#define OP_SorterData 135 /* synopsis: r[P2]=data */ |
| 18006 | | -#define OP_RowData 136 /* synopsis: r[P2]=data */ |
| 18007 | | -#define OP_Rowid 137 /* synopsis: r[P2]=PX rowid of P1 */ |
| 18008 | | -#define OP_NullRow 138 |
| 18009 | | -#define OP_SeekEnd 139 |
| 18010 | | -#define OP_IdxInsert 140 /* synopsis: key=r[P2] */ |
| 18011 | | -#define OP_SorterInsert 141 /* synopsis: key=r[P2] */ |
| 18012 | | -#define OP_IdxDelete 142 /* synopsis: key=r[P2@P5] */ |
| 18013 | | -#define OP_DeferredSeek 143 /* synopsis: Move P3 to P1.rowid if needed */ |
| 18014 | | -#define OP_IdxRowid 144 /* synopsis: r[P2]=rowid */ |
| 18015 | | -#define OP_FinishSeek 145 |
| 18016 | | -#define OP_Destroy 146 |
| 18017 | | -#define OP_Clear 147 |
| 18018 | | -#define OP_ResetSorter 148 |
| 18019 | | -#define OP_CreateBtree 149 /* synopsis: r[P2]=root iDb=P1 flags=P3 */ |
| 18020 | | -#define OP_SqlExec 150 |
| 18021 | | -#define OP_ParseSchema 151 |
| 18022 | | -#define OP_LoadAnalysis 152 |
| 18023 | | -#define OP_DropTable 153 |
| 17989 | +#define OP_OpenEphemeral 119 /* synopsis: nColumn=P2 */ |
| 17990 | +#define OP_SorterOpen 120 |
| 17991 | +#define OP_SequenceTest 121 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */ |
| 17992 | +#define OP_OpenPseudo 122 /* synopsis: P3 columns in r[P2] */ |
| 17993 | +#define OP_Close 123 |
| 17994 | +#define OP_ColumnsUsed 124 /* synopsis: Cursor P1 uses columns PHEX23 */ |
| 17995 | +#define OP_SeekScan 125 /* synopsis: Scan-ahead up to P1 rows */ |
| 17996 | +#define OP_SeekHit 126 /* synopsis: set P2<=seekHit<=P3 */ |
| 17997 | +#define OP_Sequence 127 /* synopsis: r[P2]=cursor[P1].ctr++ */ |
| 17998 | +#define OP_NewRowid 128 /* synopsis: r[P2]=rowid */ |
| 17999 | +#define OP_Insert 129 /* synopsis: intkey=r[P3] data=r[P2] */ |
| 18000 | +#define OP_RowCell 130 |
| 18001 | +#define OP_Delete 131 |
| 18002 | +#define OP_ResetCount 132 |
| 18003 | +#define OP_SorterCompare 133 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */ |
| 18004 | +#define OP_SorterData 134 /* synopsis: r[P2]=data */ |
| 18005 | +#define OP_RowData 135 /* synopsis: r[P2]=data */ |
| 18006 | +#define OP_Rowid 136 /* synopsis: r[P2]=PX rowid of P1 */ |
| 18007 | +#define OP_NullRow 137 |
| 18008 | +#define OP_SeekEnd 138 |
| 18009 | +#define OP_IdxInsert 139 /* synopsis: key=r[P2] */ |
| 18010 | +#define OP_SorterInsert 140 /* synopsis: key=r[P2] */ |
| 18011 | +#define OP_IdxDelete 141 /* synopsis: key=r[P2@P5] */ |
| 18012 | +#define OP_DeferredSeek 142 /* synopsis: Move P3 to P1.rowid if needed */ |
| 18013 | +#define OP_IdxRowid 143 /* synopsis: r[P2]=rowid */ |
| 18014 | +#define OP_FinishSeek 144 |
| 18015 | +#define OP_Destroy 145 |
| 18016 | +#define OP_Clear 146 |
| 18017 | +#define OP_ResetSorter 147 |
| 18018 | +#define OP_CreateBtree 148 /* synopsis: r[P2]=root iDb=P1 flags=P3 */ |
| 18019 | +#define OP_SqlExec 149 |
| 18020 | +#define OP_ParseSchema 150 |
| 18021 | +#define OP_LoadAnalysis 151 |
| 18022 | +#define OP_DropTable 152 |
| 18023 | +#define OP_DropIndex 153 |
| 18024 | 18024 | #define OP_Real 154 /* same as TK_FLOAT, synopsis: r[P2]=PDBL13 */ |
| 18025 | | -#define OP_DropIndex 155 |
| 18026 | | -#define OP_DropTrigger 156 |
| 18027 | | -#define OP_IntegrityCk 157 |
| 18028 | | -#define OP_RowSetAdd 158 /* synopsis: rowset(P1)=r[P2] */ |
| 18029 | | -#define OP_Param 159 |
| 18030 | | -#define OP_FkCounter 160 /* synopsis: fkctr[P1]+=P2 */ |
| 18031 | | -#define OP_MemMax 161 /* synopsis: r[P1]=max(r[P1],r[P2]) */ |
| 18032 | | -#define OP_OffsetLimit 162 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */ |
| 18033 | | -#define OP_AggInverse 163 /* synopsis: accum=r[P3] inverse(r[P2@P5]) */ |
| 18034 | | -#define OP_AggStep 164 /* synopsis: accum=r[P3] step(r[P2@P5]) */ |
| 18035 | | -#define OP_AggStep1 165 /* synopsis: accum=r[P3] step(r[P2@P5]) */ |
| 18036 | | -#define OP_AggValue 166 /* synopsis: r[P3]=value N=P2 */ |
| 18037 | | -#define OP_AggFinal 167 /* synopsis: accum=r[P1] N=P2 */ |
| 18038 | | -#define OP_Expire 168 |
| 18039 | | -#define OP_CursorLock 169 |
| 18040 | | -#define OP_CursorUnlock 170 |
| 18041 | | -#define OP_TableLock 171 /* synopsis: iDb=P1 root=P2 write=P3 */ |
| 18042 | | -#define OP_VBegin 172 |
| 18043 | | -#define OP_VCreate 173 |
| 18044 | | -#define OP_VDestroy 174 |
| 18045 | | -#define OP_VOpen 175 |
| 18046 | | -#define OP_VCheck 176 |
| 18047 | | -#define OP_VInitIn 177 /* synopsis: r[P2]=ValueList(P1,P3) */ |
| 18048 | | -#define OP_VColumn 178 /* synopsis: r[P3]=vcolumn(P2) */ |
| 18049 | | -#define OP_VRename 179 |
| 18050 | | -#define OP_Pagecount 180 |
| 18051 | | -#define OP_MaxPgcnt 181 |
| 18052 | | -#define OP_ClrSubtype 182 /* synopsis: r[P1].subtype = 0 */ |
| 18053 | | -#define OP_GetSubtype 183 /* synopsis: r[P2] = r[P1].subtype */ |
| 18054 | | -#define OP_SetSubtype 184 /* synopsis: r[P2].subtype = r[P1] */ |
| 18055 | | -#define OP_FilterAdd 185 /* synopsis: filter(P1) += key(P3@P4) */ |
| 18056 | | -#define OP_Trace 186 |
| 18057 | | -#define OP_CursorHint 187 |
| 18058 | | -#define OP_ReleaseReg 188 /* synopsis: release r[P1@P2] mask P3 */ |
| 18059 | | -#define OP_Noop 189 |
| 18060 | | -#define OP_Explain 190 |
| 18061 | | -#define OP_Abortable 191 |
| 18025 | +#define OP_DropTrigger 155 |
| 18026 | +#define OP_IntegrityCk 156 |
| 18027 | +#define OP_RowSetAdd 157 /* synopsis: rowset(P1)=r[P2] */ |
| 18028 | +#define OP_Param 158 |
| 18029 | +#define OP_FkCounter 159 /* synopsis: fkctr[P1]+=P2 */ |
| 18030 | +#define OP_MemMax 160 /* synopsis: r[P1]=max(r[P1],r[P2]) */ |
| 18031 | +#define OP_OffsetLimit 161 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */ |
| 18032 | +#define OP_AggInverse 162 /* synopsis: accum=r[P3] inverse(r[P2@P5]) */ |
| 18033 | +#define OP_AggStep 163 /* synopsis: accum=r[P3] step(r[P2@P5]) */ |
| 18034 | +#define OP_AggStep1 164 /* synopsis: accum=r[P3] step(r[P2@P5]) */ |
| 18035 | +#define OP_AggValue 165 /* synopsis: r[P3]=value N=P2 */ |
| 18036 | +#define OP_AggFinal 166 /* synopsis: accum=r[P1] N=P2 */ |
| 18037 | +#define OP_Expire 167 |
| 18038 | +#define OP_CursorLock 168 |
| 18039 | +#define OP_CursorUnlock 169 |
| 18040 | +#define OP_TableLock 170 /* synopsis: iDb=P1 root=P2 write=P3 */ |
| 18041 | +#define OP_VBegin 171 |
| 18042 | +#define OP_VCreate 172 |
| 18043 | +#define OP_VDestroy 173 |
| 18044 | +#define OP_VOpen 174 |
| 18045 | +#define OP_VCheck 175 |
| 18046 | +#define OP_VInitIn 176 /* synopsis: r[P2]=ValueList(P1,P3) */ |
| 18047 | +#define OP_VColumn 177 /* synopsis: r[P3]=vcolumn(P2) */ |
| 18048 | +#define OP_VRename 178 |
| 18049 | +#define OP_Pagecount 179 |
| 18050 | +#define OP_MaxPgcnt 180 |
| 18051 | +#define OP_ClrSubtype 181 /* synopsis: r[P1].subtype = 0 */ |
| 18052 | +#define OP_GetSubtype 182 /* synopsis: r[P2] = r[P1].subtype */ |
| 18053 | +#define OP_SetSubtype 183 /* synopsis: r[P2].subtype = r[P1] */ |
| 18054 | +#define OP_FilterAdd 184 /* synopsis: filter(P1) += key(P3@P4) */ |
| 18055 | +#define OP_Trace 185 |
| 18056 | +#define OP_CursorHint 186 |
| 18057 | +#define OP_ReleaseReg 187 /* synopsis: release r[P1@P2] mask P3 */ |
| 18058 | +#define OP_Noop 188 |
| 18059 | +#define OP_Explain 189 |
| 18060 | +#define OP_Abortable 190 |
| 18062 | 18061 | |
| 18063 | 18062 | /* Properties such as "out2" or "jump" that are specified in |
| 18064 | 18063 | ** comments following the "case" for each opcode in the vdbe.c |
| 18065 | 18064 | ** are encoded into bitvectors as follows: |
| 18066 | 18065 | */ |
| | @@ -18074,40 +18073,39 @@ |
| 18074 | 18073 | #define OPFLG_JUMP0 0x80 /* jump0: P2 might be zero */ |
| 18075 | 18074 | #define OPFLG_INITIALIZER {\ |
| 18076 | 18075 | /* 0 */ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x41, 0x00,\ |
| 18077 | 18076 | /* 8 */ 0x81, 0x01, 0x01, 0x81, 0x83, 0x83, 0x01, 0x01,\ |
| 18078 | 18077 | /* 16 */ 0x03, 0x03, 0x01, 0x12, 0x01, 0xc9, 0xc9, 0xc9,\ |
| 18079 | | -/* 24 */ 0xc9, 0x01, 0x49, 0x49, 0x49, 0x49, 0xc9, 0x49,\ |
| 18080 | | -/* 32 */ 0xc1, 0x01, 0x41, 0x41, 0xc1, 0x01, 0x01, 0x41,\ |
| 18081 | | -/* 40 */ 0x41, 0x41, 0x41, 0x26, 0x26, 0x41, 0x41, 0x09,\ |
| 18082 | | -/* 48 */ 0x23, 0x0b, 0x81, 0x03, 0x03, 0x0b, 0x0b, 0x0b,\ |
| 18083 | | -/* 56 */ 0x0b, 0x0b, 0x0b, 0x01, 0x01, 0x03, 0x03, 0x03,\ |
| 18084 | | -/* 64 */ 0x01, 0x41, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08,\ |
| 18085 | | -/* 72 */ 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x10,\ |
| 18086 | | -/* 80 */ 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00,\ |
| 18087 | | -/* 88 */ 0x02, 0x02, 0x02, 0x00, 0x00, 0x12, 0x1e, 0x20,\ |
| 18088 | | -/* 96 */ 0x40, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x26,\ |
| 18078 | +/* 24 */ 0xc9, 0x49, 0x49, 0x49, 0x49, 0xc9, 0x49, 0xc1,\ |
| 18079 | +/* 32 */ 0x01, 0x41, 0x41, 0xc1, 0x01, 0x01, 0x41, 0x41,\ |
| 18080 | +/* 40 */ 0x41, 0x41, 0x41, 0x26, 0x26, 0x41, 0x09, 0x23,\ |
| 18081 | +/* 48 */ 0x0b, 0x81, 0x01, 0x03, 0x03, 0x0b, 0x0b, 0x0b,\ |
| 18082 | +/* 56 */ 0x0b, 0x0b, 0x0b, 0x01, 0x03, 0x03, 0x03, 0x01,\ |
| 18083 | +/* 64 */ 0x41, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00,\ |
| 18084 | +/* 72 */ 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x10, 0x10,\ |
| 18085 | +/* 80 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02,\ |
| 18086 | +/* 88 */ 0x02, 0x02, 0x00, 0x00, 0x12, 0x1e, 0x20, 0x40,\ |
| 18087 | +/* 96 */ 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x40, 0x26,\ |
| 18089 | 18088 | /* 104 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26,\ |
| 18090 | | -/* 112 */ 0x26, 0x40, 0x40, 0x12, 0x00, 0x40, 0x10, 0x40,\ |
| 18091 | | -/* 120 */ 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40,\ |
| 18092 | | -/* 128 */ 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,\ |
| 18093 | | -/* 136 */ 0x00, 0x50, 0x00, 0x40, 0x04, 0x04, 0x00, 0x40,\ |
| 18094 | | -/* 144 */ 0x50, 0x40, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00,\ |
| 18095 | | -/* 152 */ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x06, 0x10,\ |
| 18096 | | -/* 160 */ 0x00, 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00,\ |
| 18097 | | -/* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,\ |
| 18098 | | -/* 176 */ 0x10, 0x50, 0x40, 0x00, 0x10, 0x10, 0x02, 0x12,\ |
| 18099 | | -/* 184 */ 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ |
| 18100 | | -} |
| 18089 | +/* 112 */ 0x26, 0x40, 0x00, 0x12, 0x40, 0x40, 0x10, 0x40,\ |
| 18090 | +/* 120 */ 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10,\ |
| 18091 | +/* 128 */ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,\ |
| 18092 | +/* 136 */ 0x50, 0x00, 0x40, 0x04, 0x04, 0x00, 0x40, 0x50,\ |
| 18093 | +/* 144 */ 0x40, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,\ |
| 18094 | +/* 152 */ 0x00, 0x00, 0x10, 0x00, 0x00, 0x06, 0x10, 0x00,\ |
| 18095 | +/* 160 */ 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ |
| 18096 | +/* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10,\ |
| 18097 | +/* 176 */ 0x50, 0x40, 0x00, 0x10, 0x10, 0x02, 0x12, 0x12,\ |
| 18098 | +/* 184 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,} |
| 18101 | 18099 | |
| 18102 | 18100 | /* The resolve3P2Values() routine is able to run faster if it knows |
| 18103 | 18101 | ** the value of the largest JUMP opcode. The smaller the maximum |
| 18104 | 18102 | ** JUMP opcode the better, so the mkopcodeh.tcl script that |
| 18105 | 18103 | ** generated this include file strives to group all JUMP opcodes |
| 18106 | 18104 | ** together near the beginning of the list. |
| 18107 | 18105 | */ |
| 18108 | | -#define SQLITE_MX_JUMP_OPCODE 66 /* Maximum JUMP opcode */ |
| 18106 | +#define SQLITE_MX_JUMP_OPCODE 65 /* Maximum JUMP opcode */ |
| 18109 | 18107 | |
| 18110 | 18108 | /************** End of opcodes.h *********************************************/ |
| 18111 | 18109 | /************** Continuing where we left off in vdbe.h ***********************/ |
| 18112 | 18110 | |
| 18113 | 18111 | /* |
| | @@ -35061,10 +35059,14 @@ |
| 35061 | 35059 | } |
| 35062 | 35060 | case TK_ID: { |
| 35063 | 35061 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| 35064 | 35062 | sqlite3TreeViewLine(pView,"ID \"%w\"", pExpr->u.zToken); |
| 35065 | 35063 | break; |
| 35064 | + } |
| 35065 | + case TK_ASTERISK: { |
| 35066 | + sqlite3TreeViewLine(pView,"ASKTERISK"); |
| 35067 | + break; |
| 35066 | 35068 | } |
| 35067 | 35069 | #ifndef SQLITE_OMIT_CAST |
| 35068 | 35070 | case TK_CAST: { |
| 35069 | 35071 | /* Expressions of the form: CAST(pLeft AS token) */ |
| 35070 | 35072 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| | @@ -39359,88 +39361,88 @@ |
| 39359 | 39361 | /* 20 */ "IfNullRow" OpHelp("if P1.nullRow then r[P3]=NULL, goto P2"), |
| 39360 | 39362 | /* 21 */ "SeekLT" OpHelp("key=r[P3@P4]"), |
| 39361 | 39363 | /* 22 */ "SeekLE" OpHelp("key=r[P3@P4]"), |
| 39362 | 39364 | /* 23 */ "SeekGE" OpHelp("key=r[P3@P4]"), |
| 39363 | 39365 | /* 24 */ "SeekGT" OpHelp("key=r[P3@P4]"), |
| 39364 | | - /* 25 */ "IfNotOpen" OpHelp("if( !csr[P1] ) goto P2"), |
| 39365 | | - /* 26 */ "IfNoHope" OpHelp("key=r[P3@P4]"), |
| 39366 | | - /* 27 */ "NoConflict" OpHelp("key=r[P3@P4]"), |
| 39367 | | - /* 28 */ "NotFound" OpHelp("key=r[P3@P4]"), |
| 39368 | | - /* 29 */ "Found" OpHelp("key=r[P3@P4]"), |
| 39369 | | - /* 30 */ "SeekRowid" OpHelp("intkey=r[P3]"), |
| 39370 | | - /* 31 */ "NotExists" OpHelp("intkey=r[P3]"), |
| 39371 | | - /* 32 */ "Last" OpHelp(""), |
| 39372 | | - /* 33 */ "IfSizeBetween" OpHelp(""), |
| 39373 | | - /* 34 */ "SorterSort" OpHelp(""), |
| 39374 | | - /* 35 */ "Sort" OpHelp(""), |
| 39375 | | - /* 36 */ "Rewind" OpHelp(""), |
| 39376 | | - /* 37 */ "IfEmpty" OpHelp("if( empty(P1) ) goto P2"), |
| 39377 | | - /* 38 */ "SorterNext" OpHelp(""), |
| 39378 | | - /* 39 */ "Prev" OpHelp(""), |
| 39379 | | - /* 40 */ "Next" OpHelp(""), |
| 39380 | | - /* 41 */ "IdxLE" OpHelp("key=r[P3@P4]"), |
| 39381 | | - /* 42 */ "IdxGT" OpHelp("key=r[P3@P4]"), |
| 39366 | + /* 25 */ "IfNoHope" OpHelp("key=r[P3@P4]"), |
| 39367 | + /* 26 */ "NoConflict" OpHelp("key=r[P3@P4]"), |
| 39368 | + /* 27 */ "NotFound" OpHelp("key=r[P3@P4]"), |
| 39369 | + /* 28 */ "Found" OpHelp("key=r[P3@P4]"), |
| 39370 | + /* 29 */ "SeekRowid" OpHelp("intkey=r[P3]"), |
| 39371 | + /* 30 */ "NotExists" OpHelp("intkey=r[P3]"), |
| 39372 | + /* 31 */ "Last" OpHelp(""), |
| 39373 | + /* 32 */ "IfSizeBetween" OpHelp(""), |
| 39374 | + /* 33 */ "SorterSort" OpHelp(""), |
| 39375 | + /* 34 */ "Sort" OpHelp(""), |
| 39376 | + /* 35 */ "Rewind" OpHelp(""), |
| 39377 | + /* 36 */ "IfEmpty" OpHelp("if( empty(P1) ) goto P2"), |
| 39378 | + /* 37 */ "SorterNext" OpHelp(""), |
| 39379 | + /* 38 */ "Prev" OpHelp(""), |
| 39380 | + /* 39 */ "Next" OpHelp(""), |
| 39381 | + /* 40 */ "IdxLE" OpHelp("key=r[P3@P4]"), |
| 39382 | + /* 41 */ "IdxGT" OpHelp("key=r[P3@P4]"), |
| 39383 | + /* 42 */ "IdxLT" OpHelp("key=r[P3@P4]"), |
| 39382 | 39384 | /* 43 */ "Or" OpHelp("r[P3]=(r[P1] || r[P2])"), |
| 39383 | 39385 | /* 44 */ "And" OpHelp("r[P3]=(r[P1] && r[P2])"), |
| 39384 | | - /* 45 */ "IdxLT" OpHelp("key=r[P3@P4]"), |
| 39385 | | - /* 46 */ "IdxGE" OpHelp("key=r[P3@P4]"), |
| 39386 | | - /* 47 */ "IFindKey" OpHelp(""), |
| 39387 | | - /* 48 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"), |
| 39388 | | - /* 49 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"), |
| 39389 | | - /* 50 */ "Program" OpHelp(""), |
| 39386 | + /* 45 */ "IdxGE" OpHelp("key=r[P3@P4]"), |
| 39387 | + /* 46 */ "IFindKey" OpHelp(""), |
| 39388 | + /* 47 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"), |
| 39389 | + /* 48 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"), |
| 39390 | + /* 49 */ "Program" OpHelp(""), |
| 39391 | + /* 50 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"), |
| 39390 | 39392 | /* 51 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"), |
| 39391 | 39393 | /* 52 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"), |
| 39392 | 39394 | /* 53 */ "Ne" OpHelp("IF r[P3]!=r[P1]"), |
| 39393 | 39395 | /* 54 */ "Eq" OpHelp("IF r[P3]==r[P1]"), |
| 39394 | 39396 | /* 55 */ "Gt" OpHelp("IF r[P3]>r[P1]"), |
| 39395 | 39397 | /* 56 */ "Le" OpHelp("IF r[P3]<=r[P1]"), |
| 39396 | 39398 | /* 57 */ "Lt" OpHelp("IF r[P3]<r[P1]"), |
| 39397 | 39399 | /* 58 */ "Ge" OpHelp("IF r[P3]>=r[P1]"), |
| 39398 | 39400 | /* 59 */ "ElseEq" OpHelp(""), |
| 39399 | | - /* 60 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"), |
| 39400 | | - /* 61 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"), |
| 39401 | | - /* 62 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]--, goto P2"), |
| 39402 | | - /* 63 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"), |
| 39403 | | - /* 64 */ "IncrVacuum" OpHelp(""), |
| 39404 | | - /* 65 */ "VNext" OpHelp(""), |
| 39405 | | - /* 66 */ "Filter" OpHelp("if key(P3@P4) not in filter(P1) goto P2"), |
| 39406 | | - /* 67 */ "PureFunc" OpHelp("r[P3]=func(r[P2@NP])"), |
| 39407 | | - /* 68 */ "Function" OpHelp("r[P3]=func(r[P2@NP])"), |
| 39408 | | - /* 69 */ "Return" OpHelp(""), |
| 39409 | | - /* 70 */ "EndCoroutine" OpHelp(""), |
| 39410 | | - /* 71 */ "HaltIfNull" OpHelp("if r[P3]=null halt"), |
| 39411 | | - /* 72 */ "Halt" OpHelp(""), |
| 39412 | | - /* 73 */ "Integer" OpHelp("r[P2]=P1"), |
| 39413 | | - /* 74 */ "Int64" OpHelp("r[P2]=PINT13"), |
| 39414 | | - /* 75 */ "String" OpHelp("r[P2]='P4' (len=P1)"), |
| 39415 | | - /* 76 */ "BeginSubrtn" OpHelp("r[P2]=NULL"), |
| 39416 | | - /* 77 */ "Null" OpHelp("r[P2..P3]=NULL"), |
| 39417 | | - /* 78 */ "SoftNull" OpHelp("r[P1]=NULL"), |
| 39418 | | - /* 79 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"), |
| 39419 | | - /* 80 */ "Variable" OpHelp("r[P2]=parameter(P1)"), |
| 39420 | | - /* 81 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"), |
| 39421 | | - /* 82 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"), |
| 39422 | | - /* 83 */ "SCopy" OpHelp("r[P2]=r[P1]"), |
| 39423 | | - /* 84 */ "IntCopy" OpHelp("r[P2]=r[P1]"), |
| 39424 | | - /* 85 */ "FkCheck" OpHelp(""), |
| 39425 | | - /* 86 */ "ResultRow" OpHelp("output=r[P1@P2]"), |
| 39426 | | - /* 87 */ "CollSeq" OpHelp(""), |
| 39427 | | - /* 88 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"), |
| 39428 | | - /* 89 */ "RealAffinity" OpHelp(""), |
| 39429 | | - /* 90 */ "Cast" OpHelp("affinity(r[P1])"), |
| 39430 | | - /* 91 */ "Permutation" OpHelp(""), |
| 39431 | | - /* 92 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"), |
| 39432 | | - /* 93 */ "IsTrue" OpHelp("r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4"), |
| 39433 | | - /* 94 */ "ZeroOrNull" OpHelp("r[P2] = 0 OR NULL"), |
| 39434 | | - /* 95 */ "Offset" OpHelp("r[P3] = sqlite_offset(P1)"), |
| 39435 | | - /* 96 */ "Column" OpHelp("r[P3]=PX cursor P1 column P2"), |
| 39436 | | - /* 97 */ "TypeCheck" OpHelp("typecheck(r[P1@P2])"), |
| 39437 | | - /* 98 */ "Affinity" OpHelp("affinity(r[P1@P2])"), |
| 39438 | | - /* 99 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"), |
| 39439 | | - /* 100 */ "Count" OpHelp("r[P2]=count()"), |
| 39440 | | - /* 101 */ "ReadCookie" OpHelp(""), |
| 39441 | | - /* 102 */ "SetCookie" OpHelp(""), |
| 39401 | + /* 60 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"), |
| 39402 | + /* 61 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]--, goto P2"), |
| 39403 | + /* 62 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"), |
| 39404 | + /* 63 */ "IncrVacuum" OpHelp(""), |
| 39405 | + /* 64 */ "VNext" OpHelp(""), |
| 39406 | + /* 65 */ "Filter" OpHelp("if key(P3@P4) not in filter(P1) goto P2"), |
| 39407 | + /* 66 */ "PureFunc" OpHelp("r[P3]=func(r[P2@NP])"), |
| 39408 | + /* 67 */ "Function" OpHelp("r[P3]=func(r[P2@NP])"), |
| 39409 | + /* 68 */ "Return" OpHelp(""), |
| 39410 | + /* 69 */ "EndCoroutine" OpHelp(""), |
| 39411 | + /* 70 */ "HaltIfNull" OpHelp("if r[P3]=null halt"), |
| 39412 | + /* 71 */ "Halt" OpHelp(""), |
| 39413 | + /* 72 */ "Integer" OpHelp("r[P2]=P1"), |
| 39414 | + /* 73 */ "Int64" OpHelp("r[P2]=PINT13"), |
| 39415 | + /* 74 */ "String" OpHelp("r[P2]='P4' (len=P1)"), |
| 39416 | + /* 75 */ "BeginSubrtn" OpHelp("r[P2]=NULL"), |
| 39417 | + /* 76 */ "Null" OpHelp("r[P2..P3]=NULL"), |
| 39418 | + /* 77 */ "SoftNull" OpHelp("r[P1]=NULL"), |
| 39419 | + /* 78 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"), |
| 39420 | + /* 79 */ "Variable" OpHelp("r[P2]=parameter(P1)"), |
| 39421 | + /* 80 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"), |
| 39422 | + /* 81 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"), |
| 39423 | + /* 82 */ "SCopy" OpHelp("r[P2]=r[P1]"), |
| 39424 | + /* 83 */ "IntCopy" OpHelp("r[P2]=r[P1]"), |
| 39425 | + /* 84 */ "FkCheck" OpHelp(""), |
| 39426 | + /* 85 */ "ResultRow" OpHelp("output=r[P1@P2]"), |
| 39427 | + /* 86 */ "CollSeq" OpHelp(""), |
| 39428 | + /* 87 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"), |
| 39429 | + /* 88 */ "RealAffinity" OpHelp(""), |
| 39430 | + /* 89 */ "Cast" OpHelp("affinity(r[P1])"), |
| 39431 | + /* 90 */ "Permutation" OpHelp(""), |
| 39432 | + /* 91 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"), |
| 39433 | + /* 92 */ "IsTrue" OpHelp("r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4"), |
| 39434 | + /* 93 */ "ZeroOrNull" OpHelp("r[P2] = 0 OR NULL"), |
| 39435 | + /* 94 */ "Offset" OpHelp("r[P3] = sqlite_offset(P1)"), |
| 39436 | + /* 95 */ "Column" OpHelp("r[P3]=PX cursor P1 column P2"), |
| 39437 | + /* 96 */ "TypeCheck" OpHelp("typecheck(r[P1@P2])"), |
| 39438 | + /* 97 */ "Affinity" OpHelp("affinity(r[P1@P2])"), |
| 39439 | + /* 98 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"), |
| 39440 | + /* 99 */ "Count" OpHelp("r[P2]=count()"), |
| 39441 | + /* 100 */ "ReadCookie" OpHelp(""), |
| 39442 | + /* 101 */ "SetCookie" OpHelp(""), |
| 39443 | + /* 102 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"), |
| 39442 | 39444 | /* 103 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"), |
| 39443 | 39445 | /* 104 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"), |
| 39444 | 39446 | /* 105 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"), |
| 39445 | 39447 | /* 106 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"), |
| 39446 | 39448 | /* 107 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"), |
| | @@ -39447,89 +39449,88 @@ |
| 39447 | 39449 | /* 108 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"), |
| 39448 | 39450 | /* 109 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"), |
| 39449 | 39451 | /* 110 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"), |
| 39450 | 39452 | /* 111 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"), |
| 39451 | 39453 | /* 112 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"), |
| 39452 | | - /* 113 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"), |
| 39453 | | - /* 114 */ "OpenRead" OpHelp("root=P2 iDb=P3"), |
| 39454 | + /* 113 */ "OpenRead" OpHelp("root=P2 iDb=P3"), |
| 39455 | + /* 114 */ "OpenWrite" OpHelp("root=P2 iDb=P3"), |
| 39454 | 39456 | /* 115 */ "BitNot" OpHelp("r[P2]= ~r[P1]"), |
| 39455 | | - /* 116 */ "OpenWrite" OpHelp("root=P2 iDb=P3"), |
| 39456 | | - /* 117 */ "OpenDup" OpHelp(""), |
| 39457 | + /* 116 */ "OpenDup" OpHelp(""), |
| 39458 | + /* 117 */ "OpenAutoindex" OpHelp("nColumn=P2"), |
| 39457 | 39459 | /* 118 */ "String8" OpHelp("r[P2]='P4'"), |
| 39458 | | - /* 119 */ "OpenAutoindex" OpHelp("nColumn=P2"), |
| 39459 | | - /* 120 */ "OpenEphemeral" OpHelp("nColumn=P2"), |
| 39460 | | - /* 121 */ "SorterOpen" OpHelp(""), |
| 39461 | | - /* 122 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"), |
| 39462 | | - /* 123 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"), |
| 39463 | | - /* 124 */ "Close" OpHelp(""), |
| 39464 | | - /* 125 */ "ColumnsUsed" OpHelp("Cursor P1 uses columns PHEX23"), |
| 39465 | | - /* 126 */ "SeekScan" OpHelp("Scan-ahead up to P1 rows"), |
| 39466 | | - /* 127 */ "SeekHit" OpHelp("set P2<=seekHit<=P3"), |
| 39467 | | - /* 128 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"), |
| 39468 | | - /* 129 */ "NewRowid" OpHelp("r[P2]=rowid"), |
| 39469 | | - /* 130 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"), |
| 39470 | | - /* 131 */ "RowCell" OpHelp(""), |
| 39471 | | - /* 132 */ "Delete" OpHelp(""), |
| 39472 | | - /* 133 */ "ResetCount" OpHelp(""), |
| 39473 | | - /* 134 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"), |
| 39474 | | - /* 135 */ "SorterData" OpHelp("r[P2]=data"), |
| 39475 | | - /* 136 */ "RowData" OpHelp("r[P2]=data"), |
| 39476 | | - /* 137 */ "Rowid" OpHelp("r[P2]=PX rowid of P1"), |
| 39477 | | - /* 138 */ "NullRow" OpHelp(""), |
| 39478 | | - /* 139 */ "SeekEnd" OpHelp(""), |
| 39479 | | - /* 140 */ "IdxInsert" OpHelp("key=r[P2]"), |
| 39480 | | - /* 141 */ "SorterInsert" OpHelp("key=r[P2]"), |
| 39481 | | - /* 142 */ "IdxDelete" OpHelp("key=r[P2@P5]"), |
| 39482 | | - /* 143 */ "DeferredSeek" OpHelp("Move P3 to P1.rowid if needed"), |
| 39483 | | - /* 144 */ "IdxRowid" OpHelp("r[P2]=rowid"), |
| 39484 | | - /* 145 */ "FinishSeek" OpHelp(""), |
| 39485 | | - /* 146 */ "Destroy" OpHelp(""), |
| 39486 | | - /* 147 */ "Clear" OpHelp(""), |
| 39487 | | - /* 148 */ "ResetSorter" OpHelp(""), |
| 39488 | | - /* 149 */ "CreateBtree" OpHelp("r[P2]=root iDb=P1 flags=P3"), |
| 39489 | | - /* 150 */ "SqlExec" OpHelp(""), |
| 39490 | | - /* 151 */ "ParseSchema" OpHelp(""), |
| 39491 | | - /* 152 */ "LoadAnalysis" OpHelp(""), |
| 39492 | | - /* 153 */ "DropTable" OpHelp(""), |
| 39460 | + /* 119 */ "OpenEphemeral" OpHelp("nColumn=P2"), |
| 39461 | + /* 120 */ "SorterOpen" OpHelp(""), |
| 39462 | + /* 121 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"), |
| 39463 | + /* 122 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"), |
| 39464 | + /* 123 */ "Close" OpHelp(""), |
| 39465 | + /* 124 */ "ColumnsUsed" OpHelp("Cursor P1 uses columns PHEX23"), |
| 39466 | + /* 125 */ "SeekScan" OpHelp("Scan-ahead up to P1 rows"), |
| 39467 | + /* 126 */ "SeekHit" OpHelp("set P2<=seekHit<=P3"), |
| 39468 | + /* 127 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"), |
| 39469 | + /* 128 */ "NewRowid" OpHelp("r[P2]=rowid"), |
| 39470 | + /* 129 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"), |
| 39471 | + /* 130 */ "RowCell" OpHelp(""), |
| 39472 | + /* 131 */ "Delete" OpHelp(""), |
| 39473 | + /* 132 */ "ResetCount" OpHelp(""), |
| 39474 | + /* 133 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"), |
| 39475 | + /* 134 */ "SorterData" OpHelp("r[P2]=data"), |
| 39476 | + /* 135 */ "RowData" OpHelp("r[P2]=data"), |
| 39477 | + /* 136 */ "Rowid" OpHelp("r[P2]=PX rowid of P1"), |
| 39478 | + /* 137 */ "NullRow" OpHelp(""), |
| 39479 | + /* 138 */ "SeekEnd" OpHelp(""), |
| 39480 | + /* 139 */ "IdxInsert" OpHelp("key=r[P2]"), |
| 39481 | + /* 140 */ "SorterInsert" OpHelp("key=r[P2]"), |
| 39482 | + /* 141 */ "IdxDelete" OpHelp("key=r[P2@P5]"), |
| 39483 | + /* 142 */ "DeferredSeek" OpHelp("Move P3 to P1.rowid if needed"), |
| 39484 | + /* 143 */ "IdxRowid" OpHelp("r[P2]=rowid"), |
| 39485 | + /* 144 */ "FinishSeek" OpHelp(""), |
| 39486 | + /* 145 */ "Destroy" OpHelp(""), |
| 39487 | + /* 146 */ "Clear" OpHelp(""), |
| 39488 | + /* 147 */ "ResetSorter" OpHelp(""), |
| 39489 | + /* 148 */ "CreateBtree" OpHelp("r[P2]=root iDb=P1 flags=P3"), |
| 39490 | + /* 149 */ "SqlExec" OpHelp(""), |
| 39491 | + /* 150 */ "ParseSchema" OpHelp(""), |
| 39492 | + /* 151 */ "LoadAnalysis" OpHelp(""), |
| 39493 | + /* 152 */ "DropTable" OpHelp(""), |
| 39494 | + /* 153 */ "DropIndex" OpHelp(""), |
| 39493 | 39495 | /* 154 */ "Real" OpHelp("r[P2]=PDBL13"), |
| 39494 | | - /* 155 */ "DropIndex" OpHelp(""), |
| 39495 | | - /* 156 */ "DropTrigger" OpHelp(""), |
| 39496 | | - /* 157 */ "IntegrityCk" OpHelp(""), |
| 39497 | | - /* 158 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"), |
| 39498 | | - /* 159 */ "Param" OpHelp(""), |
| 39499 | | - /* 160 */ "FkCounter" OpHelp("fkctr[P1]+=P2"), |
| 39500 | | - /* 161 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"), |
| 39501 | | - /* 162 */ "OffsetLimit" OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"), |
| 39502 | | - /* 163 */ "AggInverse" OpHelp("accum=r[P3] inverse(r[P2@P5])"), |
| 39503 | | - /* 164 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"), |
| 39504 | | - /* 165 */ "AggStep1" OpHelp("accum=r[P3] step(r[P2@P5])"), |
| 39505 | | - /* 166 */ "AggValue" OpHelp("r[P3]=value N=P2"), |
| 39506 | | - /* 167 */ "AggFinal" OpHelp("accum=r[P1] N=P2"), |
| 39507 | | - /* 168 */ "Expire" OpHelp(""), |
| 39508 | | - /* 169 */ "CursorLock" OpHelp(""), |
| 39509 | | - /* 170 */ "CursorUnlock" OpHelp(""), |
| 39510 | | - /* 171 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"), |
| 39511 | | - /* 172 */ "VBegin" OpHelp(""), |
| 39512 | | - /* 173 */ "VCreate" OpHelp(""), |
| 39513 | | - /* 174 */ "VDestroy" OpHelp(""), |
| 39514 | | - /* 175 */ "VOpen" OpHelp(""), |
| 39515 | | - /* 176 */ "VCheck" OpHelp(""), |
| 39516 | | - /* 177 */ "VInitIn" OpHelp("r[P2]=ValueList(P1,P3)"), |
| 39517 | | - /* 178 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"), |
| 39518 | | - /* 179 */ "VRename" OpHelp(""), |
| 39519 | | - /* 180 */ "Pagecount" OpHelp(""), |
| 39520 | | - /* 181 */ "MaxPgcnt" OpHelp(""), |
| 39521 | | - /* 182 */ "ClrSubtype" OpHelp("r[P1].subtype = 0"), |
| 39522 | | - /* 183 */ "GetSubtype" OpHelp("r[P2] = r[P1].subtype"), |
| 39523 | | - /* 184 */ "SetSubtype" OpHelp("r[P2].subtype = r[P1]"), |
| 39524 | | - /* 185 */ "FilterAdd" OpHelp("filter(P1) += key(P3@P4)"), |
| 39525 | | - /* 186 */ "Trace" OpHelp(""), |
| 39526 | | - /* 187 */ "CursorHint" OpHelp(""), |
| 39527 | | - /* 188 */ "ReleaseReg" OpHelp("release r[P1@P2] mask P3"), |
| 39528 | | - /* 189 */ "Noop" OpHelp(""), |
| 39529 | | - /* 190 */ "Explain" OpHelp(""), |
| 39530 | | - /* 191 */ "Abortable" OpHelp(""), |
| 39496 | + /* 155 */ "DropTrigger" OpHelp(""), |
| 39497 | + /* 156 */ "IntegrityCk" OpHelp(""), |
| 39498 | + /* 157 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"), |
| 39499 | + /* 158 */ "Param" OpHelp(""), |
| 39500 | + /* 159 */ "FkCounter" OpHelp("fkctr[P1]+=P2"), |
| 39501 | + /* 160 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"), |
| 39502 | + /* 161 */ "OffsetLimit" OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"), |
| 39503 | + /* 162 */ "AggInverse" OpHelp("accum=r[P3] inverse(r[P2@P5])"), |
| 39504 | + /* 163 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"), |
| 39505 | + /* 164 */ "AggStep1" OpHelp("accum=r[P3] step(r[P2@P5])"), |
| 39506 | + /* 165 */ "AggValue" OpHelp("r[P3]=value N=P2"), |
| 39507 | + /* 166 */ "AggFinal" OpHelp("accum=r[P1] N=P2"), |
| 39508 | + /* 167 */ "Expire" OpHelp(""), |
| 39509 | + /* 168 */ "CursorLock" OpHelp(""), |
| 39510 | + /* 169 */ "CursorUnlock" OpHelp(""), |
| 39511 | + /* 170 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"), |
| 39512 | + /* 171 */ "VBegin" OpHelp(""), |
| 39513 | + /* 172 */ "VCreate" OpHelp(""), |
| 39514 | + /* 173 */ "VDestroy" OpHelp(""), |
| 39515 | + /* 174 */ "VOpen" OpHelp(""), |
| 39516 | + /* 175 */ "VCheck" OpHelp(""), |
| 39517 | + /* 176 */ "VInitIn" OpHelp("r[P2]=ValueList(P1,P3)"), |
| 39518 | + /* 177 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"), |
| 39519 | + /* 178 */ "VRename" OpHelp(""), |
| 39520 | + /* 179 */ "Pagecount" OpHelp(""), |
| 39521 | + /* 180 */ "MaxPgcnt" OpHelp(""), |
| 39522 | + /* 181 */ "ClrSubtype" OpHelp("r[P1].subtype = 0"), |
| 39523 | + /* 182 */ "GetSubtype" OpHelp("r[P2] = r[P1].subtype"), |
| 39524 | + /* 183 */ "SetSubtype" OpHelp("r[P2].subtype = r[P1]"), |
| 39525 | + /* 184 */ "FilterAdd" OpHelp("filter(P1) += key(P3@P4)"), |
| 39526 | + /* 185 */ "Trace" OpHelp(""), |
| 39527 | + /* 186 */ "CursorHint" OpHelp(""), |
| 39528 | + /* 187 */ "ReleaseReg" OpHelp("release r[P1@P2] mask P3"), |
| 39529 | + /* 188 */ "Noop" OpHelp(""), |
| 39530 | + /* 189 */ "Explain" OpHelp(""), |
| 39531 | + /* 190 */ "Abortable" OpHelp(""), |
| 39531 | 39532 | }; |
| 39532 | 39533 | return azName[i]; |
| 39533 | 39534 | } |
| 39534 | 39535 | #endif |
| 39535 | 39536 | |
| | @@ -97040,10 +97041,11 @@ |
| 97040 | 97041 | sqlite3RCStrUnref); |
| 97041 | 97042 | pDest->flags |= MEM_Term; |
| 97042 | 97043 | }else{ |
| 97043 | 97044 | rc = sqlite3VdbeMemSetStr(pDest, pBuf, len, 0, |
| 97044 | 97045 | sqlite3RCStrUnref); |
| 97046 | + pDest->enc = encoding; |
| 97045 | 97047 | } |
| 97046 | 97048 | }else{ |
| 97047 | 97049 | rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, iOffset, len, pDest); |
| 97048 | 97050 | if( rc ) return rc; |
| 97049 | 97051 | sqlite3VdbeSerialGet((const u8*)pDest->z, t, pDest); |
| | @@ -101615,28 +101617,10 @@ |
| 101615 | 101617 | printf("seekHit changes from %d to %d\n", pC->seekHit, pOp->p3); |
| 101616 | 101618 | } |
| 101617 | 101619 | #endif |
| 101618 | 101620 | pC->seekHit = pOp->p3; |
| 101619 | 101621 | } |
| 101620 | | - break; |
| 101621 | | -} |
| 101622 | | - |
| 101623 | | -/* Opcode: IfNotOpen P1 P2 * * * |
| 101624 | | -** Synopsis: if( !csr[P1] ) goto P2 |
| 101625 | | -** |
| 101626 | | -** If cursor P1 is not open or if P1 is set to a NULL row using the |
| 101627 | | -** OP_NullRow opcode, then jump to instruction P2. Otherwise, fall through. |
| 101628 | | -*/ |
| 101629 | | -case OP_IfNotOpen: { /* jump */ |
| 101630 | | - VdbeCursor *pCur; |
| 101631 | | - |
| 101632 | | - assert( pOp->p1>=0 && pOp->p1<p->nCursor ); |
| 101633 | | - pCur = p->apCsr[pOp->p1]; |
| 101634 | | - VdbeBranchTaken(pCur==0 || pCur->nullRow, 2); |
| 101635 | | - if( pCur==0 || pCur->nullRow ){ |
| 101636 | | - goto jump_to_p2_and_check_for_interrupt; |
| 101637 | | - } |
| 101638 | 101622 | break; |
| 101639 | 101623 | } |
| 101640 | 101624 | |
| 101641 | 101625 | /* Opcode: Found P1 P2 P3 P4 * |
| 101642 | 101626 | ** Synopsis: key=r[P3@P4] |
| | @@ -154169,11 +154153,11 @@ |
| 154169 | 154153 | ** elements we are now copying in. |
| 154170 | 154154 | */ |
| 154171 | 154155 | pSub = pSub1; |
| 154172 | 154156 | for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){ |
| 154173 | 154157 | int nSubSrc; |
| 154174 | | - u8 jointype = pSubitem->fg.jointype; |
| 154158 | + u8 jointype = pParent->pSrc->a[iFrom].fg.jointype; |
| 154175 | 154159 | assert( pSub!=0 ); |
| 154176 | 154160 | pSubSrc = pSub->pSrc; /* FROM clause of subquery */ |
| 154177 | 154161 | nSubSrc = pSubSrc->nSrc; /* Number of terms in subquery FROM clause */ |
| 154178 | 154162 | pSrc = pParent->pSrc; /* FROM clause of the outer query */ |
| 154179 | 154163 | |
| | @@ -154194,11 +154178,10 @@ |
| 154194 | 154178 | */ |
| 154195 | 154179 | if( nSubSrc>1 ){ |
| 154196 | 154180 | pSrc = sqlite3SrcListEnlarge(pParse, pSrc, nSubSrc-1,iFrom+1); |
| 154197 | 154181 | if( pSrc==0 ) break; |
| 154198 | 154182 | pParent->pSrc = pSrc; |
| 154199 | | - pSubitem = &pSrc->a[iFrom]; |
| 154200 | 154183 | } |
| 154201 | 154184 | |
| 154202 | 154185 | /* Transfer the FROM clause terms from the subquery into the |
| 154203 | 154186 | ** outer query. |
| 154204 | 154187 | */ |
| | @@ -154212,11 +154195,11 @@ |
| 154212 | 154195 | if( pItem->fg.isUsing ) sqlite3IdListDelete(db, pItem->u3.pUsing); |
| 154213 | 154196 | *pItem = pSubSrc->a[i]; |
| 154214 | 154197 | pItem->fg.jointype |= (jointype & JT_LTORJ); |
| 154215 | 154198 | memset(&pSubSrc->a[i], 0, sizeof(pSubSrc->a[i])); |
| 154216 | 154199 | } |
| 154217 | | - pSubitem->fg.jointype |= jointype; |
| 154200 | + pSrc->a[iFrom].fg.jointype |= jointype; |
| 154218 | 154201 | |
| 154219 | 154202 | /* Begin substituting subquery result set expressions for |
| 154220 | 154203 | ** references to the iParent in the outer query. |
| 154221 | 154204 | ** |
| 154222 | 154205 | ** Example: |
| | @@ -155882,10 +155865,11 @@ |
| 155882 | 155865 | } |
| 155883 | 155866 | } |
| 155884 | 155867 | pRight = sqlite3Expr(db, TK_ID, zName); |
| 155885 | 155868 | if( (pTabList->nSrc>1 |
| 155886 | 155869 | && ( (pFrom->fg.jointype & JT_LTORJ)==0 |
| 155870 | + || zTName!=0 |
| 155887 | 155871 | || (selFlags & SF_NestedFrom)!=0 |
| 155888 | 155872 | || !inAnyUsingClause(zName,pFrom,pTabList->nSrc-i-1) |
| 155889 | 155873 | ) |
| 155890 | 155874 | ) |
| 155891 | 155875 | || IN_RENAME_OBJECT |
| | @@ -177300,20 +177284,18 @@ |
| 177300 | 177284 | if( pIn->nPrefix ){ |
| 177301 | 177285 | int bEarlyOut = |
| 177302 | 177286 | (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 |
| 177303 | 177287 | && (pLoop->wsFlags & WHERE_IN_EARLYOUT)!=0; |
| 177304 | 177288 | if( pLevel->iLeftJoin ){ |
| 177305 | | - /* For LEFT JOIN queries, cursor pIn->iCur may not have been |
| 177306 | | - ** opened yet. This occurs for WHERE clauses such as |
| 177307 | | - ** "a = ? AND b IN (...)", where the index is on (a, b). If |
| 177308 | | - ** the RHS of the (a=?) is NULL, then the "b IN (...)" may |
| 177309 | | - ** never have been coded, but the body of the loop run to |
| 177310 | | - ** return the null-row. So, if the cursor is not open yet, |
| 177311 | | - ** jump over the OP_Next or OP_Prev instruction about to |
| 177312 | | - ** be coded. */ |
| 177313 | | - sqlite3VdbeAddOp2(v, OP_IfNotOpen, pIn->iCur, |
| 177314 | | - sqlite3VdbeCurrentAddr(v) + 2 + bEarlyOut); |
| 177289 | + /* For LEFT JOIN queries, cursor pIn->iCur might have been |
| 177290 | + ** disabled by OP_NullRow. This occurs for WHERE clauses such |
| 177291 | + ** as "a = ? AND b IN (...)", where the index is on (a, b). |
| 177292 | + ** When the OP_IfNullRow jump is taken, the pIn->iBase register |
| 177293 | + ** is NULLed out as a side effect. But as that register is not |
| 177294 | + ** used when the jump is taken, the side-effect is harmless. */ |
| 177295 | + sqlite3VdbeAddOp3(v, OP_IfNullRow, pIn->iCur, |
| 177296 | + sqlite3VdbeCurrentAddr(v) + 2 + bEarlyOut, pIn->iBase); |
| 177315 | 177297 | VdbeCoverage(v); |
| 177316 | 177298 | } |
| 177317 | 177299 | if( bEarlyOut ){ |
| 177318 | 177300 | sqlite3VdbeAddOp4Int(v, OP_IfNoHope, pLevel->iIdxCur, |
| 177319 | 177301 | sqlite3VdbeCurrentAddr(v)+2, |
| | @@ -177377,10 +177359,19 @@ |
| 177377 | 177359 | int iDb = sqlite3SchemaToIndex(db, pIx->pSchema); |
| 177378 | 177360 | sqlite3VdbeAddOp3(v, OP_ReopenIdx, pLevel->iIdxCur, pIx->tnum, iDb); |
| 177379 | 177361 | sqlite3VdbeSetP4KeyInfo(pParse, pIx); |
| 177380 | 177362 | } |
| 177381 | 177363 | sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur); |
| 177364 | + } |
| 177365 | + if( ws & WHERE_IN_ABLE ){ |
| 177366 | + int m; |
| 177367 | + for(m=0; m<pLevel->u.in.nIn; m++){ |
| 177368 | + struct InLoop *pIn = &pLevel->u.in.aInLoop[m]; |
| 177369 | + if( pIn->eEndLoopOp!=OP_Noop ){ |
| 177370 | + sqlite3VdbeAddOp1(v, OP_NullRow, pIn->iCur); |
| 177371 | + } |
| 177372 | + } |
| 177382 | 177373 | } |
| 177383 | 177374 | if( pLevel->op==OP_Return ){ |
| 177384 | 177375 | sqlite3VdbeAddOp2(v, OP_Gosub, pLevel->p1, pLevel->addrFirst); |
| 177385 | 177376 | }else{ |
| 177386 | 177377 | sqlite3VdbeGoto(v, pLevel->addrFirst); |
| | @@ -178372,11 +178363,13 @@ |
| 178372 | 178363 | Expr *pDup = sqlite3ExprDup(pParse->db, pExpr, 0); |
| 178373 | 178364 | if( pDup && pDup->op==TK_AGG_FUNCTION ) pDup->op = TK_FUNCTION; |
| 178374 | 178365 | p->pSub = sqlite3ExprListAppend(pParse, p->pSub, pDup); |
| 178375 | 178366 | } |
| 178376 | 178367 | if( p->pSub ){ |
| 178377 | | - int f = pExpr->flags & EP_Collate; |
| 178368 | + int f = pExpr->flags & (EP_Collate|EP_OuterON|EP_InnerON); |
| 178369 | + int iJoin = pExpr->w.iJoin; |
| 178370 | + |
| 178378 | 178371 | assert( ExprHasProperty(pExpr, EP_Static)==0 ); |
| 178379 | 178372 | ExprSetProperty(pExpr, EP_Static); |
| 178380 | 178373 | sqlite3ExprDelete(pParse->db, pExpr); |
| 178381 | 178374 | ExprClearProperty(pExpr, EP_Static); |
| 178382 | 178375 | memset(pExpr, 0, sizeof(Expr)); |
| | @@ -178384,10 +178377,11 @@ |
| 178384 | 178377 | pExpr->op = TK_COLUMN; |
| 178385 | 178378 | pExpr->iColumn = (iCol<0 ? p->pSub->nExpr-1: iCol); |
| 178386 | 178379 | pExpr->iTable = p->pWin->iEphCsr; |
| 178387 | 178380 | pExpr->y.pTab = p->pTab; |
| 178388 | 178381 | pExpr->flags = f; |
| 178382 | + if( (f & (EP_OuterON|EP_InnerON)) ) pExpr->w.iJoin = iJoin; |
| 178389 | 178383 | } |
| 178390 | 178384 | if( pParse->db->mallocFailed ) return WRC_Abort; |
| 178391 | 178385 | break; |
| 178392 | 178386 | } |
| 178393 | 178387 | |
| | @@ -185494,11 +185488,15 @@ |
| 185494 | 185488 | }else{ |
| 185495 | 185489 | yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, yymsp[-3].minor.yy144 ? TK_OR : TK_AND, pB, yymsp[-4].minor.yy454); |
| 185496 | 185490 | } |
| 185497 | 185491 | }else{ |
| 185498 | 185492 | Expr *pRHS = yymsp[-1].minor.yy14->a[0].pExpr; |
| 185499 | | - if( yymsp[-1].minor.yy14->nExpr==1 && sqlite3ExprIsConstant(pParse,pRHS) && yymsp[-4].minor.yy454->op!=TK_VECTOR ){ |
| 185493 | + if( yymsp[-1].minor.yy14->nExpr==1 |
| 185494 | + && sqlite3ExprIsConstant(pParse,pRHS) |
| 185495 | + && pRHS->op!=TK_COLLATE |
| 185496 | + && yymsp[-4].minor.yy454->op!=TK_VECTOR |
| 185497 | + ){ |
| 185500 | 185498 | yymsp[-1].minor.yy14->a[0].pExpr = 0; |
| 185501 | 185499 | sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy14); |
| 185502 | 185500 | pRHS = sqlite3PExpr(pParse, TK_UPLUS, pRHS, 0); |
| 185503 | 185501 | yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_EQ, yymsp[-4].minor.yy454, pRHS); |
| 185504 | 185502 | }else if( yymsp[-1].minor.yy14->nExpr==1 && pRHS->op==TK_SELECT ){ |
| | @@ -265409,11 +265407,11 @@ |
| 265409 | 265407 | int nArg, /* Number of args */ |
| 265410 | 265408 | sqlite3_value **apUnused /* Function arguments */ |
| 265411 | 265409 | ){ |
| 265412 | 265410 | assert( nArg==0 ); |
| 265413 | 265411 | UNUSED_PARAM2(nArg, apUnused); |
| 265414 | | - sqlite3_result_text(pCtx, "fts5: 2026-10-06 14:34:02 adacd1423f159fa4698f7e40dd1488256a13dff0b31cc90e28c3441109596ef4", -1, SQLITE_TRANSIENT); |
| 265412 | + sqlite3_result_text(pCtx, "fts5: 2026-10-09 11:47:51 a3332bd623d997921c3186433cd1eab0c9413aa0f68d93b1731cf80128ec3a36", -1, SQLITE_TRANSIENT); |
| 265415 | 265413 | } |
| 265416 | 265414 | |
| 265417 | 265415 | /* |
| 265418 | 265416 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 265419 | 265417 | ** |
| 265420 | 265418 | |