diff options
author | Vicențiu Ciorbaru <cvicentiu@gmail.com> | 2022-06-16 16:35:55 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <cvicentiu@gmail.com> | 2022-06-16 16:35:55 +0300 |
commit | 75e98cbd5c5325e7d4596c5387cc5c3cc14936f1 (patch) | |
tree | d22f0392a329ddd2f72fad7c44cfb31c7d06204e /sql/sql_view.cc | |
parent | 33b8ac0286a41aec0278a704804bd07edefa9218 (diff) | |
download | mariadb-git-preview-10.10-MDEV-14443-deny-command.tar.gz |
INFORMATION_SCHEMA.views denies with show view and selectpreview-10.10-MDEV-14443-deny-command
This commit fixes show view and select privilege denies.
Other cleanup work:
- TODO(cvicentiu) describe this when rebasing.
- get_table_grant -> Take in table strings, not a TABLE_LIST
- get_column_grant -> Take in sctx.
- check_some_grants_remain -> take in role denies.
- check_column_access_denied -> Utility function for show view.
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 90c4e4fe0dc..ba1b4d7688e 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -624,7 +624,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, while ((item= it++)) { Item_field *fld= item->field_for_view_update(); - privilege_t priv(get_column_grant(thd, &view->grant, + privilege_t priv(get_column_grant(thd->security_context(), &view->grant, view->db, view->table_name, item->name) & |