Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix compiler warnings in analyze.c. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5bbd2ccb3d2d6286fd667dac2ab658d6 |
User & Date: | dan 2013-08-30 20:19:52.698 |
Context
2013-08-31
| ||
14:56 | Reenable a test accidentally disabled when the stat4 branch was merged. (check-in: d9fadc8fa6 user: dan tags: trunk) | |
2013-08-30
| ||
21:52 | Add support for Cygwin when handling temporary file names. Improve error codes and diagnostic messages for temporary file name handling on Windows. Rename winConvertUtf8Filename to winConvertFromUtf8Filename. Improve placement and comments for forward function declarations. (check-in: a411df7251 user: mistachkin tags: cygwinTempPath) | |
20:19 | Fix compiler warnings in analyze.c. (check-in: 5bbd2ccb3d user: dan tags: trunk) | |
19:59 | Fix comment typo in analyze.c. No changes to code. (check-in: dbc3175044 user: mistachkin tags: trunk) | |
Changes
Changes to src/analyze.c.
︙ | ︙ | |||
341 342 343 344 345 346 347 | #ifdef SQLITE_ENABLE_STAT3_OR_STAT4 { u8 *pSpace; /* Allocated space not yet assigned */ int i; /* Used to iterate through p->aSample[] */ p->iGet = -1; p->mxSample = mxSample; | | | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | #ifdef SQLITE_ENABLE_STAT3_OR_STAT4 { u8 *pSpace; /* Allocated space not yet assigned */ int i; /* Used to iterate through p->aSample[] */ p->iGet = -1; p->mxSample = mxSample; p->nPSample = (tRowcnt)(sqlite3_value_int64(argv[1])/(mxSample/3+1) + 1); p->current.anLt = &p->current.anEq[nColUp]; sqlite3_randomness(sizeof(p->iPrn), &p->iPrn); /* Set up the Stat4Accum.a[] and aBest[] arrays */ p->a = (struct Stat4Sample*)&p->current.anLt[nColUp]; p->aBest = &p->a[mxSample]; pSpace = (u8*)(&p->a[mxSample+nCol]); |
︙ | ︙ | |||
420 421 422 423 424 425 426 | ** Copy the contents of sample *pNew into the p->a[] array. If necessary, ** remove the least desirable sample from p->a[] to make room. */ static void sampleInsert(Stat4Accum *p, Stat4Sample *pNew, int nEqZero){ Stat4Sample *pSample; int i; i64 iSeq; | | | 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | ** Copy the contents of sample *pNew into the p->a[] array. If necessary, ** remove the least desirable sample from p->a[] to make room. */ static void sampleInsert(Stat4Accum *p, Stat4Sample *pNew, int nEqZero){ Stat4Sample *pSample; int i; i64 iSeq; int iPos; assert( IsStat4 || nEqZero==0 ); if( pNew->isPSample==0 ){ Stat4Sample *pUpgrade = 0; assert( pNew->anEq[pNew->iCol]>0 ); |
︙ | ︙ | |||
1329 1330 1331 1332 1333 1334 1335 | if( pIdx ){ IndexSample *aSample = pIdx->aSample; IndexSample *pFinal = &aSample[pIdx->nSample-1]; int iCol; for(iCol=0; iCol<pIdx->nColumn; iCol++){ int i; /* Used to iterate through samples */ tRowcnt sumEq = 0; /* Sum of the nEq values */ | | | 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 | if( pIdx ){ IndexSample *aSample = pIdx->aSample; IndexSample *pFinal = &aSample[pIdx->nSample-1]; int iCol; for(iCol=0; iCol<pIdx->nColumn; iCol++){ int i; /* Used to iterate through samples */ tRowcnt sumEq = 0; /* Sum of the nEq values */ tRowcnt nSum = 0; /* Number of terms contributing to sumEq */ tRowcnt avgEq = 0; tRowcnt nDLt = pFinal->anDLt[iCol]; /* Set nSum to the number of distinct (iCol+1) field prefixes that ** occur in the stat4 table for this index before pFinal. Set ** sumEq to the sum of the nEq values for column iCol for the same ** set (adding the value only once where there exist dupicate |
︙ | ︙ |