mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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.
This commit is contained in:
@@ -6270,7 +6270,7 @@ static void alter_partition_lock_handling(ALTER_PARTITION_PARAM_TYPE *lpt)
|
||||
THD *thd= lpt->thd;
|
||||
|
||||
if (lpt->old_table)
|
||||
close_all_tables_for_name(thd, lpt->old_table->s, HA_EXTRA_NORMAL);
|
||||
close_all_tables_for_name(thd, lpt->old_table->s, HA_EXTRA_NOT_USED);
|
||||
if (lpt->table)
|
||||
{
|
||||
/*
|
||||
@@ -6307,7 +6307,7 @@ static int alter_close_tables(ALTER_PARTITION_PARAM_TYPE *lpt, bool close_old)
|
||||
}
|
||||
if (close_old && lpt->old_table)
|
||||
{
|
||||
close_all_tables_for_name(lpt->thd, lpt->old_table->s, HA_EXTRA_NORMAL);
|
||||
close_all_tables_for_name(lpt->thd, lpt->old_table->s, HA_EXTRA_NOT_USED);
|
||||
lpt->old_table= 0;
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
@@ -6640,7 +6640,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
|
||||
mysql_write_frm(lpt, WFRM_WRITE_SHADOW) ||
|
||||
ERROR_INJECT_CRASH("crash_drop_partition_2") ||
|
||||
ERROR_INJECT_ERROR("fail_drop_partition_2") ||
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_NORMAL) ||
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED) ||
|
||||
ERROR_INJECT_CRASH("crash_drop_partition_3") ||
|
||||
ERROR_INJECT_ERROR("fail_drop_partition_3") ||
|
||||
(close_table_on_failure= TRUE, FALSE) ||
|
||||
@@ -6714,7 +6714,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
|
||||
mysql_write_frm(lpt, WFRM_WRITE_SHADOW) ||
|
||||
ERROR_INJECT_CRASH("crash_add_partition_2") ||
|
||||
ERROR_INJECT_ERROR("fail_add_partition_2") ||
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_NORMAL) ||
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED) ||
|
||||
ERROR_INJECT_CRASH("crash_add_partition_3") ||
|
||||
ERROR_INJECT_ERROR("fail_add_partition_3") ||
|
||||
(close_table_on_failure= TRUE, FALSE) ||
|
||||
@@ -6820,7 +6820,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
|
||||
mysql_change_partitions(lpt) ||
|
||||
ERROR_INJECT_CRASH("crash_change_partition_4") ||
|
||||
ERROR_INJECT_ERROR("fail_change_partition_4") ||
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_NORMAL) ||
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED) ||
|
||||
ERROR_INJECT_CRASH("crash_change_partition_5") ||
|
||||
ERROR_INJECT_ERROR("fail_change_partition_5") ||
|
||||
write_log_final_change_partition(lpt) ||
|
||||
|
Reference in New Issue
Block a user