|
1 | 1 | /****************************************************************************** |
2 | 2 | ** This file is an amalgamation of many separate C source files from SQLite |
3 | | -** version 3.35.4. By combining all the individual C code files into this |
| 3 | +** version 3.35.5. By combining all the individual C code files into this |
4 | 4 | ** single large file, the entire code can be compiled as a single translation |
5 | 5 | ** unit. This allows many compilers to do optimizations that would not be |
6 | 6 | ** possible if the files were compiled separately. Performance improvements |
@@ -1186,9 +1186,9 @@ extern "C" { |
1186 | 1186 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
1187 | 1187 | ** [sqlite_version()] and [sqlite_source_id()]. |
1188 | 1188 | */ |
1189 | | -#define SQLITE_VERSION "3.35.4" |
1190 | | -#define SQLITE_VERSION_NUMBER 3035004 |
1191 | | -#define SQLITE_SOURCE_ID "2021-04-02 15:20:15 5d4c65779dab868b285519b19e4cf9d451d50c6048f06f653aa701ec212df45e" |
| 1189 | +#define SQLITE_VERSION "3.35.5" |
| 1190 | +#define SQLITE_VERSION_NUMBER 3035005 |
| 1191 | +#define SQLITE_SOURCE_ID "2021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98fae886" |
1192 | 1192 |
|
1193 | 1193 | /* |
1194 | 1194 | ** CAPI3REF: Run-Time Library Version Numbers |
@@ -108701,33 +108701,44 @@ SQLITE_PRIVATE void sqlite3AlterDropColumn(Parse *pParse, SrcList *pSrc, Token * |
108701 | 108701 | sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenWrite); |
108702 | 108702 | addr = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v); |
108703 | 108703 | reg = ++pParse->nMem; |
108704 | | - pParse->nMem += pTab->nCol; |
108705 | 108704 | if( HasRowid(pTab) ){ |
108706 | 108705 | sqlite3VdbeAddOp2(v, OP_Rowid, iCur, reg); |
| 108706 | + pParse->nMem += pTab->nCol; |
108707 | 108707 | }else{ |
108708 | 108708 | pPk = sqlite3PrimaryKeyIndex(pTab); |
| 108709 | + pParse->nMem += pPk->nColumn; |
| 108710 | + for(i=0; i<pPk->nKeyCol; i++){ |
| 108711 | + sqlite3VdbeAddOp3(v, OP_Column, iCur, i, reg+i+1); |
| 108712 | + } |
| 108713 | + nField = pPk->nKeyCol; |
108709 | 108714 | } |
| 108715 | + regRec = ++pParse->nMem; |
108710 | 108716 | for(i=0; i<pTab->nCol; i++){ |
108711 | 108717 | if( i!=iCol && (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0 ){ |
108712 | 108718 | int regOut; |
108713 | 108719 | if( pPk ){ |
108714 | 108720 | int iPos = sqlite3TableColumnToIndex(pPk, i); |
108715 | 108721 | int iColPos = sqlite3TableColumnToIndex(pPk, iCol); |
| 108722 | + if( iPos<pPk->nKeyCol ) continue; |
108716 | 108723 | regOut = reg+1+iPos-(iPos>iColPos); |
108717 | 108724 | }else{ |
108718 | 108725 | regOut = reg+1+nField; |
108719 | 108726 | } |
108720 | | - sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, i, regOut); |
| 108727 | + if( i==pTab->iPKey ){ |
| 108728 | + sqlite3VdbeAddOp2(v, OP_Null, 0, regOut); |
| 108729 | + }else{ |
| 108730 | + sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, i, regOut); |
| 108731 | + } |
108721 | 108732 | nField++; |
108722 | 108733 | } |
108723 | 108734 | } |
108724 | | - regRec = reg + pTab->nCol; |
108725 | 108735 | sqlite3VdbeAddOp3(v, OP_MakeRecord, reg+1, nField, regRec); |
108726 | 108736 | if( pPk ){ |
108727 | 108737 | sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iCur, regRec, reg+1, pPk->nKeyCol); |
108728 | 108738 | }else{ |
108729 | 108739 | sqlite3VdbeAddOp3(v, OP_Insert, iCur, regRec, reg); |
108730 | 108740 | } |
| 108741 | + sqlite3VdbeChangeP5(v, OPFLAG_SAVEPOSITION); |
108731 | 108742 |
|
108732 | 108743 | sqlite3VdbeAddOp2(v, OP_Next, iCur, addr+1); VdbeCoverage(v); |
108733 | 108744 | sqlite3VdbeJumpHere(v, addr); |
@@ -146904,6 +146915,7 @@ static void whereCombineDisjuncts( |
146904 | 146915 | int op; /* Operator for the combined expression */ |
146905 | 146916 | int idxNew; /* Index in pWC of the next virtual term */ |
146906 | 146917 |
|
| 146918 | + if( (pOne->wtFlags | pTwo->wtFlags) & TERM_VNULL ) return; |
146907 | 146919 | if( (pOne->eOperator & (WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE))==0 ) return; |
146908 | 146920 | if( (pTwo->eOperator & (WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE))==0 ) return; |
146909 | 146921 | if( (eOp & (WO_EQ|WO_LT|WO_LE))!=eOp |
@@ -229294,7 +229306,7 @@ static void fts5SourceIdFunc( |
229294 | 229306 | ){ |
229295 | 229307 | assert( nArg==0 ); |
229296 | 229308 | UNUSED_PARAM2(nArg, apUnused); |
229297 | | - sqlite3_result_text(pCtx, "fts5: 2021-04-02 15:20:15 5d4c65779dab868b285519b19e4cf9d451d50c6048f06f653aa701ec212df45e", -1, SQLITE_TRANSIENT); |
| 229309 | + sqlite3_result_text(pCtx, "fts5: 2021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98fae886", -1, SQLITE_TRANSIENT); |
229298 | 229310 | } |
229299 | 229311 |
|
229300 | 229312 | /* |
@@ -234220,9 +234232,9 @@ SQLITE_API int sqlite3_stmt_init( |
234220 | 234232 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ |
234221 | 234233 |
|
234222 | 234234 | /************** End of stmt.c ************************************************/ |
234223 | | -#if __LINE__!=234223 |
| 234235 | +#if __LINE__!=234235 |
234224 | 234236 | #undef SQLITE_SOURCE_ID |
234225 | | -#define SQLITE_SOURCE_ID "2021-04-02 15:20:15 5d4c65779dab868b285519b19e4cf9d451d50c6048f06f653aa701ec212dalt2" |
| 234237 | +#define SQLITE_SOURCE_ID "2021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98faalt2" |
234226 | 234238 | #endif |
234227 | 234239 | /* Return the source-id for this library */ |
234228 | 234240 | SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
|
0 commit comments