mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-14853 Grant does not work correctly when table contains...
SYSTEM_INVISIBLE or COMPLETELY_INVISIBLE This commit does multiple things to solve this mdev 1st add field into the parameter of check_column_grant_in_table_ref, so that we can find out field invisibility. 2nd If field->invisible >= INVISIBLE_SYSTEM skip access check and simple grant access.
This commit is contained in:
@ -5877,7 +5877,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 &&
|
||||
check_column_grant_in_table_ref(thd, *actual_table, name, length))
|
||||
check_column_grant_in_table_ref(thd, *actual_table, name, length, fld))
|
||||
fld= WRONG_GRANT;
|
||||
else
|
||||
#endif
|
||||
@ -6054,7 +6054,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
/* Check if there are sufficient access rights to the found field. */
|
||||
if (found && check_privileges &&
|
||||
check_column_grant_in_table_ref(thd, table_ref, name, length))
|
||||
check_column_grant_in_table_ref(thd, table_ref, name, length, found))
|
||||
found= WRONG_GRANT;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user