mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user