aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-10-19 15:01:52 +0000
committerdrh <drh@noemail.net>2019-10-19 15:01:52 +0000
commitc5f808d85ef130717aee1bc7e7ffcd934c84ab66 (patch)
treee420bd08cfe2d9b34ecf4defd751363792da041c /src/insert.c
parentb9bcf7ca600ab8a94018adc2eac4115441a09d89 (diff)
downloadsqlite-c5f808d85ef130717aee1bc7e7ffcd934c84ab66.tar.gz
sqlite-c5f808d85ef130717aee1bc7e7ffcd934c84ab66.zip
Add testcase macros.
FossilOrigin-Name: fb9c9bb284d441bd7aa34c87b6fd8ce57d036c17623d82354154fc6286bdd134
Diffstat (limited to 'src/insert.c')
-rw-r--r--src/insert.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/insert.c b/src/insert.c
index 88b8e6ad2..e15e9feed 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -1464,6 +1464,7 @@ void sqlite3GenerateConstraintChecks(
pParse->iSelfTab = 0;
if( onError==OE_Replace ) onError = OE_Abort;
}else{
+ testcase( i!=sqlite3TableColumnToStorage(pTab, i) );
iReg = sqlite3TableColumnToStorage(pTab, i) + regNewData + 1;
}
switch( onError ){
@@ -1782,6 +1783,7 @@ void sqlite3GenerateConstraintChecks(
VdbeComment((v, "%s column %d", pIdx->zName, i));
#endif
}else{
+ testcase( sqlite3TableColumnToStorage(pTab, iField)!=iField );
x = sqlite3TableColumnToStorage(pTab, iField) + regNewData + 1;
sqlite3VdbeAddOp2(v, OP_SCopy, x, regIdx+i);
VdbeComment((v, "%s", pTab->aCol[iField].zName));