Skip to content

Commit

Permalink
SQL: Clarify a FIXME comment on TR_table in ha_commit_trans()
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m authored and midenok committed Dec 4, 2017
1 parent 92d6bd7 commit f489865
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sql/handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,7 @@ int ha_commit_trans(THD *thd, bool all)
goto err;
}

#if 1 // FIXME: This should be done in ha_prepare().
if (rw_trans)
{
ulonglong trx_start_id= 0, trx_end_id= 0;
Expand All @@ -1438,12 +1439,13 @@ int ha_commit_trans(THD *thd, bool all)
TR_table trt(thd, true);
if (trt.update(trx_start_id, trx_end_id))
goto err;
#if 1 // FIXME: fix this properly, and remove TR_table::was_updated()
if (all) // avoid a crash in versioning.rpl_stmt
// Here, the call will not commit inside InnoDB. It is only working
// around closing thd->transaction.stmt open by TR_table::open().
if (all)
commit_one_phase_2(thd, false, &thd->transaction.stmt, false);
#endif
}
}
#endif

if (trans->no_2pc || (rw_ha_count <= 1))
{
Expand Down

0 comments on commit f489865

Please sign in to comment.