Deprecate read_only_action()

This function is not in used anymore
pull/4917/head
René Cannaò 1 year ago
parent ae68ebace9
commit e88692c172

@ -1182,7 +1182,7 @@ class MySQL_HostGroups_Manager {
void replication_lag_action_inner(MyHGC *, const char*, unsigned int, int, bool);
void replication_lag_action(const std::list<replication_lag_server_t>& mysql_servers);
void read_only_action(char *hostname, int port, int read_only);
// void read_only_action(char *hostname, int port, int read_only);
void read_only_action_v2(const std::list<read_only_server_t>& mysql_servers);
unsigned int get_servers_table_version();
void wait_servers_table_version(unsigned, unsigned);

@ -1068,7 +1068,7 @@ class MySQL_HostGroups_Manager : public Base_HostGroups_Manager<MyHGC> {
void replication_lag_action_inner(MyHGC *, const char*, unsigned int, int, bool);
void replication_lag_action(const std::list<replication_lag_server_t>& mysql_servers);
void read_only_action(char *hostname, int port, int read_only);
// void read_only_action(char *hostname, int port, int read_only);
void read_only_action_v2(const std::list<read_only_server_t>& mysql_servers);
unsigned int get_servers_table_version();
void wait_servers_table_version(unsigned, unsigned);

@ -837,7 +837,7 @@ class PgSQL_HostGroups_Manager : public Base_HostGroups_Manager<PgSQL_HGC> {
void replication_lag_action_inner(PgSQL_HGC *, const char*, unsigned int, int);
void replication_lag_action(const std::list<replication_lag_server_t>& pgsql_servers);
void read_only_action(char *hostname, int port, int read_only);
// void read_only_action(char *hostname, int port, int read_only);
void read_only_action_v2(const std::list<read_only_server_t>& pgsql_servers, bool writer_is_also_reader);
unsigned int get_servers_table_version();
void wait_servers_table_version(unsigned, unsigned);

@ -3517,6 +3517,7 @@ SQLite3_result * MySQL_HostGroups_Manager::SQL3_Connection_Pool(bool _reset, int
return result;
}
#if 0 // DELETE AFTER 2025-07-14
void MySQL_HostGroups_Manager::read_only_action(char *hostname, int port, int read_only) {
// define queries
const char *Q1B=(char *)"SELECT hostgroup_id,status FROM ( SELECT DISTINCT writer_hostgroup FROM mysql_replication_hostgroups JOIN mysql_servers WHERE (hostgroup_id=writer_hostgroup) AND hostname='%s' AND port=%d UNION SELECT DISTINCT writer_hostgroup FROM mysql_replication_hostgroups JOIN mysql_servers WHERE (hostgroup_id=reader_hostgroup) AND hostname='%s' AND port=%d) LEFT JOIN mysql_servers ON hostgroup_id=writer_hostgroup AND hostname='%s' AND port=%d";
@ -3860,6 +3861,7 @@ void MySQL_HostGroups_Manager::read_only_action(char *hostname, int port, int re
}
free(query);
}
#endif // 0
/**
* @brief New implementation of the read_only_action method that does not depend on the admin table.

@ -3247,6 +3247,7 @@ SQLite3_result * PgSQL_HostGroups_Manager::SQL3_Connection_Pool(bool _reset, int
return result;
}
#if 0 // DELETE AFTER 2025-07-14
void PgSQL_HostGroups_Manager::read_only_action(char *hostname, int port, int read_only) {
// define queries
const char *Q1B=(char *)"SELECT hostgroup_id,status FROM ( SELECT DISTINCT writer_hostgroup FROM pgsql_replication_hostgroups JOIN pgsql_servers WHERE (hostgroup_id=writer_hostgroup) AND hostname='%s' AND port=%d UNION SELECT DISTINCT writer_hostgroup FROM pgsql_replication_hostgroups JOIN pgsql_servers WHERE (hostgroup_id=reader_hostgroup) AND hostname='%s' AND port=%d) LEFT JOIN pgsql_servers ON hostgroup_id=writer_hostgroup AND hostname='%s' AND port=%d";
@ -3590,6 +3591,7 @@ void PgSQL_HostGroups_Manager::read_only_action(char *hostname, int port, int re
}
free(query);
}
#endif // 0
/**
* @brief New implementation of the read_only_action method that does not depend on the admin table.

Loading…
Cancel
Save