From 13e1ecc20c883f71b54bf1fe09488b028e51171e Mon Sep 17 00:00:00 2001 From: Christopher Powell Date: Mon, 8 Apr 2002 07:06:20 +0000 Subject: Fixed buglet with preserve file (needed semicolon) and updated README. --- README | 11 ++++++++++- mod_log_sql.c | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README b/README index d25bc06..977080f 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -$Id: README,v 1.3 2001/12/07 03:52:56 helios Exp $ +$Id: README,v 1.4 2002/04/08 07:06:20 helios Exp $ Homepage @@ -183,6 +183,15 @@ Notes makes perfect sense anyway. +* If your database goes offline and Apache cannot log to it, mod_log_mysql + intelligently preserves any queries to a local text file. (By + default the file is /tmp/mysql-preserve.) This will allow you to not + miss those entries; when you bring your database back online it is a + simple matter to import the contents of this preserve file. To do + this simply copy the file to your MySQL server and run an import + as follows: + # mysql -uadminuser -p mydbname < mysql-preserve + Author / Maintainer ------------------- diff --git a/mod_log_sql.c b/mod_log_sql.c index 62e9784..16deada 100644 --- a/mod_log_sql.c +++ b/mod_log_sql.c @@ -1,4 +1,4 @@ -/* $Id: mod_log_sql.c,v 1.7 2002/04/08 06:35:04 helios Exp $ */ +/* $Id: mod_log_sql.c,v 1.8 2002/04/08 07:06:20 helios Exp $ */ /* DEFINES */ @@ -514,7 +514,7 @@ void preserve_entry(request_rec *r, const char *query) if (fp == NULL) ap_log_error(APLOG_MARK,ERRLEVEL,r->server,"MySQL: attempted append of local offline file but failed."); else - fprintf(fp,"%s\n", query); + fprintf(fp,"%s;\n", query); fclose(fp); } -- cgit