| | @@ -997,10 +997,19 @@ |
| 997 | 997 | |
| 998 | 998 | #if defined(__OpenBSD__) && !defined(_BSD_SOURCE) |
| 999 | 999 | # define _BSD_SOURCE |
| 1000 | 1000 | #endif |
| 1001 | 1001 | |
| 1002 | +/* |
| 1003 | +** Macro to disable warnings about missing "break" at the end of a "case". |
| 1004 | +*/ |
| 1005 | +#if GCC_VERSION>=7000000 |
| 1006 | +# define deliberate_fall_through __attribute__((fallthrough)); |
| 1007 | +#else |
| 1008 | +# define deliberate_fall_through |
| 1009 | +#endif |
| 1010 | + |
| 1002 | 1011 | /* |
| 1003 | 1012 | ** For MinGW, check to see if we can include the header file containing its |
| 1004 | 1013 | ** version information, among other things. Normally, this internal MinGW |
| 1005 | 1014 | ** header file would [only] be included automatically by other MinGW header |
| 1006 | 1015 | ** files; however, the contained version information is now required by this |
| | @@ -1162,11 +1171,11 @@ |
| 1162 | 1171 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 1163 | 1172 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 1164 | 1173 | */ |
| 1165 | 1174 | #define SQLITE_VERSION "3.33.0" |
| 1166 | 1175 | #define SQLITE_VERSION_NUMBER 3033000 |
| 1167 | | -#define SQLITE_SOURCE_ID "2020-08-08 00:44:45 eface2da2c0b3daee2a5fd640cca3d3757d0930f62900fc810c50c104635241d" |
| 1176 | +#define SQLITE_SOURCE_ID "2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f" |
| 1168 | 1177 | |
| 1169 | 1178 | /* |
| 1170 | 1179 | ** CAPI3REF: Run-Time Library Version Numbers |
| 1171 | 1180 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 1172 | 1181 | ** |
| | @@ -14532,11 +14541,11 @@ |
| 14532 | 14541 | # define SELECTTRACE_ENABLED 0 |
| 14533 | 14542 | #endif |
| 14534 | 14543 | #if defined(SQLITE_ENABLE_SELECTTRACE) |
| 14535 | 14544 | # define SELECTTRACE_ENABLED 1 |
| 14536 | 14545 | # define SELECTTRACE(K,P,S,X) \ |
| 14537 | | - if(sqlite3SelectTrace&(K)) \ |
| 14546 | + if(sqlite3_unsupported_selecttrace&(K)) \ |
| 14538 | 14547 | sqlite3DebugPrintf("%u/%d/%p: ",(S)->selId,(P)->addrExplain,(S)),\ |
| 14539 | 14548 | sqlite3DebugPrintf X |
| 14540 | 14549 | #else |
| 14541 | 14550 | # define SELECTTRACE(K,P,S,X) |
| 14542 | 14551 | # define SELECTTRACE_ENABLED 0 |
| | @@ -14595,11 +14604,11 @@ |
| 14595 | 14604 | ** one parameter that destructors normally want. So we have to introduce |
| 14596 | 14605 | ** this magic value that the code knows to handle differently. Any |
| 14597 | 14606 | ** pointer will work here as long as it is distinct from SQLITE_STATIC |
| 14598 | 14607 | ** and SQLITE_TRANSIENT. |
| 14599 | 14608 | */ |
| 14600 | | -#define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize) |
| 14609 | +#define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3OomFault) |
| 14601 | 14610 | |
| 14602 | 14611 | /* |
| 14603 | 14612 | ** When SQLITE_OMIT_WSD is defined, it means that the target platform does |
| 14604 | 14613 | ** not support Writable Static Data (WSD) such as global and static variables. |
| 14605 | 14614 | ** All variables must either be on the stack or dynamically allocated from |
| | @@ -16858,11 +16867,14 @@ |
| 16858 | 16867 | int nVdbeWrite; /* Number of active VDBEs that read and write */ |
| 16859 | 16868 | int nVdbeExec; /* Number of nested calls to VdbeExec() */ |
| 16860 | 16869 | int nVDestroy; /* Number of active OP_VDestroy operations */ |
| 16861 | 16870 | int nExtension; /* Number of loaded extensions */ |
| 16862 | 16871 | void **aExtension; /* Array of shared library handles */ |
| 16863 | | - int (*xTrace)(u32,void*,void*,void*); /* Trace function */ |
| 16872 | + union { |
| 16873 | + void (*xLegacy)(void*,const char*); /* Legacy trace function */ |
| 16874 | + int (*xV2)(u32,void*,void*,void*); /* V2 Trace function */ |
| 16875 | + } trace; |
| 16864 | 16876 | void *pTraceArg; /* Argument to the trace function */ |
| 16865 | 16877 | #ifndef SQLITE_OMIT_DEPRECATED |
| 16866 | 16878 | void (*xProfile)(void*,const char*,u64); /* Profiling function */ |
| 16867 | 16879 | void *pProfileArg; /* Argument to profile function */ |
| 16868 | 16880 | #endif |
| | @@ -19947,11 +19959,11 @@ |
| 19947 | 19959 | SQLITE_PRIVATE const char sqlite3StrBINARY[]; |
| 19948 | 19960 | SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[]; |
| 19949 | 19961 | SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[]; |
| 19950 | 19962 | SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config; |
| 19951 | 19963 | SQLITE_PRIVATE FuncDefHash sqlite3BuiltinFunctions; |
| 19952 | | -SQLITE_PRIVATE u32 sqlite3SelectTrace; |
| 19964 | +SQLITE_API extern u32 sqlite3_unsupported_selecttrace; |
| 19953 | 19965 | #ifndef SQLITE_OMIT_WSD |
| 19954 | 19966 | SQLITE_PRIVATE int sqlite3PendingByte; |
| 19955 | 19967 | #endif |
| 19956 | 19968 | #endif /* SQLITE_AMALGAMATION */ |
| 19957 | 19969 | #ifdef VDBE_PROFILE |
| | @@ -20664,11 +20676,11 @@ |
| 20664 | 20676 | #endif |
| 20665 | 20677 | |
| 20666 | 20678 | /* |
| 20667 | 20679 | ** Flags for select tracing and the ".selecttrace" macro of the CLI |
| 20668 | 20680 | */ |
| 20669 | | -/**/ u32 sqlite3SelectTrace = 0; |
| 20681 | +SQLITE_API u32 sqlite3_unsupported_selecttrace = 0; |
| 20670 | 20682 | |
| 20671 | 20683 | /* #include "opcodes.h" */ |
| 20672 | 20684 | /* |
| 20673 | 20685 | ** Properties of opcodes. The OPFLG_INITIALIZER macro is |
| 20674 | 20686 | ** created by mkopcodeh.awk during compilation. Data is obtained |
| | @@ -21663,11 +21675,11 @@ |
| 21663 | 21675 | ** pagers the database handle is connected to. *pHighwater is always set |
| 21664 | 21676 | ** to zero. |
| 21665 | 21677 | */ |
| 21666 | 21678 | case SQLITE_DBSTATUS_CACHE_SPILL: |
| 21667 | 21679 | op = SQLITE_DBSTATUS_CACHE_WRITE+1; |
| 21668 | | - /* Fall through into the next case */ |
| 21680 | + /* no break */ deliberate_fall_through |
| 21669 | 21681 | case SQLITE_DBSTATUS_CACHE_HIT: |
| 21670 | 21682 | case SQLITE_DBSTATUS_CACHE_MISS: |
| 21671 | 21683 | case SQLITE_DBSTATUS_CACHE_WRITE:{ |
| 21672 | 21684 | int i; |
| 21673 | 21685 | int nRet = 0; |
| | @@ -28540,15 +28552,15 @@ |
| 28540 | 28552 | assert( precision>=(-1) ); |
| 28541 | 28553 | switch( xtype ){ |
| 28542 | 28554 | case etPOINTER: |
| 28543 | 28555 | flag_long = sizeof(char*)==sizeof(i64) ? 2 : |
| 28544 | 28556 | sizeof(char*)==sizeof(long int) ? 1 : 0; |
| 28545 | | - /* Fall through into the next case */ |
| 28557 | + /* no break */ deliberate_fall_through |
| 28546 | 28558 | case etORDINAL: |
| 28547 | 28559 | case etRADIX: |
| 28548 | 28560 | cThousand = 0; |
| 28549 | | - /* Fall through into the next case */ |
| 28561 | + /* no break */ deliberate_fall_through |
| 28550 | 28562 | case etDECIMAL: |
| 28551 | 28563 | if( infop->flags & FLAG_SIGNED ){ |
| 28552 | 28564 | i64 v; |
| 28553 | 28565 | if( bArgList ){ |
| 28554 | 28566 | v = getIntArg(pArgList); |
| | @@ -54193,16 +54205,17 @@ |
| 54193 | 54205 | |
| 54194 | 54206 | /* Allocate space for both the pJournal and pSuper file descriptors. |
| 54195 | 54207 | ** If successful, open the super-journal file for reading. |
| 54196 | 54208 | */ |
| 54197 | 54209 | pSuper = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile * 2); |
| 54198 | | - pJournal = (sqlite3_file *)(((u8 *)pSuper) + pVfs->szOsFile); |
| 54199 | 54210 | if( !pSuper ){ |
| 54200 | 54211 | rc = SQLITE_NOMEM_BKPT; |
| 54212 | + pJournal = 0; |
| 54201 | 54213 | }else{ |
| 54202 | 54214 | const int flags = (SQLITE_OPEN_READONLY|SQLITE_OPEN_SUPER_JOURNAL); |
| 54203 | 54215 | rc = sqlite3OsOpen(pVfs, zSuper, pSuper, flags, 0); |
| 54216 | + pJournal = (sqlite3_file *)(((u8 *)pSuper) + pVfs->szOsFile); |
| 54204 | 54217 | } |
| 54205 | 54218 | if( rc!=SQLITE_OK ) goto delsuper_out; |
| 54206 | 54219 | |
| 54207 | 54220 | /* Load the entire super-journal file into space obtained from |
| 54208 | 54221 | ** sqlite3_malloc() and pointed to by zSuperJournal. Also obtain |
| | @@ -78537,11 +78550,11 @@ |
| 78537 | 78550 | /* NOTE: Be sure to update mkopcodeh.tcl when adding or removing |
| 78538 | 78551 | ** cases from this switch! */ |
| 78539 | 78552 | switch( pOp->opcode ){ |
| 78540 | 78553 | case OP_Transaction: { |
| 78541 | 78554 | if( pOp->p2!=0 ) p->readOnly = 0; |
| 78542 | | - /* fall thru */ |
| 78555 | + /* no break */ deliberate_fall_through |
| 78543 | 78556 | } |
| 78544 | 78557 | case OP_AutoCommit: |
| 78545 | 78558 | case OP_Savepoint: { |
| 78546 | 78559 | p->bIsReader = 1; |
| 78547 | 78560 | break; |
| | @@ -78584,10 +78597,11 @@ |
| 78584 | 78597 | assert( (pOp - p->aOp) >= 3 ); |
| 78585 | 78598 | assert( pOp[-1].opcode==OP_Integer ); |
| 78586 | 78599 | n = pOp[-1].p1; |
| 78587 | 78600 | if( n>nMaxArgs ) nMaxArgs = n; |
| 78588 | 78601 | /* Fall through into the default case */ |
| 78602 | + /* no break */ deliberate_fall_through |
| 78589 | 78603 | } |
| 78590 | 78604 | #endif |
| 78591 | 78605 | default: { |
| 78592 | 78606 | if( pOp->p2<0 ){ |
| 78593 | 78607 | /* The mkopcodeh.tcl script has so arranged things that the only |
| | @@ -83050,11 +83064,11 @@ |
| 83050 | 83064 | if( db->xProfile ){ |
| 83051 | 83065 | db->xProfile(db->pProfileArg, p->zSql, iElapse); |
| 83052 | 83066 | } |
| 83053 | 83067 | #endif |
| 83054 | 83068 | if( db->mTrace & SQLITE_TRACE_PROFILE ){ |
| 83055 | | - db->xTrace(SQLITE_TRACE_PROFILE, db->pTraceArg, p, (void*)&iElapse); |
| 83069 | + db->trace.xV2(SQLITE_TRACE_PROFILE, db->pTraceArg, p, (void*)&iElapse); |
| 83056 | 83070 | } |
| 83057 | 83071 | p->startTime = 0; |
| 83058 | 83072 | } |
| 83059 | 83073 | /* |
| 83060 | 83074 | ** The checkProfileCallback(DB,P) macro checks to see if a profile callback |
| | @@ -86350,10 +86364,11 @@ |
| 86350 | 86364 | #ifdef SQLITE_DEBUG |
| 86351 | 86365 | if( pOp->p2==OE_Abort ){ sqlite3VdbeAssertAbortable(p); } |
| 86352 | 86366 | #endif |
| 86353 | 86367 | if( (pIn3->flags & MEM_Null)==0 ) break; |
| 86354 | 86368 | /* Fall through into OP_Halt */ |
| 86369 | + /* no break */ deliberate_fall_through |
| 86355 | 86370 | } |
| 86356 | 86371 | |
| 86357 | 86372 | /* Opcode: Halt P1 P2 * P4 P5 |
| 86358 | 86373 | ** |
| 86359 | 86374 | ** Exit immediately. All open cursors, etc are closed |
| | @@ -86520,10 +86535,11 @@ |
| 86520 | 86535 | goto too_big; |
| 86521 | 86536 | } |
| 86522 | 86537 | pOp->opcode = OP_String; |
| 86523 | 86538 | assert( rc==SQLITE_OK ); |
| 86524 | 86539 | /* Fall through to the next case, OP_String */ |
| 86540 | + /* no break */ deliberate_fall_through |
| 86525 | 86541 | } |
| 86526 | 86542 | |
| 86527 | 86543 | /* Opcode: String P1 P2 P3 P4 P5 |
| 86528 | 86544 | ** Synopsis: r[P2]='P4' (len=P1) |
| 86529 | 86545 | ** |
| | @@ -86831,11 +86847,11 @@ |
| 86831 | 86847 | #endif |
| 86832 | 86848 | } |
| 86833 | 86849 | if( db->mallocFailed ) goto no_mem; |
| 86834 | 86850 | |
| 86835 | 86851 | if( db->mTrace & SQLITE_TRACE_ROW ){ |
| 86836 | | - db->xTrace(SQLITE_TRACE_ROW, db->pTraceArg, p, 0); |
| 86852 | + db->trace.xV2(SQLITE_TRACE_ROW, db->pTraceArg, p, 0); |
| 86837 | 86853 | } |
| 86838 | 86854 | |
| 86839 | 86855 | |
| 86840 | 86856 | /* Return SQLITE_ROW |
| 86841 | 86857 | */ |
| | @@ -89824,10 +89840,11 @@ |
| 89824 | 89840 | assert( pOp->p1>=0 && pOp->p1<p->nCursor ); |
| 89825 | 89841 | pC = p->apCsr[pOp->p1]; |
| 89826 | 89842 | assert( pC!=0 ); |
| 89827 | 89843 | if( pC->seekHit ) break; |
| 89828 | 89844 | /* Fall through into OP_NotFound */ |
| 89845 | + /* no break */ deliberate_fall_through |
| 89829 | 89846 | } |
| 89830 | 89847 | case OP_NoConflict: /* jump, in3 */ |
| 89831 | 89848 | case OP_NotFound: /* jump, in3 */ |
| 89832 | 89849 | case OP_Found: { /* jump, in3 */ |
| 89833 | 89850 | int alreadyExists; |
| | @@ -89978,10 +89995,11 @@ |
| 89978 | 89995 | if( (x.flags & MEM_Int)==0 ) goto jump_to_p2; |
| 89979 | 89996 | iKey = x.u.i; |
| 89980 | 89997 | goto notExistsWithKey; |
| 89981 | 89998 | } |
| 89982 | 89999 | /* Fall through into OP_NotExists */ |
| 90000 | + /* no break */ deliberate_fall_through |
| 89983 | 90001 | case OP_NotExists: /* jump, in3 */ |
| 89984 | 90002 | pIn3 = &aMem[pOp->p3]; |
| 89985 | 90003 | assert( (pIn3->flags & MEM_Int)!=0 || pOp->opcode==OP_SeekRowid ); |
| 89986 | 90004 | assert( pOp->p1>=0 && pOp->p1<p->nCursor ); |
| 89987 | 90005 | iKey = pIn3->u.i; |
| | @@ -90749,10 +90767,11 @@ |
| 90749 | 90767 | sqlite3_sort_count++; |
| 90750 | 90768 | sqlite3_search_count--; |
| 90751 | 90769 | #endif |
| 90752 | 90770 | p->aCounter[SQLITE_STMTSTATUS_SORT]++; |
| 90753 | 90771 | /* Fall through into OP_Rewind */ |
| 90772 | + /* no break */ deliberate_fall_through |
| 90754 | 90773 | } |
| 90755 | 90774 | /* Opcode: Rewind P1 P2 * * * |
| 90756 | 90775 | ** |
| 90757 | 90776 | ** The next use of the Rowid or Column or Next instruction for P1 |
| 90758 | 90777 | ** will refer to the first entry in the database table or index. |
| | @@ -92102,10 +92121,11 @@ |
| 92102 | 92121 | /* OP_AggInverse must have P1==1 and OP_AggStep must have P1==0 */ |
| 92103 | 92122 | assert( pOp->p1==(pOp->opcode==OP_AggInverse) ); |
| 92104 | 92123 | |
| 92105 | 92124 | pOp->opcode = OP_AggStep1; |
| 92106 | 92125 | /* Fall through into OP_AggStep */ |
| 92126 | + /* no break */ deliberate_fall_through |
| 92107 | 92127 | } |
| 92108 | 92128 | case OP_AggStep1: { |
| 92109 | 92129 | int i; |
| 92110 | 92130 | sqlite3_context *pCtx; |
| 92111 | 92131 | Mem *pMem; |
| | @@ -93091,22 +93111,21 @@ |
| 93091 | 93111 | && !p->doingRerun |
| 93092 | 93112 | && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0 |
| 93093 | 93113 | ){ |
| 93094 | 93114 | #ifndef SQLITE_OMIT_DEPRECATED |
| 93095 | 93115 | if( db->mTrace & SQLITE_TRACE_LEGACY ){ |
| 93096 | | - void (*x)(void*,const char*) = (void(*)(void*,const char*))db->xTrace; |
| 93097 | 93116 | char *z = sqlite3VdbeExpandSql(p, zTrace); |
| 93098 | | - x(db->pTraceArg, z); |
| 93117 | + db->trace.xLegacy(db->pTraceArg, z); |
| 93099 | 93118 | sqlite3_free(z); |
| 93100 | 93119 | }else |
| 93101 | 93120 | #endif |
| 93102 | 93121 | if( db->nVdbeExec>1 ){ |
| 93103 | 93122 | char *z = sqlite3MPrintf(db, "-- %s", zTrace); |
| 93104 | | - (void)db->xTrace(SQLITE_TRACE_STMT, db->pTraceArg, p, z); |
| 93123 | + (void)db->trace.xV2(SQLITE_TRACE_STMT, db->pTraceArg, p, z); |
| 93105 | 93124 | sqlite3DbFree(db, z); |
| 93106 | 93125 | }else{ |
| 93107 | | - (void)db->xTrace(SQLITE_TRACE_STMT, db->pTraceArg, p, zTrace); |
| 93126 | + (void)db->trace.xV2(SQLITE_TRACE_STMT, db->pTraceArg, p, zTrace); |
| 93108 | 93127 | } |
| 93109 | 93128 | } |
| 93110 | 93129 | #ifdef SQLITE_USE_FCNTL_TRACE |
| 93111 | 93130 | zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql); |
| 93112 | 93131 | if( zTrace ){ |
| | @@ -98824,11 +98843,11 @@ |
| 98824 | 98843 | pExpr->op2 = pExpr->op; |
| 98825 | 98844 | pExpr->op = TK_TRUTH; |
| 98826 | 98845 | return WRC_Continue; |
| 98827 | 98846 | } |
| 98828 | 98847 | } |
| 98829 | | - /* Fall thru */ |
| 98848 | + /* no break */ deliberate_fall_through |
| 98830 | 98849 | } |
| 98831 | 98850 | case TK_BETWEEN: |
| 98832 | 98851 | case TK_EQ: |
| 98833 | 98852 | case TK_NE: |
| 98834 | 98853 | case TK_LT: |
| | @@ -101728,11 +101747,11 @@ |
| 101728 | 101747 | /* Convert "true" or "false" in a DEFAULT clause into the |
| 101729 | 101748 | ** appropriate TK_TRUEFALSE operator */ |
| 101730 | 101749 | if( sqlite3ExprIdToTrueFalse(pExpr) ){ |
| 101731 | 101750 | return WRC_Prune; |
| 101732 | 101751 | } |
| 101733 | | - /* Fall thru */ |
| 101752 | + /* no break */ deliberate_fall_through |
| 101734 | 101753 | case TK_COLUMN: |
| 101735 | 101754 | case TK_AGG_FUNCTION: |
| 101736 | 101755 | case TK_AGG_COLUMN: |
| 101737 | 101756 | testcase( pExpr->op==TK_ID ); |
| 101738 | 101757 | testcase( pExpr->op==TK_COLUMN ); |
| | @@ -101742,11 +101761,11 @@ |
| 101742 | 101761 | return WRC_Continue; |
| 101743 | 101762 | } |
| 101744 | 101763 | if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){ |
| 101745 | 101764 | return WRC_Continue; |
| 101746 | 101765 | } |
| 101747 | | - /* Fall through */ |
| 101766 | + /* no break */ deliberate_fall_through |
| 101748 | 101767 | case TK_IF_NULL_ROW: |
| 101749 | 101768 | case TK_REGISTER: |
| 101750 | 101769 | case TK_DOT: |
| 101751 | 101770 | testcase( pExpr->op==TK_REGISTER ); |
| 101752 | 101771 | testcase( pExpr->op==TK_IF_NULL_ROW ); |
| | @@ -101763,11 +101782,11 @@ |
| 101763 | 101782 | /* A bound parameter in a CREATE statement that originates from |
| 101764 | 101783 | ** sqlite3_prepare() causes an error */ |
| 101765 | 101784 | pWalker->eCode = 0; |
| 101766 | 101785 | return WRC_Abort; |
| 101767 | 101786 | } |
| 101768 | | - /* Fall through */ |
| 101787 | + /* no break */ deliberate_fall_through |
| 101769 | 101788 | default: |
| 101770 | 101789 | testcase( pExpr->op==TK_SELECT ); /* sqlite3SelectWalkFail() disallows */ |
| 101771 | 101790 | testcase( pExpr->op==TK_EXISTS ); /* sqlite3SelectWalkFail() disallows */ |
| 101772 | 101791 | return WRC_Continue; |
| 101773 | 101792 | } |
| | @@ -103535,10 +103554,11 @@ |
| 103535 | 103554 | } |
| 103536 | 103555 | } |
| 103537 | 103556 | return target; |
| 103538 | 103557 | } |
| 103539 | 103558 | /* Otherwise, fall thru into the TK_COLUMN case */ |
| 103559 | + /* no break */ deliberate_fall_through |
| 103540 | 103560 | } |
| 103541 | 103561 | case TK_COLUMN: { |
| 103542 | 103562 | int iTab = pExpr->iTable; |
| 103543 | 103563 | int iReg; |
| 103544 | 103564 | if( ExprHasProperty(pExpr, EP_FixedCol) ){ |
| | @@ -104600,11 +104620,11 @@ |
| 104600 | 104620 | case TK_ISNOT: |
| 104601 | 104621 | testcase( op==TK_IS ); |
| 104602 | 104622 | testcase( op==TK_ISNOT ); |
| 104603 | 104623 | op = (op==TK_IS) ? TK_EQ : TK_NE; |
| 104604 | 104624 | jumpIfNull = SQLITE_NULLEQ; |
| 104605 | | - /* Fall thru */ |
| 104625 | + /* no break */ deliberate_fall_through |
| 104606 | 104626 | case TK_LT: |
| 104607 | 104627 | case TK_LE: |
| 104608 | 104628 | case TK_GT: |
| 104609 | 104629 | case TK_GE: |
| 104610 | 104630 | case TK_NE: |
| | @@ -104776,11 +104796,11 @@ |
| 104776 | 104796 | case TK_ISNOT: |
| 104777 | 104797 | testcase( pExpr->op==TK_IS ); |
| 104778 | 104798 | testcase( pExpr->op==TK_ISNOT ); |
| 104779 | 104799 | op = (pExpr->op==TK_IS) ? TK_NE : TK_EQ; |
| 104780 | 104800 | jumpIfNull = SQLITE_NULLEQ; |
| 104781 | | - /* Fall thru */ |
| 104801 | + /* no break */ deliberate_fall_through |
| 104782 | 104802 | case TK_LT: |
| 104783 | 104803 | case TK_LE: |
| 104784 | 104804 | case TK_GT: |
| 104785 | 104805 | case TK_GE: |
| 104786 | 104806 | case TK_NE: |
| | @@ -105088,17 +105108,17 @@ |
| 105088 | 105108 | case TK_BITOR: |
| 105089 | 105109 | case TK_LSHIFT: |
| 105090 | 105110 | case TK_RSHIFT: |
| 105091 | 105111 | case TK_CONCAT: |
| 105092 | 105112 | seenNot = 1; |
| 105093 | | - /* Fall thru */ |
| 105113 | + /* no break */ deliberate_fall_through |
| 105094 | 105114 | case TK_STAR: |
| 105095 | 105115 | case TK_REM: |
| 105096 | 105116 | case TK_BITAND: |
| 105097 | 105117 | case TK_SLASH: { |
| 105098 | 105118 | if( exprImpliesNotNull(pParse, p->pRight, pNN, iTab, seenNot) ) return 1; |
| 105099 | | - /* Fall thru into the next case */ |
| 105119 | + /* no break */ deliberate_fall_through |
| 105100 | 105120 | } |
| 105101 | 105121 | case TK_SPAN: |
| 105102 | 105122 | case TK_COLLATE: |
| 105103 | 105123 | case TK_UPLUS: |
| 105104 | 105124 | case TK_UMINUS: { |
| | @@ -105243,10 +105263,11 @@ |
| 105243 | 105263 | || (pRight->op==TK_COLUMN && ALWAYS(pRight->y.pTab!=0) |
| 105244 | 105264 | && IsVirtual(pRight->y.pTab)) |
| 105245 | 105265 | ){ |
| 105246 | 105266 | return WRC_Prune; |
| 105247 | 105267 | } |
| 105268 | + /* no break */ deliberate_fall_through |
| 105248 | 105269 | } |
| 105249 | 105270 | default: |
| 105250 | 105271 | return WRC_Continue; |
| 105251 | 105272 | } |
| 105252 | 105273 | } |
| | @@ -120447,10 +120468,11 @@ |
| 120447 | 120468 | case OE_Cascade: |
| 120448 | 120469 | if( !pChanges ){ |
| 120449 | 120470 | pStep->op = TK_DELETE; |
| 120450 | 120471 | break; |
| 120451 | 120472 | } |
| 120473 | + /* no break */ deliberate_fall_through |
| 120452 | 120474 | default: |
| 120453 | 120475 | pStep->op = TK_UPDATE; |
| 120454 | 120476 | } |
| 120455 | 120477 | pStep->pTrig = pTrigger; |
| 120456 | 120478 | pTrigger->pSchema = pTab->pSchema; |
| | @@ -122151,11 +122173,11 @@ |
| 122151 | 122173 | sqlite3VdbeJumpHere(v, addr1); |
| 122152 | 122174 | break; |
| 122153 | 122175 | } |
| 122154 | 122176 | case OE_Abort: |
| 122155 | 122177 | sqlite3MayAbort(pParse); |
| 122156 | | - /* Fall through */ |
| 122178 | + /* no break */ deliberate_fall_through |
| 122157 | 122179 | case OE_Rollback: |
| 122158 | 122180 | case OE_Fail: { |
| 122159 | 122181 | char *zMsg = sqlite3MPrintf(db, "%s.%s", pTab->zName, |
| 122160 | 122182 | pCol->zName); |
| 122161 | 122183 | sqlite3VdbeAddOp3(v, OP_HaltIfNull, SQLITE_CONSTRAINT_NOTNULL, |
| | @@ -122379,11 +122401,11 @@ |
| 122379 | 122401 | VdbeCoverage(v); |
| 122380 | 122402 | |
| 122381 | 122403 | switch( onError ){ |
| 122382 | 122404 | default: { |
| 122383 | 122405 | onError = OE_Abort; |
| 122384 | | - /* Fall thru into the next case */ |
| 122406 | + /* no break */ deliberate_fall_through |
| 122385 | 122407 | } |
| 122386 | 122408 | case OE_Rollback: |
| 122387 | 122409 | case OE_Abort: |
| 122388 | 122410 | case OE_Fail: { |
| 122389 | 122411 | testcase( onError==OE_Rollback ); |
| | @@ -122440,11 +122462,11 @@ |
| 122440 | 122462 | break; |
| 122441 | 122463 | } |
| 122442 | 122464 | #ifndef SQLITE_OMIT_UPSERT |
| 122443 | 122465 | case OE_Update: { |
| 122444 | 122466 | sqlite3UpsertDoUpdate(pParse, pUpsert, pTab, 0, iDataCur); |
| 122445 | | - /* Fall through */ |
| 122467 | + /* no break */ deliberate_fall_through |
| 122446 | 122468 | } |
| 122447 | 122469 | #endif |
| 122448 | 122470 | case OE_Ignore: { |
| 122449 | 122471 | testcase( onError==OE_Ignore ); |
| 122450 | 122472 | sqlite3VdbeGoto(v, ignoreDest); |
| | @@ -122661,11 +122683,11 @@ |
| 122661 | 122683 | break; |
| 122662 | 122684 | } |
| 122663 | 122685 | #ifndef SQLITE_OMIT_UPSERT |
| 122664 | 122686 | case OE_Update: { |
| 122665 | 122687 | sqlite3UpsertDoUpdate(pParse, pUpsert, pTab, pIdx, iIdxCur+ix); |
| 122666 | | - /* Fall through */ |
| 122688 | + /* no break */ deliberate_fall_through |
| 122667 | 122689 | } |
| 122668 | 122690 | #endif |
| 122669 | 122691 | case OE_Ignore: { |
| 122670 | 122692 | testcase( onError==OE_Ignore ); |
| 122671 | 122693 | sqlite3VdbeGoto(v, ignoreDest); |
| | @@ -133471,11 +133493,11 @@ |
| 133471 | 133493 | sqlite3AggInfoPersistWalkerInit(&w, pParse); |
| 133472 | 133494 | sqlite3WalkSelect(&w,pSub1); |
| 133473 | 133495 | sqlite3SelectDelete(db, pSub1); |
| 133474 | 133496 | |
| 133475 | 133497 | #if SELECTTRACE_ENABLED |
| 133476 | | - if( sqlite3SelectTrace & 0x100 ){ |
| 133498 | + if( sqlite3_unsupported_selecttrace & 0x100 ){ |
| 133477 | 133499 | SELECTTRACE(0x100,pParse,p,("After flattening:\n")); |
| 133478 | 133500 | sqlite3TreeViewSelect(0, p, 0); |
| 133479 | 133501 | } |
| 133480 | 133502 | #endif |
| 133481 | 133503 | |
| | @@ -134909,11 +134931,11 @@ |
| 134909 | 134931 | sWalker.pParse = pParse; |
| 134910 | 134932 | sWalker.xExprCallback = havingToWhereExprCb; |
| 134911 | 134933 | sWalker.u.pSelect = p; |
| 134912 | 134934 | sqlite3WalkExpr(&sWalker, p->pHaving); |
| 134913 | 134935 | #if SELECTTRACE_ENABLED |
| 134914 | | - if( sWalker.eCode && (sqlite3SelectTrace & 0x100)!=0 ){ |
| 134936 | + if( sWalker.eCode && (sqlite3_unsupported_selecttrace & 0x100)!=0 ){ |
| 134915 | 134937 | SELECTTRACE(0x100,pParse,p,("Move HAVING terms into WHERE:\n")); |
| 134916 | 134938 | sqlite3TreeViewSelect(0, p, 0); |
| 134917 | 134939 | } |
| 134918 | 134940 | #endif |
| 134919 | 134941 | } |
| | @@ -135031,11 +135053,11 @@ |
| 135031 | 135053 | } |
| 135032 | 135054 | p->pEList->a[0].pExpr = pExpr; |
| 135033 | 135055 | p->selFlags &= ~SF_Aggregate; |
| 135034 | 135056 | |
| 135035 | 135057 | #if SELECTTRACE_ENABLED |
| 135036 | | - if( sqlite3SelectTrace & 0x400 ){ |
| 135058 | + if( sqlite3_unsupported_selecttrace & 0x400 ){ |
| 135037 | 135059 | SELECTTRACE(0x400,pParse,p,("After count-of-view optimization:\n")); |
| 135038 | 135060 | sqlite3TreeViewSelect(0, p, 0); |
| 135039 | 135061 | } |
| 135040 | 135062 | #endif |
| 135041 | 135063 | return 1; |
| | @@ -135084,11 +135106,11 @@ |
| 135084 | 135106 | return 1; |
| 135085 | 135107 | } |
| 135086 | 135108 | if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1; |
| 135087 | 135109 | #if SELECTTRACE_ENABLED |
| 135088 | 135110 | SELECTTRACE(1,pParse,p, ("begin processing:\n", pParse->addrExplain)); |
| 135089 | | - if( sqlite3SelectTrace & 0x100 ){ |
| 135111 | + if( sqlite3_unsupported_selecttrace & 0x100 ){ |
| 135090 | 135112 | sqlite3TreeViewSelect(0, p, 0); |
| 135091 | 135113 | } |
| 135092 | 135114 | #endif |
| 135093 | 135115 | |
| 135094 | 135116 | assert( p->pOrderBy==0 || pDest->eDest!=SRT_DistFifo ); |
| | @@ -135111,11 +135133,11 @@ |
| 135111 | 135133 | if( pParse->nErr || db->mallocFailed ){ |
| 135112 | 135134 | goto select_end; |
| 135113 | 135135 | } |
| 135114 | 135136 | assert( p->pEList!=0 ); |
| 135115 | 135137 | #if SELECTTRACE_ENABLED |
| 135116 | | - if( sqlite3SelectTrace & 0x104 ){ |
| 135138 | + if( sqlite3_unsupported_selecttrace & 0x104 ){ |
| 135117 | 135139 | SELECTTRACE(0x104,pParse,p, ("after name resolution:\n")); |
| 135118 | 135140 | sqlite3TreeViewSelect(0, p, 0); |
| 135119 | 135141 | } |
| 135120 | 135142 | #endif |
| 135121 | 135143 | |
| | @@ -135146,11 +135168,11 @@ |
| 135146 | 135168 | if( rc ){ |
| 135147 | 135169 | assert( db->mallocFailed || pParse->nErr>0 ); |
| 135148 | 135170 | goto select_end; |
| 135149 | 135171 | } |
| 135150 | 135172 | #if SELECTTRACE_ENABLED |
| 135151 | | - if( p->pWin && (sqlite3SelectTrace & 0x108)!=0 ){ |
| 135173 | + if( p->pWin && (sqlite3_unsupported_selecttrace & 0x108)!=0 ){ |
| 135152 | 135174 | SELECTTRACE(0x104,pParse,p, ("after window rewrite:\n")); |
| 135153 | 135175 | sqlite3TreeViewSelect(0, p, 0); |
| 135154 | 135176 | } |
| 135155 | 135177 | #endif |
| 135156 | 135178 | #endif /* SQLITE_OMIT_WINDOWFUNC */ |
| | @@ -135253,11 +135275,11 @@ |
| 135253 | 135275 | */ |
| 135254 | 135276 | if( p->pPrior ){ |
| 135255 | 135277 | rc = multiSelect(pParse, p, pDest); |
| 135256 | 135278 | #if SELECTTRACE_ENABLED |
| 135257 | 135279 | SELECTTRACE(0x1,pParse,p,("end compound-select processing\n")); |
| 135258 | | - if( (sqlite3SelectTrace & 0x2000)!=0 && ExplainQueryPlanParent(pParse)==0 ){ |
| 135280 | + if( (sqlite3_unsupported_selecttrace & 0x2000)!=0 && ExplainQueryPlanParent(pParse)==0 ){ |
| 135259 | 135281 | sqlite3TreeViewSelect(0, p, 0); |
| 135260 | 135282 | } |
| 135261 | 135283 | #endif |
| 135262 | 135284 | if( p->pNext==0 ) ExplainQueryPlanPop(pParse); |
| 135263 | 135285 | return rc; |
| | @@ -135272,11 +135294,11 @@ |
| 135272 | 135294 | if( pTabList->nSrc>1 |
| 135273 | 135295 | && OptimizationEnabled(db, SQLITE_PropagateConst) |
| 135274 | 135296 | && propagateConstants(pParse, p) |
| 135275 | 135297 | ){ |
| 135276 | 135298 | #if SELECTTRACE_ENABLED |
| 135277 | | - if( sqlite3SelectTrace & 0x100 ){ |
| 135299 | + if( sqlite3_unsupported_selecttrace & 0x100 ){ |
| 135278 | 135300 | SELECTTRACE(0x100,pParse,p,("After constant propagation:\n")); |
| 135279 | 135301 | sqlite3TreeViewSelect(0, p, 0); |
| 135280 | 135302 | } |
| 135281 | 135303 | #endif |
| 135282 | 135304 | }else{ |
| | @@ -135360,11 +135382,11 @@ |
| 135360 | 135382 | if( OptimizationEnabled(db, SQLITE_PushDown) |
| 135361 | 135383 | && pushDownWhereTerms(pParse, pSub, p->pWhere, pItem->iCursor, |
| 135362 | 135384 | (pItem->fg.jointype & JT_OUTER)!=0) |
| 135363 | 135385 | ){ |
| 135364 | 135386 | #if SELECTTRACE_ENABLED |
| 135365 | | - if( sqlite3SelectTrace & 0x100 ){ |
| 135387 | + if( sqlite3_unsupported_selecttrace & 0x100 ){ |
| 135366 | 135388 | SELECTTRACE(0x100,pParse,p, |
| 135367 | 135389 | ("After WHERE-clause push-down into subquery %d:\n", pSub->selId)); |
| 135368 | 135390 | sqlite3TreeViewSelect(0, p, 0); |
| 135369 | 135391 | } |
| 135370 | 135392 | #endif |
| | @@ -135460,11 +135482,11 @@ |
| 135460 | 135482 | pGroupBy = p->pGroupBy; |
| 135461 | 135483 | pHaving = p->pHaving; |
| 135462 | 135484 | sDistinct.isTnct = (p->selFlags & SF_Distinct)!=0; |
| 135463 | 135485 | |
| 135464 | 135486 | #if SELECTTRACE_ENABLED |
| 135465 | | - if( sqlite3SelectTrace & 0x400 ){ |
| 135487 | + if( sqlite3_unsupported_selecttrace & 0x400 ){ |
| 135466 | 135488 | SELECTTRACE(0x400,pParse,p,("After all FROM-clause analysis:\n")); |
| 135467 | 135489 | sqlite3TreeViewSelect(0, p, 0); |
| 135468 | 135490 | } |
| 135469 | 135491 | #endif |
| 135470 | 135492 | |
| | @@ -135496,11 +135518,11 @@ |
| 135496 | 135518 | ** the sDistinct.isTnct is still set. Hence, isTnct represents the |
| 135497 | 135519 | ** original setting of the SF_Distinct flag, not the current setting */ |
| 135498 | 135520 | assert( sDistinct.isTnct ); |
| 135499 | 135521 | |
| 135500 | 135522 | #if SELECTTRACE_ENABLED |
| 135501 | | - if( sqlite3SelectTrace & 0x400 ){ |
| 135523 | + if( sqlite3_unsupported_selecttrace & 0x400 ){ |
| 135502 | 135524 | SELECTTRACE(0x400,pParse,p,("Transform DISTINCT into GROUP BY:\n")); |
| 135503 | 135525 | sqlite3TreeViewSelect(0, p, 0); |
| 135504 | 135526 | } |
| 135505 | 135527 | #endif |
| 135506 | 135528 | } |
| | @@ -135744,11 +135766,11 @@ |
| 135744 | 135766 | sNC.ncFlags &= ~NC_InAggFunc; |
| 135745 | 135767 | } |
| 135746 | 135768 | pAggInfo->mxReg = pParse->nMem; |
| 135747 | 135769 | if( db->mallocFailed ) goto select_end; |
| 135748 | 135770 | #if SELECTTRACE_ENABLED |
| 135749 | | - if( sqlite3SelectTrace & 0x400 ){ |
| 135771 | + if( sqlite3_unsupported_selecttrace & 0x400 ){ |
| 135750 | 135772 | int ii; |
| 135751 | 135773 | SELECTTRACE(0x400,pParse,p,("After aggregate analysis %p:\n", pAggInfo)); |
| 135752 | 135774 | sqlite3TreeViewSelect(0, p, 0); |
| 135753 | 135775 | for(ii=0; ii<pAggInfo->nColumn; ii++){ |
| 135754 | 135776 | sqlite3DebugPrintf("agg-column[%d] iMem=%d\n", |
| | @@ -136163,11 +136185,11 @@ |
| 136163 | 136185 | } |
| 136164 | 136186 | #endif |
| 136165 | 136187 | |
| 136166 | 136188 | #if SELECTTRACE_ENABLED |
| 136167 | 136189 | SELECTTRACE(0x1,pParse,p,("end processing\n")); |
| 136168 | | - if( (sqlite3SelectTrace & 0x2000)!=0 && ExplainQueryPlanParent(pParse)==0 ){ |
| 136190 | + if( (sqlite3_unsupported_selecttrace & 0x2000)!=0 && ExplainQueryPlanParent(pParse)==0 ){ |
| 136169 | 136191 | sqlite3TreeViewSelect(0, p, 0); |
| 136170 | 136192 | } |
| 136171 | 136193 | #endif |
| 136172 | 136194 | ExplainQueryPlanPop(pParse); |
| 136173 | 136195 | return rc; |
| | @@ -151934,11 +151956,11 @@ |
| 151934 | 151956 | assert( pWin->pOwner==pExpr ); |
| 151935 | 151957 | return WRC_Prune; |
| 151936 | 151958 | } |
| 151937 | 151959 | } |
| 151938 | 151960 | } |
| 151939 | | - /* Fall through. */ |
| 151961 | + /* no break */ deliberate_fall_through |
| 151940 | 151962 | |
| 151941 | 151963 | case TK_AGG_FUNCTION: |
| 151942 | 151964 | case TK_COLUMN: { |
| 151943 | 151965 | int iCol = -1; |
| 151944 | 151966 | if( p->pSub ){ |
| | @@ -160151,10 +160173,11 @@ |
| 160151 | 160173 | *tokenType = TK_DOT; |
| 160152 | 160174 | return 1; |
| 160153 | 160175 | } |
| 160154 | 160176 | /* If the next character is a digit, this is a floating point |
| 160155 | 160177 | ** number that begins with ".". Fall thru into the next case */ |
| 160178 | + /* no break */ deliberate_fall_through |
| 160156 | 160179 | } |
| 160157 | 160180 | case CC_DIGIT: { |
| 160158 | 160181 | testcase( z[0]=='0' ); testcase( z[0]=='1' ); testcase( z[0]=='2' ); |
| 160159 | 160182 | testcase( z[0]=='3' ); testcase( z[0]=='4' ); testcase( z[0]=='5' ); |
| 160160 | 160183 | testcase( z[0]=='6' ); testcase( z[0]=='7' ); testcase( z[0]=='8' ); |
| | @@ -160255,10 +160278,11 @@ |
| 160255 | 160278 | return i; |
| 160256 | 160279 | } |
| 160257 | 160280 | #endif |
| 160258 | 160281 | /* If it is not a BLOB literal, then it must be an ID, since no |
| 160259 | 160282 | ** SQL keywords start with the letter 'x'. Fall through */ |
| 160283 | + /* no break */ deliberate_fall_through |
| 160260 | 160284 | } |
| 160261 | 160285 | case CC_ID: { |
| 160262 | 160286 | i = 1; |
| 160263 | 160287 | break; |
| 160264 | 160288 | } |
| | @@ -162185,11 +162209,11 @@ |
| 162185 | 162209 | if( !sqlite3SafetyCheckSickOrOk(db) ){ |
| 162186 | 162210 | return SQLITE_MISUSE_BKPT; |
| 162187 | 162211 | } |
| 162188 | 162212 | sqlite3_mutex_enter(db->mutex); |
| 162189 | 162213 | if( db->mTrace & SQLITE_TRACE_CLOSE ){ |
| 162190 | | - db->xTrace(SQLITE_TRACE_CLOSE, db->pTraceArg, db, 0); |
| 162214 | + db->trace.xV2(SQLITE_TRACE_CLOSE, db->pTraceArg, db, 0); |
| 162191 | 162215 | } |
| 162192 | 162216 | |
| 162193 | 162217 | /* Force xDisconnect calls on all virtual tables */ |
| 162194 | 162218 | disconnectAllVtab(db); |
| 162195 | 162219 | |
| | @@ -163074,11 +163098,11 @@ |
| 163074 | 163098 | } |
| 163075 | 163099 | #endif |
| 163076 | 163100 | sqlite3_mutex_enter(db->mutex); |
| 163077 | 163101 | pOld = db->pTraceArg; |
| 163078 | 163102 | db->mTrace = xTrace ? SQLITE_TRACE_LEGACY : 0; |
| 163079 | | - db->xTrace = (int(*)(u32,void*,void*,void*))xTrace; |
| 163103 | + db->trace.xLegacy = xTrace; |
| 163080 | 163104 | db->pTraceArg = pArg; |
| 163081 | 163105 | sqlite3_mutex_leave(db->mutex); |
| 163082 | 163106 | return pOld; |
| 163083 | 163107 | } |
| 163084 | 163108 | #endif /* SQLITE_OMIT_DEPRECATED */ |
| | @@ -163098,11 +163122,11 @@ |
| 163098 | 163122 | #endif |
| 163099 | 163123 | sqlite3_mutex_enter(db->mutex); |
| 163100 | 163124 | if( mTrace==0 ) xTrace = 0; |
| 163101 | 163125 | if( xTrace==0 ) mTrace = 0; |
| 163102 | 163126 | db->mTrace = mTrace; |
| 163103 | | - db->xTrace = xTrace; |
| 163127 | + db->trace.xV2 = xTrace; |
| 163104 | 163128 | db->pTraceArg = pArg; |
| 163105 | 163129 | sqlite3_mutex_leave(db->mutex); |
| 163106 | 163130 | return SQLITE_OK; |
| 163107 | 163131 | } |
| 163108 | 163132 | |
| | @@ -166694,10 +166718,12 @@ |
| 166694 | 166718 | # define TESTONLY(X) |
| 166695 | 166719 | #endif |
| 166696 | 166720 | |
| 166697 | 166721 | #define LARGEST_INT64 (0xffffffff|(((i64)0x7fffffff)<<32)) |
| 166698 | 166722 | #define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64) |
| 166723 | + |
| 166724 | +#define deliberate_fall_through |
| 166699 | 166725 | |
| 166700 | 166726 | #endif /* SQLITE_AMALGAMATION */ |
| 166701 | 166727 | |
| 166702 | 166728 | #ifdef SQLITE_DEBUG |
| 166703 | 166729 | SQLITE_PRIVATE int sqlite3Fts3Corrupt(void); |
| | @@ -170337,11 +170363,11 @@ |
| 170337 | 170363 | }else if( p->zLanguageid==0 ){ |
| 170338 | 170364 | sqlite3_result_int(pCtx, 0); |
| 170339 | 170365 | break; |
| 170340 | 170366 | }else{ |
| 170341 | 170367 | iCol = p->nColumn; |
| 170342 | | - /* fall-through */ |
| 170368 | + /* no break */ deliberate_fall_through |
| 170343 | 170369 | } |
| 170344 | 170370 | |
| 170345 | 170371 | default: |
| 170346 | 170372 | /* A user column. Or, if this is a full-table scan, possibly the |
| 170347 | 170373 | ** language-id column. Seek the cursor. */ |
| | @@ -170580,13 +170606,17 @@ |
| 170580 | 170606 | } |
| 170581 | 170607 | if( fts3FunctionArg(pContext, "snippet", apVal[0], &pCsr) ) return; |
| 170582 | 170608 | |
| 170583 | 170609 | switch( nVal ){ |
| 170584 | 170610 | case 6: nToken = sqlite3_value_int(apVal[5]); |
| 170611 | + /* no break */ deliberate_fall_through |
| 170585 | 170612 | case 5: iCol = sqlite3_value_int(apVal[4]); |
| 170613 | + /* no break */ deliberate_fall_through |
| 170586 | 170614 | case 4: zEllipsis = (const char*)sqlite3_value_text(apVal[3]); |
| 170615 | + /* no break */ deliberate_fall_through |
| 170587 | 170616 | case 3: zEnd = (const char*)sqlite3_value_text(apVal[2]); |
| 170617 | + /* no break */ deliberate_fall_through |
| 170588 | 170618 | case 2: zStart = (const char*)sqlite3_value_text(apVal[1]); |
| 170589 | 170619 | } |
| 170590 | 170620 | if( !zEllipsis || !zEnd || !zStart ){ |
| 170591 | 170621 | sqlite3_result_error_nomem(pContext); |
| 170592 | 170622 | }else if( nToken==0 ){ |
| | @@ -185444,10 +185474,14 @@ |
| 185444 | 185474 | #ifndef LARGEST_INT64 |
| 185445 | 185475 | # define LARGEST_INT64 (0xffffffff|(((sqlite3_int64)0x7fffffff)<<32)) |
| 185446 | 185476 | # define SMALLEST_INT64 (((sqlite3_int64)-1) - LARGEST_INT64) |
| 185447 | 185477 | #endif |
| 185448 | 185478 | |
| 185479 | +#ifndef deliberate_fall_through |
| 185480 | +# define deliberate_fall_through |
| 185481 | +#endif |
| 185482 | + |
| 185449 | 185483 | /* |
| 185450 | 185484 | ** Versions of isspace(), isalnum() and isdigit() to which it is safe |
| 185451 | 185485 | ** to pass signed char values. |
| 185452 | 185486 | */ |
| 185453 | 185487 | #ifdef sqlite3Isdigit |
| | @@ -185862,11 +185896,11 @@ |
| 185862 | 185896 | case JSON_STRING: { |
| 185863 | 185897 | if( pNode->jnFlags & JNODE_RAW ){ |
| 185864 | 185898 | jsonAppendString(pOut, pNode->u.zJContent, pNode->n); |
| 185865 | 185899 | break; |
| 185866 | 185900 | } |
| 185867 | | - /* Fall through into the next case */ |
| 185901 | + /* no break */ deliberate_fall_through |
| 185868 | 185902 | } |
| 185869 | 185903 | case JSON_REAL: |
| 185870 | 185904 | case JSON_INT: { |
| 185871 | 185905 | jsonAppendRaw(pOut, pNode->u.zJContent, pNode->n); |
| 185872 | 185906 | break; |
| | @@ -186003,11 +186037,11 @@ |
| 186003 | 186037 | } |
| 186004 | 186038 | if( pNode->u.zJContent[0]=='-' ){ i = -i; } |
| 186005 | 186039 | sqlite3_result_int64(pCtx, i); |
| 186006 | 186040 | int_done: |
| 186007 | 186041 | break; |
| 186008 | | - int_as_real: /* fall through to real */; |
| 186042 | + int_as_real: i=0; /* no break */ deliberate_fall_through |
| 186009 | 186043 | } |
| 186010 | 186044 | case JSON_REAL: { |
| 186011 | 186045 | double r; |
| 186012 | 186046 | #ifdef SQLITE_AMALGAMATION |
| 186013 | 186047 | const char *z = pNode->u.zJContent; |
| | @@ -187706,10 +187740,11 @@ |
| 187706 | 187740 | jsonResult(&x); |
| 187707 | 187741 | break; |
| 187708 | 187742 | } |
| 187709 | 187743 | /* For json_each() path and root are the same so fall through |
| 187710 | 187744 | ** into the root case */ |
| 187745 | + /* no break */ deliberate_fall_through |
| 187711 | 187746 | } |
| 187712 | 187747 | default: { |
| 187713 | 187748 | const char *zRoot = p->zRoot; |
| 187714 | 187749 | if( zRoot==0 ) zRoot = "$"; |
| 187715 | 187750 | sqlite3_result_text(ctx, zRoot, -1, SQLITE_STATIC); |
| | @@ -225692,11 +225727,11 @@ |
| 225692 | 225727 | int nArg, /* Number of args */ |
| 225693 | 225728 | sqlite3_value **apUnused /* Function arguments */ |
| 225694 | 225729 | ){ |
| 225695 | 225730 | assert( nArg==0 ); |
| 225696 | 225731 | UNUSED_PARAM2(nArg, apUnused); |
| 225697 | | - sqlite3_result_text(pCtx, "fts5: 2020-08-07 19:52:01 fdc5fb902d7f2d10f73e64fe30c67153b59b26c5d707fc9c354e90967dbcc214", -1, SQLITE_TRANSIENT); |
| 225732 | + sqlite3_result_text(pCtx, "fts5: 2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff76a4f", -1, SQLITE_TRANSIENT); |
| 225698 | 225733 | } |
| 225699 | 225734 | |
| 225700 | 225735 | /* |
| 225701 | 225736 | ** Return true if zName is the extension on one of the shadow tables used |
| 225702 | 225737 | ** by this module. |
| | @@ -230475,12 +230510,12 @@ |
| 230475 | 230510 | } |
| 230476 | 230511 | #endif /* SQLITE_CORE */ |
| 230477 | 230512 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ |
| 230478 | 230513 | |
| 230479 | 230514 | /************** End of stmt.c ************************************************/ |
| 230480 | | -#if __LINE__!=230480 |
| 230515 | +#if __LINE__!=230515 |
| 230481 | 230516 | #undef SQLITE_SOURCE_ID |
| 230482 | | -#define SQLITE_SOURCE_ID "2020-08-08 00:44:45 eface2da2c0b3daee2a5fd640cca3d3757d0930f62900fc810c50c104635alt2" |
| 230517 | +#define SQLITE_SOURCE_ID "2020-08-10 19:35:01 680bdc6524ad6af0e74401e96e3a576145042fb865c1582bfaffc11d4ff7alt2" |
| 230483 | 230518 | #endif |
| 230484 | 230519 | /* Return the source-id for this library */ |
| 230485 | 230520 | SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 230486 | 230521 | /************************** End of sqlite3.c ******************************/ |
| 230487 | 230522 | |