MXS-2521: Fix build failure

The get_target_type signature for the definition was different from the
declaration.
This commit is contained in:
Markus Mäkelä
2019-06-27 12:47:29 +03:00
parent 5c762bb841
commit 8a749dc627
3 changed files with 10 additions and 9 deletions

View File

@ -132,8 +132,9 @@ uint32_t determine_query_type(GWBUF *querybuf, int command);
* @param command Output parameter where the packet command is stored * @param command Output parameter where the packet command is stored
* @param type Output parameter where the query type 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 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 * @return The target type where this query should be routed
*/ */
route_target_t get_target_type(RWSplitSession* rses, GWBUF* buffer, uint8_t* command, 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);

View File

@ -92,8 +92,8 @@ void handle_connection_keepalive(RWSplit *inst, RWSplitSession *rses,
ss_dassert(nserv < rses->rses_nbackends); ss_dassert(nserv < rses->rses_nbackends);
} }
route_target_t get_target_type(RWSplitSession *rses, GWBUF *buffer, route_target_t get_target_type(RWSplitSession *rses, GWBUF *buffer, uint8_t* command,
uint8_t* command, uint32_t* type, uint32_t* stmt_id, uint16_t* n_params) uint32_t* type, uint32_t* stmt_id, uint16_t* n_params)
{ {
route_target_t route_target = TARGET_MASTER; route_target_t route_target = TARGET_MASTER;
bool in_read_only_trx = rses->target_node && session_trx_is_read_only(rses->client_dcb->session); bool in_read_only_trx = rses->target_node && session_trx_is_read_only(rses->client_dcb->session);

View File

@ -139,5 +139,5 @@ RouteInfo::RouteInfo(RWSplitSession* rses, GWBUF* buffer):
stmt_id(0), stmt_id(0),
n_params(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);
} }