From e5410da190d3e37af997f5b9bb1de2acb818f6f5 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Thu, 21 Apr 2016 08:18:54 -0700 Subject: [PATCH] SEGFAULT in get_column_grant() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to a typo, the wrong grant_table was used when fetching privileges for roles. Signed-off-by: Vicențiu Ciorbaru --- sql/sql_acl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index a70afe4fca9..bbd1dd86880 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -7453,7 +7453,8 @@ ulong get_column_grant(THD *thd, GRANT_INFO *grant, if (!grant_column) priv|= (grant->privilege | grant_table_role->privs); else - priv|= (grant->privilege | grant_table->privs | grant_column->rights); + priv|= (grant->privilege | grant_table_role->privs | + grant_column->rights); } } mysql_rwlock_unlock(&LOCK_grant);