diff options
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/insert.c b/src/insert.c index 0711930fb..77edc5ea6 100644 --- a/src/insert.c +++ b/src/insert.c @@ -1518,9 +1518,11 @@ void sqlite3GenerateConstraintChecks( addr1 = sqlite3VdbeMakeLabel(pParse); sqlite3VdbeAddOp2(v, OP_NotNull, iReg, addr1); VdbeCoverage(v); - sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regNewData+1+i); - sqlite3VdbeAddOp2(v, OP_NotNull, iReg, addr1); - VdbeCoverage(v); + if( (pTab->aCol[i].colFlags & COLFLAG_GENERATED)==0 ){ + sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regNewData+1+i); + sqlite3VdbeAddOp2(v, OP_NotNull, iReg, addr1); + VdbeCoverage(v); + } onError = OE_Abort; /* Fall through into the OE_Abort case to generate code that runs ** if both the input and the default value are NULL */ |