MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:gluh Date:October 18 2005 9:25am
Subject:bk commit into 5.0 tree (gluh:1.2011) BUG#13783
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh 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.2011 05/10/18 14:25:03 gluh@stripped +5 -0
  Fix for bug#13783 mysqlcheck tries to optimize and analyze information_schema
    'information_schema' is excluded from list of databases for mysqlcheck command

  mysql-test/t/mysqlcheck.test
    1.1 05/10/18 14:24:54 gluh@stripped +11 -0

  mysql-test/t/mysqlcheck.test
    1.0 05/10/18 14:24:54 gluh@stripped +0 -0
    BitKeeper file /home/gluh/MySQL/Bugs/5.0.13783/mysql-test/t/mysqlcheck.test

  mysql-test/r/mysqlcheck.result
    1.1 05/10/18 14:24:53 gluh@stripped +34 -0

  mysql-test/r/mysqlcheck.result
    1.0 05/10/18 14:24:53 gluh@stripped +0 -0
    BitKeeper file /home/gluh/MySQL/Bugs/5.0.13783/mysql-test/r/mysqlcheck.result

  mysql-test/mysql-test-run.sh
    1.275 05/10/18 14:24:53 gluh@stripped +12 -2
    dded support for 'mysqlcheck'

  mysql-test/mysql-test-run.pl
    1.54 05/10/18 14:24:53 gluh@stripped +13 -0
    dded support for 'mysqlcheck'

  client/mysqlcheck.c
    1.50 05/10/18 14:24:53 gluh@stripped +3 -0
    Fix for bug#13783 mysqlcheck tries to optimize and analyze information_schema
      'information_schema' is excluded from list of databases for mysqlcheck command

# 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:	gluh
# Host:	eagle.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Bugs/5.0.13783

--- 1.274/mysql-test/mysql-test-run.sh	Wed Sep 14 03:41:36 2005
+++ 1.275/mysql-test/mysql-test-run.sh	Tue Oct 18 14:24:53 2005
@@ -222,6 +222,7 @@
 
 EXTRA_MASTER_OPT=""
 EXTRA_MYSQL_TEST_OPT=""
+EXTRA_MYSQLCHECK_OPT=""
 EXTRA_MYSQLDUMP_OPT=""
 EXTRA_MYSQLSHOW_OPT=""
 EXTRA_MYSQLBINLOG_OPT=""
@@ -455,6 +456,8 @@
        --debug=d:t:i:A,$MYSQL_TEST_DIR/var/log/slave.trace"
       EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT \
        --debug=d:t:A,$MYSQL_TEST_DIR/var/log/mysqltest.trace"
+      EXTRA_MYSQLCHECK_OPT="$EXTRA_MYSQLCHECK_OPT \
+       --debug=d:t:A,$MYSQL_TEST_DIR/var/log/mysqlcheck.trace"
       EXTRA_MYSQLDUMP_OPT="$EXTRA_MYSQLDUMP_OPT \
        --debug=d:t:A,$MYSQL_TEST_DIR/var/log/mysqldump.trace"
       EXTRA_MYSQLSHOW_OPT="$EXTRA_MYSQLSHOW_OPT \
@@ -557,6 +560,11 @@
    fi
    MYSQL_CLIENT_TEST="$BASEDIR/tests/mysql_client_test"
  fi
+ if [ -f "$BASEDIR/client/.libs/mysqlcheck" ] ; then
+   MYSQL_CHECK="$BASEDIR/client/.libs/mysqlcheck"
+ else
+   MYSQL_CHECK="$BASEDIR/client/mysqlcheck"
+ fi
  if [ -f "$BASEDIR/client/.libs/mysqldump" ] ; then
    MYSQL_DUMP="$BASEDIR/client/.libs/mysqldump"
  else
@@ -635,6 +643,7 @@
    TESTS_BINDIR="$BASEDIR/bin"
  fi
  MYSQL_TEST="$CLIENT_BINDIR/mysqltest"
+ MYSQL_CHECK="$CLIENT_BINDIR/mysqlcheck"
  MYSQL_DUMP="$CLIENT_BINDIR/mysqldump"
  MYSQL_SHOW="$CLIENT_BINDIR/mysqlshow"
  MYSQL_BINLOG="$CLIENT_BINDIR/mysqlbinlog"
@@ -720,12 +729,13 @@
 # Save path and name of mysqldump
 MYSQL_DUMP_DIR="$MYSQL_DUMP"
 export MYSQL_DUMP_DIR
+MYSQL_CHECK="$MYSQL_CHECK --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLCHECK_OPT"
 MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
 MYSQL_SHOW="$MYSQL_SHOW -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSHOW_OPT"
 MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR  --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
 MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
 MYSQL="$MYSQL --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
-export MYSQL MYSQL_DUMP MYSQL_SHOW MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES
+export MYSQL MYSQL_CHECK MYSQL_DUMP MYSQL_SHOW MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES
 export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR MYSQL_MY_PRINT_DEFAULTS
 export NDB_TOOLS_DIR
 export NDB_MGM
