Skip to content

Commit

Permalink
MDEV-11065: Compressed binary log. Merge code into current 10.2.
Browse files Browse the repository at this point in the history
Conflicts:
	sql/share/errmsg-utf8.txt
  • Loading branch information
knielsen committed Nov 3, 2016
2 parents d665e79 + 56a041c commit b002509
Show file tree
Hide file tree
Showing 30 changed files with 2,079 additions and 123 deletions.
7 changes: 7 additions & 0 deletions client/mysqlbinlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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(),
Expand Down
10 changes: 5 additions & 5 deletions mysql-test/include/binlog_start_pos.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
#
# Format_description_log_event length =
# 19 /* event common header */ +
# 58 /* misc stuff in the Format description header */ +
# 57 /* misc stuff in the Format description header */ +
# number of events +
# 1 /* Checksum algorithm */ +
# 4 /* CRC32 length */
#
# With current number of events = 164,
# With current number of events = 171,
#
# binlog_start_pos = 4 + 19 + 57 + 163 + 1 + 4 = 249.
# binlog_start_pos = 4 + 19 + 57 + 171 + 1 + 4 = 256.
#
##############################################################################

let $binlog_start_pos=249;
let $binlog_start_pos=256;
--disable_query_log
SET @binlog_start_pos=249;
SET @binlog_start_pos=256;
--enable_query_log

2 changes: 1 addition & 1 deletion mysql-test/include/show_binlog_events2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if ($binlog_start)
}
if (!$binlog_start)
{
--let $_binlog_start=249
--let $_binlog_start=256
}
if ($binlog_file)
{
Expand Down
4 changes: 4 additions & 0 deletions mysql-test/r/flush2.result
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ show variables like 'log_bin%';
Variable_name Value
log_bin OFF
log_bin_basename
log_bin_compress OFF
log_bin_compress_min_len 256
log_bin_index
log_bin_trust_function_creators ON
show variables like 'relay_log%';
Expand All @@ -20,6 +22,8 @@ show variables like 'log_bin%';
Variable_name Value
log_bin OFF
log_bin_basename
log_bin_compress OFF
log_bin_compress_min_len 256
log_bin_index
log_bin_trust_function_creators ON
show variables like 'relay_log%';
Expand Down
Loading

0 comments on commit b002509

Please sign in to comment.