List:Maria Storage Engine« Previous MessageNext Message »
From:Guilhem Bichot Date:July 10 2008 9:23am
Subject:Re: LOAD DATA INFILE REPLACE
View as plain text  
Hello,

On Wed, Jul 09, 2008 at 11:24:44PM +0200, Guilhem Bichot wrote:
> Hello,
> 
> this statement shouldn't use versioning (as it may delete rows). I
> haven't checked if it does, but looking at code... do we have a bug?

I dug a bit, after adding

  DBUG_ASSERT(file->lock.type != TL_WRITE_CONCURRENT_INSERT);
in ha_maria::update_row and delete_row:

- LOAD DATA use TL_WRITE_LOW_PRIORITY or TL_WRITE by default, so this
is ok
- but LOAD DATA CONCURRENT uses TL_WRITE_CONCURRENT_INSERT so if I add
a REPLACE, assertion fires in ha_maria::update_row
- INSERT VALUES ON DUPLICATE KEY UPDATE uses TL_WRITE_LOW_PRIORITY or
TL_WRITE, ok
- INSERT SELECT ON DUPLICATE KEY UPDATE uses
TL_WRITE_CONCURRENT_INSERT, assertion fires in ha_maria::update_row.

I'll commit a fix for those.

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Guilhem Bichot <guilhem@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL France, Lead Software Engineer
/_/  /_/\_, /___/\___\_\___/   Bordeaux, France
       <___/   www.mysql.com   
Thread
LOAD DATA INFILE REPLACEGuilhem Bichot9 Jul
  • Re: LOAD DATA INFILE REPLACEGuilhem Bichot10 Jul