List:Internals« Previous MessageNext Message »
From:Konstantin Osipov Date:April 23 2010 2:07pm
Subject:Re: HA_EXTRA_WRITE_CAN_REPLACE flag
View as plain text  
* Konstantin Osipov <kostja@stripped> [10/04/23 18:02]:
> > If I understand correctly, the flag HA_EXTRA_WRITE_CAN_REPLACE implies
> > that handler::write_row can overwrite existing rows, if a duplicate is
> > found. That is what the comment states, and that is what I heard NDB
> > does in MySQL Cluster. If this is the case, then I assume that
> > handler::write_row returns success even when the row is overwritten.
> 
> You can treat it in two ways:
>  - it is merely a hint, and the server doesn't expect any change
>    in the contract if it is set
>  - it never actually worked.

I just checked the cluster storage engine code, and it seems that
the cluster is using this option as a hint to avoid extra round
trips. I checked the history, and the option was added
specifically
for the cluster engine.
  
It is becoming apparent now that this addition did not honour 
the status information (i.e. was buggy).

> Both MyISAM and InnoDB engines ignore it,
> (check storage/myisam/mi_extra.c,
> storage/innobase/handler/ha_innodb.cc), which means you should do
> it as well.

-- 
Thread
HA_EXTRA_WRITE_CAN_REPLACE flagZardosht Kasheff22 Apr
  • Re: HA_EXTRA_WRITE_CAN_REPLACE flagVenu Kalyan23 Apr
    • Re: HA_EXTRA_WRITE_CAN_REPLACE flagVenu Kalyan23 Apr
  • Re: HA_EXTRA_WRITE_CAN_REPLACE flagKonstantin Osipov23 Apr
    • Re: HA_EXTRA_WRITE_CAN_REPLACE flagKonstantin Osipov23 Apr
Re: HA_EXTRA_WRITE_CAN_REPLACE flagZardosht Kasheff23 Apr
Re: HA_EXTRA_WRITE_CAN_REPLACE flagZardosht Kasheff23 Apr
  • Re: HA_EXTRA_WRITE_CAN_REPLACE flagVenu Kalyan23 Apr
Re: HA_EXTRA_WRITE_CAN_REPLACE flagZardosht Kasheff24 Apr