/ Check-in [43a77f01]
Login

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

Overview
Comment:Fix for bug #16: Check for invalid functions in the VALUES clause of an INSERT statement. (CVS 525)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:43a77f019d34e1a6b3f502ad0ec31a00c8fdbe6e
User & Date: drh 2002-04-12 03:55:16
Context
2002-04-12
10:08
Fix for bug #15: Add the sqlite_changes() API function for retrieving the number of rows that changed in the previous operation. (CVS 526) check-in: 6e71493b user: drh tags: trunk
03:55
Fix for bug #16: Check for invalid functions in the VALUES clause of an INSERT statement. (CVS 525) check-in: 43a77f01 user: drh tags: trunk
2002-04-09
03:28
Fix for bug #11: Output the correct row count when and INSERT does an IGNORE action. (CVS 524) check-in: bb83642e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/insert.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
95
96
97
98
99
100
101



102
103
104
105
106
107
108
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
** $Id: insert.c,v 1.50 2002/04/09 03:28:01 drh Exp $
*/
#include "sqliteInt.h"

/*
** This routine is call to handle SQL of the following forms:
**
**    insert into TABLE (IDLIST) values(EXPRLIST)
................................................................................
    srcTab = -1;
    assert( pList );
    nColumn = pList->nExpr;
    dummy.nId = 0;
    for(i=0; i<nColumn; i++){
      if( sqliteExprResolveIds(pParse, 0, &dummy, 0, pList->a[i].pExpr) ){
        goto insert_cleanup;



      }
    }
  }

  /* Make sure the number of columns in the source data matches the number
  ** of columns to be inserted into the table.
  */







|







 







>
>
>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
** $Id: insert.c,v 1.51 2002/04/12 03:55:16 drh Exp $
*/
#include "sqliteInt.h"

/*
** This routine is call to handle SQL of the following forms:
**
**    insert into TABLE (IDLIST) values(EXPRLIST)
................................................................................
    srcTab = -1;
    assert( pList );
    nColumn = pList->nExpr;
    dummy.nId = 0;
    for(i=0; i<nColumn; i++){
      if( sqliteExprResolveIds(pParse, 0, &dummy, 0, pList->a[i].pExpr) ){
        goto insert_cleanup;
      }
      if( sqliteExprCheck(pParse, pList->a[i].pExpr, 0, 0) ){
        goto insert_cleanup;
      }
    }
  }

  /* Make sure the number of columns in the source data matches the number
  ** of columns to be inserted into the table.
  */