mysql Ver 8.0.18 for el7 on x86_64 (MySQL Community Server - GPL)
Thanks for this solution but isn't 'schema' a reserved word?
select ...
ROUTINE_SCHEMA AS `schema`,
mysql> select schema from objects;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from objects' at line 1
When I change the view to ...
select ... ROUTINE_SCHEMA AS `schema_name`,
... it works fine.