Commit ca2e8ed7 authored by unknown's avatar unknown
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0

into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1


sql/Makefile.am:
  Auto merged
sql/field.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
parents f8c0b06a c2e97308
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -303,6 +303,10 @@ SOURCE=..\mysys\mulalloc.c
# End Source File
# Begin Source File

SOURCE=..\mysys\my_access.c
# End Source File
# Begin Source File

SOURCE=..\mysys\my_alloc.c
# End Source File
# Begin Source File
+2 −1
Original line number Diff line number Diff line
@@ -1011,7 +1011,8 @@ static int read_lines(bool execute_commands)
        a nil, it still needs the space in the linebuffer for it. This is,
        naturally, undocumented.
       */
      } while (linebuffer[0] <= linebuffer[1] + 1);
      } while ((unsigned char)linebuffer[0] <=
               (unsigned char)linebuffer[1] + 1);
      line= buffer.c_ptr();
#endif /* __NETWARE__ */
#else
+49 −26
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
# and is part of the translation of the Bourne shell script with the
# same name.

use File::Basename;
use strict;

sub collect_test_cases ($);
@@ -39,6 +40,7 @@ sub collect_test_cases ($) {
  if ( @::opt_cases )
  {
    foreach my $tname ( @::opt_cases ) { # Run in specified order, no sort
      $tname= basename($tname, ".test");
      my $elem= "$tname.test";
      if ( ! -f "$testdir/$elem")
      {
@@ -161,33 +163,35 @@ sub collect_one_test_case($$$$$) {
  my $slave_sh=        "$testdir/$tname-slave.sh";
  my $disabled=        "$testdir/$tname.disabled";

  $tinfo->{'master_opt'}= ["--default-time-zone=+3:00"];
  $tinfo->{'slave_opt'}=  ["--default-time-zone=+3:00"];
  $tinfo->{'master_opt'}= $::glob_win32 ? ["--default-time-zone=+3:00"] : [];
  $tinfo->{'slave_opt'}=  $::glob_win32 ? ["--default-time-zone=+3:00"] : [];
  $tinfo->{'slave_mi'}=   [];

  if ( -f $master_opt_file )
  {
    $tinfo->{'master_restart'}= 1;    # We think so for now
    # This is a dirty hack from old mysql-test-run, we use the opt file
    # to flag other things as well, it is not a opt list at all
    $tinfo->{'master_opt'}= mtr_get_opts_from_file($master_opt_file);

    foreach my $opt (@{$tinfo->{'master_opt'}})
  MASTER_OPT:
    {
      my $master_opt= mtr_get_opts_from_file($master_opt_file);

      foreach my $opt ( @$master_opt )
      {
        my $value;

      $value= mtr_match_prefix($opt, "--timezone=");
        # This is a dirty hack from old mysql-test-run, we use the opt
        # file to flag other things as well, it is not a opt list at
        # all

        $value= mtr_match_prefix($opt, "--timezone=");
        if ( defined $value )
        {
          $tinfo->{'timezone'}= $value;
        $tinfo->{'master_opt'}= [];
        $tinfo->{'master_restart'}= 0;
        last;
          $tinfo->{'skip'}= 1 if $::glob_win32; # FIXME server unsets TZ
          last MASTER_OPT;
        }

        $value= mtr_match_prefix($opt, "--result-file=");

        if ( defined $value )
        {
          $tinfo->{'result_file'}= "r/$value.result";
@@ -196,17 +200,36 @@ sub collect_one_test_case($$$$$) {
          {
            $tinfo->{'result_file'}.= $::opt_result_ext;
          }
        $tinfo->{'master_opt'}= [];
          $tinfo->{'master_restart'}= 0;
        last;
          last MASTER_OPT;
        }

        # If we set default time zone, remove the one we have
        $value= mtr_match_prefix($opt, "--default-time-zone=");
        if ( defined $value )
        {
          $tinfo->{'master_opt'}= [];
        }

      }

      # Ok, this was a real option list, add it
      push(@{$tinfo->{'master_opt'}}, @$master_opt);
    }
  }

  if ( -f $slave_opt_file )
  {
    $tinfo->{'slave_opt'}= mtr_get_opts_from_file($slave_opt_file);
    $tinfo->{'slave_restart'}= 1;
    my $slave_opt= mtr_get_opts_from_file($slave_opt_file);

    foreach my $opt ( @$slave_opt )
    {
      # If we set default time zone, remove the one we have
      my $value= mtr_match_prefix($opt, "--default-time-zone=");
      $tinfo->{'slave_opt'}= [] if defined $value;
    }
    push(@{$tinfo->{'slave_opt'}}, @$slave_opt);
  }

  if ( -f $slave_mi_file )
+52 −0
Original line number Diff line number Diff line
@@ -9,6 +9,9 @@ use strict;
sub mtr_full_hostname ();
sub mtr_init_args ($);
sub mtr_add_arg ($$);
sub mtr_path_exists(@);
sub mtr_script_exists(@);
sub mtr_exe_exists(@);

##############################################################################
#
@@ -47,4 +50,53 @@ sub mtr_add_arg ($$) {
  push(@$args, sprintf($format, @fargs));
}

##############################################################################

sub mtr_path_exists (@) {
  foreach my $path ( @_ )
  {
    return $path if -e $path;
  }
  if ( @_ == 1 )
  {
    mtr_error("Could not find $_[0]");
  }
  else
  {
    mtr_error("Could not find any of " . join(" ", @_));
  }
}

sub mtr_script_exists (@) {
  foreach my $path ( @_ )
  {
    return $path if -x $path;
  }
  if ( @_ == 1 )
  {
    mtr_error("Could not find $_[0]");
  }
  else
  {
    mtr_error("Could not find any of " . join(" ", @_));
  }
}

sub mtr_exe_exists (@) {
  foreach my $path ( @_ )
  {
    $path.= ".exe" if $::opt_win32;
    return $path if -x $path;
  }
  if ( @_ == 1 )
  {
    mtr_error("Could not find $_[0]");
  }
  else
  {
    mtr_error("Could not find any of " . join(" ", @_));
  }
}


1;
+7 −0
Original line number Diff line number Diff line
@@ -38,6 +38,13 @@ sub mtr_show_failed_diff ($) {
  my $result_file=  "r/$tname.result";
  my $eval_file=    "r/$tname.eval";

  if ( $::opt_suite ne "main" )
  {
    $reject_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$reject_file";
    $result_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$result_file";
    $eval_file=   "$::glob_mysql_test_dir/suite/$::opt_suite/$eval_file";
  }

  if ( -f $eval_file )
  { 
    $result_file=  $eval_file;
Loading