mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +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
@@ -5681,6 +5681,12 @@ void thd_exit_cond(MYSQL_THD thd, const PSI_stage_info *stage,
|
||||
#define THD_EXIT_COND(P1, P2) \
|
||||
thd_exit_cond(P1, P2, __func__, __FILE__, __LINE__)
|
||||
|
||||
inline bool binlog_should_compress(ulong len)
|
||||
{
|
||||
return opt_bin_log_compress &&
|
||||
len >= opt_bin_log_compress_min_len;
|
||||
}
|
||||
|
||||
#endif /* MYSQL_SERVER */
|
||||
|
||||
#endif /* SQL_CLASS_INCLUDED */
|
||||
|
Reference in New Issue
Block a user