List:Commits« Previous MessageNext Message »
From:Jim Winstead Date:April 12 2006 6:15pm
Subject:bk commit into 5.1 tree (jimw:1.2336)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jimw. When jimw 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.2336 06/04/12 11:14:56 jimw@stripped +3 -0
  Support --debug/-# in instance manager.

  server-tools/instance-manager/options.h
    1.15 06/04/12 11:14:52 jimw@stripped +4 -0
    Handle --debug/-#

  server-tools/instance-manager/options.cc
    1.31 06/04/12 11:14:51 jimw@stripped +16 -1
    Handle --debug/-#

  mysql-test/mysql-test-run.pl
    1.101 06/04/12 11:14:51 jimw@stripped +6 -0
    Support tracing the instance manager

# 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:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-5.1-clean

--- 1.100/mysql-test/mysql-test-run.pl	2006-04-12 01:55:21 -07:00
+++ 1.101/mysql-test/mysql-test-run.pl	2006-04-12 11:14:51 -07:00
@@ -2940,6 +2940,12 @@
   mtr_add_arg($args, "--defaults-file=%s",
               $instance_manager->{'defaults_file'});
 
+  if ( $opt_debug )
+  {
+    mtr_add_arg($args, "--debug=d:t:i:A,%s/log/im.trace",
+                $opt_vardir_trace);
+  }
+
   foreach my $opt (@{$opts})
   {
     mtr_add_arg($args, $opt);

--- 1.30/server-tools/instance-manager/options.cc	2006-02-21 04:32:49 -08:00
+++ 1.31/server-tools/instance-manager/options.cc	2006-04-12 11:14:51 -07:00
@@ -57,6 +57,9 @@
 char **Options::saved_argv= NULL;
 /* Remember if the config file was forced */
 bool Options::is_forced_default_file= 0;
+#ifndef DBUG_OFF
+const char *Options::default_dbug_option= "d:t:i:O,im.trace";
+#endif
 
 /*
   List of options, accepted by the instance manager.
@@ -88,6 +91,12 @@
   { "help", '?', "Display this help and exit.",
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 },
 
+#ifndef DBUG_OFF
+  {"debug", '#', "Debug log.",
+   (gptr*) &Options::default_dbug_option, (gptr*) &Options::default_dbug_option,
+   0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+#endif
+
   { "log", OPT_LOG, "Path to log file. Used only with --run-as-service.",
     (gptr *) &Options::log_file_name, (gptr *) &Options::log_file_name,
     0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
@@ -226,7 +235,7 @@
 static my_bool
 get_one_option(int optid,
                const struct my_option *opt __attribute__((unused)),
-               char *argument __attribute__((unused)))
+               char *argument)
 {
   switch(optid) {
   case 'V':
@@ -238,6 +247,12 @@
   case '?':
     usage();
     exit(0);
+  case '#':
+#ifndef DBUG_OFF
+    DBUG_SET(argument ? argument : Options::default_dbug_option);
+    DBUG_SET_INITIAL(argument ? argument : Options::default_dbug_option);
+#endif
+    break;
   }
   return 0;
 }

--- 1.14/server-tools/instance-manager/options.h	2006-02-09 15:15:52 -08:00
+++ 1.15/server-tools/instance-manager/options.h	2006-04-12 11:14:52 -07:00
@@ -51,6 +51,10 @@
   /* argv pointer returned by load_defaults() to be used by free_defaults() */
   static char **saved_argv;
 
+#ifndef DBUG_OFF
+  static const char *default_dbug_option;
+#endif
+
   int load(int argc, char **argv);
   void cleanup();
 #ifdef __WIN__
Thread
bk commit into 5.1 tree (jimw:1.2336)Jim Winstead12 Apr