Fixed compiler issue on connecting to server binlog using binlog position or gtid.
This commit is contained in:
@ -154,6 +154,16 @@ unsigned long Binary_log::get_position(std::string &filename)
|
||||
return m_binlog_position;
|
||||
}
|
||||
|
||||
int Binary_log::connect()
|
||||
{
|
||||
return m_driver->connect();
|
||||
}
|
||||
|
||||
int Binary_log::connect(const boost::uint64_t binlog_pos)
|
||||
{
|
||||
return m_driver->connect(binlog_pos);
|
||||
}
|
||||
|
||||
int Binary_log::connect(const Gtid gtid)
|
||||
{
|
||||
return m_driver->connect(gtid);
|
||||
|
||||
@ -76,7 +76,9 @@ public:
|
||||
Dummy_driver() : Binary_log_driver("", 0) {}
|
||||
virtual ~Dummy_driver() {}
|
||||
|
||||
virtual int connect(Gtid gtid = Gtid()) { return 1; }
|
||||
virtual int connect() { return 1; }
|
||||
virtual int connect(const Gtid gtid) { return 1; }
|
||||
virtual int connect(const boost::uint64_t binlog_pos) { return 1;}
|
||||
|
||||
virtual int wait_for_next_event(mysql::Binary_log_event **event) {
|
||||
return ERR_EOF;
|
||||
@ -94,11 +96,11 @@ public:
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
virtual int fetch_server_version(const std::string& user,
|
||||
virtual int fetch_server_version(const std::string& user,
|
||||
const std::string& passwd,
|
||||
const std::string& host,
|
||||
const std::string& host,
|
||||
long port)
|
||||
{
|
||||
{
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
@ -124,7 +126,9 @@ public:
|
||||
Binary_log(system::Binary_log_driver *drv, std::string);
|
||||
~Binary_log() {}
|
||||
|
||||
int connect(Gtid gtid = Gtid());
|
||||
int connect();
|
||||
int connect(const Gtid gtid);
|
||||
int connect(const boost::uint64_t binlog_pos);
|
||||
|
||||
/**
|
||||
* Blocking attempt to get the next binlog event from the stream
|
||||
|
||||
@ -57,8 +57,10 @@ public:
|
||||
* @retval 0 Success
|
||||
* @retval >0 Error code (to be specified)
|
||||
*/
|
||||
virtual int connect(Gtid gtid = Gtid())= 0;
|
||||
|
||||
virtual int connect(Gtid gtid)= 0;
|
||||
virtual int connect() = 0;
|
||||
virtual int connect(const boost::uint64_t binlog_pos) = 0;
|
||||
|
||||
/**
|
||||
* Blocking attempt to get the next binlog event from the stream
|
||||
|
||||
@ -951,11 +951,17 @@ int Binlog_tcp_driver::connect(const Gtid gtid)
|
||||
return connect(m_user, m_passwd, m_host, m_port, gtid);
|
||||
}
|
||||
|
||||
int Binlog_tcp_driver::connect(size_t binlog_pos)
|
||||
int Binlog_tcp_driver::connect()
|
||||
{
|
||||
Gtid gtid = Gtid();
|
||||
return connect(m_user, m_passwd, m_host, m_port, gtid);
|
||||
}
|
||||
|
||||
int Binlog_tcp_driver::connect(boost::uint64_t binlog_pos)
|
||||
{
|
||||
Gtid gtid = Gtid();
|
||||
std::string bf = std::string("");
|
||||
return connect(m_user, m_passwd, m_host, m_port, gtid, bf, binlog_pos);
|
||||
return connect(m_user, m_passwd, m_host, m_port, gtid, bf, (size_t)binlog_pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -76,8 +76,9 @@ public:
|
||||
/**
|
||||
* Connect using previously declared connection parameters.
|
||||
*/
|
||||
int connect(Gtid gtid = Gtid());
|
||||
int connect(size_t binlog_pos);
|
||||
int connect();
|
||||
int connect(const Gtid gtid);
|
||||
int connect(const boost::uint64_t binlog_pos);
|
||||
|
||||
/**
|
||||
* Blocking wait for the next binary log event to reach the client
|
||||
|
||||
Reference in New Issue
Block a user