diff options
author | Seppo Jaakola <seppo.jaakola@codership.com> | 2012-04-13 01:33:24 +0300 |
---|---|---|
committer | Seppo Jaakola <seppo.jaakola@codership.com> | 2012-04-13 01:33:24 +0300 |
commit | 2fc1ec43560b453b4694adbc1aac11f3f23b1761 (patch) | |
tree | 880c3875dae28574a90bf891ef901027723d21f6 /sql/sql_truncate.cc | |
parent | 51c77ec5d406843bb8c8131f0687f4f75839d045 (diff) | |
download | mariadb-git-2fc1ec43560b453b4694adbc1aac11f3f23b1761.tar.gz |
Initial push of codership-wsrep API implementation for MariaDB.
Merge of:
lp:maria/5.5, #3334: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/3334
lp:codership-mysql/5.5, #3725: http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3725
Diffstat (limited to 'sql/sql_truncate.cc')
-rw-r--r-- | sql/sql_truncate.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc index 67ed608f114..a66b2377fcb 100644 --- a/sql/sql_truncate.cc +++ b/sql/sql_truncate.cc @@ -24,6 +24,9 @@ #include "sql_acl.h" // DROP_ACL #include "sql_parse.h" // check_one_table_access() #include "sql_truncate.h" +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif /* WITH_WSREP */ /** @@ -515,9 +518,14 @@ bool Truncate_statement::execute(THD *thd) if (check_one_table_access(thd, DROP_ACL, first_table)) DBUG_RETURN(res); +#ifdef WITH_WSREP + if (WSREP(thd) && wsrep_to_isolation_begin(thd, + first_table->db, + first_table->table_name)) + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ if (! (res= truncate_table(thd, first_table))) my_ok(thd); - DBUG_RETURN(res); } |