Skip to content

Commit f489865

Browse files
dr-mmidenok
authored andcommitted
SQL: Clarify a FIXME comment on TR_table in ha_commit_trans()
1 parent 92d6bd7 commit f489865

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sql/handler.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,6 +1414,7 @@ int ha_commit_trans(THD *thd, bool all)
14141414
goto err;
14151415
}
14161416

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

14481450
if (trans->no_2pc || (rw_ha_count <= 1))
14491451
{

0 commit comments

Comments
 (0)