• Alexey Yurchenko's avatar
    Use only MySQL code for TOI error vote · 731a5aba
    Alexey Yurchenko authored
    For TOI events specifically we have a situation where in case of the
    same error different nodes may generate different messages. This may
    be for two reasons:
     - different locale setting between the current client session and
       server default (we can reasonably require server locales to be
       identical on all nodes, but user can change message locale for the
       session)
     - non-deterministic course of STATEMENT execution e.g. for ALTER TABLE
    
    On the other hand we may reasonably expect TOI event failures since
    they are executed after replication, so we must ensure that voting is
    consistent. For that purpose error codes should be sufficiently unique
    and deterministic for TOI event failures as DDLs normally deal with
    a single object, so we can merely use MySQL error codes to vote on.
    
    Notice that this problem does not happen with regular transactional
    writesets, since the originator node will always vote success and
    replica nodes are assumed to have the same global locale setting.
    As such different error messages indicate different errors even if
    the error code is the same (e.g. ER_DUP_KEY can happen on different
    rows tables).
    
    Use only MySQL error code (without the error message) for error voting
    in case of TOI event failure.
    Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
    731a5aba
wsrep_high_priority_service.cc 25.5 KB