aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2003-03-20 01:16:58 +0000
committerdrh <drh@noemail.net>2003-03-20 01:16:58 +0000
commit113088ec685755a8abc94ddadc7d0e57dba9c914 (patch)
tree10f7dfca4a91abe824f641dafcacf41483cf476c /src/expr.c
parent001bbcbb8fa5a55e9950445c6287a1fc0496e83e (diff)
downloadsqlite-113088ec685755a8abc94ddadc7d0e57dba9c914.tar.gz
sqlite-113088ec685755a8abc94ddadc7d0e57dba9c914.zip
Record the database name in addition to the table name for DELETE, INSERT,
and UPDATE statements. (CVS 879) FossilOrigin-Name: a5d8fc95ee58dc3205a0bbbcadaa3b9c902a941b
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expr.c b/src/expr.c
index 8ee9802d5..47a7dd1a8 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
-** $Id: expr.c,v 1.88 2003/01/31 17:16:37 drh Exp $
+** $Id: expr.c,v 1.89 2003/03/20 01:16:59 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -184,12 +184,12 @@ ExprList *sqliteExprListDup(ExprList *p){
SrcList *sqliteSrcListDup(SrcList *p){
SrcList *pNew;
int i;
+ int nByte;
if( p==0 ) return 0;
- pNew = sqliteMalloc( sizeof(*pNew) );
+ nByte = sizeof(*p) + (p->nSrc>0 ? sizeof(p->a[0]) * (p->nSrc-1) : 0);
+ pNew = sqliteMalloc( nByte );
if( pNew==0 ) return 0;
pNew->nSrc = p->nSrc;
- pNew->a = sqliteMalloc( p->nSrc*sizeof(p->a[0]) );
- if( pNew->a==0 && p->nSrc != 0 ) return 0;
for(i=0; i<p->nSrc; i++){
pNew->a[i].zName = sqliteStrDup(p->a[i].zName);
pNew->a[i].zAlias = sqliteStrDup(p->a[i].zAlias);