Fix sending of unknown PS error
The error was only generated for COM_STMT_EXECUTE commands when all PS commands should trigger it. In addition, large packets would get sent two errors upon the arrival of the trailing end.
This commit is contained in:
@ -202,12 +202,7 @@ bool RWSplitSession::route_single_stmt(GWBUF* querybuf)
|
|||||||
|
|
||||||
SRWBackend target;
|
SRWBackend target;
|
||||||
|
|
||||||
if (command == MXS_COM_STMT_EXECUTE && stmt_id == 0)
|
if (TARGET_IS_ALL(route_target))
|
||||||
{
|
|
||||||
// Unknown prepared statement ID
|
|
||||||
succp = send_unknown_ps_error(extract_binary_ps_id(querybuf));
|
|
||||||
}
|
|
||||||
else if (TARGET_IS_ALL(route_target))
|
|
||||||
{
|
{
|
||||||
succp = handle_target_is_all(route_target, querybuf, command, qtype);
|
succp = handle_target_is_all(route_target, querybuf, command, qtype);
|
||||||
}
|
}
|
||||||
@ -249,6 +244,11 @@ bool RWSplitSession::route_single_stmt(GWBUF* querybuf)
|
|||||||
target = m_prev_target;
|
target = m_prev_target;
|
||||||
succp = true;
|
succp = true;
|
||||||
}
|
}
|
||||||
|
else if (mxs_mysql_is_ps_command(command) && stmt_id == 0)
|
||||||
|
{
|
||||||
|
// Unknown prepared statement ID
|
||||||
|
succp = send_unknown_ps_error(extract_binary_ps_id(querybuf));
|
||||||
|
}
|
||||||
else if (TARGET_IS_NAMED_SERVER(route_target) || TARGET_IS_RLAG_MAX(route_target))
|
else if (TARGET_IS_NAMED_SERVER(route_target) || TARGET_IS_RLAG_MAX(route_target))
|
||||||
{
|
{
|
||||||
if ((target = handle_hinted_target(querybuf, route_target)))
|
if ((target = handle_hinted_target(querybuf, route_target)))
|
||||||
|
Reference in New Issue
Block a user