summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-08-21 17:10:55 +0300
committerGeorgi Kodinov <joro@sun.com>2009-08-21 17:10:55 +0300
commit37cff7c04768a75ac6dface603771a8fe86f8984 (patch)
treed9cb6f1114d4934bbc3a7c8adc313f974b717039 /sql/sql_acl.cc
parent4207e50e23cd5b964e4223b61048cd2b5729358f (diff)
downloadmariadb-git-37cff7c04768a75ac6dface603771a8fe86f8984.tar.gz
Revert of the fix for bug #46019.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index a411101fcfd..ab4e518d5dd 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -3650,14 +3650,11 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
continue; // ok
if (!(~table->grant.privilege & want_access) ||
- table->is_non_materialized_derived_table() || table->schema_table)
+ table->derived || 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)
{
@@ -3670,10 +3667,9 @@ 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(), 0)))
+ table->db, sctx->priv_user,
+ table->table_name,0)))
{
want_access &= ~table->grant.privilege;
goto err; // No grants