List:Commits« Previous MessageNext Message »
From:monty Date:July 30 2007 8:58pm
Subject:bk commit into 5.1 tree (monty:1.2557) BUG#30127
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of monty. When monty 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-07-30 21:58:33+03:00, monty@stripped +10 -0
  --debug-info now prints memory usage for all C & C++ clients
  Fixes Bug#30127: --debug-info no longer prints memory usage in mysql

  client/mysql.cc@stripped, 2007-07-30 21:58:28+03:00, monty@stripped +1 -1
    --debug-info now prints memory usage 

  client/mysql_upgrade.c@stripped, 2007-07-30 21:58:28+03:00, monty@stripped +10 -8
    --debug-info now prints memory usage 

  client/mysqladmin.cc@stripped, 2007-07-30 21:58:28+03:00, monty@stripped +1 -1
    --debug-info now prints memory usage 

  client/mysqlbinlog.cc@stripped, 2007-07-30 21:58:28+03:00, monty@stripped +2 -2
    --debug-info now prints memory usage 

  client/mysqlcheck.c@stripped, 2007-07-30 21:58:28+03:00, monty@stripped +2 -2
    --debug-info now prints memory usage 

  client/mysqldump.c@stripped, 2007-07-30 21:58:28+03:00, monty@stripped +1 -1
    --debug-info now prints memory usage 

  client/mysqlimport.c@stripped, 2007-07-30 21:58:28+03:00, monty@stripped +1 -1
    --debug-info now prints memory usage 

  client/mysqlshow.c@stripped, 2007-07-30 21:58:28+03:00, monty@stripped +1 -1
    --debug-info now prints memory usage 

  client/mysqlslap.c@stripped, 2007-07-30 21:58:28+03:00, monty@stripped +4 -2
    --debug-info now prints memory usage 

  client/mysqltest.c@stripped, 2007-07-30 21:58:28+03:00, monty@stripped +4 -2
    --debug-info now prints memory usage 

diff -Nrup a/client/mysql.cc b/client/mysql.cc
--- a/client/mysql.cc	2007-07-11 12:40:24 +03:00
+++ b/client/mysql.cc	2007-07-30 21:58:28 +03:00
@@ -541,7 +541,7 @@ sig_handler mysql_end(int sig)
   my_free(current_prompt,MYF(MY_ALLOW_ZERO_PTR));
   mysql_server_end();
   free_defaults(defaults_argv);
-  my_end(info_flag ? MY_CHECK_ERROR : 0);
+  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO: 0);
   exit(status.exit_status);
 }
 
diff -Nrup a/client/mysql_upgrade.c b/client/mysql_upgrade.c
--- a/client/mysql_upgrade.c	2007-05-10 12:59:20 +03:00
+++ b/client/mysql_upgrade.c	2007-07-30 21:58:28 +03:00
@@ -32,7 +32,7 @@
 static char mysql_path[FN_REFLEN];
 static char mysqlcheck_path[FN_REFLEN];
 
-static my_bool opt_force, opt_verbose;
+static my_bool opt_force, opt_verbose, info_flag;
 static char *opt_user= (char*)"root";
 
 static DYNAMIC_STRING ds_args;
