List:Commits« Previous MessageNext Message »
From:msvensson Date:November 9 2006 2:37pm
Subject:bk commit into 5.0 tree (msvensson:1.2296)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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-09 14:37:20+01:00, msvensson@neptunus.(none) +5 -0
  Make it possible for .test suites to run "mysql_upgrade"
  Add new test file mysql_upgrade.test

  BitKeeper/deleted/.del-abi_check.ic@stripped, 2006-11-09 12:05:37+01:00,
msvensson@neptunus.(none) +0 -0
    Delete: include/abi_check.ic

  client/mysql_upgrade.c@stripped, 2006-11-09 14:37:17+01:00, msvensson@neptunus.(none) +2 -2
    Make mysql_upgrade search also in "client" dir so it can be run from a source dist.

  mysql-test/mysql-test-run.pl@stripped, 2006-11-09 14:37:17+01:00, msvensson@neptunus.(none)
+49 -5
    Make it possible for .test scripts to run "mysql_upgrade"

  mysql-test/r/mysql_upgrade.result@stripped, 2006-11-09 14:37:17+01:00,
msvensson@neptunus.(none) +127 -0
    New BitKeeper file ``mysql-test/r/mysql_upgrade.result''

  mysql-test/r/mysql_upgrade.result@stripped, 2006-11-09 14:37:17+01:00,
msvensson@neptunus.(none) +0 -0

  mysql-test/t/mysql_upgrade.test@stripped, 2006-11-09 14:37:17+01:00,
msvensson@neptunus.(none) +20 -0
    New BitKeeper file ``mysql-test/t/mysql_upgrade.test''

  mysql-test/t/mysql_upgrade.test@stripped, 2006-11-09 14:37:17+01:00,
msvensson@neptunus.(none) +0 -0

# 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/mysql-5.0-maint-mysql_upgrade

