1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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>
This commit is contained in:
Igor Babaev
2020-12-04 08:50:20 -08:00
parent 1eb59c307d
commit 50d7eddc3d
4 changed files with 69 additions and 0 deletions

View File

@ -6639,6 +6639,9 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
bool check_single_table_access(THD *thd, ulong privilege, TABLE_LIST *tables,
bool no_errors)
{
if (tables->is_derived())
return 0;
Switch_to_definer_security_ctx backup_sctx(thd, tables);
const char *db_name;