37 SQLExecutor(
"slave",
"replication"),
41 _drizzle(
nullptr, &drizzle_free),
43 _last_return(DRIZZLE_RETURN_OK),
45 _saved_max_commit_id(0),
47 _seconds_between_reconnects(30)
50 virtual ~QueueProducer();
56 void setSleepInterval(uint32_t seconds)
61 uint32_t getSleepInterval()
66 void setMasterHost(
const std::string &host)
71 void setMasterPort(uint16_t port)
76 void setMasterUser(
const std::string &user)
81 void setMasterPassword(
const std::string &password)
83 _master_pass= password;
86 void setMaxReconnectAttempts(uint32_t max)
91 void setSecondsBetweenReconnects(uint32_t seconds)
93 _seconds_between_reconnects= seconds;
96 void setCachedMaxCommitId(uint64_t value)
98 _saved_max_commit_id= value;
101 uint64_t cachedMaxCommitId()
103 return _saved_max_commit_id;
106 void setMasterId(uint32_t value)
121 std::string _master_host;
122 uint16_t _master_port;
123 std::string _master_user;
124 std::string _master_pass;
128 std::unique_ptr<drizzle_st,
decltype(&drizzle_free)> _drizzle;
129 drizzle_con_st *_connection;
130 drizzle_return_t _last_return;
133 uint64_t _saved_max_commit_id;
134 uint32_t _max_reconnects;
135 uint32_t _seconds_between_reconnects;
137 std::string _last_error_message;
185 bool queryForTrxIdList(uint64_t max_commit_id, std::vector<uint64_t> &list);
186 bool queueInsert(
const char *trx_id,
188 const char *commit_id,
189 const char *originating_server_uuid,
190 const char *originating_commit_id,
200 void setIOState(
const std::string &err_msg,
bool status);