Remove explicit module name from log messages

The module name doesn't need to be logged as MXS_MODULE_NAME will be
automatically added as a prefix to all messages logged by the module.
This commit is contained in:
Markus Mäkelä
2017-01-17 10:54:12 +02:00
parent 842e8440d4
commit 5b92a1f467
18 changed files with 98 additions and 100 deletions

View File

@ -2649,7 +2649,7 @@ int32_t qc_mysql_setup(const char* args)
{ {
if (args) if (args)
{ {
MXS_WARNING("qc_mysqlembedded: '%s' provided as arguments, " MXS_WARNING("'%s' provided as arguments, "
"even though no arguments are supported.", args); "even though no arguments are supported.", args);
} }

View File

@ -1255,7 +1255,7 @@ get_users(SERV_LISTENER *listener, USERS *users)
if (server != NULL && if (server != NULL &&
(mxs_mysql_real_connect(con, server->server, service_user, dpwd) != NULL)) (mxs_mysql_real_connect(con, server->server, service_user, dpwd) != NULL))
{ {
MXS_DEBUG("Dbusers : Loading data from backend database with " MXS_DEBUG("Loading data from backend database with "
"Master role [%s:%i] for service [%s]", "Master role [%s:%i] for service [%s]",
server->server->name, server->server->name,
server->server->port, server->server->port,

View File

@ -188,7 +188,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
} }
else else
{ {
MXS_ERROR("ccrfilter: unsupported option '%s'.", options[i]); MXS_ERROR("unsupported option '%s'.", options[i]);
} }
} }
} }
@ -199,7 +199,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
{ {
if (regcomp(&my_instance->re, my_instance->match, cflags)) if (regcomp(&my_instance->re, my_instance->match, cflags))
{ {
MXS_ERROR("ccrfilter: Failed to compile regex '%s'.", my_instance->match); MXS_ERROR("Failed to compile regex '%s'.", my_instance->match);
} }
} }
@ -209,7 +209,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
{ {
if (regcomp(&my_instance->nore, my_instance->nomatch, cflags)) if (regcomp(&my_instance->nore, my_instance->nomatch, cflags))
{ {
MXS_ERROR("ccrfilter: Failed to compile regex '%s'.", my_instance->nomatch); MXS_ERROR("Failed to compile regex '%s'.", my_instance->nomatch);
} }
} }
} }

View File

