summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index aed0ad02e4d..b0346964eea 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -8144,6 +8144,16 @@ bool check_grant(THD *thd, privilege_t want_access, TABLE_LIST *tables,
if (!want_access)
continue; // ok
+ if (t_ref->table_function)
+ {
+ /*
+ Table function doesn't need any privileges to check.
+ */
+ t_ref->grant.privilege|= TMP_TABLE_ACLS;
+ t_ref->grant.want_privilege= NO_ACL;
+ continue;
+ }
+
if (!(~t_ref->grant.privilege & want_access) ||
t_ref->is_anonymous_derived_table() || t_ref->schema_table)
{