summaryrefslogtreecommitdiff
path: root/storage/innobase/trx/trx0trx.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/trx/trx0trx.cc')
-rw-r--r--storage/innobase/trx/trx0trx.cc20
1 files changed, 3 insertions, 17 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index 6655be72ba1..55bb2605d7e 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -1845,9 +1845,7 @@ trx_commit_in_memory(
} else if (trx->flush_log_later) {
/* Do nothing yet */
trx->must_flush_log_later = true;
- } else if (srv_flush_log_at_trx_commit == 0
- || thd_requested_durability(trx->mysql_thd)
- == HA_IGNORE_DURABILITY) {
+ } else if (srv_flush_log_at_trx_commit == 0) {
/* Do nothing */
} else {
trx_flush_log_if_needed(lsn, trx);
@@ -2261,8 +2259,7 @@ trx_commit_complete_for_mysql(
{
if (trx->id != 0
|| !trx->must_flush_log_later
- || thd_requested_durability(trx->mysql_thd)
- == HA_IGNORE_DURABILITY) {
+ || (srv_flush_log_at_trx_commit == 1 && trx->active_commit_ordered)) {
return;
}
@@ -2750,18 +2747,7 @@ trx_prepare(
trx_sys_mutex_exit();
/*--------------------------------------*/
- switch (thd_requested_durability(trx->mysql_thd)) {
- case HA_IGNORE_DURABILITY:
- /* We set the HA_IGNORE_DURABILITY during prepare phase of
- binlog group commit to not flush redo log for every transaction
- here. So that we can flush prepared records of transactions to
- redo log in a group right before writing them to binary log
- during flush stage of binlog group commit. */
- break;
- case HA_REGULAR_DURABILITY:
- if (lsn == 0) {
- break;
- }
+ if (lsn) {
/* Depending on the my.cnf options, we may now write the log
buffer to the log files, making the prepared state of the
transaction durable if the OS does not crash. We may also