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

Copy Table/Data – Drops Auto Increment

forums forums SQLyog SQLyog: Bugs / Feature Requests Copy Table/Data – Drops Auto Increment

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #7758
      metrocard
      Member

      Howdy.

      First off, I love this program. It meets all of my needs to a “T,” and it should become the defacto standard to replace MySql – Front.

      The bug? I performed a table copy (structure only) and used the default name generated by the program, and the new new table was exactly the same with the exception of my primary key, which had not had the “auto increment” value carried over.

      Keep up the great work!

    • #13908
      CalEvans
      Member

      Let me restate the problem to make sure I understand it. (Good chance I don't!) 🙂

      You copied a table structure over to a new table.

      The original table had an autoincrement field and the next value was not 0.

      The new table had an autoincrement field but the next value was 0.

      If this is correct then the problem is a misunderstanding. What SQLyog does when you copy a table structure only is it creates the new CREATE TABLE DDL and then executes it, just as if you had done it by hand only giving the table a new name. Thus the autoincrement value *SHOULD* be 0. (NOTE: This wouldn't happen if you copied the data also simply because it would have issued the appropriate number of INSERT's.)

      So, the program is actually doing what it's supposed to do. A question for the developers is do you feel it is appropriate to add an option into the COPY TABLE that would automatically set the next autoincrement value? (There is a command for it but I forget it at the moment.)

      IMHO, no. But that's just me.

      HTH,

      =C=

Viewing 1 reply thread
  • You must be logged in to reply to this topic.