For DELETE operations, make sure that seeks on the main table are not

deferred, since if they are and none of the indexes reference columns of
the table, the seek might never occur until the OP_Delete opcode, which is
too late.  Fix for ticket [16c9801ceba49].

FossilOrigin-Name: 93a2bace5704f7ecad56541a6b3e06a88f7f393f
This commit is contained in:
drh
2016-05-06 16:49:54 +00:00
6 changed files with 40 additions and 15 deletions
+1
View File
@@ -2543,6 +2543,7 @@ struct SrcList {
#define WHERE_REOPEN_IDX 0x1000 /* Try to use OP_ReopenIdx */
#define WHERE_ONEPASS_MULTIROW 0x2000 /* ONEPASS is ok with multiple rows */
#define WHERE_USE_LIMIT 0x4000 /* There is a constant LIMIT clause */
#define WHERE_SEEK_TABLE 0x8000 /* Do not defer seeks on main table */
/* Allowed return values from sqlite3WhereIsDistinct()
*/