>
>> Before Alfranio's patch the `is_trans' bool served to send an event
>> into the requested location which were either T-cache of the direct
>> log.
>> With the patch there are 3 destination and therefore the 3 values
>> for/instead of `is_trans' is natural unless necessary.
>> In some distant future we may gain yet another 4th and so on.
>>
>
> I don't think so, and actually I think after fixing the problem of NDB,
> we can also make DDLs through S-cache.
It is a possibility. But still
>
>> As you mention yourself, 2) Incident event and some more request and some more
>> in future can request the direct binlogging. That means we would have
>> to tag with CF_AUTO_COMMIT_TRANS some more stuff than DDL:s.
>>
>
> No, Incident event will not be flagged with this, I think Incident event
> is very special, it's not a problem to handle this case specially in
> MYSQL_BIN_LOG::write()
there are things, and we can say confidently more to come,
to be written directly to the binary log bypassing any cache.
So why not to reflect it with an explicit argument to
MYSQL_BIN_LOG::write() ?
>
>> Yes, callers of MYSQL_BIN_LOG::write() can check CF_AUTO_COMMIT_TRANS
>> and basing on that set the suggested s/bool is_trans/enum
>> destination/ enum appopriately.
>>
>
> I'd like to do this within MYSQL_BIN_LOG::write() instead.
>
If we go this way to derive binlogging policy out of thd context then
we won't need `bool is_trans' altogether.
Currently callers of write() specify which destination to follow, they do it via
the method's argument and why should be break that?
My suggestion is merely to elaborate on the current technique which
I find quite concise.
>
>> I hope you will find these arguments sensisble.
>>
>
> I see your point :), whether remove the 'direct' argument or not is more
> a matter of personal coding preference, I'm OK with or without it.
>
The new `Direct' is an item relative to the N and T caches. So we have
in fact the three item binlogging destination set {D,N,T}. the three
combines perfectly with the is_trans convesion I am talking about.
cheers,
Andrei