SQLite

Check-in [8a39167bd2]
Login

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

Overview
Comment:Futher improvements to LEFT JOIN strength reduction.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8a39167bd2d46496f7484cfec371e4bad22da882209b01da9459c4ed5877da25
User & Date: drh 2019-10-11 17:14:40.541
Context
2019-10-11
18:55
Update the zipfile extension to use deflateBound(), instead of compressBound(), to learn the maximum possible size of a deflate()d buffer. (check-in: f5ee30426e user: dan tags: trunk)
17:14
Futher improvements to LEFT JOIN strength reduction. (check-in: 8a39167bd2 user: drh tags: trunk)
16:01
Improvements to the LEFT JOIN strength reduction optimization. (check-in: 548082dfab user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/expr.c.
5230
5231
5232
5233
5234
5235
5236

5237
5238
5239




5240
5241
5242
5243
5244
5245
5246
5230
5231
5232
5233
5234
5235
5236
5237



5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248







+
-
-
-
+
+
+
+







*/
int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab){
  Walker w;
  p = sqlite3ExprSkipCollateAndLikely(p);
  if( p==0 ) return 0;
  if( p->op==TK_NOTNULL ){
    p = p->pLeft;
  }else{
  }else if( p->op==TK_AND ){
    if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab) ) return 1;
    p = p->pRight;
    while( p->op==TK_AND ){
      if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab) ) return 1;
      p = p->pRight;
    }
  }
  w.xExprCallback = impliesNotNullRow;
  w.xSelectCallback = 0;
  w.xSelectCallback2 = 0;
  w.eCode = 0;
  w.u.iCur = iTab;
  sqlite3WalkExpr(&w, p);