List:Commits« Previous MessageNext Message »
From:Sven Sandberg Date:November 23 2007 12:42pm
Subject:Re: bk commit into 5.1 tree (mats:1.2619) BUG#32580
View as plain text  
Hi Mats,

The patch is good to push.
One small typo in a comment, see below.

/Sven

Mats Kindahl wrote:
[...]
> diff -Nrup a/sql/log_event.cc b/sql/log_event.cc
> --- a/sql/log_event.cc	2007-11-14 11:01:43 +01:00
> +++ b/sql/log_event.cc	2007-11-23 12:26:11 +01:00
> @@ -36,6 +36,16 @@
>  
>  #define FLAGSTR(V,F) ((V)&(F)?#F" ":"")
>  
> +
> +/*
> +  Size of buffer for printing a double in format %.<MANT>g

s/MANT/PREC/

> +
> +  optional '-' + optional zero + '.'  + PREC digits + 'e' + sign +
> +  exponent digits + '\0'
> +*/
> +#define FMT_G_BUFSIZE(PREC) (3 + (PREC) + 5 + 1)
> +
> +
>  #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) &&
> !defined(DBUG_OFF) && !defined(_lint)
>  static const char *HA_ERR(int i)
>  {
> @@ -4404,8 +4414,10 @@ void User_var_log_event::print(FILE* fil
>      switch (type) {
>      case REAL_RESULT:
>        double real_val;
> +      char real_buf[FMT_G_BUFSIZE(14)];
>        float8get(real_val, val);
> -      my_b_printf(&cache, ":=%.14g%s\n", real_val,
> print_event_info->delimiter);
> +      my_sprintf(real_buf, (real_buf, "%.14g", real_val));
> +      my_b_printf(&cache, ":=%s%s\n", real_buf,
> print_event_info->delimiter);
>        break;
>      case INT_RESULT:
>        char int_buf[22];
> 
Thread
bk commit into 5.1 tree (mats:1.2619) BUG#32580Mats Kindahl23 Nov
  • Re: bk commit into 5.1 tree (mats:1.2619) BUG#32580Sven Sandberg23 Nov