Merge remote-tracking branch 'origin/develop' into MXS-329
Conflicts: server/core/session.c
This commit is contained in:
@ -1443,7 +1443,8 @@ static route_target_t get_route_target (
|
||||
{
|
||||
target = TARGET_SLAVE;
|
||||
}
|
||||
else if (QUERY_IS_TYPE(qtype, QUERY_TYPE_MASTER_READ) ||
|
||||
|
||||
if (QUERY_IS_TYPE(qtype, QUERY_TYPE_MASTER_READ) ||
|
||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_EXEC_STMT) ||
|
||||
/** Configured not to allow reading variables from slaves */
|
||||
(use_sql_variables_in == TYPE_MASTER &&
|
||||
@ -2587,8 +2588,8 @@ static bool route_single_stmt(
|
||||
rses_end_locked_router_action(rses);
|
||||
goto retblock;
|
||||
}
|
||||
GWBUF* wbuf = gwbuf_clone(querybuf);
|
||||
if ((ret = target_dcb->func.write(target_dcb, wbuf)) == 1)
|
||||
|
||||
if ((ret = target_dcb->func.write(target_dcb, gwbuf_clone(querybuf))) == 1)
|
||||
{
|
||||
backend_ref_t* bref;
|
||||
|
||||
@ -2602,7 +2603,6 @@ static bool route_single_stmt(
|
||||
}
|
||||
else
|
||||
{
|
||||
gwbuf_free(wbuf);
|
||||
LOGIF((LE|LT), (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : Routing query failed.")));
|
||||
|
Reference in New Issue
Block a user