~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/randgen/runall.pl

  • Committer: Mark Atwood
  • Date: 2011-12-14 18:12:05 UTC
  • mfrom: (2465.1.4 drizzle)
  • Revision ID: me@mark.atwood.name-20111214181205-tkz0lq9c4c0ptrwo
mergeĀ lp:~brianaker/drizzle/fix-localhost

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
                ($server_id == 0) ||
221
221
                ($rpl_mode eq '') 
222
222
        ) {
223
 
                $master_dsns[$server_id] = "dbi:mysql:host=127.0.0.1:port=".$master_ports[$server_id].":user=root:database=".$database;
 
223
                $master_dsns[$server_id] = "dbi:mysql:host=localhost:port=".$master_ports[$server_id].":user=root:database=".$database;
224
224
        }
225
225
 
226
226
        my @mtr_options;
259
259
                # If we are running in replication, and we start the slave separately (because it is a different binary)
260
260
                # add a few options that allow the slave and the master to be distinguished and SHOW SLAVE HOSTS to work
261
261
                push @mtr_options, "--mysqld=--server-id=".($server_id + 1);
262
 
                push @mtr_options, "--mysqld=--report-host=127.0.0.1";
 
262
                push @mtr_options, "--mysqld=--report-host=localhost";
263
263
                push @mtr_options, "--mysqld=--report-port=".$master_ports[$server_id];
264
264
        }
265
265
 
321
321
my $master_dbh = DBI->connect($master_dsns[0], undef, undef, { RaiseError => 1 } );
322
322
 
323
323
if ($rpl_mode) {
324
 
        my $slave_dsn = "dbi:mysql:host=127.0.0.1:port=".$slave_port.":user=root:database=".$database;
 
324
        my $slave_dsn = "dbi:mysql:host=localhost:port=".$slave_port.":user=root:database=".$database;
325
325
        my $slave_dbh = DBI->connect($slave_dsn, undef, undef, { RaiseError => 1 } );
326
326
 
327
327
        say("Establishing replication, mode $rpl_mode ...");
339
339
 
340
340
        $slave_dbh->do("CHANGE MASTER TO
341
341
                MASTER_PORT = $master_ports[0],
342
 
                MASTER_HOST = '127.0.0.1',
 
342
                MASTER_HOST = 'localhost',
343
343
               MASTER_USER = 'root',
344
344
               MASTER_CONNECT_RETRY = 1
345
345
        ");