Commit 6d0d2c7e authored by unknown's avatar unknown

trx0trx.c:

  If MySQL wrote to its binlog, but for some reason trx->update_undo and trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB could assert in the log flush of trx_commit_complete_for_mysql() (Bug #9277)


innobase/trx/trx0trx.c:
  If MySQL wrote to its binlog, but for some reason trx->update_undo and trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB could assert in the log flush of trx_commit_complete_for_mysql() (Bug #9277)
parent 421907e9
...@@ -96,6 +96,7 @@ trx_create( ...@@ -96,6 +96,7 @@ trx_create(
trx->check_unique_secondary = TRUE; trx->check_unique_secondary = TRUE;
trx->flush_log_later = FALSE; trx->flush_log_later = FALSE;
trx->must_flush_log_later = FALSE;
trx->dict_operation = FALSE; trx->dict_operation = FALSE;
...@@ -654,6 +655,8 @@ trx_commit_off_kernel( ...@@ -654,6 +655,8 @@ trx_commit_off_kernel(
ut_ad(mutex_own(&kernel_mutex)); ut_ad(mutex_own(&kernel_mutex));
#endif /* UNIV_SYNC_DEBUG */ #endif /* UNIV_SYNC_DEBUG */
trx->must_flush_log_later = FALSE;
rseg = trx->rseg; rseg = trx->rseg;
if (trx->insert_undo != NULL || trx->update_undo != NULL) { if (trx->insert_undo != NULL || trx->update_undo != NULL) {
...@@ -821,6 +824,7 @@ trx_commit_off_kernel( ...@@ -821,6 +824,7 @@ trx_commit_off_kernel(
if (trx->flush_log_later) { if (trx->flush_log_later) {
/* Do nothing yet */ /* Do nothing yet */
trx->must_flush_log_later = TRUE;
} else if (srv_flush_log_at_trx_commit == 0) { } else if (srv_flush_log_at_trx_commit == 0) {
/* Do nothing */ /* Do nothing */
} else if (srv_flush_log_at_trx_commit == 1) { } else if (srv_flush_log_at_trx_commit == 1) {
...@@ -1539,7 +1543,9 @@ trx_commit_complete_for_mysql( ...@@ -1539,7 +1543,9 @@ trx_commit_complete_for_mysql(
trx->op_info = "flushing log"; trx->op_info = "flushing log";
if (srv_flush_log_at_trx_commit == 0) { if (!trx->must_flush_log_later) {
/* Do nothing */
} else if (srv_flush_log_at_trx_commit == 0) {
/* Do nothing */ /* Do nothing */
} else if (srv_flush_log_at_trx_commit == 1) { } else if (srv_flush_log_at_trx_commit == 1) {
if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) { if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
...@@ -1560,6 +1566,8 @@ trx_commit_complete_for_mysql( ...@@ -1560,6 +1566,8 @@ trx_commit_complete_for_mysql(
} else { } else {
ut_error; ut_error;
} }
trx->must_flush_log_later = FALSE;
trx->op_info = ""; trx->op_info = "";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment