Skip to content

Commit 60c6683

Browse files
Bug#29681975: RUNNING SELECT ROLES_GRAPHML(); WITH --SKIP-GRANT-TABLES=1 LEADS TO A CRASH
Description: Added check for --skip-grants-table in roles_graphml() function RB: 22060
1 parent 298aea8 commit 60c6683

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sql/item_strfunc.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4777,8 +4777,10 @@ void Item_func_current_role::set_current_role(THD *thd) {
47774777

47784778
bool Item_func_roles_graphml::calculate_graphml(THD *thd) {
47794779
Security_context *sctx = thd->security_context();
4780-
if (sctx && (sctx->has_global_grant(STRING_WITH_LEN("ROLE_ADMIN")).first ||
4781-
sctx->check_access(SUPER_ACL, "", false)))
4780+
if (sctx &&
4781+
(sctx->has_global_grant(STRING_WITH_LEN("ROLE_ADMIN")).first ||
4782+
sctx->check_access(SUPER_ACL, "", false)) &&
4783+
!skip_grant_tables())
47824784
roles_graphml(thd, &value_cache);
47834785
else
47844786
value_cache.set_ascii(

0 commit comments

Comments
 (0)