cakephp/cakephp — pull request #5146 by markstory (2014-11-13 02:02:19+00:00)
Title: Fix SQLite result sets failing with nested queries or unions

I think this fixes the issues described in #3972. By 'parsing' the entire query string and iterating it we can find the first `FROM` clause more deterministically.