List:Internals« Previous MessageNext Message »
From:Chad MILLER Date:September 10 2007 3:54pm
Subject:Re: second version of proposed patch for delayed replication (Bug#28760)
View as plain text  
On 7 Sep 2007, at 11:34, Kay Roepke wrote:

> Hi!
>
> On Sep 7, 2007, at 4:15 PM, Chad MILLER wrote:
>
>> What's the master_delay global variable for?  Here's how I see it  
>> used, with "grep".
>>
>> +uint32 master_delay= 0;
>> +  mi->delay= master_delay;
>> +  /* added value of master_delay */
>> +          init_intvar_from_file(&delay, &mi->file, master_delay))
>> +extern uint32 master_delay;
>>
>> Perhaps it's the first step in something you're planning to submit?
>
> Actually, it's the heart of the patch and it should be complete in  
> itself.
> master_delay is the value that's being read in from the master.info  
> file, like the other members of the mi object.

Sorry, to me it looks like a source of zeros.  master_delay is  
initialized to zero, and later read as a default value if the value  
isn't in a file.  It's never assigned a new value.  I took out the  
definition and replaced it with  #define master_delay 0  , and it  
does the same thing.  :\

>> +          init_intvar_from_file(&delay, &mi->file, master_delay))
                                     ^dest loc  ^src stream  ^default  
value if not found

I asked because I thought it might be possible that you planned to  
create a command-line parameter that set the default delay there.   
(If that were the case, then I'd want to change the name of  
"master_delay", to have the name "default" in it.)


>> Since the patch came with no test, I took the time to create one.   
>> Here's my first try of a test file.
>>
>> I welcome ideas for new tests or implementations of the ideas at  
>> the end.  I want to prove that there are no bugs or unexpected  
>> behavior in adding this feature.  Help!
>
> As soon as I have a minute I will try to set up a test case based  
> upon yours. What version of the tree are you integrating this into?
> Maybe I can start off of that to help out. The patch was against  
> mysql-5.1-bk (from June 6th, I guess), so it's rather oldish.

mysql-5.2, which is still similar to mysql-5.1.  It should be no  
problem to apply patches from 5.1, so use whatever you like.

- chad

--
Chad Miller, Software Developer                         chad@stripped
MySQL Inc., www.mysql.com
Orlando, Florida, USA                                13-20z,  UTC-0400
Office: +1 408 213 6740                         sip:6740@stripped

(If it's not cryptographically signed, it's not from Chad)



Attachment: [application/pgp-signature] This is a digitally signed message part PGP.sig
Thread
Re: second version of proposed patch for delayed replication (Bug#28760)Chad MILLER7 Sep
  • Re: second version of proposed patch for delayed replication (Bug#28760)Kay Roepke7 Sep
    • Re: second version of proposed patch for delayed replication (Bug#28760)Chad MILLER10 Sep
      • Re: second version of proposed patch for delayed replication (Bug#28760)Kay Roepke10 Sep