/ Check-in [795b453c]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix an error message that is generated if the number of columns do not match on an INSERT into a virtual table with hidden columns. (CVS 6588)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 795b453c9a03c32d9d4cdf62823d2b9dd667cc44
User & Date: drh 2009-05-01 15:17:48
Context
2009-05-01
21:13
Record within the Token structure itself whether or not the token has been dequoted. This steals one bit from the length of a token and thus limits the size of tokens to 1GiB. (CVS 6589) check-in: 12bcb03d user: drh tags: trunk
15:17
Fix an error message that is generated if the number of columns do not match on an INSERT into a virtual table with hidden columns. (CVS 6588) check-in: 795b453c user: drh tags: trunk
13:16
Update PRAGMA integrity_check so that it treats SQLITE_IOERR_NOMEM errors from underlying components the same as SQLITE_NOMEM errors. (CVS 6587) check-in: 26444f2a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/insert.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains C code routines that are called by the parser
    13     13   ** to handle INSERT statements in SQLite.
    14     14   **
    15         -** $Id: insert.c,v 1.262 2009/05/01 02:08:04 drh Exp $
           15  +** $Id: insert.c,v 1.263 2009/05/01 15:17:48 drh Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   
    19     19   /*
    20     20   ** Generate code that will open a table for reading.
    21     21   */
    22     22   void sqlite3OpenTable(
................................................................................
   639    639       for(i=0; i<pTab->nCol; i++){
   640    640         nHidden += (IsHiddenColumn(&pTab->aCol[i]) ? 1 : 0);
   641    641       }
   642    642     }
   643    643     if( pColumn==0 && nColumn && nColumn!=(pTab->nCol-nHidden) ){
   644    644       sqlite3ErrorMsg(pParse, 
   645    645          "table %S has %d columns but %d values were supplied",
   646         -       pTabList, 0, pTab->nCol, nColumn);
          646  +       pTabList, 0, pTab->nCol-nHidden, nColumn);
   647    647       goto insert_cleanup;
   648    648     }
   649    649     if( pColumn!=0 && nColumn!=pColumn->nId ){
   650    650       sqlite3ErrorMsg(pParse, "%d values for %d columns", nColumn, pColumn->nId);
   651    651       goto insert_cleanup;
   652    652     }
   653    653