~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/test-run.pl

  • Committer: Brian Aker
  • Date: 2010-01-19 01:39:22 UTC
  • mfrom: (971.8.6 eday-dev)
  • Revision ID: brian@gaz-20100119013922-dxgxovlhv8y7zpfs
MergeĀ Eric

Show diffs side-by-side

added added

removed removed

Lines of Context:
271
271
 
272
272
our $opt_max_save_core= 5;
273
273
my $num_saved_cores= 0;  # Number of core files saved in vardir/log/ so far.
 
274
our $mysql_port_offset= 50;
274
275
 
275
276
######################################################################
276
277
#
930
931
   path_pid      => "$opt_vardir/run/master.pid",
931
932
   path_sock     => "$sockdir/master.sock",
932
933
   port          =>  $opt_master_myport,
 
934
   mysql_port    =>  $opt_master_myport + $mysql_port_offset,
933
935
   start_timeout =>  400, # enough time create innodb tables
934
936
   cluster       =>  0, # index in clusters list
935
937
   start_opts    => [],
945
947
   path_pid      => "$opt_vardir/run/master1.pid",
946
948
   path_sock     => "$sockdir/master1.sock",
947
949
   port          => $opt_master_myport + 1,
 
950
   mysql_port    => $opt_master_myport + 1 + $mysql_port_offset,
948
951
   start_timeout => 400, # enough time create innodb tables
949
952
   cluster       =>  0, # index in clusters list
950
953
   start_opts    => [],
957
960
   idx           => 0,
958
961
   path_myddir   => "$opt_vardir/slave-data",
959
962
   path_myerr    => "$opt_vardir/log/slave.err",
960
 
   path_pid    => "$opt_vardir/run/slave.pid",
961
 
   path_sock   => "$sockdir/slave.sock",
962
 
   port   => $opt_slave_myport,
 
963
   path_pid      => "$opt_vardir/run/slave.pid",
 
964
   path_sock     => "$sockdir/slave.sock",
 
965
   port          => $opt_slave_myport,
 
966
   mysql_port    => $opt_slave_myport + $mysql_port_offset,
963
967
   start_timeout => 400,
964
968
 
965
969
   cluster       =>  1, # index in clusters list
973
977
   idx           => 1,
974
978
   path_myddir   => "$opt_vardir/slave1-data",
975
979
   path_myerr    => "$opt_vardir/log/slave1.err",
976
 
   path_pid    => "$opt_vardir/run/slave1.pid",
977
 
   path_sock   => "$sockdir/slave1.sock",
978
 
   port   => $opt_slave_myport + 1,
 
980
   path_pid      => "$opt_vardir/run/slave1.pid",
 
981
   path_sock     => "$sockdir/slave1.sock",
 
982
   port          => $opt_slave_myport + 1,
 
983
   mysql_port    => $opt_slave_myport + 1 + $mysql_port_offset,
979
984
   start_timeout => 300,
980
985
   cluster       =>  -1, # index in clusters list
981
986
   start_opts    => [],
988
993
   idx           => 2,
989
994
   path_myddir   => "$opt_vardir/slave2-data",
990
995
   path_myerr    => "$opt_vardir/log/slave2.err",
991
 
   path_pid    => "$opt_vardir/run/slave2.pid",
992
 
   path_sock   => "$sockdir/slave2.sock",
993
 
   port   => $opt_slave_myport + 2,
 
996
   path_pid      => "$opt_vardir/run/slave2.pid",
 
997
   path_sock     => "$sockdir/slave2.sock",
 
998
   port          => $opt_slave_myport + 2,
 
999
   mysql_port    => $opt_slave_myport + 2 + $mysql_port_offset,
994
1000
   start_timeout => 300,
995
1001
   cluster       =>  -1, # index in clusters list
996
1002
   start_opts    => [],
1434
1440
  # ----------------------------------------------------
1435
1441
  my $cmdline_mysqldump= generate_cmdline_mysqldump($master->[0]);
