1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix a bug in the COPY command introduced by check-in (991). (CVS 996)

FossilOrigin-Name: 77ec13dab85b70795ef06ff2c714cca0cd496837
This commit is contained in:
drh
2003-06-02 22:50:25 +00:00
parent ade106c14a
commit 2394e376d6
4 changed files with 13 additions and 12 deletions

View File

@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the COPY command.
**
** $Id: copy.c,v 1.5 2003/05/17 17:35:11 drh Exp $
** $Id: copy.c,v 1.6 2003/06/02 22:50:26 drh Exp $
*/
#include "sqliteInt.h"
@ -96,7 +96,8 @@ void sqliteCopy(
sqliteVdbeAddOp(v, OP_FileColumn, i, 0);
}
}
sqliteGenerateConstraintChecks(pParse, pTab, 0, 0, 0, 0, onError, addr);
sqliteGenerateConstraintChecks(pParse, pTab, 0, 0, pTab->iPKey>=0,
0, onError, addr);
sqliteCompleteInsertion(pParse, pTab, 0, 0, 0, 0, -1);
if( (db->flags & SQLITE_CountRows)!=0 ){
sqliteVdbeAddOp(v, OP_AddImm, 1, 0); /* Increment row count */