Fossil SCM

Update the build-in SQLite to the lastest 3.7.7 release candidate.

drh 2011-06-23 17:48 UTC trunk
Commit 4722e1ab770c0381e3dd429640886b608df2ea95
2 files changed +134 -72 +3 -2
+134 -72
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -650,11 +650,11 @@
650650
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
651651
** [sqlite_version()] and [sqlite_source_id()].
652652
*/
653653
#define SQLITE_VERSION "3.7.7"
654654
#define SQLITE_VERSION_NUMBER 3007007
655
-#define SQLITE_SOURCE_ID "2011-06-20 23:51:33 e60eefc76fa5066720d76858f6cfca56365330ee"
655
+#define SQLITE_SOURCE_ID "2011-06-23 17:29:33 b61a76a53af04f731fe7617f7b6b4fb2aef6587b"
656656
657657
/*
658658
** CAPI3REF: Run-Time Library Version Numbers
659659
** KEYWORDS: sqlite3_version, sqlite3_sourceid
660660
**
@@ -6119,11 +6119,12 @@
61196119
#define SQLITE_TESTCTRL_RESERVE 14
61206120
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
61216121
#define SQLITE_TESTCTRL_ISKEYWORD 16
61226122
#define SQLITE_TESTCTRL_PGHDRSZ 17
61236123
#define SQLITE_TESTCTRL_SCRATCHMALLOC 18
6124
-#define SQLITE_TESTCTRL_LAST 18
6124
+#define SQLITE_TESTCTRL_LOCALTIME_FAULT 19
6125
+#define SQLITE_TESTCTRL_LAST 19
61256126
61266127
/*
61276128
** CAPI3REF: SQLite Runtime Status
61286129
**
61296130
** ^This interface is used to retrieve runtime status information
@@ -9556,10 +9557,11 @@
95569557
#define SQLITE_IndexSort 0x04 /* Disable indexes for sorting */
95579558
#define SQLITE_IndexSearch 0x08 /* Disable indexes for searching */
95589559
#define SQLITE_IndexCover 0x10 /* Disable index covering table */
95599560
#define SQLITE_GroupByOrder 0x20 /* Disable GROUPBY cover of ORDERBY */
95609561
#define SQLITE_FactorOutConst 0x40 /* Disable factoring out constants */
9562
+#define SQLITE_IdxRealAsInt 0x80 /* Store REAL as INT in indices */
95619563
#define SQLITE_OptMask 0xff /* Mask of all disablable opts */
95629564
95639565
/*
95649566
** Possible values for the sqlite.magic field.
95659567
** The numbers are obtained at random and have no special meaning, other
@@ -11053,10 +11055,11 @@
1105311055
int isPCacheInit; /* True after malloc is initialized */
1105411056
sqlite3_mutex *pInitMutex; /* Mutex used by sqlite3_initialize() */
1105511057
int nRefInitMutex; /* Number of users of pInitMutex */
1105611058
void (*xLog)(void*,int,const char*); /* Function for logging */
1105711059
void *pLogArg; /* First argument to xLog() */
11060
+ int bLocaltimeFault; /* True to fail localtime() calls */
1105811061
};
1105911062
1106011063
/*
1106111064
** Context pointer passed down through the tree-walk.
1106211065
*/
@@ -12013,10 +12016,11 @@
1201312016
0, /* isPCacheInit */
1201412017
0, /* pInitMutex */
1201512018
0, /* nRefInitMutex */
1201612019
0, /* xLog */
1201712020
0, /* pLogArg */
12021
+ 0, /* bLocaltimeFault */
1201812022
};
1201912023
1202012024
1202112025
/*
1202212026
** Hash table for global functions - functions common to all
@@ -13163,26 +13167,10 @@
1316313167
*/
1316413168
#include <time.h>
1316513169
1316613170
#ifndef SQLITE_OMIT_DATETIME_FUNCS
1316713171
13168
-/*
13169
-** On recent Windows platforms, the localtime_s() function is available
13170
-** as part of the "Secure CRT". It is essentially equivalent to
13171
-** localtime_r() available under most POSIX platforms, except that the
13172
-** order of the parameters is reversed.
13173
-**
13174
-** See http://msdn.microsoft.com/en-us/library/a442x3ye(VS.80).aspx.
13175
-**
13176
-** If the user has not indicated to use localtime_r() or localtime_s()
13177
-** already, check for an MSVC build environment that provides
13178
-** localtime_s().
13179
-*/
13180
-#if !defined(HAVE_LOCALTIME_R) && !defined(HAVE_LOCALTIME_S) && \
13181
- defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
13182
-#define HAVE_LOCALTIME_S 1
13183
-#endif
1318413172
1318513173
/*
1318613174
** A structure for holding a single date and time.
1318713175
*/
1318813176
typedef struct DateTime DateTime;
@@ -13523,20 +13511,88 @@
1352313511
static void clearYMD_HMS_TZ(DateTime *p){
1352413512
p->validYMD = 0;
1352513513
p->validHMS = 0;
1352613514
p->validTZ = 0;
1352713515
}
13516
+
13517
+/*
13518
+** On recent Windows platforms, the localtime_s() function is available
13519
+** as part of the "Secure CRT". It is essentially equivalent to
13520
+** localtime_r() available under most POSIX platforms, except that the
13521
+** order of the parameters is reversed.
13522
+**
13523
+** See http://msdn.microsoft.com/en-us/library/a442x3ye(VS.80).aspx.
13524
+**
13525
+** If the user has not indicated to use localtime_r() or localtime_s()
13526
+** already, check for an MSVC build environment that provides
13527
+** localtime_s().
13528
+*/
13529
+#if !defined(HAVE_LOCALTIME_R) && !defined(HAVE_LOCALTIME_S) && \
13530
+ defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
13531
+#define HAVE_LOCALTIME_S 1
13532
+#endif
13533
+
13534
+#ifndef SQLITE_OMIT_LOCALTIME
13535
+/*
13536
+** The following routine implements the rough equivalent of localtime_r()
13537
+** using whatever operating-system specific localtime facility that
13538
+** is available. This routine returns 0 on success and
13539
+** non-zero on any kind of error.
13540
+**
13541
+** If the sqlite3GlobalConfig.bLocaltimeFault variable is true then this
13542
+** routine will always fail.
13543
+*/
13544
+static int osLocaltime(time_t *t, struct tm *pTm){
13545
+ int rc;
13546
+#if (!defined(HAVE_LOCALTIME_R) || !HAVE_LOCALTIME_R) \
13547
+ && (!defined(HAVE_LOCALTIME_S) || !HAVE_LOCALTIME_S)
13548
+ struct tm *pX;
13549
+ sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
13550
+ sqlite3_mutex_enter(mutex);
13551
+ pX = localtime(t);
13552
+#ifndef SQLITE_OMIT_BUILTIN_TEST
13553
+ if( sqlite3GlobalConfig.bLocaltimeFault ) pX = 0;
13554
+#endif
13555
+ if( pX ) *pTm = *pX;
13556
+ sqlite3_mutex_leave(mutex);
13557
+ rc = pX==0;
13558
+#else
13559
+#ifndef SQLITE_OMIT_BUILTIN_TEST
13560
+ if( sqlite3GlobalConfig.bLocaltimeFault ) return 1;
13561
+#endif
13562
+#if defined(HAVE_LOCALTIME_R) && HAVE_LOCALTIME_R
13563
+ rc = localtime_r(t, pTm)==0;
13564
+#else
13565
+ rc = localtime_s(pTm, t);
13566
+#endif /* HAVE_LOCALTIME_R */
13567
+#endif /* HAVE_LOCALTIME_R || HAVE_LOCALTIME_S */
13568
+ return rc;
13569
+}
13570
+#endif /* SQLITE_OMIT_LOCALTIME */
13571
+
1352813572
1352913573
#ifndef SQLITE_OMIT_LOCALTIME
1353013574
/*
13531
-** Compute the difference (in milliseconds)
13532
-** between localtime and UTC (a.k.a. GMT)
13533
-** for the time value p where p is in UTC.
13575
+** Compute the difference (in milliseconds) between localtime and UTC
13576
+** (a.k.a. GMT) for the time value p where p is in UTC. If no error occurs,
13577
+** return this value and set *pRc to SQLITE_OK.
13578
+**
13579
+** Or, if an error does occur, set *pRc to SQLITE_ERROR. The returned value
13580
+** is undefined in this case.
1353413581
*/
13535
-static sqlite3_int64 localtimeOffset(DateTime *p){
13582
+static sqlite3_int64 localtimeOffset(
13583
+ DateTime *p, /* Date at which to calculate offset */
13584
+ sqlite3_context *pCtx, /* Write error here if one occurs */
13585
+ int *pRc /* OUT: Error code. SQLITE_OK or ERROR */
13586
+){
1353613587
DateTime x, y;
1353713588
time_t t;
13589
+ struct tm sLocal;
13590
+
13591
+ /* Initialize the contents of sLocal to avoid a compiler warning. */
13592
+ memset(&sLocal, 0, sizeof(sLocal));
13593
+
1353813594
x = *p;
1353913595
computeYMD_HMS(&x);
1354013596
if( x.Y<1971 || x.Y>=2038 ){
1354113597
x.Y = 2000;
1354213598
x.M = 1;
@@ -13550,51 +13606,27 @@
1355013606
}
1355113607
x.tz = 0;
1355213608
x.validJD = 0;
1355313609
computeJD(&x);
1355413610
t = (time_t)(x.iJD/1000 - 21086676*(i64)10000);
13555
-#ifdef HAVE_LOCALTIME_R
13556
- {
13557
- struct tm sLocal;
13558
- localtime_r(&t, &sLocal);
13559
- y.Y = sLocal.tm_year + 1900;
13560
- y.M = sLocal.tm_mon + 1;
13561
- y.D = sLocal.tm_mday;
13562
- y.h = sLocal.tm_hour;
13563
- y.m = sLocal.tm_min;
13564
- y.s = sLocal.tm_sec;
13565
- }
13566
-#elif defined(HAVE_LOCALTIME_S) && HAVE_LOCALTIME_S
13567
- {
13568
- struct tm sLocal;
13569
- localtime_s(&sLocal, &t);
13570
- y.Y = sLocal.tm_year + 1900;
13571
- y.M = sLocal.tm_mon + 1;
13572
- y.D = sLocal.tm_mday;
13573
- y.h = sLocal.tm_hour;
13574
- y.m = sLocal.tm_min;
13575
- y.s = sLocal.tm_sec;
13576
- }
13577
-#else
13578
- {
13579
- struct tm *pTm;
13580
- sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
13581
- pTm = localtime(&t);
13582
- y.Y = pTm->tm_year + 1900;
13583
- y.M = pTm->tm_mon + 1;
13584
- y.D = pTm->tm_mday;
13585
- y.h = pTm->tm_hour;
13586
- y.m = pTm->tm_min;
13587
- y.s = pTm->tm_sec;
13588
- sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
13589
- }
13590
-#endif
13611
+ if( osLocaltime(&t, &sLocal) ){
13612
+ sqlite3_result_error(pCtx, "local time unavailable", -1);
13613
+ *pRc = SQLITE_ERROR;
13614
+ return 0;
13615
+ }
13616
+ y.Y = sLocal.tm_year + 1900;
13617
+ y.M = sLocal.tm_mon + 1;
13618
+ y.D = sLocal.tm_mday;
13619
+ y.h = sLocal.tm_hour;
13620
+ y.m = sLocal.tm_min;
13621
+ y.s = sLocal.tm_sec;
1359113622
y.validYMD = 1;
1359213623
y.validHMS = 1;
1359313624
y.validJD = 0;
1359413625
y.validTZ = 0;
1359513626
computeJD(&y);
13627
+ *pRc = SQLITE_OK;
1359613628
return y.iJD - x.iJD;
1359713629
}
1359813630
#endif /* SQLITE_OMIT_LOCALTIME */
1359913631
1360013632
/*
@@ -13614,13 +13646,16 @@
1361413646
** weekday N
1361513647
** unixepoch
1361613648
** localtime
1361713649
** utc
1361813650
**
13619
-** Return 0 on success and 1 if there is any kind of error.
13651
+** Return 0 on success and 1 if there is any kind of error. If the error
13652
+** is in a system call (i.e. localtime()), then an error message is written
13653
+** to context pCtx. If the error is an unrecognized modifier, no error is
13654
+** written to pCtx.
1362013655
*/
13621
-static int parseModifier(const char *zMod, DateTime *p){
13656
+static int parseModifier(sqlite3_context *pCtx, const char *zMod, DateTime *p){
1362213657
int rc = 1;
1362313658
int n;
1362413659
double r;
1362513660
char *z, zBuf[30];
1362613661
z = zBuf;
@@ -13636,13 +13671,12 @@
1363613671
** Assuming the current time value is UTC (a.k.a. GMT), shift it to
1363713672
** show local time.
1363813673
*/
1363913674
if( strcmp(z, "localtime")==0 ){
1364013675
computeJD(p);
13641
- p->iJD += localtimeOffset(p);
13676
+ p->iJD += localtimeOffset(p, pCtx, &rc);
1364213677
clearYMD_HMS_TZ(p);
13643
- rc = 0;
1364413678
}
1364513679
break;
1364613680
}
1364713681
#endif
1364813682
case 'u': {
@@ -13659,15 +13693,16 @@
1365913693
}
1366013694
#ifndef SQLITE_OMIT_LOCALTIME
1366113695
else if( strcmp(z, "utc")==0 ){
1366213696
sqlite3_int64 c1;
1366313697
computeJD(p);
13664
- c1 = localtimeOffset(p);
13665
- p->iJD -= c1;
13666
- clearYMD_HMS_TZ(p);
13667
- p->iJD += c1 - localtimeOffset(p);
13668
- rc = 0;
13698
+ c1 = localtimeOffset(p, pCtx, &rc);
13699
+ if( rc==SQLITE_OK ){
13700
+ p->iJD -= c1;
13701
+ clearYMD_HMS_TZ(p);
13702
+ p->iJD += c1 - localtimeOffset(p, pCtx, &rc);
13703
+ }
1366913704
}
1367013705
#endif
1367113706
break;
1367213707
}
1367313708
case 'w': {
@@ -13844,13 +13879,12 @@
1384413879
if( !z || parseDateOrTime(context, (char*)z, p) ){
1384513880
return 1;
1384613881
}
1384713882
}
1384813883
for(i=1; i<argc; i++){
13849
- if( (z = sqlite3_value_text(argv[i]))==0 || parseModifier((char*)z, p) ){
13850
- return 1;
13851
- }
13884
+ z = sqlite3_value_text(argv[i]);
13885
+ if( z==0 || parseModifier(context, (char*)z, p) ) return 1;
1385213886
}
1385313887
return 0;
1385413888
}
1385513889
1385613890
@@ -61212,10 +61246,18 @@
6121261246
rc = db->errCode = p->rc;
6121361247
}
6121461248
return (rc&db->errMask);
6121561249
}
6121661250
61251
+/*
61252
+** The maximum number of times that a statement will try to reparse
61253
+** itself before giving up and returning SQLITE_SCHEMA.
61254
+*/
61255
+#ifndef SQLITE_MAX_SCHEMA_RETRY
61256
+# define SQLITE_MAX_SCHEMA_RETRY 5
61257
+#endif
61258
+
6121761259
/*
6121861260
** This is the top-level implementation of sqlite3_step(). Call
6121961261
** sqlite3Step() to do most of the work. If a schema error occurs,
6122061262
** call sqlite3Reprepare() and try again.
6122161263
*/
@@ -61230,11 +61272,11 @@
6123061272
return SQLITE_MISUSE_BKPT;
6123161273
}
6123261274
db = v->db;
6123361275
sqlite3_mutex_enter(db->mutex);
6123461276
while( (rc = sqlite3Step(v))==SQLITE_SCHEMA
61235
- && cnt++ < 5
61277
+ && cnt++ < SQLITE_MAX_SCHEMA_RETRY
6123661278
&& (rc2 = rc = sqlite3Reprepare(v))==SQLITE_OK ){
6123761279
sqlite3_reset(pStmt);
6123861280
v->expired = 0;
6123961281
}
6124061282
if( rc2!=SQLITE_OK && ALWAYS(v->isPrepareV2) && ALWAYS(db->pErr) ){
@@ -82142,12 +82184,18 @@
8214282184
sqlite3VdbeAddOp3(v, OP_Column, iCur, idx, regBase+j);
8214382185
sqlite3ColumnDefault(v, pTab, idx, -1);
8214482186
}
8214582187
}
8214682188
if( doMakeRec ){
82189
+ const char *zAff;
82190
+ if( pTab->pSelect || (pParse->db->flags & SQLITE_IdxRealAsInt)!=0 ){
82191
+ zAff = 0;
82192
+ }else{
82193
+ zAff = sqlite3IndexAffinityStr(v, pIdx);
82194
+ }
8214782195
sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol+1, regOut);
82148
- sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v, pIdx), P4_TRANSIENT);
82196
+ sqlite3VdbeChangeP4(v, -1, zAff, P4_TRANSIENT);
8214982197
}
8215082198
sqlite3ReleaseTempRange(pParse, regBase, nCol+1);
8215182199
return regBase;
8215282200
}
8215382201
@@ -110770,10 +110818,21 @@
110770110818
if( sz ) *ppNew = sqlite3ScratchMalloc(sz);
110771110819
sqlite3ScratchFree(pFree);
110772110820
break;
110773110821
}
110774110822
110823
+ /* sqlite3_test_control(SQLITE_TESTCTRL_LOCALTIME_FAULT, int onoff);
110824
+ **
110825
+ ** If parameter onoff is non-zero, configure the wrappers so that all
110826
+ ** subsequent calls to localtime() and variants fail. If onoff is zero,
110827
+ ** undo this setting.
110828
+ */
110829
+ case SQLITE_TESTCTRL_LOCALTIME_FAULT: {
110830
+ sqlite3GlobalConfig.bLocaltimeFault = va_arg(ap, int);
110831
+ break;
110832
+ }
110833
+
110775110834
}
110776110835
va_end(ap);
110777110836
#endif /* SQLITE_OMIT_BUILTIN_TEST */
110778110837
return rc;
110779110838
}
@@ -112562,10 +112621,13 @@
112562112621
rc = sqlite3_prepare(p->db, zSql, -1, &pStmt, 0);
112563112622
if( rc==SQLITE_OK ){
112564112623
sqlite3_step(pStmt);
112565112624
p->nPgsz = sqlite3_column_int(pStmt, 0);
112566112625
rc = sqlite3_finalize(pStmt);
112626
+ }else if( rc==SQLITE_AUTH ){
112627
+ p->nPgsz = 1024;
112628
+ rc = SQLITE_OK;
112567112629
}
112568112630
}
112569112631
assert( p->nPgsz>0 || rc!=SQLITE_OK );
112570112632
sqlite3_free(zSql);
112571112633
*pRc = rc;
112572112634
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -650,11 +650,11 @@
650 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
651 ** [sqlite_version()] and [sqlite_source_id()].
652 */
653 #define SQLITE_VERSION "3.7.7"
654 #define SQLITE_VERSION_NUMBER 3007007
655 #define SQLITE_SOURCE_ID "2011-06-20 23:51:33 e60eefc76fa5066720d76858f6cfca56365330ee"
656
657 /*
658 ** CAPI3REF: Run-Time Library Version Numbers
659 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
660 **
@@ -6119,11 +6119,12 @@
6119 #define SQLITE_TESTCTRL_RESERVE 14
6120 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
6121 #define SQLITE_TESTCTRL_ISKEYWORD 16
6122 #define SQLITE_TESTCTRL_PGHDRSZ 17
6123 #define SQLITE_TESTCTRL_SCRATCHMALLOC 18
6124 #define SQLITE_TESTCTRL_LAST 18
 
6125
6126 /*
6127 ** CAPI3REF: SQLite Runtime Status
6128 **
6129 ** ^This interface is used to retrieve runtime status information
@@ -9556,10 +9557,11 @@
9556 #define SQLITE_IndexSort 0x04 /* Disable indexes for sorting */
9557 #define SQLITE_IndexSearch 0x08 /* Disable indexes for searching */
9558 #define SQLITE_IndexCover 0x10 /* Disable index covering table */
9559 #define SQLITE_GroupByOrder 0x20 /* Disable GROUPBY cover of ORDERBY */
9560 #define SQLITE_FactorOutConst 0x40 /* Disable factoring out constants */
 
