CREATE DATABASE test;
USE test;
CREATE FUNCTION fish() RETURNS TEXT RETURN 'are best';
CREATE VIEW fishy AS SELECT fish();
Use the database "export" function, and tick the box to include functions.
The export order is (1) tables/view, (2) functions/procedures.
You can create a function that refers to non-existent tables/views/functions.
You CANNOT create a view that refers to non-existent functions.
Hence this export file cannot be reimported without manually editing it first
Suggestion: export the routines first.
The same export/import sequence is used when copying/renaming databases, and these processes also fail, for the same reason.
This bug was fixed in repository and will be part of a future release; thanks for reporting.