The first_enc_event_pos was not set in one case

The first_enc_event_pos was not set in one case
This commit is contained in:
MassimilianoPinto
2016-10-03 11:41:57 +02:00
parent d9bcf6a775
commit dcc38b44a9
2 changed files with 11 additions and 13 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 201nMariaDB Corporation Ab * Copyright (c) 2016 MariaDB Corporation Ab
* *
* Use of this software is governed by the Business Source License included * Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl. * in the LICENSE.TXT file and at www.mariadb.com/bsl.
@ -2374,11 +2374,7 @@ blr_slave_catchup(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, bool large)
memcpy(new_encryption_ctx->nonce, record_ptr + 1 + BLRM_KEY_VERSION_LENGTH, BLRM_NONCE_LENGTH); memcpy(new_encryption_ctx->nonce, record_ptr + 1 + BLRM_KEY_VERSION_LENGTH, BLRM_NONCE_LENGTH);
/* Save current first_enc_event_pos */ /* Save current first_enc_event_pos */
if (slave->encryption_ctx) new_encryption_ctx->first_enc_event_pos = hdr.next_pos;
{
SLAVE_ENCRYPTION_CTX *slave_enc_ctx = (SLAVE_ENCRYPTION_CTX *)slave->encryption_ctx;
new_encryption_ctx->first_enc_event_pos = slave_enc_ctx->first_enc_event_pos;
}
/* set the encryption ctx into slave */ /* set the encryption ctx into slave */
slave->encryption_ctx = new_encryption_ctx; slave->encryption_ctx = new_encryption_ctx;
@ -2387,12 +2383,14 @@ blr_slave_catchup(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, bool large)
slave->binlogfile, slave->binlogfile,
(unsigned long) hdr.next_pos); (unsigned long) hdr.next_pos);
} }
else
{
MXS_INFO("Found ignorable event [%s] of size %lu while reading binlog %s at %lu", MXS_INFO("Found ignorable event [%s] of size %lu while reading binlog %s at %lu",
blr_get_event_description(router, hdr.event_type), blr_get_event_description(router, hdr.event_type),
(unsigned long)hdr.event_size, (unsigned long)hdr.event_size,
slave->binlogfile, slave->binlogfile,
(unsigned long) slave->binlog_pos); (unsigned long) slave->binlog_pos);
}
/* set next pos */ /* set next pos */
slave->binlog_pos = hdr.next_pos; slave->binlog_pos = hdr.next_pos;