• Sven Sandberg's avatar
    BUG#41961: Some log_event types do not skip post-header when reading · 5c92f27f
    Sven Sandberg authored
    Problem: when the server reads a log_event from file, it should read
    the post-header lengths from the format_description_log_event. Some
    event types which currently have post-header length 0 did not do this,
    and instead had a hard-coded zero length for the post-header. That
    means the current server version will not be able to read future
    versions of these events.
    Fix: make the reader functions read the post-header.
    
    
    sql/log_event.cc:
       - Made Format_description_log_event constructor initialize all
         post-header lengths explicitly, to make it easier to find them
         in the source code.
       - After this, it is no longer necessary to pass the MY_ZEROFILL
         flag to my_malloc. I removed the flag and added a sanity-check
         that will be executed only in debug-mode.
       - Made INTVAR, RAND, USER_VAR, and XID events skip post_header_len
         when reading from file.
    sql/log_event.h:
      Added explicit defines for the lengths of all event types.
    5c92f27f
log_event.h 116 KB