mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Add new testcase() macros and fix a bug that was revealed when trying to
cover all the new test cases. FossilOrigin-Name: 266a99f7c068aadbd08157d1d495a428109ad7a32d872f8026e8db0f89c40f91
This commit is contained in:
22
manifest
22
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Remove\sunreachable\sbranches.\s\s100%\sMC/DC\sin\sTH3\snow.
|
C Add\snew\stestcase()\smacros\sand\sfix\sa\sbug\sthat\swas\srevealed\swhen\strying\sto\ncover\sall\sthe\snew\stest\scases.
|
||||||
D 2018-04-17T21:59:34.011
|
D 2018-04-18T01:34:39.665
|
||||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||||
F Makefile.in 5ce9343cba9c189046f1afe6d2bcc1f68079439febc05267b98aec6ecc752439
|
F Makefile.in 5ce9343cba9c189046f1afe6d2bcc1f68079439febc05267b98aec6ecc752439
|
||||||
@@ -443,7 +443,7 @@ F src/date.c ebe1dc7c8a347117bb02570f1a931c62dd78f4a2b1b516f4837d45b7d6426957
|
|||||||
F src/dbpage.c 8db4c97f630e7d83f884ea75caf1ffd0988c160e9d530194d93721c80821e0f6
|
F src/dbpage.c 8db4c97f630e7d83f884ea75caf1ffd0988c160e9d530194d93721c80821e0f6
|
||||||
F src/dbstat.c edabb82611143727511a45ca0859b8cd037851ebe756ae3db289859dd18b6f91
|
F src/dbstat.c edabb82611143727511a45ca0859b8cd037851ebe756ae3db289859dd18b6f91
|
||||||
F src/delete.c 20c8788451dc737a967c87ea53ad43544d617f5b57d32ccce8bd52a0daf9e89b
|
F src/delete.c 20c8788451dc737a967c87ea53ad43544d617f5b57d32ccce8bd52a0daf9e89b
|
||||||
F src/expr.c 1633ff93c1261cb7f55e86585790920f95740249cf153fe3b7cf9dc737def6a1
|
F src/expr.c e27dfc8fd55b7df98ade7341da66bacb1de98589cbf5a0de7dcaa708d41769bc
|
||||||
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
||||||
F src/fkey.c d617daf66b5515e2b42c1405b2b4984c30ca50fb705ab164271a9bf66c69e331
|
F src/fkey.c d617daf66b5515e2b42c1405b2b4984c30ca50fb705ab164271a9bf66c69e331
|
||||||
F src/func.c 94f42cba2cc1c34aeaa441022ba0170ec3fec4bba54db4e0ded085c6dc0fdc51
|
F src/func.c 94f42cba2cc1c34aeaa441022ba0170ec3fec4bba54db4e0ded085c6dc0fdc51
|
||||||
@@ -452,7 +452,7 @@ F src/hash.c a12580e143f10301ed5166ea4964ae2853d3905a511d4e0c44497245c7ce1f7a
|
|||||||
F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
|
F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
|
||||||
F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da
|
F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da
|
||||||
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||||
F src/insert.c 326dfb5d6f738c48b772f897401f25923c2fdd569258014d57244594985a2baa
|
F src/insert.c 5fa74146492f5da33e42c35f5f58fb8d56e047c42746fdbd52c8ebdb21160e27
|
||||||
F src/legacy.c 134ab3e3fae00a0f67a5187981d6935b24b337bcf0f4b3e5c9fa5763da95bf4e
|
F src/legacy.c 134ab3e3fae00a0f67a5187981d6935b24b337bcf0f4b3e5c9fa5763da95bf4e
|
||||||
F src/loadext.c f6e4e416a736369f9e80eba609f0acda97148a8b0453784d670c78d3eed2f302
|
F src/loadext.c f6e4e416a736369f9e80eba609f0acda97148a8b0453784d670c78d3eed2f302
|
||||||
F src/main.c 1648fc7a9bcfdbfd9a9a04af96ff2796c3164b3f3c7e56ed63a3c51cd11d198d
|
F src/main.c 1648fc7a9bcfdbfd9a9a04af96ff2796c3164b3f3c7e56ed63a3c51cd11d198d
|
||||||
@@ -489,7 +489,7 @@ F src/pragma.h bb83728944b42f6d409c77f5838a8edbdb0fe83046c5496ffc9602b40340a324
|
|||||||
F src/prepare.c b086fea6a1952db88beca31fdd621201ee5e4ce3f02905248cc3035a8174aa89
|
F src/prepare.c b086fea6a1952db88beca31fdd621201ee5e4ce3f02905248cc3035a8174aa89
|
||||||
F src/printf.c d3b7844ddeb11fbbdd38dd84d09c9c1ac171d21fb038473c3aa97981201cc660
|
F src/printf.c d3b7844ddeb11fbbdd38dd84d09c9c1ac171d21fb038473c3aa97981201cc660
|
||||||
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
||||||
F src/resolve.c f0efb32b5d6a45ded839cc1bae7e57d6c27b7c7259c2ebeaa7ee361b66ab6164
|
F src/resolve.c 6415381a0e9d22c0e7cba33ca4a53f81474190862f5d4838190f5eb5b0b47bc9
|
||||||
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
|
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
|
||||||
F src/select.c 3e84cb869930aa8fcacd3acbb1a0ec2d82736c8479d6a4367a5f1a926fb8a763
|
F src/select.c 3e84cb869930aa8fcacd3acbb1a0ec2d82736c8479d6a4367a5f1a926fb8a763
|
||||||
F src/shell.c.in cc960721e56ebc1a78773bb5d2f5608b54275f945cbe49e4afe919d6888062a7
|
F src/shell.c.in cc960721e56ebc1a78773bb5d2f5608b54275f945cbe49e4afe919d6888062a7
|
||||||
@@ -555,17 +555,17 @@ F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
|
|||||||
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
|
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
|
||||||
F src/tokenize.c 5b0c661a85f783d35b9883830736eeb63be4aefc4f6b7d9cd081d48782c041e2
|
F src/tokenize.c 5b0c661a85f783d35b9883830736eeb63be4aefc4f6b7d9cd081d48782c041e2
|
||||||
F src/treeview.c 14d5d1254702ec96876aa52642cb31548612384134970409fae333b25b39d6bb
|
F src/treeview.c 14d5d1254702ec96876aa52642cb31548612384134970409fae333b25b39d6bb
|
||||||
F src/trigger.c fcb566b0df7bdefed4bff7e31aa7efa1c77cc0549e4ac79879d69490208ff966
|
F src/trigger.c 4ace6d1d5ba9a89822deb287317f33c810440526eafe185c2d8a48c31df1e995
|
||||||
F src/update.c 5787acf0a12a20cf31c0c50db644a667590f720e404b3616bc2efeb9bd5bbc06
|
F src/update.c 5787acf0a12a20cf31c0c50db644a667590f720e404b3616bc2efeb9bd5bbc06
|
||||||
F src/upsert.c 3e152ac4073449bef7f13ed9d932eee86399c9180bd92fc201a2bfa7ee3e7b0e
|
F src/upsert.c 3e152ac4073449bef7f13ed9d932eee86399c9180bd92fc201a2bfa7ee3e7b0e
|
||||||
F src/utf.c 810fbfebe12359f10bc2a011520a6e10879ab2a163bcb26c74768eab82ea62a5
|
F src/utf.c 810fbfebe12359f10bc2a011520a6e10879ab2a163bcb26c74768eab82ea62a5
|
||||||
F src/util.c d9eb0a6c4aae1b00a7369eadd7ca0bbe946cb4c953b6751aa20d357c2f482157
|
F src/util.c d9eb0a6c4aae1b00a7369eadd7ca0bbe946cb4c953b6751aa20d357c2f482157
|
||||||
F src/vacuum.c 762ee9bbf8733d87d8cd06f58d950e881982e416f8c767334a40ffd341b6bff5
|
F src/vacuum.c 762ee9bbf8733d87d8cd06f58d950e881982e416f8c767334a40ffd341b6bff5
|
||||||
F src/vdbe.c 066a4e1de2ed83e253adfd2e97a684cf562eaa41d31ee7f3d3e4c8aea4485a55
|
F src/vdbe.c 066a4e1de2ed83e253adfd2e97a684cf562eaa41d31ee7f3d3e4c8aea4485a55
|
||||||
F src/vdbe.h 134beb7a12a6213c00eba58febaede33447cc4441bc568a0d9c144b33fc3720a
|
F src/vdbe.h 574ce9a0d57b026fc93ac379a339b8d391977f335ab4176a7e21ba902e9184bd
|
||||||
F src/vdbeInt.h 95f7adfdc5c8f1353321f55a6c5ec00a90877e3b85af5159e393afb41ff54110
|
F src/vdbeInt.h 95f7adfdc5c8f1353321f55a6c5ec00a90877e3b85af5159e393afb41ff54110
|
||||||
F src/vdbeapi.c 29d2baf9c1233131ec467d7bed1b7c8a03c27579048d768c4b04acf427838858
|
F src/vdbeapi.c 29d2baf9c1233131ec467d7bed1b7c8a03c27579048d768c4b04acf427838858
|
||||||
F src/vdbeaux.c 1edb8a07e929eb2cb3b9cc225e0d9803614b82152e1d651d6633b932742bac94
|
F src/vdbeaux.c 0fdf97855e523489b8a75483e872164418b46651d8bfd74c6f526b4cbaf3c41d
|
||||||
F src/vdbeblob.c f5c70f973ea3a9e915d1693278a5f890dc78594300cf4d54e64f2b0917c94191
|
F src/vdbeblob.c f5c70f973ea3a9e915d1693278a5f890dc78594300cf4d54e64f2b0917c94191
|
||||||
F src/vdbemem.c 414e28d3a7e2a8bee2bb247de115dcbc68e3cbac284d5862d077002f7a93bce1
|
F src/vdbemem.c 414e28d3a7e2a8bee2bb247de115dcbc68e3cbac284d5862d077002f7a93bce1
|
||||||
F src/vdbesort.c 731a09e5cb9e96b70c394c1b7cf3860fbe84acca7682e178615eb941a3a0ef2f
|
F src/vdbesort.c 731a09e5cb9e96b70c394c1b7cf3860fbe84acca7682e178615eb941a3a0ef2f
|
||||||
@@ -1722,7 +1722,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P 542547c1ce770a1427d3023d8c8fdcb2db7b1e017bc111e3484641f97e42381a
|
P 558865d5c3c297155e1be5ea73effb46a995ea146bd745b23330c94782c6c45b
|
||||||
R eaa343ed18594cb5b1fe2123e6ffcceb
|
R 5325c58ad9aebb44156b57d725814085
|
||||||
U drh
|
U drh
|
||||||
Z bbeb2696ee9f7be52525aa3a7c3c7f63
|
Z 2b55e94eff4090db1ea2fec8a1bfbc7a
|
||||||
|
@@ -1 +1 @@
|
|||||||
558865d5c3c297155e1be5ea73effb46a995ea146bd745b23330c94782c6c45b
|
266a99f7c068aadbd08157d1d495a428109ad7a32d872f8026e8db0f89c40f91
|
@@ -1826,6 +1826,7 @@ static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){
|
|||||||
/* Fall through */
|
/* Fall through */
|
||||||
case TK_IF_NULL_ROW:
|
case TK_IF_NULL_ROW:
|
||||||
case TK_REGISTER:
|
case TK_REGISTER:
|
||||||
|
testcase( pExpr->op==TK_REGISTER );
|
||||||
testcase( pExpr->op==TK_IF_NULL_ROW );
|
testcase( pExpr->op==TK_IF_NULL_ROW );
|
||||||
pWalker->eCode = 0;
|
pWalker->eCode = 0;
|
||||||
return WRC_Abort;
|
return WRC_Abort;
|
||||||
|
36
src/insert.c
36
src/insert.c
@@ -1171,8 +1171,9 @@ typedef struct ConstraintAddr ConstraintAddr;
|
|||||||
struct ConstraintAddr {
|
struct ConstraintAddr {
|
||||||
int ipkTop; /* Subroutine for rowid constraint check */
|
int ipkTop; /* Subroutine for rowid constraint check */
|
||||||
int upsertTop; /* Label for upsert constraint check subroutine */
|
int upsertTop; /* Label for upsert constraint check subroutine */
|
||||||
int ipkBtm; /* Return opcode rowid constraint check */
|
int upsertTop2; /* Copy of upsertTop not cleared by the call */
|
||||||
int upsertBtm; /* upsert constraint returns to this label */
|
int upsertBtm; /* upsert constraint returns to this label */
|
||||||
|
int ipkBtm; /* Return opcode rowid constraint check */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1181,6 +1182,7 @@ struct ConstraintAddr {
|
|||||||
*/
|
*/
|
||||||
static void reorderConstraintChecks(Vdbe *v, ConstraintAddr *p){
|
static void reorderConstraintChecks(Vdbe *v, ConstraintAddr *p){
|
||||||
if( p->upsertTop ){
|
if( p->upsertTop ){
|
||||||
|
testcase( sqlite3VdbeLabelHasBeenResolved(v, p->upsertTop) );
|
||||||
sqlite3VdbeGoto(v, p->upsertTop);
|
sqlite3VdbeGoto(v, p->upsertTop);
|
||||||
VdbeComment((v, "call upsert subroutine"));
|
VdbeComment((v, "call upsert subroutine"));
|
||||||
sqlite3VdbeResolveLabel(v, p->upsertBtm);
|
sqlite3VdbeResolveLabel(v, p->upsertBtm);
|
||||||
@@ -1188,7 +1190,7 @@ static void reorderConstraintChecks(Vdbe *v, ConstraintAddr *p){
|
|||||||
}
|
}
|
||||||
if( p->ipkTop ){
|
if( p->ipkTop ){
|
||||||
sqlite3VdbeGoto(v, p->ipkTop);
|
sqlite3VdbeGoto(v, p->ipkTop);
|
||||||
VdbeComment((v, "call rowid constraint-check subroutine"));
|
VdbeComment((v, "call rowid unique-check subroutine"));
|
||||||
sqlite3VdbeJumpHere(v, p->ipkBtm);
|
sqlite3VdbeJumpHere(v, p->ipkBtm);
|
||||||
p->ipkTop = 0;
|
p->ipkTop = 0;
|
||||||
}
|
}
|
||||||
@@ -1315,8 +1317,7 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
assert( v!=0 );
|
assert( v!=0 );
|
||||||
assert( pTab->pSelect==0 ); /* This table is not a VIEW */
|
assert( pTab->pSelect==0 ); /* This table is not a VIEW */
|
||||||
nCol = pTab->nCol;
|
nCol = pTab->nCol;
|
||||||
sAddr.ipkTop = 0;
|
memset(&sAddr, 0, sizeof(sAddr));
|
||||||
sAddr.upsertTop = 0;
|
|
||||||
|
|
||||||
/* pPk is the PRIMARY KEY index for WITHOUT ROWID tables and NULL for
|
/* pPk is the PRIMARY KEY index for WITHOUT ROWID tables and NULL for
|
||||||
** normal rowid tables. nPkField is the number of key fields in the
|
** normal rowid tables. nPkField is the number of key fields in the
|
||||||
@@ -1451,7 +1452,7 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
/* If the constraint-target is on some column other than
|
/* If the constraint-target is on some column other than
|
||||||
** then ROWID, then we might need to move the UPSERT around
|
** then ROWID, then we might need to move the UPSERT around
|
||||||
** so that it occurs in the correct order. */
|
** so that it occurs in the correct order. */
|
||||||
sAddr.upsertTop = sqlite3VdbeMakeLabel(v);
|
sAddr.upsertTop = sAddr.upsertTop2 = sqlite3VdbeMakeLabel(v);
|
||||||
sAddr.upsertBtm = sqlite3VdbeMakeLabel(v);
|
sAddr.upsertBtm = sqlite3VdbeMakeLabel(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1519,6 +1520,9 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
case OE_Rollback:
|
case OE_Rollback:
|
||||||
case OE_Abort:
|
case OE_Abort:
|
||||||
case OE_Fail: {
|
case OE_Fail: {
|
||||||
|
testcase( onError==OE_Rollback );
|
||||||
|
testcase( onError==OE_Abort );
|
||||||
|
testcase( onError==OE_Fail );
|
||||||
sqlite3RowidConstraint(pParse, onError, pTab);
|
sqlite3RowidConstraint(pParse, onError, pTab);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1578,6 +1582,7 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
case OE_Ignore: {
|
case OE_Ignore: {
|
||||||
|
testcase( onError==OE_Ignore );
|
||||||
sqlite3VdbeGoto(v, ignoreDest);
|
sqlite3VdbeGoto(v, ignoreDest);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1607,7 +1612,7 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
addrUniqueOk = sAddr.upsertBtm;
|
addrUniqueOk = sAddr.upsertBtm;
|
||||||
upsertBypass = sqlite3VdbeGoto(v, 0);
|
upsertBypass = sqlite3VdbeGoto(v, 0);
|
||||||
VdbeComment((v, "Skip upsert subroutine"));
|
VdbeComment((v, "Skip upsert subroutine"));
|
||||||
sqlite3VdbeResolveLabel(v, sAddr.upsertTop);
|
sqlite3VdbeResolveLabel(v, sAddr.upsertTop2);
|
||||||
}else{
|
}else{
|
||||||
addrUniqueOk = sqlite3VdbeMakeLabel(v);
|
addrUniqueOk = sqlite3VdbeMakeLabel(v);
|
||||||
}
|
}
|
||||||
@@ -1676,9 +1681,6 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
}else if( onError==OE_Default ){
|
}else if( onError==OE_Default ){
|
||||||
onError = OE_Abort;
|
onError = OE_Abort;
|
||||||
}
|
}
|
||||||
if( onError==OE_Replace ){
|
|
||||||
reorderConstraintChecks(v, &sAddr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Figure out if the upsert clause applies to this index */
|
/* Figure out if the upsert clause applies to this index */
|
||||||
if( pUpIdx==pIdx ){
|
if( pUpIdx==pIdx ){
|
||||||
@@ -1689,6 +1691,15 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Invoke subroutines to handle IPK replace and upsert prior to running
|
||||||
|
** the first REPLACE constraint check. */
|
||||||
|
if( onError==OE_Replace ){
|
||||||
|
testcase( sAddr.ipkTop );
|
||||||
|
testcase( sAddr.upsertTop
|
||||||
|
&& sqlite3VdbeLabelHasBeenResolved(v,sAddr.upsertTop) );
|
||||||
|
reorderConstraintChecks(v, &sAddr);
|
||||||
|
}
|
||||||
|
|
||||||
/* Collision detection may be omitted if all of the following are true:
|
/* Collision detection may be omitted if all of the following are true:
|
||||||
** (1) The conflict resolution algorithm is REPLACE
|
** (1) The conflict resolution algorithm is REPLACE
|
||||||
** (2) The table is a WITHOUT ROWID table
|
** (2) The table is a WITHOUT ROWID table
|
||||||
@@ -1776,6 +1787,9 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
case OE_Rollback:
|
case OE_Rollback:
|
||||||
case OE_Abort:
|
case OE_Abort:
|
||||||
case OE_Fail: {
|
case OE_Fail: {
|
||||||
|
testcase( onError==OE_Rollback );
|
||||||
|
testcase( onError==OE_Abort );
|
||||||
|
testcase( onError==OE_Fail );
|
||||||
sqlite3UniqueConstraint(pParse, onError, pIdx);
|
sqlite3UniqueConstraint(pParse, onError, pIdx);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1786,6 +1800,7 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
case OE_Ignore: {
|
case OE_Ignore: {
|
||||||
|
testcase( onError==OE_Ignore );
|
||||||
sqlite3VdbeGoto(v, ignoreDest);
|
sqlite3VdbeGoto(v, ignoreDest);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1812,6 +1827,9 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
if( regR!=regIdx ) sqlite3ReleaseTempRange(pParse, regR, nPkField);
|
if( regR!=regIdx ) sqlite3ReleaseTempRange(pParse, regR, nPkField);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
testcase( sAddr.ipkTop!=0 );
|
||||||
|
testcase( sAddr.upsertTop
|
||||||
|
&& sqlite3VdbeLabelHasBeenResolved(v,sAddr.upsertTop) );
|
||||||
reorderConstraintChecks(v, &sAddr);
|
reorderConstraintChecks(v, &sAddr);
|
||||||
|
|
||||||
*pbMayReplace = seenReplace;
|
*pbMayReplace = seenReplace;
|
||||||
|
@@ -346,6 +346,7 @@ static int lookupName(
|
|||||||
cnt++;
|
cnt++;
|
||||||
#ifndef SQLITE_OMIT_UPSERT
|
#ifndef SQLITE_OMIT_UPSERT
|
||||||
if( pExpr->iTable==2 ){
|
if( pExpr->iTable==2 ){
|
||||||
|
testcase( iCol==(-1) );
|
||||||
pExpr->iTable = pNC->uNC.pUpsert->regData + iCol;
|
pExpr->iTable = pNC->uNC.pUpsert->regData + iCol;
|
||||||
eNewExprOp = TK_REGISTER;
|
eNewExprOp = TK_REGISTER;
|
||||||
}else
|
}else
|
||||||
|
@@ -432,7 +432,9 @@ TriggerStep *sqlite3TriggerInsertStep(
|
|||||||
pTriggerStep->pUpsert = pUpsert;
|
pTriggerStep->pUpsert = pUpsert;
|
||||||
pTriggerStep->orconf = orconf;
|
pTriggerStep->orconf = orconf;
|
||||||
}else{
|
}else{
|
||||||
|
testcase( pColumn );
|
||||||
sqlite3IdListDelete(db, pColumn);
|
sqlite3IdListDelete(db, pColumn);
|
||||||
|
testcase( pUpsert );
|
||||||
sqlite3UpsertDelete(db, pUpsert);
|
sqlite3UpsertDelete(db, pUpsert);
|
||||||
}
|
}
|
||||||
sqlite3SelectDelete(db, pSelect);
|
sqlite3SelectDelete(db, pSelect);
|
||||||
|
@@ -220,6 +220,9 @@ void sqlite3VdbeClearObject(sqlite3*,Vdbe*);
|
|||||||
void sqlite3VdbeMakeReady(Vdbe*,Parse*);
|
void sqlite3VdbeMakeReady(Vdbe*,Parse*);
|
||||||
int sqlite3VdbeFinalize(Vdbe*);
|
int sqlite3VdbeFinalize(Vdbe*);
|
||||||
void sqlite3VdbeResolveLabel(Vdbe*, int);
|
void sqlite3VdbeResolveLabel(Vdbe*, int);
|
||||||
|
#ifdef SQLITE_COVERAGE_TEST
|
||||||
|
int sqlite3VdbeLabelHasBeenResolved(Vdbe*,int);
|
||||||
|
#endif
|
||||||
int sqlite3VdbeCurrentAddr(Vdbe*);
|
int sqlite3VdbeCurrentAddr(Vdbe*);
|
||||||
#ifdef SQLITE_DEBUG
|
#ifdef SQLITE_DEBUG
|
||||||
int sqlite3VdbeAssertMayAbort(Vdbe *, int);
|
int sqlite3VdbeAssertMayAbort(Vdbe *, int);
|
||||||
|
@@ -402,6 +402,19 @@ void sqlite3VdbeResolveLabel(Vdbe *v, int x){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SQLITE_COVERAGE_TEST
|
||||||
|
/*
|
||||||
|
** Return TRUE if and only if the label x has already been resolved.
|
||||||
|
** Return FALSE (zero) if label x is still unresolved.
|
||||||
|
**
|
||||||
|
** This routine is only used inside of testcase() macros, and so it
|
||||||
|
** only exists when measuring test coverage.
|
||||||
|
*/
|
||||||
|
int sqlite3VdbeLabelHasBeenResolved(Vdbe *v, int x){
|
||||||
|
return v->pParse->aLabel && v->pParse->aLabel[ADDR(x)]>=0;
|
||||||
|
}
|
||||||
|
#endif /* SQLITE_COVERAGE_TEST */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Mark the VDBE as one that can only be run one time.
|
** Mark the VDBE as one that can only be run one time.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user