9561 #define SQLITE_OptMask 0xff /* Mask of all disablable opts */
9562
9563 /*
9564 ** Possible values for the sqlite.magic field.
9565 ** The numbers are obtained at random and have no special meaning, other
@@ -11053,10 +11055,11 @@
11053 int isPCacheInit; /* True after malloc is initialized */
11054 sqlite3_mutex *pInitMutex; /* Mutex used by sqlite3_initialize() */
11055 int nRefInitMutex; /* Number of users of pInitMutex */
11056 void (*xLog)(void*,int,const char*); /* Function for logging */
11057 void *pLogArg; /* First argument to xLog() */
 
11058 };
11059
11060 /*
11061 ** Context pointer passed down through the tree-walk.
11062 */
@@ -12013,10 +12016,11 @@
12013 0, /* isPCacheInit */
12014 0, /* pInitMutex */
12015 0, /* nRefInitMutex */
12016 0, /* xLog */
12017 0, /* pLogArg */
 
12018 };
12019
12020
12021 /*
12022 ** Hash table for global functions - functions common to all
@@ -13163,26 +13167,10 @@
13163 */
13164 #include <time.h>
13165
13166 #ifndef SQLITE_OMIT_DATETIME_FUNCS
13167
13168 /*
13169 ** On recent Windows platforms, the localtime_s() function is available
13170 ** as part of the "Secure CRT". It is essentially equivalent to
13171 ** localtime_r() available under most POSIX platforms, except that the
13172 ** order of the parameters is reversed.
13173 **
13174 ** See http://msdn.microsoft.com/en-us/library/a442x3ye(VS.80).aspx.
13175 **
13176 ** If the user has not indicated to use localtime_r() or localtime_s()
13177 ** already, check for an MSVC build environment that provides
13178 ** localtime_s().
13179 */
13180 #if !defined(HAVE_LOCALTIME_R) && !defined(HAVE_LOCALTIME_S) && \
13181 defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
13182 #define HAVE_LOCALTIME_S 1
13183 #endif
13184
13185 /*
13186 ** A structure for holding a single date and time.
13187 */
13188 typedef struct DateTime DateTime;
@@ -13523,20 +13511,88 @@
13523 static void clearYMD_HMS_TZ(DateTime *p){
13524 p->validYMD = 0;
13525 p->validHMS = 0;
13526 p->validTZ = 0;
13527 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13528
13529 #ifndef SQLITE_OMIT_LOCALTIME
13530 /*
13531 ** Compute the difference (in milliseconds)
13532 ** between localtime and UTC (a.k.a. GMT)
13533 ** for the time value p where p is in UTC.
 
 
 
13534 */
13535 static sqlite3_int64 localtimeOffset(DateTime *p){
 
 
 
 
13536 DateTime x, y;
13537 time_t t;
 
 
 
 
 
13538 x = *p;
13539 computeYMD_HMS(&x);
13540 if( x.Y<1971 || x.Y>=2038 ){
13541 x.Y = 2000;
13542 x.M = 1;
@@ -13550,51 +13606,27 @@
13550 }
13551 x.tz = 0;
13552 x.validJD = 0;
13553 computeJD(&x);
13554 t = (time_t)(x.iJD/1000 - 21086676*(i64)10000);
13555 #ifdef HAVE_LOCALTIME_R
13556 {
13557 struct tm sLocal;
13558 localtime_r(&t, &sLocal);
13559 y.Y = sLocal.tm_year + 1900;
13560 y.M = sLocal.tm_mon + 1;
13561 y.D = sLocal.tm_mday;
13562 y.h = sLocal.tm_hour;
13563 y.m = sLocal.tm_min;
13564 y.s = sLocal.tm_sec;
13565 }
13566 #elif defined(HAVE_LOCALTIME_S) && HAVE_LOCALTIME_S
13567 {
13568 struct tm sLocal;
13569 localtime_s(&sLocal, &t);
13570 y.Y = sLocal.tm_year + 1900;
13571 y.M = sLocal.tm_mon + 1;
13572 y.D = sLocal.tm_mday;
13573 y.h = sLocal.tm_hour;
13574 y.m = sLocal.tm_min;
13575 y.s = sLocal.tm_sec;
13576 }
13577 #else
13578 {
13579 struct tm *pTm;
13580 sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
13581 pTm = localtime(&t);
13582 y.Y = pTm->tm_year + 1900;
13583 y.M = pTm->tm_mon + 1;
13584 y.D = pTm->tm_mday;
13585 y.h = pTm->tm_hour;
13586 y.m = pTm->tm_min;
13587 y.s = pTm->tm_sec;
13588 sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
13589 }
13590 #endif
13591 y.validYMD = 1;
13592 y.validHMS = 1;
13593 y.validJD = 0;
13594 y.validTZ = 0;
13595 computeJD(&y);
 
13596 return y.iJD - x.iJD;
13597 }
13598 #endif /* SQLITE_OMIT_LOCALTIME */
13599
13600 /*
@@ -13614,13 +13646,16 @@
13614 ** weekday N
13615 ** unixepoch
13616 ** localtime
13617 ** utc
13618 **
13619 ** Return 0 on success and 1 if there is any kind of error.
 
 
 
13620 */
13621 static int parseModifier(const char *zMod, DateTime *p){
13622 int rc = 1;
13623 int n;
13624 double r;
13625 char *z, zBuf[30];
13626 z = zBuf;
@@ -13636,13 +13671,12 @@
13636 ** Assuming the current time value is UTC (a.k.a. GMT), shift it to
13637 ** show local time.
13638 */
13639 if( strcmp(z, "localtime")==0 ){
13640 computeJD(p);
13641 p->iJD += localtimeOffset(p);
13642 clearYMD_HMS_TZ(p);
13643 rc = 0;
13644 }
13645 break;
13646 }
13647 #endif
13648 case 'u': {
@@ -13659,15 +13693,16 @@
13659 }
13660 #ifndef SQLITE_OMIT_LOCALTIME
13661 else if( strcmp(z, "utc")==0 ){
13662 sqlite3_int64 c1;
13663 computeJD(p);
13664 c1 = localtimeOffset(p);
13665 p->iJD -= c1;
13666 clearYMD_HMS_TZ(p);
13667 p->iJD += c1 - localtimeOffset(p);
13668 rc = 0;
 
13669 }
13670 #endif
13671 break;
13672 }
13673 case 'w': {
@@ -13844,13 +13879,12 @@
13844 if( !z || parseDateOrTime(context, (char*)z, p) ){
13845 return 1;
13846 }
13847 }
13848 for(i=1; i<argc; i++){
13849 if( (z = sqlite3_value_text(argv[i]))==0 || parseModifier((char*)z, p) ){
13850 return 1;
13851 }
13852 }
13853 return 0;
13854 }
13855
13856
@@ -61212,10 +61246,18 @@
61212 rc = db->errCode = p->rc;
61213 }
61214 return (rc&db->errMask);
61215 }
61216
 
 
 
 
 
 
 
 
61217 /*
61218 ** This is the top-level implementation of sqlite3_step(). Call
61219 ** sqlite3Step() to do most of the work. If a schema error occurs,
61220 ** call sqlite3Reprepare() and try again.
61221 */
@@ -61230,11 +61272,11 @@
61230 return SQLITE_MISUSE_BKPT;
61231 }
61232 db = v->db;
61233 sqlite3_mutex_enter(db->mutex);
61234 while( (rc = sqlite3Step(v))==SQLITE_SCHEMA
61235 && cnt++ < 5
61236 && (rc2 = rc = sqlite3Reprepare(v))==SQLITE_OK ){
61237 sqlite3_reset(pStmt);
61238 v->expired = 0;
61239 }
61240 if( rc2!=SQLITE_OK && ALWAYS(v->isPrepareV2) && ALWAYS(db->pErr) ){
@@ -82142,12 +82184,18 @@
82142 sqlite3VdbeAddOp3(v, OP_Column, iCur, idx, regBase+j);
82143 sqlite3ColumnDefault(v, pTab, idx, -1);
82144 }
82145 }
82146 if( doMakeRec ){
 
 
 
 
 
 
82147 sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol+1, regOut);
82148 sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v, pIdx), P4_TRANSIENT);
82149 }
82150 sqlite3ReleaseTempRange(pParse, regBase, nCol+1);
82151 return regBase;
82152 }
82153
@@ -110770,10 +110818,21 @@
110770 if( sz ) *ppNew = sqlite3ScratchMalloc(sz);
110771 sqlite3ScratchFree(pFree);
110772 break;
110773 }
110774
 
 
 
 
 
 
 
 
 
 
 
