summaryrefslogtreecommitdiff
path: root/storage/xtradb/trx/trx0trx.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/trx/trx0trx.c')
-rw-r--r--storage/xtradb/trx/trx0trx.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/storage/xtradb/trx/trx0trx.c b/storage/xtradb/trx/trx0trx.c
index c9fccaad16b..b703a04b1b0 100644
--- a/storage/xtradb/trx/trx0trx.c
+++ b/storage/xtradb/trx/trx0trx.c
@@ -1099,7 +1099,8 @@ trx_commit_off_kernel(
trx->must_flush_log_later = TRUE;
} else if (flush_log_at_trx_commit == 0) {
/* Do nothing */
- } else if (flush_log_at_trx_commit == 1) {
+ } else if (flush_log_at_trx_commit == 1 ||
+ 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 */
@@ -1809,7 +1810,11 @@ trx_commit_complete_for_mysql(
/* Do nothing */
} else if (flush_log_at_trx_commit == 0) {
/* Do nothing */
- } else if (flush_log_at_trx_commit == 1) {
+ } else if (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 (flush_log_at_trx_commit == 1 || 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 */
@@ -2097,7 +2102,7 @@ trx_prepare_off_kernel(
if (flush_log_at_trx_commit == 0) {
/* Do nothing */
- } else if (flush_log_at_trx_commit == 1) {
+ } else if (flush_log_at_trx_commit == 1 || 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 */