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

Backup of MySQL views

User, date Message
Written by csiqojerncjsa
3 years ago
Category: General
12 posts since Sun, 10 Jul 11
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

Written by csiqojerncjsa
3 years ago
12 posts since Sun, 10 Jul 11
Sorry, forgot: latest available HeidiSQL (6.0.0.3977), MySQL 5.5.17 and 5.5.18.

Robert
Written by PincushionMan
3 years ago
3 posts since Tue, 24 Jan 12
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.
Written by ansgar
3 years ago
4987 posts since Fri, 07 Apr 06
See and starr issue #2625
 

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