[Mod_log_sql] code review

Paul Bridger paul at wilorc.co.uk
Mon Feb 18 04:37:12 EST 2008


Hi Robert

Do any of the recent changes improve mod_log_sql for use with apache 2.x
worker MPM (threaded apache)?

Thanks.

Regards, Paul Bridger

Robert Schulze wrote:
> Hi
>
> last weekend I spent a lot of time with reviewing the code in 
> mod_log_sql. What I often noticed, were wrong string-assignments.
>
> Except in declaration, one can't assign a string with the help of '='.
> The same problem is in some of the extraction-functions, which 'return 
> "-"', without allocating space for the string.
>
> I fixed all those non-allocated string occurances in mod_log_sql.c, 
> functions*.h and mod_log_sql_mysql.c
>
> I've also rewritten that big makro DO_MERGE_ARRAY in mod_log_sql.c to a 
> function and cleaned up the code a little bit, especially in 
> mod_log_sql_transaction.
>
> The patch against 1.101 is available here (which also includes the 
> one-liner to set the apr_pool_cleanup_null):
>
> http://www.rob-schulze.de/publikationen/frickelworx/mod_log_sql-patch/diff
>
>
> Don't be afraid, most of it is 'deleting a tab', due to removing 
> else-statements, in case of a return() in the previous if-statement ;-)
>
>
> with kind regards,
>
> Robert Schulze
>
>   





More information about the Mod_log_sql mailing list