/ Check-in [72cea358]
Login

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

Overview
Comment:Patch so the the code compiles with -DSQLITE_OMIT_CHECK=1. (CVS 3737)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 72cea358da4bd38af322f18f2a753171f7decaf8
User & Date: drh 2007-03-29 00:08:25
Context
2007-03-29
01:44
Lemon change: compile the resulting parser with -DYYSTACKDEPTH=0 or set the "%stack_size" parameter to 0 in the grammar and the parser stack will be dynamically allocated using realloc() and free(). The default behavior is to have a finite depth stack. (CVS 3738) check-in: 06719b74 user: drh tags: trunk
00:08
Patch so the the code compiles with -DSQLITE_OMIT_CHECK=1. (CVS 3737) check-in: 72cea358 user: drh tags: trunk
2007-03-28
18:04
Improvements to the XFER Optimization of the INSERT statement. (CVS 3736) check-in: 53fff7d1 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.178 2007/03/28 18:04:10 drh Exp $
           15  +** $Id: insert.c,v 1.179 2007/03/29 00:08:25 drh Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   
    19     19   /*
    20     20   ** Set P3 of the most recently inserted opcode to a column affinity
    21     21   ** string for index pIdx. A column affinity string has one character
    22     22   ** for each column in the table, according to the affinity of the column:
................................................................................
  1460   1460       for(pSrcIdx=pSrc->pIndex; pSrcIdx; pSrcIdx=pSrcIdx->pNext){
  1461   1461         if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
  1462   1462       }
  1463   1463       if( pSrcIdx==0 ){
  1464   1464         return 0;    /* pDestIdx has no corresponding index in pSrc */
  1465   1465       }
  1466   1466     }
         1467  +#ifndef SQLITE_OMIT_CHECK
  1467   1468     if( pDest->pCheck && !sqlite3ExprCompare(pSrc->pCheck, pDest->pCheck) ){
  1468   1469       return 0;   /* Tables have different CHECK constraints.  Ticket #2252 */
  1469   1470     }
         1471  +#endif
  1470   1472   
  1471   1473     /* If we get this far, it means either:
  1472   1474     **
  1473   1475     **    *   We can always do the transfer if the table contains an
  1474   1476     **        an integer primary key
  1475   1477     **
  1476   1478     **    *   We can conditionally do the transfer if the destination