Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Error In The Order Of Statements In Batch Exports

forums forums SQLyog SQLyog: Bugs / Feature Requests Error In The Order Of Statements In Batch Exports

  • This topic is empty.
Viewing 5 reply threads
  • Author
    Posts
    • #9154
      publicout
      Member

      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

    • #18870
      peterlaursen
      Participant

      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.

    • #18871
      peterlaursen
      Participant

      I sent the two small files to Ritesh instead.

    • #18872
      peterlaursen
      Participant

      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 😀

    • #18873
      Ritesh
      Member

      You have to check SET FOREIGN_KEY_CHECKS=0 in both the options.

    • #18874
      peterlaursen
      Participant

      I'm ashamed! 🙁

      Totally overlooked that that setting was there too in export tool.

Viewing 5 reply threads
  • You must be logged in to reply to this topic.