1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Better grant test for SELECT *

This commit is contained in:
monty@mashka.mysql.fi
2003-05-08 00:34:23 +03:00
parent 71ce598fa2
commit 8a28428c0a

View File

@@ -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++))