From f129db3d1fa9a1e2bdeca6af60c75c77db2f103d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Wed, 30 Sep 2015 23:40:37 +0000 Subject: [PATCH] Dump mysql_replication_hostgroups in error log (#395) This is done in MySQL_HostGroups_Manager::generate_mysql_servers_table() --- lib/MySQL_HostGroups_Manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/MySQL_HostGroups_Manager.cpp b/lib/MySQL_HostGroups_Manager.cpp index f32488f16..a6367f934 100644 --- a/lib/MySQL_HostGroups_Manager.cpp +++ b/lib/MySQL_HostGroups_Manager.cpp @@ -413,13 +413,13 @@ void MySQL_HostGroups_Manager::generate_mysql_servers_table() { void MySQL_HostGroups_Manager::generate_mysql_replication_hostgroups_table() { if (incoming_replication_hostgroups==NULL) return; + proxy_info("New mysql_replication_hostgroups table\n"); for (std::vector::iterator it = incoming_replication_hostgroups->rows.begin() ; it != incoming_replication_hostgroups->rows.end(); ++it) { SQLite3_row *r=*it; - long long unsigned wh=atoll(r->fields[0]); - long long unsigned rh=atoll(r->fields[1]); char query[256]; - sprintf(query,"INSERT INTO mysql_replication_hostgroups VALUES(%llu,%llu)",wh,rh); + sprintf(query,"INSERT INTO mysql_replication_hostgroups VALUES(%s,%s)",r->fields[0],r->fields[1]); mydb->execute(query); + fprintf(stderr,"writer_hostgroup: %s , reader_hostgroup: %s\n", r->fields[0],r->fields[1]); } incoming_replication_hostgroups=NULL; }