• Jagdeep Sidhu's avatar
    Fix switch case statement in trx_flush_log_if_needed_low() · 5f8651ac
    Jagdeep Sidhu authored
    In commit 2e814d47 on MariaDB 10.2
    the switch case statement in trx_flush_log_if_needed_low() regressed.
    
    Since 10.2 this code was refactored to have switches in descending
    order, so value of 3 for innodb_flush_log_at_trx_commit is behaving
    the same as value of 2, that is no FSYNC is being enforced during
    COMMIT phase. The switch should however not be empty and cases 2 and 3
    should not have the identical contents.
    
    As per documentation, setting innodb_flush_log_at_trx_commit to 3
    should do FSYNC to disk if innodb_flush_log_at_trx_commit is set to 3.
    This fixes the regression so that the switch statement again does
    what users expect the setting should do.
    
    All new code of the whole pull request, including one or several files
    that are either new files or modified ones, are contributed under the
    BSD-new license. I am contributing on behalf of my employer Amazon Web
    Services, Inc.
    5f8651ac
trx0trx.cc 81.1 KB