1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00
Docs/manual.texi:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/records.cc:
  Auto merged
sql/sql_repl.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/t/bdb-crash.test:
  Auto merged
sql/sql_repl.cc:
  use local file
This commit is contained in:
unknown
2001-11-26 03:30:16 +02:00
8 changed files with 123 additions and 22 deletions

View File

@@ -954,9 +954,11 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
/* Close all instances of the table to allow repair to rename files */
if (open_for_modify && table->table->version)
if (lock_type == TL_WRITE && table->table->version)
{
pthread_mutex_lock(&LOCK_open);
const char *old_message=thd->enter_cond(&COND_refresh, &LOCK_open,
"Waiting to get writelock");
mysql_lock_abort(thd,table->table);
while (remove_table_from_cache(thd, table->table->table_cache_key,
table->table->real_name) &&
@@ -966,9 +968,11 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
(void) pthread_cond_wait(&COND_refresh,&LOCK_open);
dropping_tables--;
}
thd->exit_cond(old_message);
pthread_mutex_unlock(&LOCK_open);
if (thd->killed)
goto err;
open_for_modify=0;
}
int result_code = (table->table->file->*operator_func)(thd, check_opt);
@@ -1016,6 +1020,9 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
if (fatal_error)
table->table->version=0; // Force close of table
else if (open_for_modify)
remove_table_from_cache(thd, table->table->table_cache_key,
table->table->real_name);
close_thread_tables(thd);
if (my_net_write(&thd->net, (char*) packet->ptr(),
packet->length()))