List:Commits« Previous MessageNext Message »
From:Ingo Strüwing Date:June 22 2007 7:09am
Subject:Re: bk commit - 6.0-falcon tree (istruewing:1.2563) BUG#26827
View as plain text  
Hi Sergei,

thanks for the explanations. Please see below for more questions.

Sergei Golubchik wrote:
> Hi!
> 
> On Jun 21, Ingo Strüwing wrote:
...
>> Do you suggest that we do bitmap_set_all(read_set); handler= clone();
>> rnd_pos(); delete handler; to retrieve a full row? Do that wherever we
>> saw a duplicate key error? Or do it in handler::print_error()?
> 
> basically yes. few thoughts:
> - bitmap_set_all can be done after clone
> - after bitmap_set_all you need to call column_bitmaps_signal() on the
>   cloned handler
> - you need to clone only once, on the first duplicate key error
> - you don't need bitmap_set_all, that is, no need to set ALL bits, it's
>   enough to set only bits for fields that are part of the UNIQUE key.
>   But as we don't expect duplicate key error to happen many times, this
>   optimization isn't important.
> - in any case all the above can be skipped if the necessary bit is
>   already set in read_set. That is, for MyISAM, HEAP, and other storage
>   engines that always read the full row the above should not be executed
>   at all.

I still do not know, where to implement it: Do that wherever we saw a
duplicate key error? Or do it in handler::print_error()?

Why do we need that clone at all? When we take position() and do
rnd_pos() on it, do we modify the current position? Is the cursor
disturbed by it? The importance of the question is made by the fact that
we need to do the same in the partition handler when an update moves a
record from one partition to another. ha_partitiom::update_row() calls
handler::write_row() in this case and must provide a complete record.

Regards
Ingo
-- 
Ingo Strüwing, Senior Software Developer
MySQL GmbH, Radlkoferstr. 2, D-81373 München
Geschäftsführer: Kaj Arnö - HRB München 162140
Thread
Re: bk commit - 6.0-falcon tree (istruewing:1.2563) BUG#26827Ingo Strüwing21 Jun
  • Re: bk commit - 6.0-falcon tree (istruewing:1.2563) BUG#26827Sergei Golubchik21 Jun
    • Re: bk commit - 6.0-falcon tree (istruewing:1.2563) BUG#26827Ingo Strüwing22 Jun
Re: bk commit - 6.0-falcon tree (istruewing:1.2563) BUG#26827Sergei Golubchik22 Jun
  • Re: bk commit - 6.0-falcon tree (istruewing:1.2563) BUG#26827Ingo Strüwing22 Jun
    • Re: bk commit - 6.0-falcon tree (istruewing:1.2563) BUG#26827Sergei Golubchik22 Jun