I recently encountered this issue.
In a site I run I started to see some errors about wp-db.php #1190, that the result is not of type mySQL resource.
On another 2 servers that has copies of this site (dev/qa/prod), these errors didn't show.
The one and only difference is the php version. One with 5.2.6 (and working well), the other with php 5.3.3 (where the error is shown).
I tried to debug it and found it is probably comes from the function get_page_by_path().
Is there any idea what this issue can be, and could it be something with php 5.3.3?
(Notice - these sites has wp3.1.3 installed , and not the latest 3.2.1)