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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user