Fossil SCM
Update SQLite to the 3.8.8.1 release
Commit
282f1fc5424e286924ee12e7b959285cbc537e69
Parent
0af7024db1246f1…
2 files changed
+46
-7
+2
-2
+46
-7
| --- 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.8.8. By combining all the individual C code files into this | |
| 3 | +** version 3.8.8.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. |
| @@ -276,13 +276,13 @@ | ||
| 276 | 276 | ** |
| 277 | 277 | ** See also: [sqlite3_libversion()], |
| 278 | 278 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 279 | 279 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 280 | 280 | */ |
| 281 | -#define SQLITE_VERSION "3.8.8" | |
| 281 | +#define SQLITE_VERSION "3.8.8.1" | |
| 282 | 282 | #define SQLITE_VERSION_NUMBER 3008008 |
| 283 | -#define SQLITE_SOURCE_ID "2015-01-16 12:08:06 7d68a42face3ab14ed88407d4331872f5b243fdf" | |
| 283 | +#define SQLITE_SOURCE_ID "2015-01-20 16:51:25 f73337e3e289915a76ca96e7a05a1a8d4e890d55" | |
| 284 | 284 | |
| 285 | 285 | /* |
| 286 | 286 | ** CAPI3REF: Run-Time Library Version Numbers |
| 287 | 287 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 288 | 288 | ** |
| @@ -67496,10 +67496,45 @@ | ||
| 67496 | 67496 | if( pKeyInfo->db->mallocFailed ) return 1; |
| 67497 | 67497 | return 0; |
| 67498 | 67498 | } |
| 67499 | 67499 | #endif |
| 67500 | 67500 | |
| 67501 | +#if SQLITE_DEBUG | |
| 67502 | +/* | |
| 67503 | +** Count the number of fields (a.k.a. columns) in the record given by | |
| 67504 | +** pKey,nKey. The verify that this count is less than or equal to the | |
| 67505 | +** limit given by pKeyInfo->nField + pKeyInfo->nXField. | |
| 67506 | +** | |
| 67507 | +** If this constraint is not satisfied, it means that the high-speed | |
| 67508 | +** vdbeRecordCompareInt() and vdbeRecordCompareString() routines will | |
| 67509 | +** not work correctly. If this assert() ever fires, it probably means | |
| 67510 | +** that the KeyInfo.nField or KeyInfo.nXField values were computed | |
| 67511 | +** incorrectly. | |
| 67512 | +*/ | |
| 67513 | +static void vdbeAssertFieldCountWithinLimits( | |
| 67514 | + int nKey, const void *pKey, /* The record to verify */ | |
| 67515 | + const KeyInfo *pKeyInfo /* Compare size with this KeyInfo */ | |
| 67516 | +){ | |
| 67517 | + int nField = 0; | |
| 67518 | + u32 szHdr; | |
| 67519 | + u32 idx; | |
| 67520 | + u32 notUsed; | |
| 67521 | + const unsigned char *aKey = (const unsigned char*)pKey; | |
| 67522 | + | |
| 67523 | + if( CORRUPT_DB ) return; | |
| 67524 | + idx = getVarint32(aKey, szHdr); | |
| 67525 | + assert( szHdr<=nKey ); | |
| 67526 | + while( idx<szHdr ){ | |
| 67527 | + idx += getVarint32(aKey+idx, notUsed); | |
| 67528 | + nField++; | |
| 67529 | + } | |
| 67530 | + assert( nField <= pKeyInfo->nField+pKeyInfo->nXField ); | |
| 67531 | +} | |
| 67532 | +#else | |
| 67533 | +# define vdbeAssertFieldCountWithinLimits(A,B,C) | |
| 67534 | +#endif | |
| 67535 | + | |
| 67501 | 67536 | /* |
| 67502 | 67537 | ** Both *pMem1 and *pMem2 contain string values. Compare the two values |
| 67503 | 67538 | ** using the collation sequence pColl. As usual, return a negative , zero |
| 67504 | 67539 | ** or positive value if *pMem1 is less than, equal to or greater than |
| 67505 | 67540 | ** *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". |
| @@ -67907,10 +67942,11 @@ | ||
| 67907 | 67942 | u32 y; |
| 67908 | 67943 | u64 x; |
| 67909 | 67944 | i64 v = pPKey2->aMem[0].u.i; |
| 67910 | 67945 | i64 lhs; |
| 67911 | 67946 | |
| 67947 | + vdbeAssertFieldCountWithinLimits(nKey1, pKey1, pPKey2->pKeyInfo); | |
| 67912 | 67948 | assert( (*(u8*)pKey1)<=0x3F || CORRUPT_DB ); |
| 67913 | 67949 | switch( serial_type ){ |
| 67914 | 67950 | case 1: { /* 1-byte signed integer */ |
| 67915 | 67951 | lhs = ONE_BYTE_INT(aKey); |
| 67916 | 67952 | testcase( lhs<0 ); |
| @@ -67994,10 +68030,11 @@ | ||
| 67994 | 68030 | ){ |
| 67995 | 68031 | const u8 *aKey1 = (const u8*)pKey1; |
| 67996 | 68032 | int serial_type; |
| 67997 | 68033 | int res; |
| 67998 | 68034 | |
| 68035 | + vdbeAssertFieldCountWithinLimits(nKey1, pKey1, pPKey2->pKeyInfo); | |
| 67999 | 68036 | getVarint32(&aKey1[1], serial_type); |
| 68000 | 68037 | if( serial_type<12 ){ |
| 68001 | 68038 | res = pPKey2->r1; /* (pKey1/nKey1) is a number or a null */ |
| 68002 | 68039 | }else if( !(serial_type & 0x01) ){ |
| 68003 | 68040 | res = pPKey2->r2; /* (pKey1/nKey1) is a blob */ |
| @@ -105795,11 +105832,13 @@ | ||
| 105795 | 105832 | if( pParse->db->mallocFailed ) return; |
| 105796 | 105833 | pOp->p2 = nKey + nData; |
| 105797 | 105834 | pKI = pOp->p4.pKeyInfo; |
| 105798 | 105835 | memset(pKI->aSortOrder, 0, pKI->nField); /* Makes OP_Jump below testable */ |
| 105799 | 105836 | sqlite3VdbeChangeP4(v, -1, (char*)pKI, P4_KEYINFO); |
| 105800 | - pOp->p4.pKeyInfo = keyInfoFromExprList(pParse, pSort->pOrderBy, nOBSat, 1); | |
| 105837 | + testcase( pKI->nXField>2 ); | |
| 105838 | + pOp->p4.pKeyInfo = keyInfoFromExprList(pParse, pSort->pOrderBy, nOBSat, | |
| 105839 | + pKI->nXField-1); | |
| 105801 | 105840 | addrJmp = sqlite3VdbeCurrentAddr(v); |
| 105802 | 105841 | sqlite3VdbeAddOp3(v, OP_Jump, addrJmp+1, 0, addrJmp+1); VdbeCoverage(v); |
| 105803 | 105842 | pSort->labelBkOut = sqlite3VdbeMakeLabel(v); |
| 105804 | 105843 | pSort->regReturn = ++pParse->nMem; |
| 105805 | 105844 | sqlite3VdbeAddOp2(v, OP_Gosub, pSort->regReturn, pSort->labelBkOut); |
| @@ -106306,11 +106345,11 @@ | ||
| 106306 | 106345 | struct ExprList_item *pItem; |
| 106307 | 106346 | sqlite3 *db = pParse->db; |
| 106308 | 106347 | int i; |
| 106309 | 106348 | |
| 106310 | 106349 | nExpr = pList->nExpr; |
| 106311 | - pInfo = sqlite3KeyInfoAlloc(db, nExpr+nExtra-iStart, 1); | |
| 106350 | + pInfo = sqlite3KeyInfoAlloc(db, nExpr-iStart, nExtra+1); | |
| 106312 | 106351 | if( pInfo ){ |
| 106313 | 106352 | assert( sqlite3KeyInfoIsWriteable(pInfo) ); |
| 106314 | 106353 | for(i=iStart, pItem=pList->a+iStart; i<nExpr; i++, pItem++){ |
| 106315 | 106354 | CollSeq *pColl; |
| 106316 | 106355 | pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr); |
| @@ -110176,11 +110215,11 @@ | ||
| 110176 | 110215 | ** we figure out that the sorting index is not needed. The addrSortIndex |
| 110177 | 110216 | ** variable is used to facilitate that change. |
| 110178 | 110217 | */ |
| 110179 | 110218 | if( sSort.pOrderBy ){ |
| 110180 | 110219 | KeyInfo *pKeyInfo; |
| 110181 | - pKeyInfo = keyInfoFromExprList(pParse, sSort.pOrderBy, 0, 0); | |
| 110220 | + pKeyInfo = keyInfoFromExprList(pParse, sSort.pOrderBy, 0, pEList->nExpr); | |
| 110182 | 110221 | sSort.iECursor = pParse->nTab++; |
| 110183 | 110222 | sSort.addrSortIndex = |
| 110184 | 110223 | sqlite3VdbeAddOp4(v, OP_OpenEphemeral, |
| 110185 | 110224 | sSort.iECursor, sSort.pOrderBy->nExpr+1+pEList->nExpr, 0, |
| 110186 | 110225 | (char*)pKeyInfo, P4_KEYINFO |
| @@ -110350,11 +110389,11 @@ | ||
| 110350 | 110389 | ** implement it. Allocate that sorting index now. If it turns out |
| 110351 | 110390 | ** that we do not need it after all, the OP_SorterOpen instruction |
| 110352 | 110391 | ** will be converted into a Noop. |
| 110353 | 110392 | */ |
| 110354 | 110393 | sAggInfo.sortingIdx = pParse->nTab++; |
| 110355 | - pKeyInfo = keyInfoFromExprList(pParse, pGroupBy, 0, 0); | |
| 110394 | + pKeyInfo = keyInfoFromExprList(pParse, pGroupBy, 0, sAggInfo.nColumn); | |
| 110356 | 110395 | addrSortingIdx = sqlite3VdbeAddOp4(v, OP_SorterOpen, |
| 110357 | 110396 | sAggInfo.sortingIdx, sAggInfo.nSortingColumn, |
| 110358 | 110397 | 0, (char*)pKeyInfo, P4_KEYINFO); |
| 110359 | 110398 | |
| 110360 | 110399 | /* Initialize memory locations used by GROUP BY aggregate processing |
| 110361 | 110400 |
| --- 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.8.8. 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. |
| @@ -276,13 +276,13 @@ | |
| 276 | ** |
| 277 | ** See also: [sqlite3_libversion()], |
| 278 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 279 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 280 | */ |
| 281 | #define SQLITE_VERSION "3.8.8" |
| 282 | #define SQLITE_VERSION_NUMBER 3008008 |
| 283 | #define SQLITE_SOURCE_ID "2015-01-16 12:08:06 7d68a42face3ab14ed88407d4331872f5b243fdf" |
| 284 | |
| 285 | /* |
| 286 | ** CAPI3REF: Run-Time Library Version Numbers |
| 287 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 288 | ** |
| @@ -67496,10 +67496,45 @@ | |
| 67496 | if( pKeyInfo->db->mallocFailed ) return 1; |
| 67497 | return 0; |
| 67498 | } |
| 67499 | #endif |
| 67500 | |
| 67501 | /* |
| 67502 | ** Both *pMem1 and *pMem2 contain string values. Compare the two values |
| 67503 | ** using the collation sequence pColl. As usual, return a negative , zero |
| 67504 | ** or positive value if *pMem1 is less than, equal to or greater than |
| 67505 | ** *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". |
| @@ -67907,10 +67942,11 @@ | |
| 67907 | u32 y; |
| 67908 | u64 x; |
| 67909 | i64 v = pPKey2->aMem[0].u.i; |
| 67910 | i64 lhs; |
| 67911 | |
| 67912 | assert( (*(u8*)pKey1)<=0x3F || CORRUPT_DB ); |
| 67913 | switch( serial_type ){ |
| 67914 | case 1: { /* 1-byte signed integer */ |
| 67915 | lhs = ONE_BYTE_INT(aKey); |
| 67916 | testcase( lhs<0 ); |
| @@ -67994,10 +68030,11 @@ | |
| 67994 | ){ |
| 67995 | const u8 *aKey1 = (const u8*)pKey1; |
| 67996 | int serial_type; |
| 67997 | int res; |
| 67998 | |
| 67999 | getVarint32(&aKey1[1], serial_type); |
| 68000 | if( serial_type<12 ){ |
| 68001 | res = pPKey2->r1; /* (pKey1/nKey1) is a number or a null */ |
| 68002 | }else if( !(serial_type & 0x01) ){ |
| 68003 | res = pPKey2->r2; /* (pKey1/nKey1) is a blob */ |
| @@ -105795,11 +105832,13 @@ | |
| 105795 | if( pParse->db->mallocFailed ) return; |
| 105796 | pOp->p2 = nKey + nData; |
| 105797 | pKI = pOp->p4.pKeyInfo; |
| 105798 | memset(pKI->aSortOrder, 0, pKI->nField); /* Makes OP_Jump below testable */ |
| 105799 | sqlite3VdbeChangeP4(v, -1, (char*)pKI, P4_KEYINFO); |
| 105800 | pOp->p4.pKeyInfo = keyInfoFromExprList(pParse, pSort->pOrderBy, nOBSat, 1); |
| 105801 | addrJmp = sqlite3VdbeCurrentAddr(v); |
| 105802 | sqlite3VdbeAddOp3(v, OP_Jump, addrJmp+1, 0, addrJmp+1); VdbeCoverage(v); |
| 105803 | pSort->labelBkOut = sqlite3VdbeMakeLabel(v); |
| 105804 | pSort->regReturn = ++pParse->nMem; |
| 105805 | sqlite3VdbeAddOp2(v, OP_Gosub, pSort->regReturn, pSort->labelBkOut); |
| @@ -106306,11 +106345,11 @@ | |
| 106306 | struct ExprList_item *pItem; |
| 106307 | sqlite3 *db = pParse->db; |
| 106308 | int i; |
| 106309 | |
| 106310 | nExpr = pList->nExpr; |
| 106311 | pInfo = sqlite3KeyInfoAlloc(db, nExpr+nExtra-iStart, 1); |
| 106312 | if( pInfo ){ |
| 106313 | assert( sqlite3KeyInfoIsWriteable(pInfo) ); |
| 106314 | for(i=iStart, pItem=pList->a+iStart; i<nExpr; i++, pItem++){ |
| 106315 | CollSeq *pColl; |
| 106316 | pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr); |
| @@ -110176,11 +110215,11 @@ | |
| 110176 | ** we figure out that the sorting index is not needed. The addrSortIndex |
| 110177 | ** variable is used to facilitate that change. |
| 110178 | */ |
| 110179 | if( sSort.pOrderBy ){ |
| 110180 | KeyInfo *pKeyInfo; |
| 110181 | pKeyInfo = keyInfoFromExprList(pParse, sSort.pOrderBy, 0, 0); |
| 110182 | sSort.iECursor = pParse->nTab++; |
| 110183 | sSort.addrSortIndex = |
| 110184 | sqlite3VdbeAddOp4(v, OP_OpenEphemeral, |
| 110185 | sSort.iECursor, sSort.pOrderBy->nExpr+1+pEList->nExpr, 0, |
| 110186 | (char*)pKeyInfo, P4_KEYINFO |
| @@ -110350,11 +110389,11 @@ | |
| 110350 | ** implement it. Allocate that sorting index now. If it turns out |
| 110351 | ** that we do not need it after all, the OP_SorterOpen instruction |
| 110352 | ** will be converted into a Noop. |
| 110353 | */ |
| 110354 | sAggInfo.sortingIdx = pParse->nTab++; |
| 110355 | pKeyInfo = keyInfoFromExprList(pParse, pGroupBy, 0, 0); |
| 110356 | addrSortingIdx = sqlite3VdbeAddOp4(v, OP_SorterOpen, |
| 110357 | sAggInfo.sortingIdx, sAggInfo.nSortingColumn, |
| 110358 | 0, (char*)pKeyInfo, P4_KEYINFO); |
| 110359 | |
| 110360 | /* Initialize memory locations used by GROUP BY aggregate processing |
| 110361 |
| --- 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.8.8.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. |
| @@ -276,13 +276,13 @@ | |
| 276 | ** |
| 277 | ** See also: [sqlite3_libversion()], |
| 278 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 279 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 280 | */ |
| 281 | #define SQLITE_VERSION "3.8.8.1" |
| 282 | #define SQLITE_VERSION_NUMBER 3008008 |
| 283 | #define SQLITE_SOURCE_ID "2015-01-20 16:51:25 f73337e3e289915a76ca96e7a05a1a8d4e890d55" |
| 284 | |
| 285 | /* |
| 286 | ** CAPI3REF: Run-Time Library Version Numbers |
| 287 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 288 | ** |
| @@ -67496,10 +67496,45 @@ | |
| 67496 | if( pKeyInfo->db->mallocFailed ) return 1; |
| 67497 | return 0; |
| 67498 | } |
| 67499 | #endif |
| 67500 | |
| 67501 | #if SQLITE_DEBUG |
| 67502 | /* |
| 67503 | ** Count the number of fields (a.k.a. columns) in the record given by |
| 67504 | ** pKey,nKey. The verify that this count is less than or equal to the |
| 67505 | ** limit given by pKeyInfo->nField + pKeyInfo->nXField. |
| 67506 | ** |
| 67507 | ** If this constraint is not satisfied, it means that the high-speed |
| 67508 | ** vdbeRecordCompareInt() and vdbeRecordCompareString() routines will |
| 67509 | ** not work correctly. If this assert() ever fires, it probably means |
| 67510 | ** that the KeyInfo.nField or KeyInfo.nXField values were computed |
| 67511 | ** incorrectly. |
| 67512 | */ |
| 67513 | static void vdbeAssertFieldCountWithinLimits( |
| 67514 | int nKey, const void *pKey, /* The record to verify */ |
| 67515 | const KeyInfo *pKeyInfo /* Compare size with this KeyInfo */ |
| 67516 | ){ |
| 67517 | int nField = 0; |
| 67518 | u32 szHdr; |
| 67519 | u32 idx; |
| 67520 | u32 notUsed; |
| 67521 | const unsigned char *aKey = (const unsigned char*)pKey; |
| 67522 | |
| 67523 | if( CORRUPT_DB ) return; |
| 67524 | idx = getVarint32(aKey, szHdr); |
| 67525 | assert( szHdr<=nKey ); |
| 67526 | while( idx<szHdr ){ |
| 67527 | idx += getVarint32(aKey+idx, notUsed); |
| 67528 | nField++; |
| 67529 | } |
| 67530 | assert( nField <= pKeyInfo->nField+pKeyInfo->nXField ); |
| 67531 | } |
| 67532 | #else |
| 67533 | # define vdbeAssertFieldCountWithinLimits(A,B,C) |
| 67534 | #endif |
| 67535 | |
| 67536 | /* |
| 67537 | ** Both *pMem1 and *pMem2 contain string values. Compare the two values |
| 67538 | ** using the collation sequence pColl. As usual, return a negative , zero |
| 67539 | ** or positive value if *pMem1 is less than, equal to or greater than |
| 67540 | ** *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". |
| @@ -67907,10 +67942,11 @@ | |
| 67942 | u32 y; |
| 67943 | u64 x; |
| 67944 | i64 v = pPKey2->aMem[0].u.i; |
| 67945 | i64 lhs; |
| 67946 | |
| 67947 | vdbeAssertFieldCountWithinLimits(nKey1, pKey1, pPKey2->pKeyInfo); |
| 67948 | assert( (*(u8*)pKey1)<=0x3F || CORRUPT_DB ); |
| 67949 | switch( serial_type ){ |
| 67950 | case 1: { /* 1-byte signed integer */ |
| 67951 | lhs = ONE_BYTE_INT(aKey); |
| 67952 | testcase( lhs<0 ); |
| @@ -67994,10 +68030,11 @@ | |
| 68030 | ){ |
| 68031 | const u8 *aKey1 = (const u8*)pKey1; |
| 68032 | int serial_type; |
| 68033 | int res; |
| 68034 | |
| 68035 | vdbeAssertFieldCountWithinLimits(nKey1, pKey1, pPKey2->pKeyInfo); |
| 68036 | getVarint32(&aKey1[1], serial_type); |
| 68037 | if( serial_type<12 ){ |
| 68038 | res = pPKey2->r1; /* (pKey1/nKey1) is a number or a null */ |
| 68039 | }else if( !(serial_type & 0x01) ){ |
| 68040 | res = pPKey2->r2; /* (pKey1/nKey1) is a blob */ |
| @@ -105795,11 +105832,13 @@ | |
| 105832 | if( pParse->db->mallocFailed ) return; |
| 105833 | pOp->p2 = nKey + nData; |
| 105834 | pKI = pOp->p4.pKeyInfo; |
| 105835 | memset(pKI->aSortOrder, 0, pKI->nField); /* Makes OP_Jump below testable */ |
| 105836 | sqlite3VdbeChangeP4(v, -1, (char*)pKI, P4_KEYINFO); |
| 105837 | testcase( pKI->nXField>2 ); |
| 105838 | pOp->p4.pKeyInfo = keyInfoFromExprList(pParse, pSort->pOrderBy, nOBSat, |
| 105839 | pKI->nXField-1); |
| 105840 | addrJmp = sqlite3VdbeCurrentAddr(v); |
| 105841 | sqlite3VdbeAddOp3(v, OP_Jump, addrJmp+1, 0, addrJmp+1); VdbeCoverage(v); |
| 105842 | pSort->labelBkOut = sqlite3VdbeMakeLabel(v); |
| 105843 | pSort->regReturn = ++pParse->nMem; |
| 105844 | sqlite3VdbeAddOp2(v, OP_Gosub, pSort->regReturn, pSort->labelBkOut); |
| @@ -106306,11 +106345,11 @@ | |
| 106345 | struct ExprList_item *pItem; |
| 106346 | sqlite3 *db = pParse->db; |
| 106347 | int i; |
| 106348 | |
| 106349 | nExpr = pList->nExpr; |
| 106350 | pInfo = sqlite3KeyInfoAlloc(db, nExpr-iStart, nExtra+1); |
| 106351 | if( pInfo ){ |
| 106352 | assert( sqlite3KeyInfoIsWriteable(pInfo) ); |
| 106353 | for(i=iStart, pItem=pList->a+iStart; i<nExpr; i++, pItem++){ |
| 106354 | CollSeq *pColl; |
| 106355 | pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr); |
| @@ -110176,11 +110215,11 @@ | |
| 110215 | ** we figure out that the sorting index is not needed. The addrSortIndex |
| 110216 | ** variable is used to facilitate that change. |
| 110217 | */ |
| 110218 | if( sSort.pOrderBy ){ |
| 110219 | KeyInfo *pKeyInfo; |
| 110220 | pKeyInfo = keyInfoFromExprList(pParse, sSort.pOrderBy, 0, pEList->nExpr); |
| 110221 | sSort.iECursor = pParse->nTab++; |
| 110222 | sSort.addrSortIndex = |
| 110223 | sqlite3VdbeAddOp4(v, OP_OpenEphemeral, |
| 110224 | sSort.iECursor, sSort.pOrderBy->nExpr+1+pEList->nExpr, 0, |
| 110225 | (char*)pKeyInfo, P4_KEYINFO |
| @@ -110350,11 +110389,11 @@ | |
| 110389 | ** implement it. Allocate that sorting index now. If it turns out |
| 110390 | ** that we do not need it after all, the OP_SorterOpen instruction |
| 110391 | ** will be converted into a Noop. |
| 110392 | */ |
| 110393 | sAggInfo.sortingIdx = pParse->nTab++; |
| 110394 | pKeyInfo = keyInfoFromExprList(pParse, pGroupBy, 0, sAggInfo.nColumn); |
| 110395 | addrSortingIdx = sqlite3VdbeAddOp4(v, OP_SorterOpen, |
| 110396 | sAggInfo.sortingIdx, sAggInfo.nSortingColumn, |
| 110397 | 0, (char*)pKeyInfo, P4_KEYINFO); |
| 110398 | |
| 110399 | /* Initialize memory locations used by GROUP BY aggregate processing |
| 110400 |
+2
-2
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -105,13 +105,13 @@ | ||
| 105 | 105 | ** |
| 106 | 106 | ** See also: [sqlite3_libversion()], |
| 107 | 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | 109 | */ |
| 110 | -#define SQLITE_VERSION "3.8.8" | |
| 110 | +#define SQLITE_VERSION "3.8.8.1" | |
| 111 | 111 | #define SQLITE_VERSION_NUMBER 3008008 |
| 112 | -#define SQLITE_SOURCE_ID "2015-01-16 12:08:06 7d68a42face3ab14ed88407d4331872f5b243fdf" | |
| 112 | +#define SQLITE_SOURCE_ID "2015-01-20 16:51:25 f73337e3e289915a76ca96e7a05a1a8d4e890d55" | |
| 113 | 113 | |
| 114 | 114 | /* |
| 115 | 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | 117 | ** |
| 118 | 118 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -105,13 +105,13 @@ | |
| 105 | ** |
| 106 | ** See also: [sqlite3_libversion()], |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.8.8" |
| 111 | #define SQLITE_VERSION_NUMBER 3008008 |
| 112 | #define SQLITE_SOURCE_ID "2015-01-16 12:08:06 7d68a42face3ab14ed88407d4331872f5b243fdf" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -105,13 +105,13 @@ | |
| 105 | ** |
| 106 | ** See also: [sqlite3_libversion()], |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.8.8.1" |
| 111 | #define SQLITE_VERSION_NUMBER 3008008 |
| 112 | #define SQLITE_SOURCE_ID "2015-01-20 16:51:25 f73337e3e289915a76ca96e7a05a1a8d4e890d55" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |