summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSatya B <satya.bn@sun.com>2009-07-27 11:50:13 +0530
committerSatya B <satya.bn@sun.com>2009-07-27 11:50:13 +0530
commitcae3c58a10d316f742d8948abd99719a0b18dd62 (patch)
tree79be006349537719c9e628bbca7dc66073647aa6 /storage
parentba7c6884d04b517e67c3741b10044f903c86de97 (diff)
parent6b2c3ff568f98963676a9c416556ffa20fd252aa (diff)
downloadmariadb-git-cae3c58a10d316f742d8948abd99719a0b18dd62.tar.gz
merging with mysql-5.1-bugteam branch
Diffstat (limited to 'storage')
-rw-r--r--storage/myisam/ha_myisam.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index d0e5f5a5c88..5198e685817 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -1612,10 +1612,8 @@ bool ha_myisam::check_and_repair(THD *thd)
old_query= thd->query;
old_query_length= thd->query_length;
- pthread_mutex_lock(&LOCK_thread_count);
- thd->query= table->s->table_name.str;
- thd->query_length= (uint) table->s->table_name.length;
- pthread_mutex_unlock(&LOCK_thread_count);
+ thd->set_query(table->s->table_name.str,
+ (uint) table->s->table_name.length);
if ((marked_crashed= mi_is_crashed(file)) || check(thd, &check_opt))
{
@@ -1628,10 +1626,7 @@ bool ha_myisam::check_and_repair(THD *thd)
if (repair(thd, &check_opt))
error=1;
}
- pthread_mutex_lock(&LOCK_thread_count);
- thd->query= old_query;
- thd->query_length= old_query_length;
- pthread_mutex_unlock(&LOCK_thread_count);
+ thd->set_query(old_query, old_query_length);
DBUG_RETURN(error);
}