1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix mutex handling in SHOW_VARIABLES (key_buffer_size was not properly protected)

Changed some non fatal myisamchk error messages to warnings
This commit is contained in:
monty@narttu.mysql.fi
2003-08-17 14:10:15 +03:00
parent fe511fc489
commit d79cbc3b99
6 changed files with 49 additions and 19 deletions

View File

@ -1158,7 +1158,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
enum enum_var_type value_type)
enum enum_var_type value_type,
pthread_mutex_t *mutex)
{
char buff[8192];
String packet2(buff,sizeof(buff));
@ -1171,8 +1172,7 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
if (send_fields(thd,field_list,1))
DBUG_RETURN(1); /* purecov: inspected */
/* pthread_mutex_lock(&THR_LOCK_keycache); */
pthread_mutex_lock(&LOCK_status);
pthread_mutex_lock(mutex);
for (; variables->name; variables++)
{
if (!(wild && wild[0] && wild_case_compare(variables->name,wild)))
@ -1413,14 +1413,12 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
goto err; /* purecov: inspected */
}
}
pthread_mutex_unlock(&LOCK_status);
/* pthread_mutex_unlock(&THR_LOCK_keycache); */
pthread_mutex_unlock(&mutex);
send_eof(&thd->net);
DBUG_RETURN(0);
err:
pthread_mutex_unlock(&LOCK_status);
/* pthread_mutex_unlock(&THR_LOCK_keycache); */
pthread_mutex_unlock(&mutex);
DBUG_RETURN(1);
}