Fossil SCM
Update the built-in SQLite to version 3.9.1.
Commit
3cff1b8f0a6467b7a2e04263a1f8c9a19f4257de
Parent
bc16590e21e0e0e…
2 files changed
+225
-207
+3
-3
+225
-207
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | /****************************************************************************** |
| 2 | 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 | |
| 3 | +** version 3.9.1. By combining all the individual C code files into this | |
| 4 | 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | 8 | ** translation unit. |
| @@ -323,13 +323,13 @@ | ||
| 323 | 323 | ** |
| 324 | 324 | ** See also: [sqlite3_libversion()], |
| 325 | 325 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 326 | 326 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 327 | 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" | |
| 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 | 331 | |
| 332 | 332 | /* |
| 333 | 333 | ** CAPI3REF: Run-Time Library Version Numbers |
| 334 | 334 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 335 | 335 | ** |
| @@ -10430,11 +10430,11 @@ | ||
| 10430 | 10430 | ** header file that defines a number for each opcode used by the VDBE. |
| 10431 | 10431 | */ |
| 10432 | 10432 | /************** Include opcodes.h in the middle of vdbe.h ********************/ |
| 10433 | 10433 | /************** Begin file opcodes.h *****************************************/ |
| 10434 | 10434 | /* Automatically generated. Do not edit */ |
| 10435 | -/* See the tool/mkopcodeh.tcl script for details */ | |
| 10435 | +/* See the mkopcodeh.awk script for details */ | |
| 10436 | 10436 | #define OP_Savepoint 1 |
| 10437 | 10437 | #define OP_AutoCommit 2 |
| 10438 | 10438 | #define OP_Transaction 3 |
| 10439 | 10439 | #define OP_SorterNext 4 |
| 10440 | 10440 | #define OP_PrevIfOpen 5 |
| @@ -10591,10 +10591,11 @@ | ||
| 10591 | 10591 | #define OP_Pagecount 156 |
| 10592 | 10592 | #define OP_MaxPgcnt 157 |
| 10593 | 10593 | #define OP_Init 158 /* synopsis: Start at P2 */ |
| 10594 | 10594 | #define OP_Noop 159 |
| 10595 | 10595 | #define OP_Explain 160 |
| 10596 | + | |
| 10596 | 10597 | |
| 10597 | 10598 | /* Properties such as "out2" or "jump" that are specified in |
| 10598 | 10599 | ** comments following the "case" for each opcode in the vdbe.c |
| 10599 | 10600 | ** are encoded into bitvectors as follows: |
| 10600 | 10601 | */ |
| @@ -26243,181 +26244,179 @@ | ||
| 26243 | 26244 | } |
| 26244 | 26245 | |
| 26245 | 26246 | /************** End of hash.c ************************************************/ |
| 26246 | 26247 | /************** Begin file opcodes.c *****************************************/ |
| 26247 | 26248 | /* 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) | |
| 26252 | 26251 | #if defined(SQLITE_ENABLE_EXPLAIN_COMMENTS) || defined(SQLITE_DEBUG) |
| 26253 | 26252 | # define OpHelp(X) "\0" X |
| 26254 | 26253 | #else |
| 26255 | 26254 | # define OpHelp(X) |
| 26256 | 26255 | #endif |
| 26257 | 26256 | SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){ |
| 26258 | 26257 | 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(""), | |
| 26419 | 26418 | }; |
| 26420 | 26419 | return azName[i]; |
| 26421 | 26420 | } |
| 26422 | 26421 | #endif |
| 26423 | 26422 | |
| @@ -81055,11 +81054,11 @@ | ||
| 81055 | 81054 | pKeyInfo->nXField += (pKeyInfo->nField - nField); |
| 81056 | 81055 | pKeyInfo->nField = nField; |
| 81057 | 81056 | } |
| 81058 | 81057 | pSorter->pgsz = pgsz = sqlite3BtreeGetPageSize(db->aDb[0].pBt); |
| 81059 | 81058 | pSorter->nTask = nWorker + 1; |
| 81060 | - pSorter->iPrev = (u8)(nWorker - 1); | |
| 81059 | + pSorter->iPrev = nWorker-1; | |
| 81061 | 81060 | pSorter->bUseThreads = (pSorter->nTask>1); |
| 81062 | 81061 | pSorter->db = db; |
| 81063 | 81062 | for(i=0; i<pSorter->nTask; i++){ |
| 81064 | 81063 | SortSubtask *pTask = &pSorter->aTask[i]; |
| 81065 | 81064 | pTask->pSorter = pSorter; |
| @@ -105178,11 +105177,11 @@ | ||
| 105178 | 105177 | ** loading is supported. We need a dummy sqlite3Apis pointer for that |
| 105179 | 105178 | ** code if regular extension loading is not available. This is that |
| 105180 | 105179 | ** dummy pointer. |
| 105181 | 105180 | */ |
| 105182 | 105181 | #ifdef SQLITE_OMIT_LOAD_EXTENSION |
| 105183 | -static const sqlite3_api_routines sqlite3Apis = { 0 }; | |
| 105182 | +static const sqlite3_api_routines sqlite3Apis; | |
| 105184 | 105183 | #endif |
| 105185 | 105184 | |
| 105186 | 105185 | |
| 105187 | 105186 | /* |
| 105188 | 105187 | ** The following object holds the list of automatically loaded |
| @@ -163560,11 +163559,10 @@ | ||
| 163560 | 163559 | /* #include "sqlite3ext.h" */ |
| 163561 | 163560 | #endif |
| 163562 | 163561 | SQLITE_EXTENSION_INIT1 |
| 163563 | 163562 | /* #include <assert.h> */ |
| 163564 | 163563 | /* #include <string.h> */ |
| 163565 | -#include <ctype.h> /* amalgamator: keep */ | |
| 163566 | 163564 | /* #include <stdlib.h> */ |
| 163567 | 163565 | /* #include <stdarg.h> */ |
| 163568 | 163566 | |
| 163569 | 163567 | #define UNUSED_PARAM(X) (void)(X) |
| 163570 | 163568 | |
| @@ -163575,20 +163573,29 @@ | ||
| 163575 | 163573 | |
| 163576 | 163574 | /* |
| 163577 | 163575 | ** Versions of isspace(), isalnum() and isdigit() to which it is safe |
| 163578 | 163576 | ** to pass signed char values. |
| 163579 | 163577 | */ |
| 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 | |
| 163582 | 163589 | |
| 163583 | 163590 | /* |
| 163584 | 163591 | ** Growing our own isspace() routine this way is twice as fast as |
| 163585 | 163592 | ** the library isspace() function, resulting in a 7% overall performance |
| 163586 | 163593 | ** increase for the parser. (Ubuntu14.10 gcc 4.8.4 x64 with -Os). |
| 163587 | 163594 | */ |
| 163588 | 163595 | 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, | |
| 163590 | 163597 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 163591 | 163598 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 163592 | 163599 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 163593 | 163600 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 163594 | 163601 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| @@ -164046,11 +164053,17 @@ | ||
| 164046 | 164053 | int_done: |
| 164047 | 164054 | break; |
| 164048 | 164055 | int_as_real: /* fall through to real */; |
| 164049 | 164056 | } |
| 164050 | 164057 | 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 | |
| 164052 | 164065 | sqlite3_result_double(pCtx, r); |
| 164053 | 164066 | break; |
| 164054 | 164067 | } |
| 164055 | 164068 | case JSON_STRING: { |
| 164056 | 164069 | #if 0 /* Never happens because JNODE_RAW is only set by json_set(), |
| @@ -168135,11 +168148,11 @@ | ||
| 168135 | 168148 | int *pRc, |
| 168136 | 168149 | HighlightContext *p, |
| 168137 | 168150 | const char *z, int n |
| 168138 | 168151 | ){ |
| 168139 | 168152 | if( *pRc==SQLITE_OK ){ |
| 168140 | - if( n<0 ) n = (int)strlen(z); | |
| 168153 | + if( n<0 ) n = strlen(z); | |
| 168141 | 168154 | p->zOut = sqlite3_mprintf("%z%.*s", p->zOut, n, z); |
| 168142 | 168155 | if( p->zOut==0 ) *pRc = SQLITE_NOMEM; |
| 168143 | 168156 | } |
| 168144 | 168157 | } |
| 168145 | 168158 | |
| @@ -168649,11 +168662,11 @@ | ||
| 168649 | 168662 | static void sqlite3Fts5BufferAppendString( |
| 168650 | 168663 | int *pRc, |
| 168651 | 168664 | Fts5Buffer *pBuf, |
| 168652 | 168665 | const char *zStr |
| 168653 | 168666 | ){ |
| 168654 | - int nStr = (int)strlen(zStr); | |
| 168667 | + int nStr = strlen(zStr); | |
| 168655 | 168668 | sqlite3Fts5BufferAppendBlob(pRc, pBuf, nStr+1, (const u8*)zStr); |
| 168656 | 168669 | pBuf->n--; |
| 168657 | 168670 | } |
| 168658 | 168671 | |
| 168659 | 168672 | /* |
| @@ -168821,11 +168834,11 @@ | ||
| 168821 | 168834 | */ |
| 168822 | 168835 | static char *sqlite3Fts5Strndup(int *pRc, const char *pIn, int nIn){ |
| 168823 | 168836 | char *zRet = 0; |
| 168824 | 168837 | if( *pRc==SQLITE_OK ){ |
| 168825 | 168838 | if( nIn<0 ){ |
| 168826 | - nIn = (int)strlen(pIn); | |
| 168839 | + nIn = strlen(pIn); | |
| 168827 | 168840 | } |
| 168828 | 168841 | zRet = (char*)sqlite3_malloc(nIn+1); |
| 168829 | 168842 | if( zRet ){ |
| 168830 | 168843 | memcpy(zRet, pIn, nIn); |
| 168831 | 168844 | zRet[nIn] = '\0'; |
| @@ -169074,11 +169087,11 @@ | ||
| 169074 | 169087 | const char *zCmd, /* Special command to parse */ |
| 169075 | 169088 | const char *zArg, /* Argument to parse */ |
| 169076 | 169089 | char **pzErr /* OUT: Error message */ |
| 169077 | 169090 | ){ |
| 169078 | 169091 | int rc = SQLITE_OK; |
| 169079 | - int nCmd = (int)strlen(zCmd); | |
| 169092 | + int nCmd = strlen(zCmd); | |
| 169080 | 169093 | if( sqlite3_strnicmp("prefix", zCmd, nCmd)==0 ){ |
| 169081 | 169094 | const int nByte = sizeof(int) * FTS5_MAX_PREFIX_INDEXES; |
| 169082 | 169095 | const char *p; |
| 169083 | 169096 | if( pConfig->aPrefix ){ |
| 169084 | 169097 | *pzErr = sqlite3_mprintf("multiple prefix=... directives"); |
| @@ -169111,11 +169124,11 @@ | ||
| 169111 | 169124 | return rc; |
| 169112 | 169125 | } |
| 169113 | 169126 | |
| 169114 | 169127 | if( sqlite3_strnicmp("tokenize", zCmd, nCmd)==0 ){ |
| 169115 | 169128 | const char *p = (const char*)zArg; |
| 169116 | - int nArg = (int)strlen(zArg) + 1; | |
| 169129 | + int nArg = strlen(zArg) + 1; | |
| 169117 | 169130 | char **azArg = sqlite3Fts5MallocZero(&rc, sizeof(char*) * nArg); |
| 169118 | 169131 | char *pDel = sqlite3Fts5MallocZero(&rc, nArg * 2); |
| 169119 | 169132 | char *pSpace = pDel; |
| 169120 | 169133 | |
| 169121 | 169134 | if( azArg && pSpace ){ |
| @@ -169227,11 +169240,11 @@ | ||
| 169227 | 169240 | char **pzOut, /* OUT: malloc'd buffer containing str/bw */ |
| 169228 | 169241 | int *pbQuoted /* OUT: Set to true if dequoting required */ |
| 169229 | 169242 | ){ |
| 169230 | 169243 | const char *zRet = 0; |
| 169231 | 169244 | |
| 169232 | - int nIn = (int)strlen(zIn); | |
| 169245 | + int nIn = strlen(zIn); | |
| 169233 | 169246 | char *zOut = sqlite3_malloc(nIn+1); |
| 169234 | 169247 | |
| 169235 | 169248 | assert( *pRc==SQLITE_OK ); |
| 169236 | 169249 | *pbQuoted = 0; |
| 169237 | 169250 | *pzOut = 0; |
| @@ -170637,11 +170650,11 @@ | ||
| 170637 | 170650 | if( p->pIter ){ |
| 170638 | 170651 | sqlite3Fts5IterClose(p->pIter); |
| 170639 | 170652 | p->pIter = 0; |
| 170640 | 170653 | } |
| 170641 | 170654 | rc = sqlite3Fts5IndexQuery( |
| 170642 | - pExpr->pIndex, p->zTerm, (int)strlen(p->zTerm), | |
| 170655 | + pExpr->pIndex, p->zTerm, strlen(p->zTerm), | |
| 170643 | 170656 | (pTerm->bPrefix ? FTS5INDEX_QUERY_PREFIX : 0) | |
| 170644 | 170657 | (pExpr->bDesc ? FTS5INDEX_QUERY_DESC : 0), |
| 170645 | 170658 | pNear->pColset, |
| 170646 | 170659 | &p->pIter |
| 170647 | 170660 | ); |
| @@ -171248,11 +171261,11 @@ | ||
| 171248 | 171261 | rc = fts5ParseStringFromToken(pToken, &z); |
| 171249 | 171262 | if( rc==SQLITE_OK ){ |
| 171250 | 171263 | int flags = FTS5_TOKENIZE_QUERY | (bPrefix ? FTS5_TOKENIZE_QUERY : 0); |
| 171251 | 171264 | int n; |
| 171252 | 171265 | sqlite3Fts5Dequote(z); |
| 171253 | - n = (int)strlen(z); | |
| 171266 | + n = strlen(z); | |
| 171254 | 171267 | rc = sqlite3Fts5Tokenize(pConfig, flags, z, n, &sCtx, fts5ParseTokenize); |
| 171255 | 171268 | } |
| 171256 | 171269 | sqlite3_free(z); |
| 171257 | 171270 | if( rc || (rc = sCtx.rc) ){ |
| 171258 | 171271 | pParse->rc = rc; |
| @@ -171321,12 +171334,11 @@ | ||
| 171321 | 171334 | for(i=0; rc==SQLITE_OK && i<pOrig->nTerm; i++){ |
| 171322 | 171335 | int tflags = 0; |
| 171323 | 171336 | Fts5ExprTerm *p; |
| 171324 | 171337 | for(p=&pOrig->aTerm[i]; p && rc==SQLITE_OK; p=p->pSynonym){ |
| 171325 | 171338 | 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); | |
| 171328 | 171340 | tflags = FTS5_TOKEN_COLOCATED; |
| 171329 | 171341 | } |
| 171330 | 171342 | if( rc==SQLITE_OK ){ |
| 171331 | 171343 | sCtx.pPhrase->aTerm[i].bPrefix = pOrig->aTerm[i].bPrefix; |
| 171332 | 171344 | } |
| @@ -171564,11 +171576,11 @@ | ||
| 171564 | 171576 | Fts5ExprTerm *p; |
| 171565 | 171577 | char *zQuoted; |
| 171566 | 171578 | |
| 171567 | 171579 | /* Determine the maximum amount of space required. */ |
| 171568 | 171580 | for(p=pTerm; p; p=p->pSynonym){ |
| 171569 | - nByte += (int)strlen(pTerm->zTerm) * 2 + 3 + 2; | |
| 171581 | + nByte += strlen(pTerm->zTerm) * 2 + 3 + 2; | |
| 171570 | 171582 | } |
| 171571 | 171583 | zQuoted = sqlite3_malloc(nByte); |
| 171572 | 171584 | |
| 171573 | 171585 | if( zQuoted ){ |
| 171574 | 171586 | int i = 0; |
| @@ -172137,11 +172149,11 @@ | ||
| 172137 | 172149 | for(i=0; i<pHash->nSlot; i++){ |
| 172138 | 172150 | while( apOld[i] ){ |
| 172139 | 172151 | int iHash; |
| 172140 | 172152 | Fts5HashEntry *p = apOld[i]; |
| 172141 | 172153 | 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)); | |
| 172143 | 172155 | p->pHashNext = apNew[iHash]; |
| 172144 | 172156 | apNew[iHash] = p; |
| 172145 | 172157 | } |
| 172146 | 172158 | } |
| 172147 | 172159 | |
| @@ -172425,11 +172437,11 @@ | ||
| 172425 | 172437 | const u8 **ppDoclist, /* OUT: pointer to doclist */ |
| 172426 | 172438 | int *pnDoclist /* OUT: size of doclist in bytes */ |
| 172427 | 172439 | ){ |
| 172428 | 172440 | Fts5HashEntry *p; |
| 172429 | 172441 | if( (p = pHash->pScan) ){ |
| 172430 | - int nTerm = (int)strlen(p->zKey); | |
| 172442 | + int nTerm = strlen(p->zKey); | |
| 172431 | 172443 | fts5HashAddPoslistSize(p); |
| 172432 | 172444 | *pzTerm = p->zKey; |
| 172433 | 172445 | *ppDoclist = (const u8*)&p->zKey[nTerm+1]; |
| 172434 | 172446 | *pnDoclist = p->nData - (FTS5_HASHENTRYSIZE + nTerm + 1); |
| 172435 | 172447 | }else{ |
| @@ -174205,11 +174217,10 @@ | ||
| 174205 | 174217 | |
| 174206 | 174218 | }else if( pIter->pSeg==0 ){ |
| 174207 | 174219 | const u8 *pList = 0; |
| 174208 | 174220 | const char *zTerm = 0; |
| 174209 | 174221 | int nList = 0; |
| 174210 | - assert( (pIter->flags & FTS5_SEGITER_ONETERM) || pbNewTerm ); | |
| 174211 | 174222 | if( 0==(pIter->flags & FTS5_SEGITER_ONETERM) ){ |
| 174212 | 174223 | sqlite3Fts5HashScanNext(p->pHash); |
| 174213 | 174224 | sqlite3Fts5HashScanEntry(p->pHash, &zTerm, &pList, &nList); |
| 174214 | 174225 | } |
| 174215 | 174226 | if( pList==0 ){ |
| @@ -174218,14 +174229,13 @@ | ||
| 174218 | 174229 | }else{ |
| 174219 | 174230 | pIter->pLeaf->p = (u8*)pList; |
| 174220 | 174231 | pIter->pLeaf->nn = nList; |
| 174221 | 174232 | pIter->pLeaf->szLeaf = nList; |
| 174222 | 174233 | 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); | |
| 174225 | 174235 | pIter->iLeafOffset = fts5GetVarint(pList, (u64*)&pIter->iRowid); |
| 174226 | - *pbNewTerm = 1; | |
| 174236 | + if( pbNewTerm ) *pbNewTerm = 1; | |
| 174227 | 174237 | } |
| 174228 | 174238 | }else{ |
| 174229 | 174239 | iOff = 0; |
| 174230 | 174240 | /* Next entry is not on the current page */ |
| 174231 | 174241 | while( iOff==0 ){ |
| @@ -174626,11 +174636,11 @@ | ||
| 174626 | 174636 | assert( p->rc==SQLITE_OK ); |
| 174627 | 174637 | |
| 174628 | 174638 | if( pTerm==0 || (flags & FTS5INDEX_QUERY_SCAN) ){ |
| 174629 | 174639 | p->rc = sqlite3Fts5HashScanInit(p->pHash, (const char*)pTerm, nTerm); |
| 174630 | 174640 | 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); | |
| 174632 | 174642 | }else{ |
| 174633 | 174643 | pIter->flags |= FTS5_SEGITER_ONETERM; |
| 174634 | 174644 | sqlite3Fts5HashQuery(p->pHash, (const char*)pTerm, nTerm, &pList, &nList); |
| 174635 | 174645 | z = pTerm; |
| 174636 | 174646 | n = nTerm; |
| @@ -176199,11 +176209,11 @@ | ||
| 176199 | 176209 | const u8 *pDoclist; /* Pointer to doclist for this term */ |
| 176200 | 176210 | int nDoclist; /* Size of doclist in bytes */ |
| 176201 | 176211 | |
| 176202 | 176212 | /* Write the term for this entry to disk. */ |
| 176203 | 176213 | sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist); |
| 176204 | - fts5WriteAppendTerm(p, &writer, (int)strlen(zTerm), (const u8*)zTerm); | |
| 176214 | + fts5WriteAppendTerm(p, &writer, strlen(zTerm), (const u8*)zTerm); | |
| 176205 | 176215 | |
| 176206 | 176216 | assert( writer.bFirstRowidInPage==0 ); |
| 176207 | 176217 | if( pgsz>=(pBuf->n + pPgidx->n + nDoclist + 1) ){ |
| 176208 | 176218 | /* The entire doclist will fit on the current leaf. */ |
| 176209 | 176219 | fts5BufferSafeAppendBlob(pBuf, pDoclist, nDoclist); |
| @@ -176475,11 +176485,11 @@ | ||
| 176475 | 176485 | fts5ChunkIterate(p, pSeg, (void*)pBuf, fts5PoslistCallback); |
| 176476 | 176486 | }else{ |
| 176477 | 176487 | PoslistCallbackCtx sCtx; |
| 176478 | 176488 | sCtx.pBuf = pBuf; |
| 176479 | 176489 | sCtx.pColset = pColset; |
| 176480 | - sCtx.eState = fts5IndexColsetTest(pColset, 0); | |
| 176490 | + sCtx.eState = pColset ? fts5IndexColsetTest(pColset, 0) : 1; | |
| 176481 | 176491 | assert( sCtx.eState==0 || sCtx.eState==1 ); |
| 176482 | 176492 | fts5ChunkIterate(p, pSeg, (void*)&sCtx, fts5PoslistFilterCallback); |
| 176483 | 176493 | } |
| 176484 | 176494 | } |
| 176485 | 176495 | } |
| @@ -177636,10 +177646,11 @@ | ||
| 177636 | 177646 | |
| 177637 | 177647 | fts5IntegrityCheckPgidx(p, pLeaf); |
| 177638 | 177648 | } |
| 177639 | 177649 | fts5DataRelease(pLeaf); |
| 177640 | 177650 | if( p->rc ) break; |
| 177651 | + | |
| 177641 | 177652 | |
| 177642 | 177653 | /* Now check that the iter.nEmpty leaves following the current leaf |
| 177643 | 177654 | ** (a) exist and (b) contain no terms. */ |
| 177644 | 177655 | fts5IndexIntegrityCheckEmpty( |
| 177645 | 177656 | p, pSeg, iIdxPrevLeaf+1, iDlidxPrevLeaf+1, iIdxLeaf-1 |
| @@ -178622,14 +178633,11 @@ | ||
| 178622 | 178633 | ** extension is currently being used by a version of SQLite too old to |
| 178623 | 178634 | ** support index-info flags. In that case this function is a no-op. |
| 178624 | 178635 | */ |
| 178625 | 178636 | static void fts5SetUniqueFlag(sqlite3_index_info *pIdxInfo){ |
| 178626 | 178637 | #if SQLITE_VERSION_NUMBER>=3008012 |
| 178627 | -#ifndef SQLITE_CORE | |
| 178628 | - if( sqlite3_libversion_number()>=3008012 ) | |
| 178629 | -#endif | |
| 178630 | - { | |
| 178638 | + if( sqlite3_libversion_number()>=3008012 ){ | |
| 178631 | 178639 | pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_UNIQUE; |
| 178632 | 178640 | } |
| 178633 | 178641 | #endif |
| 178634 | 178642 | } |
| 178635 | 178643 | |
| @@ -180572,11 +180580,11 @@ | ||
| 180572 | 180580 | sqlite3_context *pCtx, /* Function call context */ |
| 180573 | 180581 | int nArg, /* Number of args */ |
| 180574 | 180582 | sqlite3_value **apVal /* Function arguments */ |
| 180575 | 180583 | ){ |
| 180576 | 180584 | 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); | |
| 180578 | 180586 | } |
| 180579 | 180587 | |
| 180580 | 180588 | static int fts5Init(sqlite3 *db){ |
| 180581 | 180589 | static const sqlite3_module fts5Mod = { |
| 180582 | 180590 | /* iVersion */ 2, |
| @@ -180975,14 +180983,14 @@ | ||
| 180975 | 180983 | rc = SQLITE_NOMEM; |
| 180976 | 180984 | }else{ |
| 180977 | 180985 | int i; |
| 180978 | 180986 | int iOff; |
| 180979 | 180987 | sqlite3_snprintf(nDefn, zDefn, "id INTEGER PRIMARY KEY"); |
| 180980 | - iOff = (int)strlen(zDefn); | |
| 180988 | + iOff = strlen(zDefn); | |
| 180981 | 180989 | for(i=0; i<pConfig->nCol; i++){ |
| 180982 | 180990 | sqlite3_snprintf(nDefn-iOff, &zDefn[iOff], ", c%d", i); |
| 180983 | - iOff += (int)strlen(&zDefn[iOff]); | |
| 180991 | + iOff += strlen(&zDefn[iOff]); | |
| 180984 | 180992 | } |
| 180985 | 180993 | rc = sqlite3Fts5CreateTable(pConfig, "content", zDefn, 0, pzErr); |
| 180986 | 180994 | } |
| 180987 | 180995 | sqlite3_free(zDefn); |
| 180988 | 180996 | } |
| @@ -181403,11 +181411,21 @@ | ||
| 181403 | 181411 | rc = fts5StorageNewRowid(p, piRowid); |
| 181404 | 181412 | } |
| 181405 | 181413 | }else{ |
| 181406 | 181414 | sqlite3_stmt *pInsert = 0; /* Statement to write %_content table */ |
| 181407 | 181415 | 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 | + } | |
| 181409 | 181427 | for(i=1; rc==SQLITE_OK && i<=pConfig->nCol+1; i++){ |
| 181410 | 181428 | rc = sqlite3_bind_value(pInsert, i, apVal[i]); |
| 181411 | 181429 | } |
| 181412 | 181430 | if( rc==SQLITE_OK ){ |
| 181413 | 181431 | sqlite3_step(pInsert); |
| @@ -182021,11 +182039,11 @@ | ||
| 182021 | 182039 | Unicode61Tokenizer *p, /* Tokenizer object */ |
| 182022 | 182040 | const char *z, /* Characters to treat as exceptions */ |
| 182023 | 182041 | int bTokenChars /* 1 for 'tokenchars', 0 for 'separators' */ |
| 182024 | 182042 | ){ |
| 182025 | 182043 | int rc = SQLITE_OK; |
| 182026 | - int n = (int)strlen(z); | |
| 182044 | + int n = strlen(z); | |
| 182027 | 182045 | int *aNew; |
| 182028 | 182046 | |
| 182029 | 182047 | if( n>0 ){ |
| 182030 | 182048 | aNew = (int*)sqlite3_realloc(p->aiException, (n+p->nException)*sizeof(int)); |
| 182031 | 182049 | if( aNew ){ |
| @@ -183885,12 +183903,12 @@ | ||
| 183885 | 183903 | }else{ |
| 183886 | 183904 | int nByte; /* Bytes of space to allocate */ |
| 183887 | 183905 | const char *zDb = bDb ? argv[3] : argv[1]; |
| 183888 | 183906 | const char *zTab = bDb ? argv[4] : argv[3]; |
| 183889 | 183907 | 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; | |
| 183892 | 183910 | int eType; |
| 183893 | 183911 | |
| 183894 | 183912 | rc = fts5VocabTableType(zType, pzErr, &eType); |
| 183895 | 183913 | if( rc==SQLITE_OK ){ |
| 183896 | 183914 | assert( eType>=0 && eType<sizeof(azSchema)/sizeof(azSchema[0]) ); |
| 183897 | 183915 |
| --- 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 @@ | ||
| 109 | 109 | ** |
| 110 | 110 | ** See also: [sqlite3_libversion()], |
| 111 | 111 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 112 | 112 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 113 | 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" | |
| 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 | 117 | |
| 118 | 118 | /* |
| 119 | 119 | ** CAPI3REF: Run-Time Library Version Numbers |
| 120 | 120 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 121 | 121 | ** |
| 122 | 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.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 |