Merge remote-tracking branch 'origin/develop' into MXS-329

Conflicts:
	server/core/session.c
This commit is contained in:
counterpoint
2015-09-10 13:07:27 +01:00
69 changed files with 3037 additions and 2062 deletions

View File

@ -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.")));