Revert "MXS-1075: added blr_fetch_mariadb_gtid() routine"

This reverts commit b0afff73a1b9b1eacc617408d92d5117b7676f0e.
This commit is contained in:
MassimilianoPinto
2017-03-08 08:57:59 +01:00
parent e8161bbb08
commit 656a38096c
3 changed files with 2 additions and 28 deletions

View File

@ -2734,7 +2734,6 @@ static void mariadb_gtid_info_free(MARIADB_GTID_INFO *in)
if (in)
{
MXS_FREE(in->gtid);
MXS_FREE(in->file);
MXS_FREE(in);
}
}
@ -2754,11 +2753,9 @@ static MARIADB_GTID_INFO *mariadb_gtid_info_dup(const MARIADB_GTID_INFO *in)
{
MXS_FREE(rval);
MXS_FREE(gtid);
MXS_FREE(file);
return NULL;
}
rval->gtid = gtid;
rval->file = file;
rval->start = in-> start;
rval->end = in->end;

View File

@ -3311,7 +3311,6 @@ bool blr_save_mariadb_gtid(ROUTER_INSTANCE *inst)
MARIADB_GTID_INFO gtid_info;
gtid_info.gtid = inst->pending_transaction.gtid;
gtid_info.file = inst->binlog_name;
gtid_info.start = inst->pending_transaction.start_pos;
gtid_info.end = inst->pending_transaction.end_pos;
@ -3334,23 +3333,3 @@ bool blr_save_mariadb_gtid(ROUTER_INSTANCE *inst)
return true;
}
/**
* Get MariaDB GTID frim repo
*
* @param inst The router instance
* @return Found data or NULL
*/
MARIADB_GTID_INFO *blr_fetch_mariadb_gtid(ROUTER_INSTANCE *inst, char *gtid)
{
if (!gtid)
{
return NULL;
}
else
{
return (MARIADB_GTID_INFO *)hashtable_fetch(inst->gtid_repo,
gtid);
}
}

View File

@ -166,7 +166,6 @@ static int blr_slave_send_heartbeat(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave
static int blr_set_master_ssl(ROUTER_INSTANCE *router, CHANGE_MASTER_OPTIONS config, char *error_message);
static int blr_slave_read_ste(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, uint32_t fde_end_pos);
static GWBUF *blr_slave_read_fde(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave);
extern MARIADB_GTID_INFO *blr_fetch_mariadb_gtid(ROUTER_INSTANCE *inst, char *gtid);
void poll_fake_write_event(DCB *dcb);
@ -2298,9 +2297,8 @@ blr_slave_binlog_dump(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue
/* Shall we avoid the lookup if file & pos is set? */
/* Fetch the GTID from the storage */
MARIADB_GTID_INFO *f_gtid = blr_fetch_mariadb_gtid(router,
MARIADB_GTID_INFO *f_gtid = hashtable_fetch(router->gtid_repo,
slave->mariadb_gtid);
/* Not Found */
if (!f_gtid)
{