← 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, Sergei!

On 12.06.15 13:09, Sergei Golubchik wrote:
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
What is wrong? I modified clone procedure which used for getting work_part_info deeper copy which is following case 1.

Here is the code in prep_alter_table()

  if (thd->work_part_info &&
      !(thd->work_part_info= thd->lex->part_info->get_clone()))
    DBUG_RETURN(TRUE);

and I changed get_clone() method.

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

_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp



Follow ups

References