MDEV-7574 Security definer views don't work with CONNECT ODBC tables
Instead of checking user's privileges with check_access(), use the cached value in table->grant.privilege instead - it is correctly set to the invoker or definer, depending on SQL SECURITY mode. Continue to use check_access() for DDLs when table->grant.privilege may be not set (but these cases are only possible on tables, never for views). (patch originally by Alexander Barkov)
Showing
Please register or sign in to comment