mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 14:15:33 +02:00
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
This commit is contained in:
parent
bd1f34d932
commit
66f13d9120
6 changed files with 122 additions and 47 deletions
|
|
@ -5414,10 +5414,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
|
|||
!any_privileges)
|
||||
{
|
||||
field_iterator.set(tables);
|
||||
if (check_grant_all_columns(thd, SELECT_ACL, field_iterator.grant(),
|
||||
field_iterator.db_name(),
|
||||
field_iterator.table_name(),
|
||||
&field_iterator))
|
||||
if (check_grant_all_columns(thd, SELECT_ACL, &field_iterator))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue