1
0
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:
unknown
2005-05-07 13:55:46 +00:00
parent 8ed5d70f6e
commit bd58e3e59c
4 changed files with 34 additions and 17 deletions

View File

@ -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;