Merge branch '2.3' into develop
This commit is contained in:
@ -50,6 +50,9 @@ MYSQL* open_conn_db_flags(int port,
|
|||||||
set_ssl(conn);
|
set_ssl(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MXS-2568: This fixes mxs1828_double_local_infile
|
||||||
|
mysql_optionsv(conn, MYSQL_OPT_LOCAL_INFILE, (void*)"1");
|
||||||
|
|
||||||
mysql_real_connect(conn,
|
mysql_real_connect(conn,
|
||||||
ip.c_str(),
|
ip.c_str(),
|
||||||
user.c_str(),
|
user.c_str(),
|
||||||
@ -81,6 +84,9 @@ MYSQL* open_conn_db_timeout(int port,
|
|||||||
mysql_options(conn, MYSQL_OPT_READ_TIMEOUT, &timeout);
|
mysql_options(conn, MYSQL_OPT_READ_TIMEOUT, &timeout);
|
||||||
mysql_options(conn, MYSQL_OPT_WRITE_TIMEOUT, &timeout);
|
mysql_options(conn, MYSQL_OPT_WRITE_TIMEOUT, &timeout);
|
||||||
|
|
||||||
|
// MXS-2568: This fixes mxs1828_double_local_infile
|
||||||
|
mysql_optionsv(conn, MYSQL_OPT_LOCAL_INFILE, (void*)"1");
|
||||||
|
|
||||||
if (ssl)
|
if (ssl)
|
||||||
{
|
{
|
||||||
set_ssl(conn);
|
set_ssl(conn);
|
||||||
|
@ -301,6 +301,7 @@ public:
|
|||||||
STOPPED,
|
STOPPED,
|
||||||
POLLING,
|
POLLING,
|
||||||
PROCESSING,
|
PROCESSING,
|
||||||
|
FINISHED
|
||||||
};
|
};
|
||||||
|
|
||||||
enum execute_mode_t
|
enum execute_mode_t
|
||||||
|
@ -527,9 +527,9 @@ bool Worker::post_message(uint32_t msg_id, intptr_t arg1, intptr_t arg2)
|
|||||||
|
|
||||||
// TODO: Enable and fix this in develop and/or 2.4: The deletion of rworker_local is done after the
|
// TODO: Enable and fix this in develop and/or 2.4: The deletion of rworker_local is done after the
|
||||||
// workers have stopped and it triggers this assertion.
|
// workers have stopped and it triggers this assertion.
|
||||||
// mxb_assert(state() != Worker::STOPPED);
|
// mxb_assert(state() != Worker::FINISHED);
|
||||||
|
|
||||||
if (state() != Worker::STOPPED)
|
if (state() != Worker::FINISHED)
|
||||||
{
|
{
|
||||||
MessageQueue::Message message(msg_id, arg1, arg2);
|
MessageQueue::Message message(msg_id, arg1, arg2);
|
||||||
rval = m_pQueue->post(message);
|
rval = m_pQueue->post(message);
|
||||||
@ -540,7 +540,7 @@ bool Worker::post_message(uint32_t msg_id, intptr_t arg1, intptr_t arg2)
|
|||||||
|
|
||||||
void Worker::run(mxb::Semaphore* pSem)
|
void Worker::run(mxb::Semaphore* pSem)
|
||||||
{
|
{
|
||||||
mxb_assert(m_state == STOPPED);
|
mxb_assert(m_state == STOPPED || m_state == FINISHED);
|
||||||
this_thread.pCurrent_worker = this;
|
this_thread.pCurrent_worker = this;
|
||||||
|
|
||||||
if (pre_run())
|
if (pre_run())
|
||||||
@ -554,7 +554,7 @@ void Worker::run(mxb::Semaphore* pSem)
|
|||||||
|
|
||||||
poll_waitevents();
|
poll_waitevents();
|
||||||
|
|
||||||
m_state = STOPPED;
|
m_state = FINISHED;
|
||||||
|
|
||||||
post_run();
|
post_run();
|
||||||
MXB_INFO("Worker %p has shut down.", this);
|
MXB_INFO("Worker %p has shut down.", this);
|
||||||
|
@ -696,7 +696,7 @@ json_t* Monitor::parameters_to_json() const
|
|||||||
{
|
{
|
||||||
json_t* rval = json_object();
|
json_t* rval = json_object();
|
||||||
const MXS_MODULE* mod = get_module(m_module.c_str(), MODULE_MONITOR);
|
const MXS_MODULE* mod = get_module(m_module.c_str(), MODULE_MONITOR);
|
||||||
auto my_config = parameters();
|
auto my_config = parameters();
|
||||||
config_add_module_params_json(&my_config,
|
config_add_module_params_json(&my_config,
|
||||||
{CN_TYPE, CN_MODULE, CN_SERVERS},
|
{CN_TYPE, CN_MODULE, CN_SERVERS},
|
||||||
config_monitor_params,
|
config_monitor_params,
|
||||||
@ -1088,24 +1088,24 @@ int Monitor::launch_command(MonitorServer* ptr)
|
|||||||
});
|
});
|
||||||
|
|
||||||
m_scriptcmd->match_substitute("$NODELIST", [this] {
|
m_scriptcmd->match_substitute("$NODELIST", [this] {
|
||||||
return gen_serverlist(SERVER_RUNNING);
|
return gen_serverlist(SERVER_RUNNING);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_scriptcmd->match_substitute("$LIST", [this] {
|
m_scriptcmd->match_substitute("$LIST", [this] {
|
||||||
return gen_serverlist(0);
|
return gen_serverlist(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_scriptcmd->match_substitute("$MASTERLIST", [this] {
|
m_scriptcmd->match_substitute("$MASTERLIST", [this] {
|
||||||
return gen_serverlist(SERVER_MASTER);
|
return gen_serverlist(SERVER_MASTER);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_scriptcmd->match_substitute("$SLAVELIST", [this] {
|
m_scriptcmd->match_substitute("$SLAVELIST", [this] {
|
||||||
return gen_serverlist(SERVER_SLAVE);
|
return gen_serverlist(SERVER_SLAVE);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_scriptcmd->match_substitute("$SYNCEDLIST", [this] {
|
m_scriptcmd->match_substitute("$SYNCEDLIST", [this] {
|
||||||
return gen_serverlist(SERVER_JOINED);
|
return gen_serverlist(SERVER_JOINED);
|
||||||
});
|
});
|
||||||
|
|
||||||
int rv = m_scriptcmd->externcmd_execute();
|
int rv = m_scriptcmd->externcmd_execute();
|
||||||
if (rv == 0)
|
if (rv == 0)
|
||||||
@ -1836,7 +1836,7 @@ MonitorWorker::~MonitorWorker()
|
|||||||
|
|
||||||
bool MonitorWorker::is_running() const
|
bool MonitorWorker::is_running() const
|
||||||
{
|
{
|
||||||
return (Worker::state() != Worker::STOPPED);
|
return Worker::state() != Worker::STOPPED && Worker::state() != Worker::FINISHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MonitorWorker::do_stop()
|
void MonitorWorker::do_stop()
|
||||||
|
@ -585,6 +585,8 @@ GWBUF* read_avro_json_schema(std::string avrofile, std::string dir)
|
|||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << file.rdbuf();
|
ss << file.rdbuf();
|
||||||
std::string text = ss.str();
|
std::string text = ss.str();
|
||||||
|
mxs::rtrim(text);
|
||||||
|
text += '\n';
|
||||||
mxs::Buffer buffer(std::vector<uint8_t>(text.begin(), text.end()));
|
mxs::Buffer buffer(std::vector<uint8_t>(text.begin(), text.end()));
|
||||||
rval = buffer.release();
|
rval = buffer.release();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user