diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-11-19 17:48:36 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-11-19 17:48:36 +0100 |
commit | 7f19330c595e3183d079fe2c18eecc74740e8f83 (patch) | |
tree | 8b853976cd14d96d5415757be525133b32be0c93 /sql/sql_partition_admin.cc | |
parent | 4046ed12bcddfd831c510b022cb7af224be9457b (diff) | |
parent | f4421c893b50f05078f14d33c47d21f52f59f8a7 (diff) | |
download | mariadb-git-7f19330c595e3183d079fe2c18eecc74740e8f83.tar.gz |
Merge branch 'github/10.0-galera' into 10.1
Diffstat (limited to 'sql/sql_partition_admin.cc')
-rw-r--r-- | sql/sql_partition_admin.cc | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index e237fb1ad00..9e67a21e8f4 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -783,20 +783,17 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd) DBUG_RETURN(TRUE); #ifdef WITH_WSREP - if (WSREP_ON) + /* Forward declaration */ + TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl); + + if (WSREP(thd) && (!thd->is_current_stmt_binlog_format_row() || + !find_temporary_table(thd, first_table)) && + wsrep_to_isolation_begin( + thd, first_table->db, first_table->table_name, NULL) + ) { - /* Forward declaration */ - TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl); - - if ((!thd->is_current_stmt_binlog_format_row() || - !find_temporary_table(thd, first_table)) && - wsrep_to_isolation_begin( - thd, first_table->db, first_table->table_name, NULL) - ) - { - WSREP_WARN("ALTER TABLE TRUNCATE PARTITION isolation failure"); - DBUG_RETURN(TRUE); - } + WSREP_WARN("ALTER TABLE TRUNCATE PARTITION isolation failure"); + DBUG_RETURN(TRUE); } #endif /* WITH_WSREP */ |