From fdee18399169716032a052effedf886480590efc Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Mon, 16 Jul 2007 12:45:04 +0000 Subject: Add better error logging in mod_log_sql_mysql.c --- mod_log_sql_mysql.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod_log_sql_mysql.c b/mod_log_sql_mysql.c index 7631b14..8202672 100644 --- a/mod_log_sql_mysql.c +++ b/mod_log_sql_mysql.c @@ -147,10 +147,10 @@ static logsql_query_ret log_sql_mysql_query(request_rec *r,logsql_dbconnection * SIGNAL_RELEASE return LOGSQL_QUERY_SUCCESS; } - log_error(APLOG_MARK, APLOG_ERR, 0, r->server, - "mysql_query returned (%d)", retval); - /* Check to see if the error is "nonexistent table" */ real_error = mysql_errno(dblink); + log_error(APLOG_MARK, APLOG_ERR, 0, r->server, + "mysql_query returned (%d) \"%s\"", real_error, MYSQL_ERROR(dblink)); + /* Check to see if the error is "nonexistent table" */ if (real_error == ER_NO_SUCH_TABLE) { log_error(APLOG_MARK,APLOG_ERR,0, r->server,"table does not exist, preserving query"); -- cgit