Overview
| SHA1 Hash: | b5a8f3160b5dc1397312add3c5410e7e0a12b75e |
|---|---|
| Date: | 2012-12-20 00:32:49 |
| User: | drh |
| Comment: | Remove an unreachable branch operation from the foreign_key_check pragma. |
Tags And Properties
- branch=foreign-key-check inherited from [01c980e9bb]
- closed added by [a54566a768] on 2012-12-20 02:38:33
- sym-foreign-key-check inherited from [01c980e9bb]
Changes
Changes to src/pragma.c
1186 pIdx = 0; 1186 pIdx = 0; 1187 aiCols = 0; 1187 aiCols = 0; 1188 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, &aiCols); 1188 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, &aiCols); 1189 assert( x==0 ); 1189 assert( x==0 ); 1190 addrOk = sqlite3VdbeMakeLabel(v); 1190 addrOk = sqlite3VdbeMakeLabel(v); 1191 if( pIdx==0 ){ 1191 if( pIdx==0 ){ 1192 int iKey = pFK->aCol[0].iFrom; 1192 int iKey = pFK->aCol[0].iFrom; > 1193 assert( iKey>=0 && iKey<pTab->nCol ); 1193 if( iKey>=0 && iKey!=pTab->iPKey ){ | 1194 if( iKey!=pTab->iPKey ){ 1194 sqlite3VdbeAddOp3(v, OP_Column, 0, iKey, regRow); 1195 sqlite3VdbeAddOp3(v, OP_Column, 0, iKey, regRow); 1195 sqlite3ColumnDefault(v, pTab, iKey, regRow); 1196 sqlite3ColumnDefault(v, pTab, iKey, regRow); 1196 sqlite3VdbeAddOp2(v, OP_IsNull, regRow, addrOk); 1197 sqlite3VdbeAddOp2(v, OP_IsNull, regRow, addrOk); 1197 sqlite3VdbeAddOp2(v, OP_MustBeInt, regRow, 1198 sqlite3VdbeAddOp2(v, OP_MustBeInt, regRow, 1198 sqlite3VdbeCurrentAddr(v)+3); 1199 sqlite3VdbeCurrentAddr(v)+3); 1199 }else{ 1200 }else{ 1200 sqlite3VdbeAddOp2(v, OP_Rowid, 0, regRow); 1201 sqlite3VdbeAddOp2(v, OP_Rowid, 0, regRow);