Fossil SCM

Update the built-in SQLite to version 3.9.1.

drh 2015-10-16 20:05 trunk
Commit 3cff1b8f0a6467b7a2e04263a1f8c9a19f4257de
2 files changed +225 -207 +3 -3
+225 -207
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,8 +1,8 @@
11
/******************************************************************************
22
** This file is an amalgamation of many separate C source files from SQLite
3
-** version 3.9.0. By combining all the individual C code files into this
3
+** version 3.9.1. By combining all the individual C code files into this
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
77
** of 5% or more are commonly seen when SQLite is compiled as a single
88
** translation unit.
@@ -323,13 +323,13 @@
323323
**
324324
** See also: [sqlite3_libversion()],
325325
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
326326
** [sqlite_version()] and [sqlite_source_id()].
327327
*/
328
-#define SQLITE_VERSION "3.9.0"
329
-#define SQLITE_VERSION_NUMBER 3009000
330
-#define SQLITE_SOURCE_ID "2015-10-15 12:06:11 a61880c223c2229ecc3b4da7e5647eca17f7ddf5"
328
+#define SQLITE_VERSION "3.9.1"
329
+#define SQLITE_VERSION_NUMBER 3009001
330
+#define SQLITE_SOURCE_ID "2015-10-16 17:31:12 767c1727fec4ce11b83f25b3f1bfcfe68a2c8b02"
331331
332332
/*
333333
** CAPI3REF: Run-Time Library Version Numbers
334334
** KEYWORDS: sqlite3_version, sqlite3_sourceid
335335
**
@@ -10430,11 +10430,11 @@
1043010430
** header file that defines a number for each opcode used by the VDBE.
1043110431
*/
1043210432
/************** Include opcodes.h in the middle of vdbe.h ********************/
1043310433
/************** Begin file opcodes.h *****************************************/
1043410434
/* Automatically generated. Do not edit */
10435
-/* See the tool/mkopcodeh.tcl script for details */
10435
+/* See the mkopcodeh.awk script for details */
1043610436
#define OP_Savepoint 1
1043710437
#define OP_AutoCommit 2
1043810438
#define OP_Transaction 3
1043910439
#define OP_SorterNext 4
1044010440
#define OP_PrevIfOpen 5
@@ -10591,10 +10591,11 @@
1059110591
#define OP_Pagecount 156
1059210592
#define OP_MaxPgcnt 157
1059310593
#define OP_Init 158 /* synopsis: Start at P2 */
1059410594
#define OP_Noop 159
1059510595
#define OP_Explain 160
10596
+
1059610597
1059710598
/* Properties such as "out2" or "jump" that are specified in
1059810599
** comments following the "case" for each opcode in the vdbe.c
1059910600
** are encoded into bitvectors as follows:
1060010601
*/
@@ -26243,181 +26244,179 @@
2624326244
}
2624426245
2624526246
/************** End of hash.c ************************************************/
2624626247
/************** Begin file opcodes.c *****************************************/
2624726248
/* Automatically generated. Do not edit */
26248
-/* See the tool/mkopcodec.tcl script for details. */
26249
-#if !defined(SQLITE_OMIT_EXPLAIN) \
26250
- || defined(VDBE_PROFILE) \
26251
- || defined(SQLITE_DEBUG)
26249
+/* See the mkopcodec.awk script for details. */
26250
+#if !defined(SQLITE_OMIT_EXPLAIN) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
2625226251
#if defined(SQLITE_ENABLE_EXPLAIN_COMMENTS) || defined(SQLITE_DEBUG)
2625326252
# define OpHelp(X) "\0" X
2625426253
#else
2625526254
# define OpHelp(X)
2625626255
#endif
2625726256
SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
2625826257
static const char *const azName[] = { "?",
26259
- /* 1 */ "Savepoint" OpHelp(""),
26260
- /* 2 */ "AutoCommit" OpHelp(""),
26261
- /* 3 */ "Transaction" OpHelp(""),
26262
- /* 4 */ "SorterNext" OpHelp(""),
26263
- /* 5 */ "PrevIfOpen" OpHelp(""),
26264
- /* 6 */ "NextIfOpen" OpHelp(""),
26265
- /* 7 */ "Prev" OpHelp(""),
26266
- /* 8 */ "Next" OpHelp(""),
26267
- /* 9 */ "Checkpoint" OpHelp(""),
26268
- /* 10 */ "JournalMode" OpHelp(""),
26269
- /* 11 */ "Vacuum" OpHelp(""),
26270
- /* 12 */ "VFilter" OpHelp("iplan=r[P3] zplan='P4'"),
26271
- /* 13 */ "VUpdate" OpHelp("data=r[P3@P2]"),
26272
- /* 14 */ "Goto" OpHelp(""),
26273
- /* 15 */ "Gosub" OpHelp(""),
26274
- /* 16 */ "Return" OpHelp(""),
26275
- /* 17 */ "InitCoroutine" OpHelp(""),
26276
- /* 18 */ "EndCoroutine" OpHelp(""),
26277
- /* 19 */ "Not" OpHelp("r[P2]= !r[P1]"),
26278
- /* 20 */ "Yield" OpHelp(""),
26279
- /* 21 */ "HaltIfNull" OpHelp("if r[P3]=null halt"),
26280
- /* 22 */ "Halt" OpHelp(""),
26281
- /* 23 */ "Integer" OpHelp("r[P2]=P1"),
26282
- /* 24 */ "Int64" OpHelp("r[P2]=P4"),
26283
- /* 25 */ "String" OpHelp("r[P2]='P4' (len=P1)"),
26284
- /* 26 */ "Null" OpHelp("r[P2..P3]=NULL"),
26285
- /* 27 */ "SoftNull" OpHelp("r[P1]=NULL"),
26286
- /* 28 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"),
26287
- /* 29 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"),
26288
- /* 30 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"),
26289
- /* 31 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
26290
- /* 32 */ "SCopy" OpHelp("r[P2]=r[P1]"),
26291
- /* 33 */ "ResultRow" OpHelp("output=r[P1@P2]"),
26292
- /* 34 */ "CollSeq" OpHelp(""),
26293
- /* 35 */ "Function0" OpHelp("r[P3]=func(r[P2@P5])"),
26294
- /* 36 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"),
26295
- /* 37 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"),
26296
- /* 38 */ "MustBeInt" OpHelp(""),
26297
- /* 39 */ "RealAffinity" OpHelp(""),
26298
- /* 40 */ "Cast" OpHelp("affinity(r[P1])"),
26299
- /* 41 */ "Permutation" OpHelp(""),
26300
- /* 42 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"),
26301
- /* 43 */ "Jump" OpHelp(""),
26302
- /* 44 */ "Once" OpHelp(""),
26303
- /* 45 */ "If" OpHelp(""),
26304
- /* 46 */ "IfNot" OpHelp(""),
26305
- /* 47 */ "Column" OpHelp("r[P3]=PX"),
26306
- /* 48 */ "Affinity" OpHelp("affinity(r[P1@P2])"),
26307
- /* 49 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"),
26308
- /* 50 */ "Count" OpHelp("r[P2]=count()"),
26309
- /* 51 */ "ReadCookie" OpHelp(""),
26310
- /* 52 */ "SetCookie" OpHelp(""),
26311
- /* 53 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
26312
- /* 54 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
26313
- /* 55 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
26314
- /* 56 */ "OpenAutoindex" OpHelp("nColumn=P2"),
26315
- /* 57 */ "OpenEphemeral" OpHelp("nColumn=P2"),
26316
- /* 58 */ "SorterOpen" OpHelp(""),
26317
- /* 59 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
26318
- /* 60 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
26319
- /* 61 */ "Close" OpHelp(""),
26320
- /* 62 */ "ColumnsUsed" OpHelp(""),
26321
- /* 63 */ "SeekLT" OpHelp("key=r[P3@P4]"),
26322
- /* 64 */ "SeekLE" OpHelp("key=r[P3@P4]"),
26323
- /* 65 */ "SeekGE" OpHelp("key=r[P3@P4]"),
26324
- /* 66 */ "SeekGT" OpHelp("key=r[P3@P4]"),
26325
- /* 67 */ "Seek" OpHelp("intkey=r[P2]"),
26326
- /* 68 */ "NoConflict" OpHelp("key=r[P3@P4]"),
26327
- /* 69 */ "NotFound" OpHelp("key=r[P3@P4]"),
26328
- /* 70 */ "Found" OpHelp("key=r[P3@P4]"),
26329
- /* 71 */ "Or" OpHelp("r[P3]=(r[P1] || r[P2])"),
26330
- /* 72 */ "And" OpHelp("r[P3]=(r[P1] && r[P2])"),
26331
- /* 73 */ "NotExists" OpHelp("intkey=r[P3]"),
26332
- /* 74 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"),
26333
- /* 75 */ "NewRowid" OpHelp("r[P2]=rowid"),
26334
- /* 76 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
26335
- /* 77 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
26336
- /* 78 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
26337
- /* 79 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"),
26338
- /* 80 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"),
26339
- /* 81 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
26340
- /* 82 */ "Lt" OpHelp("if r[P1]<r[P3] goto P2"),
26341
- /* 83 */ "Ge" OpHelp("if r[P1]>=r[P3] goto P2"),
26342
- /* 84 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"),
26343
- /* 85 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
26344
- /* 86 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
26345
- /* 87 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
26346
- /* 88 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
26347
- /* 89 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
26348
- /* 90 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
26349
- /* 91 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
26350
- /* 92 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
26351
- /* 93 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
26352
- /* 94 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
26353
- /* 95 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"),
26354
- /* 96 */ "BitNot" OpHelp("r[P1]= ~r[P1]"),
26355
- /* 97 */ "String8" OpHelp("r[P2]='P4'"),
26356
- /* 98 */ "Delete" OpHelp(""),
26357
- /* 99 */ "ResetCount" OpHelp(""),
26358
- /* 100 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
26359
- /* 101 */ "SorterData" OpHelp("r[P2]=data"),
26360
- /* 102 */ "RowKey" OpHelp("r[P2]=key"),
26361
- /* 103 */ "RowData" OpHelp("r[P2]=data"),
26362
- /* 104 */ "Rowid" OpHelp("r[P2]=rowid"),
26363
- /* 105 */ "NullRow" OpHelp(""),
26364
- /* 106 */ "Last" OpHelp(""),
26365
- /* 107 */ "SorterSort" OpHelp(""),
26366
- /* 108 */ "Sort" OpHelp(""),
26367
- /* 109 */ "Rewind" OpHelp(""),
26368
- /* 110 */ "SorterInsert" OpHelp(""),
26369
- /* 111 */ "IdxInsert" OpHelp("key=r[P2]"),
26370
- /* 112 */ "IdxDelete" OpHelp("key=r[P2@P3]"),
26371
- /* 113 */ "IdxRowid" OpHelp("r[P2]=rowid"),
26372
- /* 114 */ "IdxLE" OpHelp("key=r[P3@P4]"),
26373
- /* 115 */ "IdxGT" OpHelp("key=r[P3@P4]"),
26374
- /* 116 */ "IdxLT" OpHelp("key=r[P3@P4]"),
26375
- /* 117 */ "IdxGE" OpHelp("key=r[P3@P4]"),
26376
- /* 118 */ "Destroy" OpHelp(""),
26377
- /* 119 */ "Clear" OpHelp(""),
26378
- /* 120 */ "ResetSorter" OpHelp(""),
26379
- /* 121 */ "CreateIndex" OpHelp("r[P2]=root iDb=P1"),
26380
- /* 122 */ "CreateTable" OpHelp("r[P2]=root iDb=P1"),
26381
- /* 123 */ "ParseSchema" OpHelp(""),
26382
- /* 124 */ "LoadAnalysis" OpHelp(""),
26383
- /* 125 */ "DropTable" OpHelp(""),
26384
- /* 126 */ "DropIndex" OpHelp(""),
26385
- /* 127 */ "DropTrigger" OpHelp(""),
26386
- /* 128 */ "IntegrityCk" OpHelp(""),
26387
- /* 129 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
26388
- /* 130 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
26389
- /* 131 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
26390
- /* 132 */ "Program" OpHelp(""),
26391
- /* 133 */ "Real" OpHelp("r[P2]=P4"),
26392
- /* 134 */ "Param" OpHelp(""),
26393
- /* 135 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
26394
- /* 136 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
26395
- /* 137 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
26396
- /* 138 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
26397
- /* 139 */ "SetIfNotPos" OpHelp("if r[P1]<=0 then r[P2]=P3"),
26398
- /* 140 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]-=P3, goto P2"),
26399
- /* 141 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
26400
- /* 142 */ "JumpZeroIncr" OpHelp("if (r[P1]++)==0 ) goto P2"),
26401
- /* 143 */ "AggStep0" OpHelp("accum=r[P3] step(r[P2@P5])"),
26402
- /* 144 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"),
26403
- /* 145 */ "AggFinal" OpHelp("accum=r[P1] N=P2"),
26404
- /* 146 */ "IncrVacuum" OpHelp(""),
26405
- /* 147 */ "Expire" OpHelp(""),
26406
- /* 148 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"),
26407
- /* 149 */ "VBegin" OpHelp(""),
26408
- /* 150 */ "VCreate" OpHelp(""),
26409
- /* 151 */ "VDestroy" OpHelp(""),
26410
- /* 152 */ "VOpen" OpHelp(""),
26411
- /* 153 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"),
26412
- /* 154 */ "VNext" OpHelp(""),
26413
- /* 155 */ "VRename" OpHelp(""),
26414
- /* 156 */ "Pagecount" OpHelp(""),
26415
- /* 157 */ "MaxPgcnt" OpHelp(""),
26416
- /* 158 */ "Init" OpHelp("Start at P2"),
26417
- /* 159 */ "Noop" OpHelp(""),
26418
- /* 160 */ "Explain" OpHelp(""),
26258
+ /* 1 */ "Savepoint" OpHelp(""),
26259
+ /* 2 */ "AutoCommit" OpHelp(""),
26260
+ /* 3 */ "Transaction" OpHelp(""),
26261
+ /* 4 */ "SorterNext" OpHelp(""),
26262
+ /* 5 */ "PrevIfOpen" OpHelp(""),
26263
+ /* 6 */ "NextIfOpen" OpHelp(""),
26264
+ /* 7 */ "Prev" OpHelp(""),
26265
+ /* 8 */ "Next" OpHelp(""),
26266
+ /* 9 */ "Checkpoint" OpHelp(""),
26267
+ /* 10 */ "JournalMode" OpHelp(""),
26268
+ /* 11 */ "Vacuum" OpHelp(""),
26269
+ /* 12 */ "VFilter" OpHelp("iplan=r[P3] zplan='P4'"),
26270
+ /* 13 */ "VUpdate" OpHelp("data=r[P3@P2]"),
26271
+ /* 14 */ "Goto" OpHelp(""),
26272
+ /* 15 */ "Gosub" OpHelp(""),
26273
+ /* 16 */ "Return" OpHelp(""),
26274
+ /* 17 */ "InitCoroutine" OpHelp(""),
26275
+ /* 18 */ "EndCoroutine" OpHelp(""),
26276
+ /* 19 */ "Not" OpHelp("r[P2]= !r[P1]"),
26277
+ /* 20 */ "Yield" OpHelp(""),
26278
+ /* 21 */ "HaltIfNull" OpHelp("if r[P3]=null halt"),
26279
+ /* 22 */ "Halt" OpHelp(""),
26280
+ /* 23 */ "Integer" OpHelp("r[P2]=P1"),
26281
+ /* 24 */ "Int64" OpHelp("r[P2]=P4"),
26282
+ /* 25 */ "String" OpHelp("r[P2]='P4' (len=P1)"),
26283
+ /* 26 */ "Null" OpHelp("r[P2..P3]=NULL"),
26284
+ /* 27 */ "SoftNull" OpHelp("r[P1]=NULL"),
26285
+ /* 28 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"),
26286
+ /* 29 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"),
26287
+ /* 30 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"),
26288
+ /* 31 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
26289
+ /* 32 */ "SCopy" OpHelp("r[P2]=r[P1]"),
26290
+ /* 33 */ "ResultRow" OpHelp("output=r[P1@P2]"),
26291
+ /* 34 */ "CollSeq" OpHelp(""),
26292
+ /* 35 */ "Function0" OpHelp("r[P3]=func(r[P2@P5])"),
26293
+ /* 36 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"),
26294
+ /* 37 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"),
26295
+ /* 38 */ "MustBeInt" OpHelp(""),
26296
+ /* 39 */ "RealAffinity" OpHelp(""),
26297
+ /* 40 */ "Cast" OpHelp("affinity(r[P1])"),
26298
+ /* 41 */ "Permutation" OpHelp(""),
26299
+ /* 42 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"),
26300
+ /* 43 */ "Jump" OpHelp(""),
26301
+ /* 44 */ "Once" OpHelp(""),
26302
+ /* 45 */ "If" OpHelp(""),
26303
+ /* 46 */ "IfNot" OpHelp(""),
26304
+ /* 47 */ "Column" OpHelp("r[P3]=PX"),
26305
+ /* 48 */ "Affinity" OpHelp("affinity(r[P1@P2])"),
26306
+ /* 49 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"),
26307
+ /* 50 */ "Count" OpHelp("r[P2]=count()"),
26308
+ /* 51 */ "ReadCookie" OpHelp(""),
26309
+ /* 52 */ "SetCookie" OpHelp(""),
26310
+ /* 53 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
26311
+ /* 54 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
26312
+ /* 55 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
26313
+ /* 56 */ "OpenAutoindex" OpHelp("nColumn=P2"),
26314
+ /* 57 */ "OpenEphemeral" OpHelp("nColumn=P2"),
26315
+ /* 58 */ "SorterOpen" OpHelp(""),
26316
+ /* 59 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
26317
+ /* 60 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
26318
+ /* 61 */ "Close" OpHelp(""),
26319
+ /* 62 */ "ColumnsUsed" OpHelp(""),
26320
+ /* 63 */ "SeekLT" OpHelp("key=r[P3@P4]"),
26321
+ /* 64 */ "SeekLE" OpHelp("key=r[P3@P4]"),
26322
+ /* 65 */ "SeekGE" OpHelp("key=r[P3@P4]"),
26323
+ /* 66 */ "SeekGT" OpHelp("key=r[P3@P4]"),
26324
+ /* 67 */ "Seek" OpHelp("intkey=r[P2]"),
26325
+ /* 68 */ "NoConflict" OpHelp("key=r[P3@P4]"),
26326
+ /* 69 */ "NotFound" OpHelp("key=r[P3@P4]"),
26327
+ /* 70 */ "Found" OpHelp("key=r[P3@P4]"),
26328
+ /* 71 */ "Or" OpHelp("r[P3]=(r[P1] || r[P2])"),
26329
+ /* 72 */ "And" OpHelp("r[P3]=(r[P1] && r[P2])"),
26330
+ /* 73 */ "NotExists" OpHelp("intkey=r[P3]"),
26331
+ /* 74 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"),
26332
+ /* 75 */ "NewRowid" OpHelp("r[P2]=rowid"),
26333
+ /* 76 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
26334
+ /* 77 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
26335
+ /* 78 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
26336
+ /* 79 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"),
26337
+ /* 80 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"),
26338
+ /* 81 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
26339
+ /* 82 */ "Lt" OpHelp("if r[P1]<r[P3] goto P2"),
26340
+ /* 83 */ "Ge" OpHelp("if r[P1]>=r[P3] goto P2"),
26341
+ /* 84 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"),
26342
+ /* 85 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
26343
+ /* 86 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
26344
+ /* 87 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
26345
+ /* 88 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
26346
+ /* 89 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
26347
+ /* 90 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
26348
+ /* 91 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
26349
+ /* 92 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
26350
+ /* 93 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
26351
+ /* 94 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
26352
+ /* 95 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"),
26353
+ /* 96 */ "BitNot" OpHelp("r[P1]= ~r[P1]"),
26354
+ /* 97 */ "String8" OpHelp("r[P2]='P4'"),
26355
+ /* 98 */ "Delete" OpHelp(""),
26356
+ /* 99 */ "ResetCount" OpHelp(""),
26357
+ /* 100 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
26358
+ /* 101 */ "SorterData" OpHelp("r[P2]=data"),
26359
+ /* 102 */ "RowKey" OpHelp("r[P2]=key"),
26360
+ /* 103 */ "RowData" OpHelp("r[P2]=data"),
26361
+ /* 104 */ "Rowid" OpHelp("r[P2]=rowid"),
26362
+ /* 105 */ "NullRow" OpHelp(""),
26363
+ /* 106 */ "Last" OpHelp(""),
26364
+ /* 107 */ "SorterSort" OpHelp(""),
26365
+ /* 108 */ "Sort" OpHelp(""),
26366
+ /* 109 */ "Rewind" OpHelp(""),
26367
+ /* 110 */ "SorterInsert" OpHelp(""),
26368
+ /* 111 */ "IdxInsert" OpHelp("key=r[P2]"),
26369
+ /* 112 */ "IdxDelete" OpHelp("key=r[P2@P3]"),
26370
+ /* 113 */ "IdxRowid" OpHelp("r[P2]=rowid"),
26371
+ /* 114 */ "IdxLE" OpHelp("key=r[P3@P4]"),
26372
+ /* 115 */ "IdxGT" OpHelp("key=r[P3@P4]"),
26373
+ /* 116 */ "IdxLT" OpHelp("key=r[P3@P4]"),
26374
+ /* 117 */ "IdxGE" OpHelp("key=r[P3@P4]"),
26375
+ /* 118 */ "Destroy" OpHelp(""),
26376
+ /* 119 */ "Clear" OpHelp(""),
26377
+ /* 120 */ "ResetSorter" OpHelp(""),
26378
+ /* 121 */ "CreateIndex" OpHelp("r[P2]=root iDb=P1"),
26379
+ /* 122 */ "CreateTable" OpHelp("r[P2]=root iDb=P1"),
26380
+ /* 123 */ "ParseSchema" OpHelp(""),
26381
+ /* 124 */ "LoadAnalysis" OpHelp(""),
26382
+ /* 125 */ "DropTable" OpHelp(""),
26383
+ /* 126 */ "DropIndex" OpHelp(""),
26384
+ /* 127 */ "DropTrigger" OpHelp(""),
26385
+ /* 128 */ "IntegrityCk" OpHelp(""),
26386
+ /* 129 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
26387
+ /* 130 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
26388
+ /* 131 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
26389
+ /* 132 */ "Program" OpHelp(""),
26390
+ /* 133 */ "Real" OpHelp("r[P2]=P4"),
26391
+ /* 134 */ "Param" OpHelp(""),
26392
+ /* 135 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
26393
+ /* 136 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
26394
+ /* 137 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
26395
+ /* 138 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
26396
+ /* 139 */ "SetIfNotPos" OpHelp("if r[P1]<=0 then r[P2]=P3"),
26397
+ /* 140 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]-=P3, goto P2"),
26398
+ /* 141 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
26399
+ /* 142 */ "JumpZeroIncr" OpHelp("if (r[P1]++)==0 ) goto P2"),
26400
+ /* 143 */ "AggStep0" OpHelp("accum=r[P3] step(r[P2@P5])"),
26401
+ /* 144 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"),
26402
+ /* 145 */ "AggFinal" OpHelp("accum=r[P1] N=P2"),
26403
+ /* 146 */ "IncrVacuum" OpHelp(""),
26404
+ /* 147 */ "Expire" OpHelp(""),
26405
+ /* 148 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"),
26406
+ /* 149 */ "VBegin" OpHelp(""),
26407
+ /* 150 */ "VCreate" OpHelp(""),
26408
+ /* 151 */ "VDestroy" OpHelp(""),
26409
+ /* 152 */ "VOpen" OpHelp(""),
26410
+ /* 153 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"),
26411
+ /* 154 */ "VNext" OpHelp(""),
26412
+ /* 155 */ "VRename" OpHelp(""),
26413
+ /* 156 */ "Pagecount" OpHelp(""),
26414
+ /* 157 */ "MaxPgcnt" OpHelp(""),
26415
+ /* 158 */ "Init" OpHelp("Start at P2"),
26416
+ /* 159 */ "Noop" OpHelp(""),
26417
+ /* 160 */ "Explain" OpHelp(""),
2641926418
};
2642026419
return azName[i];
2642126420
}
2642226421
#endif
2642326422
@@ -81055,11 +81054,11 @@
8105581054
pKeyInfo->nXField += (pKeyInfo->nField - nField);
8105681055
pKeyInfo->nField = nField;
8105781056
}
8105881057
pSorter->pgsz = pgsz = sqlite3BtreeGetPageSize(db->aDb[0].pBt);
8105981058
pSorter->nTask = nWorker + 1;
81060
- pSorter->iPrev = (u8)(nWorker - 1);
81059
+ pSorter->iPrev = nWorker-1;
8106181060
pSorter->bUseThreads = (pSorter->nTask>1);
8106281061
pSorter->db = db;
8106381062
for(i=0; i<pSorter->nTask; i++){
8106481063
SortSubtask *pTask = &pSorter->aTask[i];
8106581064
pTask->pSorter = pSorter;
@@ -105178,11 +105177,11 @@
105178105177
** loading is supported. We need a dummy sqlite3Apis pointer for that
105179105178
** code if regular extension loading is not available. This is that
105180105179
** dummy pointer.
105181105180
*/
105182105181
#ifdef SQLITE_OMIT_LOAD_EXTENSION
105183
-static const sqlite3_api_routines sqlite3Apis = { 0 };
105182
+static const sqlite3_api_routines sqlite3Apis;
105184105183
#endif
105185105184
105186105185
105187105186
/*
105188105187
** The following object holds the list of automatically loaded
@@ -163560,11 +163559,10 @@
163560163559
/* #include "sqlite3ext.h" */
163561163560
#endif
163562163561
SQLITE_EXTENSION_INIT1
163563163562
/* #include <assert.h> */
163564163563
/* #include <string.h> */
163565
-#include <ctype.h> /* amalgamator: keep */
163566163564
/* #include <stdlib.h> */
163567163565
/* #include <stdarg.h> */
163568163566
163569163567
#define UNUSED_PARAM(X) (void)(X)
163570163568
@@ -163575,20 +163573,29 @@
163575163573
163576163574
/*
163577163575
** Versions of isspace(), isalnum() and isdigit() to which it is safe
163578163576
** to pass signed char values.
163579163577
*/
163580
-#define safe_isdigit(x) isdigit((unsigned char)(x))
163581
-#define safe_isalnum(x) isalnum((unsigned char)(x))
163578
+#ifdef sqlite3Isdigit
163579
+ /* Use the SQLite core versions if this routine is part of the
163580
+ ** SQLite amalgamation */
163581
+# define safe_isdigit(x) sqlite3Isdigit(x)
163582
+# define safe_isalnum(x) sqlite3Isalnum(x)
163583
+#else
163584
+ /* Use the standard library for separate compilation */
163585
+#include <ctype.h> /* amalgamator: keep */
163586
+# define safe_isdigit(x) isdigit((unsigned char)(x))
163587
+# define safe_isalnum(x) isalnum((unsigned char)(x))
163588
+#endif
163582163589
163583163590
/*
163584163591
** Growing our own isspace() routine this way is twice as fast as
163585163592
** the library isspace() function, resulting in a 7% overall performance
163586163593
** increase for the parser. (Ubuntu14.10 gcc 4.8.4 x64 with -Os).
163587163594
*/
163588163595
static const char jsonIsSpace[] = {
163589
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0,
163596
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
163590163597
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163591163598
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163592163599
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163593163600
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163594163601
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -164046,11 +164053,17 @@
164046164053
int_done:
164047164054
break;
164048164055
int_as_real: /* fall through to real */;
164049164056
}
164050164057
case JSON_REAL: {
164051
- double r = strtod(pNode->u.zJContent, 0);
164058
+ double r;
164059
+#ifdef SQLITE_AMALGAMATION
164060
+ const char *z = pNode->u.zJContent;
164061
+ sqlite3AtoF(z, &r, sqlite3Strlen30(z), SQLITE_UTF8);
164062
+#else
164063
+ r = strtod(pNode->u.zJContent, 0);
164064
+#endif
164052164065
sqlite3_result_double(pCtx, r);
164053164066
break;
164054164067
}
164055164068
case JSON_STRING: {
164056164069
#if 0 /* Never happens because JNODE_RAW is only set by json_set(),
@@ -168135,11 +168148,11 @@
168135168148
int *pRc,
168136168149
HighlightContext *p,
168137168150
const char *z, int n
168138168151
){
168139168152
if( *pRc==SQLITE_OK ){
168140
- if( n<0 ) n = (int)strlen(z);
168153
+ if( n<0 ) n = strlen(z);
168141168154
p->zOut = sqlite3_mprintf("%z%.*s", p->zOut, n, z);
168142168155
if( p->zOut==0 ) *pRc = SQLITE_NOMEM;
168143168156
}
168144168157
}
168145168158
@@ -168649,11 +168662,11 @@
168649168662
static void sqlite3Fts5BufferAppendString(
168650168663
int *pRc,
168651168664
Fts5Buffer *pBuf,
168652168665
const char *zStr
168653168666
){
168654
- int nStr = (int)strlen(zStr);
168667
+ int nStr = strlen(zStr);
168655168668
sqlite3Fts5BufferAppendBlob(pRc, pBuf, nStr+1, (const u8*)zStr);
168656168669
pBuf->n--;
168657168670
}
168658168671
168659168672
/*
@@ -168821,11 +168834,11 @@
168821168834
*/
168822168835
static char *sqlite3Fts5Strndup(int *pRc, const char *pIn, int nIn){
168823168836
char *zRet = 0;
168824168837
if( *pRc==SQLITE_OK ){
168825168838
if( nIn<0 ){
168826
- nIn = (int)strlen(pIn);
168839
+ nIn = strlen(pIn);
168827168840
}
168828168841
zRet = (char*)sqlite3_malloc(nIn+1);
168829168842
if( zRet ){
168830168843
memcpy(zRet, pIn, nIn);
168831168844
zRet[nIn] = '\0';
@@ -169074,11 +169087,11 @@
169074169087
const char *zCmd, /* Special command to parse */
169075169088
const char *zArg, /* Argument to parse */
169076169089
char **pzErr /* OUT: Error message */
169077169090
){
169078169091
int rc = SQLITE_OK;
169079
- int nCmd = (int)strlen(zCmd);
169092
+ int nCmd = strlen(zCmd);
169080169093
if( sqlite3_strnicmp("prefix", zCmd, nCmd)==0 ){
169081169094
const int nByte = sizeof(int) * FTS5_MAX_PREFIX_INDEXES;
169082169095
const char *p;
169083169096
if( pConfig->aPrefix ){
169084169097
*pzErr = sqlite3_mprintf("multiple prefix=... directives");
@@ -169111,11 +169124,11 @@
169111169124
return rc;
169112169125
}
169113169126
169114169127
if( sqlite3_strnicmp("tokenize", zCmd, nCmd)==0 ){
169115169128
const char *p = (const char*)zArg;
169116
- int nArg = (int)strlen(zArg) + 1;
169129
+ int nArg = strlen(zArg) + 1;
169117169130
char **azArg = sqlite3Fts5MallocZero(&rc, sizeof(char*) * nArg);
169118169131
char *pDel = sqlite3Fts5MallocZero(&rc, nArg * 2);
169119169132
char *pSpace = pDel;
169120169133
169121169134
if( azArg && pSpace ){
@@ -169227,11 +169240,11 @@
169227169240
char **pzOut, /* OUT: malloc'd buffer containing str/bw */
169228169241
int *pbQuoted /* OUT: Set to true if dequoting required */
169229169242
){
169230169243
const char *zRet = 0;
169231169244
169232
- int nIn = (int)strlen(zIn);
169245
+ int nIn = strlen(zIn);
169233169246
char *zOut = sqlite3_malloc(nIn+1);
169234169247
169235169248
assert( *pRc==SQLITE_OK );
169236169249
*pbQuoted = 0;
169237169250
*pzOut = 0;
@@ -170637,11 +170650,11 @@
170637170650
if( p->pIter ){
170638170651
sqlite3Fts5IterClose(p->pIter);
170639170652
p->pIter = 0;
170640170653
}
170641170654
rc = sqlite3Fts5IndexQuery(
170642
- pExpr->pIndex, p->zTerm, (int)strlen(p->zTerm),
170655
+ pExpr->pIndex, p->zTerm, strlen(p->zTerm),
170643170656
(pTerm->bPrefix ? FTS5INDEX_QUERY_PREFIX : 0) |
170644170657
(pExpr->bDesc ? FTS5INDEX_QUERY_DESC : 0),
170645170658
pNear->pColset,
170646170659
&p->pIter
170647170660
);
@@ -171248,11 +171261,11 @@
171248171261
rc = fts5ParseStringFromToken(pToken, &z);
171249171262
if( rc==SQLITE_OK ){
171250171263
int flags = FTS5_TOKENIZE_QUERY | (bPrefix ? FTS5_TOKENIZE_QUERY : 0);
171251171264
int n;
171252171265
sqlite3Fts5Dequote(z);
171253
- n = (int)strlen(z);
171266
+ n = strlen(z);
171254171267
rc = sqlite3Fts5Tokenize(pConfig, flags, z, n, &sCtx, fts5ParseTokenize);
171255171268
}
171256171269
sqlite3_free(z);
171257171270
if( rc || (rc = sCtx.rc) ){
171258171271
pParse->rc = rc;
@@ -171321,12 +171334,11 @@
171321171334
for(i=0; rc==SQLITE_OK && i<pOrig->nTerm; i++){
171322171335
int tflags = 0;
171323171336
Fts5ExprTerm *p;
171324171337
for(p=&pOrig->aTerm[i]; p && rc==SQLITE_OK; p=p->pSynonym){
171325171338
const char *zTerm = p->zTerm;
171326
- rc = fts5ParseTokenize((void*)&sCtx, tflags, zTerm, (int)strlen(zTerm),
171327
- 0, 0);
171339
+ rc = fts5ParseTokenize((void*)&sCtx, tflags, zTerm, strlen(zTerm), 0, 0);
171328171340
tflags = FTS5_TOKEN_COLOCATED;
171329171341
}
171330171342
if( rc==SQLITE_OK ){
171331171343
sCtx.pPhrase->aTerm[i].bPrefix = pOrig->aTerm[i].bPrefix;
171332171344
}
@@ -171564,11 +171576,11 @@
171564171576
Fts5ExprTerm *p;
171565171577
char *zQuoted;
171566171578
171567171579
/* Determine the maximum amount of space required. */
171568171580
for(p=pTerm; p; p=p->pSynonym){
171569
- nByte += (int)strlen(pTerm->zTerm) * 2 + 3 + 2;
171581
+ nByte += strlen(pTerm->zTerm) * 2 + 3 + 2;
171570171582
}
171571171583
zQuoted = sqlite3_malloc(nByte);
171572171584
171573171585
if( zQuoted ){
171574171586
int i = 0;
@@ -172137,11 +172149,11 @@
172137172149
for(i=0; i<pHash->nSlot; i++){
172138172150
while( apOld[i] ){
172139172151
int iHash;
172140172152
Fts5HashEntry *p = apOld[i];
172141172153
apOld[i] = p->pHashNext;
172142
- iHash = fts5HashKey(nNew, (u8*)p->zKey, (int)strlen(p->zKey));
172154
+ iHash = fts5HashKey(nNew, (u8*)p->zKey, strlen(p->zKey));
172143172155
p->pHashNext = apNew[iHash];
172144172156
apNew[iHash] = p;
172145172157
}
172146172158
}
172147172159
@@ -172425,11 +172437,11 @@
172425172437
const u8 **ppDoclist, /* OUT: pointer to doclist */
172426172438
int *pnDoclist /* OUT: size of doclist in bytes */
172427172439
){
172428172440
Fts5HashEntry *p;
172429172441
if( (p = pHash->pScan) ){
172430
- int nTerm = (int)strlen(p->zKey);
172442
+ int nTerm = strlen(p->zKey);
172431172443
fts5HashAddPoslistSize(p);
172432172444
*pzTerm = p->zKey;
172433172445
*ppDoclist = (const u8*)&p->zKey[nTerm+1];
172434172446
*pnDoclist = p->nData - (FTS5_HASHENTRYSIZE + nTerm + 1);
172435172447
}else{
@@ -174205,11 +174217,10 @@
174205174217
174206174218
}else if( pIter->pSeg==0 ){
174207174219
const u8 *pList = 0;
174208174220
const char *zTerm = 0;
174209174221
int nList = 0;
174210
- assert( (pIter->flags & FTS5_SEGITER_ONETERM) || pbNewTerm );
174211174222
if( 0==(pIter->flags & FTS5_SEGITER_ONETERM) ){
174212174223
sqlite3Fts5HashScanNext(p->pHash);
174213174224
sqlite3Fts5HashScanEntry(p->pHash, &zTerm, &pList, &nList);
174214174225
}
174215174226
if( pList==0 ){
@@ -174218,14 +174229,13 @@
174218174229
}else{
174219174230
pIter->pLeaf->p = (u8*)pList;
174220174231
pIter->pLeaf->nn = nList;
174221174232
pIter->pLeaf->szLeaf = nList;
174222174233
pIter->iEndofDoclist = nList+1;
174223
- sqlite3Fts5BufferSet(&p->rc, &pIter->term, (int)strlen(zTerm),
174224
- (u8*)zTerm);
174234
+ sqlite3Fts5BufferSet(&p->rc, &pIter->term, strlen(zTerm), (u8*)zTerm);
174225174235
pIter->iLeafOffset = fts5GetVarint(pList, (u64*)&pIter->iRowid);
174226
- *pbNewTerm = 1;
174236
+ if( pbNewTerm ) *pbNewTerm = 1;
174227174237
}
174228174238
}else{
174229174239
iOff = 0;
174230174240
/* Next entry is not on the current page */
174231174241
while( iOff==0 ){
@@ -174626,11 +174636,11 @@
174626174636
assert( p->rc==SQLITE_OK );
174627174637
174628174638
if( pTerm==0 || (flags & FTS5INDEX_QUERY_SCAN) ){
174629174639
p->rc = sqlite3Fts5HashScanInit(p->pHash, (const char*)pTerm, nTerm);
174630174640
sqlite3Fts5HashScanEntry(p->pHash, (const char**)&z, &pList, &nList);
174631
- n = (z ? (int)strlen((const char*)z) : 0);
174641
+ n = (z ? strlen((const char*)z) : 0);
174632174642
}else{
174633174643
pIter->flags |= FTS5_SEGITER_ONETERM;
174634174644
sqlite3Fts5HashQuery(p->pHash, (const char*)pTerm, nTerm, &pList, &nList);
174635174645
z = pTerm;
174636174646
n = nTerm;
@@ -176199,11 +176209,11 @@
176199176209
const u8 *pDoclist; /* Pointer to doclist for this term */
176200176210
int nDoclist; /* Size of doclist in bytes */
176201176211
176202176212
/* Write the term for this entry to disk. */
176203176213
sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist);
176204
- fts5WriteAppendTerm(p, &writer, (int)strlen(zTerm), (const u8*)zTerm);
176214
+ fts5WriteAppendTerm(p, &writer, strlen(zTerm), (const u8*)zTerm);
176205176215
176206176216
assert( writer.bFirstRowidInPage==0 );
176207176217
if( pgsz>=(pBuf->n + pPgidx->n + nDoclist + 1) ){
176208176218
/* The entire doclist will fit on the current leaf. */
176209176219
fts5BufferSafeAppendBlob(pBuf, pDoclist, nDoclist);
@@ -176475,11 +176485,11 @@
176475176485
fts5ChunkIterate(p, pSeg, (void*)pBuf, fts5PoslistCallback);
176476176486
}else{
176477176487
PoslistCallbackCtx sCtx;
176478176488
sCtx.pBuf = pBuf;
176479176489
sCtx.pColset = pColset;
176480
- sCtx.eState = fts5IndexColsetTest(pColset, 0);
176490
+ sCtx.eState = pColset ? fts5IndexColsetTest(pColset, 0) : 1;
176481176491
assert( sCtx.eState==0 || sCtx.eState==1 );
176482176492
fts5ChunkIterate(p, pSeg, (void*)&sCtx, fts5PoslistFilterCallback);
176483176493
}
176484176494
}
176485176495
}
@@ -177636,10 +177646,11 @@
177636177646
177637177647
fts5IntegrityCheckPgidx(p, pLeaf);
177638177648
}
177639177649
fts5DataRelease(pLeaf);
177640177650
if( p->rc ) break;
177651
+
177641177652
177642177653
/* Now check that the iter.nEmpty leaves following the current leaf
177643177654
** (a) exist and (b) contain no terms. */
177644177655
fts5IndexIntegrityCheckEmpty(
177645177656
p, pSeg, iIdxPrevLeaf+1, iDlidxPrevLeaf+1, iIdxLeaf-1
@@ -178622,14 +178633,11 @@
178622178633
** extension is currently being used by a version of SQLite too old to
178623178634
** support index-info flags. In that case this function is a no-op.
178624178635
*/
178625178636
static void fts5SetUniqueFlag(sqlite3_index_info *pIdxInfo){
178626178637
#if SQLITE_VERSION_NUMBER>=3008012
178627
-#ifndef SQLITE_CORE
178628
- if( sqlite3_libversion_number()>=3008012 )
178629
-#endif
178630
- {
178638
+ if( sqlite3_libversion_number()>=3008012 ){
178631178639
pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_UNIQUE;
178632178640
}
178633178641
#endif
178634178642
}
178635178643
@@ -180572,11 +180580,11 @@
180572180580
sqlite3_context *pCtx, /* Function call context */
180573180581
int nArg, /* Number of args */
180574180582
sqlite3_value **apVal /* Function arguments */
180575180583
){
180576180584
assert( nArg==0 );
180577
- sqlite3_result_text(pCtx, "fts5: 2015-10-14 23:04:08 54127602b9a555f73f5e446b91e460386cb8fb17", -1, SQLITE_TRANSIENT);
180585
+ sqlite3_result_text(pCtx, "fts5: 2015-10-16 17:31:12 767c1727fec4ce11b83f25b3f1bfcfe68a2c8b02", -1, SQLITE_TRANSIENT);
180578180586
}
180579180587
180580180588
static int fts5Init(sqlite3 *db){
180581180589
static const sqlite3_module fts5Mod = {
180582180590
/* iVersion */ 2,
@@ -180975,14 +180983,14 @@
180975180983
rc = SQLITE_NOMEM;
180976180984
}else{
180977180985
int i;
180978180986
int iOff;
180979180987
sqlite3_snprintf(nDefn, zDefn, "id INTEGER PRIMARY KEY");
180980
- iOff = (int)strlen(zDefn);
180988
+ iOff = strlen(zDefn);
180981180989
for(i=0; i<pConfig->nCol; i++){
180982180990
sqlite3_snprintf(nDefn-iOff, &zDefn[iOff], ", c%d", i);
180983
- iOff += (int)strlen(&zDefn[iOff]);
180991
+ iOff += strlen(&zDefn[iOff]);
180984180992
}
180985180993
rc = sqlite3Fts5CreateTable(pConfig, "content", zDefn, 0, pzErr);
180986180994
}
180987180995
sqlite3_free(zDefn);
180988180996
}
@@ -181403,11 +181411,21 @@
181403181411
rc = fts5StorageNewRowid(p, piRowid);
181404181412
}
181405181413
}else{
181406181414
sqlite3_stmt *pInsert = 0; /* Statement to write %_content table */
181407181415
int i; /* Counter variable */
181408
- rc = fts5StorageGetStmt(p, FTS5_STMT_INSERT_CONTENT, &pInsert, 0);
181416
+#if 0
181417
+ if( eConflict==SQLITE_REPLACE ){
181418
+ eStmt = FTS5_STMT_REPLACE_CONTENT;
181419
+ rc = fts5StorageDeleteFromIndex(p, sqlite3_value_int64(apVal[1]));
181420
+ }else{
181421
+ eStmt = FTS5_STMT_INSERT_CONTENT;
181422
+ }
181423
+#endif
181424
+ if( rc==SQLITE_OK ){
181425
+ rc = fts5StorageGetStmt(p, FTS5_STMT_INSERT_CONTENT, &pInsert, 0);
181426
+ }
181409181427
for(i=1; rc==SQLITE_OK && i<=pConfig->nCol+1; i++){
181410181428
rc = sqlite3_bind_value(pInsert, i, apVal[i]);
181411181429
}
181412181430
if( rc==SQLITE_OK ){
181413181431
sqlite3_step(pInsert);
@@ -182021,11 +182039,11 @@
182021182039
Unicode61Tokenizer *p, /* Tokenizer object */
182022182040
const char *z, /* Characters to treat as exceptions */
182023182041
int bTokenChars /* 1 for 'tokenchars', 0 for 'separators' */
182024182042
){
182025182043
int rc = SQLITE_OK;
182026
- int n = (int)strlen(z);
182044
+ int n = strlen(z);
182027182045
int *aNew;
182028182046
182029182047
if( n>0 ){
182030182048
aNew = (int*)sqlite3_realloc(p->aiException, (n+p->nException)*sizeof(int));
182031182049
if( aNew ){
@@ -183885,12 +183903,12 @@
183885183903
}else{
183886183904
int nByte; /* Bytes of space to allocate */
183887183905
const char *zDb = bDb ? argv[3] : argv[1];
183888183906
const char *zTab = bDb ? argv[4] : argv[3];
183889183907
const char *zType = bDb ? argv[5] : argv[4];
183890
- int nDb = (int)strlen(zDb)+1;
183891
- int nTab = (int)strlen(zTab)+1;
183908
+ int nDb = strlen(zDb)+1;
183909
+ int nTab = strlen(zTab)+1;
183892183910
int eType;
183893183911
183894183912
rc = fts5VocabTableType(zType, pzErr, &eType);
183895183913
if( rc==SQLITE_OK ){
183896183914
assert( eType>=0 && eType<sizeof(azSchema)/sizeof(azSchema[0]) );
183897183915
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,8 +1,8 @@
1 /******************************************************************************
2 ** This file is an amalgamation of many separate C source files from SQLite
3 ** version 3.9.0. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a single translation
5 ** unit. This allows many compilers to do optimizations that would not be
6 ** possible if the files were compiled separately. Performance improvements
7 ** of 5% or more are commonly seen when SQLite is compiled as a single
8 ** translation unit.
@@ -323,13 +323,13 @@
323 **
324 ** See also: [sqlite3_libversion()],
325 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
326 ** [sqlite_version()] and [sqlite_source_id()].
327 */
328 #define SQLITE_VERSION "3.9.0"
329 #define SQLITE_VERSION_NUMBER 3009000
330 #define SQLITE_SOURCE_ID "2015-10-15 12:06:11 a61880c223c2229ecc3b4da7e5647eca17f7ddf5"
331
332 /*
333 ** CAPI3REF: Run-Time Library Version Numbers
334 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
335 **
@@ -10430,11 +10430,11 @@
10430 ** header file that defines a number for each opcode used by the VDBE.
10431 */
10432 /************** Include opcodes.h in the middle of vdbe.h ********************/
10433 /************** Begin file opcodes.h *****************************************/
10434 /* Automatically generated. Do not edit */
10435 /* See the tool/mkopcodeh.tcl script for details */
10436 #define OP_Savepoint 1
10437 #define OP_AutoCommit 2
10438 #define OP_Transaction 3
10439 #define OP_SorterNext 4
10440 #define OP_PrevIfOpen 5
@@ -10591,10 +10591,11 @@
10591 #define OP_Pagecount 156
10592 #define OP_MaxPgcnt 157
10593 #define OP_Init 158 /* synopsis: Start at P2 */
10594 #define OP_Noop 159
10595 #define OP_Explain 160
 
10596
10597 /* Properties such as "out2" or "jump" that are specified in
10598 ** comments following the "case" for each opcode in the vdbe.c
10599 ** are encoded into bitvectors as follows:
10600 */
@@ -26243,181 +26244,179 @@
26243 }
26244
26245 /************** End of hash.c ************************************************/
26246 /************** Begin file opcodes.c *****************************************/
26247 /* Automatically generated. Do not edit */
26248 /* See the tool/mkopcodec.tcl script for details. */
26249 #if !defined(SQLITE_OMIT_EXPLAIN) \
26250 || defined(VDBE_PROFILE) \
26251 || defined(SQLITE_DEBUG)
26252 #if defined(SQLITE_ENABLE_EXPLAIN_COMMENTS) || defined(SQLITE_DEBUG)
26253 # define OpHelp(X) "\0" X
26254 #else
26255 # define OpHelp(X)
26256 #endif
26257 SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
26258 static const char *const azName[] = { "?",
26259 /* 1 */ "Savepoint" OpHelp(""),
26260 /* 2 */ "AutoCommit" OpHelp(""),
26261 /* 3 */ "Transaction" OpHelp(""),
26262 /* 4 */ "SorterNext" OpHelp(""),
26263 /* 5 */ "PrevIfOpen" OpHelp(""),
26264 /* 6 */ "NextIfOpen" OpHelp(""),
26265 /* 7 */ "Prev" OpHelp(""),
26266 /* 8 */ "Next" OpHelp(""),
26267 /* 9 */ "Checkpoint" OpHelp(""),
26268 /* 10 */ "JournalMode" OpHelp(""),
26269 /* 11 */ "Vacuum" OpHelp(""),
26270 /* 12 */ "VFilter" OpHelp("iplan=r[P3] zplan='P4'"),
26271 /* 13 */ "VUpdate" OpHelp("data=r[P3@P2]"),
26272 /* 14 */ "Goto" OpHelp(""),
26273 /* 15 */ "Gosub" OpHelp(""),
26274 /* 16 */ "Return" OpHelp(""),
26275 /* 17 */ "InitCoroutine" OpHelp(""),
26276 /* 18 */ "EndCoroutine" OpHelp(""),
26277 /* 19 */ "Not" OpHelp("r[P2]= !r[P1]"),
26278 /* 20 */ "Yield" OpHelp(""),
26279 /* 21 */ "HaltIfNull" OpHelp("if r[P3]=null halt"),
26280 /* 22 */ "Halt" OpHelp(""),
26281 /* 23 */ "Integer" OpHelp("r[P2]=P1"),
26282 /* 24 */ "Int64" OpHelp("r[P2]=P4"),
26283 /* 25 */ "String" OpHelp("r[P2]='P4' (len=P1)"),
26284 /* 26 */ "Null" OpHelp("r[P2..P3]=NULL"),
26285 /* 27 */ "SoftNull" OpHelp("r[P1]=NULL"),
26286 /* 28 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"),
26287 /* 29 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"),
26288 /* 30 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"),
26289 /* 31 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
26290 /* 32 */ "SCopy" OpHelp("r[P2]=r[P1]"),
26291 /* 33 */ "ResultRow" OpHelp("output=r[P1@P2]"),
26292 /* 34 */ "CollSeq" OpHelp(""),
26293 /* 35 */ "Function0" OpHelp("r[P3]=func(r[P2@P5])"),
26294 /* 36 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"),
26295 /* 37 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"),
26296 /* 38 */ "MustBeInt" OpHelp(""),
26297 /* 39 */ "RealAffinity" OpHelp(""),
26298 /* 40 */ "Cast" OpHelp("affinity(r[P1])"),
26299 /* 41 */ "Permutation" OpHelp(""),
26300 /* 42 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"),
26301 /* 43 */ "Jump" OpHelp(""),
26302 /* 44 */ "Once" OpHelp(""),
26303 /* 45 */ "If" OpHelp(""),
26304 /* 46 */ "IfNot" OpHelp(""),
26305 /* 47 */ "Column" OpHelp("r[P3]=PX"),
26306 /* 48 */ "Affinity" OpHelp("affinity(r[P1@P2])"),
26307 /* 49 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"),
26308 /* 50 */ "Count" OpHelp("r[P2]=count()"),
26309 /* 51 */ "ReadCookie" OpHelp(""),
26310 /* 52 */ "SetCookie" OpHelp(""),
26311 /* 53 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
26312 /* 54 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
26313 /* 55 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
26314 /* 56 */ "OpenAutoindex" OpHelp("nColumn=P2"),
26315 /* 57 */ "OpenEphemeral" OpHelp("nColumn=P2"),
26316 /* 58 */ "SorterOpen" OpHelp(""),
26317 /* 59 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
26318 /* 60 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
26319 /* 61 */ "Close" OpHelp(""),
26320 /* 62 */ "ColumnsUsed" OpHelp(""),
26321 /* 63 */ "SeekLT" OpHelp("key=r[P3@P4]"),
26322 /* 64 */ "SeekLE" OpHelp("key=r[P3@P4]"),
26323 /* 65 */ "SeekGE" OpHelp("key=r[P3@P4]"),
26324 /* 66 */ "SeekGT" OpHelp("key=r[P3@P4]"),
26325 /* 67 */ "Seek" OpHelp("intkey=r[P2]"),
26326 /* 68 */ "NoConflict" OpHelp("key=r[P3@P4]"),
26327 /* 69 */ "NotFound" OpHelp("key=r[P3@P4]"),
26328 /* 70 */ "Found" OpHelp("key=r[P3@P4]"),
26329 /* 71 */ "Or" OpHelp("r[P3]=(r[P1] || r[P2])"),
26330 /* 72 */ "And" OpHelp("r[P3]=(r[P1] && r[P2])"),
26331 /* 73 */ "NotExists" OpHelp("intkey=r[P3]"),
26332 /* 74 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"),
26333 /* 75 */ "NewRowid" OpHelp("r[P2]=rowid"),
26334 /* 76 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
26335 /* 77 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
26336 /* 78 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
26337 /* 79 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"),
26338 /* 80 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"),
26339 /* 81 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
26340 /* 82 */ "Lt" OpHelp("if r[P1]<r[P3] goto P2"),
26341 /* 83 */ "Ge" OpHelp("if r[P1]>=r[P3] goto P2"),
26342 /* 84 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"),
26343 /* 85 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
26344 /* 86 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
26345 /* 87 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
26346 /* 88 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
26347 /* 89 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
26348 /* 90 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
26349 /* 91 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
26350 /* 92 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
26351 /* 93 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
26352 /* 94 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
26353 /* 95 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"),
26354 /* 96 */ "BitNot" OpHelp("r[P1]= ~r[P1]"),
26355 /* 97 */ "String8" OpHelp("r[P2]='P4'"),
26356 /* 98 */ "Delete" OpHelp(""),
26357 /* 99 */ "ResetCount" OpHelp(""),
26358 /* 100 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
26359 /* 101 */ "SorterData" OpHelp("r[P2]=data"),
26360 /* 102 */ "RowKey" OpHelp("r[P2]=key"),
26361 /* 103 */ "RowData" OpHelp("r[P2]=data"),
26362 /* 104 */ "Rowid" OpHelp("r[P2]=rowid"),
26363 /* 105 */ "NullRow" OpHelp(""),
26364 /* 106 */ "Last" OpHelp(""),
26365 /* 107 */ "SorterSort" OpHelp(""),
26366 /* 108 */ "Sort" OpHelp(""),
26367 /* 109 */ "Rewind" OpHelp(""),
26368 /* 110 */ "SorterInsert" OpHelp(""),
26369 /* 111 */ "IdxInsert" OpHelp("key=r[P2]"),
26370 /* 112 */ "IdxDelete" OpHelp("key=r[P2@P3]"),
26371 /* 113 */ "IdxRowid" OpHelp("r[P2]=rowid"),
26372 /* 114 */ "IdxLE" OpHelp("key=r[P3@P4]"),
26373 /* 115 */ "IdxGT" OpHelp("key=r[P3@P4]"),
26374 /* 116 */ "IdxLT" OpHelp("key=r[P3@P4]"),
26375 /* 117 */ "IdxGE" OpHelp("key=r[P3@P4]"),
26376 /* 118 */ "Destroy" OpHelp(""),
26377 /* 119 */ "Clear" OpHelp(""),
26378 /* 120 */ "ResetSorter" OpHelp(""),
26379 /* 121 */ "CreateIndex" OpHelp("r[P2]=root iDb=P1"),
26380 /* 122 */ "CreateTable" OpHelp("r[P2]=root iDb=P1"),
26381 /* 123 */ "ParseSchema" OpHelp(""),
26382 /* 124 */ "LoadAnalysis" OpHelp(""),
26383 /* 125 */ "DropTable" OpHelp(""),
26384 /* 126 */ "DropIndex" OpHelp(""),
26385 /* 127 */ "DropTrigger" OpHelp(""),
26386 /* 128 */ "IntegrityCk" OpHelp(""),
26387 /* 129 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
26388 /* 130 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
26389 /* 131 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
26390 /* 132 */ "Program" OpHelp(""),
26391 /* 133 */ "Real" OpHelp("r[P2]=P4"),
26392 /* 134 */ "Param" OpHelp(""),
26393 /* 135 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
26394 /* 136 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
26395 /* 137 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
26396 /* 138 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
26397 /* 139 */ "SetIfNotPos" OpHelp("if r[P1]<=0 then r[P2]=P3"),
26398 /* 140 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]-=P3, goto P2"),
26399 /* 141 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
26400 /* 142 */ "JumpZeroIncr" OpHelp("if (r[P1]++)==0 ) goto P2"),
26401 /* 143 */ "AggStep0" OpHelp("accum=r[P3] step(r[P2@P5])"),
26402 /* 144 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"),
26403 /* 145 */ "AggFinal" OpHelp("accum=r[P1] N=P2"),
26404 /* 146 */ "IncrVacuum" OpHelp(""),
26405 /* 147 */ "Expire" OpHelp(""),
26406 /* 148 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"),
26407 /* 149 */ "VBegin" OpHelp(""),
26408 /* 150 */ "VCreate" OpHelp(""),
26409 /* 151 */ "VDestroy" OpHelp(""),
26410 /* 152 */ "VOpen" OpHelp(""),
26411 /* 153 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"),
26412 /* 154 */ "VNext" OpHelp(""),
26413 /* 155 */ "VRename" OpHelp(""),
26414 /* 156 */ "Pagecount" OpHelp(""),
26415 /* 157 */ "MaxPgcnt" OpHelp(""),
26416 /* 158 */ "Init" OpHelp("Start at P2"),
26417 /* 159 */ "Noop" OpHelp(""),
26418 /* 160 */ "Explain" OpHelp(""),
26419 };
26420 return azName[i];
26421 }
26422 #endif
26423
@@ -81055,11 +81054,11 @@
81055 pKeyInfo->nXField += (pKeyInfo->nField - nField);
81056 pKeyInfo->nField = nField;
81057 }
81058 pSorter->pgsz = pgsz = sqlite3BtreeGetPageSize(db->aDb[0].pBt);
81059 pSorter->nTask = nWorker + 1;
81060 pSorter->iPrev = (u8)(nWorker - 1);
81061 pSorter->bUseThreads = (pSorter->nTask>1);
81062 pSorter->db = db;
81063 for(i=0; i<pSorter->nTask; i++){
81064 SortSubtask *pTask = &pSorter->aTask[i];
81065 pTask->pSorter = pSorter;
@@ -105178,11 +105177,11 @@
105178 ** loading is supported. We need a dummy sqlite3Apis pointer for that
105179 ** code if regular extension loading is not available. This is that
105180 ** dummy pointer.
105181 */
105182 #ifdef SQLITE_OMIT_LOAD_EXTENSION
105183 static const sqlite3_api_routines sqlite3Apis = { 0 };
105184 #endif
105185
105186
105187 /*
105188 ** The following object holds the list of automatically loaded
@@ -163560,11 +163559,10 @@
163560 /* #include "sqlite3ext.h" */
163561 #endif
163562 SQLITE_EXTENSION_INIT1
163563 /* #include <assert.h> */
163564 /* #include <string.h> */
163565 #include <ctype.h> /* amalgamator: keep */
163566 /* #include <stdlib.h> */
163567 /* #include <stdarg.h> */
163568
163569 #define UNUSED_PARAM(X) (void)(X)
163570
@@ -163575,20 +163573,29 @@
163575
163576 /*
163577 ** Versions of isspace(), isalnum() and isdigit() to which it is safe
163578 ** to pass signed char values.
163579 */
163580 #define safe_isdigit(x) isdigit((unsigned char)(x))
163581 #define safe_isalnum(x) isalnum((unsigned char)(x))
 
 
 
 
 
 
 
 
 
163582
163583 /*
163584 ** Growing our own isspace() routine this way is twice as fast as
163585 ** the library isspace() function, resulting in a 7% overall performance
163586 ** increase for the parser. (Ubuntu14.10 gcc 4.8.4 x64 with -Os).
163587 */
163588 static const char jsonIsSpace[] = {
163589 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0,
163590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163591 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163593 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163594 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -164046,11 +164053,17 @@
164046 int_done:
164047 break;
164048 int_as_real: /* fall through to real */;
164049 }
164050 case JSON_REAL: {
164051 double r = strtod(pNode->u.zJContent, 0);
 
 
 
 
 
 
164052 sqlite3_result_double(pCtx, r);
164053 break;
164054 }
164055 case JSON_STRING: {
164056 #if 0 /* Never happens because JNODE_RAW is only set by json_set(),
@@ -168135,11 +168148,11 @@
168135 int *pRc,
168136 HighlightContext *p,
168137 const char *z, int n
168138 ){
168139 if( *pRc==SQLITE_OK ){
168140 if( n<0 ) n = (int)strlen(z);
168141 p->zOut = sqlite3_mprintf("%z%.*s", p->zOut, n, z);
168142 if( p->zOut==0 ) *pRc = SQLITE_NOMEM;
168143 }
168144 }
168145
@@ -168649,11 +168662,11 @@
168649 static void sqlite3Fts5BufferAppendString(
168650 int *pRc,
168651 Fts5Buffer *pBuf,
168652 const char *zStr
168653 ){
168654 int nStr = (int)strlen(zStr);
168655 sqlite3Fts5BufferAppendBlob(pRc, pBuf, nStr+1, (const u8*)zStr);
168656 pBuf->n--;
168657 }
168658
168659 /*
@@ -168821,11 +168834,11 @@
168821 */
168822 static char *sqlite3Fts5Strndup(int *pRc, const char *pIn, int nIn){
168823 char *zRet = 0;
168824 if( *pRc==SQLITE_OK ){
168825 if( nIn<0 ){
168826 nIn = (int)strlen(pIn);
168827 }
168828 zRet = (char*)sqlite3_malloc(nIn+1);
168829 if( zRet ){
168830 memcpy(zRet, pIn, nIn);
168831 zRet[nIn] = '\0';
@@ -169074,11 +169087,11 @@
169074 const char *zCmd, /* Special command to parse */
169075 const char *zArg, /* Argument to parse */
169076 char **pzErr /* OUT: Error message */
169077 ){
169078 int rc = SQLITE_OK;
169079 int nCmd = (int)strlen(zCmd);
169080 if( sqlite3_strnicmp("prefix", zCmd, nCmd)==0 ){
169081 const int nByte = sizeof(int) * FTS5_MAX_PREFIX_INDEXES;
169082 const char *p;
169083 if( pConfig->aPrefix ){
169084 *pzErr = sqlite3_mprintf("multiple prefix=... directives");
@@ -169111,11 +169124,11 @@
169111 return rc;
169112 }
169113
169114 if( sqlite3_strnicmp("tokenize", zCmd, nCmd)==0 ){
169115 const char *p = (const char*)zArg;
169116 int nArg = (int)strlen(zArg) + 1;
169117 char **azArg = sqlite3Fts5MallocZero(&rc, sizeof(char*) * nArg);
169118 char *pDel = sqlite3Fts5MallocZero(&rc, nArg * 2);
169119 char *pSpace = pDel;
169120
169121 if( azArg && pSpace ){
@@ -169227,11 +169240,11 @@
169227 char **pzOut, /* OUT: malloc'd buffer containing str/bw */
169228 int *pbQuoted /* OUT: Set to true if dequoting required */
169229 ){
169230 const char *zRet = 0;
169231
169232 int nIn = (int)strlen(zIn);
169233 char *zOut = sqlite3_malloc(nIn+1);
169234
169235 assert( *pRc==SQLITE_OK );
169236 *pbQuoted = 0;
169237 *pzOut = 0;
@@ -170637,11 +170650,11 @@
170637 if( p->pIter ){
170638 sqlite3Fts5IterClose(p->pIter);
170639 p->pIter = 0;
170640 }
170641 rc = sqlite3Fts5IndexQuery(
170642 pExpr->pIndex, p->zTerm, (int)strlen(p->zTerm),
170643 (pTerm->bPrefix ? FTS5INDEX_QUERY_PREFIX : 0) |
170644 (pExpr->bDesc ? FTS5INDEX_QUERY_DESC : 0),
170645 pNear->pColset,
170646 &p->pIter
170647 );
@@ -171248,11 +171261,11 @@
171248 rc = fts5ParseStringFromToken(pToken, &z);
171249 if( rc==SQLITE_OK ){
171250 int flags = FTS5_TOKENIZE_QUERY | (bPrefix ? FTS5_TOKENIZE_QUERY : 0);
171251 int n;
171252 sqlite3Fts5Dequote(z);
171253 n = (int)strlen(z);
171254 rc = sqlite3Fts5Tokenize(pConfig, flags, z, n, &sCtx, fts5ParseTokenize);
171255 }
171256 sqlite3_free(z);
171257 if( rc || (rc = sCtx.rc) ){
171258 pParse->rc = rc;
@@ -171321,12 +171334,11 @@
171321 for(i=0; rc==SQLITE_OK && i<pOrig->nTerm; i++){
171322 int tflags = 0;
171323 Fts5ExprTerm *p;
171324 for(p=&pOrig->aTerm[i]; p && rc==SQLITE_OK; p=p->pSynonym){
171325 const char *zTerm = p->zTerm;
171326 rc = fts5ParseTokenize((void*)&sCtx, tflags, zTerm, (int)strlen(zTerm),
171327 0, 0);
171328 tflags = FTS5_TOKEN_COLOCATED;
171329 }
171330 if( rc==SQLITE_OK ){
171331 sCtx.pPhrase->aTerm[i].bPrefix = pOrig->aTerm[i].bPrefix;
171332 }
@@ -171564,11 +171576,11 @@
171564 Fts5ExprTerm *p;
171565 char *zQuoted;
171566
171567 /* Determine the maximum amount of space required. */
171568 for(p=pTerm; p; p=p->pSynonym){
171569 nByte += (int)strlen(pTerm->zTerm) * 2 + 3 + 2;
171570 }
171571 zQuoted = sqlite3_malloc(nByte);
171572
171573 if( zQuoted ){
171574 int i = 0;
@@ -172137,11 +172149,11 @@
172137 for(i=0; i<pHash->nSlot; i++){
172138 while( apOld[i] ){
172139 int iHash;
172140 Fts5HashEntry *p = apOld[i];
172141 apOld[i] = p->pHashNext;
172142 iHash = fts5HashKey(nNew, (u8*)p->zKey, (int)strlen(p->zKey));
172143 p->pHashNext = apNew[iHash];
172144 apNew[iHash] = p;
172145 }
172146 }
172147
@@ -172425,11 +172437,11 @@
172425 const u8 **ppDoclist, /* OUT: pointer to doclist */
172426 int *pnDoclist /* OUT: size of doclist in bytes */
172427 ){
172428 Fts5HashEntry *p;
172429 if( (p = pHash->pScan) ){
172430 int nTerm = (int)strlen(p->zKey);
172431 fts5HashAddPoslistSize(p);
172432 *pzTerm = p->zKey;
172433 *ppDoclist = (const u8*)&p->zKey[nTerm+1];
172434 *pnDoclist = p->nData - (FTS5_HASHENTRYSIZE + nTerm + 1);
172435 }else{
@@ -174205,11 +174217,10 @@
174205
174206 }else if( pIter->pSeg==0 ){
174207 const u8 *pList = 0;
174208 const char *zTerm = 0;
174209 int nList = 0;
174210 assert( (pIter->flags & FTS5_SEGITER_ONETERM) || pbNewTerm );
174211 if( 0==(pIter->flags & FTS5_SEGITER_ONETERM) ){
174212 sqlite3Fts5HashScanNext(p->pHash);
174213 sqlite3Fts5HashScanEntry(p->pHash, &zTerm, &pList, &nList);
174214 }
174215 if( pList==0 ){
@@ -174218,14 +174229,13 @@
174218 }else{
174219 pIter->pLeaf->p = (u8*)pList;
174220 pIter->pLeaf->nn = nList;
174221 pIter->pLeaf->szLeaf = nList;
174222 pIter->iEndofDoclist = nList+1;
174223 sqlite3Fts5BufferSet(&p->rc, &pIter->term, (int)strlen(zTerm),
174224 (u8*)zTerm);
174225 pIter->iLeafOffset = fts5GetVarint(pList, (u64*)&pIter->iRowid);
174226 *pbNewTerm = 1;
174227 }
174228 }else{
174229 iOff = 0;
174230 /* Next entry is not on the current page */
174231 while( iOff==0 ){
@@ -174626,11 +174636,11 @@
174626 assert( p->rc==SQLITE_OK );
174627
174628 if( pTerm==0 || (flags & FTS5INDEX_QUERY_SCAN) ){
174629 p->rc = sqlite3Fts5HashScanInit(p->pHash, (const char*)pTerm, nTerm);
174630 sqlite3Fts5HashScanEntry(p->pHash, (const char**)&z, &pList, &nList);
174631 n = (z ? (int)strlen((const char*)z) : 0);
174632 }else{
174633 pIter->flags |= FTS5_SEGITER_ONETERM;
174634 sqlite3Fts5HashQuery(p->pHash, (const char*)pTerm, nTerm, &pList, &nList);
174635 z = pTerm;
174636 n = nTerm;
@@ -176199,11 +176209,11 @@
176199 const u8 *pDoclist; /* Pointer to doclist for this term */
176200 int nDoclist; /* Size of doclist in bytes */
176201
176202 /* Write the term for this entry to disk. */
176203 sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist);
176204 fts5WriteAppendTerm(p, &writer, (int)strlen(zTerm), (const u8*)zTerm);
176205
176206 assert( writer.bFirstRowidInPage==0 );
176207 if( pgsz>=(pBuf->n + pPgidx->n + nDoclist + 1) ){
176208 /* The entire doclist will fit on the current leaf. */
176209 fts5BufferSafeAppendBlob(pBuf, pDoclist, nDoclist);
@@ -176475,11 +176485,11 @@
176475 fts5ChunkIterate(p, pSeg, (void*)pBuf, fts5PoslistCallback);
176476 }else{
176477 PoslistCallbackCtx sCtx;
176478 sCtx.pBuf = pBuf;
176479 sCtx.pColset = pColset;
176480 sCtx.eState = fts5IndexColsetTest(pColset, 0);
176481 assert( sCtx.eState==0 || sCtx.eState==1 );
176482 fts5ChunkIterate(p, pSeg, (void*)&sCtx, fts5PoslistFilterCallback);
176483 }
176484 }
176485 }
@@ -177636,10 +177646,11 @@
177636
177637 fts5IntegrityCheckPgidx(p, pLeaf);
177638 }
177639 fts5DataRelease(pLeaf);
177640 if( p->rc ) break;
 
177641
177642 /* Now check that the iter.nEmpty leaves following the current leaf
177643 ** (a) exist and (b) contain no terms. */
177644 fts5IndexIntegrityCheckEmpty(
177645 p, pSeg, iIdxPrevLeaf+1, iDlidxPrevLeaf+1, iIdxLeaf-1
@@ -178622,14 +178633,11 @@
178622 ** extension is currently being used by a version of SQLite too old to
178623 ** support index-info flags. In that case this function is a no-op.
178624 */
178625 static void fts5SetUniqueFlag(sqlite3_index_info *pIdxInfo){
178626 #if SQLITE_VERSION_NUMBER>=3008012
178627 #ifndef SQLITE_CORE
178628 if( sqlite3_libversion_number()>=3008012 )
178629 #endif
178630 {
178631 pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_UNIQUE;
178632 }
178633 #endif
178634 }
178635
@@ -180572,11 +180580,11 @@
180572 sqlite3_context *pCtx, /* Function call context */
180573 int nArg, /* Number of args */
180574 sqlite3_value **apVal /* Function arguments */
180575 ){
180576 assert( nArg==0 );
180577 sqlite3_result_text(pCtx, "fts5: 2015-10-14 23:04:08 54127602b9a555f73f5e446b91e460386cb8fb17", -1, SQLITE_TRANSIENT);
180578 }
180579
180580 static int fts5Init(sqlite3 *db){
180581 static const sqlite3_module fts5Mod = {
180582 /* iVersion */ 2,
@@ -180975,14 +180983,14 @@
180975 rc = SQLITE_NOMEM;
180976 }else{
180977 int i;
180978 int iOff;
180979 sqlite3_snprintf(nDefn, zDefn, "id INTEGER PRIMARY KEY");
180980 iOff = (int)strlen(zDefn);
180981 for(i=0; i<pConfig->nCol; i++){
180982 sqlite3_snprintf(nDefn-iOff, &zDefn[iOff], ", c%d", i);
180983 iOff += (int)strlen(&zDefn[iOff]);
180984 }
180985 rc = sqlite3Fts5CreateTable(pConfig, "content", zDefn, 0, pzErr);
180986 }
180987 sqlite3_free(zDefn);
180988 }
@@ -181403,11 +181411,21 @@
181403 rc = fts5StorageNewRowid(p, piRowid);
181404 }
181405 }else{
181406 sqlite3_stmt *pInsert = 0; /* Statement to write %_content table */
181407 int i; /* Counter variable */
181408 rc = fts5StorageGetStmt(p, FTS5_STMT_INSERT_CONTENT, &pInsert, 0);
 
 
 
 
 
 
 
 
 
 
181409 for(i=1; rc==SQLITE_OK && i<=pConfig->nCol+1; i++){
181410 rc = sqlite3_bind_value(pInsert, i, apVal[i]);
181411 }
181412 if( rc==SQLITE_OK ){
181413 sqlite3_step(pInsert);
@@ -182021,11 +182039,11 @@
182021 Unicode61Tokenizer *p, /* Tokenizer object */
182022 const char *z, /* Characters to treat as exceptions */
182023 int bTokenChars /* 1 for 'tokenchars', 0 for 'separators' */
182024 ){
182025 int rc = SQLITE_OK;
182026 int n = (int)strlen(z);
182027 int *aNew;
182028
182029 if( n>0 ){
182030 aNew = (int*)sqlite3_realloc(p->aiException, (n+p->nException)*sizeof(int));
182031 if( aNew ){
@@ -183885,12 +183903,12 @@
183885 }else{
183886 int nByte; /* Bytes of space to allocate */
183887 const char *zDb = bDb ? argv[3] : argv[1];
183888 const char *zTab = bDb ? argv[4] : argv[3];
183889 const char *zType = bDb ? argv[5] : argv[4];
183890 int nDb = (int)strlen(zDb)+1;
183891 int nTab = (int)strlen(zTab)+1;
183892 int eType;
183893
183894 rc = fts5VocabTableType(zType, pzErr, &eType);
183895 if( rc==SQLITE_OK ){
183896 assert( eType>=0 && eType<sizeof(azSchema)/sizeof(azSchema[0]) );
183897
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,8 +1,8 @@
1 /******************************************************************************
2 ** This file is an amalgamation of many separate C source files from SQLite
3 ** version 3.9.1. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a single translation
5 ** unit. This allows many compilers to do optimizations that would not be
6 ** possible if the files were compiled separately. Performance improvements
7 ** of 5% or more are commonly seen when SQLite is compiled as a single
8 ** translation unit.
@@ -323,13 +323,13 @@
323 **
324 ** See also: [sqlite3_libversion()],
325 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
326 ** [sqlite_version()] and [sqlite_source_id()].
327 */
328 #define SQLITE_VERSION "3.9.1"
329 #define SQLITE_VERSION_NUMBER 3009001
330 #define SQLITE_SOURCE_ID "2015-10-16 17:31:12 767c1727fec4ce11b83f25b3f1bfcfe68a2c8b02"
331
332 /*
333 ** CAPI3REF: Run-Time Library Version Numbers
334 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
335 **
@@ -10430,11 +10430,11 @@
10430 ** header file that defines a number for each opcode used by the VDBE.
10431 */
10432 /************** Include opcodes.h in the middle of vdbe.h ********************/
10433 /************** Begin file opcodes.h *****************************************/
10434 /* Automatically generated. Do not edit */
10435 /* See the mkopcodeh.awk script for details */
10436 #define OP_Savepoint 1
10437 #define OP_AutoCommit 2
10438 #define OP_Transaction 3
10439 #define OP_SorterNext 4
10440 #define OP_PrevIfOpen 5
@@ -10591,10 +10591,11 @@
10591 #define OP_Pagecount 156
10592 #define OP_MaxPgcnt 157
10593 #define OP_Init 158 /* synopsis: Start at P2 */
10594 #define OP_Noop 159
10595 #define OP_Explain 160
10596
10597
10598 /* Properties such as "out2" or "jump" that are specified in
10599 ** comments following the "case" for each opcode in the vdbe.c
10600 ** are encoded into bitvectors as follows:
10601 */
@@ -26243,181 +26244,179 @@
26244 }
26245
26246 /************** End of hash.c ************************************************/
26247 /************** Begin file opcodes.c *****************************************/
26248 /* Automatically generated. Do not edit */
26249 /* See the mkopcodec.awk script for details. */
26250 #if !defined(SQLITE_OMIT_EXPLAIN) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
 
 
26251 #if defined(SQLITE_ENABLE_EXPLAIN_COMMENTS) || defined(SQLITE_DEBUG)
26252 # define OpHelp(X) "\0" X
26253 #else
26254 # define OpHelp(X)
26255 #endif
26256 SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
26257 static const char *const azName[] = { "?",
26258 /* 1 */ "Savepoint" OpHelp(""),
26259 /* 2 */ "AutoCommit" OpHelp(""),
26260 /* 3 */ "Transaction" OpHelp(""),
26261 /* 4 */ "SorterNext" OpHelp(""),
26262 /* 5 */ "PrevIfOpen" OpHelp(""),
26263 /* 6 */ "NextIfOpen" OpHelp(""),
26264 /* 7 */ "Prev" OpHelp(""),
26265 /* 8 */ "Next" OpHelp(""),
26266 /* 9 */ "Checkpoint" OpHelp(""),
26267 /* 10 */ "JournalMode" OpHelp(""),
26268 /* 11 */ "Vacuum" OpHelp(""),
26269 /* 12 */ "VFilter" OpHelp("iplan=r[P3] zplan='P4'"),
26270 /* 13 */ "VUpdate" OpHelp("data=r[P3@P2]"),
26271 /* 14 */ "Goto" OpHelp(""),
26272 /* 15 */ "Gosub" OpHelp(""),
26273 /* 16 */ "Return" OpHelp(""),
26274 /* 17 */ "InitCoroutine" OpHelp(""),
26275 /* 18 */ "EndCoroutine" OpHelp(""),
26276 /* 19 */ "Not" OpHelp("r[P2]= !r[P1]"),
26277 /* 20 */ "Yield" OpHelp(""),
26278 /* 21 */ "HaltIfNull" OpHelp("if r[P3]=null halt"),
26279 /* 22 */ "Halt" OpHelp(""),
26280 /* 23 */ "Integer" OpHelp("r[P2]=P1"),
26281 /* 24 */ "Int64" OpHelp("r[P2]=P4"),
26282 /* 25 */ "String" OpHelp("r[P2]='P4' (len=P1)"),
26283 /* 26 */ "Null" OpHelp("r[P2..P3]=NULL"),
26284 /* 27 */ "SoftNull" OpHelp("r[P1]=NULL"),
26285 /* 28 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"),
26286 /* 29 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"),
26287 /* 30 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"),
26288 /* 31 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
26289 /* 32 */ "SCopy" OpHelp("r[P2]=r[P1]"),
26290 /* 33 */ "ResultRow" OpHelp("output=r[P1@P2]"),
26291 /* 34 */ "CollSeq" OpHelp(""),
26292 /* 35 */ "Function0" OpHelp("r[P3]=func(r[P2@P5])"),
26293 /* 36 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"),
26294 /* 37 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"),
26295 /* 38 */ "MustBeInt" OpHelp(""),
26296 /* 39 */ "RealAffinity" OpHelp(""),
26297 /* 40 */ "Cast" OpHelp("affinity(r[P1])"),
26298 /* 41 */ "Permutation" OpHelp(""),
26299 /* 42 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"),
26300 /* 43 */ "Jump" OpHelp(""),
26301 /* 44 */ "Once" OpHelp(""),
26302 /* 45 */ "If" OpHelp(""),
26303 /* 46 */ "IfNot" OpHelp(""),
26304 /* 47 */ "Column" OpHelp("r[P3]=PX"),
26305 /* 48 */ "Affinity" OpHelp("affinity(r[P1@P2])"),
26306 /* 49 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"),
26307 /* 50 */ "Count" OpHelp("r[P2]=count()"),
26308 /* 51 */ "ReadCookie" OpHelp(""),
26309 /* 52 */ "SetCookie" OpHelp(""),
26310 /* 53 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
26311 /* 54 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
26312 /* 55 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
26313 /* 56 */ "OpenAutoindex" OpHelp("nColumn=P2"),
26314 /* 57 */ "OpenEphemeral" OpHelp("nColumn=P2"),
26315 /* 58 */ "SorterOpen" OpHelp(""),
26316 /* 59 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
26317 /* 60 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
26318 /* 61 */ "Close" OpHelp(""),
26319 /* 62 */ "ColumnsUsed" OpHelp(""),
26320 /* 63 */ "SeekLT" OpHelp("key=r[P3@P4]"),
26321 /* 64 */ "SeekLE" OpHelp("key=r[P3@P4]"),
26322 /* 65 */ "SeekGE" OpHelp("key=r[P3@P4]"),
26323 /* 66 */ "SeekGT" OpHelp("key=r[P3@P4]"),
26324 /* 67 */ "Seek" OpHelp("intkey=r[P2]"),
26325 /* 68 */ "NoConflict" OpHelp("key=r[P3@P4]"),
26326 /* 69 */ "NotFound" OpHelp("key=r[P3@P4]"),
26327 /* 70 */ "Found" OpHelp("key=r[P3@P4]"),
26328 /* 71 */ "Or" OpHelp("r[P3]=(r[P1] || r[P2])"),
26329 /* 72 */ "And" OpHelp("r[P3]=(r[P1] && r[P2])"),
26330 /* 73 */ "NotExists" OpHelp("intkey=r[P3]"),
26331 /* 74 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"),
26332 /* 75 */ "NewRowid" OpHelp("r[P2]=rowid"),
26333 /* 76 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
26334 /* 77 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
26335 /* 78 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
26336 /* 79 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"),
26337 /* 80 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"),
26338 /* 81 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
26339 /* 82 */ "Lt" OpHelp("if r[P1]<r[P3] goto P2"),
26340 /* 83 */ "Ge" OpHelp("if r[P1]>=r[P3] goto P2"),
26341 /* 84 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"),
26342 /* 85 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
26343 /* 86 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
26344 /* 87 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
26345 /* 88 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
26346 /* 89 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
26347 /* 90 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
26348 /* 91 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
26349 /* 92 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
26350 /* 93 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
26351 /* 94 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
26352 /* 95 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"),
26353 /* 96 */ "BitNot" OpHelp("r[P1]= ~r[P1]"),
26354 /* 97 */ "String8" OpHelp("r[P2]='P4'"),
26355 /* 98 */ "Delete" OpHelp(""),
26356 /* 99 */ "ResetCount" OpHelp(""),
26357 /* 100 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
26358 /* 101 */ "SorterData" OpHelp("r[P2]=data"),
26359 /* 102 */ "RowKey" OpHelp("r[P2]=key"),
26360 /* 103 */ "RowData" OpHelp("r[P2]=data"),
26361 /* 104 */ "Rowid" OpHelp("r[P2]=rowid"),
26362 /* 105 */ "NullRow" OpHelp(""),
26363 /* 106 */ "Last" OpHelp(""),
26364 /* 107 */ "SorterSort" OpHelp(""),
26365 /* 108 */ "Sort" OpHelp(""),
26366 /* 109 */ "Rewind" OpHelp(""),
26367 /* 110 */ "SorterInsert" OpHelp(""),
26368 /* 111 */ "IdxInsert" OpHelp("key=r[P2]"),
26369 /* 112 */ "IdxDelete" OpHelp("key=r[P2@P3]"),
26370 /* 113 */ "IdxRowid" OpHelp("r[P2]=rowid"),
26371 /* 114 */ "IdxLE" OpHelp("key=r[P3@P4]"),
26372 /* 115 */ "IdxGT" OpHelp("key=r[P3@P4]"),
26373 /* 116 */ "IdxLT" OpHelp("key=r[P3@P4]"),
26374 /* 117 */ "IdxGE" OpHelp("key=r[P3@P4]"),
26375 /* 118 */ "Destroy" OpHelp(""),
26376 /* 119 */ "Clear" OpHelp(""),
26377 /* 120 */ "ResetSorter" OpHelp(""),
26378 /* 121 */ "CreateIndex" OpHelp("r[P2]=root iDb=P1"),
26379 /* 122 */ "CreateTable" OpHelp("r[P2]=root iDb=P1"),
26380 /* 123 */ "ParseSchema" OpHelp(""),
26381 /* 124 */ "LoadAnalysis" OpHelp(""),
26382 /* 125 */ "DropTable" OpHelp(""),
26383 /* 126 */ "DropIndex" OpHelp(""),
26384 /* 127 */ "DropTrigger" OpHelp(""),
26385 /* 128 */ "IntegrityCk" OpHelp(""),
26386 /* 129 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
26387 /* 130 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
26388 /* 131 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
26389 /* 132 */ "Program" OpHelp(""),
26390 /* 133 */ "Real" OpHelp("r[P2]=P4"),
26391 /* 134 */ "Param" OpHelp(""),
26392 /* 135 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
26393 /* 136 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
26394 /* 137 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
26395 /* 138 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
26396 /* 139 */ "SetIfNotPos" OpHelp("if r[P1]<=0 then r[P2]=P3"),
26397 /* 140 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]-=P3, goto P2"),
26398 /* 141 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
26399 /* 142 */ "JumpZeroIncr" OpHelp("if (r[P1]++)==0 ) goto P2"),
26400 /* 143 */ "AggStep0" OpHelp("accum=r[P3] step(r[P2@P5])"),
26401 /* 144 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"),
26402 /* 145 */ "AggFinal" OpHelp("accum=r[P1] N=P2"),
26403 /* 146 */ "IncrVacuum" OpHelp(""),
26404 /* 147 */ "Expire" OpHelp(""),
26405 /* 148 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"),
26406 /* 149 */ "VBegin" OpHelp(""),
26407 /* 150 */ "VCreate" OpHelp(""),
26408 /* 151 */ "VDestroy" OpHelp(""),
26409 /* 152 */ "VOpen" OpHelp(""),
26410 /* 153 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"),
26411 /* 154 */ "VNext" OpHelp(""),
26412 /* 155 */ "VRename" OpHelp(""),
26413 /* 156 */ "Pagecount" OpHelp(""),
26414 /* 157 */ "MaxPgcnt" OpHelp(""),
26415 /* 158 */ "Init" OpHelp("Start at P2"),
26416 /* 159 */ "Noop" OpHelp(""),
26417 /* 160 */ "Explain" OpHelp(""),
26418 };
26419 return azName[i];
26420 }
26421 #endif
26422
@@ -81055,11 +81054,11 @@
81054 pKeyInfo->nXField += (pKeyInfo->nField - nField);
81055 pKeyInfo->nField = nField;
81056 }
81057 pSorter->pgsz = pgsz = sqlite3BtreeGetPageSize(db->aDb[0].pBt);
81058 pSorter->nTask = nWorker + 1;
81059 pSorter->iPrev = nWorker-1;
81060 pSorter->bUseThreads = (pSorter->nTask>1);
81061 pSorter->db = db;
81062 for(i=0; i<pSorter->nTask; i++){
81063 SortSubtask *pTask = &pSorter->aTask[i];
81064 pTask->pSorter = pSorter;
@@ -105178,11 +105177,11 @@
105177 ** loading is supported. We need a dummy sqlite3Apis pointer for that
105178 ** code if regular extension loading is not available. This is that
105179 ** dummy pointer.
105180 */
105181 #ifdef SQLITE_OMIT_LOAD_EXTENSION
105182 static const sqlite3_api_routines sqlite3Apis;
105183 #endif
105184
105185
105186 /*
105187 ** The following object holds the list of automatically loaded
@@ -163560,11 +163559,10 @@
163559 /* #include "sqlite3ext.h" */
163560 #endif
163561 SQLITE_EXTENSION_INIT1
163562 /* #include <assert.h> */
163563 /* #include <string.h> */
 
163564 /* #include <stdlib.h> */
163565 /* #include <stdarg.h> */
163566
163567 #define UNUSED_PARAM(X) (void)(X)
163568
@@ -163575,20 +163573,29 @@
163573
163574 /*
163575 ** Versions of isspace(), isalnum() and isdigit() to which it is safe
163576 ** to pass signed char values.
163577 */
163578 #ifdef sqlite3Isdigit
163579 /* Use the SQLite core versions if this routine is part of the
163580 ** SQLite amalgamation */
163581 # define safe_isdigit(x) sqlite3Isdigit(x)
163582 # define safe_isalnum(x) sqlite3Isalnum(x)
163583 #else
163584 /* Use the standard library for separate compilation */
163585 #include <ctype.h> /* amalgamator: keep */
163586 # define safe_isdigit(x) isdigit((unsigned char)(x))
163587 # define safe_isalnum(x) isalnum((unsigned char)(x))
163588 #endif
163589
163590 /*
163591 ** Growing our own isspace() routine this way is twice as fast as
163592 ** the library isspace() function, resulting in a 7% overall performance
163593 ** increase for the parser. (Ubuntu14.10 gcc 4.8.4 x64 with -Os).
163594 */
163595 static const char jsonIsSpace[] = {
163596 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
163597 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163598 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163599 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163600 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163601 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -164046,11 +164053,17 @@
164053 int_done:
164054 break;
164055 int_as_real: /* fall through to real */;
164056 }
164057 case JSON_REAL: {
164058 double r;
164059 #ifdef SQLITE_AMALGAMATION
164060 const char *z = pNode->u.zJContent;
164061 sqlite3AtoF(z, &r, sqlite3Strlen30(z), SQLITE_UTF8);
164062 #else
164063 r = strtod(pNode->u.zJContent, 0);
164064 #endif
164065 sqlite3_result_double(pCtx, r);
164066 break;
164067 }
164068 case JSON_STRING: {
164069 #if 0 /* Never happens because JNODE_RAW is only set by json_set(),
@@ -168135,11 +168148,11 @@
168148 int *pRc,
168149 HighlightContext *p,
168150 const char *z, int n
168151 ){
168152 if( *pRc==SQLITE_OK ){
168153 if( n<0 ) n = strlen(z);
168154 p->zOut = sqlite3_mprintf("%z%.*s", p->zOut, n, z);
168155 if( p->zOut==0 ) *pRc = SQLITE_NOMEM;
168156 }
168157 }
168158
@@ -168649,11 +168662,11 @@
168662 static void sqlite3Fts5BufferAppendString(
168663 int *pRc,
168664 Fts5Buffer *pBuf,
168665 const char *zStr
168666 ){
168667 int nStr = strlen(zStr);
168668 sqlite3Fts5BufferAppendBlob(pRc, pBuf, nStr+1, (const u8*)zStr);
168669 pBuf->n--;
168670 }
168671
168672 /*
@@ -168821,11 +168834,11 @@
168834 */
168835 static char *sqlite3Fts5Strndup(int *pRc, const char *pIn, int nIn){
168836 char *zRet = 0;
168837 if( *pRc==SQLITE_OK ){
168838 if( nIn<0 ){
168839 nIn = strlen(pIn);
168840 }
168841 zRet = (char*)sqlite3_malloc(nIn+1);
168842 if( zRet ){
168843 memcpy(zRet, pIn, nIn);
168844 zRet[nIn] = '\0';
@@ -169074,11 +169087,11 @@
169087 const char *zCmd, /* Special command to parse */
169088 const char *zArg, /* Argument to parse */
169089 char **pzErr /* OUT: Error message */
169090 ){
169091 int rc = SQLITE_OK;
169092 int nCmd = strlen(zCmd);
169093 if( sqlite3_strnicmp("prefix", zCmd, nCmd)==0 ){
169094 const int nByte = sizeof(int) * FTS5_MAX_PREFIX_INDEXES;
169095 const char *p;
169096 if( pConfig->aPrefix ){
169097 *pzErr = sqlite3_mprintf("multiple prefix=... directives");
@@ -169111,11 +169124,11 @@
169124 return rc;
169125 }
169126
169127 if( sqlite3_strnicmp("tokenize", zCmd, nCmd)==0 ){
169128 const char *p = (const char*)zArg;
169129 int nArg = strlen(zArg) + 1;
169130 char **azArg = sqlite3Fts5MallocZero(&rc, sizeof(char*) * nArg);
169131 char *pDel = sqlite3Fts5MallocZero(&rc, nArg * 2);
169132 char *pSpace = pDel;
169133
169134 if( azArg && pSpace ){
@@ -169227,11 +169240,11 @@
169240 char **pzOut, /* OUT: malloc'd buffer containing str/bw */
169241 int *pbQuoted /* OUT: Set to true if dequoting required */
169242 ){
169243 const char *zRet = 0;
169244
169245 int nIn = strlen(zIn);
169246 char *zOut = sqlite3_malloc(nIn+1);
169247
169248 assert( *pRc==SQLITE_OK );
169249 *pbQuoted = 0;
169250 *pzOut = 0;
@@ -170637,11 +170650,11 @@
170650 if( p->pIter ){
170651 sqlite3Fts5IterClose(p->pIter);
170652 p->pIter = 0;
170653 }
170654 rc = sqlite3Fts5IndexQuery(
170655 pExpr->pIndex, p->zTerm, strlen(p->zTerm),
170656 (pTerm->bPrefix ? FTS5INDEX_QUERY_PREFIX : 0) |
170657 (pExpr->bDesc ? FTS5INDEX_QUERY_DESC : 0),
170658 pNear->pColset,
170659 &p->pIter
170660 );
@@ -171248,11 +171261,11 @@
171261 rc = fts5ParseStringFromToken(pToken, &z);
171262 if( rc==SQLITE_OK ){
171263 int flags = FTS5_TOKENIZE_QUERY | (bPrefix ? FTS5_TOKENIZE_QUERY : 0);
171264 int n;
171265 sqlite3Fts5Dequote(z);
171266 n = strlen(z);
171267 rc = sqlite3Fts5Tokenize(pConfig, flags, z, n, &sCtx, fts5ParseTokenize);
171268 }
171269 sqlite3_free(z);
171270 if( rc || (rc = sCtx.rc) ){
171271 pParse->rc = rc;
@@ -171321,12 +171334,11 @@
171334 for(i=0; rc==SQLITE_OK && i<pOrig->nTerm; i++){
171335 int tflags = 0;
171336 Fts5ExprTerm *p;
171337 for(p=&pOrig->aTerm[i]; p && rc==SQLITE_OK; p=p->pSynonym){
171338 const char *zTerm = p->zTerm;
171339 rc = fts5ParseTokenize((void*)&sCtx, tflags, zTerm, strlen(zTerm), 0, 0);
 
171340 tflags = FTS5_TOKEN_COLOCATED;
171341 }
171342 if( rc==SQLITE_OK ){
171343 sCtx.pPhrase->aTerm[i].bPrefix = pOrig->aTerm[i].bPrefix;
171344 }
@@ -171564,11 +171576,11 @@
171576 Fts5ExprTerm *p;
171577 char *zQuoted;
171578
171579 /* Determine the maximum amount of space required. */
171580 for(p=pTerm; p; p=p->pSynonym){
171581 nByte += strlen(pTerm->zTerm) * 2 + 3 + 2;
171582 }
171583 zQuoted = sqlite3_malloc(nByte);
171584
171585 if( zQuoted ){
171586 int i = 0;
@@ -172137,11 +172149,11 @@
172149 for(i=0; i<pHash->nSlot; i++){
172150 while( apOld[i] ){
172151 int iHash;
172152 Fts5HashEntry *p = apOld[i];
172153 apOld[i] = p->pHashNext;
172154 iHash = fts5HashKey(nNew, (u8*)p->zKey, strlen(p->zKey));
172155 p->pHashNext = apNew[iHash];
172156 apNew[iHash] = p;
172157 }
172158 }
172159
@@ -172425,11 +172437,11 @@
172437 const u8 **ppDoclist, /* OUT: pointer to doclist */
172438 int *pnDoclist /* OUT: size of doclist in bytes */
172439 ){
172440 Fts5HashEntry *p;
172441 if( (p = pHash->pScan) ){
172442 int nTerm = strlen(p->zKey);
172443 fts5HashAddPoslistSize(p);
172444 *pzTerm = p->zKey;
172445 *ppDoclist = (const u8*)&p->zKey[nTerm+1];
172446 *pnDoclist = p->nData - (FTS5_HASHENTRYSIZE + nTerm + 1);
172447 }else{
@@ -174205,11 +174217,10 @@
174217
174218 }else if( pIter->pSeg==0 ){
174219 const u8 *pList = 0;
174220 const char *zTerm = 0;
174221 int nList = 0;
 
174222 if( 0==(pIter->flags & FTS5_SEGITER_ONETERM) ){
174223 sqlite3Fts5HashScanNext(p->pHash);
174224 sqlite3Fts5HashScanEntry(p->pHash, &zTerm, &pList, &nList);
174225 }
174226 if( pList==0 ){
@@ -174218,14 +174229,13 @@
174229 }else{
174230 pIter->pLeaf->p = (u8*)pList;
174231 pIter->pLeaf->nn = nList;
174232 pIter->pLeaf->szLeaf = nList;
174233 pIter->iEndofDoclist = nList+1;
174234 sqlite3Fts5BufferSet(&p->rc, &pIter->term, strlen(zTerm), (u8*)zTerm);
 
174235 pIter->iLeafOffset = fts5GetVarint(pList, (u64*)&pIter->iRowid);
174236 if( pbNewTerm ) *pbNewTerm = 1;
174237 }
174238 }else{
174239 iOff = 0;
174240 /* Next entry is not on the current page */
174241 while( iOff==0 ){
@@ -174626,11 +174636,11 @@
174636 assert( p->rc==SQLITE_OK );
174637
174638 if( pTerm==0 || (flags & FTS5INDEX_QUERY_SCAN) ){
174639 p->rc = sqlite3Fts5HashScanInit(p->pHash, (const char*)pTerm, nTerm);
174640 sqlite3Fts5HashScanEntry(p->pHash, (const char**)&z, &pList, &nList);
174641 n = (z ? strlen((const char*)z) : 0);
174642 }else{
174643 pIter->flags |= FTS5_SEGITER_ONETERM;
174644 sqlite3Fts5HashQuery(p->pHash, (const char*)pTerm, nTerm, &pList, &nList);
174645 z = pTerm;
174646 n = nTerm;
@@ -176199,11 +176209,11 @@
176209 const u8 *pDoclist; /* Pointer to doclist for this term */
176210 int nDoclist; /* Size of doclist in bytes */
176211
176212 /* Write the term for this entry to disk. */
176213 sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist);
176214 fts5WriteAppendTerm(p, &writer, strlen(zTerm), (const u8*)zTerm);
176215
176216 assert( writer.bFirstRowidInPage==0 );
176217 if( pgsz>=(pBuf->n + pPgidx->n + nDoclist + 1) ){
176218 /* The entire doclist will fit on the current leaf. */
176219 fts5BufferSafeAppendBlob(pBuf, pDoclist, nDoclist);
@@ -176475,11 +176485,11 @@
176485 fts5ChunkIterate(p, pSeg, (void*)pBuf, fts5PoslistCallback);
176486 }else{
176487 PoslistCallbackCtx sCtx;
176488 sCtx.pBuf = pBuf;
176489 sCtx.pColset = pColset;
176490 sCtx.eState = pColset ? fts5IndexColsetTest(pColset, 0) : 1;
176491 assert( sCtx.eState==0 || sCtx.eState==1 );
176492 fts5ChunkIterate(p, pSeg, (void*)&sCtx, fts5PoslistFilterCallback);
176493 }
176494 }
176495 }
@@ -177636,10 +177646,11 @@
177646
177647 fts5IntegrityCheckPgidx(p, pLeaf);
177648 }
177649 fts5DataRelease(pLeaf);
177650 if( p->rc ) break;
177651
177652
177653 /* Now check that the iter.nEmpty leaves following the current leaf
177654 ** (a) exist and (b) contain no terms. */
177655 fts5IndexIntegrityCheckEmpty(
177656 p, pSeg, iIdxPrevLeaf+1, iDlidxPrevLeaf+1, iIdxLeaf-1
@@ -178622,14 +178633,11 @@
178633 ** extension is currently being used by a version of SQLite too old to
178634 ** support index-info flags. In that case this function is a no-op.
178635 */
178636 static void fts5SetUniqueFlag(sqlite3_index_info *pIdxInfo){
178637 #if SQLITE_VERSION_NUMBER>=3008012
178638 if( sqlite3_libversion_number()>=3008012 ){
 
 
 
178639 pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_UNIQUE;
178640 }
178641 #endif
178642 }
178643
@@ -180572,11 +180580,11 @@
180580 sqlite3_context *pCtx, /* Function call context */
180581 int nArg, /* Number of args */
180582 sqlite3_value **apVal /* Function arguments */
180583 ){
180584 assert( nArg==0 );
180585 sqlite3_result_text(pCtx, "fts5: 2015-10-16 17:31:12 767c1727fec4ce11b83f25b3f1bfcfe68a2c8b02", -1, SQLITE_TRANSIENT);
180586 }
180587
180588 static int fts5Init(sqlite3 *db){
180589 static const sqlite3_module fts5Mod = {
180590 /* iVersion */ 2,
@@ -180975,14 +180983,14 @@
180983 rc = SQLITE_NOMEM;
180984 }else{
180985 int i;
180986 int iOff;
180987 sqlite3_snprintf(nDefn, zDefn, "id INTEGER PRIMARY KEY");
180988 iOff = strlen(zDefn);
180989 for(i=0; i<pConfig->nCol; i++){
180990 sqlite3_snprintf(nDefn-iOff, &zDefn[iOff], ", c%d", i);
180991 iOff += strlen(&zDefn[iOff]);
180992 }
180993 rc = sqlite3Fts5CreateTable(pConfig, "content", zDefn, 0, pzErr);
180994 }
180995 sqlite3_free(zDefn);
180996 }
@@ -181403,11 +181411,21 @@
181411 rc = fts5StorageNewRowid(p, piRowid);
181412 }
181413 }else{
181414 sqlite3_stmt *pInsert = 0; /* Statement to write %_content table */
181415 int i; /* Counter variable */
181416 #if 0
181417 if( eConflict==SQLITE_REPLACE ){
181418 eStmt = FTS5_STMT_REPLACE_CONTENT;
181419 rc = fts5StorageDeleteFromIndex(p, sqlite3_value_int64(apVal[1]));
181420 }else{
181421 eStmt = FTS5_STMT_INSERT_CONTENT;
181422 }
181423 #endif
181424 if( rc==SQLITE_OK ){
181425 rc = fts5StorageGetStmt(p, FTS5_STMT_INSERT_CONTENT, &pInsert, 0);
181426 }
181427 for(i=1; rc==SQLITE_OK && i<=pConfig->nCol+1; i++){
181428 rc = sqlite3_bind_value(pInsert, i, apVal[i]);
181429 }
181430 if( rc==SQLITE_OK ){
181431 sqlite3_step(pInsert);
@@ -182021,11 +182039,11 @@
182039 Unicode61Tokenizer *p, /* Tokenizer object */
182040 const char *z, /* Characters to treat as exceptions */
182041 int bTokenChars /* 1 for 'tokenchars', 0 for 'separators' */
182042 ){
182043 int rc = SQLITE_OK;
182044 int n = strlen(z);
182045 int *aNew;
182046
182047 if( n>0 ){
182048 aNew = (int*)sqlite3_realloc(p->aiException, (n+p->nException)*sizeof(int));
182049 if( aNew ){
@@ -183885,12 +183903,12 @@
183903 }else{
183904 int nByte; /* Bytes of space to allocate */
183905 const char *zDb = bDb ? argv[3] : argv[1];
183906 const char *zTab = bDb ? argv[4] : argv[3];
183907 const char *zType = bDb ? argv[5] : argv[4];
183908 int nDb = strlen(zDb)+1;
183909 int nTab = strlen(zTab)+1;
183910 int eType;
183911
183912 rc = fts5VocabTableType(zType, pzErr, &eType);
183913 if( rc==SQLITE_OK ){
183914 assert( eType>=0 && eType<sizeof(azSchema)/sizeof(azSchema[0]) );
183915
+3 -3
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -109,13 +109,13 @@
109109
**
110110
** See also: [sqlite3_libversion()],
111111
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112112
** [sqlite_version()] and [sqlite_source_id()].
113113
*/
114
-#define SQLITE_VERSION "3.9.0"
115
-#define SQLITE_VERSION_NUMBER 3009000
116
-#define SQLITE_SOURCE_ID "2015-10-15 12:06:11 a61880c223c2229ecc3b4da7e5647eca17f7ddf5"
114
+#define SQLITE_VERSION "3.9.1"
115
+#define SQLITE_VERSION_NUMBER 3009001
116
+#define SQLITE_SOURCE_ID "2015-10-16 17:31:12 767c1727fec4ce11b83f25b3f1bfcfe68a2c8b02"
117117
118118
/*
119119
** CAPI3REF: Run-Time Library Version Numbers
120120
** KEYWORDS: sqlite3_version, sqlite3_sourceid
121121
**
122122
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -109,13 +109,13 @@
109 **
110 ** See also: [sqlite3_libversion()],
111 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112 ** [sqlite_version()] and [sqlite_source_id()].
113 */
114 #define SQLITE_VERSION "3.9.0"
115 #define SQLITE_VERSION_NUMBER 3009000
116 #define SQLITE_SOURCE_ID "2015-10-15 12:06:11 a61880c223c2229ecc3b4da7e5647eca17f7ddf5"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
122
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -109,13 +109,13 @@
109 **
110 ** See also: [sqlite3_libversion()],
111 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112 ** [sqlite_version()] and [sqlite_source_id()].
113 */
114 #define SQLITE_VERSION "3.9.1"
115 #define SQLITE_VERSION_NUMBER 3009001
116 #define SQLITE_SOURCE_ID "2015-10-16 17:31:12 767c1727fec4ce11b83f25b3f1bfcfe68a2c8b02"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
122

Keyboard Shortcuts

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