NDB Cluster Replication Conflict Resolution NDB$OP_TYPE : This column can be used to obtain the type of operation causing the conflict. If you use this column, define it as shown here: NDB$OP_TYPE ENUM(’WRITE_ROW’, ’UPDATE_ROW’, ’DELETE_ROW’, ’REFRESH_ROW’, ’READ_ROW’) NOT NULL The  WRITE_ROW ,  UPDATE_ROW , and  DELETE_ROW  operation types represent user-initiated operations. REFRESH_ROW  operations are operations generated by conflict resolution in compensating transactions sent back to the originating cluster from the cluster that detected the conflict.  READ_ROW  operations are user-initiated read tracking operations defined with exclusive row locks. NDB$CFT_CAUSE : You can define an optional column  NDB$CFT_CAUSE  which provides the cause of the registered conflict. This column, if used, is defined as shown here: NDB$CFT_CAUSE ENUM(’ROW_DOES_NOT_EXIST’, ’ROW_ALREADY_EXISTS’, ’DATA_IN_CONFLICT’, ’TRANS_IN_CONFLICT’) NOT NULL ROW_DOES_NOT_EXIST  can be reported as the cause for  UPDATE_ROW  and  WRITE_ROW  operations; ROW_ALREADY_EXISTS  can be reported for  WRITE_ROW  events.  DATA_IN_CONFLICT  is reported when a row-based conflict function detects a conflict;  TRANS_IN_CONFLICT  is reported when a transactional conflict function rejects all of the operations belonging to a complete transaction. NDB$ORIG_TRANSID : The  NDB$ORIG_TRANSID  column, if used, contains the ID of the originating transaction. This column should be defined as follows: NDB$ORIG_TRANSID BIGINT UNSIGNED NOT NULL NDB$ORIG_TRANSID  is a 64-bit value generated by  NDB . This value can be used to correlate multiple exceptions table entries belonging to the same conflicting transaction from the same or different exceptions tables. Additional reference columns which are not part of the original table’s primary key can be named colname $OLD  or  colname $NEW .  colname $OLD  references old values in update and delete operations— that is, operations containing  DELETE_ROW  events.  colname $NEW  can be used to reference new values in insert and update operations—in other words, operations using  WRITE_ROW  events,  UPDATE_ROW  events, or both types of events. Where a conflicting operation does not supply a value for a given reference column that is not a primary key, the exceptions table row contains either  NULL , or a defined default value for that column. The  mysql.ndb_replication  table is read when a data table is set up for replication, so the row corresponding to a table to be replicated must be inserted into  mysql.ndb_replication before  the table to be replicated is created. Several status variables can be used to monitor conflict detection. You can see how many rows have been found in conflict by  NDB$EPOCH()  since this replica was last restarted from the current value of the Ndb_conflict_fn_epoch  system status variable. Ndb_conflict_fn_epoch_trans  provides the number of rows that have been found directly in conflict by  NDB$EPOCH_TRANS() .  Ndb_conflict_fn_epoch2  and  Ndb_conflict_fn_epoch2_trans show the number of rows found in conflict by  NDB$EPOCH2()  and  NDB$EPOCH2_TRANS() , respectively. The number of rows actually realigned, including those affected due to their membership in or dependency on the same transactions as other conflicting rows, is given by Ndb_conflict_trans_row_reject_count . 4649 Conflict Detection Status Variables Important