I ran into problems getting a "Failed to update log table." error periodically. Turns out it occurred when it tried to log a post attempt by someone who had a ' in their name (legal and valid in PHPbb2). The ' isn't properly escaped.
In /var/www/forums/includes/functions_anti_spam_acp.php, I added the following line:
$username = str_replace("'", "\'", $username);
In:
function_log_spam($triggers, $username, $user_id, $email, $location, $notice = '') // Logs data to spam table
above the assignment for $sql, so that the ' in $username is properly escaped for the query
I haven't done extensive testing or looked at the logs, but so far it seems to have taken care of it without side effects.
(If there's a better place to put this or a better way to fix it, let me know)

