Commit 1003d535 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-4.1/

into serg.mylan:/usr/home/serg/Abk/mysql-4.1


sql/ha_myisam.cc:
  Auto merged
parents 55c8a6c1 40fced52
...@@ -1013,7 +1013,15 @@ bool ha_myisam::check_and_repair(THD *thd) ...@@ -1013,7 +1013,15 @@ bool ha_myisam::check_and_repair(THD *thd)
if (!file->state->del && (myisam_recover_options & HA_RECOVER_QUICK)) if (!file->state->del && (myisam_recover_options & HA_RECOVER_QUICK))
check_opt.flags|=T_QUICK; check_opt.flags|=T_QUICK;
sql_print_error("Warning: Checking table: '%s'",table->path); sql_print_error("Warning: Checking table: '%s'",table->path);
if ((marked_crashed=mi_is_crashed(file)) || check(thd, &check_opt)) if ((marked_crashed=mi_is_crashed(file)))
{
char *old_query= thd->query;
uint old_query_length= thd->query_length;
pthread_mutex_lock(&LOCK_thread_count);
thd->query= table->real_name;
thd->query_length= strlen(table->real_name);
pthread_mutex_unlock(&LOCK_thread_count);
if (check(thd, &check_opt))
{ {
sql_print_error("Warning: Recovering table: '%s'",table->path); sql_print_error("Warning: Recovering table: '%s'",table->path);
check_opt.flags= check_opt.flags=
...@@ -1024,6 +1032,11 @@ bool ha_myisam::check_and_repair(THD *thd) ...@@ -1024,6 +1032,11 @@ bool ha_myisam::check_and_repair(THD *thd)
if (repair(thd, &check_opt)) if (repair(thd, &check_opt))
error=1; error=1;
} }
pthread_mutex_lock(&LOCK_thread_count);
thd->query= old_query;
thd->query_length= old_query_length;
pthread_mutex_unlock(&LOCK_thread_count);
}
DBUG_RETURN(error); DBUG_RETURN(error);
} }
......
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