← Back to team overview

maria-developers team mailing list archive

Re: 3eceb51: MDEV-7990: ERROR 1526 when procedure executed for second time ALTER TABLE partition ... pMAX values less than MAXVALUE

 

Hi, Sanja!

On May 06, sanja@xxxxxxxxxxx wrote:
> revision-id: 3eceb51e697d5a514e70c374a06e7eef6b5a37a0
> parent(s): aa5095627e2619bdad7916d33d1016802a84a9e1
> committer: Oleksandr Byelkin
> branch nick: server
> timestamp: 2015-05-06 13:19:22 +0200
> message:
> 
> MDEV-7990: ERROR 1526 when procedure executed for second time ALTER
> TABLE partition ... pMAX values less than MAXVALUE
> 
> Added cleaning partition data which are saved in LEX structure to make
> possible correct re-execution of a SP or PS using the code.

No, this is wrong. See prep_alter_part_table(). The first thing it does
it to copy thd->lex->part_info to thd->work_part_info. It tries to do a
deep copy to be able to modify it freely, but apparently the copy isn't
deep enough. I see two options

1. Do a deeper copy. Duplicate all value lists.

2. Make part_column_list_val elements immutable. That would be
   preferred, of course, but I'm not sure it's possible.

Regards,
Sergei


Follow ups