SQLite

Check-in [7f9f0444ed]
Login

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

Overview
Comment:Fix a && where & was intended. This is a real problem, but it would be very difficult to devise a test case where it might lead to an unexpected result. Ticket #2306. (CVS 3856)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7f9f0444ed1a85ed682b604fded535bff5be1535
User & Date: drh 2007-04-18 17:07:58.000
Context
2007-04-19
00:24
Get the build working with SQLITE_OMIT_SHARED_CACHE. Ticket #2307. (CVS 3857) (check-in: b623538c55 user: drh tags: trunk)
2007-04-18
17:07
Fix a && where & was intended. This is a real problem, but it would be very difficult to devise a test case where it might lead to an unexpected result. Ticket #2306. (CVS 3856) (check-in: 7f9f0444ed user: drh tags: trunk)
17:04
Better handle malloc() failures in the "echo" virtual table test module. (CVS 3855) (check-in: 6881f9212f user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/expr.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.284 2007/04/13 16:06:33 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** Return the 'affinity' of the expression pExpr if any.
**







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.285 2007/04/18 17:07:58 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** Return the 'affinity' of the expression pExpr if any.
**
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
  pNew->iAgg = -1;
  if( pToken ){
    assert( pToken->dyn==0 );
    pNew->span = pNew->token = *pToken;
  }else if( pLeft ){
    if( pRight ){
      sqlite3ExprSpan(pNew, &pLeft->span, &pRight->span);
      if( pRight->flags && EP_ExpCollate ){
        pNew->flags |= EP_ExpCollate;
        pNew->pColl = pRight->pColl;
      }
    }
    if( pLeft->flags && EP_ExpCollate ){
      pNew->flags |= EP_ExpCollate;
      pNew->pColl = pLeft->pColl;
    }
  }
  return pNew;
}








|




|







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
  pNew->iAgg = -1;
  if( pToken ){
    assert( pToken->dyn==0 );
    pNew->span = pNew->token = *pToken;
  }else if( pLeft ){
    if( pRight ){
      sqlite3ExprSpan(pNew, &pLeft->span, &pRight->span);
      if( pRight->flags & EP_ExpCollate ){
        pNew->flags |= EP_ExpCollate;
        pNew->pColl = pRight->pColl;
      }
    }
    if( pLeft->flags & EP_ExpCollate ){
      pNew->flags |= EP_ExpCollate;
      pNew->pColl = pLeft->pColl;
    }
  }
  return pNew;
}