From 07c739680057bb205d7be73d47119d11d434bc3c Mon Sep 17 00:00:00 2001 From: Giuseppe Maxia Date: Mon, 9 May 2016 18:40:05 +0200 Subject: [PATCH] Minor tewaks in GTID testing --- bin/make_replication_sandbox | 6 +++++- t/replication_gtid.sb.pl | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/make_replication_sandbox b/bin/make_replication_sandbox index 7700853..66c7311 100755 --- a/bin/make_replication_sandbox +++ b/bin/make_replication_sandbox @@ -484,7 +484,11 @@ for my $slave (1 .. $msb->{options}{how_many_slaves} ) { { $msb->write_to('initialize_slaves', '>>', qq(, master_use_gtid=current_pos) ); - } + } + if ($msb->{options}{gtid}) + { + $msb->write_to('initialize_slaves', '>>', ', MASTER_AUTO_POSITION=1'); + } $msb->write_to('initialize_slaves', '>>', qq(' | $replication_directory/node$slave/use -u root ) ); diff --git a/t/replication_gtid.sb.pl b/t/replication_gtid.sb.pl index 9be51f9..72e45e2 100644 --- a/t/replication_gtid.sb.pl +++ b/t/replication_gtid.sb.pl @@ -36,6 +36,9 @@ msg => 'Master GTID is enabled', }); +# When GTID is enabled, the slaves take some time to get the synchronization info. +sleep 3; + ok_sql({ path => "$sandbox_home/$replication_dir/master", query => 'select @@global.server_uuid',