| | @@ -1,8 +1,8 @@ |
| 1 | 1 | /****************************************************************************** |
| 2 | 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | | -** version 3.8.11. By combining all the individual C code files into this |
| 3 | +** version 3.8.11.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.8.11" |
| 328 | +#define SQLITE_VERSION "3.8.11.1" |
| 329 | 329 | #define SQLITE_VERSION_NUMBER 3008011 |
| 330 | | -#define SQLITE_SOURCE_ID "2015-07-27 13:49:41 b8e92227a469de677a66da62e4361f099c0b79d0" |
| 330 | +#define SQLITE_SOURCE_ID "2015-07-29 20:00:57 cf538e2783e468bbc25e7cb2a9ee64d3e0e80b2f" |
| 331 | 331 | |
| 332 | 332 | /* |
| 333 | 333 | ** CAPI3REF: Run-Time Library Version Numbers |
| 334 | 334 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 335 | 335 | ** |
| | @@ -4747,13 +4747,13 @@ |
| 4747 | 4747 | ** ^The sqlite3_result_blob() interface sets the result from |
| 4748 | 4748 | ** an application-defined function to be the BLOB whose content is pointed |
| 4749 | 4749 | ** to by the second parameter and which is N bytes long where N is the |
| 4750 | 4750 | ** third parameter. |
| 4751 | 4751 | ** |
| 4752 | | -** ^The sqlite3_result_zeroblob() and zeroblob64() interfaces set the result |
| 4753 | | -** of the application-defined function to be a BLOB containing all zero |
| 4754 | | -** bytes and N bytes in size, where N is the value of the 2nd parameter. |
| 4752 | +** ^The sqlite3_result_zeroblob(C,N) and sqlite3_result_zeroblob64(C,N) |
| 4753 | +** interfaces set the result of the application-defined function to be |
| 4754 | +** a BLOB containing all zero bytes and N bytes in size. |
| 4755 | 4755 | ** |
| 4756 | 4756 | ** ^The sqlite3_result_double() interface sets the result from |
| 4757 | 4757 | ** an application-defined function to be a floating point value specified |
| 4758 | 4758 | ** by its 2nd argument. |
| 4759 | 4759 | ** |
| | @@ -102750,11 +102750,11 @@ |
| 102750 | 102750 | }else{ |
| 102751 | 102751 | sqlite3TableLock(pParse, iDbDest, pDest->tnum, 1, pDest->zName); |
| 102752 | 102752 | sqlite3TableLock(pParse, iDbSrc, pSrc->tnum, 0, pSrc->zName); |
| 102753 | 102753 | } |
| 102754 | 102754 | for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){ |
| 102755 | | - u8 useSeekResult = 0; |
| 102755 | + u8 idxInsFlags = 0; |
| 102756 | 102756 | for(pSrcIdx=pSrc->pIndex; ALWAYS(pSrcIdx); pSrcIdx=pSrcIdx->pNext){ |
| 102757 | 102757 | if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break; |
| 102758 | 102758 | } |
| 102759 | 102759 | assert( pSrcIdx ); |
| 102760 | 102760 | sqlite3VdbeAddOp3(v, OP_OpenRead, iSrc, pSrcIdx->tnum, iDbSrc); |
| | @@ -102785,16 +102785,19 @@ |
| 102785 | 102785 | char *zColl = pSrcIdx->azColl[i]; |
| 102786 | 102786 | assert( zColl!=0 ); |
| 102787 | 102787 | if( sqlite3_stricmp("BINARY", zColl) ) break; |
| 102788 | 102788 | } |
| 102789 | 102789 | if( i==pSrcIdx->nColumn ){ |
| 102790 | | - useSeekResult = OPFLAG_USESEEKRESULT; |
| 102790 | + idxInsFlags = OPFLAG_USESEEKRESULT; |
| 102791 | 102791 | sqlite3VdbeAddOp3(v, OP_Last, iDest, 0, -1); |
| 102792 | 102792 | } |
| 102793 | + } |
| 102794 | + if( !HasRowid(pSrc) && pDestIdx->idxType==2 ){ |
| 102795 | + idxInsFlags |= OPFLAG_NCHANGE; |
| 102793 | 102796 | } |
| 102794 | 102797 | sqlite3VdbeAddOp3(v, OP_IdxInsert, iDest, regData, 1); |
| 102795 | | - sqlite3VdbeChangeP5(v, useSeekResult); |
| 102798 | + sqlite3VdbeChangeP5(v, idxInsFlags); |
| 102796 | 102799 | sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1); VdbeCoverage(v); |
| 102797 | 102800 | sqlite3VdbeJumpHere(v, addr1); |
| 102798 | 102801 | sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0); |
| 102799 | 102802 | sqlite3VdbeAddOp2(v, OP_Close, iDest, 0); |
| 102800 | 102803 | } |
| | @@ -105464,10 +105467,11 @@ |
| 105464 | 105467 | returnSingleInt(pParse, "cache_size", pDb->pSchema->cache_size); |
| 105465 | 105468 | }else{ |
| 105466 | 105469 | int size = sqlite3Atoi(zRight); |
| 105467 | 105470 | pDb->pSchema->cache_size = size; |
| 105468 | 105471 | sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size); |
| 105472 | + if( sqlite3ReadSchema(pParse) ) goto pragma_out; |
| 105469 | 105473 | } |
| 105470 | 105474 | break; |
| 105471 | 105475 | } |
| 105472 | 105476 | |
| 105473 | 105477 | /* |
| 105474 | 105478 | |