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

[expired user #7843]'s profile image [expired user #7843] posted 10 years ago in Import/Export Permalink
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`;..."
ansgar's profile image ansgar posted 10 years ago Permalink
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?
[expired user #7843]'s profile image [expired user #7843] posted 10 years ago Permalink
Got it, Thanks.

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