110775 }
110776 va_end(ap);
110777 #endif /* SQLITE_OMIT_BUILTIN_TEST */
110778 return rc;
110779 }
@@ -112562,10 +112621,13 @@
112562 rc = sqlite3_prepare(p->db, zSql, -1, &pStmt, 0);
112563 if( rc==SQLITE_OK ){
112564 sqlite3_step(pStmt);
112565 p->nPgsz = sqlite3_column_int(pStmt, 0);
112566 rc = sqlite3_finalize(pStmt);
 
 
 
112567 }
112568 }
112569 assert( p->nPgsz>0 || rc!=SQLITE_OK );
112570 sqlite3_free(zSql);
112571 *pRc = rc;
112572
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -650,11 +650,11 @@
650 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
651 ** [sqlite_version()] and [sqlite_source_id()].
652 */
653 #define SQLITE_VERSION "3.7.7"
654 #define SQLITE_VERSION_NUMBER 3007007
655 #define SQLITE_SOURCE_ID "2011-06-23 17:29:33 b61a76a53af04f731fe7617f7b6b4fb2aef6587b"
656
657 /*
658 ** CAPI3REF: Run-Time Library Version Numbers
659 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
660 **
@@ -6119,11 +6119,12 @@
6119 #define SQLITE_TESTCTRL_RESERVE 14
6120 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
6121 #define SQLITE_TESTCTRL_ISKEYWORD 16
6122 #define SQLITE_TESTCTRL_PGHDRSZ 17
6123 #define SQLITE_TESTCTRL_SCRATCHMALLOC 18
6124 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 19
6125 #define SQLITE_TESTCTRL_LAST 19
6126
6127 /*
6128 ** CAPI3REF: SQLite Runtime Status
6129 **
6130 ** ^This interface is used to retrieve runtime status information
@@ -9556,10 +9557,11 @@
9557 #define SQLITE_IndexSort 0x04 /* Disable indexes for sorting */
9558 #define SQLITE_IndexSearch 0x08 /* Disable indexes for searching */
9559 #define SQLITE_IndexCover 0x10 /* Disable index covering table */
9560 #define SQLITE_GroupByOrder 0x20 /* Disable GROUPBY cover of ORDERBY */
9561 #define SQLITE_FactorOutConst 0x40 /* Disable factoring out constants */
9562 #define SQLITE_IdxRealAsInt 0x80 /* Store REAL as INT in indices */
9563 #define SQLITE_OptMask 0xff /* Mask of all disablable opts */
9564
9565 /*
9566 ** Possible values for the sqlite.magic field.
9567 ** The numbers are obtained at random and have no special meaning, other
@@ -11053,10 +11055,11 @@
11055 int isPCacheInit; /* True after malloc is initialized */
11056 sqlite3_mutex *pInitMutex; /* Mutex used by sqlite3_initialize() */
11057 int nRefInitMutex; /* Number of users of pInitMutex */
11058 void (*xLog)(void*,int,const char*); /* Function for logging */
11059 void *pLogArg; /* First argument to xLog() */
11060 int bLocaltimeFault; /* True to fail localtime() calls */
11061 };
11062
11063 /*
11064 ** Context pointer passed down through the tree-walk.
11065 */
@@ -12013,10 +12016,11 @@
12016 0, /* isPCacheInit */
12017 0, /* pInitMutex */
12018 0, /* nRefInitMutex */
12019 0, /* xLog */
12020 0, /* pLogArg */
12021 0, /* bLocaltimeFault */
12022 };
12023
12024
12025 /*
12026 ** Hash table for global functions - functions common to all
@@ -13163,26 +13167,10 @@
13167 */
13168 #include <time.h>
13169
13170 #ifndef SQLITE_OMIT_DATETIME_FUNCS
13171
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13172
13173 /*
13174 ** A structure for holding a single date and time.
13175 */
13176 typedef struct DateTime DateTime;
@@ -13523,20 +13511,88 @@
13511 static void clearYMD_HMS_TZ(DateTime *p){
13512 p->validYMD = 0;
13513 p->validHMS = 0;
13514 p->validTZ = 0;
13515 }
13516
13517 /*
13518 ** On recent Windows platforms, the localtime_s() function is available
13519 ** as part of the "Secure CRT". It is essentially equivalent to
13520 ** localtime_r() available under most POSIX platforms, except that the
13521 ** order of the parameters is reversed.
13522 **
13523 ** See http://msdn.microsoft.com/en-us/library/a442x3ye(VS.80).aspx.
13524 **
13525 ** If the user has not indicated to use localtime_r() or localtime_s()
13526 ** already, check for an MSVC build environment that provides
13527 ** localtime_s().
13528 */
13529 #if !defined(HAVE_LOCALTIME_R) && !defined(HAVE_LOCALTIME_S) && \
13530 defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
13531 #define HAVE_LOCALTIME_S 1
13532 #endif
13533
13534 #ifndef SQLITE_OMIT_LOCALTIME
13535 /*
13536 ** The following routine implements the rough equivalent of localtime_r()
13537 ** using whatever operating-system specific localtime facility that
13538 ** is available. This routine returns 0 on success and
13539 ** non-zero on any kind of error.
13540 **
13541 ** If the sqlite3GlobalConfig.bLocaltimeFault variable is true then this
13542 ** routine will always fail.
13543 */
13544 static int osLocaltime(time_t *t, struct tm *pTm){
13545 int rc;
13546 #if (!defined(HAVE_LOCALTIME_R) || !HAVE_LOCALTIME_R) \
13547 && (!defined(HAVE_LOCALTIME_S) || !HAVE_LOCALTIME_S)
13548 struct tm *pX;
13549 sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
13550 sqlite3_mutex_enter(mutex);
13551 pX = localtime(t);
13552 #ifndef SQLITE_OMIT_BUILTIN_TEST
13553 if( sqlite3GlobalConfig.bLocaltimeFault ) pX = 0;
13554 #endif
13555 if( pX ) *pTm = *pX;
13556 sqlite3_mutex_leave(mutex);
13557 rc = pX==0;
13558 #else
13559 #ifndef SQLITE_OMIT_BUILTIN_TEST
13560 if( sqlite3GlobalConfig.bLocaltimeFault ) return 1;
13561 #endif
13562 #if defined(HAVE_LOCALTIME_R) && HAVE_LOCALTIME_R
13563 rc = localtime_r(t, pTm)==0;
13564 #else
13565 rc = localtime_s(pTm, t);
13566 #endif /* HAVE_LOCALTIME_R */
13567 #endif /* HAVE_LOCALTIME_R || HAVE_LOCALTIME_S */
13568 return rc;
13569 }
13570 #endif /* SQLITE_OMIT_LOCALTIME */
13571
13572
13573 #ifndef SQLITE_OMIT_LOCALTIME
13574 /*
13575 ** Compute the difference (in milliseconds) between localtime and UTC
13576 ** (a.k.a. GMT) for the time value p where p is in UTC. If no error occurs,
13577 ** return this value and set *pRc to SQLITE_OK.
13578 **
13579 ** Or, if an error does occur, set *pRc to SQLITE_ERROR. The returned value
13580 ** is undefined in this case.
13581 */
13582 static sqlite3_int64 localtimeOffset(
13583 DateTime *p, /* Date at which to calculate offset */
13584 sqlite3_context *pCtx, /* Write error here if one occurs */
13585 int *pRc /* OUT: Error code. SQLITE_OK or ERROR */
13586 ){
13587 DateTime x, y;
13588 time_t t;
13589 struct tm sLocal;
13590
13591 /* Initialize the contents of sLocal to avoid a compiler warning. */
13592 memset(&sLocal, 0, sizeof(sLocal));
13593
13594 x = *p;
13595 computeYMD_HMS(&x);
13596 if( x.Y<1971 || x.Y>=2038 ){
13597 x.Y = 2000;
13598 x.M = 1;
@@ -13550,51 +13606,27 @@
13606 }
13607 x.tz = 0;
13608 x.validJD = 0;
13609 computeJD(&x);
13610 t = (time_t)(x.iJD/1000 - 21086676*(i64)10000);
13611 if( osLocaltime(&t, &sLocal) ){
13612 sqlite3_result_error(pCtx, "local time unavailable", -1);
13613 *pRc = SQLITE_ERROR;
13614 return 0;
13615 }
13616 y.Y = sLocal.tm_year + 1900;
13617 y.M = sLocal.tm_mon + 1;
13618 y.D = sLocal.tm_mday;
13619 y.h = sLocal.tm_hour;
13620 y.m = sLocal.tm_min;
13621 y.s = sLocal.tm_sec;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13622 y.validYMD = 1;
13623 y.validHMS = 1;
13624 y.validJD = 0;
13625 y.validTZ = 0;
13626 computeJD(&y);
13627 *pRc = SQLITE_OK;
13628 return y.iJD - x.iJD;
13629 }
13630 #endif /* SQLITE_OMIT_LOCALTIME */
13631
13632 /*
@@ -13614,13 +13646,16 @@
13646 ** weekday N
13647 ** unixepoch
13648 ** localtime
13649 ** utc
13650 **
13651 ** Return 0 on success and 1 if there is any kind of error. If the error
13652 ** is in a system call (i.e. localtime()), then an error message is written
13653 ** to context pCtx. If the error is an unrecognized modifier, no error is
13654 ** written to pCtx.
13655 */
13656 static int parseModifier(sqlite3_context *pCtx, const char *zMod, DateTime *p){
13657 int rc = 1;
13658 int n;
13659 double r;
13660 char *z, zBuf[30];
13661 z = zBuf;
@@ -13636,13 +13671,12 @@
13671 ** Assuming the current time value is UTC (a.k.a. GMT), shift it to
13672 ** show local time.
13673 */
13674 if( strcmp(z, "localtime")==0 ){
13675 computeJD(p);
13676 p->iJD += localtimeOffset(p, pCtx, &rc);
13677 clearYMD_HMS_TZ(p);
 
13678 }
13679 break;
13680 }
13681 #endif
13682 case 'u': {
@@ -13659,15 +13693,16 @@
13693 }
13694 #ifndef SQLITE_OMIT_LOCALTIME
13695 else if( strcmp(z, "utc")==0 ){
13696 sqlite3_int64 c1;
13697 computeJD(p);
13698 c1 = localtimeOffset(p, pCtx, &rc);
13699 if( rc==SQLITE_OK ){
13700 p->iJD -= c1;
13701 clearYMD_HMS_TZ(p);
13702 p->iJD += c1 - localtimeOffset(p, pCtx, &rc);
13703 }
13704 }
13705 #endif
13706 break;
13707 }
13708 case 'w': {
@@ -13844,13 +13879,12 @@
13879 if( !z || parseDateOrTime(context, (char*)z, p) ){
13880 return 1;
13881 }
13882 }
13883 for(i=1; i<argc; i++){
13884 z = sqlite3_value_text(argv[i]);
13885 if( z==0 || parseModifier(context, (char*)z, p) ) return 1;
 
13886 }
13887 return 0;
13888 }
13889
13890
@@ -61212,10 +61246,18 @@
61246 rc = db->errCode = p->rc;
61247 }
61248 return (rc&db->errMask);
61249 }
61250
61251 /*
61252 ** The maximum number of times that a statement will try to reparse
61253 ** itself before giving up and returning SQLITE_SCHEMA.
61254 */
61255 #ifndef SQLITE_MAX_SCHEMA_RETRY
61256 # define SQLITE_MAX_SCHEMA_RETRY 5
61257 #endif
61258
61259 /*
61260 ** This is the top-level implementation of sqlite3_step(). Call
61261 ** sqlite3Step() to do most of the work. If a schema error occurs,
61262 ** call sqlite3Reprepare() and try again.
61263 */
@@ -61230,11 +61272,11 @@
61272 return SQLITE_MISUSE_BKPT;
61273 }
61274 db = v->db;
61275 sqlite3_mutex_enter(db->mutex);
61276 while( (rc = sqlite3Step(v))==SQLITE_SCHEMA
61277 && cnt++ < SQLITE_MAX_SCHEMA_RETRY
61278 && (rc2 = rc = sqlite3Reprepare(v))==SQLITE_OK ){
61279 sqlite3_reset(pStmt);
61280 v->expired = 0;
61281 }
61282 if( rc2!=SQLITE_OK && ALWAYS(v->isPrepareV2) && ALWAYS(db->pErr) ){
@@ -82142,12 +82184,18 @@
82184 sqlite3VdbeAddOp3(v, OP_Column, iCur, idx, regBase+j);
82185 sqlite3ColumnDefault(v, pTab, idx, -1);
82186 }
82187 }
82188 if( doMakeRec ){
82189 const char *zAff;
82190 if( pTab->pSelect || (pParse->db->flags & SQLITE_IdxRealAsInt)!=0 ){
82191 zAff = 0;
82192 }else{
82193 zAff = sqlite3IndexAffinityStr(v, pIdx);
82194 }
82195 sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol+1, regOut);
82196 sqlite3VdbeChangeP4(v, -1, zAff, P4_TRANSIENT);
82197 }
82198 sqlite3ReleaseTempRange(pParse, regBase, nCol+1);
82199 return regBase;
82200 }
82201
@@ -110770,10 +110818,21 @@
110818 if( sz ) *ppNew = sqlite3ScratchMalloc(sz);
110819 sqlite3ScratchFree(pFree);
110820 break;
110821 }
110822
110823 /* sqlite3_test_control(SQLITE_TESTCTRL_LOCALTIME_FAULT, int onoff);
110824 **
110825 ** If parameter onoff is non-zero, configure the wrappers so that all
110826 ** subsequent calls to localtime() and variants fail. If onoff is zero,
110827 ** undo this setting.
110828 */
110829 case SQLITE_TESTCTRL_LOCALTIME_FAULT: {
110830 sqlite3GlobalConfig.bLocaltimeFault = va_arg(ap, int);
110831 break;
110832 }
110833
110834 }
110835 va_end(ap);
110836 #endif /* SQLITE_OMIT_BUILTIN_TEST */
110837 return rc;
110838 }
@@ -112562,10 +112621,13 @@
112621 rc = sqlite3_prepare(p->db, zSql, -1, &pStmt, 0);
112622 if( rc==SQLITE_OK ){
112623 sqlite3_step(pStmt);
112624 p->nPgsz = sqlite3_column_int(pStmt, 0);
112625 rc = sqlite3_finalize(pStmt);
112626 }else if( rc==SQLITE_AUTH ){
112627 p->nPgsz = 1024;
112628 rc = SQLITE_OK;
112629 }
112630 }
112631 assert( p->nPgsz>0 || rc!=SQLITE_OK );
112632 sqlite3_free(zSql);
112633 *pRc = rc;
112634
+3 -2
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110110
#define SQLITE_VERSION "3.7.7"
111111
#define SQLITE_VERSION_NUMBER 3007007
112
-#define SQLITE_SOURCE_ID "2011-06-20 23:51:33 e60eefc76fa5066720d76858f6cfca56365330ee"
112
+#define SQLITE_SOURCE_ID "2011-06-23 17:29:33 b61a76a53af04f731fe7617f7b6b4fb2aef6587b"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
@@ -5576,11 +5576,12 @@
55765576
#define SQLITE_TESTCTRL_RESERVE 14
55775577
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
55785578
#define SQLITE_TESTCTRL_ISKEYWORD 16
55795579
#define SQLITE_TESTCTRL_PGHDRSZ 17
55805580
#define SQLITE_TESTCTRL_SCRATCHMALLOC 18
5581
-#define SQLITE_TESTCTRL_LAST 18
5581
+#define SQLITE_TESTCTRL_LOCALTIME_FAULT 19
5582
+#define SQLITE_TESTCTRL_LAST 19
55825583
55835584
/*
55845585
** CAPI3REF: SQLite Runtime Status
55855586
**
55865587
** ^This interface is used to retrieve runtime status information
55875588
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.7"
111 #define SQLITE_VERSION_NUMBER 3007007
112 #define SQLITE_SOURCE_ID "2011-06-20 23:51:33 e60eefc76fa5066720d76858f6cfca56365330ee"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
@@ -5576,11 +5576,12 @@
5576 #define SQLITE_TESTCTRL_RESERVE 14
5577 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
5578 #define SQLITE_TESTCTRL_ISKEYWORD 16
5579 #define SQLITE_TESTCTRL_PGHDRSZ 17
5580 #define SQLITE_TESTCTRL_SCRATCHMALLOC 18
5581 #define SQLITE_TESTCTRL_LAST 18
 
5582
5583 /*
5584 ** CAPI3REF: SQLite Runtime Status
5585 **
5586 ** ^This interface is used to retrieve runtime status information
5587
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.7"
111 #define SQLITE_VERSION_NUMBER 3007007
112 #define SQLITE_SOURCE_ID "2011-06-23 17:29:33 b61a76a53af04f731fe7617f7b6b4fb2aef6587b"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
@@ -5576,11 +5576,12 @@
5576 #define SQLITE_TESTCTRL_RESERVE 14
5577 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
5578 #define SQLITE_TESTCTRL_ISKEYWORD 16
5579 #define SQLITE_TESTCTRL_PGHDRSZ 17
5580 #define SQLITE_TESTCTRL_SCRATCHMALLOC 18
5581 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 19
5582 #define SQLITE_TESTCTRL_LAST 19
5583
5584 /*
5585 ** CAPI3REF: SQLite Runtime Status
5586 **
5587 ** ^This interface is used to retrieve runtime status information
5588

Keyboard Shortcuts

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