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

Manual merge.

This commit is contained in:
Davi Arnaut
2009-09-30 19:25:06 -03:00
6 changed files with 98 additions and 2 deletions

View File

@ -1428,7 +1428,27 @@ 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
DBUG_EXECUTE_IF("simulate_detached_thread_refresh",
{
/*
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);
goto end;
}
);
#endif
if (!reload_acl_and_cache(thd, options, NULL, &not_used))
my_ok(thd);
break;
}
@ -1571,6 +1591,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break;
}
/* Break the switch for DBUG wrapped code. */
#ifndef DBUG_OFF
end:
#endif
/* report error issued during command execution */
if (thd->killed_errno())
{