diff options
author | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2005-09-13 16:07:38 +0500 |
---|---|---|
committer | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2005-09-13 16:07:38 +0500 |
commit | 3764875ca6fa16865f865ba9a643ac394c21217e (patch) | |
tree | f20a23c19bac54360e7acba7084834ecfbd7b337 /sql/sql_view.cc | |
parent | b50eb4cd42d2d5073afb2af5af8b19c825a9cca1 (diff) | |
download | mariadb-git-3764875ca6fa16865f865ba9a643ac394c21217e.tar.gz |
Bug#9683 INFORMATION_SCH: Creation of temporary table allowed in
Information_schema DB
Bug#9846 Inappropriate error displayed while
dropping table from 'INFORMATION_SCHEMA'
Bug#10734 Grant of privileges other than 'select' and
'create view' should fail on schema
Bug#10708 SP's can use INFORMATION_SCHEMA as ROUTINE_SCHEMA
cumulative fix for bugs above(after review, 2nd version)
added privilege check for information schema db & tables
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index eb5d64e0fe0..e2daa4e3069 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -224,11 +224,11 @@ bool mysql_create_view(THD *thd, table (i.e. user will not get some privileges by view creation) */ if ((check_access(thd, CREATE_VIEW_ACL, view->db, &view->grant.privilege, - 0, 0) || + 0, 0, is_schema_db(view->db)) || grant_option && check_grant(thd, CREATE_VIEW_ACL, view, 0, 1, 0)) || (mode != VIEW_CREATE_NEW && (check_access(thd, DROP_ACL, view->db, &view->grant.privilege, - 0, 0) || + 0, 0, is_schema_db(view->db)) || grant_option && check_grant(thd, DROP_ACL, view, 0, 1, 0)))) { res= TRUE; @@ -280,7 +280,7 @@ bool mysql_create_view(THD *thd, if (!tbl->table_in_first_from_clause) { if (check_access(thd, SELECT_ACL, tbl->db, - &tbl->grant.privilege, 0, 0) || + &tbl->grant.privilege, 0, 0, test(tbl->schema_table)) || grant_option && check_grant(thd, SELECT_ACL, tbl, 0, 1, 0)) { res= TRUE; |