mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +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
@@ -1002,6 +1002,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
|
||||
switch (ev_type) {
|
||||
case QUERY_EVENT:
|
||||
case QUERY_COMPRESSED_EVENT:
|
||||
{
|
||||
Query_log_event *qe= (Query_log_event*)ev;
|
||||
if (!qe->is_trans_keyword())
|
||||
@@ -1243,6 +1244,12 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
case WRITE_ROWS_EVENT_V1:
|
||||
case UPDATE_ROWS_EVENT_V1:
|
||||
case DELETE_ROWS_EVENT_V1:
|
||||
case WRITE_ROWS_COMPRESSED_EVENT:
|
||||
case DELETE_ROWS_COMPRESSED_EVENT:
|
||||
case UPDATE_ROWS_COMPRESSED_EVENT:
|
||||
case WRITE_ROWS_COMPRESSED_EVENT_V1:
|
||||
case UPDATE_ROWS_COMPRESSED_EVENT_V1:
|
||||
case DELETE_ROWS_COMPRESSED_EVENT_V1:
|
||||
{
|
||||
Rows_log_event *e= (Rows_log_event*) ev;
|
||||
if (print_row_event(print_event_info, ev, e->get_table_id(),
|
||||
|
Reference in New Issue
Block a user