I have made a revision in the DBStatement_MySQL.php file to fix the error messaging for Ad Hoc SQL support. To fix this I added another branch to the if-else statement in the constructor. You can see this new branch at line 130. This branch checks the values of mysqli_error and mysqli_errno to see if they are set. If they are, that means the query failed. If not, the query was successful.
Thanks this looks good, can you commit it to the /trunk/TEr4-dev