@@ -56,6 +56,11 @@ static struct my_option my_long_options[
    NO_ARG, 0, 0, 0, 0, 0, 0},
   {"basedir", 'b', "Not used by mysql_upgrade. Only for backward compatibilty",
    0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  {"character-sets-dir", OPT_CHARSETS_DIR,
+   "Directory where character sets are.", 0,
+   0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  {"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
+   (uchar**)&not_used, (uchar**)&not_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0},
   {"datadir", 'd',
    "Not used by mysql_upgrade. Only for backward compatibilty",
    0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -66,14 +71,11 @@ static struct my_option my_long_options[
   {"debug", '#', "Output debug log", (uchar* *) & default_dbug_option,
    (uchar* *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
 #endif
+  {"debug-info", 'T', "Print some debug info at exit.", (uchar**) &info_flag,
+   (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"default-character-set", OPT_DEFAULT_CHARSET,
    "Set the default character set.", 0,
    0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-  {"character-sets-dir", OPT_CHARSETS_DIR,
-   "Directory where character sets are.", 0,
-   0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-  {"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
-   (uchar**)&not_used, (uchar**)&not_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0},
   {"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
    "has already been executed for the current version of MySQL.",
    (uchar**)&opt_force, (uchar**)&opt_force, 0,
@@ -138,7 +140,7 @@ static void die(const char *fmt, ...)
   va_end(args);
 
   free_used_memory();
-  my_end(MY_CHECK_ERROR);
+  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
   exit(1);
 }
 
@@ -780,7 +782,7 @@ int main(int argc, char **argv)
   create_mysql_upgrade_info_file();
 
   free_used_memory();
-  my_end(MY_CHECK_ERROR);
+  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
   exit(0);
 }
 
diff -Nrup a/client/mysqladmin.cc b/client/mysqladmin.cc
--- a/client/mysqladmin.cc	2007-05-10 12:59:20 +03:00
+++ b/client/mysqladmin.cc	2007-07-30 21:58:28 +03:00
@@ -413,7 +413,7 @@ int main(int argc,char *argv[])
   my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
 #endif
   free_defaults(save_argv);
-  my_end(info_flag ? MY_CHECK_ERROR : 0);
+  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
   exit(error ? 1 : 0);
   return 0;
 }
diff -Nrup a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
--- a/client/mysqlbinlog.cc	2007-06-01 10:43:50 +03:00
+++ b/client/mysqlbinlog.cc	2007-07-30 21:58:28 +03:00
@@ -860,7 +860,7 @@ static void die(const char* fmt, ...)
   va_end(args);
   cleanup();
   /* We cannot free DBUG, it is used in global destructors after exit(). */
-  my_end((info_flag ? MY_CHECK_ERROR : 0) | MY_DONT_FREE_DBUG);
+  my_end((info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0) | MY_DONT_FREE_DBUG);
   exit(1);
 }
 
@@ -1597,7 +1597,7 @@ int main(int argc, char** argv)
   my_free_open_file_info();
   load_processor.destroy();
   /* We cannot free DBUG, it is used in global destructors after exit(). */
-  my_end((info_flag ? MY_CHECK_ERROR : 0) | MY_DONT_FREE_DBUG);
+  my_end((info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0) | MY_DONT_FREE_DBUG);
 
   if (file_not_closed_error)
   {
diff -Nrup a/client/mysqlcheck.c b/client/mysqlcheck.c
--- a/client/mysqlcheck.c	2007-05-10 12:59:20 +03:00
+++ b/client/mysqlcheck.c	2007-07-30 21:58:28 +03:00
@@ -762,7 +762,7 @@ int main(int argc, char **argv)
   */
   if (get_options(&argc, &argv))
   {
-    my_end(info_flag ? MY_CHECK_ERROR : 0);
+    my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
     exit(EX_USAGE);
   }
   if (dbConnect(current_host, current_user, opt_password))
@@ -804,6 +804,6 @@ int main(int argc, char **argv)
 #ifdef HAVE_SMEM
   my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
 #endif
-  my_end(info_flag ? MY_CHECK_ERROR : 0);
+  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
   return(first_error!=0);
 } /* main */
diff -Nrup a/client/mysqldump.c b/client/mysqldump.c
--- a/client/mysqldump.c	2007-07-19 18:01:07 +03:00
+++ b/client/mysqldump.c	2007-07-30 21:58:28 +03:00
@@ -1262,7 +1262,7 @@ static void free_resources()
     dynstr_free(&insert_pat);
   if (defaults_argv)
     free_defaults(defaults_argv);
-  my_end(info_flag ? MY_CHECK_ERROR : 0);
+  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
 }
 
 
diff -Nrup a/client/mysqlimport.c b/client/mysqlimport.c
--- a/client/mysqlimport.c	2007-05-10 12:59:20 +03:00
+++ b/client/mysqlimport.c	2007-07-30 21:58:28 +03:00
@@ -659,6 +659,6 @@ int main(int argc, char **argv)
   my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
 #endif
   free_defaults(argv_to_free);
-  my_end(info_flag ? MY_CHECK_ERROR : 0);
+  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
   return(exitcode);
 }
diff -Nrup a/client/mysqlshow.c b/client/mysqlshow.c
--- a/client/mysqlshow.c	2007-05-10 12:59:20 +03:00
+++ b/client/mysqlshow.c	2007-07-30 21:58:28 +03:00
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
 #ifdef HAVE_SMEM
   my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
 #endif
-  my_end(info_flag ? MY_CHECK_ERROR : 0);
+  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
   exit(error ? 1 : 0);
   return 0;				/* No compiler warnings */
 }
diff -Nrup a/client/mysqlslap.c b/client/mysqlslap.c
--- a/client/mysqlslap.c	2007-06-02 07:33:16 +03:00
+++ b/client/mysqlslap.c	2007-07-30 21:58:28 +03:00
@@ -128,7 +128,7 @@ const char *delimiter= "\n";
 
 const char *create_schema_string= "mysqlslap";
 
-static my_bool opt_preserve;
+static my_bool opt_preserve, info_flag;
 
 static my_bool opt_only_print= FALSE;
 
@@ -403,7 +403,7 @@ int main(int argc, char **argv)
     my_free(shared_memory_base_name, MYF(MY_ALLOW_ZERO_PTR));
 #endif
   free_defaults(defaults_argv);
-  my_end(0);
+  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
 
   return 0;
 }
@@ -546,6 +546,8 @@ static struct my_option my_long_options[
   {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
     (uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR,
     OPT_ARG, 0, 0, 0, 0, 0, 0},
+  {"debug-info", 'T', "Print some debug info at exit.", (uchar**) &info_flag,
+   (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"delimiter", 'F',
     "Delimiter to use in SQL statements supplied in file or command line.",
     (uchar**) &delimiter, (uchar**) &delimiter, 0, GET_STR, REQUIRED_ARG,
diff -Nrup a/client/mysqltest.c b/client/mysqltest.c
--- a/client/mysqltest.c	2007-07-23 20:39:46 +03:00
+++ b/client/mysqltest.c	2007-07-30 21:58:28 +03:00
@@ -79,7 +79,7 @@ const char *opt_logdir= "";
 const char *opt_include= 0, *opt_charsets_dir;
 static int opt_port= 0;
 static int opt_max_connect_retries;
-static my_bool opt_compress= 0, silent= 0, verbose= 0;
+static my_bool opt_compress= 0, silent= 0, verbose= 0, info_flag= 0;
 static my_bool tty_password= 0;
 static my_bool opt_mark_progress= 0;
 static my_bool ps_protocol= 0, ps_protocol_enabled= 0;
@@ -807,7 +807,7 @@ void free_used_memory()
 static void cleanup_and_exit(int exit_code)
 {
   free_used_memory();
-  my_end(MY_CHECK_ERROR);
+  my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
 
   if (!silent)
   {
@@ -4482,6 +4482,8 @@ static struct my_option my_long_options[
   {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
    0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
 #endif
+  {"debug-info", 'd', "Print some debug info at exit.", (uchar**) &info_flag,
+   (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"host", 'h', "Connect to host.", (uchar**) &opt_host, (uchar**) &opt_host, 0,
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   {"include", 'i', "Include SQL before each test case.", (uchar**) &opt_include,
Thread
bk commit into 5.1 tree (monty:1.2557) BUG#30127monty30 Jul