← Back to team overview

maria-developers team mailing list archive

Re: Patch for MDEV-12874 - UPDATE statements with the same source and target

 

Hi, jerome!

On Jul 21, jerome brauge wrote:
> Hello,
>  
> Here is a patch for MDEV-12874 (on branch 10.2-ext).
> Can anyone review it ?

I'll send comments about the code later, don't want to mix small details
and the big question. So, the big one:

Why did you introduce completely new code for handling updates with the
same table? mysql_update has logic when one searches and updates the
same index (UPDATE idx=idx*2 WHERE idx > 5). That's used_key_is_modified
variable. I'd thought you could reuse that. You might still need your
tempfile_newdata, but even then it'll be much less code and simpler
implementation. Would that work?

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


Follow ups

References