mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for bug #9838: INFORMATION_SCHEMA.COLUMNS columns of granted views missing
sql/sql_acl.cc: Fix for bug #9838: INFORMATION_SCHEMA.COLUMNS columns of granted views missing -increase grant_version in acl_init, mysql_table_grant -table privileges should be taken into account when we calculate column grants sql/sql_show.cc: Fix for bug #9838: INFORMATION_SCHEMA.COLUMNS columns of granted views missing use 'base_name', 'file_name' because 'tables->db', 'tables->tables' could be invalid in case of view(derived tables).
This commit is contained in:
@ -2303,8 +2303,8 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
|
||||
uint col_access;
|
||||
check_access(thd,SELECT_ACL | EXTRA_ACL, base_name,
|
||||
&tables->grant.privilege, 0, 0);
|
||||
col_access= get_column_grant(thd, &tables->grant, tables->db,
|
||||
tables->table_name,
|
||||
col_access= get_column_grant(thd, &tables->grant,
|
||||
base_name, file_name,
|
||||
field->field_name) & COL_ACLS;
|
||||
if (lex->orig_sql_command != SQLCOM_SHOW_FIELDS && !col_access)
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user