Vlad,
see my coding style comments inline.
On Di, 2008-01-08 at 12:00 +0100, Vladislav Vaintroub wrote:
> Below is the list of changes that have just been committed into a local
> 6.0 repository of . When does a push these changes will
> be propagated to the main repository and, within 24 hours after the
> push, to the public repository.
> For information on how to access the public repository
> see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
>
> ChangeSet@stripped, 2008-01-08 11:59:58+01:00, vvaintroub@vaio. +2 -0
> BUG#33531 - falcon_debug_mask does not autoflush.
> Introduced new variable falcon_debug_autoflush to force the fflush()
> on the trace file after each debug message.
> Autoflush is on by default.
>
> storage/falcon/StorageParameters.h@stripped, 2008-01-08 11:59:39+01:00,
> vvaintroub@vaio. +1 -0
> New parameter debug_autoflush to force flush() after each write to
> the trace file
>
> storage/falcon/ha_falcon.cpp@stripped, 2008-01-08 11:59:41+01:00, vvaintroub@vaio. +6
> -0
> New parameter debug_autoflush to force flush() after each write to
> the trace file
>
> diff -Nrup a/storage/falcon/StorageParameters.h b/storage/falcon/StorageParameters.h
> --- a/storage/falcon/StorageParameters.h 2007-12-02 21:17:13 +01:00
> +++ b/storage/falcon/StorageParameters.h 2008-01-08 11:59:39 +01:00
> @@ -13,6 +13,7 @@
>
>
> PARAMETER_BOOL(consistent_read, "Enable Consistent Read Mode for Repeatable Reads",
> 1, 0, StorageInterface::updateConsistentRead)
> +PARAMETER_BOOL(debug_autoflush, "Flush debug logfile after each message.", 1, 0,
> NULL)
> PARAMETER_UINT(debug_mask, "Falcon message type mask for logged messages.", 0, 0,
> INT_MAX, 0, StorageInterface::updateDebugMask)
> PARAMETER_BOOL(debug_server, "Enable Falcon debug code.", 0, 0x0200, NULL)
> PARAMETER_UINT(debug_trace, "Falcon debug trace trigger.", 0, 0, INT_MAX, 0, NULL)
> diff -Nrup a/storage/falcon/ha_falcon.cpp b/storage/falcon/ha_falcon.cpp
> --- a/storage/falcon/ha_falcon.cpp 2007-12-19 05:31:53 +01:00
> +++ b/storage/falcon/ha_falcon.cpp 2008-01-08 11:59:41 +01:00
> @@ -1970,9 +1970,15 @@ void StorageInterface::logger(int mask,
> if (mask & falcon_debug_mask)
> {
> printf ("%s", text);
> + if(falcon_debug_autoflush)
> + fflush(stdout);
in Falcon we use one space between conditionals and the opening
parenthesis, and no space between a function/method and the opening
parenthesis. So:
if (
while (
for (
and
printf(
fprintf(
...
Best regards,
Hakan
--
Hakan Küçükyılmaz, Senior Software Engineer
MySQL AB, http://www.mysql.com/
Office: +49 160 98953296
Hauptsitz: MySQL GmbH, Dachauer Str. 37, D-80335 München
Geschäftsführer: Kaj Arnö - HRB München 162140