@@ -757,7 +767,7 @@
   XTERM=`which xterm`
 fi
 
-export MYSQL MYSQL_DUMP MYSQL_SHOW MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES CLIENT_BINDIR MASTER_MYSOCK
+export MYSQL MYSQL_CHECK MYSQL_DUMP MYSQL_SHOW MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES CLIENT_BINDIR MASTER_MYSOCK
 
 #++
 # Function Definitions
--- New file ---
+++ mysql-test/r/mysqlcheck.result	05/10/18 14:24:53
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.func                                         OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.func                                         OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK

--- New file ---
+++ mysql-test/t/mysqlcheck.test	05/10/18 14:24:54
# Embedded server doesn't support external clients
--source include/not_embedded.inc

#
# Bug #13783  mysqlcheck tries to optimize and analyze information_schema
#
--replace_result 'Table is already up to date' OK
--exec $MYSQL_CHECK --all-databases --analyze --optimize
--replace_result 'Table is already up to date' OK
--exec $MYSQL_CHECK --analyze --optimize  --databases test information_schema mysql
--exec $MYSQL_CHECK --analyze --optimize information_schema schemata


--- 1.49/client/mysqlcheck.c	Fri Aug 26 17:45:18 2005
+++ 1.50/client/mysqlcheck.c	Tue Oct 18 14:24:53 2005
@@ -497,6 +497,9 @@
 
 static int use_db(char *database)
 {
+  if (mysql_get_server_version(sock) >= 50003 &&
+      !my_strcasecmp(&my_charset_latin1, database, "information_schema"))
+    return 1;
   if (mysql_select_db(sock, database))
   {
     DBerror(sock, "when selecting the database");

--- 1.53/mysql-test/mysql-test-run.pl	Sun Oct 16 23:32:35 2005
+++ 1.54/mysql-test/mysql-test-run.pl	Tue Oct 18 14:24:53 2005
@@ -171,6 +171,7 @@
 our $exe_mysqlbinlog;
 our $exe_mysql_client_test;
 our $exe_mysqld;
+our $exe_mysqlcheck;             # Called from test case
 our $exe_mysqldump;              # Called from test case
 our $exe_mysqlshow;              # Called from test case
 our $exe_mysql_fix_system_tables;
@@ -911,6 +912,7 @@
         mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
 		       "/usr/bin/false");
     }
+    $exe_mysqlcheck=     mtr_exe_exists("$path_client_bindir/mysqlcheck");
     $exe_mysqldump=      mtr_exe_exists("$path_client_bindir/mysqldump");
     $exe_mysqlshow=      mtr_exe_exists("$path_client_bindir/mysqlshow");
     $exe_mysqlbinlog=    mtr_exe_exists("$path_client_bindir/mysqlbinlog");
@@ -926,6 +928,7 @@
   else
   {
     $path_client_bindir= mtr_path_exists("$glob_basedir/bin");
+    $exe_mysqlcheck=     mtr_exe_exists("$path_client_bindir/mysqlcheck");
     $exe_mysqldump=      mtr_exe_exists("$path_client_bindir/mysqldump");
     $exe_mysqlshow=      mtr_exe_exists("$path_client_bindir/mysqlshow");
     $exe_mysqlbinlog=    mtr_exe_exists("$path_client_bindir/mysqlbinlog");
@@ -2354,6 +2357,15 @@
 sub run_mysqltest ($) {
   my $tinfo=       shift;
 
+  my $cmdline_mysqlcheck= "$exe_mysqlcheck --no-defaults -uroot " .
+                          "--port=$master->[0]->{'path_myport'} " .
+                          "--socket=$master->[0]->{'path_mysock'} --password=";
+  if ( $opt_debug )
+  {
+    $cmdline_mysqlcheck .=
+      " --debug=d:t:A,$opt_vardir/log/mysqldump.trace";
+  }
+
   my $cmdline_mysqldump= "$exe_mysqldump --no-defaults -uroot " .
                          "--port=$master->[0]->{'path_myport'} " .
                          "--socket=$master->[0]->{'path_mysock'} --password=";
@@ -2413,6 +2425,7 @@
   # $ENV{'PATH'}= "/bin:/usr/bin:/usr/local/bin:/usr/bsd:/usr/X11R6/bin:/usr/openwin/bin:/usr/bin/X11:$ENV{'PATH'}";
 
   $ENV{'MYSQL'}=                    $cmdline_mysql;
+  $ENV{'MYSQL_CHECK'}=              $cmdline_mysqlcheck;
   $ENV{'MYSQL_DUMP'}=               $cmdline_mysqldump;
   $ENV{'MYSQL_SHOW'}=               $cmdline_mysqlshow;
   $ENV{'MYSQL_BINLOG'}=             $cmdline_mysqlbinlog;
Thread
bk commit into 5.0 tree (gluh:1.2011) BUG#13783gluh18 Oct