diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-12-01 19:59:31 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-12-01 19:59:31 +0300 |
commit | 273454b969bcb42d8f1e5d047352851bce530a63 (patch) | |
tree | bd2716172ac924f081dba7be2d6501243baf9b2f | |
parent | f9837a17c78aefda8a1f4104b26c1f54c0286fe7 (diff) | |
download | mariadb-git-273454b969bcb42d8f1e5d047352851bce530a63.tar.gz |
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.
-rw-r--r-- | sql/mysqld.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 5f00fa0ec64..6ad66c6f878 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1670,7 +1670,7 @@ static void network_init(void) if (error != 0) { 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 */ } @@ -1684,7 +1684,7 @@ static void network_init(void) if (ip_sock == INVALID_SOCKET) { 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 */ } |