• unknown's avatar
    BUG#30274 (Debug server crashes because mutex isn't initialized): · 3f8a904f
    unknown authored
    Completion patch, since it is possible that Log_event::write_header()
    is called with no current thread.
    
    When starting the server, there is no thread available, but
    MYSQL_BIN_LOG::open() is called to initialize the binary log. The
    function writes a format description log event to the binary log,
    which means that Log_event::write_header() can be called with no
    current thread object available.
    
    
    sql/log_event.cc:
      Since Log_event::write_header() can be called from inside
      init_server_components(), it is possible that thd is NULL. In this
      case, we set the time of the event to the current time instead
      of the start time of the query.
    3f8a904f
log_event.cc 259 KB