8 Jan
2024
8 Jan
'24
10:50 p.m.
Hello Sergei! On Fri, 5 Jan 2024 at 18:10, Sergei Golubchik <serg@mariadb.org> wrote:
@@ -7798,6 +7798,12 @@ int get_schema_key_period_usage_record(THD *thd, TABLE_LIST *tables, if (!period_name) return 0;
+#ifndef NO_EMBEDDED_ACCESS_CHECKS + check_grant(thd, TABLE_ACLS, tables, 1, 1, 1); + if ((tables->grant.all_privilege() & ~SELECT_ACL & TABLE_ACLS) == NO_ACL) + return 0; +#endif
Compare with get_schema_key_column_usage_record() above your get_schema_key_period_usage_record().
Perhaps you can also check `thd->col_access` and avoid check_grant()?
The problem is all the same to the one you have fixed in 547dfc0e01. That combination of if+check is the only way it worked correctly in all the cases. -- Yours truly, Nikita Malyavin