Commit 761b9bde authored by Alexander Nozdrin's avatar Alexander Nozdrin

A patch for Bug#48915 (After having switched off the ipv6 support in OS,

mysqld crashed in network_init()).

The problem was that current_thd was not ready at that point in mysqld life,
so ER() macro could not be used.

The fix is to use ER_DEFAULT() macro, which is intented for such cases.
parent 11c3d86f
...@@ -1670,7 +1670,7 @@ static void network_init(void) ...@@ -1670,7 +1670,7 @@ static void network_init(void)
if (error != 0) if (error != 0)
{ {
DBUG_PRINT("error",("Got error: %d from getaddrinfo()", error)); DBUG_PRINT("error",("Got error: %d from getaddrinfo()", error));
sql_perror(ER(ER_IPSOCK_ERROR)); /* purecov: tested */ sql_perror(ER_DEFAULT(ER_IPSOCK_ERROR)); /* purecov: tested */
unireg_abort(1); /* purecov: tested */ unireg_abort(1); /* purecov: tested */
} }
...@@ -1684,7 +1684,7 @@ static void network_init(void) ...@@ -1684,7 +1684,7 @@ static void network_init(void)
if (ip_sock == INVALID_SOCKET) if (ip_sock == INVALID_SOCKET)
{ {
DBUG_PRINT("error",("Got error: %d from socket()",socket_errno)); DBUG_PRINT("error",("Got error: %d from socket()",socket_errno));
sql_perror(ER(ER_IPSOCK_ERROR)); /* purecov: tested */ sql_perror(ER_DEFAULT(ER_IPSOCK_ERROR)); /* purecov: tested */
unireg_abort(1); /* purecov: tested */ unireg_abort(1); /* purecov: tested */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment