1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

automerge

This commit is contained in:
Sergey Glukhov
2008-10-02 15:08:15 +05:00
3 changed files with 72 additions and 0 deletions

View File

@@ -4236,6 +4236,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;