Commit d804b33a authored by unknown's avatar unknown
Browse files

Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


BitKeeper/deleted/.del-abi_check.ic:
  Auto merged
client/mysql_upgrade.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
parents 52bc54d2 5900506c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -541,7 +541,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);
@@ -578,7 +578,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"
+49 −5
Original line number Diff line number Diff line
@@ -142,6 +142,7 @@ our $opt_verbose= 0; # Verbose output, enable with --verbose
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;
@@ -1407,6 +1408,14 @@ sub executable_setup () {
  {
    $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 )
  {
@@ -1531,6 +1540,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 () {
@@ -1790,6 +1826,14 @@ sub environment_setup () {
  # ----------------------------------------------------
  $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
  # ----------------------------------------------------
+127 −0
Original line number Diff line number Diff line
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
+20 −0
Original line number Diff line number Diff line
# 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