Ensure default mysql-interfaces=0.0.0.0:6033 and pgsql-interfaces=0.0.0.0:6133 are set

v3.0_default_interface_global_var_5189
Rahim Kanji 4 months ago
parent f1426ff99e
commit 48928ce04e

@ -1529,7 +1529,10 @@ char * MySQL_Threads_Handler::get_variable(char *name) { // this is the public f
if (!strcasecmp(name,"keep_multiplexing_variables")) return strdup(variables.keep_multiplexing_variables);
if (!strcasecmp(name,"default_authentication_plugin")) return strdup(variables.default_authentication_plugin);
if (!strcasecmp(name,"proxy_protocol_networks")) return strdup(variables.proxy_protocol_networks);
if (!strcasecmp(name,"interfaces")) return strdup(variables.interfaces);
if (!strcasecmp(name, "interfaces")) {
return strdup((strlen(variables.interfaces) == 0) ? "0.0.0.0:6033" : variables.interfaces);
}
if (!strcasecmp(name,"server_capabilities")) {
// FIXME : make it human readable
sprintf(intbuf,"%d",variables.server_capabilities);

@ -1099,7 +1099,7 @@ PgSQL_Threads_Handler::PgSQL_Threads_Handler() {
// Init client_host_cache mutex
pthread_mutex_init(&mutex_client_host_cache, NULL);
}
}
unsigned int PgSQL_Threads_Handler::get_global_version() {
return __sync_fetch_and_add(&__global_PgSQL_Thread_Variables_version, 0);
@ -1427,7 +1427,9 @@ char* PgSQL_Threads_Handler::get_variable(char* name) { // this is the public fu
if (!strcasecmp(name, "eventslog_filename")) return strdup(variables.eventslog_filename);
if (!strcasecmp(name, "default_schema")) return strdup(variables.default_schema);
if (!strcasecmp(name, "keep_multiplexing_variables")) return strdup(variables.keep_multiplexing_variables);
if (!strcasecmp(name, "interfaces")) return strdup(variables.interfaces);
if (!strcasecmp(name, "interfaces")) {
return strdup((strlen(variables.interfaces) == 0) ? "0.0.0.0:6133" : variables.interfaces);
}
// SSL variables
if (!strncasecmp(name, "ssl_", 4)) {
if (!strcasecmp(name, "ssl_p2s_ca")) {

@ -92,7 +92,7 @@ int ProxySQL_Config::Read_Global_Variables_from_configfile(const char *prefix) {
char *query=(char *)malloc(strlen(q)+strlen(prefix)+strlen(n)+strlen(value_string.c_str()));
sprintf(query,q, prefix, n, value_string.c_str());
//fprintf(stderr, "%s\n", query);
admindb->execute(query);
admindb->execute(query);
free(query);
}
admindb->execute("PRAGMA foreign_keys = ON");

Loading…
Cancel
Save