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:
unknown
2002-11-12 14:40:32 +02:00
parent 79f8a525a3
commit a70a9ab637
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;
}