1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge from mysql-5.1.

This commit is contained in:
Alexander Nozdrin
2009-10-13 13:42:38 +04:00
172 changed files with 7283 additions and 538 deletions

View File

@ -1447,7 +1447,28 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (check_global_access(thd,RELOAD_ACL))
break;
general_log_print(thd, command, NullS);
if (!reload_acl_and_cache(thd, options, (TABLE_LIST*) 0, &not_used))
#ifndef DBUG_OFF
bool debug_simulate= FALSE;
DBUG_EXECUTE_IF("simulate_detached_thread_refresh", debug_simulate= TRUE;);
if (debug_simulate)
{
/*
Simulate a reload without a attached thread session.
Provides a environment similar to that of when the
server receives a SIGHUP signal and reloads caches
and flushes tables.
*/
bool res;
my_pthread_setspecific_ptr(THR_THD, NULL);
res= reload_acl_and_cache(NULL, options | REFRESH_FAST,
NULL, &not_used);
my_pthread_setspecific_ptr(THR_THD, thd);
if (!res)
my_ok(thd);
break;
}
#endif
if (!reload_acl_and_cache(thd, options, NULL, &not_used))
my_ok(thd);
break;
}