Comment 1 for bug 1290526

Revision history for this message
Yan Zhang (yan.zhang) wrote :

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