List:Internals« Previous MessageNext Message »
From:sasha Date:April 5 2002 4:36am
Subject:bk commit into 4.0 tree
View as plain text  
Below is the list of changes that have just been committed into a
4.0 repository of sasha. When sasha does a push, they will be propogated 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet@stripped, 2002-04-04 21:36:24-07:00, sasha@stripped
  fixes to make it compile and pass the test suite again after the last 
  accidental push of broken code.

  client/mysqladmin.c
    1.49 02/04/04 21:36:23 sasha@stripped +8 -2
    fixed crash in free_defaults()

  libmysql/Makefile.shared
    1.25 02/04/04 21:36:23 sasha@stripped +2 -1
    added my_getopt to libmysqlclient

  mysys/my_getopt.c
    1.8 02/04/04 21:36:23 sasha@stripped +7 -0
    fixed bug in parsing -O var=val

# 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:	sasha
# Host:	mysql.sashanet.com
# Root:	/reiser-data/mysql-4.0

--- 1.48/client/mysqladmin.c	Tue Apr  2 11:31:33 2002
+++ 1.49/client/mysqladmin.c	Thu Apr  4 21:36:23 2002
@@ -253,10 +253,16 @@
   int error, ho_error;
   MYSQL mysql;
   char **commands;
+  char** save_argv;
   MY_INIT(argv[0]);
   mysql_init(&mysql);
   load_defaults("my",load_default_groups,&argc,&argv);
-
+  save_argv = argv;
+  /* Sasha: with the change to handle_options() we now need to do this fix
+     with save_argv in all client utilities. The problem is that
+     handle_options may modify argv, and that wreaks havoc with
+     free_defaults()
+  */
   if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
   {
     printf("%s: handle_options() failed with error %d\n", my_progname,
@@ -327,7 +333,7 @@
   }
   my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
   my_free(user,MYF(MY_ALLOW_ZERO_PTR));
-  free_defaults(argv);
+  free_defaults(save_argv);
   my_end(0);
   exit(error ? 1 : 0);
   return 0;

--- 1.7/mysys/my_getopt.c	Wed Apr  3 05:44:20 2002
+++ 1.8/mysys/my_getopt.c	Thu Apr  4 21:36:23 2002
@@ -102,6 +102,12 @@
 	  cur_arg= *pos;
 	  (*argc)--;
 	}
+	/* Sasha: quick dirty fix of a bug that coredumps mysqladmin while
+	   running the test suite. The bug is actually pretty serious -
+	   even in cases when we do not coredump, -O var=val will not set
+	   the variable, and the previous option would be treated upredictably.
+			*/
+	goto found_var; 
       }
       else if (*cur_arg == '-') /* check for long option, or --set-variable */
       {
@@ -145,6 +151,7 @@
 	    continue;
 	  }
 	}
+    found_var:	
 	optend= strcend(cur_arg, '=');
 	length= optend - cur_arg;
 	if (*optend == '=')

--- 1.24/libmysql/Makefile.shared	Wed Jan  2 12:29:39 2002
+++ 1.25/libmysql/Makefile.shared	Thu Apr  4 21:36:23 2002
@@ -58,7 +58,8 @@
 			my_compress.lo array.lo my_once.lo list.lo my_net.lo \
                         charset.lo hash.lo mf_iocache.lo \
                         mf_iocache2.lo my_seek.lo \
-			my_pread.lo mf_cache.lo my_vsnprintf.lo md5.lo
+			my_pread.lo mf_cache.lo my_vsnprintf.lo md5.lo \
+			my_getopt.lo
 
 # Not needed in the minimum library
 mysysobjects2 =		getopt.lo getopt1.lo getvar.lo my_lib.lo
Thread
bk commit into 4.0 treesasha5 Apr
  • Re: bk commit into 4.0 treeKen Menzel5 Apr
    • Re: bk commit into 4.0 treeSasha Pachev5 Apr