• Brandon Nesterenko's avatar
    MDEV-26919: binlog.binlog_truncate_active_log fails in bb with valgrind,... · be20b3b0
    Brandon Nesterenko authored
    MDEV-26919: binlog.binlog_truncate_active_log fails in bb with valgrind, Conditional jump or move depends on uninitialised value
    
    Problem:
    ========
    When writing an XA based event to the binary log, an assert was
    always referencing thd->lex->xa_opt. This variable, however, is
    only set when using XA START, XA END, and XA COMMIT. When an
    XA PREPARE statement is being processed, it is not guaranteed that
    the xa_opt variable will be set (e.g. if existing within a stored
    procedure). This caused valgrind to complain about accessing an
    uninitialized variable.
    
    Solution:
    ========
    Before referencing xa_opt, ensure the context is valid such that
    it is set.
    
    Reviewed By:
    ============
    Andrei Elkin <andrei.elkin@mariadb.com>
    be20b3b0
log_event_server.cc 272 KB