• Luis Soares's avatar
    BUG#46166: MYSQL_BIN_LOG::new_file_impl is not propagating error · aaefb52d
    Luis Soares authored
               when generating new name.
          
    If find_uniq_filename returns an error, then this error is not
    being propagated upwards, and execution does not report error to
    the user (although a entry in the error log is generated).
                      
    Additionally, some more errors were ignored in new_file_impl:
    - when writing the rotate event
    - when reopening the index and binary log file
                      
    This patch addresses this by propagating the error up in the
    execution stack. Furthermore, when rotation of the binary log
    fails, an incident event is written, because there may be a
    chance that some changes for a given statement, were not properly
    logged. For example, in SBR, LOAD DATA INFILE statement requires
    more than one event to be logged, should rotation fail while
    logging part of the LOAD DATA events, then the logged data would
    become inconsistent with the data in the storage engine.
    aaefb52d
mysqld.cc 324 KB