From 1fac83d0a4c12474867240b1ea9916cf74100b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Wed, 28 Jul 2021 17:32:01 +0200 Subject: [PATCH] Fixed 'hostgroup_id' index selection in 'populate_grouprep_table' --- src/SQLite3_Server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SQLite3_Server.cpp b/src/SQLite3_Server.cpp index 7511901dc..65a1fd084 100644 --- a/src/SQLite3_Server.cpp +++ b/src/SQLite3_Server.cpp @@ -1256,7 +1256,7 @@ void SQLite3_Server::populate_grouprep_table(MySQL_Session *sess, int txs_behind for (const SQLite3_row* r : resultset->rows) { std::string hostname { r->fields[0] }; int port = atoi(r->fields[1]); - int hostgroup_id = atoi(r->fields[1]); + int hostgroup_id = atoi(r->fields[2]); const std::string t_insert_query { "INSERT INTO GR_MEMBER_ROUTING_CANDIDATE_STATUS" " (hostname, port, viable_candidate, read_only, transactions_behind) VALUES"