I think we can put rcode to errno inside wsrep->connect, since return type wsrep_status_t could only presents few status.
And change wsrep-mysql code as
=== modified file 'sql/wsrep_mysqld.cc' --- sql/wsrep_mysqld.cc 2014-05-04 07:12:59 +0000 +++ sql/wsrep_mysqld.cc 2014-05-13 08:53:08 +0000 @@ -810,19 +810,8 @@ wsrep_sst_donor, bootstrap))) { - if (-ESOCKTNOSUPPORT == rcode) - { - DBUG_PRINT("wsrep",("unrecognized cluster address: '%s', rcode: %d", - wsrep_cluster_address, rcode)); - WSREP_ERROR("unrecognized cluster address: '%s', rcode: %d", - wsrep_cluster_address, rcode); - } - else - { - DBUG_PRINT("wsrep",("wsrep->connect() failed: %d", rcode)); - WSREP_ERROR("wsrep::connect() failed: %d", rcode); - } - + DBUG_PRINT("wsrep",("wsrep->connect(%s) failed: %m", wsrep_cluster_address)); + WSREP_ERROR("wsrep->connect(%s) failed: %m", wsrep_cluster_address); return false; } else
I think we can put rcode to errno inside wsrep->connect, since return type wsrep_status_t could only presents few status.
And change wsrep-mysql code as
=== modified file 'sql/wsrep_ mysqld. cc'
wsrep_ sst_donor,
bootstrap) )) "wsrep" ,("unrecognized cluster address: '%s', rcode: %d", address, rcode)); "unrecognized cluster address: '%s', rcode: %d", address, rcode); "wsrep" ,("wsrep- >connect( ) failed: %d", rcode)); "wsrep: :connect( ) failed: %d", rcode); "wsrep" ,("wsrep- >connect( %s) failed: %m", wsrep_cluster_ address) ); "wsrep- >connect( %s) failed: %m", wsrep_cluster_ address) ;
--- sql/wsrep_mysqld.cc 2014-05-04 07:12:59 +0000
+++ sql/wsrep_mysqld.cc 2014-05-13 08:53:08 +0000
@@ -810,19 +810,8 @@
{
- if (-ESOCKTNOSUPPORT == rcode)
- {
- DBUG_PRINT(
- wsrep_cluster_
- WSREP_ERROR(
- wsrep_cluster_
- }
- else
- {
- DBUG_PRINT(
- WSREP_ERROR(
- }
-
+ DBUG_PRINT(
+ WSREP_ERROR(
return false;
}
else