MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:bar Date:October 7 2005 5:12am
Subject:bk commit into 4.1 tree (bar:1.2459) BUG#13238
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of bar. When bar 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
  1.2459 05/10/07 10:11:57 bar@stripped +1 -0
  charset.c:
    Bug#13238 mysqldump and mysqladmin hangs
    Fixed reentering into init_available_charsets() in a loop.

  mysys/charset.c
    1.143 05/10/07 10:10:31 bar@stripped +19 -12
    Bug#13238 mysqldump and mysqladmin hangs
    Fixed reentering into init_available_charsets() in a loop.

# 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:	bar
# Host:	bar.intranet.mysql.r18.ru
# Root:	/usr/home/bar/mysql-4.1.b13238

--- 1.142/mysys/charset.c	2005-08-25 11:03:30 +05:00
+++ 1.143/mysys/charset.c	2005-10-07 10:10:31 +05:00
@@ -38,6 +38,22 @@
 }
 
 
+static uint
+get_collation_number_internal(const char *name)
+{
+  CHARSET_INFO **cs;
+  for (cs= all_charsets;
+       cs < all_charsets+array_elements(all_charsets)-1 ;
+       cs++)
+  {
+    if ( cs[0] && cs[0]->name && 
+         !my_strcasecmp(&my_charset_latin1, cs[0]->name, name))
+      return cs[0]->number;
+  }  
+  return 0;
+}
+
+
 static my_bool init_state_maps(CHARSET_INFO *cs)
 {
   uint i;
@@ -189,7 +205,8 @@
 
 static int add_collation(CHARSET_INFO *cs)
 {
-  if (cs->name && (cs->number || (cs->number=get_collation_number(cs->name))))
+  if (cs->name && (cs->number ||
+                   (cs->number=get_collation_number_internal(cs->name))))
   {
     if (!all_charsets[cs->number])
     {
@@ -419,18 +436,8 @@
 
 uint get_collation_number(const char *name)
 {
-  CHARSET_INFO **cs;
   init_available_charsets(MYF(0));
-  
-  for (cs= all_charsets;
-       cs < all_charsets+array_elements(all_charsets)-1 ;
-       cs++)
-  {
-    if ( cs[0] && cs[0]->name && 
-         !my_strcasecmp(&my_charset_latin1, cs[0]->name, name))
-      return cs[0]->number;
-  }  
-  return 0;   /* this mimics find_type() */
+  return get_collation_number_internal(name);
 }
 
 
Thread
bk commit into 4.1 tree (bar:1.2459) BUG#13238bar7 Oct