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

Backup of MySQL views

csiqojerncjsa posted 3 years ago in General
Hi @all !

I backed up my db containing tables (OK, clear), procedures and view. Backup was made to single files for every db object. When looking at the backedup SQL for my views i doubt it can be reimported.

# Dumping structure for view xxx
DROP VIEW IF EXISTS xxx;
# Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS xxx;

And after that the sql of the view is stored. No "CREATE VIEW"-Statement.

So wheres the error in my brain ;)

Thx
Robert

csiqojerncjsa posted 3 years ago
Sorry, forgot: latest available HeidiSQL (6.0.0.3977), MySQL 5.5.17 and 5.5.18.

Robert
PincushionMan posted 3 years ago
csiqojerncjsa,

I have this error also. This error does not matter if your version of MySQL is 5.0, 5.1, or 5.5. The workaround is to look for the SELECT statement after DROP TABLE IF EXISTS xxx and type this right in front of it:
CREATE VIEW xxx AS

They broke this in the nightlys, hoping to fix another issue with creating views. I believe the problem stems from not having a CREATE VIEW tab, and the developer just pasting the select statement into the SQL export. Hope that helps. FYI, this is still broken in the latest nightly 6.0.0.4036.
ansgar posted 3 years ago
See and starr issue #2625

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