From 70fa0e01ddf4747f65540061ef02fe55651de00d Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Jun 2002 21:36:31 +0300 Subject: [PATCH] A bug fix when for SELECT ... INTO OUTFILE .... user has table privilege and global FILE privilege --- sql/sql_parse.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 90f0f2afa58..fdfef3b6249 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2571,8 +2571,17 @@ check_table_access(THD *thd,uint want_access,TABLE_LIST *tables, } } else if (check_access(thd,want_access,tables->db,&tables->grant.privilege, + 0, no_errors | grant_option)) + { + if (grant_option) + { + if ( check_access(thd,want_access & (uint) ~TABLE_ACLS,tables->db,&tables->grant.privilege, 0, no_errors)) - return TRUE; // Access denied + return TRUE; + } + else + return TRUE; + } } if (grant_option) return check_grant(thd,want_access & ~EXTRA_ACL,org_tables,