Below is the list of changes that have just been committed into a local
5.0 repository of root. When root 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-11-01 10:50:19+00:00, lzhou@stripped +3 -0
BUG#21052 Modify the overflow error existed in last patch.
ndb/include/ndbapi/ndberror.h@stripped, 2006-11-01 10:50:17+00:00, lzhou@stripped
+1 -1
Change unsigned int to int
ndb/src/mgmsrv/Services.cpp@stripped, 2006-11-01 10:50:17+00:00, lzhou@stripped
+6 -3
Modify the overflow error existed in last patch. Change ther length of m_text to 512.
ndb/src/ndbapi/ndberror.c@stripped, 2006-11-01 10:50:17+00:00, lzhou@stripped +5
-2
Change the parameter of ndb_error_string from unsinged int to int.
# 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: dev3-138.dev.cn.tlan
# Root: /home/zhl/mysql/mysql-5.0/bug21052
--- 1.70/ndb/src/mgmsrv/Services.cpp 2006-11-01 10:50:28 +00:00
+++ 1.71/ndb/src/mgmsrv/Services.cpp 2006-11-01 10:50:28 +00:00
@@ -1337,7 +1337,7 @@
if (EventLoggerBase::event_lookup(eventType,cat,threshold,severity,textF))
DBUG_VOID_RETURN;
- char m_text[256];
+ char m_text[512];
EventLogger::getText(m_text, sizeof(m_text),
textF, theData, nodeId);
@@ -1356,8 +1356,11 @@
if(strcmp(ndb_logevent_body[i].token,"error") == 0)
{
int m_text_len= strlen(m_text);
- snprintf(m_text+m_text_len, 4 , " - ");
- ndb_error_string(theData[3], m_text+(m_text_len+3), sizeof(m_text)-m_text_len-3);
+ if(sizeof(m_text)-m_text_len-3 > 0)
+ {
+ BaseString::snprintf(m_text+m_text_len, 4 , " - ");
+ ndb_error_string(val, m_text+(m_text_len+3), sizeof(m_text)-m_text_len-3);
+ }
}
}
--- 1.8/ndb/include/ndbapi/ndberror.h 2006-11-01 10:50:28 +00:00
+++ 1.9/ndb/include/ndbapi/ndberror.h 2006-11-01 10:50:28 +00:00
@@ -93,7 +93,7 @@
const char *ndberror_status_message(ndberror_status);
const char *ndberror_classification_message(ndberror_classification);
void ndberror_update(ndberror_struct *);
-int ndb_error_string(int err_no, char *str, unsigned int size);
+int ndb_error_string(int err_no, char *str, int size);
#endif /* doxygen skip internal*/
--- 1.50/ndb/src/ndbapi/ndberror.c 2006-11-01 10:50:28 +00:00
+++ 1.51/ndb/src/ndbapi/ndberror.c 2006-11-01 10:50:28 +00:00
@@ -680,11 +680,14 @@
return empty_string;
}
-int ndb_error_string(int err_no, char *str, unsigned int size)
+int ndb_error_string(int err_no, char *str, int size)
{
ndberror_struct error;
- unsigned int len;
+ int len;
+ assert(size > 1);
+ if(size <= 1)
+ return 0;
error.code = err_no;
ndberror_update(&error);
| Thread |
|---|
| • bk commit into 5.0 tree (lzhou:1.2257) BUG#21052 | lzhou | 1 Nov |