mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
reverted the fix for bug #46019 from 5.1-bugteam
This commit is contained in:
@@ -3905,15 +3905,11 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
|
||||
continue; // ok
|
||||
|
||||
if (!(~table->grant.privilege & want_access) ||
|
||||
(table->is_anonymous_derived_table() &&
|
||||
table->is_non_materialized_derived_table()) || table->schema_table)
|
||||
table->is_anonymous_derived_table() || table->schema_table)
|
||||
{
|
||||
/*
|
||||
It is subquery in the FROM clause. VIEW set table->derived after
|
||||
table opening, but this function is mostly called before table opening.
|
||||
When it's called after table opening e.g. for nested views with
|
||||
materialization we shoud check the materialized table for access as
|
||||
any other table.
|
||||
table opening, but this function always called before table opening.
|
||||
*/
|
||||
if (!table->referencing_view)
|
||||
{
|
||||
@@ -3926,7 +3922,6 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(grant_table= table_hash_search(sctx->host, sctx->ip,
|
||||
table->get_db_name(), sctx->priv_user,
|
||||
table->get_table_name(), FALSE)))
|
||||
|
Reference in New Issue
Block a user