--- 1.9/client/mysql_upgrade.c	2006-11-09 14:37:25 +01:00
+++ 1.10/client/mysql_upgrade.c	2006-11-09 14:37:25 +01:00
@@ -546,7 +546,7 @@ int main(int argc, char **argv)
   }
   
   if (find_file(mysqlcheck_name, basedir, MYF(0), path, sizeof(path),
-                          "bin", NullS))
+                "bin", "client", NullS))
   {
      ret= 1;
      printf("Can't find program '%s'\n", mysqlcheck_name);
@@ -583,7 +583,7 @@ int main(int argc, char **argv)
 
 fix_priv_tables:
   if (find_file(mysql_name, basedir, MYF(0), path, sizeof(path), 
-                          "bin", NullS))
+                "bin", "client", NullS))
   {
     ret= 1;
     puts("Could not find MySQL command-line client (mysql).\n"

--- 1.148/mysql-test/mysql-test-run.pl	2006-11-09 14:37:25 +01:00
+++ 1.149/mysql-test/mysql-test-run.pl	2006-11-09 14:37:25 +01:00
@@ -142,6 +142,7 @@ our $opt_verbose= 0;  # Verbose output, 
 our $exe_master_mysqld;
 our $exe_mysql;
 our $exe_mysqladmin;
+our $exe_mysql_upgrade;
 our $exe_mysqlbinlog;
 our $exe_mysql_client_test;
 our $exe_mysqld;
@@ -1403,7 +1404,15 @@ sub executable_setup () {
   $exe_mysql=          mtr_exe_exists("$path_client_bindir/mysql");
   if ( $mysql_version_id >= 50100 )
   {
-    $exe_mysqlslap=      mtr_exe_exists("$path_client_bindir/mysqlslap");
+    $exe_mysqlslap=    mtr_exe_exists("$path_client_bindir/mysqlslap");
+  }
+  if ( $mysql_version_id >= 50000 and !$glob_use_embedded_server )
+  {
+    $exe_mysql_upgrade= mtr_exe_exists("$path_client_bindir/mysql_upgrade")
+  }
+  else
+  {
+    $exe_mysql_upgrade= "";
   }
 
   if ( ! $glob_win32 )
@@ -1444,13 +1453,13 @@ sub executable_setup () {
   if ( $glob_use_embedded_server )
   {
     $exe_mysqltest=
-      mtr_exe_exists(vs_config_dirs('libmysqld/examples', 'mysqltest_embedded'),
-                     "$glob_basedir/libmysqld/examples/mysqltest_embedded",              
      
+      mtr_exe_exists(vs_config_dirs('libmysqld/examples','mysqltest_embedded'),
+                     "$glob_basedir/libmysqld/examples/mysqltest_embedded",
                      "$path_client_bindir/mysqltest_embedded");
   }
   else
   {
-      $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
+    $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
   }
 
   # Look for mysql_client_test executable which may _not_ exist in
@@ -1467,7 +1476,7 @@ sub executable_setup () {
     $exe_mysql_client_test=
       mtr_exe_maybe_exists(vs_config_dirs('tests', 'mysql_client_test'),
                            "$glob_basedir/tests/mysql_client_test",
-                           "$glob_basedir/bin");
+                           "$glob_basedir/bin/mysql_client_test");
   }
 }
 
@@ -1529,6 +1538,33 @@ sub mysql_client_test_arguments()
   return join(" ", $exe, @$args);
 }
 
+sub mysql_upgrade_arguments()
+{
+  my $exe= $exe_mysql_upgrade;
+
+  my $args;
+  mtr_init_args(\$args);
+#  if ( $opt_valgrind_mysql_ugrade )
+#  {
+#    valgrind_arguments($args, \$exe);
+#  }
+
+  mtr_add_arg($args, "--no-defaults");
+  mtr_add_arg($args, "--user=root");
+  mtr_add_arg($args, "--port=$master->[0]->{'port'}");
+  mtr_add_arg($args, "--socket=$master->[0]->{'path_sock'}");
+  mtr_add_arg($args, "--datadir=$master->[0]->{'path_myddir'}");
+  mtr_add_arg($args, "--basedir=$glob_basedir");
+
+  if ( $opt_debug )
+  {
+    mtr_add_arg($args,
+      "--debug=d:t:A,$path_vardir_trace/log/mysql_upgrade.trace");
+  }
+
+  return join(" ", $exe, @$args);
+}
+
 # Note that some env is setup in spawn/run, in "mtr_process.pl"
 
 sub environment_setup () {
@@ -1787,6 +1823,14 @@ sub environment_setup () {
   # Setup env so childs can execute mysql_client_test
   # ----------------------------------------------------
   $ENV{'MYSQL_CLIENT_TEST'}=  mysql_client_test_arguments();
+
+  # ----------------------------------------------------
+  # Setup env so childs can execute mysql_upgrade
+  # ----------------------------------------------------
+  if ( $mysql_version_id >= 50000 )
+  {
+    $ENV{'MYSQL_UPGRADE'}= mysql_upgrade_arguments();
+  }
 
   # ----------------------------------------------------
   # Setup env so childs can execute mysql_fix_system_tables
--- New file ---
+++ mysql-test/r/mysql_upgrade.result	06/11/09 14:37:17
Run mysql_upgrade once
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
@hadGrantPriv:=1
1
1
1
1
1
@hadShowDbPriv:=1
1
1
1
1
1
@hadCreateViewPriv:=1
1
1
1
1
1
@hadCreateRoutinePriv:=1
1
1
1
1
1
@hadCreateUserPriv:=1
1
1
1
1
1
Run it again - should say already completed
@hadGrantPriv:=1
1
1
1
1
1
@hadShowDbPriv:=1
1
1
1
1
1
@hadCreateViewPriv:=1
1
1
1
1
1
@hadCreateRoutinePriv:=1
1
1
1
1
1
@hadCreateUserPriv:=1
1
1
1
1
1
Force should run it regardless of wheter it's been run before
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
@hadGrantPriv:=1
1
1
1
1
1
@hadShowDbPriv:=1
1
1
1
1
1
@hadCreateViewPriv:=1
1
1
1
1
1
@hadCreateRoutinePriv:=1
1
1
1
1
1
@hadCreateUserPriv:=1
1
1
1
1
1

--- New file ---
+++ mysql-test/t/mysql_upgrade.test	06/11/09 14:37:17
# Only run test if "mysql_upgrade" is found
--require r/have_mysql_upgrade.inc
--disable_query_log
select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
--enable_query_log

#
# Basic test thta we can run mysql_upgrde and that it finds the
# expected binaries it uses.
#
--echo Run mysql_upgrade once
--exec $MYSQL_UPGRADE 2> $MYSQLTEST_VARDIR/log/mysql_upgrade.err

--echo Run it again - should say already completed
--exec $MYSQL_UPGRADE 2> $MYSQLTEST_VARDIR/log/mysql_upgrade.err

--echo Force should run it regardless of wheter it's been run before
--exec $MYSQL_UPGRADE --force 2> $MYSQLTEST_VARDIR/log/mysql_upgrade.err



Thread
bk commit into 5.0 tree (msvensson:1.2296)msvensson9 Nov