1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge branch '10.6' into 10.11

This commit is contained in:
Oleksandr Byelkin
2025-04-21 11:23:11 +02:00
40 changed files with 446 additions and 115 deletions

View File

@@ -8433,19 +8433,13 @@ bool check_grant(THD *thd, privilege_t want_access, TABLE_LIST *tables,
/*
If sequence is used as part of NEXT VALUE, PREVIOUS VALUE or SELECT,
we need to modify the requested access rights depending on how the
sequence is used.
the privilege will be checked in ::fix_fields().
Direct SELECT of a sequence table doesn't set t_ref->sequence, so
privileges will be checked normally, as for any table.
*/
if (t_ref->sequence &&
!(want_access & ~(SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL)))
{
/*
We want to have either SELECT or INSERT rights to sequences depending
on how they are accessed
*/
orig_want_access= ((t_ref->lock_type >= TL_FIRST_WRITE) ?
INSERT_ACL : SELECT_ACL);
}
continue;
const ACL_internal_table_access *access=
get_cached_table_access(&t_ref->grant.m_internal,