Index: src/insert.c ================================================================== --- src/insert.c +++ src/insert.c @@ -10,11 +10,11 @@ ** ************************************************************************* ** This file contains C code routines that are called by the parser ** to handle INSERT statements in SQLite. ** -** $Id: insert.c,v 1.178 2007/03/28 18:04:10 drh Exp $ +** $Id: insert.c,v 1.179 2007/03/29 00:08:25 drh Exp $ */ #include "sqliteInt.h" /* ** Set P3 of the most recently inserted opcode to a column affinity @@ -1462,13 +1462,15 @@ } if( pSrcIdx==0 ){ return 0; /* pDestIdx has no corresponding index in pSrc */ } } +#ifndef SQLITE_OMIT_CHECK if( pDest->pCheck && !sqlite3ExprCompare(pSrc->pCheck, pDest->pCheck) ){ return 0; /* Tables have different CHECK constraints. Ticket #2252 */ } +#endif /* If we get this far, it means either: ** ** * We can always do the transfer if the table contains an ** an integer primary key