/ Check-in [835e2cc5]
Login

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

Overview
Comment:Fix a failure in sqlite3ExprCompare()
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:835e2cc55feea2f2426c99816c27f9c35d2fd4cdd9bf1c7f46f889ecfd222778
User & Date: drh 2019-01-17 01:06:00
Context
2019-01-17
03:43
Ensure that the variable-length integer decoder in FTS3 never tries to left-shift a negative number. check-in: 10ffc1fe user: drh tags: trunk
01:06
Fix a failure in sqlite3ExprCompare() check-in: 835e2cc5 user: drh tags: trunk
2019-01-16
20:48
Fix a problem with fix [b4b57413]. check-in: ca7b7aae user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/expr.c.

  4854   4854         ** if we reach this point, either A and B both window functions or
  4855   4855         ** neither are a window functions. */
  4856   4856         assert( ExprHasProperty(pA,EP_WinFunc)==ExprHasProperty(pB,EP_WinFunc) );
  4857   4857         if( ExprHasProperty(pA,EP_WinFunc) ){
  4858   4858           if( sqlite3WindowCompare(pParse,pA->y.pWin,pB->y.pWin)!=0 ) return 2;
  4859   4859         }
  4860   4860   #endif
         4861  +    }else if( pA->op==TK_NULL ){
         4862  +      return 0;
  4861   4863       }else if( pA->op==TK_COLLATE ){
  4862   4864         if( sqlite3_stricmp(pA->u.zToken,pB->u.zToken)!=0 ) return 2;
  4863         -    }else if( strcmp(pA->u.zToken,pB->u.zToken)!=0 ){
         4865  +    }else if( ALWAYS(pB->u.zToken!=0) && strcmp(pA->u.zToken,pB->u.zToken)!=0 ){
  4864   4866         return 2;
  4865   4867       }
  4866   4868     }
  4867   4869     if( (pA->flags & EP_Distinct)!=(pB->flags & EP_Distinct) ) return 2;
  4868   4870     if( (combinedFlags & EP_TokenOnly)==0 ){
  4869   4871       if( combinedFlags & EP_xIsSelect ) return 2;
  4870   4872       if( (combinedFlags & EP_FixedCol)==0