From 83e0dba3118798936d45bbf4d00064ac0cefe2aa Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 20 Dec 2012 00:32:49 +0000 Subject: [PATCH] Remove an unreachable branch operation from the foreign_key_check pragma. FossilOrigin-Name: b5a8f3160b5dc1397312add3c5410e7e0a12b75e --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/pragma.c | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index c6b7e5c563..3c7204c5d2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Added\stest\scases\sfor\sPRAGMA\sforeign_key_check.\s\sFixed\sa\sbug\sthat\sappears\nwhen\sthe\scolumn\sorder\sof\sthe\schild\sand\sparent\sdiffer. -D 2012-12-17T22:32:14.381 +C Remove\san\sunreachable\sbranch\soperation\sfrom\sthe\sforeign_key_check\spragma. +D 2012-12-20T00:32:49.517 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 690d441a758cbffd13e814dc2724a721a6ebd400 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -168,7 +168,7 @@ F src/parse.y c2b4a6454ad77299b1443e2c483a560a9f16e724 F src/pcache.c f8043b433a57aba85384a531e3937a804432a346 F src/pcache.h 1b5dcc3dc8103d03e625b177023ee67764fa6b7c F src/pcache1.c 9fd22671c270b35131ef480bbc00392b8b5f8ab9 -F src/pragma.c 312d9ea0d9b98583514f6f8e92cb7e8f526ff4c6 +F src/pragma.c 1ff115f620d9496fe5018306b644ab9ef7e26a3c F src/prepare.c 931ad0d852a0df48f79adcba6ce79ca5f475625c F src/printf.c 4a9f882f1c1787a8b494a2987765acf9d97ac21f F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50 @@ -1026,7 +1026,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 97f7f7377259ecf562019f62ebed0897cfae236e -R e825c339f2d84a956eae42ef385eea53 +P 25411f83f99803e39feee368703fd20b4ade8eeb +R c79c49ee3d52fd45a5706b357c7b932d U drh -Z 0751ac95be4abd3e28a98e71458d0c00 +Z 478f8348ae468b598dcecb8fdb7894c8 diff --git a/manifest.uuid b/manifest.uuid index 57652e0971..ed34ad3e01 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -25411f83f99803e39feee368703fd20b4ade8eeb \ No newline at end of file +b5a8f3160b5dc1397312add3c5410e7e0a12b75e \ No newline at end of file diff --git a/src/pragma.c b/src/pragma.c index 9a20607039..0f92769a9f 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -1190,7 +1190,8 @@ void sqlite3Pragma( addrOk = sqlite3VdbeMakeLabel(v); if( pIdx==0 ){ int iKey = pFK->aCol[0].iFrom; - if( iKey>=0 && iKey!=pTab->iPKey ){ + assert( iKey>=0 && iKeynCol ); + if( iKey!=pTab->iPKey ){ sqlite3VdbeAddOp3(v, OP_Column, 0, iKey, regRow); sqlite3ColumnDefault(v, pTab, iKey, regRow); sqlite3VdbeAddOp2(v, OP_IsNull, regRow, addrOk); -- 2.39.5