mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#12662190:COM_COMMIT IS NOT INCREMENTED FROM THE BINARY LOGS ON SLAVE, COM_BEGIN IS
PROBLEM: -------- When binary log statements are replayed on the slave, BEGIN is represented in com_counters but COMMIT is not. Similarly in 'ROW' based replication 'INSERT','UPDATE',and 'DELETE' com_counters are not getting incremented when the binary log statements are replayed at slave. ANALYSIS: --------- In 'ROW' based replication for COMMIT,INSERT,UPDATE and DELETE operations following special events are invoked. Xid_log_event,Write_rows_log_event,Update_rows_log_event,Update_rows_log_event. The above mentioned events doesn't go through the parser where the 'COM_COUNTERS' are incremented. FIX: ----- Increment statements are added at appropriate events. Respective functions are listed below. 'Xid_log_event::do_apply_event' 'Write_rows_log_event::do_before_row_operations' 'Update_rows_log_event::do_before_row_operations' 'Delete_rows_log_event::do_before_row_operations' sql/log_event.cc: Added code to increment counts for 'COM_INSERT','COM_UPDATE', 'COM_DELETE' and 'COM_COMMIT'during ROW based replicaiton
This commit is contained in:
@ -49,6 +49,10 @@ A B
|
||||
A I
|
||||
X Y
|
||||
X Z
|
||||
include/assert.inc [Counter for COM_COMMIT is consistent with the number of actual commits]
|
||||
include/assert.inc [Counter for COM_INSERT is consistent with the number of actual inserts]
|
||||
include/assert.inc [Counter for COM_DELETE is consistent with the number of actual deletes]
|
||||
include/assert.inc [Counter for COM_UPDATE is consistent with the number of actual updates]
|
||||
UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N';
|
||||
SELECT * FROM t1 ORDER BY c1,c2;
|
||||
C1 C2
|
||||
|
@ -49,6 +49,10 @@ A B
|
||||
A I
|
||||
X Y
|
||||
X Z
|
||||
include/assert.inc [Counter for COM_COMMIT is consistent with the number of actual commits]
|
||||
include/assert.inc [Counter for COM_INSERT is consistent with the number of actual inserts]
|
||||
include/assert.inc [Counter for COM_DELETE is consistent with the number of actual deletes]
|
||||
include/assert.inc [Counter for COM_UPDATE is consistent with the number of actual updates]
|
||||
UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N';
|
||||
SELECT * FROM t1 ORDER BY c1,c2;
|
||||
C1 C2
|
||||
|
Reference in New Issue
Block a user