1436
1442
  my $cmdline_mysqldumpslave= generate_cmdline_mysqldump($slave->[0]);
 
1443
  my $cmdline_mysqldumpmysql= mtr_native_path($exe_drizzledump) .
 
1444
       " --no-defaults -uroot " .
 
1445
       "--mysql --port=$master->[0]->{'mysql_port'} ";
1437
1446
 
1438
1447
  if ( $opt_debug )
1439
1448
  {
1441
1450
      " --debug=d:t:A,$path_vardir_trace/log/mysqldump-master.trace";
1442
1451
    $cmdline_mysqldumpslave .=
1443
1452
      " --debug=d:t:A,$path_vardir_trace/log/mysqldump-slave.trace";
 
1453
    $cmdline_mysqldumpmysql .=
 
1454
      " --debug=d:t:A,$path_vardir_trace/log/mysqldump-mysql.trace";
1444
1455
  }
1445
1456
  $ENV{'DRIZZLE_DUMP'}= $cmdline_mysqldump;
1446
1457
  $ENV{'DRIZZLE_DUMP_SLAVE'}= $cmdline_mysqldumpslave;
 
1458
  $ENV{'DRIZZLE_DUMP_MYSQL'}= $cmdline_mysqldumpmysql;
1447
1459
 
1448
1460
  # ----------------------------------------------------
1449
1461
  # Setup env so childs can execute mysqlslap
1454
1466
      mtr_native_path($exe_drizzleslap) .
1455
1467
      " -uroot " .
1456
1468
      "--port=$master->[0]->{'port'} ";
 
1469
    my $cmdline_drizzleslapmysql=
 
1470
      mtr_native_path($exe_drizzleslap) .
 
1471
      " -uroot " .
 
1472
      "--mysql --port=$master->[0]->{'mysql_port'} ";
1457
1473
 
1458
1474
    if ( $opt_debug )
1459
1475
   {
1460
1476
      $cmdline_drizzleslap .=
1461
1477
        " --debug=d:t:A,$path_vardir_trace/log/drizzleslap.trace";
 
1478
      $cmdline_drizzleslapmysql .=
 
1479
        " --debug=d:t:A,$path_vardir_trace/log/drizzleslap.trace";
1462
1480
    }
1463
1481
    $ENV{'DRIZZLE_SLAP'}= $cmdline_drizzleslap;
 
1482
    $ENV{'DRIZZLE_SLAP_MYSQL'}= $cmdline_drizzleslapmysql;
1464
1483
  }
1465
1484
 
1466
1485
 
1488
1507
    mtr_native_path($exe_drizzle) .
1489
1508
    " --no-defaults --host=localhost  --user=root --password= " .
1490
1509
    "--port=$master->[0]->{'port'} ";
 
1510
  my $cmdline_drizzlemysql=
 
1511
    mtr_native_path($exe_drizzle) .
 
1512
    " --no-defaults --host=localhost  --user=root --password= " .
 
1513
    "--mysql --port=$master->[0]->{'mysql_port'} ";
1491
1514
 
1492
1515
  $ENV{'MYSQL'}= $cmdline_mysql;
 
1516
  $ENV{'DRIZZLE_MYSQL'}= $cmdline_drizzlemysql;
1493
1517
 
1494
1518
  # ----------------------------------------------------
1495
1519
  # Setup env so childs can execute bug25714
2470
2494
              $mysqld->{'path_pid'});
2471
2495
 
2472
2496
  mtr_add_arg($args, "%s--drizzle-protocol-port=%d", $prefix,
2473
 
                $mysqld->{'port'});
 
2497
              $mysqld->{'port'});
2474
2498
 
2475
2499
  mtr_add_arg($args, "%s--mysql-protocol-port=%d", $prefix,
2476
 
                $mysqld->{'port'} + 50);
 
2500
              $mysqld->{'mysql_port'});
2477
2501
 
2478
2502
  mtr_add_arg($args, "%s--datadir=%s", $prefix,
2479
2503
              $mysqld->{'path_myddir'});