diff options
author | Edward Rudd | 2006-11-07 02:31:10 +0000 |
---|---|---|
committer | Edward Rudd | 2006-11-07 02:31:10 +0000 |
commit | 22d1542ac15c4e93cabe834e2536cdba296d30d6 (patch) | |
tree | b4555c530fa331ee3d51c2977e9678ab0bab318a | |
parent | ae136219f628f697e5c31f0d51375e69e95d986f (diff) |
add logio support
-rw-r--r-- | mod_log_sql_mysql.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/mod_log_sql_mysql.c b/mod_log_sql_mysql.c index 89553d2..7631b14 100644 --- a/mod_log_sql_mysql.c +++ b/mod_log_sql_mysql.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | #ifdef HAVE_CONFIG_H | 11 | #ifdef HAVE_CONFIG_H |
12 | /* Undefine these to prevent conflicts between Apache ap_config_auto.h and | 12 | /* Undefine these to prevent conflicts between Apache ap_config_auto.h and |
13 | * my config.h. Only really needed for Apache < 2.0.48, but it can't hurt. | 13 | * my config.h. Only really needed for Apache < 2.0.48, but it can't hurt. |
14 | */ | 14 | */ |
15 | #undef PACKAGE_BUGREPORT | 15 | #undef PACKAGE_BUGREPORT |
@@ -74,7 +74,7 @@ static void log_sql_mysql_close(logsql_dbconnection *db) | |||
74 | /* Routine to escape the 'dangerous' characters that would otherwise | 74 | /* Routine to escape the 'dangerous' characters that would otherwise |
75 | * corrupt the INSERT string: ', \, and " | 75 | * corrupt the INSERT string: ', \, and " |
76 | */ | 76 | */ |
77 | static const char *log_sql_mysql_escape(const char *from_str, apr_pool_t *p, | 77 | static const char *log_sql_mysql_escape(const char *from_str, apr_pool_t *p, |
78 | logsql_dbconnection *db) | 78 | logsql_dbconnection *db) |
79 | { | 79 | { |
80 | /* Return "NULL" for empty strings */ | 80 | /* Return "NULL" for empty strings */ |
@@ -185,7 +185,7 @@ static logsql_table_ret log_sql_mysql_create(request_rec *r, logsql_dbconnection | |||
185 | 185 | ||
186 | switch (table_type) { | 186 | switch (table_type) { |
187 | case LOGSQL_TABLE_ACCESS: | 187 | case LOGSQL_TABLE_ACCESS: |
188 | create_suffix = | 188 | create_suffix = |
189 | "` (id char(19),\ | 189 | "` (id char(19),\ |
190 | agent varchar(255),\ | 190 | agent varchar(255),\ |
191 | bytes_sent int unsigned,\ | 191 | bytes_sent int unsigned,\ |
@@ -210,21 +210,23 @@ static logsql_table_ret log_sql_mysql_create(request_rec *r, logsql_dbconnection | |||
210 | ssl_maxkeysize smallint unsigned,\ | 210 | ssl_maxkeysize smallint unsigned,\ |
211 | status smallint unsigned,\ | 211 | status smallint unsigned,\ |
212 | time_stamp int unsigned,\ | 212 | time_stamp int unsigned,\ |
213 | virtual_host varchar(255))"; | 213 | virtual_host varchar(255),\ |
214 | bytes_in int unsigned,\ | ||
215 | bytes_out int unsigned)"; | ||
214 | break; | 216 | break; |
215 | case LOGSQL_TABLE_COOKIES: | 217 | case LOGSQL_TABLE_COOKIES: |
216 | case LOGSQL_TABLE_HEADERSIN: | 218 | case LOGSQL_TABLE_HEADERSIN: |
217 | case LOGSQL_TABLE_HEADERSOUT: | 219 | case LOGSQL_TABLE_HEADERSOUT: |
218 | case LOGSQL_TABLE_NOTES: | 220 | case LOGSQL_TABLE_NOTES: |
219 | create_suffix = | 221 | create_suffix = |
220 | "` (id char(19),\ | 222 | "` (id char(19),\ |
221 | item varchar(80),\ | 223 | item varchar(80),\ |
222 | val varchar(80))"; | 224 | val varchar(80))"; |
223 | break; | 225 | break; |
224 | } | 226 | } |
225 | 227 | ||
226 | if (tabletype) { | 228 | if (tabletype) { |
227 | type_suffix = apr_pstrcat(r->pool, " TYPE=", | 229 | type_suffix = apr_pstrcat(r->pool, " TYPE=", |
228 | tabletype, NULL); | 230 | tabletype, NULL); |
229 | } | 231 | } |
230 | /* Find memory long enough to hold the whole CREATE string + \0 */ | 232 | /* Find memory long enough to hold the whole CREATE string + \0 */ |