0

This issue is showing it a duplicate key, but when I verify I could understand that one column having varchar(5) and the insert is having more than 5 character, normally it will get truncated and will get inset. But here it is giving error.

Error 'Duplicate entry '7565371' for key 'PRIMARY'' on query. Default database: 'dbname'. Query: 'insert into dbname.tablename .....

1
  • If your data doesn't fit into your database then you've got more problems than just replication.
    – symcbean
    Jun 12, 2012 at 10:25

1 Answer 1

1

The insert may have more than 5 characters but I'd say that after it's truncated the 5 characters remaining are what is causing your duplicate key. I'd also suggest not using a varchar for such a small field, as the overhead is just not worth the minuscule storage you're saving.

Not the answer you're looking for? Browse other questions tagged .