diff options
author | unknown <monty@narttu.mysql.fi> | 2003-08-17 14:10:15 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2003-08-17 14:10:15 +0300 |
commit | 0eaf4d8d7e879b32d5e1e0c7ecb409bc4d4cb060 (patch) | |
tree | 87feb8f1e2709918215eaa5b5031a4a243ba4531 /sql/sql_show.cc | |
parent | 9ac61d15faf874589bd01ae9fa8d1854f6dc6621 (diff) | |
download | mariadb-git-0eaf4d8d7e879b32d5e1e0c7ecb409bc4d4cb060.tar.gz |
Fix mutex handling in SHOW_VARIABLES (key_buffer_size was not properly protected)
Changed some non fatal myisamchk error messages to warnings
myisam/myisamchk.c:
Change error -> warning
sql/handler.cc:
Add mutex around keybuff_size usage
sql/mysql_priv.h:
Indentation update
sql/set_var.cc:
Add mutex around longlong variable usage
sql/sql_parse.cc:
Fix mutex handling in SHOW_VARIABLES
sql/sql_show.cc:
Fix mutex handling in SHOW_VARIABLES
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index d591a44accf..489635bd85f 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -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); } |