The problem is, after using mysqldump to back up the online database, and then recovering from the MySQL command line to the offline database, the Discovery view becomes a table.
Why is that? This has to be a chat about the MySQL backup recovery mechanism.
In fact, looking at the SQL statements generated by the mysqldump backup, you will see that the view is first restored to a table, then the table is deleted, and a new view is created.
For example, you can see that the V_t_borrow_details table was created first in line 15572, and then the V_t_borrow_details view was created on line 21322.
This is to avoid dependencies, such as having 2 view:v_a, V_b
V_a Reference V_b
If the first build v_a, then it refers to the V_b has not been created, is not built successfully, and first put all the view into a table first, the table is not dependent, will create a success, and then delete the view and create view, this time the reference is in the form of a table or view exists, not because There is a problem with the dependent object.
The view becomes a table, because the error in the recovery process causes the recovery to break, and the subsequent statements are skipping.
View becomes a table when recovering data using MySQL