There are two major paths through the query planner in SQLite. The `whereShortCut()` path is a very quick planner that is appropriate for simple queries (only a single table in the FROM clause), and there is a slower path that does a much more detailed analysis of the query and is used for joins and queries against virtual tables and other situations where a more detailed analysis is appropriate. The problem described by this thread is essentially the same as the problem previously described by Wang Ke in [forum thread eb8613976a](/forumpost/eb8613976a), except that in this case the problem was in whereShortCut() rather than in the full-analysis path. Both problems should be fixed as of [check-in 8b24c177061c3836](src:/timeline?c=8b24c177061c3836). The changes at [check-in e038ce8955e785af](src:/info/e038ce8955e785af) which the bisect above identified as the problem source actually have nothing to do with the problem at all. That change merely helped to expose the problem.