List:Internals« Previous MessageNext Message »
From:Konstantin Osipov Date:April 23 2010 2:02pm
Subject:Re: HA_EXTRA_WRITE_CAN_REPLACE flag
View as plain text  
* Zardosht Kasheff <zardosht@stripped> [10/04/22 16:03]:

> 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.

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