MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:November 10 2006 12:25pm
Subject:bk commit into 4.1 tree (msvensson:1.2556) BUG#10608
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 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, 2006-11-10 13:25:10+01:00, msvensson@neptunus.(none) +4 -0
  Bug#10608 mysqladmin breaks on "database" variable in my.cnf
   - Add printout of "Warning" or "Note" for non error messages in default_reporter
   - Add test for the above in new mysqladmin.test

  mysql-test/mysql-test-run.pl@stripped, 2006-11-10 13:25:09+01:00, msvensson@neptunus.(none) +4 -0
    Add support for mysqladmin to mysql-test-run.pl

  mysql-test/r/mysqladmin.result@stripped, 2006-11-10 13:25:09+01:00, msvensson@neptunus.(none) +4 -0
    New BitKeeper file ``mysql-test/r/mysqladmin.result''

  mysql-test/r/mysqladmin.result@stripped, 2006-11-10 13:25:09+01:00, msvensson@neptunus.(none) +0 -0

  mysql-test/t/mysqladmin.test@stripped, 2006-11-10 13:25:09+01:00, msvensson@neptunus.(none) +32 -0
    New BitKeeper file ``mysql-test/t/mysqladmin.test''

  mysql-test/t/mysqladmin.test@stripped, 2006-11-10 13:25:09+01:00, msvensson@neptunus.(none) +0 -0

  mysys/my_getopt.c@stripped, 2006-11-10 13:25:09+01:00, msvensson@neptunus.(none) +5 -1
    Add printout of Warning: or Info: in 'default_reporter', this
    will make the user aware of the problem but can filter it
    as a warning or note.

# 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:	neptunus.(none)
# Root:	/home/msvensson/mysql/bug10608/my41-bug10608

--- 1.51/mysys/my_getopt.c	2006-11-10 13:25:14 +01:00
+++ 1.52/mysys/my_getopt.c	2006-11-10 13:25:14 +01:00
@@ -59,11 +59,15 @@ char *disabled_my_option= (char*) "0";
 
 my_bool my_getopt_print_errors= 1;
 
-static void default_reporter(enum loglevel level __attribute__((unused)),
+static void default_reporter(enum loglevel level,
                              const char *format, ...)
 {
   va_list args;
   va_start(args, format);
+  if (level == WARNING_LEVEL)
+    fprintf(stderr, "%s", "Warning: ");
+  else if (level == INFORMATION_LEVEL)
+    fprintf(stderr, "%s", "Info: ");
   vfprintf(stderr, format, args);
   va_end(args);
 }

--- 1.145/mysql-test/mysql-test-run.pl	2006-11-10 13:25:14 +01:00
+++ 1.146/mysql-test/mysql-test-run.pl	2006-11-10 13:25:14 +01:00
@@ -1818,6 +1818,10 @@ sub environment_setup () {
   # ----------------------------------------------------
   $ENV{'MYSQL_MY_PRINT_DEFAULTS'}=  $exe_my_print_defaults;
 
+  # ----------------------------------------------------
+  # Setup env so childs can execute mysqladmin
+  # ----------------------------------------------------
+  $ENV{'MYSQLADMIN'}=  $exe_mysqladmin;
 
   # ----------------------------------------------------
   # Setup env so childs can execute perror  
--- New file ---
+++ mysql-test/r/mysqladmin.result	06/11/10 13:25:09
mysqld is alive
mysqladmin: unknown variable 'database=db1'
Warning: mysqladmin: unknown variable 'loose-database=db2'
mysqld is alive

--- New file ---
+++ mysql-test/t/mysqladmin.test	06/11/10 13:25:09
#
# Test "mysqladmin ping"
#

--exec $MYSQLADMIN --no-defaults -S $MASTER_MYSOCK -P $MASTER_MYPORT  -u root --password= ping 2>&1


#
# Bug#10608 mysqladmin breaks on "database" variable in my.cnf
#

# When mysqladmin finds database in .cnf file it shall fail
--write_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf
[client]
database=db1
EOF

--replace_regex /\/.*mysqladmin/mysqladmin/
--error 7
--exec $MYSQLADMIN --defaults-file=$MYSQLTEST_VARDIR/tmp/bug10608.cnf -S $MASTER_MYSOCK -P $MASTER_MYPORT  -u root --password= ping 2>&1


# When mysqladmin finds "loose-database" in .cnf file it shall print
# a warning and continue
--write_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf
[client]
loose-database=db2
EOF

--replace_regex /Warning: .*mysqladmin/Warning: mysqladmin/
--exec $MYSQLADMIN --defaults-file=$MYSQLTEST_VARDIR/tmp/bug10608.cnf -S $MASTER_MYSOCK -P $MASTER_MYPORT  -u root --password= ping 2>&1


Thread
bk commit into 4.1 tree (msvensson:1.2556) BUG#10608msvensson10 Nov