1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-21702 Add a data type for privileges

This commit is contained in:
Alexander Barkov
2020-02-09 21:53:11 +04:00
parent f79f537f9f
commit 83e75b39b3
41 changed files with 781 additions and 546 deletions

View File

@@ -592,7 +592,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
This will hold the intersection of the priviliges on all columns in the
view.
*/
uint final_priv= VIEW_ANY_ACL;
privilege_t final_priv(VIEW_ANY_ACL);
for (sl= select_lex; sl; sl= sl->next_select())
{
@@ -602,8 +602,9 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
while ((item= it++))
{
Item_field *fld= item->field_for_view_update();
uint priv= (get_column_grant(thd, &view->grant, view->db.str,
view->table_name.str, item->name.str) &
privilege_t priv(get_column_grant(thd, &view->grant, view->db.str,
view->table_name.str,
item->name.str) &
VIEW_ANY_ACL);
if (!fld)