summaryrefslogtreecommitdiff
path: root/sql/sql_truncate.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-05-17 01:47:28 +0300
committerMichael Widenius <monty@askmonty.org>2012-05-17 01:47:28 +0300
commitb1485a4780808cd95cbc37c1f59024b39d542584 (patch)
tree9210bb1c318e4268a3dc3d47954cfc26a1debb6f /sql/sql_truncate.cc
parent26cc22f3fe95cfd535d61540101fe89cd10c9026 (diff)
downloadmariadb-git-b1485a4780808cd95cbc37c1f59024b39d542584.tar.gz
More fixes for LOCK TABLE and REPAIR/FLUSH
Changed HA_EXTRA_NORMAL to HA_EXTRA_NOT_USED (more clean) mysql-test/suite/maria/lock.result: More extensive tests of LOCK TABLE with FLUSH and REPAIR mysql-test/suite/maria/lock.test: More extensive tests of LOCK TABLE with FLUSH and REPAIR sql/sql_admin.cc: Fix that REPAIR TABLE ... USE_FRM works with LOCK TABLES sql/sql_base.cc: Ensure that transactions are closed in ARIA when doing flush HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED Don't call extra many times for a table in close_all_tables_for_name() Added test if table_list->table as this can happen in error situations sql/sql_partition.cc: HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED sql/sql_reload.cc: Fixed comment sql/sql_table.cc: HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED sql/sql_trigger.cc: HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED sql/sql_truncate.cc: HA_EXTRA_FORCE_REOPEN -> HA_EXTRA_PREPARE_FOR_DROP for truncate, as this speeds up truncate by not having to flush the cache to disk.
Diffstat (limited to 'sql/sql_truncate.cc')
-rw-r--r--sql/sql_truncate.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc
index b84a00eb0fc..3c1b231d3f2 100644
--- a/sql/sql_truncate.cc
+++ b/sql/sql_truncate.cc
@@ -358,12 +358,12 @@ bool Truncate_statement::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_FORCE_REOPEN))
+ if (wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_DROP))
DBUG_RETURN(TRUE);
m_ticket_downgrade= table->mdl_ticket;
/* Close if table is going to be recreated. */
if (*hton_can_recreate)
- close_all_tables_for_name(thd, table->s, HA_EXTRA_PREPARE_FOR_DROP);
+ close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED);
}
else
{