SQLite

Check-in [7b59930a1d]
Login

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

Overview
Comment:Enhance WhereLoopBuilder.iPlanLimit to handle a case involving the OR optimization discovered overnight by OSSFuzz.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7b59930a1d7b664b54d5a2bc9fa385925b5f4c8f34bf401c798307e3e2dae2c6
User & Date: drh 2018-09-22 15:05:32.605
Context
2018-09-23
02:01
Fix a faulty assert() in the validation logic for the LEFT JOIN strength reduction optimization. Problem found by OSSFuzz. (check-in: 2fd62fccd1 user: drh tags: trunk)
2018-09-22
15:05
Enhance WhereLoopBuilder.iPlanLimit to handle a case involving the OR optimization discovered overnight by OSSFuzz. (check-in: 7b59930a1d user: drh tags: trunk)
2018-09-21
23:41
Fix harmless compiler warning when compiled with SQLITE_OMIT_AUTHORIZATION. (check-in: 50f2fa1953 user: mistachkin tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/where.c.
2123
2124
2125
2126
2127
2128
2129
2130





2131
2132
2133
2134
2135
2136
2137
2123
2124
2125
2126
2127
2128
2129

2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141







-
+
+
+
+
+







static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){
  WhereLoop **ppPrev, *p;
  WhereInfo *pWInfo = pBuilder->pWInfo;
  sqlite3 *db = pWInfo->pParse->db;
  int rc;

  /* Stop the search once we hit the query planner search limit */
  if( pBuilder->iPlanLimit==0 ) return SQLITE_DONE;
  if( pBuilder->iPlanLimit==0 ){
    WHERETRACE(0xffffffff,("=== query planner search limit reached ===\n"));
    if( pBuilder->pOrSet ) pBuilder->pOrSet->n = 0;
    return SQLITE_DONE;
  }
  pBuilder->iPlanLimit--;

  /* If pBuilder->pOrSet is defined, then only keep track of the costs
  ** and prereqs.
  */
  if( pBuilder->pOrSet!=0 ){
    if( pTemplate->nLTerm ){
Changes to test/fuzzdata5.db.

cannot compute difference between binary files