SQLite

Check-in [812ed0c58f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix typos in a comment in analyze.c. No code changes.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | sqlite_stat4
Files: files | file ages | folders
SHA1: 812ed0c58fc5f729a2d4f16775fad6724cc367a6
User & Date: dan 2013-08-07 16:38:33.619
Context
2013-08-07
18:42
Merge latest trunk changes with this branch. (check-in: 08f74c45ec user: dan tags: sqlite_stat4)
16:38
Fix typos in a comment in analyze.c. No code changes. (check-in: 812ed0c58f user: dan tags: sqlite_stat4)
16:15
Change the way samples for the sqlite_stat4 table are collected. (check-in: 13ed5ac135 user: dan tags: sqlite_stat4)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/analyze.c.
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363



364
365
366
367
368
369
370

  UNUSED_PARAMETER(context);
  UNUSED_PARAMETER(argc);

  assert( p->nCol>0 );
  assert( argc==(2 + 3*p->nCol) );

  /* Figure out if this sample will be used. There are two reasons a
  ** sample may be used:
  **
  **   1. It may be a periodic sample. In this case set isPSample to true
  **      as well. Or,
  **
  **   2. Less than p->mxSample samples have been collected so far, or
  **
  **   3. It is more desirable than some other non-periodic sample that has
  **      already been collected. Samples are compared based on the values
  **      in the anEq array, starting from last (right-most index column)
  **      to first (left-most index column). If all elements of the anEq
  **      array are equal, samples are compared by hash value.



  */
  h = p->iPrn = p->iPrn*1103515245 + 12345;
  if( (nLt/p->nPSample)!=((nEq+nLt)/p->nPSample) ){
    doInsert = isPSample = 1;
  }else if( p->nSample<p->mxSample ){
    doInsert = 1;
  }else{







|












>
>
>







344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373

  UNUSED_PARAMETER(context);
  UNUSED_PARAMETER(argc);

  assert( p->nCol>0 );
  assert( argc==(2 + 3*p->nCol) );

  /* Figure out if this sample will be used. There are three reasons a
  ** sample may be used:
  **
  **   1. It may be a periodic sample. In this case set isPSample to true
  **      as well. Or,
  **
  **   2. Less than p->mxSample samples have been collected so far, or
  **
  **   3. It is more desirable than some other non-periodic sample that has
  **      already been collected. Samples are compared based on the values
  **      in the anEq array, starting from last (right-most index column)
  **      to first (left-most index column). If all elements of the anEq
  **      array are equal, samples are compared by hash value.
  **
  **      For both the contents of the anEq[] array and the hash value,
  **      larger values are considered more desirable.
  */
  h = p->iPrn = p->iPrn*1103515245 + 12345;
  if( (nLt/p->nPSample)!=((nEq+nLt)/p->nPSample) ){
    doInsert = isPSample = 1;
  }else if( p->nSample<p->mxSample ){
    doInsert = 1;
  }else{