List:Internals« Previous MessageNext Message »
From:holyfoot Date:July 27 2005 12:34pm
Subject:bk commit into 4.0 tree (hf:1.2127) BUG#12177
View as plain text  
Below is the list of changes that have just been committed into a local
4.0 repository of hf. When hf 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.2127 05/07/27 17:34:20 hf@deer.(none) +1 -0
  Fix for bug #12177 (error file isn't closed)

  libmysqld/lib_sql.cc
    1.49 05/07/27 17:34:05 hf@deer.(none) +5 -2
    now errorlog is closed during mysql_server_end

# 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:	hf
# Host:	deer.(none)
# Root:	/home/hf/work/mysql-4.0.12177

--- 1.48/libmysqld/lib_sql.cc	Wed May 26 21:40:12 2004
+++ 1.49/libmysqld/lib_sql.cc	Wed Jul 27 17:34:05 2005
@@ -320,7 +320,8 @@
 
 static my_bool  org_my_init_done;
 my_bool         server_inited;
-char **		copy_arguments_ptr= 0; 
+char **		copy_arguments_ptr= 0;
+static FILE    *errorlog_file=0;
 
 int STDCALL mysql_server_init(int argc, char **argv, char **groups)
 {
@@ -421,7 +422,7 @@
       opt_error_log= 1;				// Too long file name
     else
     {
-      freopen(log_error_file, "a+", stderr);
+      errorlog_file= freopen(log_error_file, "a+", stderr);
     }
   }
 
@@ -626,6 +627,8 @@
   my_free((char*) copy_arguments_ptr, MYF(MY_ALLOW_ZERO_PTR));
   copy_arguments_ptr=0;
   clean_up(0);
+  if (errorlog_file)
+    fclose(errorlog_file);
   /* If library called my_init(), free memory allocated by it */
   if (!org_my_init_done)
     my_end(0);
Thread
bk commit into 4.0 tree (hf:1.2127) BUG#12177holyfoot27 Jul