From 8a749dc627695fe6c6fcc1cd32067cdfdb52e739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 27 Jun 2019 12:47:29 +0300 Subject: [PATCH] MXS-2521: Fix build failure The get_target_type signature for the definition was different from the declaration. --- .../routing/readwritesplit/rwsplit_internal.hh | 13 +++++++------ .../routing/readwritesplit/rwsplit_route_stmt.cc | 4 ++-- .../routing/readwritesplit/rwsplitsession.cc | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/server/modules/routing/readwritesplit/rwsplit_internal.hh b/server/modules/routing/readwritesplit/rwsplit_internal.hh index aa0d80b5e..18e89a4c1 100644 --- a/server/modules/routing/readwritesplit/rwsplit_internal.hh +++ b/server/modules/routing/readwritesplit/rwsplit_internal.hh @@ -127,13 +127,14 @@ uint32_t determine_query_type(GWBUF *querybuf, int command); /** * @brief Get the routing requirements for a query * - * @param rses Router client session - * @param buffer Buffer containing the query - * @param command Output parameter where the packet command is stored - * @param type Output parameter where the query type is stored - * @param stmt_id Output parameter where statement ID, if the query is a binary protocol command, is stored + * @param rses Router client session + * @param buffer Buffer containing the query + * @param command Output parameter where the packet command is stored + * @param type Output parameter where the query type is stored + * @param stmt_id Output parameter where statement ID, if the query is a binary protocol command, is stored + * @param n_params Pointer where the number of PS parameters is written * * @return The target type where this query should be routed */ route_target_t get_target_type(RWSplitSession* rses, GWBUF* buffer, uint8_t* command, - uint32_t* type, uint32_t* stmt_id); + uint32_t* type, uint32_t* stmt_id, uint16_t* n_params); diff --git a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc index 2b2d0ec15..7aedb0ebd 100644 --- a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc +++ b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc @@ -92,8 +92,8 @@ void handle_connection_keepalive(RWSplit *inst, RWSplitSession *rses, ss_dassert(nserv < rses->rses_nbackends); } -route_target_t get_target_type(RWSplitSession *rses, GWBUF *buffer, - uint8_t* command, uint32_t* type, uint32_t* stmt_id, uint16_t* n_params) +route_target_t get_target_type(RWSplitSession *rses, GWBUF *buffer, uint8_t* command, + uint32_t* type, uint32_t* stmt_id, uint16_t* n_params) { route_target_t route_target = TARGET_MASTER; bool in_read_only_trx = rses->target_node && session_trx_is_read_only(rses->client_dcb->session); diff --git a/server/modules/routing/readwritesplit/rwsplitsession.cc b/server/modules/routing/readwritesplit/rwsplitsession.cc index 4d168c573..f2edac495 100644 --- a/server/modules/routing/readwritesplit/rwsplitsession.cc +++ b/server/modules/routing/readwritesplit/rwsplitsession.cc @@ -139,5 +139,5 @@ RouteInfo::RouteInfo(RWSplitSession* rses, GWBUF* buffer): stmt_id(0), n_params(0) { - target = get_target_type(rses, buffer, &command, &type, &stmt_id); + target = get_target_type(rses, buffer, &command, &type, &stmt_id, &n_params); }