Skip to content

Commit bc609a8

Browse files
committed
FLUSH PRIVILEGES should flush servers also in embedded
servers aren't really privileges, so even if they're affected by FLUSH PRIVILEGES, they aren't disabled in embedded.
1 parent 4602761 commit bc609a8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sql/sql_reload.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
8080

8181
DBUG_ASSERT(!thd || !thd->in_sub_stmt);
8282

83-
#ifndef NO_EMBEDDED_ACCESS_CHECKS
8483
if (options & REFRESH_GRANT)
8584
{
85+
#ifndef NO_EMBEDDED_ACCESS_CHECKS
8686
THD *tmp_thd= 0;
8787
/*
8888
If reload_acl_and_cache() is called from SIGHUP handler we have to
@@ -124,8 +124,11 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
124124
thd= 0;
125125
}
126126
reset_mqh((LEX_USER *)NULL, TRUE);
127-
}
127+
#else
128+
if ((result= thd && servers_reload(thd)))
129+
my_error(ER_UNKNOWN_ERROR, MYF(0));
128130
#endif
131+
}
129132
if (options & REFRESH_LOG)
130133
{
131134
/*

0 commit comments

Comments
 (0)