Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: second version of proposed patch for delayed replication (Bug#28760)

From: Chad MILLER <chad(at)mysql.com>
Date: Mon Sep 10 2007 - 11:54:06 EDT


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@mysql.com
MySQL Inc., www.mysql.com
Orlando, Florida, USA                                13-20z,  UTC-0400
Office: +1 408 213 6740                         sip:6740@sip.mysql.com

(If it's not cryptographically signed, it's not from Chad)
Received on Mon Sep 10 11:54:29 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 07:59:24 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library