MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:July 26 2006 12:09pm
Subject:bk commit into 5.0 tree (msvensson:1.2235) BUG#16561
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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-07-26 14:09:20+02:00, msvensson@neptunus.(none) +3 -0
  Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror
   - Since error 1186 is not found among NDB error codes, the message retuned should indicate that.

  extra/perror.c@stripped, 2006-07-26 14:09:18+02:00, msvensson@neptunus.(none) +15 -12
    Move the !found out one level

  mysql-test/t/perror.test@stripped, 2006-07-26 14:09:18+02:00, msvensson@neptunus.(none) +11 -0
    Add test case for bug#16561

  ndb/src/kernel/error/ndbd_exit_codes.c@stripped, 2006-07-26 14:09:18+02:00, msvensson@neptunus.(none) +1 -1
    Check not only for zero size string but also classification "unknown error" when looking for an error mesage for an error code 

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/my50-m-bug20145

--- 1.44/extra/perror.c	2006-07-26 14:09:25 +02:00
+++ 1.45/extra/perror.c	2006-07-26 14:09:25 +02:00
@@ -261,7 +261,7 @@ int main(int argc,char *argv[])
         found= 1;
         msg= 0;
       }
-      else 
+      else
 #endif
 	msg = strerror(code);
 
@@ -281,20 +281,23 @@ int main(int argc,char *argv[])
 	else
 	  puts(msg);
       }
-      if (!(msg=get_ha_error_msg(code)))
+
+      if (!found)
       {
-	if (!found)
-	{
+        /* Error message still not found, look in handler error codes */
+        if (!(msg=get_ha_error_msg(code)))
+        {
 	  fprintf(stderr,"Illegal error code: %d\n",code);
 	  error=1;
-	}
-      }
-      else
-      {
-	if (verbose)
-	  printf("MySQL error code %3d: %s\n",code,msg);
-	else
-	  puts(msg);
+        }
+        else
+        {
+          found= 1;
+          if (verbose)
+            printf("MySQL error code %3d: %s\n",code,msg);
+          else
+            puts(msg);
+        }
       }
     }
   }

--- 1.11/ndb/src/kernel/error/ndbd_exit_codes.c	2006-07-26 14:09:25 +02:00
+++ 1.12/ndb/src/kernel/error/ndbd_exit_codes.c	2006-07-26 14:09:25 +02:00
@@ -247,7 +247,7 @@ int ndbd_exit_string(int err_no, char *s
   ndbd_exit_classification cl;
   ndbd_exit_status st;
   const char *msg = ndbd_exit_message(err_no, &cl);
-  if (msg[0] != '\0')
+  if (msg[0] != '\0' && cl != XUE)
   {
     const char *cl_msg = ndbd_exit_classification_message(cl, &st);
     const char *st_msg = ndbd_exit_status_message(st);

--- 1.1/mysql-test/t/perror.test	2006-07-26 14:09:25 +02:00
+++ 1.2/mysql-test/t/perror.test	2006-07-26 14:09:25 +02:00
@@ -9,3 +9,14 @@ enable_query_log;
 --exec $MY_PERROR 150
 --exec $MY_PERROR --silent 120
 
+#
+# Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror
+#
+
+# As long there is no error code 1186 defined by NDB
+# we should get a message "Illegal ndb error code: 1186"
+--error 1
+--exec $MY_PERROR --ndb 1186
+
+# As there is an error code defined for 1186, expect error
+--exec $MY_PERROR 1186
Thread
bk commit into 5.0 tree (msvensson:1.2235) BUG#16561msvensson26 Jul