• Alfranio Correia's avatar
    BUG#53437 @@session.sql_bin_log support in substatements is incorrect · 9fbf4b72
    Alfranio Correia authored
          
    The thd->variables.option_bits & OPTION_BIN_LOG is currently abused: 
    it's both a system variable and an implementation switch. The current
    approach to this option bit breaks the session variable encapsulation. 
          
    Besides it is allowed to change @@session.sql_bin_log within a
    transaction what may lead to not correctly logging a transaction.
          
    To fix the problems,  we created a thd->variables variable to represent
    the "sql_log_bin" and prohibited its update inside a transaction or
    sub-statement.
    9fbf4b72
binlog_switch_inside_trans.test 7.77 KB