This is a follow-up for
Different engines check user privileges for some reasons. For example, InnoDB and XtraDB often check PROCESS privilege in the I_S code.
All these checks always use invoker's privileges, and don't respect SQL SECURITY DEFINER of views.
We should extract the fix for
MDEV-7574 from the CONNECT code and make it into an easy to use function that all plugins can use. And change plugins to use it.