summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authoraelkin/elkin@andrepl.(none) <>2007-03-24 14:14:46 +0200
committeraelkin/elkin@andrepl.(none) <>2007-03-24 14:14:46 +0200
commit8cfa54eb3984728b9797c2ce97fade94a0c16346 (patch)
treed23f843810a3bd5147511571603564e0951f73f9 /sql/sql_parse.cc
parentddb98f8d4e7ed7b11e4d58a35967abae6e38a6c2 (diff)
parent93db05429f879098d48c5cc1c9e97940ee921e3d (diff)
downloadmariadb-git-8cfa54eb3984728b9797c2ce97fade94a0c16346.tar.gz
Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel
into andrepl.(none):/home/elkin/MySQL/MAIN/5.0-marvel-bug23333_sf_side_eff_binlog
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 52b17c23b92..486942a8bb9 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -5164,7 +5164,10 @@ bool check_single_table_access(THD *thd, ulong privilege,
goto deny;
/* Show only 1 table for check_grant */
- if (grant_option && check_grant(thd, privilege, all_tables, 0, 1, 0))
+ if (grant_option &&
+ !(all_tables->belong_to_view &&
+ (thd->lex->sql_command == SQLCOM_SHOW_FIELDS)) &&
+ check_grant(thd, privilege, all_tables, 0, 1, 0))
goto deny;
thd->security_ctx= backup_ctx;