summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-01-16 20:16:35 +0100
committerSergei Golubchik <sergii@pisem.net>2012-01-16 20:16:35 +0100
commit38e3ae155db08ab2e9e5c267f05f89bec0542b33 (patch)
tree7289bbef1ba3f495aa5c7cdb7d0a3f993a5bbc80 /sql/sql_view.cc
parentc56483d972d023105fbcb0f47af0042ee092657c (diff)
parented1ba992c1d3c3ecbe6a2769c51ceb5d27606d3b (diff)
downloadmariadb-git-38e3ae155db08ab2e9e5c267f05f89bec0542b33.tar.gz
mysql-5.5 merge
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index d39ec82aad1..a307ebecca1 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -1314,9 +1314,10 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
DBUG_ASSERT(view_tables == NULL || view_tables->security_ctx == NULL);
- if (check_table_access(thd, SELECT_ACL, view_tables, FALSE,
- UINT_MAX, TRUE) &&
- check_table_access(thd, SHOW_VIEW_ACL, table, FALSE, UINT_MAX, TRUE))
+ if (check_table_access(thd, SELECT_ACL, view_tables,
+ FALSE, UINT_MAX, TRUE) ||
+ check_table_access(thd, SHOW_VIEW_ACL, &view_no_suid,
+ FALSE, UINT_MAX, TRUE))
{
my_message(ER_VIEW_NO_EXPLAIN, ER(ER_VIEW_NO_EXPLAIN), MYF(0));
goto err;