diff options
Diffstat (limited to 'storage/innobase/trx/trx0trx.cc')
-rw-r--r-- | storage/innobase/trx/trx0trx.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index c3a53a18d90..80ebe0df2b3 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -1129,7 +1129,8 @@ trx_commit( trx->must_flush_log_later = TRUE; } else if (srv_flush_log_at_trx_commit == 0) { /* Do nothing */ - } else if (srv_flush_log_at_trx_commit == 1) { + } else if (srv_flush_log_at_trx_commit == 1 || + srv_flush_log_at_trx_commit == 3) { if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { /* Write the log but do not flush it to disk */ @@ -1424,7 +1425,11 @@ trx_commit_complete_for_mysql( /* Do nothing */ } else if (srv_flush_log_at_trx_commit == 0) { /* Do nothing */ - } else if (srv_flush_log_at_trx_commit == 1) { + } else if (srv_flush_log_at_trx_commit == 1 && trx->active_commit_ordered) { + /* Do nothing - we already flushed the prepare and binlog write + to disk, so transaction is durable (will be recovered from + binlog if necessary) */ + } else if (srv_flush_log_at_trx_commit == 1 || srv_flush_log_at_trx_commit == 3) { if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { /* Write the log but do not flush it to disk */ @@ -1823,7 +1828,7 @@ trx_prepare( if (srv_flush_log_at_trx_commit == 0) { /* Do nothing */ - } else if (srv_flush_log_at_trx_commit == 1) { + } else if (srv_flush_log_at_trx_commit == 1 || srv_flush_log_at_trx_commit == 3) { if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { /* Write the log but do not flush it to disk */ |