diff options
author | unknown <monty@mashka.mysql.fi> | 2003-05-08 00:34:23 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-05-08 00:34:23 +0300 |
commit | a1b470729b1b9868d8d1eb741dbeda15097ad310 (patch) | |
tree | 2035219ad23485dfcfdc09c68f8a82c849a42ee1 /sql | |
parent | a57e7732897ee7973d82dccea0425c436845066a (diff) | |
download | mariadb-git-a1b470729b1b9868d8d1eb741dbeda15097ad310.tar.gz |
Better grant test for SELECT *
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_base.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index d28fedba25b..3f8a59613b4 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1877,14 +1877,14 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name, for (; tables ; tables=tables->next) { TABLE *table=tables->table; - if (grant_option && !(table->grant.privilege & - table->grant.want_privilege) && - check_grant_all_columns(thd,SELECT_ACL,table)) - DBUG_RETURN(-1); if (!table_name || (!strcmp(table_name,tables->alias) && (!db_name || !tables->db || !strcmp(tables->db,db_name)))) { + if (!(table->grant.privilege & SELECT_ACL) && + check_grant_all_columns(thd,SELECT_ACL,table)) + DBUG_RETURN(-1); + Field **ptr=table->field,*field; thd->used_tables|=table->map; while ((field = *ptr++)) |