@ -962,7 +962,7 @@ struct parser_stack
*/ */
void dbfw_yyerror(void* scanner, const char* error) void dbfw_yyerror(void* scanner, const char* error)
{ {
MXS_ERROR("dbfwfilter: Error on line %d, %s: %s\n", dbfw_yyget_lineno(scanner), MXS_ERROR("Error on line %d, %s: %s\n", dbfw_yyget_lineno(scanner),
error, dbfw_yyget_text(scanner)); error, dbfw_yyget_text(scanner));
} }
@ -1332,7 +1332,7 @@ bool define_regex_rule(void* scanner, char* pattern)
{ {
PCRE2_UCHAR errbuf[MXS_STRERROR_BUFLEN]; PCRE2_UCHAR errbuf[MXS_STRERROR_BUFLEN];
pcre2_get_error_message(err, errbuf, sizeof(errbuf)); pcre2_get_error_message(err, errbuf, sizeof(errbuf));
MXS_ERROR("dbfwfilter: Invalid regular expression '%s': %s", MXS_ERROR("Invalid regular expression '%s': %s",
start, errbuf); start, errbuf);
} }
@ -1792,7 +1792,7 @@ static char* create_parse_error(FW_INSTANCE* my_instance,
char *msg = NULL; char *msg = NULL;
char format[] = char format[] =
"dbfwfilter: Query could not be %s and will hence be rejected. " "Query could not be %s and will hence be rejected. "
"Please ensure that the SQL syntax is correct"; "Please ensure that the SQL syntax is correct";
size_t len = sizeof(format) + strlen(reason); // sizeof includes the trailing NULL as well. size_t len = sizeof(format) + strlen(reason); // sizeof includes the trailing NULL as well.
char message[len]; char message[len];
@ -1846,7 +1846,7 @@ bool match_throttle(FW_SESSION* my_session, RULE_BOOK *rulebook, char **msg)
*msg = MXS_STRDUP_A(emsg); *msg = MXS_STRDUP_A(emsg);
matches = true; matches = true;
MXS_INFO("dbfwfilter: rule '%s': user denied for %f seconds", MXS_INFO("rule '%s': user denied for %f seconds",
rulebook->rule->name, blocked_for); rulebook->rule->name, blocked_for);
} }
else else
@ -1859,7 +1859,7 @@ bool match_throttle(FW_SESSION* my_session, RULE_BOOK *rulebook, char **msg)
{ {
if (queryspeed->count >= queryspeed->limit) if (queryspeed->count >= queryspeed->limit)
{ {
MXS_INFO("dbfwfilter: rule '%s': query limit triggered (%d queries in %d seconds), " MXS_INFO("rule '%s': query limit triggered (%d queries in %d seconds), "
"denying queries from user for %d seconds.", rulebook->rule->name, "denying queries from user for %d seconds.", rulebook->rule->name,
queryspeed->limit, queryspeed->period, queryspeed->cooldown); queryspeed->limit, queryspeed->period, queryspeed->cooldown);
@ -1897,7 +1897,7 @@ void match_regex(RULE_BOOK *rulebook, const char *query, bool *matches, char **m
(PCRE2_SPTR)query, PCRE2_ZERO_TERMINATED, (PCRE2_SPTR)query, PCRE2_ZERO_TERMINATED,
0, 0, mdata, NULL) > 0) 0, 0, mdata, NULL) > 0)
{ {
MXS_NOTICE("dbfwfilter: rule '%s': regex matched on query", rulebook->rule->name); MXS_NOTICE("rule '%s': regex matched on query", rulebook->rule->name);
*matches = true; *matches = true;
*msg = MXS_STRDUP_A("Permission denied, query matched regular expression."); *msg = MXS_STRDUP_A("Permission denied, query matched regular expression.");
} }
@ -1928,7 +1928,7 @@ void match_column(RULE_BOOK *rulebook, GWBUF *queue, bool *matches, char **msg)
{ {
char emsg[strlen(strln->value) + 100]; char emsg[strlen(strln->value) + 100];
sprintf(emsg, "Permission denied to column '%s'.", strln->value); sprintf(emsg, "Permission denied to column '%s'.", strln->value);
MXS_NOTICE("dbfwfilter: rule '%s': query targets forbidden column: %s", MXS_NOTICE("rule '%s': query targets forbidden column: %s",
rulebook->rule->name, strln->value); rulebook->rule->name, strln->value);
*msg = MXS_STRDUP_A(emsg); *msg = MXS_STRDUP_A(emsg);
*matches = true; *matches = true;
@ -1956,7 +1956,7 @@ void match_function(RULE_BOOK *rulebook, GWBUF *queue, bool *matches, char **msg
{ {
char emsg[strlen(strln->value) + 100]; char emsg[strlen(strln->value) + 100];
sprintf(emsg, "Permission denied to function '%s'.", strln->value); sprintf(emsg, "Permission denied to function '%s'.", strln->value);
MXS_NOTICE("dbfwfilter: rule '%s': query uses forbidden function: %s", MXS_NOTICE("rule '%s': query uses forbidden function: %s",
rulebook->rule->name, strln->value); rulebook->rule->name, strln->value);
*msg = MXS_STRDUP_A(emsg); *msg = MXS_STRDUP_A(emsg);
*matches = true; *matches = true;
@ -1977,7 +1977,7 @@ void match_wildcard(RULE_BOOK *rulebook, GWBUF *queue, bool *matches, char **msg
{ {
if (strcmp(infos[i].column, "*") == 0) if (strcmp(infos[i].column, "*") == 0)
{ {
MXS_NOTICE("dbfwfilter: rule '%s': query contains a wildcard.", rulebook->rule->name); MXS_NOTICE("rule '%s': query contains a wildcard.", rulebook->rule->name);
*matches = true; *matches = true;
*msg = MXS_STRDUP_A("Usage of wildcard denied."); *msg = MXS_STRDUP_A("Usage of wildcard denied.");
} }
@ -2063,7 +2063,7 @@ bool rule_matches(FW_INSTANCE* my_instance,
case RT_PERMISSION: case RT_PERMISSION:
matches = true; matches = true;
msg = MXS_STRDUP_A("Permission denied at this time."); msg = MXS_STRDUP_A("Permission denied at this time.");
MXS_NOTICE("dbfwfilter: rule '%s': query denied at this time.", rulebook->rule->name); MXS_NOTICE("rule '%s': query denied at this time.", rulebook->rule->name);
break; break;
case RT_COLUMN: case RT_COLUMN:
@ -2096,7 +2096,7 @@ bool rule_matches(FW_INSTANCE* my_instance,
{ {
matches = true; matches = true;
msg = MXS_STRDUP_A("Required WHERE/HAVING clause is missing."); msg = MXS_STRDUP_A("Required WHERE/HAVING clause is missing.");
MXS_NOTICE("dbfwfilter: rule '%s': query has no where/having " MXS_NOTICE("rule '%s': query has no where/having "
"clause, query is denied.", rulebook->rule->name); "clause, query is denied.", rulebook->rule->name);
} }
break; break;

View File

@ -222,7 +222,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
if (luaL_dofile(my_instance->global_lua_state, my_instance->global_script)) if (luaL_dofile(my_instance->global_lua_state, my_instance->global_script))
{ {
MXS_ERROR("luafilter: Failed to execute global script at '%s':%s.", MXS_ERROR("Failed to execute global script at '%s':%s.",
my_instance->global_script, lua_tostring(my_instance->global_lua_state, -1)); my_instance->global_script, lua_tostring(my_instance->global_lua_state, -1));
MXS_FREE(my_instance->global_script); MXS_FREE(my_instance->global_script);
MXS_FREE(my_instance->session_script); MXS_FREE(my_instance->session_script);
@ -235,7 +235,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
if (lua_pcall(my_instance->global_lua_state, 0, 0, 0)) if (lua_pcall(my_instance->global_lua_state, 0, 0, 0))
{ {
MXS_WARNING("luafilter: Failed to get global variable 'createInstance': %s." MXS_WARNING("Failed to get global variable 'createInstance': %s."
" The createInstance entry point will not be called for the global script.", " The createInstance entry point will not be called for the global script.",
lua_tostring(my_instance->global_lua_state, -1)); lua_tostring(my_instance->global_lua_state, -1));
lua_pop(my_instance->global_lua_state, -1); // Pop the error off the stack lua_pop(my_instance->global_lua_state, -1); // Pop the error off the stack
@ -299,7 +299,7 @@ static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session)
if (luaL_dofile(my_session->lua_state, my_instance->session_script)) if (luaL_dofile(my_session->lua_state, my_instance->session_script))
{ {
MXS_ERROR("luafilter: Failed to execute session script at '%s': %s.", MXS_ERROR("Failed to execute session script at '%s': %s.",
my_instance->session_script, my_instance->session_script,
lua_tostring(my_session->lua_state, -1)); lua_tostring(my_session->lua_state, -1));
lua_close(my_session->lua_state); lua_close(my_session->lua_state);
@ -328,7 +328,7 @@ static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session)
if (lua_pcall(my_session->lua_state, 2, 0, 0)) if (lua_pcall(my_session->lua_state, 2, 0, 0))
{ {
MXS_WARNING("luafilter: Failed to get global variable 'newSession': '%s'." MXS_WARNING("Failed to get global variable 'newSession': '%s'."
" The newSession entry point will not be called.", " The newSession entry point will not be called.",
lua_tostring(my_session->lua_state, -1)); lua_tostring(my_session->lua_state, -1));
lua_pop(my_session->lua_state, -1); // Pop the error off the stack lua_pop(my_session->lua_state, -1); // Pop the error off the stack
@ -346,7 +346,7 @@ static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session)
if (lua_pcall(my_instance->global_lua_state, 2, 0, 0)) if (lua_pcall(my_instance->global_lua_state, 2, 0, 0))
{ {
MXS_WARNING("luafilter: Failed to get global variable 'newSession': '%s'." MXS_WARNING("Failed to get global variable 'newSession': '%s'."
" The newSession entry point will not be called for the global script.", " The newSession entry point will not be called for the global script.",
lua_tostring(my_instance->global_lua_state, -1)); lua_tostring(my_instance->global_lua_state, -1));
lua_pop(my_instance->global_lua_state, -1); // Pop the error off the stack lua_pop(my_instance->global_lua_state, -1); // Pop the error off the stack
@ -380,7 +380,7 @@ static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
if (lua_pcall(my_session->lua_state, 0, 0, 0)) if (lua_pcall(my_session->lua_state, 0, 0, 0))
{ {
MXS_WARNING("luafilter: Failed to get global variable 'closeSession': '%s'." MXS_WARNING("Failed to get global variable 'closeSession': '%s'."
" The closeSession entry point will not be called.", " The closeSession entry point will not be called.",
lua_tostring(my_session->lua_state, -1)); lua_tostring(my_session->lua_state, -1));
lua_pop(my_session->lua_state, -1); lua_pop(my_session->lua_state, -1);
@ -396,7 +396,7 @@ static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
if (lua_pcall(my_instance->global_lua_state, 0, 0, 0)) if (lua_pcall(my_instance->global_lua_state, 0, 0, 0))
{ {
MXS_WARNING("luafilter: Failed to get global variable 'closeSession': '%s'." MXS_WARNING("Failed to get global variable 'closeSession': '%s'."
" The closeSession entry point will not be called for the global script.", " The closeSession entry point will not be called for the global script.",
lua_tostring(my_instance->global_lua_state, -1)); lua_tostring(my_instance->global_lua_state, -1));
lua_pop(my_instance->global_lua_state, -1); lua_pop(my_instance->global_lua_state, -1);
@ -471,7 +471,7 @@ static int32_t clientReply(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GW
if (lua_pcall(my_session->lua_state, 0, 0, 0)) if (lua_pcall(my_session->lua_state, 0, 0, 0))
{ {
MXS_ERROR("luafilter: Session scope call to 'clientReply' failed: '%s'.", MXS_ERROR("Session scope call to 'clientReply' failed: '%s'.",
lua_tostring(my_session->lua_state, -1)); lua_tostring(my_session->lua_state, -1));
lua_pop(my_session->lua_state, -1); lua_pop(my_session->lua_state, -1);
} }
@ -486,7 +486,7 @@ static int32_t clientReply(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GW
if (lua_pcall(my_instance->global_lua_state, 0, 0, 0)) if (lua_pcall(my_instance->global_lua_state, 0, 0, 0))
{ {
MXS_ERROR("luafilter: Global scope call to 'clientReply' failed: '%s'.", MXS_ERROR("Global scope call to 'clientReply' failed: '%s'.",
lua_tostring(my_session->lua_state, -1)); lua_tostring(my_session->lua_state, -1));
lua_pop(my_instance->global_lua_state, -1); lua_pop(my_instance->global_lua_state, -1);
} }
@ -543,7 +543,7 @@ static int32_t routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWB
if (lua_pcall(my_session->lua_state, 1, 1, 0)) if (lua_pcall(my_session->lua_state, 1, 1, 0))
{ {
MXS_ERROR("luafilter: Session scope call to 'routeQuery' failed: '%s'.", MXS_ERROR("Session scope call to 'routeQuery' failed: '%s'.",
lua_tostring(my_session->lua_state, -1)); lua_tostring(my_session->lua_state, -1));
lua_pop(my_session->lua_state, -1); lua_pop(my_session->lua_state, -1);
} }
@ -575,7 +575,7 @@ static int32_t routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWB
if (lua_pcall(my_instance->global_lua_state, 1, 0, 0)) if (lua_pcall(my_instance->global_lua_state, 1, 0, 0))
{ {
MXS_ERROR("luafilter: Global scope call to 'routeQuery' failed: '%s'.", MXS_ERROR("Global scope call to 'routeQuery' failed: '%s'.",
lua_tostring(my_instance->global_lua_state, -1)); lua_tostring(my_instance->global_lua_state, -1));
lua_pop(my_instance->global_lua_state, -1); lua_pop(my_instance->global_lua_state, -1);
} }

View File

@ -165,7 +165,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
if (regcomp(&my_instance->re, my_instance->match, cflags)) if (regcomp(&my_instance->re, my_instance->match, cflags))
{ {
MXS_ERROR("namedserverfilter: Invalid regular expression '%s'.", my_instance->match); MXS_ERROR("Invalid regular expression '%s'.", my_instance->match);
MXS_FREE(my_instance->match); MXS_FREE(my_instance->match);
my_instance->match = NULL; my_instance->match = NULL;
error = true; error = true;

View File

@ -295,7 +295,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
if (my_instance->match && regcomp(&my_instance->re, my_instance->match, cflags)) if (my_instance->match && regcomp(&my_instance->re, my_instance->match, cflags))
{ {
MXS_ERROR("qlafilter: Invalid regular expression '%s' for the 'match' " MXS_ERROR("Invalid regular expression '%s' for the 'match' "
"parameter.", my_instance->match); "parameter.", my_instance->match);
MXS_FREE(my_instance->match); MXS_FREE(my_instance->match);
my_instance->match = NULL; my_instance->match = NULL;
@ -304,7 +304,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
if (my_instance->nomatch && regcomp(&my_instance->nore, my_instance->nomatch, cflags)) if (my_instance->nomatch && regcomp(&my_instance->nore, my_instance->nomatch, cflags))
{ {
MXS_ERROR("qlafilter: Invalid regular expression '%s' for the 'nomatch'" MXS_ERROR("Invalid regular expression '%s' for the 'nomatch'"
" parameter.", my_instance->nomatch); " parameter.", my_instance->nomatch);
MXS_FREE(my_instance->nomatch); MXS_FREE(my_instance->nomatch);
my_instance->nomatch = NULL; my_instance->nomatch = NULL;
@ -715,7 +715,7 @@ static FILE* open_log_file(uint32_t data_flags, QLA_INSTANCE *instance, const ch
{ {
// Weird error, file opened but a write failed. Best to stop. // Weird error, file opened but a write failed. Best to stop.
fclose(fp); fclose(fp);
MXS_ERROR("qlafilter: Failed to print header to file %s.", filename); MXS_ERROR("Failed to print header to file %s.", filename);
return NULL; return NULL;
} }
} }

View File

@ -198,7 +198,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
{ {
if ((my_instance->logfile = fopen(logfile, "a")) == NULL) if ((my_instance->logfile = fopen(logfile, "a")) == NULL)
{ {
MXS_ERROR("regexfilter: Failed to open file '%s'.", logfile); MXS_ERROR("Failed to open file '%s'.", logfile);
free_instance(my_instance); free_instance(my_instance);
return NULL; return NULL;
} }
@ -220,7 +220,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
{ {
char errbuffer[1024]; char errbuffer[1024];
pcre2_get_error_message(errnumber, (PCRE2_UCHAR*) & errbuffer, sizeof(errbuffer)); pcre2_get_error_message(errnumber, (PCRE2_UCHAR*) & errbuffer, sizeof(errbuffer));
MXS_ERROR("regexfilter: Compiling regular expression '%s' failed at %lu: %s", MXS_ERROR("Compiling regular expression '%s' failed at %lu: %s",
my_instance->match, erroffset, errbuffer); my_instance->match, erroffset, errbuffer);
free_instance(my_instance); free_instance(my_instance);
return NULL; return NULL;
@ -229,7 +229,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
if ((my_instance->match_data = if ((my_instance->match_data =
pcre2_match_data_create_from_pattern(my_instance->re, NULL)) == NULL) pcre2_match_data_create_from_pattern(my_instance->re, NULL)) == NULL)
{ {
MXS_ERROR("regexfilter: Failure to create PCRE2 matching data. " MXS_ERROR("Failure to create PCRE2 matching data. "
"This is most likely caused by a lack of available memory."); "This is most likely caused by a lack of available memory.");
free_instance(my_instance); free_instance(my_instance);
return NULL; return NULL;

View File

@ -254,7 +254,7 @@ orphan_free(void* data)
#ifdef SS_DEBUG #ifdef SS_DEBUG
if (o_stopping + o_ready > 0) if (o_stopping + o_ready > 0)
{ {
MXS_DEBUG("tee.c: %d orphans in " MXS_DEBUG("%d orphans in "
"SESSION_STATE_STOPPING, %d orphans in " "SESSION_STATE_STOPPING, %d orphans in "
"SESSION_STATE_ROUTER_READY. ", o_stopping, o_ready); "SESSION_STATE_ROUTER_READY. ", o_stopping, o_ready);
} }
@ -278,7 +278,7 @@ orphan_free(void* data)
} }
#ifdef SS_DEBUG #ifdef SS_DEBUG
MXS_DEBUG("tee.c: %d orphans freed.", o_freed); MXS_DEBUG("%d orphans freed.", o_freed);
#endif #endif
} }
@ -379,7 +379,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
if (my_instance->match && regcomp(&my_instance->re, my_instance->match, cflags)) if (my_instance->match && regcomp(&my_instance->re, my_instance->match, cflags))
{ {
MXS_ERROR("tee: Invalid regular expression '%s' for the match parameter.", MXS_ERROR("Invalid regular expression '%s' for the match parameter.",
my_instance->match); my_instance->match);
MXS_FREE(my_instance->match); MXS_FREE(my_instance->match);
MXS_FREE(my_instance->nomatch); MXS_FREE(my_instance->nomatch);
@ -391,7 +391,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
if (my_instance->nomatch && regcomp(&my_instance->nore, my_instance->nomatch, cflags)) if (my_instance->nomatch && regcomp(&my_instance->nore, my_instance->nomatch, cflags))
{ {
MXS_ERROR("tee: Invalid regular expression '%s' for the nomatch paramter.", MXS_ERROR("Invalid regular expression '%s' for the nomatch paramter.",
my_instance->nomatch); my_instance->nomatch);
if (my_instance->match) if (my_instance->match)
{ {
@ -927,7 +927,7 @@ int reset_session_state(TEE_SESSION* my_session, GWBUF* buffer)
{ {
case 0x1b: case 0x1b:
my_session->client_multistatement = *((unsigned char*) buffer->start + 5); my_session->client_multistatement = *((unsigned char*) buffer->start + 5);
MXS_INFO("tee: client %s multistatements", MXS_INFO("client %s multistatements",
my_session->client_multistatement ? "enabled" : "disabled"); my_session->client_multistatement ? "enabled" : "disabled");
case 0x03: case 0x03:
case 0x16: case 0x16:

View File

@ -213,7 +213,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
if (my_instance->match && if (my_instance->match &&
regcomp(&my_instance->re, my_instance->match, cflags)) regcomp(&my_instance->re, my_instance->match, cflags))
{ {
MXS_ERROR("topfilter: Invalid regular expression '%s'" MXS_ERROR("Invalid regular expression '%s'"
" for the 'match' parameter.", " for the 'match' parameter.",
my_instance->match); my_instance->match);
regfree(&my_instance->re); regfree(&my_instance->re);
@ -224,7 +224,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
if (my_instance->exclude && if (my_instance->exclude &&
regcomp(&my_instance->exre, my_instance->exclude, cflags)) regcomp(&my_instance->exre, my_instance->exclude, cflags))
{ {
MXS_ERROR("topfilter: Invalid regular expression '%s'" MXS_ERROR("Invalid regular expression '%s'"
" for the 'nomatch' parameter.\n", " for the 'nomatch' parameter.\n",
my_instance->exclude); my_instance->exclude);
regfree(&my_instance->exre); regfree(&my_instance->exre);

View File

@ -574,7 +574,7 @@ monitorMain(void *arg)
!(ptr->pending_status & SERVER_MASTER)) !(ptr->pending_status & SERVER_MASTER))
{ {
/* in this case server->status will not be updated from pending_status */ /* in this case server->status will not be updated from pending_status */
MXS_NOTICE("[mysql_mon]: root server [%s:%i] is no longer Master, let's " MXS_NOTICE("root server [%s:%i] is no longer Master, let's "
"use it again even if it could be a stale master, you have " "use it again even if it could be a stale master, you have "
"been warned!", ptr->server->name, ptr->server->port); "been warned!", ptr->server->name, ptr->server->port);
/* Set the STALE bit for this server in server struct */ /* Set the STALE bit for this server in server struct */

View File

@ -1442,7 +1442,7 @@ static void set_master_heartbeat(MYSQL_MONITOR *handle, MONITOR_SERVERS *databas
if (handle->master == NULL) if (handle->master == NULL)
{ {
MXS_ERROR("[mysql_mon]: set_master_heartbeat called without an available Master server"); MXS_ERROR("set_master_heartbeat called without an available Master server");
return; return;
} }
@ -1450,7 +1450,7 @@ static void set_master_heartbeat(MYSQL_MONITOR *handle, MONITOR_SERVERS *databas
if (mysql_query(database->con, "SELECT table_name FROM information_schema.tables " if (mysql_query(database->con, "SELECT table_name FROM information_schema.tables "
"WHERE table_schema = 'maxscale_schema' AND table_name = 'replication_heartbeat'")) "WHERE table_schema = 'maxscale_schema' AND table_name = 'replication_heartbeat'"))
{ {
MXS_ERROR( "[mysql_mon]: Error checking for replication_heartbeat in Master server" MXS_ERROR( "Error checking for replication_heartbeat in Master server"
": %s", mysql_error(database->con)); ": %s", mysql_error(database->con));
database->server->rlag = -1; database->server->rlag = -1;
} }
@ -1478,7 +1478,7 @@ static void set_master_heartbeat(MYSQL_MONITOR *handle, MONITOR_SERVERS *databas
"PRIMARY KEY ( master_server_id, maxscale_id ) ) " "PRIMARY KEY ( master_server_id, maxscale_id ) ) "
"ENGINE=MYISAM DEFAULT CHARSET=latin1")) "ENGINE=MYISAM DEFAULT CHARSET=latin1"))
{ {
MXS_ERROR("[mysql_mon]: Error creating maxscale_schema.replication_heartbeat " MXS_ERROR("Error creating maxscale_schema.replication_heartbeat "
"table in Master server: %s", mysql_error(database->con)); "table in Master server: %s", mysql_error(database->con));
database->server->rlag = -1; database->server->rlag = -1;
@ -1493,7 +1493,7 @@ static void set_master_heartbeat(MYSQL_MONITOR *handle, MONITOR_SERVERS *databas
if (mysql_query(database->con, heartbeat_purge_query)) if (mysql_query(database->con, heartbeat_purge_query))
{ {
MXS_ERROR("[mysql_mon]: Error deleting from maxscale_schema.replication_heartbeat " MXS_ERROR("Error deleting from maxscale_schema.replication_heartbeat "
"table: [%s], %s", "table: [%s], %s",
heartbeat_purge_query, heartbeat_purge_query,
mysql_error(database->con)); mysql_error(database->con));
@ -1514,7 +1514,7 @@ static void set_master_heartbeat(MYSQL_MONITOR *handle, MONITOR_SERVERS *databas
database->server->rlag = -1; database->server->rlag = -1;
MXS_ERROR("[mysql_mon]: Error updating maxscale_schema.replication_heartbeat table: [%s], %s", MXS_ERROR("Error updating maxscale_schema.replication_heartbeat table: [%s], %s",
heartbeat_insert_query, heartbeat_insert_query,
mysql_error(database->con)); mysql_error(database->con));
} }
@ -1532,7 +1532,7 @@ static void set_master_heartbeat(MYSQL_MONITOR *handle, MONITOR_SERVERS *databas
database->server->rlag = -1; database->server->rlag = -1;
MXS_ERROR("[mysql_mon]: Error inserting into " MXS_ERROR("Error inserting into "
"maxscale_schema.replication_heartbeat table: [%s], %s", "maxscale_schema.replication_heartbeat table: [%s], %s",
heartbeat_insert_query, heartbeat_insert_query,
mysql_error(database->con)); mysql_error(database->con));
@ -1542,7 +1542,7 @@ static void set_master_heartbeat(MYSQL_MONITOR *handle, MONITOR_SERVERS *databas
/* Set replication lag to 0 for the master */ /* Set replication lag to 0 for the master */
database->server->rlag = 0; database->server->rlag = 0;
MXS_DEBUG("[mysql_mon]: heartbeat table inserted data for %s:%i", MXS_DEBUG("heartbeat table inserted data for %s:%i",
database->server->name, database->server->port); database->server->name, database->server->port);
} }
} }
@ -1551,7 +1551,7 @@ static void set_master_heartbeat(MYSQL_MONITOR *handle, MONITOR_SERVERS *databas
/* Set replication lag as 0 for the master */ /* Set replication lag as 0 for the master */
database->server->rlag = 0; database->server->rlag = 0;
MXS_DEBUG("[mysql_mon]: heartbeat table updated for Master %s:%i", MXS_DEBUG("heartbeat table updated for Master %s:%i",
database->server->name, database->server->port); database->server->name, database->server->port);
} }
} }
@ -1576,7 +1576,7 @@ static void set_slave_heartbeat(MONITOR* mon, MONITOR_SERVERS *database)
if (handle->master == NULL) if (handle->master == NULL)
{ {
MXS_ERROR("[mysql_mon]: set_slave_heartbeat called without an available Master server"); MXS_ERROR("set_slave_heartbeat called without an available Master server");
return; return;
} }
@ -1648,14 +1648,14 @@ static void set_slave_heartbeat(MONITOR* mon, MONITOR_SERVERS *database)
if (handle->master->server->node_id < 0) if (handle->master->server->node_id < 0)
{ {
MXS_ERROR("[mysql_mon]: error: replication heartbeat: " MXS_ERROR("error: replication heartbeat: "
"master_server_id NOT available for %s:%i", "master_server_id NOT available for %s:%i",
database->server->name, database->server->name,
database->server->port); database->server->port);
} }
else else
{ {
MXS_ERROR("[mysql_mon]: error: replication heartbeat: " MXS_ERROR("error: replication heartbeat: "
"failed selecting from hearthbeat table of %s:%i : [%s], %s", "failed selecting from hearthbeat table of %s:%i : [%s], %s",
database->server->name, database->server->name,
database->server->port, database->server->port,

View File

@ -481,13 +481,13 @@ createInstance(SERVICE *service, char **options)
} }
else else
{ {
MXS_WARNING("[avrorouter] Unknown router option: '%s'", options[i]); MXS_WARNING("Unknown router option: '%s'", options[i]);
err = true; err = true;
} }
} }
else else
{ {
MXS_WARNING("[avrorouter] Unknown router option: '%s'", options[i]); MXS_WARNING("Unknown router option: '%s'", options[i]);
err = true; err = true;
} }
} }
@ -602,7 +602,7 @@ createInstance(SERVICE *service, char **options)
/* Start the scan, read, convert AVRO task */ /* Start the scan, read, convert AVRO task */
conversion_task_ctl(inst, true); conversion_task_ctl(inst, true);
MXS_INFO("AVRO: current MySQL binlog file is %s, pos is %lu\n", MXS_INFO("current MySQL binlog file is %s, pos is %lu\n",
inst->binlog_name, inst->current_pos); inst->binlog_name, inst->current_pos);
return (ROUTER *) inst; return (ROUTER *) inst;
@ -625,7 +625,7 @@ newSession(ROUTER *instance, SESSION *session)
AVRO_INSTANCE *inst = (AVRO_INSTANCE *) instance; AVRO_INSTANCE *inst = (AVRO_INSTANCE *) instance;
AVRO_CLIENT *client; AVRO_CLIENT *client;
MXS_DEBUG("avrorouter: %lu [newSession] new router session with " MXS_DEBUG("%lu [newSession] new router session with "
"session %p, and inst %p.", pthread_self(), session, inst); "session %p, and inst %p.", pthread_self(), session, inst);
if ((client = (AVRO_CLIENT *) MXS_CALLOC(1, sizeof(AVRO_CLIENT))) == NULL) if ((client = (AVRO_CLIENT *) MXS_CALLOC(1, sizeof(AVRO_CLIENT))) == NULL)

View File

@ -171,7 +171,7 @@ blr_start_master(void* data)
spinlock_release(&router->lock); spinlock_release(&router->lock);
if ((client = dcb_alloc(DCB_ROLE_INTERNAL, NULL)) == NULL) if ((client = dcb_alloc(DCB_ROLE_INTERNAL, NULL)) == NULL)
{ {
MXS_ERROR("Binlog router: failed to create DCB for dummy client"); MXS_ERROR("failed to create DCB for dummy client");
return; return;
} }
router->client = client; router->client = client;
@ -179,7 +179,7 @@ blr_start_master(void* data)
client->data = CreateMySQLAuthData(router->user, router->password, ""); client->data = CreateMySQLAuthData(router->user, router->password, "");
if ((router->session = session_alloc(router->service, client)) == NULL) if ((router->session = session_alloc(router->service, client)) == NULL)
{ {
MXS_ERROR("Binlog router: failed to create session for connection to master"); MXS_ERROR("failed to create session for connection to master");
return; return;
} }
client->session = router->session; client->session = router->session;
@ -198,7 +198,7 @@ blr_start_master(void* data)
{ {
router->retry_backoff = BLR_MAX_BACKOFF; router->retry_backoff = BLR_MAX_BACKOFF;
} }
MXS_ERROR("Binlog router: failed to connect to master server '%s'", MXS_ERROR("failed to connect to master server '%s'",
router->service->dbref->server->unique_name); router->service->dbref->server->unique_name);
return; return;
} }

View File

@ -367,7 +367,7 @@ execute(ROUTER *rinstance, void *router_session, GWBUF *queue)
case COM_QUIT: case COM_QUIT:
break; break;
default: default:
MXS_ERROR("maxinfo: Unexpected MySQL command 0x%x", MXS_ERROR("Unexpected MySQL command 0x%x",
MYSQL_COMMAND(queue)); MYSQL_COMMAND(queue));
break; break;
} }
@ -603,7 +603,7 @@ maxinfo_execute_query(INFO_INSTANCE *instance, INFO_SESSION *session, char *sql)
MAXINFO_TREE *tree; MAXINFO_TREE *tree;
PARSE_ERROR err; PARSE_ERROR err;
MXS_INFO("maxinfo: SQL statement: '%s' for 0x%p.", MXS_INFO("SQL statement: '%s' for 0x%p.",
sql, session->dcb); sql, session->dcb);
if (strcmp(sql, "select @@version_comment limit 1") == 0) if (strcmp(sql, "select @@version_comment limit 1") == 0)
{ {

View File

@ -442,7 +442,7 @@ newSession(ROUTER *instance, SESSION *session)
CHK_CLIENT_RSES(client_rses); CHK_CLIENT_RSES(client_rses);
MXS_INFO("Readconnroute: New session for server %s. Connections : %d", MXS_INFO("New session for server %s. Connections : %d",
candidate->server->unique_name, candidate->connections); candidate->server->unique_name, candidate->connections);
return(void *) client_rses; return(void *) client_rses;

View File

@ -1000,9 +1000,7 @@ bool handle_hinted_target(ROUTER_CLIENT_SES *rses, GWBUF *querybuf,
* backend server. * backend server.
*/ */
named_server = hint->data; named_server = hint->data;
MXS_INFO("Hint: route to server " MXS_INFO("Hint: route to server '%s'", named_server);
"'%s'",
named_server);
} }
else if (hint->type == HINT_PARAMETER && else if (hint->type == HINT_PARAMETER &&
(strncasecmp((char *)hint->data, "max_slave_replication_lag", (strncasecmp((char *)hint->data, "max_slave_replication_lag",

View File

@ -305,7 +305,7 @@ showdb_response_t parse_showdb_response(ROUTER_CLIENT_SES* rses, backend_ref_t*
if (PTR_IS_ERR(ptr)) if (PTR_IS_ERR(ptr))
{ {
MXS_INFO("schemarouter: SHOW DATABASES returned an error."); MXS_INFO("SHOW DATABASES returned an error.");
gwbuf_free(buf); gwbuf_free(buf);
return SHOWDB_FATAL_ERROR; return SHOWDB_FATAL_ERROR;
} }
@ -320,7 +320,7 @@ showdb_response_t parse_showdb_response(ROUTER_CLIENT_SES* rses, backend_ref_t*
if (ptr >= (unsigned char*) buf->end) if (ptr >= (unsigned char*) buf->end)
{ {
MXS_INFO("schemarouter: Malformed packet for SHOW DATABASES."); MXS_INFO("Malformed packet for SHOW DATABASES.");
*buffer = gwbuf_append(buf, *buffer); *buffer = gwbuf_append(buf, *buffer);
return SHOWDB_FATAL_ERROR; return SHOWDB_FATAL_ERROR;
} }
@ -341,7 +341,7 @@ showdb_response_t parse_showdb_response(ROUTER_CLIENT_SES* rses, backend_ref_t*
{ {
if (hashtable_add(rses->shardmap->hash, data, target)) if (hashtable_add(rses->shardmap->hash, data, target))
{ {
MXS_INFO("schemarouter: <%s, %s>", target, data); MXS_INFO("<%s, %s>", target, data);
} }
else else
{ {
@ -368,12 +368,12 @@ showdb_response_t parse_showdb_response(ROUTER_CLIENT_SES* rses, backend_ref_t*
if (ptr < (unsigned char*) buf->end && PTR_IS_EOF(ptr) && bref->n_mapping_eof == 1) if (ptr < (unsigned char*) buf->end && PTR_IS_EOF(ptr) && bref->n_mapping_eof == 1)
{ {
atomic_add(&bref->n_mapping_eof, 1); atomic_add(&bref->n_mapping_eof, 1);
MXS_INFO("schemarouter: SHOW DATABASES fully received from %s.", MXS_INFO("SHOW DATABASES fully received from %s.",
bref->bref_backend->server->unique_name); bref->bref_backend->server->unique_name);
} }
else else
{ {
MXS_INFO("schemarouter: SHOW DATABASES partially received from %s.", MXS_INFO("SHOW DATABASES partially received from %s.",
bref->bref_backend->server->unique_name); bref->bref_backend->server->unique_name);
} }
@ -434,7 +434,7 @@ int gen_databaselist(ROUTER_INSTANCE* inst, ROUTER_CLIENT_SES* session)
clone = gwbuf_clone(buffer); clone = gwbuf_clone(buffer);
dcb = session->rses_backend_ref[i].bref_dcb; dcb = session->rses_backend_ref[i].bref_dcb;
rval |= !dcb->func.write(dcb, clone); rval |= !dcb->func.write(dcb, clone);
MXS_DEBUG("schemarouter: Wrote SHOW DATABASES to %s for session %p: returned %d", MXS_DEBUG("Wrote SHOW DATABASES to %s for session %p: returned %d",
session->rses_backend_ref[i].bref_backend->server->unique_name, session->rses_backend_ref[i].bref_backend->server->unique_name,
session->rses_client_dcb->session, session->rses_client_dcb->session,
rval); rval);
@ -481,7 +481,7 @@ char* get_shard_target_name(ROUTER_INSTANCE* router,
/** Warn about improper usage of the router */ /** Warn about improper usage of the router */
if (rval && strcmp(name, rval) != 0) if (rval && strcmp(name, rval) != 0)
{ {
MXS_ERROR("Schemarouter: Query targets databases on servers '%s' and '%s'. " MXS_ERROR("Query targets databases on servers '%s' and '%s'. "
"Cross database queries across servers are not supported.", "Cross database queries across servers are not supported.",
rval, name); rval, name);
} }
@ -489,7 +489,7 @@ char* get_shard_target_name(ROUTER_INSTANCE* router,
{ {
rval = name; rval = name;
has_dbs = true; has_dbs = true;
MXS_INFO("schemarouter: Query targets database '%s' on server '%s'", dbnms[i], rval); MXS_INFO("Query targets database '%s' on server '%s'", dbnms[i], rval);
} }
} }
} }
@ -513,7 +513,7 @@ char* get_shard_target_name(ROUTER_INSTANCE* router,
if (tmp) if (tmp)
{ {
MXS_INFO("schemarouter: SHOW TABLES with specific database '%s' on server '%s'", tok, tmp); MXS_INFO("SHOW TABLES with specific database '%s' on server '%s'", tok, tmp);
} }
} }
MXS_FREE(query); MXS_FREE(query);
@ -521,7 +521,7 @@ char* get_shard_target_name(ROUTER_INSTANCE* router,
if (tmp == NULL) if (tmp == NULL)
{ {
rval = (char*) hashtable_fetch(ht, client->current_db); rval = (char*) hashtable_fetch(ht, client->current_db);
MXS_INFO("schemarouter: SHOW TABLES query, current database '%s' on server '%s'", MXS_INFO("SHOW TABLES query, current database '%s' on server '%s'",
client->current_db, rval); client->current_db, rval);
} }
else else
@ -541,7 +541,7 @@ char* get_shard_target_name(ROUTER_INSTANCE* router,
if (strcmp(srvnm, buffer->hint->data) == 0) if (strcmp(srvnm, buffer->hint->data) == 0)
{ {
rval = srvnm; rval = srvnm;
MXS_INFO("schemarouter: Routing hint found (%s)", srvnm); MXS_INFO("Routing hint found (%s)", srvnm);
} }
} }
} }
@ -556,7 +556,7 @@ char* get_shard_target_name(ROUTER_INSTANCE* router,
rval = (char*) hashtable_fetch(ht, client->current_db); rval = (char*) hashtable_fetch(ht, client->current_db);
if (rval) if (rval)
{ {
MXS_INFO("schemarouter: Using active database '%s'", client->current_db); MXS_INFO("Using active database '%s'", client->current_db);
} }
} }
} }
@ -704,7 +704,7 @@ static ROUTER* createInstance(SERVICE *service, char **options)
if ((config_get_param(conf, "auth_all_servers")) == NULL) if ((config_get_param(conf, "auth_all_servers")) == NULL)
{ {
MXS_NOTICE("Schemarouter: Authentication data is fetched from all servers. To disable this " MXS_NOTICE("Authentication data is fetched from all servers. To disable this "
"add 'auth_all_servers=0' to the service."); "add 'auth_all_servers=0' to the service.");
service->users_from_all = true; service->users_from_all = true;
} }
@ -767,7 +767,7 @@ static ROUTER* createInstance(SERVICE *service, char **options)
if (value == NULL) if (value == NULL)
{ {
MXS_ERROR("Unknown router options for Schemarouter: %s", options[i]); MXS_ERROR("Unknown router options for %s", options[i]);
failure = true; failure = true;
break; break;
} }
@ -797,7 +797,7 @@ static ROUTER* createInstance(SERVICE *service, char **options)
} }
else else
{ {
MXS_ERROR("Unknown router options for Schemarouter: %s", options[i]); MXS_ERROR("Unknown router options for %s", options[i]);
failure = true; failure = true;
break; break;
} }
@ -871,13 +871,13 @@ static void* newSession(ROUTER* router_inst, SESSION* session)
strcpy(db, data->db); strcpy(db, data->db);
*data->db = 0; *data->db = 0;
using_db = true; using_db = true;
MXS_INFO("schemarouter: Client logging in directly to a database '%s', " MXS_INFO("Client logging in directly to a database '%s', "
"postponing until databases have been mapped.", db); "postponing until databases have been mapped.", db);
} }
if (!have_db) if (!have_db)
{ {
MXS_INFO("schemarouter: Client'%s' connecting with empty database.", data->user); MXS_INFO("Client'%s' connecting with empty database.", data->user);
} }
spinlock_release(&session->ses_lock); spinlock_release(&session->ses_lock);
@ -1665,7 +1665,7 @@ static int routeQuery(ROUTER* instance,
{ {
int init_rval = 1; int init_rval = 1;
char* querystr = modutil_get_SQL(querybuf); char* querystr = modutil_get_SQL(querybuf);
MXS_INFO("schemarouter: Storing query for session %p: %s", MXS_INFO("Storing query for session %p: %s",
router_cli_ses->rses_client_dcb->session, router_cli_ses->rses_client_dcb->session,
querystr); querystr);
MXS_FREE(querystr); MXS_FREE(querystr);
@ -1897,14 +1897,14 @@ static int routeQuery(ROUTER* instance,
if (tname) if (tname)
{ {
MXS_INFO("schemarouter: INIT_DB for database '%s' on server '%s'", MXS_INFO("INIT_DB for database '%s' on server '%s'",
router_cli_ses->current_db, tname); router_cli_ses->current_db, tname);
route_target = TARGET_NAMED_SERVER; route_target = TARGET_NAMED_SERVER;
targetserver = MXS_STRDUP_A(tname); targetserver = MXS_STRDUP_A(tname);
} }
else else
{ {
MXS_INFO("schemarouter: INIT_DB with unknown database"); MXS_INFO("INIT_DB with unknown database");
} }
spinlock_release(&router_cli_ses->shardmap->lock); spinlock_release(&router_cli_ses->shardmap->lock);
} }
@ -1927,7 +1927,7 @@ static int routeQuery(ROUTER* instance,
} }
else else
{ {
MXS_INFO("schemarouter: Backend server '%s' is not in a viable state", tname); MXS_INFO("Backend server '%s' is not in a viable state", tname);
/** /**
* Shard is not a viable target right now so we check * Shard is not a viable target right now so we check
@ -1956,7 +1956,7 @@ static int routeQuery(ROUTER* instance,
*/ */
route_target = TARGET_ANY; route_target = TARGET_ANY;
MXS_INFO("schemarouter: Routing query to first available backend."); MXS_INFO("Routing query to first available backend.");
} }
else else
@ -2032,7 +2032,7 @@ static int routeQuery(ROUTER* instance,
if (TARGET_IS_ANY(route_target)) if (TARGET_IS_ANY(route_target))
{ {
/**No valid backends alive*/ /**No valid backends alive*/
MXS_ERROR("Schemarouter: Failed to route query, no backends are available."); MXS_ERROR("Failed to route query, no backends are available.");
rses_end_locked_router_action(router_cli_ses); rses_end_locked_router_action(router_cli_ses);
ret = 0; ret = 0;
goto retblock; goto retblock;
@ -2290,7 +2290,7 @@ static void clientReply(ROUTER* instance,
return; return;
} }
MXS_DEBUG("schemarouter: Reply from [%s] session [%p]" MXS_DEBUG("Reply from [%s] session [%p]"
" mapping [%s] queries queued [%s]", " mapping [%s] queries queued [%s]",
bref->bref_backend->server->unique_name, bref->bref_backend->server->unique_name,
router_cli_ses->rses_client_dcb->session, router_cli_ses->rses_client_dcb->session,
@ -2364,7 +2364,7 @@ static void clientReply(ROUTER* instance,
if (router_cli_ses->init & INIT_USE_DB) if (router_cli_ses->init & INIT_USE_DB)
{ {
MXS_DEBUG("schemarouter: Reply to USE '%s' received for session %p", MXS_DEBUG("Reply to USE '%s' received for session %p",
router_cli_ses->connect_db, router_cli_ses->connect_db,
router_cli_ses->rses_client_dcb->session); router_cli_ses->rses_client_dcb->session);
router_cli_ses->init &= ~INIT_USE_DB; router_cli_ses->init &= ~INIT_USE_DB;
@ -2465,7 +2465,7 @@ static void clientReply(ROUTER* instance,
unsigned char* cmd = (unsigned char*) writebuf->start; unsigned char* cmd = (unsigned char*) writebuf->start;
int state = router_cli_ses->init; int state = router_cli_ses->init;
/** Write reply to client DCB */ /** Write reply to client DCB */
MXS_INFO("schemarouter: returning reply [%s] " MXS_INFO("returning reply [%s] "
"state [%s] session [%p]", "state [%s] session [%p]",
PTR_IS_ERR(cmd) ? "ERR" : PTR_IS_OK(cmd) ? "OK" : "RSET", PTR_IS_ERR(cmd) ? "ERR" : PTR_IS_OK(cmd) ? "OK" : "RSET",
state & INIT_UNINT ? "UNINIT" : state & INIT_MAPPING ? "MAPPING" : "READY", state & INIT_UNINT ? "UNINIT" : state & INIT_MAPPING ? "MAPPING" : "READY",
@ -3861,7 +3861,7 @@ static int router_handle_state_switch(DCB* dcb,
{ {
case DCB_REASON_NOT_RESPONDING: case DCB_REASON_NOT_RESPONDING:
atomic_add(&bref->bref_backend->connections, -1); atomic_add(&bref->bref_backend->connections, -1);
MXS_INFO("schemarouter: server %s not responding", srv->unique_name); MXS_INFO("server %s not responding", srv->unique_name);
dcb->func.hangup(dcb); dcb->func.hangup(dcb);
break; break;
@ -4057,7 +4057,7 @@ bool handle_default_db(ROUTER_CLIENT_SES *router_cli_ses)
if (get_shard_dcb(&dcb, router_cli_ses, target)) if (get_shard_dcb(&dcb, router_cli_ses, target))
{ {
dcb->func.write(dcb, buffer); dcb->func.write(dcb, buffer);
MXS_DEBUG("schemarouter: USE '%s' sent to %s for session %p", MXS_DEBUG("USE '%s' sent to %s for session %p",
router_cli_ses->connect_db, router_cli_ses->connect_db,
target, target,
router_cli_ses->rses_client_dcb->session); router_cli_ses->rses_client_dcb->session);
@ -4065,7 +4065,7 @@ bool handle_default_db(ROUTER_CLIENT_SES *router_cli_ses)
} }
else else
{ {
MXS_INFO("schemarouter: Couldn't find target DCB for '%s'.", target); MXS_INFO("Couldn't find target DCB for '%s'.", target);
} }
} }
else else
@ -4076,7 +4076,7 @@ bool handle_default_db(ROUTER_CLIENT_SES *router_cli_ses)
else else
{ {
/** Unknown database, hang up on the client*/ /** Unknown database, hang up on the client*/
MXS_INFO("schemarouter: Connecting to a non-existent database '%s'", MXS_INFO("Connecting to a non-existent database '%s'",
router_cli_ses->connect_db); router_cli_ses->connect_db);
char errmsg[128 + MYSQL_DATABASE_MAXLEN + 1]; char errmsg[128 + MYSQL_DATABASE_MAXLEN + 1];
sprintf(errmsg, "Unknown database '%s'", router_cli_ses->connect_db); sprintf(errmsg, "Unknown database '%s'", router_cli_ses->connect_db);
@ -4101,7 +4101,7 @@ void route_queued_query(ROUTER_CLIENT_SES *router_cli_ses)
tmp->next = NULL; tmp->next = NULL;
#ifdef SS_DEBUG #ifdef SS_DEBUG
char* querystr = modutil_get_SQL(tmp); char* querystr = modutil_get_SQL(tmp);
MXS_DEBUG("schemarouter: Sending queued buffer for session %p: %s", MXS_DEBUG("Sending queued buffer for session %p: %s",
router_cli_ses->rses_client_dcb->session, router_cli_ses->rses_client_dcb->session,
querystr); querystr);
MXS_FREE(querystr); MXS_FREE(querystr);
@ -4137,7 +4137,7 @@ int inspect_backend_mapping_states(ROUTER_CLIENT_SES *router_cli_ses,
if (rc == SHOWDB_FULL_RESPONSE) if (rc == SHOWDB_FULL_RESPONSE)
{ {
router_cli_ses->rses_backend_ref[i].bref_mapped = true; router_cli_ses->rses_backend_ref[i].bref_mapped = true;
MXS_DEBUG("schemarouter: Received SHOW DATABASES reply from %s for session %p", MXS_DEBUG("Received SHOW DATABASES reply from %s for session %p",
router_cli_ses->rses_backend_ref[i].bref_backend->server->unique_name, router_cli_ses->rses_backend_ref[i].bref_backend->server->unique_name,
router_cli_ses->rses_client_dcb->session); router_cli_ses->rses_client_dcb->session);
} }
@ -4145,7 +4145,7 @@ int inspect_backend_mapping_states(ROUTER_CLIENT_SES *router_cli_ses,
{ {
bref->map_queue = writebuf; bref->map_queue = writebuf;
writebuf = NULL; writebuf = NULL;
MXS_DEBUG("schemarouter: Received partial SHOW DATABASES reply from %s for session %p", MXS_DEBUG("Received partial SHOW DATABASES reply from %s for session %p",
router_cli_ses->rses_backend_ref[i].bref_backend->server->unique_name, router_cli_ses->rses_backend_ref[i].bref_backend->server->unique_name,
router_cli_ses->rses_client_dcb->session); router_cli_ses->rses_client_dcb->session);
} }
@ -4198,7 +4198,7 @@ int inspect_backend_mapping_states(ROUTER_CLIENT_SES *router_cli_ses,
if (BREF_IS_IN_USE(&bkrf[i]) && !BREF_IS_MAPPED(&bkrf[i])) if (BREF_IS_IN_USE(&bkrf[i]) && !BREF_IS_MAPPED(&bkrf[i]))
{ {
mapped = false; mapped = false;
MXS_DEBUG("schemarouter: Still waiting for reply to SHOW DATABASES from %s for session %p", MXS_DEBUG("Still waiting for reply to SHOW DATABASES from %s for session %p",
bkrf[i].bref_backend->server->unique_name, bkrf[i].bref_backend->server->unique_name,
router_cli_ses->rses_client_dcb->session); router_cli_ses->rses_client_dcb->session);
} }