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

Fix a problem in the code generator for joins on virtual tables where the

outer loop of the join uses the IN operator.

FossilOrigin-Name: 6c56b3a04778bc62ca50307ad838dd301cd91ac2
This commit is contained in:
drh
2016-04-09 18:04:28 +00:00
parent bfc7a8bb01
commit ba26faa33f
4 changed files with 122 additions and 9 deletions

View File

@@ -941,7 +941,13 @@ Bitmask sqlite3WhereCodeOneLoopStart(
}
}
}
sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2);
/* These registers need to be preserved in case there is an IN operator
** loop. So we could deallocate the registers here (and potentially
** reuse them later) if (pLoop->wsFlags & WHERE_IN_ABLE)==0. But it seems
** simpler and safer to simply not reuse the registers.
**
** sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2);
*/
sqlite3ExprCachePop(pParse);
}else
#endif /* SQLITE_OMIT_VIRTUALTABLE */