/ Check-in [7f9f0444]
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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7f9f0444ed1a85ed682b604fded535bff5be1535
User & Date: drh 2007-04-18 17:07:58
Context
2007-04-19
00:24
Get the build working with SQLITE_OMIT_SHARED_CACHE. Ticket #2307. (CVS 3857) check-in: b623538c 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: 7f9f0444 user: drh tags: trunk
17:04
Better handle malloc() failures in the "echo" virtual table test module. (CVS 3855) check-in: 6881f921 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/expr.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
**    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.
**
................................................................................
  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;
}








|







 







|




|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
**    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.
**
................................................................................
  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;
}