1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Add testcase macros.

FossilOrigin-Name: fb9c9bb284d441bd7aa34c87b6fd8ce57d036c17623d82354154fc6286bdd134
This commit is contained in:
drh
2019-10-19 15:01:52 +00:00
parent b9bcf7ca60
commit c5f808d85e
5 changed files with 21 additions and 15 deletions

View File

@@ -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));