SQLite

Check-in [f12b5404]
Login

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

Overview
Comment:In the wholenumber virtual table, increase the cost penalty for running open-loop. This appears to fix the problem reported by forum post b52a020ce4.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f12b54042e27b2fe99f23f97c103ee4371f8d4df3b049d9bb5d64891db56eee5
User & Date: drh 2021-03-19 17:54:43
Context
2021-03-20
01:00
Fix a faulty assert() in the OP_SkipScan opcode. dbsqlfuzz a15a9b2ca82e812ad52f62c86cc93dca0dc72f01. Test cases in TH3. (check-in: 1805b9aa user: drh tags: trunk)
2021-03-19
19:09
Merge enhancements from trunk. (check-in: d192d737 user: drh tags: eqp-improvements)
17:54
In the wholenumber virtual table, increase the cost penalty for running open-loop. This appears to fix the problem reported by forum post b52a020ce4. (check-in: f12b5404 user: drh tags: trunk)
16:29
Dbsqlfuzz found a new way to make that branch in codeVectorCompare reachable. (check-in: 959272c2 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/misc/wholenumber.c.

216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
  }
  if( pIdxInfo->nOrderBy==1
   && pIdxInfo->aOrderBy[0].desc==0
  ){
    pIdxInfo->orderByConsumed = 1;
  }
  if( (idxNum & 12)==0 ){
    pIdxInfo->estimatedCost = (double)100000000;
  }else if( (idxNum & 3)==0 ){
    pIdxInfo->estimatedCost = (double)5;
  }else{
    pIdxInfo->estimatedCost = (double)1;
  }
  return SQLITE_OK;
}







|







216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
  }
  if( pIdxInfo->nOrderBy==1
   && pIdxInfo->aOrderBy[0].desc==0
  ){
    pIdxInfo->orderByConsumed = 1;
  }
  if( (idxNum & 12)==0 ){
    pIdxInfo->estimatedCost = 1e99;
  }else if( (idxNum & 3)==0 ){
    pIdxInfo->estimatedCost = (double)5;
  }else{
    pIdxInfo->estimatedCost = (double)1;
  }
  return SQLITE_OK;
}