List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:October 6 2008 1:51pm
Subject:Re: bk commit into 5.1 tree (guilhem:1.2596) BUG#31612
View as plain text  
Hello,

Dmitry Lenev a écrit :
> Hello Guilhem!
> 
> Here are my comments about your patch:
> 
> * Guilhem Bichot <guilhem@stripped> [07/10/22 23:01]:
>> ChangeSet@stripped, 2007-10-22 20:52:05+02:00, guilhem@stripped +8 -0
>>   Fix for BUG#31612
>>   "Trigger fired multiple times leads to gaps in auto_increment sequence".
>>   Bug was never experienced by users because it occurs only with the fix
>>   for BUG31540 "incorrect auto_increment values used for multi-row insert
>>   trigger" which is not yet in the main 5.1.
>>   The bug was that if a trigger fired multiple times inside a top
>>   statement (for example top-statement is a multi-row INSERT, 
>>   and trigger is ON INSERT), and that trigger inserted into an auto_increment
>>   column, then gaps could be observed in the auto_increment sequence,
>>   even if there were no other users of the database (no concurrency).
>>   It was wrong usage of THD::auto_inc_intervals_in_cur_stmt_for_binlog.
> 
> ...
> 
>> diff -Nrup a/sql/handler.h b/sql/handler.h
>> --- a/sql/handler.h	2007-09-07 15:41:46 +02:00
>> +++ b/sql/handler.h	2007-10-22 20:52:00 +02:00
>> @@ -1050,6 +1050,13 @@ public:
>>      inserter.
>>    */
>>    Discrete_interval auto_inc_interval_for_cur_row;
>> +  /**
>> +     @brief number of reserved auto-increment intervals. Serves as a heuristic
>> +     when we have no estimation of how many records the statement will insert:
>> +     the more intervals we have reserved, the bigger the next one. Reset in
>> +     handler::ha_release_auto_increment().
>> +  */
>> +  uint32 auto_inc_intervals_count;
> 
> AFAIU by adding new member to "handler" class you are changing our SE API
> and potentially create problems for pluggable storage engines. IMO it
> makes sense at least to notify our SE API team about your changes. Please
> write a letter describing them to Sanjay Manwani <Sanjay.Manwani@stripped>
> (actually it might be a good idea to ask him about appropriate list/
> procedure for such notifications).

Will send Sanjay a mail now.

> Also could you please elaborate why do you use uint32 here and not uint ?
> Old code used Discrete_intervals_list::elements, which is uint.

No specific reason, so I change it to uint.
Thread
bk commit into 5.1 tree (guilhem:1.2596) BUG#31612Guilhem Bichot22 Oct
  • Re: bk commit into 5.1 tree (guilhem:1.2596) BUG#31612Dmitry Lenev6 Oct
    • Re: bk commit into 5.1 tree (guilhem:1.2596) BUG#31612Guilhem Bichot6 Oct