SQLite

Check-in [069e51b19c]
Login

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

Overview
Comment:Fix a problem in whereexpr.c causing a crash while processing a user-function taht accepts zero arguments.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | vtab-like-operator
Files: files | file ages | folders
SHA1: 069e51b19c773aa3017a8d307c8daa0766c224ba
User & Date: dan 2015-11-24 18:16:15.798
Context
2015-11-24
21:23
Add the sqlite3_strlike() interface, which might be useful for implementing LIKE operators on virtual tables. (Closed-Leaf check-in: e70ec71d68 user: drh tags: vtab-like-operator)
18:16
Fix a problem in whereexpr.c causing a crash while processing a user-function taht accepts zero arguments. (check-in: 069e51b19c user: dan tags: vtab-like-operator)
18:04
Fix harmless compiler warnings in the TCL test harness logic. (check-in: 2fba7a9656 user: drh tags: vtab-like-operator)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/whereexpr.c.
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
  Expr *pCol;                     /* Column reference */
  int i;

  if( pExpr->op!=TK_FUNCTION ){
    return 0;
  }
  pList = pExpr->x.pList;
  if( pList->nExpr!=2 ){
    return 0;
  }
  pCol = pList->a[1].pExpr;
  if( pCol->op!=TK_COLUMN || !IsVirtual(pCol->pTab) ){
    return 0;
  }
  for(i=0; i<ArraySize(aOp); i++){







|







301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
  Expr *pCol;                     /* Column reference */
  int i;

  if( pExpr->op!=TK_FUNCTION ){
    return 0;
  }
  pList = pExpr->x.pList;
  if( pList==0 || pList->nExpr!=2 ){
    return 0;
  }
  pCol = pList->a[1].pExpr;
  if( pCol->op!=TK_COLUMN || !IsVirtual(pCol->pTab) ){
    return 0;
  }
  for(i=0; i<ArraySize(aOp); i++){