diff options
author | Martin Hansson <mhansson@mysql.com> | 2008-09-03 16:45:40 +0200 |
---|---|---|
committer | Martin Hansson <mhansson@mysql.com> | 2008-09-03 16:45:40 +0200 |
commit | a43242ea6d5496d6e26dd1afbe7851e07308b168 (patch) | |
tree | fa2d69a1865665c76918ce941dbff3ea022709da /sql/sql_cache.cc | |
parent | 4c318bf6e85ec1321b4f099e3bb829a6abb74d0d (diff) | |
download | mariadb-git-a43242ea6d5496d6e26dd1afbe7851e07308b168.tar.gz |
Bug#36086: SELECT * from views don't check column grants
This patch also fixes bugs 36963 and 35600.
- In many places a view was confused with an anonymous derived
table, i.e. access checking was skipped. Fixed by introducing a
predicate to tell the difference between named and anonymous
derived tables.
- When inserting fields for "SELECT * ", there was no
distinction between base tables and views, where one should be
made. View privileges are checked elsewhere.
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r-- | sql/sql_cache.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 375ffc882b4..f5566acbc6f 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -2633,7 +2633,7 @@ Query_cache::register_tables_from_list(TABLE_LIST *tables_used, tables_used; tables_used= tables_used->next_global, n++, block_table++) { - if (tables_used->derived && !tables_used->view) + if (tables_used->is_anonymous_derived_table()) { DBUG_PRINT("qcache", ("derived table skipped")); n--; |