forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Bug When Copying Tables
- This topic is empty.
-
AuthorPosts
-
-
September 25, 2006 at 11:49 am #9910TomBezMember
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 = 0seems like auto_increment is somehow dropped,
Client: SQLyog 5.2 Beta 4
Server: MySQL 5
-
September 25, 2006 at 12:13 pm #22530peterlaursenParticipant
it happens with 'dublicate structure' not with 'copy table'.
Agreed?
-
September 25, 2006 at 12:26 pm #22531peterlaursenParticipant
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.
-
September 25, 2006 at 1:16 pm #22532TomBezMemberpeterlaursen 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
-
September 25, 2006 at 1:18 pm #22533peterlaursenParticipant
Please check this 'pre-beta5-release':
-
-
AuthorPosts
- You must be logged in to reply to this topic.