Fossil SCM

Update the built-in SQLite to use the latest sqlite3_trace_v2() interface changes.

drh 2016-07-25 12:25 trunk
Commit f0d84833388b1191bec67bb1edc8a30908137462
+9 -3
--- src/db.c
+++ src/db.c
@@ -1808,14 +1808,20 @@
18081808
char c = i==argc-1 ? '\n' : ' ';
18091809
fossil_print("%s%c", sqlite3_value_text(argv[i]), c);
18101810
}
18111811
}
18121812
}
1813
-LOCAL int db_sql_trace(unsigned m, void *notUsed, void *pNotUsed2, void *pX){
1814
- const char *zSql = (const char*)pX;
1815
- int n = strlen(zSql);
1813
+LOCAL int db_sql_trace(unsigned m, void *notUsed, void *pP, void *pX){
1814
+ sqlite3_stmt *pStmt = (sqlite3_stmt*)pP;
1815
+ char *zSql;
1816
+ int n;
1817
+ const char *zArg = (const char*)pX;
1818
+ if( zArg[0]=='-' ) return 0;
1819
+ zSql = sqlite3_expanded_sql(pStmt);
1820
+ n = (int)strlen(zSql);
18161821
fossil_trace("%s%s\n", zSql, (n>0 && zSql[n-1]==';') ? "" : ";");
1822
+ sqlite3_free(zSql);
18171823
return 0;
18181824
}
18191825
18201826
/*
18211827
** Implement the user() SQL function. user() takes no arguments and
18221828
--- src/db.c
+++ src/db.c
@@ -1808,14 +1808,20 @@
1808 char c = i==argc-1 ? '\n' : ' ';
1809 fossil_print("%s%c", sqlite3_value_text(argv[i]), c);
1810 }
1811 }
1812 }
1813 LOCAL int db_sql_trace(unsigned m, void *notUsed, void *pNotUsed2, void *pX){
1814 const char *zSql = (const char*)pX;
1815 int n = strlen(zSql);
 
 
 
 
 
1816 fossil_trace("%s%s\n", zSql, (n>0 && zSql[n-1]==';') ? "" : ";");
 
1817 return 0;
1818 }
1819
1820 /*
1821 ** Implement the user() SQL function. user() takes no arguments and
1822
--- src/db.c
+++ src/db.c
@@ -1808,14 +1808,20 @@
1808 char c = i==argc-1 ? '\n' : ' ';
1809 fossil_print("%s%c", sqlite3_value_text(argv[i]), c);
1810 }
1811 }
1812 }
1813 LOCAL int db_sql_trace(unsigned m, void *notUsed, void *pP, void *pX){
1814 sqlite3_stmt *pStmt = (sqlite3_stmt*)pP;
1815 char *zSql;
1816 int n;
1817 const char *zArg = (const char*)pX;
1818 if( zArg[0]=='-' ) return 0;
1819 zSql = sqlite3_expanded_sql(pStmt);
1820 n = (int)strlen(zSql);
1821 fossil_trace("%s%s\n", zSql, (n>0 && zSql[n-1]==';') ? "" : ";");
1822 sqlite3_free(zSql);
1823 return 0;
1824 }
1825
1826 /*
1827 ** Implement the user() SQL function. user() takes no arguments and
1828
--- src/shell.c
+++ src/shell.c
@@ -5322,10 +5322,12 @@
53225322
53235323
zSize = cmdline_option_value(argc, argv, ++i);
53245324
szHeap = integerValue(zSize);
53255325
if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000;
53265326
sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64);
5327
+#else
5328
+ (void)cmdline_option_value(argc, argv, ++i);
53275329
#endif
53285330
}else if( strcmp(z,"-scratch")==0 ){
53295331
int n, sz;
53305332
sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
53315333
if( sz>400000 ) sz = 400000;
53325334
--- src/shell.c
+++ src/shell.c
@@ -5322,10 +5322,12 @@
5322
5323 zSize = cmdline_option_value(argc, argv, ++i);
5324 szHeap = integerValue(zSize);
5325 if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000;
5326 sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64);
 
 
5327 #endif
5328 }else if( strcmp(z,"-scratch")==0 ){
5329 int n, sz;
5330 sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
5331 if( sz>400000 ) sz = 400000;
5332
--- src/shell.c
+++ src/shell.c
@@ -5322,10 +5322,12 @@
5322
5323 zSize = cmdline_option_value(argc, argv, ++i);
5324 szHeap = integerValue(zSize);
5325 if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000;
5326 sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64);
5327 #else
5328 (void)cmdline_option_value(argc, argv, ++i);
5329 #endif
5330 }else if( strcmp(z,"-scratch")==0 ){
5331 int n, sz;
5332 sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
5333 if( sz>400000 ) sz = 400000;
5334
+31 -12
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -363,11 +363,11 @@
363363
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
364364
** [sqlite_version()] and [sqlite_source_id()].
365365
*/
366366
#define SQLITE_VERSION "3.14.0"
367367
#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"
369369
370370
/*
371371
** CAPI3REF: Run-Time Library Version Numbers
372372
** KEYWORDS: sqlite3_version, sqlite3_sourceid
373373
**
@@ -3063,12 +3063,15 @@
30633063
** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement
30643064
** first begins running and possibly at other times during the
30653065
** execution of the prepared statement, such as at the start of each
30663066
** trigger subprogram. ^The P argument is a pointer to the
30673067
** [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.
30703073
**
30713074
** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt>
30723075
** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same
30733076
** information as is provided by the [sqlite3_profile()] callback.
30743077
** ^The P argument is a pointer to the [prepared statement] and the
@@ -16014,15 +16017,19 @@
1601416017
# define sqlite3StackAllocRaw(D,N) sqlite3DbMallocRaw(D,N)
1601516018
# define sqlite3StackAllocZero(D,N) sqlite3DbMallocZero(D,N)
1601616019
# define sqlite3StackFree(D,P) sqlite3DbFree(D,P)
1601716020
#endif
1601816021
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
+*/
1602216025
#ifdef SQLITE_ENABLE_MEMSYS5
1602316026
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);
1602416031
#endif
1602516032
1602616033
1602716034
#ifndef SQLITE_MUTEX_OMIT
1602816035
SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void);
@@ -83838,28 +83845,38 @@
8383883845
**
8383983846
** If P2 is not zero, jump to instruction P2.
8384083847
*/
8384183848
case OP_Init: { /* jump */
8384283849
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 );
8384483861
8384583862
#ifndef SQLITE_OMIT_TRACE
8384683863
if( (db->mTrace & (SQLITE_TRACE_STMT|SQLITE_TRACE_LEGACY))!=0
8384783864
&& !p->doingRerun
8384883865
&& (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0
8384983866
){
83850
- z = sqlite3VdbeExpandSql(p, zTrace);
8385183867
#ifndef SQLITE_OMIT_DEPRECATED
8385283868
if( db->mTrace & SQLITE_TRACE_LEGACY ){
8385383869
void (*x)(void*,const char*) = (void(*)(void*,const char*))db->xTrace;
83870
+ char *z = sqlite3VdbeExpandSql(p, zTrace);
8385483871
x(db->pTraceArg, z);
83872
+ sqlite3_free(z);
8385583873
}else
8385683874
#endif
8385783875
{
83858
- (void)db->xTrace(SQLITE_TRACE_STMT,db->pTraceArg,p,z);
83876
+ (void)db->xTrace(SQLITE_TRACE_STMT, db->pTraceArg, p, zTrace);
8385983877
}
83860
- sqlite3_free(z);
8386183878
}
8386283879
#ifdef SQLITE_USE_FCNTL_TRACE
8386383880
zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql);
8386483881
if( zTrace ){
8386583882
int i;
@@ -109276,11 +109293,11 @@
109276109293
109277109294
#ifdef SQLITE_OMIT_SHARED_CACHE
109278109295
# define sqlite3_enable_shared_cache 0
109279109296
#endif
109280109297
109281
-#ifdef SQLITE_OMIT_TRACE
109298
+#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED)
109282109299
# define sqlite3_profile 0
109283109300
# define sqlite3_trace 0
109284109301
#endif
109285109302
109286109303
#ifdef SQLITE_OMIT_GET_TABLE
@@ -138119,10 +138136,11 @@
138119138136
db->pTraceArg = pArg;
138120138137
sqlite3_mutex_leave(db->mutex);
138121138138
return SQLITE_OK;
138122138139
}
138123138140
138141
+#ifndef SQLITE_OMIT_DEPRECATED
138124138142
/*
138125138143
** Register a profile function. The pArg from the previously registered
138126138144
** profile function is returned.
138127138145
**
138128138146
** A NULL profile function means that no profiling is executes. A non-NULL
@@ -138147,10 +138165,11 @@
138147138165
db->xProfile = xProfile;
138148138166
db->pProfileArg = pArg;
138149138167
sqlite3_mutex_leave(db->mutex);
138150138168
return pOld;
138151138169
}
138170
+#endif /* SQLITE_OMIT_DEPRECATED */
138152138171
#endif /* SQLITE_OMIT_TRACE */
138153138172
138154138173
/*
138155138174
** Register a function to be invoked when a transaction commits.
138156138175
** If the invoked function returns non-zero, then the commit becomes a
@@ -193793,11 +193812,11 @@
193793193812
int nArg, /* Number of args */
193794193813
sqlite3_value **apUnused /* Function arguments */
193795193814
){
193796193815
assert( nArg==0 );
193797193816
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);
193799193818
}
193800193819
193801193820
static int fts5Init(sqlite3 *db){
193802193821
static const sqlite3_module fts5Mod = {
193803193822
/* iVersion */ 2,
193804193823
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -363,11 +363,11 @@
363 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
364 ** [sqlite_version()] and [sqlite_source_id()].
365 */
366 #define SQLITE_VERSION "3.14.0"
367 #define SQLITE_VERSION_NUMBER 3014000
368 #define SQLITE_SOURCE_ID "2016-07-23 20:27:41 c8e0539b970585cbb3619461a53abb0c3b308a17"
369
370 /*
371 ** CAPI3REF: Run-Time Library Version Numbers
372 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
373 **
@@ -3063,12 +3063,15 @@
3063 ** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement
3064 ** first begins running and possibly at other times during the
3065 ** execution of the prepared statement, such as at the start of each
3066 ** trigger subprogram. ^The P argument is a pointer to the
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.
 
 
 
3070 **
3071 ** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt>
3072 ** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same
3073 ** information as is provided by the [sqlite3_profile()] callback.
3074 ** ^The P argument is a pointer to the [prepared statement] and the
@@ -16014,15 +16017,19 @@
16014 # define sqlite3StackAllocRaw(D,N) sqlite3DbMallocRaw(D,N)
16015 # define sqlite3StackAllocZero(D,N) sqlite3DbMallocZero(D,N)
16016 # define sqlite3StackFree(D,P) sqlite3DbFree(D,P)
16017 #endif
16018
16019 #ifdef SQLITE_ENABLE_MEMSYS3
16020 SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void);
16021 #endif
16022 #ifdef SQLITE_ENABLE_MEMSYS5
16023 SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void);
 
 
 
 
16024 #endif
16025
16026
16027 #ifndef SQLITE_MUTEX_OMIT
16028 SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void);
@@ -83838,28 +83845,38 @@
83838 **
83839 ** If P2 is not zero, jump to instruction P2.
83840 */
83841 case OP_Init: { /* jump */
83842 char *zTrace;
83843 char *z;
 
 
 
 
 
 
 
 
 
 
83844
83845 #ifndef SQLITE_OMIT_TRACE
83846 if( (db->mTrace & (SQLITE_TRACE_STMT|SQLITE_TRACE_LEGACY))!=0
83847 && !p->doingRerun
83848 && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0
83849 ){
83850 z = sqlite3VdbeExpandSql(p, zTrace);
83851 #ifndef SQLITE_OMIT_DEPRECATED
83852 if( db->mTrace & SQLITE_TRACE_LEGACY ){
83853 void (*x)(void*,const char*) = (void(*)(void*,const char*))db->xTrace;
 
83854 x(db->pTraceArg, z);
 
83855 }else
83856 #endif
83857 {
83858 (void)db->xTrace(SQLITE_TRACE_STMT,db->pTraceArg,p,z);
83859 }
83860 sqlite3_free(z);
83861 }
83862 #ifdef SQLITE_USE_FCNTL_TRACE
83863 zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql);
83864 if( zTrace ){
83865 int i;
@@ -109276,11 +109293,11 @@
109276
109277 #ifdef SQLITE_OMIT_SHARED_CACHE
109278 # define sqlite3_enable_shared_cache 0
109279 #endif
109280
109281 #ifdef SQLITE_OMIT_TRACE
109282 # define sqlite3_profile 0
109283 # define sqlite3_trace 0
109284 #endif
109285
109286 #ifdef SQLITE_OMIT_GET_TABLE
@@ -138119,10 +138136,11 @@
138119 db->pTraceArg = pArg;
138120 sqlite3_mutex_leave(db->mutex);
138121 return SQLITE_OK;
138122 }
138123
 
138124 /*
138125 ** Register a profile function. The pArg from the previously registered
138126 ** profile function is returned.
138127 **
138128 ** A NULL profile function means that no profiling is executes. A non-NULL
@@ -138147,10 +138165,11 @@
138147 db->xProfile = xProfile;
138148 db->pProfileArg = pArg;
138149 sqlite3_mutex_leave(db->mutex);
138150 return pOld;
138151 }
 
138152 #endif /* SQLITE_OMIT_TRACE */
138153
138154 /*
138155 ** Register a function to be invoked when a transaction commits.
138156 ** If the invoked function returns non-zero, then the commit becomes a
@@ -193793,11 +193812,11 @@
193793 int nArg, /* Number of args */
193794 sqlite3_value **apUnused /* Function arguments */
193795 ){
193796 assert( nArg==0 );
193797 UNUSED_PARAM2(nArg, apUnused);
193798 sqlite3_result_text(pCtx, "fts5: 2016-07-22 21:35:38 f50a3fd6606c14b82c9b938bfca284d54b6c650f", -1, SQLITE_TRANSIENT);
193799 }
193800
193801 static int fts5Init(sqlite3 *db){
193802 static const sqlite3_module fts5Mod = {
193803 /* iVersion */ 2,
193804
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -363,11 +363,11 @@
363 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
364 ** [sqlite_version()] and [sqlite_source_id()].
365 */
366 #define SQLITE_VERSION "3.14.0"
367 #define SQLITE_VERSION_NUMBER 3014000
368 #define SQLITE_SOURCE_ID "2016-07-25 12:10:25 d6f6c87c9c0acf609a9d5bea818bb7a5437109a1"
369
370 /*
371 ** CAPI3REF: Run-Time Library Version Numbers
372 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
373 **
@@ -3063,12 +3063,15 @@
3063 ** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement
3064 ** first begins running and possibly at other times during the
3065 ** execution of the prepared statement, such as at the start of each
3066 ** trigger subprogram. ^The P argument is a pointer to the
3067 ** [prepared statement]. ^The X argument is a pointer to a string which
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.
3073 **
3074 ** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt>
3075 ** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same
3076 ** information as is provided by the [sqlite3_profile()] callback.
3077 ** ^The P argument is a pointer to the [prepared statement] and the
@@ -16014,15 +16017,19 @@
16017 # define sqlite3StackAllocRaw(D,N) sqlite3DbMallocRaw(D,N)
16018 # define sqlite3StackAllocZero(D,N) sqlite3DbMallocZero(D,N)
16019 # define sqlite3StackFree(D,P) sqlite3DbFree(D,P)
16020 #endif
16021
16022 /* Do not allow both MEMSYS5 and MEMSYS3 to be defined together. If they
16023 ** are, disable MEMSYS3
16024 */
16025 #ifdef SQLITE_ENABLE_MEMSYS5
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);
16031 #endif
16032
16033
16034 #ifndef SQLITE_MUTEX_OMIT
16035 SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void);
@@ -83838,28 +83845,38 @@
83845 **
83846 ** If P2 is not zero, jump to instruction P2.
83847 */
83848 case OP_Init: { /* jump */
83849 char *zTrace;
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 );
83861
83862 #ifndef SQLITE_OMIT_TRACE
83863 if( (db->mTrace & (SQLITE_TRACE_STMT|SQLITE_TRACE_LEGACY))!=0
83864 && !p->doingRerun
83865 && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0
83866 ){
 
83867 #ifndef SQLITE_OMIT_DEPRECATED
83868 if( db->mTrace & SQLITE_TRACE_LEGACY ){
83869 void (*x)(void*,const char*) = (void(*)(void*,const char*))db->xTrace;
83870 char *z = sqlite3VdbeExpandSql(p, zTrace);
83871 x(db->pTraceArg, z);
83872 sqlite3_free(z);
83873 }else
83874 #endif
83875 {
83876 (void)db->xTrace(SQLITE_TRACE_STMT, db->pTraceArg, p, zTrace);
83877 }
 
83878 }
83879 #ifdef SQLITE_USE_FCNTL_TRACE
83880 zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql);
83881 if( zTrace ){
83882 int i;
@@ -109276,11 +109293,11 @@
109293
109294 #ifdef SQLITE_OMIT_SHARED_CACHE
109295 # define sqlite3_enable_shared_cache 0
109296 #endif
109297
109298 #if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED)
109299 # define sqlite3_profile 0
109300 # define sqlite3_trace 0
109301 #endif
109302
109303 #ifdef SQLITE_OMIT_GET_TABLE
@@ -138119,10 +138136,11 @@
138136 db->pTraceArg = pArg;
138137 sqlite3_mutex_leave(db->mutex);
138138 return SQLITE_OK;
138139 }
138140
138141 #ifndef SQLITE_OMIT_DEPRECATED
138142 /*
138143 ** Register a profile function. The pArg from the previously registered
138144 ** profile function is returned.
138145 **
138146 ** A NULL profile function means that no profiling is executes. A non-NULL
@@ -138147,10 +138165,11 @@
138165 db->xProfile = xProfile;
138166 db->pProfileArg = pArg;
138167 sqlite3_mutex_leave(db->mutex);
138168 return pOld;
138169 }
138170 #endif /* SQLITE_OMIT_DEPRECATED */
138171 #endif /* SQLITE_OMIT_TRACE */
138172
138173 /*
138174 ** Register a function to be invoked when a transaction commits.
138175 ** If the invoked function returns non-zero, then the commit becomes a
@@ -193793,11 +193812,11 @@
193812 int nArg, /* Number of args */
193813 sqlite3_value **apUnused /* Function arguments */
193814 ){
193815 assert( nArg==0 );
193816 UNUSED_PARAM2(nArg, apUnused);
193817 sqlite3_result_text(pCtx, "fts5: 2016-07-25 11:39:24 5f40e6ad599eea59a5adc3a11d6f7998872736b4", -1, SQLITE_TRANSIENT);
193818 }
193819
193820 static int fts5Init(sqlite3 *db){
193821 static const sqlite3_module fts5Mod = {
193822 /* iVersion */ 2,
193823
+6 -3
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111111
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112112
** [sqlite_version()] and [sqlite_source_id()].
113113
*/
114114
#define SQLITE_VERSION "3.14.0"
115115
#define SQLITE_VERSION_NUMBER 3014000
116
-#define SQLITE_SOURCE_ID "2016-07-23 20:27:41 c8e0539b970585cbb3619461a53abb0c3b308a17"
116
+#define SQLITE_SOURCE_ID "2016-07-25 12:10:25 d6f6c87c9c0acf609a9d5bea818bb7a5437109a1"
117117
118118
/*
119119
** CAPI3REF: Run-Time Library Version Numbers
120120
** KEYWORDS: sqlite3_version, sqlite3_sourceid
121121
**
@@ -2811,12 +2811,15 @@
28112811
** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement
28122812
** first begins running and possibly at other times during the
28132813
** execution of the prepared statement, such as at the start of each
28142814
** trigger subprogram. ^The P argument is a pointer to the
28152815
** [prepared statement]. ^The X argument is a pointer to a string which
2816
-** is the expanded SQL text of the prepared statement or a comment that
2817
-** indicates the invocation of a trigger.
2816
+** is the unexpanded SQL text of the prepared statement or an SQL comment
2817
+** that indicates the invocation of a trigger. ^The callback can compute
2818
+** the same text that would have been returned by the legacy [sqlite3_trace()]
2819
+** interface by using the X argument when X begins with "--" and invoking
2820
+** [sqlite3_expanded_sql(P)] otherwise.
28182821
**
28192822
** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt>
28202823
** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same
28212824
** information as is provided by the [sqlite3_profile()] callback.
28222825
** ^The P argument is a pointer to the [prepared statement] and the
28232826
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112 ** [sqlite_version()] and [sqlite_source_id()].
113 */
114 #define SQLITE_VERSION "3.14.0"
115 #define SQLITE_VERSION_NUMBER 3014000
116 #define SQLITE_SOURCE_ID "2016-07-23 20:27:41 c8e0539b970585cbb3619461a53abb0c3b308a17"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
@@ -2811,12 +2811,15 @@
2811 ** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement
2812 ** first begins running and possibly at other times during the
2813 ** execution of the prepared statement, such as at the start of each
2814 ** trigger subprogram. ^The P argument is a pointer to the
2815 ** [prepared statement]. ^The X argument is a pointer to a string which
2816 ** is the expanded SQL text of the prepared statement or a comment that
2817 ** indicates the invocation of a trigger.
 
 
 
2818 **
2819 ** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt>
2820 ** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same
2821 ** information as is provided by the [sqlite3_profile()] callback.
2822 ** ^The P argument is a pointer to the [prepared statement] and the
2823
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112 ** [sqlite_version()] and [sqlite_source_id()].
113 */
114 #define SQLITE_VERSION "3.14.0"
115 #define SQLITE_VERSION_NUMBER 3014000
116 #define SQLITE_SOURCE_ID "2016-07-25 12:10:25 d6f6c87c9c0acf609a9d5bea818bb7a5437109a1"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
@@ -2811,12 +2811,15 @@
2811 ** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement
2812 ** first begins running and possibly at other times during the
2813 ** execution of the prepared statement, such as at the start of each
2814 ** trigger subprogram. ^The P argument is a pointer to the
2815 ** [prepared statement]. ^The X argument is a pointer to a string which
2816 ** is the unexpanded SQL text of the prepared statement or an SQL comment
2817 ** that indicates the invocation of a trigger. ^The callback can compute
2818 ** the same text that would have been returned by the legacy [sqlite3_trace()]
2819 ** interface by using the X argument when X begins with "--" and invoking
2820 ** [sqlite3_expanded_sql(P)] otherwise.
2821 **
2822 ** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt>
2823 ** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same
2824 ** information as is provided by the [sqlite3_profile()] callback.
2825 ** ^The P argument is a pointer to the [prepared statement] and the
2826

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button