From a43242ea6d5496d6e26dd1afbe7851e07308b168 Mon Sep 17 00:00:00 2001 From: Martin Hansson Date: Wed, 3 Sep 2008 16:45:40 +0200 Subject: 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. --- sql/sql_cache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_cache.cc') 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--; -- cgit v1.2.1