• unknown's avatar
    BUG#32580 (mysqlbinlog cannot read binlog event generated by user variable usage): · dc8d5bc7
    unknown authored
    The client program 'mysqlbinlog' crashed when trying to print a User_var_log_event holding
    a floating-point value since the format specifier for my_b_printf() does not support
    floating-point format specifiers.
    
    This patch prints the floating-point number to an internal buffer, and then writes
    that buffer to the output instead.
    
    
    mysql-test/r/mysqlbinlog.result:
      Result file change.
    mysql-test/t/mysqlbinlog.test:
      Adding test that mysqlbinlog can write and read back User_var_log_event
      for real, decimal, integer, and string. These are the only types supported
      for user variables.
    sql/log_event.cc:
      Using my_sprintf() to print floating-point value of User_var_log_event value to a
      character buffer and then to the real output, since my_b_printf() does not
      support floating-point format. Also adding macro to give buffer size needed 
      for printing floating-point numbers in %g format.
    dc8d5bc7
mysqlbinlog.test 10.3 KB