| 12448 | */ |
| 12449 | |
| 12450 | bool mysql_trans_commit_alter_copy_data(THD *thd) |
| 12451 | { |
| 12452 | bool error= FALSE; |
| 12453 | uint save_unsafe_rollback_flags; |
| 12454 | DBUG_ENTER("mysql_trans_commit_alter_copy_data"); |
| 12455 | |
| 12456 | /* Save flags as trans_commit_implicit are deleting them */ |
| 12457 | save_unsafe_rollback_flags= thd->transaction->stmt.m_unsafe_rollback_flags; |
| 12458 | |
| 12459 | DEBUG_SYNC(thd, "alter_table_copy_trans_commit"); |
| 12460 | |
| 12461 | if (ha_enable_transaction(thd, TRUE)) |
| 12462 | DBUG_RETURN(TRUE); |
| 12463 | |
| 12464 | /* |
| 12465 | Ensure that the new table is saved properly to disk before installing |
| 12466 | the new .frm. |
| 12467 | And that InnoDB's internal latches are released, to avoid deadlock |
| 12468 | when waiting on other instances of the table before rename (Bug#54747). |
| 12469 | */ |
| 12470 | if (trans_commit_stmt(thd)) |
| 12471 | error= TRUE; |
| 12472 | if (trans_commit_implicit(thd)) |
| 12473 | error= TRUE; |
| 12474 | |
| 12475 | thd->transaction->stmt.m_unsafe_rollback_flags= save_unsafe_rollback_flags; |
| 12476 | DBUG_RETURN(error); |
| 12477 | } |
| 12478 | |
| 12479 | #ifdef HAVE_REPLICATION |
| 12480 | /* |
no test coverage detected