Commit ce194f04 authored by unknown's avatar unknown

Fix for a bug with column privileges ...

parent 564a134c
...@@ -1616,7 +1616,7 @@ Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length, ...@@ -1616,7 +1616,7 @@ Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length,
else else
thd->dupp_field=field; thd->dupp_field=field;
} }
if (check_grants && !thd->master_access && check_grant_column(thd,table,name,length)) if (check_grants && check_grant_column(thd,table,name,length))
return WRONG_GRANT; return WRONG_GRANT;
return field; return field;
} }
...@@ -1643,7 +1643,8 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables) ...@@ -1643,7 +1643,8 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables)
{ {
found_table=1; found_table=1;
Field *find=find_field_in_table(thd,tables->table,name,length, Field *find=find_field_in_table(thd,tables->table,name,length,
grant_option && !thd->master_access,1); grant_option &&
tables->grant.want_privilege ,1);
if (find) if (find)
{ {
if (find == WRONG_GRANT) if (find == WRONG_GRANT)
...@@ -1682,7 +1683,7 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables) ...@@ -1682,7 +1683,7 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables)
for (; tables ; tables=tables->next) for (; tables ; tables=tables->next)
{ {
Field *field=find_field_in_table(thd,tables->table,name,length, Field *field=find_field_in_table(thd,tables->table,name,length,
grant_option && !thd->master_access, allow_rowid); grant_option && tables->grant.want_privilege ,allow_rowid);
if (field) if (field)
{ {
if (field == WRONG_GRANT) if (field == WRONG_GRANT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment