mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Binlog compressed
Add some event types for the compressed event, there are: QUERY_COMPRESSED_EVENT, WRITE_ROWS_COMPRESSED_EVENT_V1, UPDATE_ROWS_COMPRESSED_EVENT_V1, DELETE_POWS_COMPRESSED_EVENT_V1, WRITE_ROWS_COMPRESSED_EVENT, UPDATE_ROWS_COMPRESSED_EVENT, DELETE_POWS_COMPRESSED_EVENT. These events inheritance the uncompressed editor events. One of their constructor functions and write function have been overridden for uncompressing and compressing. Anything but this is totally the same. On slave, The IO thread will uncompress and convert them When it receiving the events from the master. So the SQL and worker threads can be stay unchanged. Now we use zlib as compress algorithm. It maybe support other algorithm in the future.
This commit is contained in:
committed by
Kristian Nielsen
parent
27025221fe
commit
640051e06a
@ -1629,7 +1629,7 @@ is_until_reached(binlog_send_info *info, ulong *ev_offset,
|
||||
break;
|
||||
case GTID_UNTIL_STOP_AFTER_TRANSACTION:
|
||||
if (event_type != XID_EVENT &&
|
||||
(event_type != QUERY_EVENT ||
|
||||
(event_type != QUERY_EVENT || /* QUERY_COMPRESSED_EVENT would never be commmit or rollback */
|
||||
!Query_log_event::peek_is_commit_rollback
|
||||
(info->packet->ptr()+*ev_offset,
|
||||
info->packet->length()-*ev_offset,
|
||||
@ -1863,7 +1863,7 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type,
|
||||
return NULL;
|
||||
case GTID_SKIP_TRANSACTION:
|
||||
if (event_type == XID_EVENT ||
|
||||
(event_type == QUERY_EVENT &&
|
||||
(event_type == QUERY_EVENT && /* QUERY_COMPRESSED_EVENT would never be commmit or rollback */
|
||||
Query_log_event::peek_is_commit_rollback(packet->ptr() + ev_offset,
|
||||
len - ev_offset,
|
||||
current_checksum_alg)))
|
||||
|
Reference in New Issue
Block a user