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

Bug When Copying Tables

forums forums SQLyog SQLyog: Bugs / Feature Requests Bug When Copying Tables

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #9910
      TomBez
      Member

      when copying a table than the autoincrement is not propagated.

      from the history:

      Code:
      /*[13:44:46][ 110 ms]*/ create table `logfiles`.`tester` ( `id` int NOT NULL AUTO_INCREMENT UNIQUE , `field1` varchar (250) , PRIMARY KEY ( `id`))
      /*[13:44:57][ 0 ms]*/ show full fields from `logfiles`.`tester`
      /*[13:44:57][ 0 ms]*/ show table status from `logfiles` like 'tester'
      /*[13:45:00][ 0 ms]*/ show keys from `logfiles`.`tester`
      /*[13:45:00][ 47 ms]*/ create table `logfiles`.`tester_copy` ( primary key( `id`) )type=InnoDB select `id`, `field1` from `logfiles`.`tester` where 1 = 0

      seems like auto_increment is somehow dropped,

      Client: SQLyog 5.2 Beta 4

      Server: MySQL 5

    • #22530
      peterlaursen
      Participant

      it happens with 'dublicate structure' not with 'copy table'.

      Agreed?

    • #22531
      peterlaursen
      Participant

      there is actually another bug in the first create statement (I assume it is created with SQLyog GUI):

      “create table `logfiles`.`tester` ( `id` int NOT NULL AUTO_INCREMENT UNIQUE , `field1` varchar (250) , PRIMARY KEY ( `id`)) “

      UNIQUE keyword should not be there when PRIMARY is! You get a UNIQUE index and a PRIMARY key as well and autoincrement 'is linked' to the UNIQUE KEY this way – not the PK. We know that there are issues with this UNIQUE keyword introduced with beta4! One more here is that 'dublicate …' does not handle autoincrement attribute with a UNIQUE (non-PK) KEY.

    • #22532
      TomBez
      Member
      peterlaursen wrote on Sep 25 2006, 02:13 PM:
      it happens with 'dublicate structure' not with 'copy table'.

      Agreed?

      yes, agreed, with copy table the bug does not occure

    • #22533
      peterlaursen
      Participant

      Please check this 'pre-beta5-release':

      http://www.webyog.com/downloads/betas/not_…SQLyog52Ent.exe

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