Commit 406f018d authored by Tatiana A. Nurnberg's avatar Tatiana A. Nurnberg

auto-merge

parents 5fb8b93e e34085fe
...@@ -3111,6 +3111,9 @@ bool select_insert::send_data(List<Item> &values) ...@@ -3111,6 +3111,9 @@ bool select_insert::send_data(List<Item> &values)
} }
} }
// Release latches in case bulk insert takes a long time
ha_release_temporary_latches(thd);
error= write_record(thd, table, &info); error= write_record(thd, table, &info);
table->auto_increment_field_not_null= FALSE; table->auto_increment_field_not_null= FALSE;
......
...@@ -10602,6 +10602,9 @@ free_tmp_table(THD *thd, TABLE *entry) ...@@ -10602,6 +10602,9 @@ free_tmp_table(THD *thd, TABLE *entry)
save_proc_info=thd->proc_info; save_proc_info=thd->proc_info;
thd_proc_info(thd, "removing tmp table"); thd_proc_info(thd, "removing tmp table");
// Release latches since this can take a long time
ha_release_temporary_latches(thd);
if (entry->file) if (entry->file)
{ {
if (entry->db_stat) if (entry->db_stat)
...@@ -10647,6 +10650,10 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param, ...@@ -10647,6 +10650,10 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param,
table->file->print_error(error,MYF(0)); table->file->print_error(error,MYF(0));
DBUG_RETURN(1); DBUG_RETURN(1);
} }
// Release latches since this can take a long time
ha_release_temporary_latches(thd);
new_table= *table; new_table= *table;
share= *table->s; share= *table->s;
new_table.s= &share; new_table.s= &share;
......
...@@ -1112,6 +1112,9 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool do_optimize) ...@@ -1112,6 +1112,9 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool do_optimize)
param.out_flag= 0; param.out_flag= 0;
strmov(fixed_name,file->filename); strmov(fixed_name,file->filename);
// Release latches since this can take a long time
ha_release_temporary_latches(thd);
// Don't lock tables if we have used LOCK TABLE // Don't lock tables if we have used LOCK TABLE
if (!thd->locked_tables && if (!thd->locked_tables &&
mi_lock_database(file, table->s->tmp_table ? F_EXTRA_LCK : F_WRLCK)) mi_lock_database(file, table->s->tmp_table ? F_EXTRA_LCK : F_WRLCK))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment