diff options
author | unknown <gluh@mysql.com/gluh.(none)> | 2006-07-25 17:23:25 +0500 |
---|---|---|
committer | unknown <gluh@mysql.com/gluh.(none)> | 2006-07-25 17:23:25 +0500 |
commit | 9955388a459cf976796372633497c783eafdf48b (patch) | |
tree | d9933578d1cbee2ab94159c8d1ab7352a08775ab /sql/table.h | |
parent | 313253190ff270f17226b40bf30f7f46089458c2 (diff) | |
download | mariadb-git-9955388a459cf976796372633497c783eafdf48b.tar.gz |
Bug#20543 select on information_schema strange warnings, view, different schemas/users
The fix is: if user has privileges to view fields and user has any
(insert,select,delete,update) privileges on underlying view
then 'show fields' and select from I_S.COLUMNS table are sucsessful.
mysql-test/r/information_schema_db.result:
Bug#20543 select on information_schema strange warnings, view, different schemas/users
test result
mysql-test/t/information_schema_db.test:
Bug#20543 select on information_schema strange warnings, view, different schemas/users
test case
sql/sql_acl.cc:
Bug#20543 select on information_schema strange warnings, view, different schemas/users
checked that user has privileges on underlying view and if it's true
set allowed_show to true for top view.
sql/sql_show.cc:
Bug#20543 select on information_schema strange warnings, view, different schemas/users
removed unnecessary rights check.'tables->allowed_show' check is used instead
sql/sql_view.cc:
Bug#20543 select on information_schema strange warnings, view, different schemas/users
skip the check of SHOW_VIEW_ACL privilege on underlying view. It is done later during
execution of find_field_in_table_ref function.
sql/table.h:
Bug#20543 select on information_schema strange warnings, view, different schemas/users
'allowed_show' is set during rights check for view. If true then user has privileges
for 'show create view', etc
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h index eb34867c390..41ab7e7bec8 100644 --- a/sql/table.h +++ b/sql/table.h @@ -569,6 +569,7 @@ typedef struct st_table_list tables. Unlike 'next_local', this in this list views are *not* leaves. Created in setup_tables() -> make_leaves_list(). */ + bool allowed_show; st_table_list *next_leaf; Item *where; /* VIEW WHERE clause condition */ Item *check_option; /* WITH CHECK OPTION condition */ |