mysql - Truncate table & insert ignore result in a #1062 - Duplicate entry for key 'PRIMARY' error -


i have strange thing happening, query:

truncate table `cms_clients`; insert ignore `cms_clients` (`id`,`col1`,`col2`,`col3`) values (4,null,null,null), (5,null,null,null), (6,null,null,null), (7,null,null,null), (8,null,null,null); 

the primary key have id, , though have truncate , insert ignore in query still results in error: #1062 - duplicate entry '4' key 'primary' error when previews error , view table can see rows 4 & 5 inserted, row 6 triggered error; when manually delete rows 4 , 5 , run query again same error on different row: #1062 - duplicate entry '6' key 'primary' , same previous 1 when view table can see rows 4,5,6 , 7 inserted believe row 8 triggering error.

this table's schema:

create table `cms_clients` (  `id` bigint(20) not null auto_increment,  `col1` varchar(200) not null,  `col2` varchar(180) not null,  `col3` varchar(180) not null,  primary key (`id`) ) engine=myisam auto_increment=8 default charset=latin1 

am doing wrong or mysql starting act bit strange?

edit tried on computer , it's working fine, think issue in mysql not query.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -