Recently I had a problem where I renamed a db field to allow for better maintenance (the field name misrepresented it's actual use and conflicted with another use).
In the process, I broke a view that used the table.
MySQL then complained about "...references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them"
The view itself became impossible to edit. However you can access the view definition with the following query.
SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_SCHEMA = 'database_name' AND TABLE_NAME = 'view_name';
In the process, I broke a view that used the table.
MySQL then complained about "...references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them"
The view itself became impossible to edit. However you can access the view definition with the following query.
SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_SCHEMA = 'database_name' AND TABLE_NAME = 'view_name';
Comments
Post a Comment