distal-attribute
distal-attribute
distal-attribute
distal-attribute

bug report: get "DROP TABLE..." when export view

User, date Message
Written by mouth
5 months ago
Category: Import/Export
5 posts since Tue, 04 Mar 14
right click DB
-> Export database as SQL
-> Database=Create, Table=Create, Data=INSERT, Output=Single .sql file, Filename=...
-> Export
The DDL of view in .sql file is:
"DROP TABLE IF EXISTS `v_order_part`;..."
The correct should be:
"DROP VIEW IF EXISTS `v_order_part`;..."
Written by ansgar
5 months ago
4940 posts since Fri, 07 Apr 06
Views have to be created as tables first in an SQL export, then, when all tables have been created, the "view-table" has to be dropped and the real view is created. This is all due to dependencies between views and tables. When a view references a not yet exported table, you would get a "table xyz does not exist" when creating the view earlier as the referenced table. So, there is a DROP TABLE found, but there should also be a DROP VIEW, isn't it?
Written by mouth
5 months ago
5 posts since Tue, 04 Mar 14
Got it, Thanks.
 

Please login to leave a reply, or register at first.