Description
The logic for adhoc vs prepared queries is inverted, so if $query->adhoc is set to true (or left as default), then the query is prepared, and if $query->adhoc is set to false then the query is not prepared. This is the opposite to what is expected to happen.
Patch incoming.