Use just RAND() instead of RAND() + NOW() to avoid be coerced to an int and therefore not sub-second safe.

This commit is contained in:
Daniel Nichter
2012-06-06 13:52:17 -07:00
parent a178bb32f8
commit f4b3bdb88b
2 changed files with 2 additions and 2 deletions

View File

@@ -315,7 +315,7 @@ sub wait_for_slaves {
my $self = shift;
my $master_dbh = $self->get_dbh_for('master');
my $slave2_dbh = $self->get_dbh_for('slave2');
my ($ping) = $master_dbh->selectrow_array("SELECT MD5(RAND() + NOW())");
my ($ping) = $master_dbh->selectrow_array("SELECT MD5(RAND())");
$master_dbh->do("UPDATE percona_test.sentinel SET ping='$ping' WHERE id=1");
PerconaTest::wait_until(
sub {