mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV#7501 : alter table exchange partition is not replicated in galera cluster
Added logic to replicate ALTER TABLE EXCHANGE PARTITION to other nodes in the cluster.
This commit is contained in:
@ -530,6 +530,21 @@ bool Sql_cmd_alter_table_exchange_partition::
|
||||
&alter_prelocking_strategy))
|
||||
DBUG_RETURN(true);
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
/* Forward declaration */
|
||||
TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl);
|
||||
|
||||
if ((!thd->is_current_stmt_binlog_format_row() ||
|
||||
/* TODO: Do we really need to check for temp tables in this case? */
|
||||
!find_temporary_table(thd, table_list)) &&
|
||||
wsrep_to_isolation_begin(thd, table_list->db, table_list->table_name,
|
||||
NULL))
|
||||
{
|
||||
WSREP_WARN("ALTER TABLE EXCHANGE PARTITION isolation failure");
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
part_table= table_list->table;
|
||||
swap_table= swap_table_list->table;
|
||||
|
||||
@ -764,6 +779,7 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd)
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
/* Forward declaration */
|
||||
TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl);
|
||||
|
||||
if ((!thd->is_current_stmt_binlog_format_row() ||
|
||||
@ -772,7 +788,7 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd)
|
||||
thd, first_table->db, first_table->table_name, NULL)
|
||||
)
|
||||
{
|
||||
WSREP_WARN("ALTER TABLE isolation failure");
|
||||
WSREP_WARN("ALTER TABLE TRUNCATE PARTITION isolation failure");
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
#endif /* WITH_WSREP */
|
||||
|
Reference in New Issue
Block a user