List:Commits« Previous MessageNext Message »
From:lzhou Date:October 26 2006 8:46pm
Subject:bk commit into 5.0 tree (lzhou:1.2259) BUG#21052
View as plain text  
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-10-26 18:46:49+00:00, lzhou@stripped +3 -0
  BUG#21052 Modify the overflow error existed in last patch

  ndb/include/ndbapi/ndberror.h@stripped, 2006-10-26 18:46:47+00:00, lzhou@stripped
+1 -1
    Change unsigned int to int

  ndb/src/mgmsrv/Services.cpp@stripped, 2006-10-26 18:46:47+00:00, lzhou@stripped
+5 -2
    Modify the overflow error existed in last patch

  ndb/src/ndbapi/ndberror.c@stripped, 2006-10-26 18:46:47+00:00, lzhou@stripped +3
-2
    Change the parameter of ndb_error_string from unsigned 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-2

--- 1.70/ndb/src/mgmsrv/Services.cpp	2006-10-26 18:46:54 +00:00
+++ 1.71/ndb/src/mgmsrv/Services.cpp	2006-10-26 18:46:54 +00:00
@@ -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-10-26 18:46:54 +00:00
+++ 1.9/ndb/include/ndbapi/ndberror.h	2006-10-26 18:46:54 +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-10-26 18:46:54 +00:00
+++ 1.51/ndb/src/ndbapi/ndberror.c	2006-10-26 18:46:54 +00:00
@@ -680,11 +680,12 @@
   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);
   error.code = err_no;
   ndberror_update(&error);
 
Thread
bk commit into 5.0 tree (lzhou:1.2259) BUG#21052lzhou26 Oct