~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/mysql-test-run.pl

  • Committer: Brian Aker
  • Date: 2008-07-07 23:10:29 UTC
  • Revision ID: brian@tangent.org-20080707231029-quono6d88wzyjvnj
Final cleanup this round for mysql-test-run.

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
our @opt_extra_mysqld_opt;
163
163
 
164
164
our $opt_compress;
165
 
our $opt_ps_protocol;
166
 
our $opt_sp_protocol;
167
 
our $opt_cursor_protocol;
168
 
our $opt_view_protocol;
169
165
 
170
166
our $opt_debug;
171
167
our $opt_do_test;
294
290
sub run_benchmarks ($);
295
291
sub initialize_servers ();
296
292
sub mysql_install_db ();
297
 
sub install_db ($$);
298
293
sub copy_install_db ($$);
299
294
sub run_testcase ($);
300
295
sub run_testcase_stop_servers ($$$);
470
465
  Getopt::Long::Configure("pass_through");
471
466
  GetOptions(
472
467
             # Control what engine/variation to run
473
 
             'ps-protocol'              => \$opt_ps_protocol,
474
 
             'sp-protocol'              => \$opt_sp_protocol,
475
 
             'view-protocol'            => \$opt_view_protocol,
476
 
             'cursor-protocol'          => \$opt_cursor_protocol,
477
468
             'compress'                 => \$opt_compress,
478
469
             'bench'                    => \$opt_bench,
479
470
             'small-bench'              => \$opt_small_bench,
833
824
  }
834
825
 
835
826
  # --------------------------------------------------------------------------
836
 
  # ps protcol flag
837
 
  # --------------------------------------------------------------------------
838
 
  if ( $opt_ps_protocol )
839
 
  {
840
 
    push(@glob_test_mode, "ps-protocol");
841
 
  }
842
 
 
843
 
  # --------------------------------------------------------------------------
844
827
  # Bench flags
845
828
  # --------------------------------------------------------------------------
846
829
  if ( $opt_small_bench )
1617
1600
  $ENV{'MY_PERROR'}= mtr_native_path($exe_perror);
1618
1601
 
1619
1602
  # ----------------------------------------------------
1620
 
  # Add the path where mysqld will find udf_example.so
1621
 
  # ----------------------------------------------------
1622
 
  $ENV{'UDF_EXAMPLE_LIB'}=
1623
 
    ($lib_udf_example ? basename($lib_udf_example) : "");
1624
 
  $ENV{'UDF_EXAMPLE_LIB_OPT'}=
1625
 
    ($lib_udf_example ? "--plugin_dir=" . dirname($lib_udf_example) : "");
1626
 
 
1627
 
  # ----------------------------------------------------
1628
1603
  # Add the path where mysqld will find ha_example.so
1629
1604
  # ----------------------------------------------------
1630
1605
  $ENV{'EXAMPLE_PLUGIN'}=
2098
2073
 
2099
2074
sub mysql_install_db () {
2100
2075
 
2101
 
  install_db('master', $master->[0]->{'path_myddir'});
2102
 
 
2103
2076
  if ($max_master_num > 1)
2104
2077
  {
2105
2078
    copy_install_db('master', $master->[1]->{'path_myddir'});
2127
2100
}
2128
2101
 
2129
2102
 
2130
 
sub install_db ($$) {
2131
 
  my $type=      shift;
2132
 
  my $data_dir=  shift;
2133
 
 
2134
 
  mtr_report("Installing \u$type Database");
2135
 
 
2136
 
 
2137
 
  my $args;
2138
 
  mtr_init_args(\$args);
2139
 
  mtr_add_arg($args, "--no-defaults");
2140
 
  mtr_add_arg($args, "--bootstrap");
2141
 
  mtr_add_arg($args, "--basedir=%s", $path_my_basedir);
2142
 
  mtr_add_arg($args, "--datadir=%s", $data_dir);
2143
 
  mtr_add_arg($args, "--loose-skip-innodb");
2144
 
  mtr_add_arg($args, "--tmpdir=.");
2145
 
  mtr_add_arg($args, "--core-file");
2146
 
 
2147
 
  if ( $opt_debug )
2148
 
  {
2149
 
    mtr_add_arg($args, "--debug=d:t:i:A,%s/log/bootstrap_%s.trace",
2150
 
                $path_vardir_trace, $type);
2151
 
  }
2152
 
 
2153
 
  {
2154
 
    mtr_add_arg($args, "--language=%s", $path_language);
2155
 
    mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
2156
 
  }
2157
 
 
2158
 
  # If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g.,
2159
 
  # configure --disable-grant-options), mysqld will not recognize the
2160
 
  # --bootstrap or --skip-grant-tables options.  The user can set
2161
 
  # MYSQLD_BOOTSTRAP to the full path to a mysqld which does accept
2162
 
  # --bootstrap, to accommodate this.
2163
 
  my $exe_mysqld_bootstrap = $ENV{'MYSQLD_BOOTSTRAP'} || $exe_mysqld;
2164
 
 
2165
 
  # ----------------------------------------------------------------------
2166
 
  # export MYSQLD_BOOTSTRAP_CMD variable containing <path>/mysqld <args>
2167
 
  # ----------------------------------------------------------------------
2168
 
  $ENV{'MYSQLD_BOOTSTRAP_CMD'}= "$exe_mysqld_bootstrap " . join(" ", @$args);
2169
 
}
2170
 
 
2171
 
 
2172
2103
#
2173
2104
# Restore snapshot of the installed slave databases
2174
2105
# if the snapshot exists
2226
2157
 
2227
2158
  if (!$opt_extern)
2228
2159
  {
2229
 
    if ( $mysql_version_id < 50000 ) {
2230
 
      # Set environment variable NDB_STATUS_OK to 1
2231
 
      # if script decided to run mysqltest cluster _is_ installed ok
2232
 
      $ENV{'NDB_STATUS_OK'} = "1";
2233
 
    } elsif ( $mysql_version_id < 50100 ) {
2234
 
      # Set environment variable NDB_STATUS_OK to YES
2235
 
      # if script decided to run mysqltest cluster _is_ installed ok
2236
 
      $ENV{'NDB_STATUS_OK'} = "YES";
2237
 
    }
2238
2160
    if (defined $tinfo->{binlog_format} and  $mysql_version_id > 50100 )
2239
2161
    {
2240
2162
      # Dynamically switch binlog format of
3329
3251
    mtr_add_arg($args, "--password=");
3330
3252
  }
3331
3253
 
3332
 
  if ( $opt_ps_protocol )
3333
 
  {
3334
 
    mtr_add_arg($args, "--ps-protocol");
3335
 
  }
3336
 
 
3337
 
  if ( $opt_sp_protocol )
3338
 
  {
3339
 
    mtr_add_arg($args, "--sp-protocol");
3340
 
  }
3341
 
 
3342
 
  if ( $opt_view_protocol )
3343
 
  {
3344
 
    mtr_add_arg($args, "--view-protocol");
3345
 
  }
3346
 
 
3347
 
  if ( $opt_cursor_protocol )
3348
 
  {
3349
 
    mtr_add_arg($args, "--cursor-protocol");
3350
 
  }
3351
 
 
3352
3254
  if ( $opt_strace_client )
3353
3255
  {
3354
3256
    $exe=  "strace";            # FIXME there are ktrace, ....