diff --git a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc index 4a62c693e..53797d280 100644 --- a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc +++ b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc @@ -333,13 +333,14 @@ bool RWSplitSession::route_single_stmt(GWBUF* querybuf) // Target server was found and is in the correct state succp = handle_got_target(querybuf, target, store_stmt); - if (succp && command == MXS_COM_STMT_EXECUTE && !is_locked_to_master()) + if (succp && !is_locked_to_master() + && (command == MXS_COM_STMT_EXECUTE || command == MXS_COM_STMT_SEND_LONG_DATA)) { /** Track the targets of the COM_STMT_EXECUTE statements. This * information is used to route all COM_STMT_FETCH commands * to the same server where the COM_STMT_EXECUTE was done. */ m_exec_map[stmt_id] = target; - MXS_INFO("COM_STMT_EXECUTE on %s: %s", target->name(), target->uri()); + MXS_INFO("%s on %s: %s", STRPACKETTYPE(command), target->name(), target->uri()); } } } @@ -904,18 +905,18 @@ SRWBackend RWSplitSession::handle_slave_is_target(uint8_t cmd, uint32_t stmt_id) if (it->second->in_use()) { target = it->second; - MXS_INFO("COM_STMT_FETCH on %s", target->name()); + MXS_INFO("%s on %s", STRPACKETTYPE(cmd), target->name()); } else { MXS_ERROR("Old COM_STMT_EXECUTE target %s not in use, cannot " - "proceed with COM_STMT_FETCH", - it->second->name()); + "proceed with %s", + it->second->name(), STRPACKETTYPE(cmd)); } } else { - MXS_WARNING("Unknown statement ID %u used in COM_STMT_FETCH", stmt_id); + MXS_WARNING("Unknown statement ID %u used in %s", stmt_id, STRPACKETTYPE(cmd)); } } else