0

I am using Percona XtraDB cluster 5.5.37. I have run one alter command (to add unique constraint) on node1. But due to duplicate keys,alter command failed on it. But that failed statement passed to remaining nodes 2,3 and error logged like below.

160524 6:08:21 [ERROR] Slave SQL: Error 'Duplicate entry '176-60-FFP-1' for key 'constraint_name'' on query. Default database: 'db'. Query: 'alter table table_name add constraint constraint_name unique (col1, col2, col3,col4)', Error_code: 1062

My question is why its passed to other nodes, when it has failed on first node itself. It should not passed right. Please let me know where i am thinking wrong.

1

ALTER Table is executed using TOI which executed independently on all node parallely w/o waiting for it to complete on base node and then being replicated (this applies only for DML).


Also, I see you are using 5.5 which in general had lot of issues in past. It is good if you can upgrade your setup to 5.6.

  • Thanks @user91862, We are planning to upgrade to 5.6. Please share if there are any steps to follow while 5.6 upgrade. – kasi May 26 '16 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.