summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod_log_sql.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/mod_log_sql.c b/mod_log_sql.c
index fc46853..25a5013 100644
--- a/ Dash Shendy
14 years
0.5.8commit c223258e7c...Gravatar Nikos Mavrogiannopoulos 15 years
0.5.7commit 47e0ccc66d...Gravatar Nikos Mavrogiannopoulos 15 years
0.5.6commit e272d2c01c...Gravatar Nokis Mavrogiannopoulos 16 years
0.5.4commit f30552add8...Gravatar Nokis Mavrogiannopoulos 17 years
0.5.3commit 5353b12db4...Gravatar Nokis Mavrogiannopoulos 17 years
0.5.2commit b31b434598...Gravatar Nokis Mavrogiannopoulos 17 years
0.5.1commit 4e383e3e1a...Gravatar Nokis Mavrogiannopoulos 18 years
0.4.3commit 2cb49bd513...Gravatar Nokis Mavrogiannopoulos 18 years
0.4.1commit 586e3bef5d...Gravatar Nokis Mavrogiannopoulos 18 years
0.4.2commit 9a2ed619f2...Gravatar Nokis Mavrogiannopoulos 18 years
0.4.2.1commit 9a2ed619f2...Gravatar Nokis Mavrogiannopoulos 18 years
0.5.0-alphacommit 75636faa67...Gravatar Nokis Mavrogiannopoulos 18 years
0.4.0commit 2b9b5d44a1...Gravatar Nokis Mavrogiannopoulos 18 years
0.2.0commit 836417fcea...Gravatar Paul Querna 21 years
0.1.1commit f2d7e3c65c...Gravatar Paul Querna 21 years
0.1.0commit 2f759e64ee...Gravatar Paul Querna 21 years
*parms, void *dummy, int flag) 611{ 611{ 612 log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); 612 create_tables = ( flag ? 1 : 0); 613 614 cls->create_tables = ( flag ? 1 : 0); 615 return NULL; 613 return NULL; 616} 614} 617 615@@ -791,7 +789,6 @@ void *log_mysql_make_state(pool *p, server_rec *s) 791 cls->remhost_ignore_list = make_array(p, 1, sizeof(char *)); 789 cls->remhost_ignore_list = make_array(p, 1, sizeof(char *)); 792 790 793 cls->table_made = 0; 791 cls->table_made = 0; 794 cls->create_tables = 0; 795 792 796 cls->preserve_file = "/tmp/mysql-preserve"; 793 cls->preserve_file = "/tmp/mysql-preserve"; 797 794 @@ -875,7 +872,7 @@ int log_mysql_transaction(request_rec *orig) 875 * turn on create_tables, which is implied by massvirtual. 872 * turn on create_tables, which is implied by massvirtual. 876 */ 873 */ 877 cls->transfer_table_name = tablename; 874 cls->transfer_table_name = tablename; 878 cls->create_tables = 1; 875 create_tables = 1; 879 } 876 } 880 877 881 /* Do we have enough info to log? */ 878 /* Do we have enough info to log? */@@ -967,7 +964,7 @@ int log_mysql_transaction(request_rec *orig) 967 * to avoid extra processing with each request. If it's not flagged as made, 964 * to avoid extra processing with each request. If it's not flagged as made, 968 * set up the CREATE string. 965 * set up the CREATE string. 969 */ 966 */ 970 if ((cls->table_made != 1) && (cls->create_tables != 0)) { 967 if ((cls->table_made != 1) && (create_tables != 0)) { 971 char *createprefix = "create table if not exists "; 968 char *createprefix = "create table if not exists "; 972 char *createsuffix = 969 char *createsuffix = 973 " (agent varchar(255),\ 970 " (agent varchar(255),\@@ -1029,7 +1026,7 @@ int log_mysql_transaction(request_rec *orig) 1029 } 1026 } 1030 1027 1031 /* Make the table if we're supposed to */ 1028 /* Make the table if we're supposed to */ 1032 if ((cls->table_made != 1) && (cls->create_tables != 0)) { 1029 if ((cls->table_made != 1) && (create_tables != 0)) { 1033 mysql_query(mysql_log,createstring); 1030 mysql_query(mysql_log,createstring); 1034 cls->table_made = 1; 1031 cls->table_made = 1; 1035 } 1032 }