summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2020-12-04 08:50:20 -0800
committerIgor Babaev <igor@askmonty.org>2020-12-04 08:53:40 -0800
commit50d7eddc3d21b9bad66db6961900e3222a6fa356 (patch)
tree07448e51ee70c4987d42db7f7fc840c609ba94c5 /sql/sql_base.cc
parent1eb59c307de163b507efade1fc372d8ff2bb94b7 (diff)
downloadmariadb-git-50d7eddc3d21b9bad66db6961900e3222a6fa356.tar.gz
MDEV-24314 Unexpected error message when selecting from view that uses
mergeable derived table Do not check privileges for derived tables/CTEs and their fields. Approved by Oleksandr Byelkin <sanja@mariadb.com>
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 590073bbed7..622273648a1 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5795,6 +5795,7 @@ find_field_in_table_ref(THD *thd, TABLE_LIST *table_list,
#ifndef NO_EMBEDDED_ACCESS_CHECKS
/* Check if there are sufficient access rights to the found field. */
if (check_privileges &&
+ !table_list->is_derived() &&
check_column_grant_in_table_ref(thd, *actual_table, name, length))
fld= WRONG_GRANT;
else