1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merging with 5.1-5.1.29-rc

This commit is contained in:
Mats Kindahl
2008-10-08 13:37:13 +02:00
47 changed files with 3704 additions and 72634 deletions

View File

@ -4257,6 +4257,27 @@ static int get_schema_views_record(THD *thd, TABLE_LIST *tables,
!my_strcasecmp(system_charset_info, tables->definer.host.str,
sctx->priv_host))
tables->allowed_show= TRUE;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
else
{
if ((thd->col_access & (SHOW_VIEW_ACL|SELECT_ACL)) ==
(SHOW_VIEW_ACL|SELECT_ACL))
tables->allowed_show= TRUE;
else
{
TABLE_LIST table_list;
uint view_access;
memset(&table_list, 0, sizeof(table_list));
table_list.db= tables->view_db.str;
table_list.table_name= tables->view_name.str;
table_list.grant.privilege= thd->col_access;
view_access= get_table_grant(thd, &table_list);
if ((view_access & (SHOW_VIEW_ACL|SELECT_ACL)) ==
(SHOW_VIEW_ACL|SELECT_ACL))
tables->allowed_show= TRUE;
}
}
#endif
}
restore_record(table, s->default_values);
tmp_db_name= &tables->view_db;