Fossil SCM

Update the built-in SQLite to version 3.8.11.

drh 2015-07-27 16:16 trunk
Commit f8e26879acf4ab2e65a50415dfdd838406bee47e
2 files changed +63 -24 +5 -3
+63 -24
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -325,11 +325,11 @@
325325
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
326326
** [sqlite_version()] and [sqlite_source_id()].
327327
*/
328328
#define SQLITE_VERSION "3.8.11"
329329
#define SQLITE_VERSION_NUMBER 3008011
330
-#define SQLITE_SOURCE_ID "2015-07-23 20:44:49 017c5019e1ce042025d4f327e50ec50af49f9fa4"
330
+#define SQLITE_SOURCE_ID "2015-07-27 13:49:41 b8e92227a469de677a66da62e4361f099c0b79d0"
331331
332332
/*
333333
** CAPI3REF: Run-Time Library Version Numbers
334334
** KEYWORDS: sqlite3_version, sqlite3_sourceid
335335
**
@@ -3774,10 +3774,11 @@
37743774
SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
37753775
SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
37763776
void(*)(void*), unsigned char encoding);
37773777
SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
37783778
SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3779
+SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
37793780
37803781
/*
37813782
** CAPI3REF: Number Of SQL Parameters
37823783
** METHOD: sqlite3_stmt
37833784
**
@@ -4746,12 +4747,12 @@
47464747
** ^The sqlite3_result_blob() interface sets the result from
47474748
** an application-defined function to be the BLOB whose content is pointed
47484749
** to by the second parameter and which is N bytes long where N is the
47494750
** third parameter.
47504751
**
4751
-** ^The sqlite3_result_zeroblob() interfaces set the result of
4752
-** the application-defined function to be a BLOB containing all zero
4752
+** ^The sqlite3_result_zeroblob() and zeroblob64() interfaces set the result
4753
+** of the application-defined function to be a BLOB containing all zero
47534754
** bytes and N bytes in size, where N is the value of the 2nd parameter.
47544755
**
47554756
** ^The sqlite3_result_double() interface sets the result from
47564757
** an application-defined function to be a floating point value specified
47574758
** by its 2nd argument.
@@ -4863,10 +4864,11 @@
48634864
SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
48644865
SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
48654866
SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
48664867
SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
48674868
SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
4869
+SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
48684870
48694871
/*
48704872
** CAPI3REF: Define New Collating Sequences
48714873
** METHOD: sqlite3
48724874
**
@@ -8361,14 +8363,18 @@
83618363
83628364
/*
83638365
** Make sure that the compiler intrinsics we desire are enabled when
83648366
** compiling with an appropriate version of MSVC.
83658367
*/
8366
-#if defined(_MSC_VER) && _MSC_VER>=1300 && !defined(_WIN32_WCE)
8367
-# include <intrin.h>
8368
-# pragma intrinsic(_byteswap_ushort)
8369
-# pragma intrinsic(_byteswap_ulong)
8368
+#if defined(_MSC_VER) && _MSC_VER>=1300
8369
+# if !defined(_WIN32_WCE)
8370
+# include <intrin.h>
8371
+# pragma intrinsic(_byteswap_ushort)
8372
+# pragma intrinsic(_byteswap_ulong)
8373
+# else
8374
+# include <cmnintrin.h>
8375
+# endif
83708376
#endif
83718377
83728378
/*
83738379
** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2.
83748380
** 0 means mutexes are permanently disable and the library is never
@@ -70299,11 +70305,14 @@
7029970305
** structure.
7030070306
*/
7030170307
SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){
7030270308
Mem *p = (Mem*)pVal;
7030370309
if( p->flags & (MEM_Blob|MEM_Str) ){
70304
- sqlite3VdbeMemExpandBlob(p);
70310
+ if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){
70311
+ assert( p->flags==MEM_Null && p->z==0 );
70312
+ return 0;
70313
+ }
7030570314
p->flags |= MEM_Blob;
7030670315
return p->n ? p->z : 0;
7030770316
}else{
7030870317
return sqlite3_value_text(pVal);
7030970318
}
@@ -70560,10 +70569,19 @@
7056070569
sqlite3VdbeMemCopy(pCtx->pOut, pValue);
7056170570
}
7056270571
SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
7056370572
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7056470573
sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n);
70574
+}
70575
+SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
70576
+ Mem *pOut = pCtx->pOut;
70577
+ assert( sqlite3_mutex_held(pOut->db->mutex) );
70578
+ if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
70579
+ return SQLITE_TOOBIG;
70580
+ }
70581
+ sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
70582
+ return SQLITE_OK;
7056570583
}
7056670584
SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
7056770585
pCtx->isError = errCode;
7056870586
pCtx->fErrorOrAux = 1;
7056970587
#ifdef SQLITE_DEBUG
@@ -71539,10 +71557,24 @@
7153971557
if( rc==SQLITE_OK ){
7154071558
sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
7154171559
sqlite3_mutex_leave(p->db->mutex);
7154271560
}
7154371561
return rc;
71562
+}
71563
+SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
71564
+ int rc;
71565
+ Vdbe *p = (Vdbe *)pStmt;
71566
+ sqlite3_mutex_enter(p->db->mutex);
71567
+ if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){
71568
+ rc = SQLITE_TOOBIG;
71569
+ }else{
71570
+ assert( (n & 0x7FFFFFFF)==n );
71571
+ rc = sqlite3_bind_zeroblob(pStmt, i, n);
71572
+ }
71573
+ rc = sqlite3ApiExit(p->db, rc);
71574
+ sqlite3_mutex_leave(p->db->mutex);
71575
+ return rc;
7154471576
}
7154571577
7154671578
/*
7154771579
** Return the number of wildcards that can be potentially bound to.
7154871580
** This routine is added to support DBD::SQLite.
@@ -74756,11 +74788,11 @@
7475674788
assert( memIsValid(pRec) );
7475774789
pRec->uTemp = serial_type = sqlite3VdbeSerialType(pRec, file_format);
7475874790
len = sqlite3VdbeSerialTypeLen(serial_type);
7475974791
if( pRec->flags & MEM_Zero ){
7476074792
if( nData ){
74761
- sqlite3VdbeMemExpandBlob(pRec);
74793
+ if( sqlite3VdbeMemExpandBlob(pRec) ) goto no_mem;
7476274794
}else{
7476374795
nZero += pRec->u.nZero;
7476474796
len -= pRec->u.nZero;
7476574797
}
7476674798
}
@@ -98641,20 +98673,18 @@
9864198673
sqlite3_context *context,
9864298674
int argc,
9864398675
sqlite3_value **argv
9864498676
){
9864598677
i64 n;
98646
- sqlite3 *db = sqlite3_context_db_handle(context);
98678
+ int rc;
9864798679
assert( argc==1 );
9864898680
UNUSED_PARAMETER(argc);
9864998681
n = sqlite3_value_int64(argv[0]);
98650
- testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH] );
98651
- testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
98652
- if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){
98653
- sqlite3_result_error_toobig(context);
98654
- }else{
98655
- sqlite3_result_zeroblob(context, (int)n); /* IMP: R-00293-64994 */
98682
+ if( n<0 ) n = 0;
98683
+ rc = sqlite3_result_zeroblob64(context, n); /* IMP: R-00293-64994 */
98684
+ if( rc ){
98685
+ sqlite3_result_error_code(context, rc);
9865698686
}
9865798687
}
9865898688
9865998689
/*
9866098690
** The replace() function. Three arguments are all strings: call
@@ -103221,10 +103251,12 @@
103221103251
void(*)(void*), unsigned char);
103222103252
int (*strglob)(const char*,const char*);
103223103253
/* Version 3.8.11 and later */
103224103254
sqlite3_value *(*value_dup)(const sqlite3_value*);
103225103255
void (*value_free)(sqlite3_value*);
103256
+ int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);
103257
+ int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);
103226103258
};
103227103259
103228103260
/*
103229103261
** The following macros redefine the API routines so that they are
103230103262
** redirected through the global sqlite3_api structure.
@@ -103454,10 +103486,12 @@
103454103486
#define sqlite3_result_text64 sqlite3_api->result_text64
103455103487
#define sqlite3_strglob sqlite3_api->strglob
103456103488
/* Version 3.8.11 and later */
103457103489
#define sqlite3_value_dup sqlite3_api->value_dup
103458103490
#define sqlite3_value_free sqlite3_api->value_free
103491
+#define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64
103492
+#define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64
103459103493
#endif /* SQLITE_CORE */
103460103494
103461103495
#ifndef SQLITE_CORE
103462103496
/* This case when the file really is being compiled as a loadable
103463103497
** extension */
@@ -103863,11 +103897,13 @@
103863103897
sqlite3_result_blob64,
103864103898
sqlite3_result_text64,
103865103899
sqlite3_strglob,
103866103900
/* Version 3.8.11 and later */
103867103901
(sqlite3_value*(*)(const sqlite3_value*))sqlite3_value_dup,
103868
- sqlite3_value_free
103902
+ sqlite3_value_free,
103903
+ sqlite3_result_zeroblob64,
103904
+ sqlite3_bind_zeroblob64
103869103905
};
103870103906
103871103907
/*
103872103908
** Attempt to load an SQLite extension library contained in the file
103873103909
** zFile. The entry point is zProc. zProc may be 0 in which case a
@@ -138650,11 +138686,10 @@
138650138686
** tokens or prefix tokens that cannot use a prefix-index. */
138651138687
int bHaveIncr = 0;
138652138688
int bIncrOk = (bOptOk
138653138689
&& pCsr->bDesc==pTab->bDescIdx
138654138690
&& p->nToken<=MAX_INCR_PHRASE_TOKENS && p->nToken>0
138655
- && p->nToken<=MAX_INCR_PHRASE_TOKENS && p->nToken>0
138656138691
#ifdef SQLITE_TEST
138657138692
&& pTab->bNoIncrDoclist==0
138658138693
#endif
138659138694
);
138660138695
for(i=0; bIncrOk==1 && i<p->nToken; i++){
@@ -156922,11 +156957,14 @@
156922156957
*/
156923156958
156924156959
/* #include <assert.h> */
156925156960
/* #include <string.h> */
156926156961
/* #include <stdio.h> */
156927
-/* #include <unistd.h> */
156962
+
156963
+#if !defined(_WIN32)
156964
+/* # include <unistd.h> */
156965
+#endif
156928156966
156929156967
/* #include "sqlite3.h" */
156930156968
156931156969
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU)
156932156970
/************** Include sqlite3rbu.h in the middle of sqlite3rbu.c ***********/
@@ -156978,11 +157016,11 @@
156978157016
** mobile device that is frequently rebooted. Even after the writer process
156979157017
** has committed one or more sub-transactions, other database clients continue
156980157018
** to read from the original database snapshot. In other words, partially
156981157019
** applied transactions are not visible to other clients.
156982157020
**
156983
-** "RBU" stands for "Over The Air" update. As in a large database update
157021
+** "RBU" stands for "Resumable Bulk Update". As in a large database update
156984157022
** transmitted via a wireless network to a mobile device. A transaction
156985157023
** applied using this extension is hence refered to as an "RBU update".
156986157024
**
156987157025
**
156988157026
** LIMITATIONS
@@ -157829,11 +157867,11 @@
157829157867
int rc;
157830157868
memset(pIter, 0, sizeof(RbuObjIter));
157831157869
157832157870
rc = prepareAndCollectError(p->dbRbu, &pIter->pTblIter, &p->zErrmsg,
157833157871
"SELECT substr(name, 6) FROM sqlite_master "
157834
- "WHERE type='table' AND name LIKE 'data_%'"
157872
+ "WHERE type IN ('table', 'view') AND name LIKE 'data_%'"
157835157873
);
157836157874
157837157875
if( rc==SQLITE_OK ){
157838157876
rc = prepareAndCollectError(p->dbMain, &pIter->pIdxIter, &p->zErrmsg,
157839157877
"SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' "
@@ -157881,12 +157919,13 @@
157881157919
** RBU handle. If an error has already occurred when this function is
157882157920
** called, it is a no-op.
157883157921
*/
157884157922
static int rbuMPrintfExec(sqlite3rbu *p, sqlite3 *db, const char *zFmt, ...){
157885157923
va_list ap;
157924
+ char *zSql;
157886157925
va_start(ap, zFmt);
157887
- char *zSql = sqlite3_vmprintf(zFmt, ap);
157926
+ zSql = sqlite3_vmprintf(zFmt, ap);
157888157927
if( p->rc==SQLITE_OK ){
157889157928
if( zSql==0 ){
157890157929
p->rc = SQLITE_NOMEM;
157891157930
}else{
157892157931
p->rc = sqlite3_exec(db, zSql, 0, 0, &p->zErrmsg);
@@ -159901,11 +159940,11 @@
159901159940
int rnd;
159902159941
char zRnd[64];
159903159942
159904159943
assert( p->rc==SQLITE_OK );
159905159944
sqlite3_randomness(sizeof(int), (void*)&rnd);
159906
- sprintf(zRnd, "rbu_vfs_%d", rnd);
159945
+ sqlite3_snprintf(sizeof(zRnd), zRnd, "rbu_vfs_%d", rnd);
159907159946
p->rc = sqlite3rbu_create_vfs(zRnd, 0);
159908159947
if( p->rc==SQLITE_OK ){
159909159948
sqlite3_vfs *pVfs = sqlite3_vfs_find(zRnd);
159910159949
assert( pVfs );
159911159950
p->zVfsName = pVfs->zName;
@@ -160786,11 +160825,11 @@
160786160825
/*
160787160826
** Close the dynamic library handle pHandle.
160788160827
*/
160789160828
static void rbuVfsDlClose(sqlite3_vfs *pVfs, void *pHandle){
160790160829
sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
160791
- return pRealVfs->xDlClose(pRealVfs, pHandle);
160830
+ pRealVfs->xDlClose(pRealVfs, pHandle);
160792160831
}
160793160832
#endif /* SQLITE_OMIT_LOAD_EXTENSION */
160794160833
160795160834
/*
160796160835
** Populate the buffer pointed to by zBufOut with nByte bytes of
160797160836
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -325,11 +325,11 @@
325 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
326 ** [sqlite_version()] and [sqlite_source_id()].
327 */
328 #define SQLITE_VERSION "3.8.11"
329 #define SQLITE_VERSION_NUMBER 3008011
330 #define SQLITE_SOURCE_ID "2015-07-23 20:44:49 017c5019e1ce042025d4f327e50ec50af49f9fa4"
331
332 /*
333 ** CAPI3REF: Run-Time Library Version Numbers
334 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
335 **
@@ -3774,10 +3774,11 @@
3774 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3775 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
3776 void(*)(void*), unsigned char encoding);
3777 SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3778 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
 
3779
3780 /*
3781 ** CAPI3REF: Number Of SQL Parameters
3782 ** METHOD: sqlite3_stmt
3783 **
@@ -4746,12 +4747,12 @@
4746 ** ^The sqlite3_result_blob() interface sets the result from
4747 ** an application-defined function to be the BLOB whose content is pointed
4748 ** to by the second parameter and which is N bytes long where N is the
4749 ** third parameter.
4750 **
4751 ** ^The sqlite3_result_zeroblob() interfaces set the result of
4752 ** the application-defined function to be a BLOB containing all zero
4753 ** bytes and N bytes in size, where N is the value of the 2nd parameter.
4754 **
4755 ** ^The sqlite3_result_double() interface sets the result from
4756 ** an application-defined function to be a floating point value specified
4757 ** by its 2nd argument.
@@ -4863,10 +4864,11 @@
4863 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4864 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4865 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4866 SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4867 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
 
4868
4869 /*
4870 ** CAPI3REF: Define New Collating Sequences
4871 ** METHOD: sqlite3
4872 **
@@ -8361,14 +8363,18 @@
8361
8362 /*
8363 ** Make sure that the compiler intrinsics we desire are enabled when
8364 ** compiling with an appropriate version of MSVC.
8365 */
8366 #if defined(_MSC_VER) && _MSC_VER>=1300 && !defined(_WIN32_WCE)
8367 # include <intrin.h>
8368 # pragma intrinsic(_byteswap_ushort)
8369 # pragma intrinsic(_byteswap_ulong)
 
 
 
 
8370 #endif
8371
8372 /*
8373 ** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2.
8374 ** 0 means mutexes are permanently disable and the library is never
@@ -70299,11 +70305,14 @@
70299 ** structure.
70300 */
70301 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){
70302 Mem *p = (Mem*)pVal;
70303 if( p->flags & (MEM_Blob|MEM_Str) ){
70304 sqlite3VdbeMemExpandBlob(p);
 
 
 
70305 p->flags |= MEM_Blob;
70306 return p->n ? p->z : 0;
70307 }else{
70308 return sqlite3_value_text(pVal);
70309 }
@@ -70560,10 +70569,19 @@
70560 sqlite3VdbeMemCopy(pCtx->pOut, pValue);
70561 }
70562 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
70563 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
70564 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n);
 
 
 
 
 
 
 
 
 
70565 }
70566 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
70567 pCtx->isError = errCode;
70568 pCtx->fErrorOrAux = 1;
70569 #ifdef SQLITE_DEBUG
@@ -71539,10 +71557,24 @@
71539 if( rc==SQLITE_OK ){
71540 sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
71541 sqlite3_mutex_leave(p->db->mutex);
71542 }
71543 return rc;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71544 }
71545
71546 /*
71547 ** Return the number of wildcards that can be potentially bound to.
71548 ** This routine is added to support DBD::SQLite.
@@ -74756,11 +74788,11 @@
74756 assert( memIsValid(pRec) );
74757 pRec->uTemp = serial_type = sqlite3VdbeSerialType(pRec, file_format);
74758 len = sqlite3VdbeSerialTypeLen(serial_type);
74759 if( pRec->flags & MEM_Zero ){
74760 if( nData ){
74761 sqlite3VdbeMemExpandBlob(pRec);
74762 }else{
74763 nZero += pRec->u.nZero;
74764 len -= pRec->u.nZero;
74765 }
74766 }
@@ -98641,20 +98673,18 @@
98641 sqlite3_context *context,
98642 int argc,
98643 sqlite3_value **argv
98644 ){
98645 i64 n;
98646 sqlite3 *db = sqlite3_context_db_handle(context);
98647 assert( argc==1 );
98648 UNUSED_PARAMETER(argc);
98649 n = sqlite3_value_int64(argv[0]);
98650 testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH] );
98651 testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
98652 if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){
98653 sqlite3_result_error_toobig(context);
98654 }else{
98655 sqlite3_result_zeroblob(context, (int)n); /* IMP: R-00293-64994 */
98656 }
98657 }
98658
98659 /*
98660 ** The replace() function. Three arguments are all strings: call
@@ -103221,10 +103251,12 @@
103221 void(*)(void*), unsigned char);
103222 int (*strglob)(const char*,const char*);
103223 /* Version 3.8.11 and later */
103224 sqlite3_value *(*value_dup)(const sqlite3_value*);
103225 void (*value_free)(sqlite3_value*);
 
 
103226 };
103227
103228 /*
103229 ** The following macros redefine the API routines so that they are
103230 ** redirected through the global sqlite3_api structure.
@@ -103454,10 +103486,12 @@
103454 #define sqlite3_result_text64 sqlite3_api->result_text64
103455 #define sqlite3_strglob sqlite3_api->strglob
103456 /* Version 3.8.11 and later */
103457 #define sqlite3_value_dup sqlite3_api->value_dup
103458 #define sqlite3_value_free sqlite3_api->value_free
 
 
103459 #endif /* SQLITE_CORE */
103460
103461 #ifndef SQLITE_CORE
103462 /* This case when the file really is being compiled as a loadable
103463 ** extension */
@@ -103863,11 +103897,13 @@
103863 sqlite3_result_blob64,
103864 sqlite3_result_text64,
103865 sqlite3_strglob,
103866 /* Version 3.8.11 and later */
103867 (sqlite3_value*(*)(const sqlite3_value*))sqlite3_value_dup,
103868 sqlite3_value_free
 
 
103869 };
103870
103871 /*
103872 ** Attempt to load an SQLite extension library contained in the file
103873 ** zFile. The entry point is zProc. zProc may be 0 in which case a
@@ -138650,11 +138686,10 @@
138650 ** tokens or prefix tokens that cannot use a prefix-index. */
138651 int bHaveIncr = 0;
138652 int bIncrOk = (bOptOk
138653 && pCsr->bDesc==pTab->bDescIdx
138654 && p->nToken<=MAX_INCR_PHRASE_TOKENS && p->nToken>0
138655 && p->nToken<=MAX_INCR_PHRASE_TOKENS && p->nToken>0
138656 #ifdef SQLITE_TEST
138657 && pTab->bNoIncrDoclist==0
138658 #endif
138659 );
138660 for(i=0; bIncrOk==1 && i<p->nToken; i++){
@@ -156922,11 +156957,14 @@
156922 */
156923
156924 /* #include <assert.h> */
156925 /* #include <string.h> */
156926 /* #include <stdio.h> */
156927 /* #include <unistd.h> */
 
 
 
156928
156929 /* #include "sqlite3.h" */
156930
156931 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU)
156932 /************** Include sqlite3rbu.h in the middle of sqlite3rbu.c ***********/
@@ -156978,11 +157016,11 @@
156978 ** mobile device that is frequently rebooted. Even after the writer process
156979 ** has committed one or more sub-transactions, other database clients continue
156980 ** to read from the original database snapshot. In other words, partially
156981 ** applied transactions are not visible to other clients.
156982 **
156983 ** "RBU" stands for "Over The Air" update. As in a large database update
156984 ** transmitted via a wireless network to a mobile device. A transaction
156985 ** applied using this extension is hence refered to as an "RBU update".
156986 **
156987 **
156988 ** LIMITATIONS
@@ -157829,11 +157867,11 @@
157829 int rc;
157830 memset(pIter, 0, sizeof(RbuObjIter));
157831
157832 rc = prepareAndCollectError(p->dbRbu, &pIter->pTblIter, &p->zErrmsg,
157833 "SELECT substr(name, 6) FROM sqlite_master "
157834 "WHERE type='table' AND name LIKE 'data_%'"
157835 );
157836
157837 if( rc==SQLITE_OK ){
157838 rc = prepareAndCollectError(p->dbMain, &pIter->pIdxIter, &p->zErrmsg,
157839 "SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' "
@@ -157881,12 +157919,13 @@
157881 ** RBU handle. If an error has already occurred when this function is
157882 ** called, it is a no-op.
157883 */
157884 static int rbuMPrintfExec(sqlite3rbu *p, sqlite3 *db, const char *zFmt, ...){
157885 va_list ap;
 
157886 va_start(ap, zFmt);
157887 char *zSql = sqlite3_vmprintf(zFmt, ap);
157888 if( p->rc==SQLITE_OK ){
157889 if( zSql==0 ){
157890 p->rc = SQLITE_NOMEM;
157891 }else{
157892 p->rc = sqlite3_exec(db, zSql, 0, 0, &p->zErrmsg);
@@ -159901,11 +159940,11 @@
159901 int rnd;
159902 char zRnd[64];
159903
159904 assert( p->rc==SQLITE_OK );
159905 sqlite3_randomness(sizeof(int), (void*)&rnd);
159906 sprintf(zRnd, "rbu_vfs_%d", rnd);
159907 p->rc = sqlite3rbu_create_vfs(zRnd, 0);
159908 if( p->rc==SQLITE_OK ){
159909 sqlite3_vfs *pVfs = sqlite3_vfs_find(zRnd);
159910 assert( pVfs );
159911 p->zVfsName = pVfs->zName;
@@ -160786,11 +160825,11 @@
160786 /*
160787 ** Close the dynamic library handle pHandle.
160788 */
160789 static void rbuVfsDlClose(sqlite3_vfs *pVfs, void *pHandle){
160790 sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
160791 return pRealVfs->xDlClose(pRealVfs, pHandle);
160792 }
160793 #endif /* SQLITE_OMIT_LOAD_EXTENSION */
160794
160795 /*
160796 ** Populate the buffer pointed to by zBufOut with nByte bytes of
160797
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -325,11 +325,11 @@
325 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
326 ** [sqlite_version()] and [sqlite_source_id()].
327 */
328 #define SQLITE_VERSION "3.8.11"
329 #define SQLITE_VERSION_NUMBER 3008011
330 #define SQLITE_SOURCE_ID "2015-07-27 13:49:41 b8e92227a469de677a66da62e4361f099c0b79d0"
331
332 /*
333 ** CAPI3REF: Run-Time Library Version Numbers
334 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
335 **
@@ -3774,10 +3774,11 @@
3774 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3775 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
3776 void(*)(void*), unsigned char encoding);
3777 SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3778 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3779 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
3780
3781 /*
3782 ** CAPI3REF: Number Of SQL Parameters
3783 ** METHOD: sqlite3_stmt
3784 **
@@ -4746,12 +4747,12 @@
4747 ** ^The sqlite3_result_blob() interface sets the result from
4748 ** an application-defined function to be the BLOB whose content is pointed
4749 ** to by the second parameter and which is N bytes long where N is the
4750 ** third parameter.
4751 **
4752 ** ^The sqlite3_result_zeroblob() and zeroblob64() interfaces set the result
4753 ** of the application-defined function to be a BLOB containing all zero
4754 ** bytes and N bytes in size, where N is the value of the 2nd parameter.
4755 **
4756 ** ^The sqlite3_result_double() interface sets the result from
4757 ** an application-defined function to be a floating point value specified
4758 ** by its 2nd argument.
@@ -4863,10 +4864,11 @@
4864 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4865 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4866 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4867 SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4868 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
4869 SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
4870
4871 /*
4872 ** CAPI3REF: Define New Collating Sequences
4873 ** METHOD: sqlite3
4874 **
@@ -8361,14 +8363,18 @@
8363
8364 /*
8365 ** Make sure that the compiler intrinsics we desire are enabled when
8366 ** compiling with an appropriate version of MSVC.
8367 */
8368 #if defined(_MSC_VER) && _MSC_VER>=1300
8369 # if !defined(_WIN32_WCE)
8370 # include <intrin.h>
8371 # pragma intrinsic(_byteswap_ushort)
8372 # pragma intrinsic(_byteswap_ulong)
8373 # else
8374 # include <cmnintrin.h>
8375 # endif
8376 #endif
8377
8378 /*
8379 ** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2.
8380 ** 0 means mutexes are permanently disable and the library is never
@@ -70299,11 +70305,14 @@
70305 ** structure.
70306 */
70307 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){
70308 Mem *p = (Mem*)pVal;
70309 if( p->flags & (MEM_Blob|MEM_Str) ){
70310 if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){
70311 assert( p->flags==MEM_Null && p->z==0 );
70312 return 0;
70313 }
70314 p->flags |= MEM_Blob;
70315 return p->n ? p->z : 0;
70316 }else{
70317 return sqlite3_value_text(pVal);
70318 }
@@ -70560,10 +70569,19 @@
70569 sqlite3VdbeMemCopy(pCtx->pOut, pValue);
70570 }
70571 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
70572 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
70573 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n);
70574 }
70575 SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
70576 Mem *pOut = pCtx->pOut;
70577 assert( sqlite3_mutex_held(pOut->db->mutex) );
70578 if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
70579 return SQLITE_TOOBIG;
70580 }
70581 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
70582 return SQLITE_OK;
70583 }
70584 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
70585 pCtx->isError = errCode;
70586 pCtx->fErrorOrAux = 1;
70587 #ifdef SQLITE_DEBUG
@@ -71539,10 +71557,24 @@
71557 if( rc==SQLITE_OK ){
71558 sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
71559 sqlite3_mutex_leave(p->db->mutex);
71560 }
71561 return rc;
71562 }
71563 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
71564 int rc;
71565 Vdbe *p = (Vdbe *)pStmt;
71566 sqlite3_mutex_enter(p->db->mutex);
71567 if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){
71568 rc = SQLITE_TOOBIG;
71569 }else{
71570 assert( (n & 0x7FFFFFFF)==n );
71571 rc = sqlite3_bind_zeroblob(pStmt, i, n);
71572 }
71573 rc = sqlite3ApiExit(p->db, rc);
71574 sqlite3_mutex_leave(p->db->mutex);
71575 return rc;
71576 }
71577
71578 /*
71579 ** Return the number of wildcards that can be potentially bound to.
71580 ** This routine is added to support DBD::SQLite.
@@ -74756,11 +74788,11 @@
74788 assert( memIsValid(pRec) );
74789 pRec->uTemp = serial_type = sqlite3VdbeSerialType(pRec, file_format);
74790 len = sqlite3VdbeSerialTypeLen(serial_type);
74791 if( pRec->flags & MEM_Zero ){
74792 if( nData ){
74793 if( sqlite3VdbeMemExpandBlob(pRec) ) goto no_mem;
74794 }else{
74795 nZero += pRec->u.nZero;
74796 len -= pRec->u.nZero;
74797 }
74798 }
@@ -98641,20 +98673,18 @@
98673 sqlite3_context *context,
98674 int argc,
98675 sqlite3_value **argv
98676 ){
98677 i64 n;
98678 int rc;
98679 assert( argc==1 );
98680 UNUSED_PARAMETER(argc);
98681 n = sqlite3_value_int64(argv[0]);
98682 if( n<0 ) n = 0;
98683 rc = sqlite3_result_zeroblob64(context, n); /* IMP: R-00293-64994 */
98684 if( rc ){
98685 sqlite3_result_error_code(context, rc);
 
 
98686 }
98687 }
98688
98689 /*
98690 ** The replace() function. Three arguments are all strings: call
@@ -103221,10 +103251,12 @@
103251 void(*)(void*), unsigned char);
103252 int (*strglob)(const char*,const char*);
103253 /* Version 3.8.11 and later */
103254 sqlite3_value *(*value_dup)(const sqlite3_value*);
103255 void (*value_free)(sqlite3_value*);
103256 int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);
103257 int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);
103258 };
103259
103260 /*
103261 ** The following macros redefine the API routines so that they are
103262 ** redirected through the global sqlite3_api structure.
@@ -103454,10 +103486,12 @@
103486 #define sqlite3_result_text64 sqlite3_api->result_text64
103487 #define sqlite3_strglob sqlite3_api->strglob
103488 /* Version 3.8.11 and later */
103489 #define sqlite3_value_dup sqlite3_api->value_dup
103490 #define sqlite3_value_free sqlite3_api->value_free
103491 #define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64
103492 #define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64
103493 #endif /* SQLITE_CORE */
103494
103495 #ifndef SQLITE_CORE
103496 /* This case when the file really is being compiled as a loadable
103497 ** extension */
@@ -103863,11 +103897,13 @@
103897 sqlite3_result_blob64,
103898 sqlite3_result_text64,
103899 sqlite3_strglob,
103900 /* Version 3.8.11 and later */
103901 (sqlite3_value*(*)(const sqlite3_value*))sqlite3_value_dup,
103902 sqlite3_value_free,
103903 sqlite3_result_zeroblob64,
103904 sqlite3_bind_zeroblob64
103905 };
103906
103907 /*
103908 ** Attempt to load an SQLite extension library contained in the file
103909 ** zFile. The entry point is zProc. zProc may be 0 in which case a
@@ -138650,11 +138686,10 @@
138686 ** tokens or prefix tokens that cannot use a prefix-index. */
138687 int bHaveIncr = 0;
138688 int bIncrOk = (bOptOk
138689 && pCsr->bDesc==pTab->bDescIdx
138690 && p->nToken<=MAX_INCR_PHRASE_TOKENS && p->nToken>0
 
138691 #ifdef SQLITE_TEST
138692 && pTab->bNoIncrDoclist==0
138693 #endif
138694 );
138695 for(i=0; bIncrOk==1 && i<p->nToken; i++){
@@ -156922,11 +156957,14 @@
156957 */
156958
156959 /* #include <assert.h> */
156960 /* #include <string.h> */
156961 /* #include <stdio.h> */
156962
156963 #if !defined(_WIN32)
156964 /* # include <unistd.h> */
156965 #endif
156966
156967 /* #include "sqlite3.h" */
156968
156969 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU)
156970 /************** Include sqlite3rbu.h in the middle of sqlite3rbu.c ***********/
@@ -156978,11 +157016,11 @@
157016 ** mobile device that is frequently rebooted. Even after the writer process
157017 ** has committed one or more sub-transactions, other database clients continue
157018 ** to read from the original database snapshot. In other words, partially
157019 ** applied transactions are not visible to other clients.
157020 **
157021 ** "RBU" stands for "Resumable Bulk Update". As in a large database update
157022 ** transmitted via a wireless network to a mobile device. A transaction
157023 ** applied using this extension is hence refered to as an "RBU update".
157024 **
157025 **
157026 ** LIMITATIONS
@@ -157829,11 +157867,11 @@
157867 int rc;
157868 memset(pIter, 0, sizeof(RbuObjIter));
157869
157870 rc = prepareAndCollectError(p->dbRbu, &pIter->pTblIter, &p->zErrmsg,
157871 "SELECT substr(name, 6) FROM sqlite_master "
157872 "WHERE type IN ('table', 'view') AND name LIKE 'data_%'"
157873 );
157874
157875 if( rc==SQLITE_OK ){
157876 rc = prepareAndCollectError(p->dbMain, &pIter->pIdxIter, &p->zErrmsg,
157877 "SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' "
@@ -157881,12 +157919,13 @@
157919 ** RBU handle. If an error has already occurred when this function is
157920 ** called, it is a no-op.
157921 */
157922 static int rbuMPrintfExec(sqlite3rbu *p, sqlite3 *db, const char *zFmt, ...){
157923 va_list ap;
157924 char *zSql;
157925 va_start(ap, zFmt);
157926 zSql = sqlite3_vmprintf(zFmt, ap);
157927 if( p->rc==SQLITE_OK ){
157928 if( zSql==0 ){
157929 p->rc = SQLITE_NOMEM;
157930 }else{
157931 p->rc = sqlite3_exec(db, zSql, 0, 0, &p->zErrmsg);
@@ -159901,11 +159940,11 @@
159940 int rnd;
159941 char zRnd[64];
159942
159943 assert( p->rc==SQLITE_OK );
159944 sqlite3_randomness(sizeof(int), (void*)&rnd);
159945 sqlite3_snprintf(sizeof(zRnd), zRnd, "rbu_vfs_%d", rnd);
159946 p->rc = sqlite3rbu_create_vfs(zRnd, 0);
159947 if( p->rc==SQLITE_OK ){
159948 sqlite3_vfs *pVfs = sqlite3_vfs_find(zRnd);
159949 assert( pVfs );
159950 p->zVfsName = pVfs->zName;
@@ -160786,11 +160825,11 @@
160825 /*
160826 ** Close the dynamic library handle pHandle.
160827 */
160828 static void rbuVfsDlClose(sqlite3_vfs *pVfs, void *pHandle){
160829 sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
160830 pRealVfs->xDlClose(pRealVfs, pHandle);
160831 }
160832 #endif /* SQLITE_OMIT_LOAD_EXTENSION */
160833
160834 /*
160835 ** Populate the buffer pointed to by zBufOut with nByte bytes of
160836
+5 -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.8.11"
115115
#define SQLITE_VERSION_NUMBER 3008011
116
-#define SQLITE_SOURCE_ID "2015-07-23 20:44:49 017c5019e1ce042025d4f327e50ec50af49f9fa4"
116
+#define SQLITE_SOURCE_ID "2015-07-27 13:49:41 b8e92227a469de677a66da62e4361f099c0b79d0"
117117
118118
/*
119119
** CAPI3REF: Run-Time Library Version Numbers
120120
** KEYWORDS: sqlite3_version, sqlite3_sourceid
121121
**
@@ -3560,10 +3560,11 @@
35603560
SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
35613561
SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
35623562
void(*)(void*), unsigned char encoding);
35633563
SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
35643564
SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3565
+SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
35653566
35663567
/*
35673568
** CAPI3REF: Number Of SQL Parameters
35683569
** METHOD: sqlite3_stmt
35693570
**
@@ -4532,12 +4533,12 @@
45324533
** ^The sqlite3_result_blob() interface sets the result from
45334534
** an application-defined function to be the BLOB whose content is pointed
45344535
** to by the second parameter and which is N bytes long where N is the
45354536
** third parameter.
45364537
**
4537
-** ^The sqlite3_result_zeroblob() interfaces set the result of
4538
-** the application-defined function to be a BLOB containing all zero
4538
+** ^The sqlite3_result_zeroblob() and zeroblob64() interfaces set the result
4539
+** of the application-defined function to be a BLOB containing all zero
45394540
** bytes and N bytes in size, where N is the value of the 2nd parameter.
45404541
**
45414542
** ^The sqlite3_result_double() interface sets the result from
45424543
** an application-defined function to be a floating point value specified
45434544
** by its 2nd argument.
@@ -4649,10 +4650,11 @@
46494650
SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
46504651
SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
46514652
SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
46524653
SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
46534654
SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
4655
+SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
46544656
46554657
/*
46564658
** CAPI3REF: Define New Collating Sequences
46574659
** METHOD: sqlite3
46584660
**
46594661
--- 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.8.11"
115 #define SQLITE_VERSION_NUMBER 3008011
116 #define SQLITE_SOURCE_ID "2015-07-23 20:44:49 017c5019e1ce042025d4f327e50ec50af49f9fa4"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
@@ -3560,10 +3560,11 @@
3560 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3561 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
3562 void(*)(void*), unsigned char encoding);
3563 SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3564 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
 
3565
3566 /*
3567 ** CAPI3REF: Number Of SQL Parameters
3568 ** METHOD: sqlite3_stmt
3569 **
@@ -4532,12 +4533,12 @@
4532 ** ^The sqlite3_result_blob() interface sets the result from
4533 ** an application-defined function to be the BLOB whose content is pointed
4534 ** to by the second parameter and which is N bytes long where N is the
4535 ** third parameter.
4536 **
4537 ** ^The sqlite3_result_zeroblob() interfaces set the result of
4538 ** the application-defined function to be a BLOB containing all zero
4539 ** bytes and N bytes in size, where N is the value of the 2nd parameter.
4540 **
4541 ** ^The sqlite3_result_double() interface sets the result from
4542 ** an application-defined function to be a floating point value specified
4543 ** by its 2nd argument.
@@ -4649,10 +4650,11 @@
4649 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4650 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4651 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4652 SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4653 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
 
4654
4655 /*
4656 ** CAPI3REF: Define New Collating Sequences
4657 ** METHOD: sqlite3
4658 **
4659
--- 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.8.11"
115 #define SQLITE_VERSION_NUMBER 3008011
116 #define SQLITE_SOURCE_ID "2015-07-27 13:49:41 b8e92227a469de677a66da62e4361f099c0b79d0"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
@@ -3560,10 +3560,11 @@
3560 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3561 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
3562 void(*)(void*), unsigned char encoding);
3563 SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3564 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3565 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
3566
3567 /*
3568 ** CAPI3REF: Number Of SQL Parameters
3569 ** METHOD: sqlite3_stmt
3570 **
@@ -4532,12 +4533,12 @@
4533 ** ^The sqlite3_result_blob() interface sets the result from
4534 ** an application-defined function to be the BLOB whose content is pointed
4535 ** to by the second parameter and which is N bytes long where N is the
4536 ** third parameter.
4537 **
4538 ** ^The sqlite3_result_zeroblob() and zeroblob64() interfaces set the result
4539 ** of the application-defined function to be a BLOB containing all zero
4540 ** bytes and N bytes in size, where N is the value of the 2nd parameter.
4541 **
4542 ** ^The sqlite3_result_double() interface sets the result from
4543 ** an application-defined function to be a floating point value specified
4544 ** by its 2nd argument.
@@ -4649,10 +4650,11 @@
4650 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4651 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4652 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4653 SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4654 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
4655 SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
4656
4657 /*
4658 ** CAPI3REF: Define New Collating Sequences
4659 ** METHOD: sqlite3
4660 **
4661

Keyboard Shortcuts

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