Below is the list of changes that have just been committed into a local
5.1 repository of zhl. When zhl does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-12-01 20:57:07+00:00, lzhou@stripped +1 -0
BUG#22025 Return correct error message when transporter error occored
storage/ndb/src/common/debugger/EventLogger.cpp@stripped, 2006-12-01 20:57:00+00:00, lzhou@stripped +93 -4
Add correct error string
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: lzhou
# Host: ts3-34.ts.cn.tlan
# Root: /home/zhl/mysql/mysql-5.1/bug22025
--- 1.27/storage/ndb/src/common/debugger/EventLogger.cpp 2006-12-01 20:57:24 +00:00
+++ 1.28/storage/ndb/src/common/debugger/EventLogger.cpp 2006-12-01 20:57:24 +00:00
@@ -527,11 +527,100 @@
theData[1],
theData[2]);
}
+
void getTextTransporterError(QQQQ) {
- BaseString::snprintf(m_text, m_text_len,
- "Transporter to node %d reported error 0x%x",
- theData[1],
- theData[2]);
+ struct myTransporterError{
+ int errorNum;
+ char errorString[256];
+ };
+ int i = 0;
+ int lenth = 0;
+ static const struct myTransporterError TransporterErrorString[]=
+ {
+ //TE_NO_ERROR = 0
+ {0,"No error"},
+ //TE_ERROR_CLOSING_SOCKET = 0x1
+ {0x1,"Error found during closing of socket"},
+ //TE_ERROR_IN_SELECT_BEFORE_ACCEPT = 0x2
+ {0x2,"Error found before accept. The transporter will retry"},
+ //TE_INVALID_MESSAGE_LENGTH = 0x3 | TE_DO_DISCONNECT
+ {0x3 | 0x8000,"Error found in message (invalid message length)"},
+ //TE_INVALID_CHECKSUM = 0x4 | TE_DO_DISCONNECT
+ {0x4 | 0x8000,"Error found in message (checksum)"},
+ //TE_COULD_NOT_CREATE_SOCKET = 0x5
+ {0x5,"Error found while creating socket(can't create socket)"},
+ //TE_COULD_NOT_BIND_SOCKET = 0x6
+ {0x6,"Error found while binding server socket"},
+ //TE_LISTEN_FAILED = 0x7
+ {0x7,"Error found while listening to server socket"},
+ //TE_ACCEPT_RETURN_ERROR = 0x8
+ {0x8,"Error found during accept(accept return error)"},
+ //TE_SHM_DISCONNECT = 0xb | TE_DO_DISCONNECT
+ {0xb | 0x8000,"The remote node has disconnected"},
+ //TE_SHM_IPC_STAT = 0xc | TE_DO_DISCONNECT
+ {0xc | 0x8000,"Unable to check shm segment"},
+ //TE_SHM_UNABLE_TO_CREATE_SEGMENT = 0xd
+ {0xd,"Unable to create shm segment"},
+ //TE_SHM_UNABLE_TO_ATTACH_SEGMENT = 0xe
+ {0xe,"Unable to attach shm segment"},
+ //TE_SHM_UNABLE_TO_REMOVE_SEGMENT = 0xf
+ {0xf,"Unable to remove shm segment"},
+ //TE_TOO_SMALL_SIGID = 0x10
+ {0x10,"Sig ID too small"},
+ //TE_TOO_LARGE_SIGID = 0x11
+ {0x11,"Sig ID too large"},
+ //TE_WAIT_STACK_FULL = 0x12 | TE_DO_DISCONNECT
+ {0x12 | 0x8000,"Wait stack was full"},
+ //TE_RECEIVE_BUFFER_FULL = 0x13 | TE_DO_DISCONNECT
+ {0x13 | 0x8000,"Receive buffer was full"},
+ //TE_SIGNAL_LOST_SEND_BUFFER_FULL = 0x14 | TE_DO_DISCONNECT
+ {0x14 | 0x8000,"Send buffer was full,and trying to force send fails"},
+ //TE_SIGNAL_LOST = 0x15
+ {0x15,"Send failed for unknown reason(signal lost)"},
+ //TE_SEND_BUFFER_FULL = 0x16
+ {0x16,"The send buffer was full, but sleeping for a while solved"},
+ //TE_SCI_LINK_ERROR = 0x0017
+ {0x0017,"There is no link from this node to the switch"},
+ //TE_SCI_UNABLE_TO_START_SEQUENCE = 0x18 | TE_DO_DISCONNECT
+ {0x18 | 0x8000,"Could not start a sequence, because system resources are exumed or no sequence has been created"},
+ //TE_SCI_UNABLE_TO_REMOVE_SEQUENCE = 0x19 | TE_DO_DISCONNECT
+ {0x19 | 0x8000,"Could not remove a sequence"},
+ //TE_SCI_UNABLE_TO_CREATE_SEQUENCE = 0x1a | TE_DO_DISCONNECT
+ {0x1a | 0x8000,"Could not create a sequence, because system resources are exempted. Must reboot"},
+ //TE_SCI_UNRECOVERABLE_DATA_TFX_ERROR = 0x1b | TE_DO_DISCONNECT
+ {0x1b | 0x8000,"Tried to send data on redundant link but failed"},
+ //TE_SCI_CANNOT_INIT_LOCALSEGMENT = 0x1c | TE_DO_DISCONNECT
+ {0x1c | 0x8000,"Cannot initialize local segment"},
+ //TE_SCI_CANNOT_MAP_REMOTESEGMENT = 0x1d | TE_DO_DISCONNEC
+ {0x1d | 0x8000,"Cannot map remote segment"},
+ //TE_SCI_UNABLE_TO_UNMAP_SEGMENT = 0x1e | TE_DO_DISCONNECT
+ {0x1e | 0x8000,"Cannot free the resources used by this segment (step 1)"},
+ //TE_SCI_UNABLE_TO_REMOVE_SEGMENT = 0x1f | TE_DO_DISCONNEC
+ {0x1f | 0x8000,"Cannot free the resources used by this segment (step 2)"},
+ //TE_SCI_UNABLE_TO_DISCONNECT_SEGMENT = 0x20 | TE_DO_DISCONNECT
+ {0x20 | 0x8000,"Cannot disconnect from a remote segment"},
+ //TE_SHM_IPC_PERMANENT = 0x21
+ {0x21,"Shm ipc Permanent error"},
+ //TE_SCI_UNABLE_TO_CLOSE_CHANNEL = 0x22
+ {0x22,"Unable to close the sci channel and the resources allocated"}
+ };
+
+ lenth = sizeof(TransporterErrorString)/sizeof(struct myTransporterError);
+ for(i=0; i<lenth; i++)
+ {
+ if(theData[2] == TransporterErrorString[i].errorNum)
+ {
+ BaseString::snprintf(m_text, m_text_len,
+ "Transporter to node %d reported error: %s",
+ theData[1],
+ TransporterErrorString[i].errorString);
+ break;
+ }
+ }
+ if(i == lenth)
+ BaseString::snprintf(m_text, m_text_len,
+ "Transporter to node %d reported error: no such error",
+ theData[1]);
}
void getTextTransporterWarning(QQQQ) {
getTextTransporterError(m_text, m_text_len, theData);
| Thread |
|---|
| • bk commit into 5.1 tree (lzhou:1.2321) BUG#22025 | lzhou | 1 Dec |