diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2003-03-12 17:08:48 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2003-03-12 17:08:48 +0200 |
commit | ce194f04c50f4d2b9de3d855ca35f2174b9b7f98 (patch) | |
tree | b3fe6a8d5c68f6c24d5387a7eba2ce82909d15fb | |
parent | 564a134ced56cc344ba1b8d8a77ccdfb1142cfe7 (diff) | |
download | mariadb-git-ce194f04c50f4d2b9de3d855ca35f2174b9b7f98.tar.gz |
Fix for a bug with column privileges ...
-rw-r--r-- | sql/sql_base.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index bab4c151ef3..1ed0673f4cf 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1616,7 +1616,7 @@ Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length, else 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 field; } @@ -1643,7 +1643,8 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables) { found_table=1; 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 == WRONG_GRANT) @@ -1682,7 +1683,7 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables) for (; tables ; tables=tables->next) { 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 == WRONG_GRANT) |