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

Remove an unreachable branch operation from the foreign_key_check pragma.

FossilOrigin-Name: b5a8f3160b5dc1397312add3c5410e7e0a12b75e
This commit is contained in:
drh
2012-12-20 00:32:49 +00:00
parent 7d22a4d710
commit 83e0dba311
3 changed files with 9 additions and 8 deletions

View File

@@ -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 && iKey<pTab->nCol );
if( iKey!=pTab->iPKey ){
sqlite3VdbeAddOp3(v, OP_Column, 0, iKey, regRow);
sqlite3ColumnDefault(v, pTab, iKey, regRow);
sqlite3VdbeAddOp2(v, OP_IsNull, regRow, addrOk);