1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

some code cleanup as per CTO's instructions plus a small bug fix with

a corresponding test case....
This commit is contained in:
Sinisa@sinisa.nasamreza.org
2002-11-12 14:40:32 +02:00
parent 8fa715304f
commit 7bd4fb813a
4 changed files with 7 additions and 3 deletions

View File

@ -2717,7 +2717,7 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
TABLE_LIST *org_tables=tables;
for (; tables ; tables=tables->next)
{
if (tables->derived)
if (tables->derived || (tables->table && (int)tables->table->tmp_table))
continue;
if ((thd->master_access & want_access) == (want_access & ~EXTRA_ACL) &&
thd->db)
@ -2735,7 +2735,7 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
found=1;
}
}
else if (tables->db && check_access(thd,want_access,tables->db,&tables->grant.privilege,
else if (check_access(thd,want_access,tables->db,&tables->grant.privilege,
0, no_errors))
return TRUE;
}