summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index e27ccf55543..0f0c3c97ed2 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1984,8 +1984,9 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name,
(!db_name || !strcmp(tables->db,db_name))))
{
/* Ensure that we have access right to all columns */
- if (grant_option && !thd->master_access &&
- check_grant_all_columns(thd,SELECT_ACL,table) )
+ if (grant_option && !(table->grant.privilege &
+ table->grant.want_privilege) &&
+ check_grant_all_columns(thd,SELECT_ACL,table))
DBUG_RETURN(-1);
Field **ptr=table->field,*field;
thd->used_tables|=table->map;