diff options
author | unknown <anozdrin@mysql.com> | 2006-01-13 19:09:27 +0300 |
---|---|---|
committer | unknown <anozdrin@mysql.com> | 2006-01-13 19:09:27 +0300 |
commit | 848235f797cbbc2e16cb132b67177a6728e6735d (patch) | |
tree | c39f4747f6c64b9a61a4edb4ab053adc98010ea0 /sql/sql_parse.cc | |
parent | 4a114543d5ea588a69f74418fc0cb472a519ebda (diff) | |
parent | 9d2def68963e2ecf578eeac0fb376b5d006073c5 (diff) | |
download | mariadb-git-848235f797cbbc2e16cb132b67177a6728e6735d.tar.gz |
Merge BUG#15110 from 5.0 into 5.1.
Merge mysql.com:/home/alik/MySQL/devel/5.0-bug15110
into mysql.com:/home/alik/MySQL/devel/5.1-bug15110
BitKeeper/etc/ignore:
auto-union
client/mysqldump.c:
Auto merged
include/mysql_com.h:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/r/type_time.result:
Auto merged
sql/Makefile.am:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
client/Makefile.am:
Add my_user.c
include/Makefile.am:
Add my_user.c
libmysqld/Makefile.am:
Add my_user.c
mysql-test/t/disabled.def:
Enable type_time.test
sql/sql_parse.cc:
Merge.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 8238496175c..ecde4d01ae1 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -67,7 +67,7 @@ static void decrease_user_connections(USER_CONN *uc); static bool check_db_used(THD *thd,TABLE_LIST *tables); static bool check_multi_update_lock(THD *thd); static void remove_escape(char *name); -static void refresh_status(void); +static void refresh_status(THD *thd); static bool append_file_to_dir(THD *thd, const char **filename_ptr, const char *table_name); @@ -209,7 +209,7 @@ static int get_or_create_user_conn(THD *thd, const char *user, { int return_val= 0; uint temp_len, user_len; - char temp_user[USERNAME_LENGTH+HOSTNAME_LENGTH+2]; + char temp_user[USER_HOST_BUFF_SIZE]; struct user_conn *uc; DBUG_ASSERT(user != 0); @@ -741,7 +741,7 @@ static void reset_mqh(LEX_USER *lu, bool get_them= 0) { USER_CONN *uc; uint temp_len=lu->user.length+lu->host.length+2; - char temp_user[USERNAME_LENGTH+HOSTNAME_LENGTH+2]; + char temp_user[USER_HOST_BUFF_SIZE]; memcpy(temp_user,lu->user.str,lu->user.length); memcpy(temp_user+lu->user.length+1,lu->host.str,lu->host.length); @@ -6625,7 +6625,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, if (options & REFRESH_HOSTS) hostname_cache_refresh(); if (thd && (options & REFRESH_STATUS)) - refresh_status(); + refresh_status(thd); if (options & REFRESH_THREADS) flush_thread_cache(); #ifdef HAVE_REPLICATION @@ -6713,18 +6713,18 @@ void kill_one_thread(THD *thd, ulong id, bool only_kill_query) /* Clear most status variables */ -static void refresh_status(void) +static void refresh_status(THD *thd) { pthread_mutex_lock(&LOCK_status); - for (SHOW_VAR *ptr= status_vars; ptr->name; ptr++) - if (ptr->type == SHOW_LONG) // note that SHOW_LONG_NOFLUSH variables are not reset - *(ulong*) ptr->value= 0; /* We must update the global status before cleaning up the thread */ - THD *thd= current_thd; add_to_status(&global_status_var, &thd->status_var); bzero((char*) &thd->status_var, sizeof(thd->status_var)); + for (SHOW_VAR *ptr= status_vars; ptr->name; ptr++) + if (ptr->type == SHOW_LONG) // note that SHOW_LONG_NOFLUSH variables are not reset + *(ulong*) ptr->value= 0; + /* Reset the counters of all key caches (default and named). */ process_key_caches(reset_key_cache_counters); pthread_mutex_unlock(&LOCK_status); |