aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-08-03 15:58:07 +0000
committerdrh <drh@noemail.net>2018-08-03 15:58:07 +0000
commite4fe6d4e628a23863f259fc1500550d315f01fa5 (patch)
tree7b9841b0bc4e38f39972131dc654d3e8ee52401c /src/wherecode.c
parent5eae974c488ca623fa9d9b72e7a999eb7bd0e113 (diff)
downloadsqlite-e4fe6d4e628a23863f259fc1500550d315f01fa5.tar.gz
sqlite-e4fe6d4e628a23863f259fc1500550d315f01fa5.zip
Fix the OP_SeekRowid opcode so that it has no type-change side-effects on the
key register in P3. This fixes an obcure problem that arises when doing equi-joins between a table with a TEXT column against another table with an INTEGER PRIMARY KEY. The original problem was discovered when OSSFuzz created such a query and hit an assert() in OP_VerifyTabCol that was specifically designed to catch these kinds of errors at run-time. FossilOrigin-Name: fa94b49e02eb6b8fc4acc220ecc2fabef546c65845696758b25965c26b251ea9
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 1f24c578b..9913e70f0 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -1353,9 +1353,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
addrNxt = pLevel->addrNxt;
sqlite3VdbeAddOp3(v, OP_SeekRowid, iCur, addrNxt, iRowidReg);
VdbeCoverage(v);
- sqlite3ExprCacheAffinityChange(pParse, iRowidReg, 1);
- sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
- VdbeComment((v, "pk"));
pLevel->op = OP_Noop;
}else if( (pLoop->wsFlags & WHERE_IPK)!=0
&& (pLoop->wsFlags & WHERE_COLUMN_RANGE)!=0