summaryrefslogtreecommitdiff
path: root/sql/sql_truncate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_truncate.cc')
-rw-r--r--sql/sql_truncate.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc
index aca43021798..62f6f8a3f90 100644
--- a/sql/sql_truncate.cc
+++ b/sql/sql_truncate.cc
@@ -424,15 +424,13 @@ bool Sql_cmd_truncate_table::truncate_table(THD *thd, TABLE_LIST *table_ref)
{
if (keys.empty())
{
- WSREP_TO_ISOLATION_BEGIN_IF(table_ref->db.str, table_ref->table_name.str, NULL)
- {
+ if (wsrep_to_isolation_begin(thd, table_ref->db.str, table_ref->table_name.str, NULL))
DBUG_RETURN(TRUE);
- }
- } else {
- WSREP_TO_ISOLATION_BEGIN_FK_TABLES(NULL, NULL, table_ref, &keys)
- {
+ }
+ else
+ {
+ if (wsrep_to_isolation_begin(thd, NULL, NULL, table_ref, NULL, &keys))
DBUG_RETURN(TRUE);
- }
}
}
}