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',