Andrei Elkin wrote:
> Mats, hello.
> To let you know the latest patch is
> not one you have pasted.
> As to your single remark,
>> Andrei Elkin wrote:
>>> He Zhenxing, hello.
>>>>> + if (!all)
>>>>> + trx_data->before_stmt_pos = MY_OFF_T_UNDEF;
>>>> I would suggest to wrap this in a function named something like
>>>> THD::binlog_end_stmt or THD::binlog_reset_stmt_begin.
>>> Well, I am not sure in what is the best style.
>>> Personally, I would call a new
>>> However I am not keen on making any change for this part for few
>>> reasons. First, there are other refactoring ideas. E.g
>>> an accessor and a setter to trx_data->before_stmt_pos both are
>>> missed, instead trx_data->before_stmt_pos is defined public and used
>>> widely across the code. Second, mine proposal
>>> binlog_trx_data::reset_stmt(), if implemented ever, is not just
>>> trx_data->before_stmt_pos = MY_OFF_T_UNDEF but should include other
>>> activities such as flushing or removing the pending event.
>> trx_data->reset() already does that.
> I was trying to say a new method (not a part of the current fixes,
> merely an idea)
> would call trx_data->reset() as well as to carry out flushing at commit or
> removing at rollback.
Lead Software Developer
MySQL AB, www.mysql.com