1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge remote-tracking branch 'github/bb-11.4-release' into bb-11.8-serg

This commit is contained in:
Sergei Golubchik
2025-04-27 11:33:27 +02:00
committed by Oleksandr Byelkin
430 changed files with 14769 additions and 6751 deletions

View File

@@ -8508,19 +8508,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,