| | @@ -363,11 +363,11 @@ |
| 363 | 363 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 364 | 364 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 365 | 365 | */ |
| 366 | 366 | #define SQLITE_VERSION "3.14.0" |
| 367 | 367 | #define SQLITE_VERSION_NUMBER 3014000 |
| 368 | | -#define SQLITE_SOURCE_ID "2016-07-23 20:27:41 c8e0539b970585cbb3619461a53abb0c3b308a17" |
| 368 | +#define SQLITE_SOURCE_ID "2016-07-25 12:10:25 d6f6c87c9c0acf609a9d5bea818bb7a5437109a1" |
| 369 | 369 | |
| 370 | 370 | /* |
| 371 | 371 | ** CAPI3REF: Run-Time Library Version Numbers |
| 372 | 372 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 373 | 373 | ** |
| | @@ -3063,12 +3063,15 @@ |
| 3063 | 3063 | ** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement |
| 3064 | 3064 | ** first begins running and possibly at other times during the |
| 3065 | 3065 | ** execution of the prepared statement, such as at the start of each |
| 3066 | 3066 | ** trigger subprogram. ^The P argument is a pointer to the |
| 3067 | 3067 | ** [prepared statement]. ^The X argument is a pointer to a string which |
| 3068 | | -** is the expanded SQL text of the prepared statement or a comment that |
| 3069 | | -** indicates the invocation of a trigger. |
| 3068 | +** is the unexpanded SQL text of the prepared statement or an SQL comment |
| 3069 | +** that indicates the invocation of a trigger. ^The callback can compute |
| 3070 | +** the same text that would have been returned by the legacy [sqlite3_trace()] |
| 3071 | +** interface by using the X argument when X begins with "--" and invoking |
| 3072 | +** [sqlite3_expanded_sql(P)] otherwise. |
| 3070 | 3073 | ** |
| 3071 | 3074 | ** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt> |
| 3072 | 3075 | ** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same |
| 3073 | 3076 | ** information as is provided by the [sqlite3_profile()] callback. |
| 3074 | 3077 | ** ^The P argument is a pointer to the [prepared statement] and the |
| | @@ -16014,15 +16017,19 @@ |
| 16014 | 16017 | # define sqlite3StackAllocRaw(D,N) sqlite3DbMallocRaw(D,N) |
| 16015 | 16018 | # define sqlite3StackAllocZero(D,N) sqlite3DbMallocZero(D,N) |
| 16016 | 16019 | # define sqlite3StackFree(D,P) sqlite3DbFree(D,P) |
| 16017 | 16020 | #endif |
| 16018 | 16021 | |
| 16019 | | -#ifdef SQLITE_ENABLE_MEMSYS3 |
| 16020 | | -SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void); |
| 16021 | | -#endif |
| 16022 | +/* Do not allow both MEMSYS5 and MEMSYS3 to be defined together. If they |
| 16023 | +** are, disable MEMSYS3 |
| 16024 | +*/ |
| 16022 | 16025 | #ifdef SQLITE_ENABLE_MEMSYS5 |
| 16023 | 16026 | SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void); |
| 16027 | +#undef SQLITE_ENABLE_MEMSYS3 |
| 16028 | +#endif |
| 16029 | +#ifdef SQLITE_ENABLE_MEMSYS3 |
| 16030 | +SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void); |
| 16024 | 16031 | #endif |
| 16025 | 16032 | |
| 16026 | 16033 | |
| 16027 | 16034 | #ifndef SQLITE_MUTEX_OMIT |
| 16028 | 16035 | SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void); |
| | @@ -83838,28 +83845,38 @@ |
| 83838 | 83845 | ** |
| 83839 | 83846 | ** If P2 is not zero, jump to instruction P2. |
| 83840 | 83847 | */ |
| 83841 | 83848 | case OP_Init: { /* jump */ |
| 83842 | 83849 | char *zTrace; |
| 83843 | | - char *z; |
| 83850 | + |
| 83851 | + /* If the P4 argument is not NULL, then it must be an SQL comment string. |
| 83852 | + ** The "--" string is broken up to prevent false-positives with srcck1.c. |
| 83853 | + ** |
| 83854 | + ** This assert() provides evidence for: |
| 83855 | + ** EVIDENCE-OF: R-50676-09860 The callback can compute the same text that |
| 83856 | + ** would have been returned by the legacy sqlite3_trace() interface by |
| 83857 | + ** using the X argument when X begins with "--" and invoking |
| 83858 | + ** sqlite3_expanded_sql(P) otherwise. |
| 83859 | + */ |
| 83860 | + assert( pOp->p4.z==0 || strncmp(pOp->p4.z, "-" "- ", 3)==0 ); |
| 83844 | 83861 | |
| 83845 | 83862 | #ifndef SQLITE_OMIT_TRACE |
| 83846 | 83863 | if( (db->mTrace & (SQLITE_TRACE_STMT|SQLITE_TRACE_LEGACY))!=0 |
| 83847 | 83864 | && !p->doingRerun |
| 83848 | 83865 | && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0 |
| 83849 | 83866 | ){ |
| 83850 | | - z = sqlite3VdbeExpandSql(p, zTrace); |
| 83851 | 83867 | #ifndef SQLITE_OMIT_DEPRECATED |
| 83852 | 83868 | if( db->mTrace & SQLITE_TRACE_LEGACY ){ |
| 83853 | 83869 | void (*x)(void*,const char*) = (void(*)(void*,const char*))db->xTrace; |
| 83870 | + char *z = sqlite3VdbeExpandSql(p, zTrace); |
| 83854 | 83871 | x(db->pTraceArg, z); |
| 83872 | + sqlite3_free(z); |
| 83855 | 83873 | }else |
| 83856 | 83874 | #endif |
| 83857 | 83875 | { |
| 83858 | | - (void)db->xTrace(SQLITE_TRACE_STMT,db->pTraceArg,p,z); |
| 83876 | + (void)db->xTrace(SQLITE_TRACE_STMT, db->pTraceArg, p, zTrace); |
| 83859 | 83877 | } |
| 83860 | | - sqlite3_free(z); |
| 83861 | 83878 | } |
| 83862 | 83879 | #ifdef SQLITE_USE_FCNTL_TRACE |
| 83863 | 83880 | zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql); |
| 83864 | 83881 | if( zTrace ){ |
| 83865 | 83882 | int i; |
| | @@ -109276,11 +109293,11 @@ |
| 109276 | 109293 | |
| 109277 | 109294 | #ifdef SQLITE_OMIT_SHARED_CACHE |
| 109278 | 109295 | # define sqlite3_enable_shared_cache 0 |
| 109279 | 109296 | #endif |
| 109280 | 109297 | |
| 109281 | | -#ifdef SQLITE_OMIT_TRACE |
| 109298 | +#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED) |
| 109282 | 109299 | # define sqlite3_profile 0 |
| 109283 | 109300 | # define sqlite3_trace 0 |
| 109284 | 109301 | #endif |
| 109285 | 109302 | |
| 109286 | 109303 | #ifdef SQLITE_OMIT_GET_TABLE |
| | @@ -138119,10 +138136,11 @@ |
| 138119 | 138136 | db->pTraceArg = pArg; |
| 138120 | 138137 | sqlite3_mutex_leave(db->mutex); |
| 138121 | 138138 | return SQLITE_OK; |
| 138122 | 138139 | } |
| 138123 | 138140 | |
| 138141 | +#ifndef SQLITE_OMIT_DEPRECATED |
| 138124 | 138142 | /* |
| 138125 | 138143 | ** Register a profile function. The pArg from the previously registered |
| 138126 | 138144 | ** profile function is returned. |
| 138127 | 138145 | ** |
| 138128 | 138146 | ** A NULL profile function means that no profiling is executes. A non-NULL |
| | @@ -138147,10 +138165,11 @@ |
| 138147 | 138165 | db->xProfile = xProfile; |
| 138148 | 138166 | db->pProfileArg = pArg; |
| 138149 | 138167 | sqlite3_mutex_leave(db->mutex); |
| 138150 | 138168 | return pOld; |
| 138151 | 138169 | } |
| 138170 | +#endif /* SQLITE_OMIT_DEPRECATED */ |
| 138152 | 138171 | #endif /* SQLITE_OMIT_TRACE */ |
| 138153 | 138172 | |
| 138154 | 138173 | /* |
| 138155 | 138174 | ** Register a function to be invoked when a transaction commits. |
| 138156 | 138175 | ** If the invoked function returns non-zero, then the commit becomes a |
| | @@ -193793,11 +193812,11 @@ |
| 193793 | 193812 | int nArg, /* Number of args */ |
| 193794 | 193813 | sqlite3_value **apUnused /* Function arguments */ |
| 193795 | 193814 | ){ |
| 193796 | 193815 | assert( nArg==0 ); |
| 193797 | 193816 | UNUSED_PARAM2(nArg, apUnused); |
| 193798 | | - sqlite3_result_text(pCtx, "fts5: 2016-07-22 21:35:38 f50a3fd6606c14b82c9b938bfca284d54b6c650f", -1, SQLITE_TRANSIENT); |
| 193817 | + sqlite3_result_text(pCtx, "fts5: 2016-07-25 11:39:24 5f40e6ad599eea59a5adc3a11d6f7998872736b4", -1, SQLITE_TRANSIENT); |
| 193799 | 193818 | } |
| 193800 | 193819 | |
| 193801 | 193820 | static int fts5Init(sqlite3 *db){ |
| 193802 | 193821 | static const sqlite3_module fts5Mod = { |
| 193803 | 193822 | /* iVersion */ 2, |
| 193804 | 193823 | |