mirror of
https://github.com/MariaDB/server.git
synced 2025-07-24 19:42:23 +03:00
MDEV-13439: Database permissions are not enough to run a subquery with GROUP BY within a view
The bug is result adding ability to have derived tables inside views. Fixed checks should be a switch between view/derived or select derived and information schema.
This commit is contained in:
@ -7594,8 +7594,11 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
|
||||
/*
|
||||
It is subquery in the FROM clause. VIEW set t_ref->derived after
|
||||
table opening, but this function always called before table opening.
|
||||
|
||||
NOTE: is_derived() can't be used here because subquery in this case
|
||||
the FROM clase (derived tables) can be not be marked yet.
|
||||
*/
|
||||
if (!t_ref->referencing_view)
|
||||
if (t_ref->is_anonymous_derived_table() || t_ref->schema_table)
|
||||
{
|
||||
/*
|
||||
If it's a temporary table created for a subquery in the FROM
|
||||
|
Reference in New Issue
Block a user