On Tue, 2007-10-09 at 09:32 +0200, Kristian Nielsen wrote:
> stewart@stripped writes:
>
> > +change master to master_bind='1.1.1.1';
> > +connection master;
> > +insert into t1 values (3);
> > +save_master_pos;
> > +connection slave;
> > +start slave;
> > +--real_sleep 1 # wait for I/O thread to try connection
>
> It is almost always wrong to use sleep in test cases (because of race
> conditions). But in this case I think it will work. Since, the race is that if
> the connection _does not_ fail (==bug), the test may or may not fail depending
> on timing. If the code works, there is no race.
>
> So should work, but please add a comment explaining this (ie. explain why the
> race condition will not cause random failures if the feature is correctly
> implemented).
I think to really have this work we need a "connect timeout" for
client/rpl connections (like we do for mgmapi in ndb) and a way to wait
for it to expire (or an error) so we could write it properly.
i.e. I'd actually call this test case buggy... but the fix is larger
(and I think it's on a NRE list somewhere) and (again) involves changes
to the output of SHOW SLAVE STATUS (which there is about no way in hell
I'm ever touching that again... It turns out I don't totally hate
myself).
So I'm tempted to open a bug... with a depends on WLXXXX... oh wait...
there's no neat way to specify that :(
--
Stewart Smith, Senior Software Engineer
MySQL AB, www.mysql.com
Office: +14082136540 Ext: 6616
VoIP: 6616@stripped
Mobile: +61 4 3 8844 332
Jumpstart your cluster:
http://www.mysql.com/consulting/packaged/cluster.html
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc