diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-09-03 16:32:00 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-09-03 16:32:00 +0200 |
commit | a5b0a32ac3f8278a197add2efa636c6252ce6096 (patch) | |
tree | 006ccc320544e04be6beca0e929eb9f9d8e36bcd /sql/sql_partition_admin.cc | |
parent | 09307c443c173fc2756169290b6ce0ba2f679b9a (diff) | |
parent | f533b2b462b5b73630245172b627506d36f95b39 (diff) | |
download | mariadb-git-a5b0a32ac3f8278a197add2efa636c6252ce6096.tar.gz |
Merge branch '10.0-galera' into 10.1
Diffstat (limited to 'sql/sql_partition_admin.cc')
-rw-r--r-- | sql/sql_partition_admin.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index 99bc161501e..e237fb1ad00 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -531,6 +531,24 @@ bool Sql_cmd_alter_table_exchange_partition:: &alter_prelocking_strategy)) DBUG_RETURN(true); +#ifdef WITH_WSREP + if (WSREP_ON) + { + /* 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; @@ -767,6 +785,7 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd) #ifdef WITH_WSREP if (WSREP_ON) { + /* Forward declaration */ TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl); if ((!thd->is_current_stmt_binlog_format_row() || @@ -775,7 +794,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); } } |