mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
bzr merge -r3946..3968 codership/5.5
This commit is contained in:
@@ -455,6 +455,12 @@ bool Sql_cmd_truncate_table::truncate_table(THD *thd, TABLE_LIST *table_ref)
|
||||
{
|
||||
bool hton_can_recreate;
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
if (WSREP(thd) && wsrep_to_isolation_begin(thd,
|
||||
table_ref->db,
|
||||
table_ref->table_name, NULL))
|
||||
DBUG_RETURN(TRUE);
|
||||
#endif /* WITH_WSREP */
|
||||
if (lock_table(thd, table_ref, &hton_can_recreate))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
@@ -531,12 +537,6 @@ bool Sql_cmd_truncate_table::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, NULL))
|
||||
DBUG_RETURN(TRUE);
|
||||
#endif /* WITH_WSREP */
|
||||
if (! (res= truncate_table(thd, first_table)))
|
||||
my_ok(thd);
|
||||
DBUG_RETURN(res);
|
||||
|
Reference in New Issue
Block a user