diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-07-25 22:24:40 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-07-25 22:24:40 +0200 |
commit | cb5952b5060d089c021808fe1f1cf13f7eb88423 (patch) | |
tree | 1e4678bd3b899428428b4f7980b92fade8e57f62 /sql/sql_truncate.cc | |
parent | 57cde8ccd19675dc98e3cbacf0ef5c72cb188e49 (diff) | |
parent | 9fbe360e9f7d41d169eb5abed22dc15f26f6c749 (diff) | |
download | mariadb-git-cb5952b5060d089c021808fe1f1cf13f7eb88423.tar.gz |
Merge branch '10.0' into bb-10.1-merge-sanja
Diffstat (limited to 'sql/sql_truncate.cc')
-rw-r--r-- | sql/sql_truncate.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc index 8a70e6f6bdb..9a54b4f947f 100644 --- a/sql/sql_truncate.cc +++ b/sql/sql_truncate.cc @@ -349,7 +349,8 @@ bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref, { DEBUG_SYNC(thd, "upgrade_lock_for_truncate"); /* To remove the table from the cache we need an exclusive lock. */ - if (wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_DROP)) + if (wait_while_table_is_used(thd, table, + *hton_can_recreate ? HA_EXTRA_PREPARE_FOR_DROP : HA_EXTRA_NOT_USED)) DBUG_RETURN(TRUE); m_ticket_downgrade= table->mdl_ticket; /* Close if table is going to be recreated. */ |