"alter table t truncate partition p2;" replicate failed

Bug #1219605 reported by dennis.gao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Fix Released
High
Seppo Jaakola
5.6
Fix Released
High
Seppo Jaakola
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned

Bug Description

galera-23.2.4 + mysql-5.5.29_wsrep_23.7.3.patch
reappear it as follow steps:

1. execute on node 1, and node 2 can find the new table t:
    create table t(id int) partition by range(id)(partition p1 values less than(10), partition p2 values less than(20));
2. execute on node1, success
    insert into t values(1),(10);
3. so we can select the value from node1 and node2. Execute on both nodes, result is {1,10}
     select * from t;
4. execute this statement on node1, and it is OK.
    alter table t truncate partition p2; -- execute this statement on node1
5. but query the values, the result is not the same as expected: result from node1 is {1}, but node2 is {1,10}
     select * from t;

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Noticed following (along with failure of replication of alter table).

a) No TOI is done for truncate partition but it is done for other
alter operations on the table.

b)
Also saw this in the logs: (with wsrep-debug and debug=1 in
wsrep-provider-options)

140226 17:09:21 [Note] WSREP: Skipping empty log_xid: (null)
140226 17:09:44 [Note] [Debug] WSREP: galera/src/wsrep_provider.cpp:galera_post_rollback():362: trx 18446744073709551615 not found
140226 17:09:46 [Note] [Debug] WSREP: galera/src/wsrep_provider.cpp:galera_post_rollback():362: trx 18446744073709551615 not found
140226 17:10:15 [Note] WSREP: Skipping empty log_xid: (null)
140226 17:10:16 [Note] [Debug] WSREP: galera/src/wsrep_provider.cpp:galera_post_rollback():362: trx 18446744073709551615 not found
140226 17:11:23 [Note] [Debug] WSREP: galera/src/wsrep_provider.cpp:galera_post_rollback():362: trx 18446744073709551615 not found

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

First issue, I can see here, is that if log_bin is disabled, no transactions on partition table will replicate

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Yes, I can confirm non-replication of rows when binlogging is disabled.

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

Pushed fixes for the first issue in revisions:
wsrep-5.6: http://bazaar.launchpad.net/~codership/codership-mysql/5.6/revision/4046
wsrep-5.5: http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3956

This fix enables replication of InnoDB partition tables, when log_bin is OFF

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

truncate partition command was not declared to run under TO isolation. Fix for this was pushed in revisions:

wsrep-5.6: http://bazaar.launchpad.net/~codership/codership-mysql/5.6/revision/4048
wsrep-5.5: http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3957

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1434

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.