summaryrefslogtreecommitdiff
path: root/sql/sql_acl.h
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-09-27 12:15:19 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-09-27 12:15:19 +0300
commit66f13d91208fd3fe9570ef705e350728f63f4727 (patch)
tree08e93bc69dd1af0199f82521afc1c2c4e0f6f117 /sql/sql_acl.h
parentbd1f34d932237f2d401452f752bda7dd21f03e26 (diff)
downloadmariadb-git-66f13d91208fd3fe9570ef705e350728f63f4727.tar.gz
Bug #30468: column level privileges not respected when joining tables
When expanding a * in a USING/NATURAL join the check for table access for both tables in the join was done using the grant information of the first one. Fixed by getting the grant information for the current table while iterating through the columns of the join. mysql-test/r/grant2.result: Bug #30468: test case mysql-test/t/grant2.test: Bug #30468: test case sql/sql_acl.cc: Bug #30468: correctly check column grants sql/sql_acl.h: Bug #30468: correctly check column grants sql/sql_base.cc: Bug #30468: correctly check column grants sql/sql_insert.cc: Bug #30468: correctly check column grants
Diffstat (limited to 'sql/sql_acl.h')
-rw-r--r--sql/sql_acl.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_acl.h b/sql/sql_acl.h
index d08f2663af5..b2007ccdf47 100644
--- a/sql/sql_acl.h
+++ b/sql/sql_acl.h
@@ -205,9 +205,8 @@ bool check_grant_column (THD *thd, GRANT_INFO *grant,
const char *name, uint length, Security_context *sctx);
bool check_column_grant_in_table_ref(THD *thd, TABLE_LIST * table_ref,
const char *name, uint length);
-bool check_grant_all_columns(THD *thd, ulong want_access, GRANT_INFO *grant,
- const char* db_name, const char *table_name,
- Field_iterator *fields);
+bool check_grant_all_columns(THD *thd, ulong want_access,
+ Field_iterator_table_ref *fields);
bool check_grant_routine(THD *thd, ulong want_access,
TABLE_LIST *procs, bool is_proc, bool no_error);
bool check_grant_db(THD *thd,const char *db);