forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Error In The Order Of Statements In Batch Exports
- This topic is empty.
-
AuthorPosts
-
-
August 5, 2005 at 8:07 pm #9154publicoutMember
Hi,
I'm of course very grateful for this product and time it has saved me over using the commandline mysql interface, but I came across a minor issue that I hope will be easy to fix.
When running an exported schema Mysql threw an Error Code : 1005, which I was able to resolve by simply re-ordering the create statements in the batch exported sql file. Mysql wanted all the tables that contained Primary Keys that were used in Foreign Key references to be created before those tables with Foreign Keys.
Could the batch export code pay attention to this particular detail?
—
Publicout
-
August 5, 2005 at 8:46 pm #18870peterlaursenParticipant
I can confirm this bug.
Actually I tried to attach a small zip illustrating it, but it won't let me!
However I experience that the backupwizard sorts the create statements correctly. Further there is here a CONSTRAINTS_CHECK = 0 -option. But of course this is only available in Enterprise version.
-
August 5, 2005 at 8:49 pm #18871peterlaursenParticipant
I sent the two small files to Ritesh instead.
-
August 5, 2005 at 9:17 pm #18872peterlaursenParticipant
Tried with this DB (shown i Access “relations” view”).
here you will have to set FOREIGN KEYS CHECK = 0 in Backup tool.
So it probably was a mere coincidence that with only two tables they came in the right order.
Actually I don't know if this is a bug. There can be DB-design's where no sort order will do and you will have to use FOREIGN KEYS CHECK = 0. A solution could be always using FOREIGN KEYS CHECK = 0 with InnoDB from export tool. However then it must be user's responsibility to always exprot related tables! Quite a difficult choice I believe …
I have the Enterprise version 😀
-
August 6, 2005 at 7:43 am #18873RiteshMember
You have to check SET FOREIGN_KEY_CHECKS=0 in both the options.
-
August 6, 2005 at 10:35 am #18874peterlaursenParticipant
I'm ashamed! 🙁
Totally overlooked that that setting was there too in export tool.
-
-
AuthorPosts
- You must be logged in to reply to this topic.