List:Commits« Previous MessageNext Message »
From:msvensson Date:February 28 2007 6:36pm
Subject:bk commit into 5.0 tree (msvensson:1.2435) BUG#25074
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, 2007-02-28 19:36:26+01:00, msvensson@stripped +1 -0
  Bug#25074 mysql_upgrade test can't give consistent results
   - Free memory allocated by 'load_default'

  client/mysql_upgrade.c@stripped, 2007-02-28 19:36:24+01:00, msvensson@stripped +7 -3
    Free memory allocated by 'load_default'

# 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:	pilot.blaudden
# Root:	/home/msvensson/mysql/bug25074/my50-bug25074

--- 1.18/client/mysql_upgrade.c	2007-02-28 18:43:17 +01:00
+++ 1.19/client/mysql_upgrade.c	2007-02-28 19:36:24 +01:00
@@ -54,6 +54,8 @@ static char *default_dbug_option= (char*
 #endif
 static my_bool info_flag= 0, tty_password= 0;
 
+static char **defaults_argv;
+
 static struct my_option my_long_options[]=
 {
   {"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
@@ -460,7 +462,7 @@ int main(int argc, char **argv)
   
   char *forced_defaults_file;
   char *forced_extra_defaults;
-  char *defaults_group_suffix;
+  char *local_defaults_group_suffix;
 
   char path[FN_REFLEN], upgrade_defaults_path[FN_REFLEN];
   DYNAMIC_STRING cmdline;
@@ -473,9 +475,10 @@ int main(int argc, char **argv)
   /* Check if we are forced to use specific defaults */
   get_defaults_options(argc, argv,
                        &forced_defaults_file, &forced_extra_defaults,
-                       &defaults_group_suffix);
+                       &local_defaults_group_suffix);
   
   load_defaults("my", load_default_groups, &argc, &argv);
+  defaults_argv= argv;
 
   /* 
      Must init_dynamic_string before handle_options because string is freed
@@ -684,7 +687,8 @@ error:
   /* Delete the generated defaults file */
   my_delete(upgrade_defaults_path, MYF(0));
 
-  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
+  free_defaults(defaults_argv);
+  my_end(info_flag ? MY_CHECK_ERROR : 0);
   return ret;
 }
 
Thread
bk commit into 5.0 tree (msvensson:1.2435) BUG#25074msvensson28 Feb