When attempting to export a view as SQL, the view is created as a table and then a view. The problem that I have is that, instead of creating the view, the select statement is just executed. In the SQL export, I noticed this:
USING `test`
-- Dumping structure for view test.myview
DROP VIEW IF EXISTS `myview`
-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `myview`
SELECT * FROM mytable ORDER BY mycolumn;
The problem is that the SELECT statement is executed instead of creating my view. My thought is that the coder(s) is(are) just grabbing the data from the Select statement area of the View tab, as though it was the information available in the CREATE code tabs of Stored Routines and tables.
The workaround I found is to add
CREATE VIEW myview AS
in front of the SELECT statement. Yes, I know that totally ignores Algorithm and that other option, but it works for me.
Actually, the trigger window looks similar, and those create statements work, so maybe the issue lies in an area that handles both?