The includes/database.(mysql)|(mysqli)|(pgsql) files all report sql errors in a similar fashion e.g.
if (!mysql_errno($active_db)) {
return $result;
}
else {
trigger_error(check_plain(mysql_error($active_db) ."\nquery: ". $query), E_USER_WARNING);
return FALSE;
}
But the error_handler function uses the t() function on the message
So sql errors are always double escaped, this makes them much harder to read and prevents copy-pasting the query - for running directly.
I think that check_plain should not be called in this place - removing this function call works OK for me.
Comments
Comment #1
damien tournoud commentedBumping to D6, because this issue does not exist in the new database layer of D7.
Comment #2
damien tournoud commentedTwo small patches (for D6 and D5).
Comment #3
dpearcefl commentedIs this still an issue using current Drupal 6?