MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:December 5 2007 12:33pm
Subject:Re: bk commit into 5.1 tree (aelkin:1.2610) BUG#31552
View as plain text  
Lars Thalmann wrote:
> On Wed, Dec 05, 2007 at 01:08:06PM +0200, Andrei Elkin wrote:
>   
>

[snip]

>> It's worth to analyze why REVOKE or DML operations on a table from
>> mysql database are replicated in row-based format.
>> Have not we decided to have only the statement format for mysql db
>> modifications?
>>     
>
> Check with Mats.
>   

Yes, the database DDL should be replicated as statements. There were a 
bug (BUG#32435) in the code that I fixed when merging with main, which 
cause the DROP DATABASE statement to replicate changes to mysql.proc 
tables as part of the statement.

>   
>>> 5. Below seems wrong, why is no error code returned?
>>>
>>>    "Error:  (handler error <unknown>)."
>>>       
>> The error must be followed with an explanation (p.2). Nevertheless the
>> handler error can be unknown.
>>     
>
> I think an error code should always be expected from the handler, if
> it is handler that indicate failure.  Mats?
>   

Handlers does not always produce sensible error codes, it appears...

>>> 6. I think the best would be to remove the bit macros and replace them
>>>    with real functions.
>>>       
>> There is no objective reason to remove them. They are correct - thanks
>> to Mats' improvement, reliable (look at using compile time assert)
>> and catch their mice perfectly.
>> Besides, converting them into functions kills the idea not to mess
>> with types - any interger type suffies -  and still being safe
>> (the out-of-range error plus the compile time assert).
>> After all, the macros are just shortcuts of operations basing on 
>> the only << shift.
>> There are similar macros which you might dislike not less.
>> Under my all deepest respect to the object oriented programming I'd
>> never be trying to make classes out of them either :)
>> I hope you will let me generoulsy to stay with them as Mats did.
>>     
>
> It is no need to make them general since they are only used in two
> places.  And type checking is nice.  But, I'm ok with leaving this.
>   

There would be two reasons for changing this into either a function, 
several overloaded functions, or a template function: readability and 
type-safety.

For the time being, I suggest we stay with the macros.

Just my few cents,
Mats Kindahl

-- 
Mats Kindahl
Lead Software Developer
Replication Team
MySQL AB, www.mysql.com


Thread
bk commit into 5.1 tree (aelkin:1.2610) BUG#31552Andrei Elkin5 Dec
Re: bk commit into 5.1 tree (aelkin:1.2610) BUG#31552Mats Kindahl5 Dec
Re: bk commit into 5.1 tree (aelkin:1.2610) BUG#31552Andrei Elkin5 Dec