Put errors ganerating code behind FAKE_CODE macro, which is not defined by default in any build.
This commit is contained in:
@ -836,9 +836,6 @@ int gw_read_client_event(
|
||||
}
|
||||
else
|
||||
{
|
||||
GWBUF* errbuf;
|
||||
bool succp;
|
||||
|
||||
modutil_send_mysql_err_packet(dcb,
|
||||
1,
|
||||
0,
|
||||
@ -1108,7 +1105,7 @@ int gw_MySQLAccept(DCB *listener)
|
||||
|
||||
retry_accept:
|
||||
|
||||
#if defined(SS_DEBUG)
|
||||
#if defined(FAKE_CODE)
|
||||
if (fail_next_accept > 0)
|
||||
{
|
||||
c_sock = -1;
|
||||
@ -1116,16 +1113,16 @@ int gw_MySQLAccept(DCB *listener)
|
||||
fail_next_accept -= 1;
|
||||
} else {
|
||||
fail_accept_errno = 0;
|
||||
#endif /* SS_DEBUG */
|
||||
#endif /* FAKE_CODE */
|
||||
// new connection from client
|
||||
c_sock = accept(listener->fd,
|
||||
(struct sockaddr *) &client_conn,
|
||||
&client_len);
|
||||
eno = errno;
|
||||
errno = 0;
|
||||
#if defined(SS_DEBUG)
|
||||
#if defined(FAKE_CODE)
|
||||
}
|
||||
#endif /* SS_DEBUG */
|
||||
#endif /* FAKE_CODE */
|
||||
|
||||
if (c_sock == -1) {
|
||||
|
||||
|
@ -414,7 +414,7 @@ struct subcommand disableoptions[] = {
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(SS_DEBUG)
|
||||
#if defined(FAKE_CODE)
|
||||
|
||||
static void fail_backendfd(void);
|
||||
static void fail_clientfd(void);
|
||||
@ -456,7 +456,7 @@ struct subcommand failoptions[] = {
|
||||
{0, 0, 0}
|
||||
}
|
||||
};
|
||||
#endif /* SS_DEBUG */
|
||||
#endif /* FAKE_CODE */
|
||||
|
||||
static void telnetdAddUser(DCB *, char *, char *);
|
||||
/**
|
||||
@ -502,9 +502,9 @@ static struct {
|
||||
{ "clear", clearoptions },
|
||||
{ "disable", disableoptions },
|
||||
{ "enable", enableoptions },
|
||||
#if defined(SS_DEBUG)
|
||||
#if defined(FAKE_CODE)
|
||||
{ "fail", failoptions },
|
||||
#endif
|
||||
#endif /* FAKE_CODE */
|
||||
{ "list", listoptions },
|
||||
{ "reload", reloadoptions },
|
||||
{ "remove", removeoptions },
|
||||
@ -1113,7 +1113,7 @@ static void disable_log_action(DCB *dcb, char *arg1) {
|
||||
skygw_log_disable(type);
|
||||
}
|
||||
|
||||
#if defined(SS_DEBUG)
|
||||
#if defined(FAKE_CODE)
|
||||
static void fail_backendfd(void)
|
||||
{
|
||||
fail_next_backend_fd = true;
|
||||
@ -1157,4 +1157,4 @@ static void fail_accept(
|
||||
return ;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* FAKE_CODE */
|
||||
|
Reference in New Issue
Block a user