diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-08-17 18:38:30 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-09-04 10:33:50 +0200 |
commit | 5018a6606f1c863b197812e3f3c1b8b18134c638 (patch) | |
tree | fdfb6737e92871095ba31dc30f1fb4a9641abc13 /sql/rpl_utility.cc | |
parent | 08687f7ef3ccb59ca78a3d037e9db5a514145d64 (diff) | |
download | mariadb-git-5018a6606f1c863b197812e3f3c1b8b18134c638.tar.gz |
cleanup: Log_event::read_log_event()
There are three Log_event::read_log_event() methods:
1. read the event image from IO_CACHE into String
2. create Log_event from the in-memory event image
3. read the event image from IO_CACHE and create Log_event
The 3rd was reading event image into memory and invoking the 2nd to
create Log_event. Now the 3rd also uses the 1st to read the event image
from IO_CACHE into memory, instead of duplicating its functionality.
Diffstat (limited to 'sql/rpl_utility.cc')
-rw-r--r-- | sql/rpl_utility.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc index ac49a1bf08f..0f244267563 100644 --- a/sql/rpl_utility.cc +++ b/sql/rpl_utility.cc @@ -1200,9 +1200,9 @@ bool event_checksum_test(uchar *event_buf, ulong event_len, uint8 alg) DBUG_ASSERT(event_buf[EVENT_TYPE_OFFSET] == FORMAT_DESCRIPTION_EVENT); event_buf[FLAGS_OFFSET]= (uchar) flags; } - res= !(computed == incoming); + res= DBUG_EVALUATE_IF("simulate_checksum_test_failure", TRUE, computed != incoming); } - return DBUG_EVALUATE_IF("simulate_checksum_test_failure", TRUE, res); + return res; } #if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION) |