← Back to team overview

maria-developers team mailing list archive

Re: ce5cc8fb905: MDEV-29021 ALTER TABLE fails when a stored virtual column is dropped+added

 

On Thu, 7 Jul 2022 at 16:05, Sergei Golubchik <serg@xxxxxxxxxxx> wrote:

> Hi, Nikita,
>
> This is good, but I think fill_extra_persistent_columns() shouldn't be
> used at all.
>
> It doesn't handle default values. I've changed rpl_alter_extra_persistent
> test
> as
>
> -alter table t1 add column z1 int as(a+1) virtual, add column z2 int as
> (a+2) persistent;
> +alter table t1 add column z1 int as(a+1) virtual, add column z2 int
> default (a+2);
>
> and, of course, new column z2 wasn't updated properly.
> An easy fix would be to use your code in all cases and remove
> fill_extra_persistent_columns().
>
> Could you do that too, please? And add the test case too. May be just,
> append
>
>    , add column z3 int default (a+2)
>
>
I'm afraid that we still should mark whose fields for write, or we'll end
up broken.
So i guess i'll just remove the function and will add a raw cycle through
thow fields with marking.
There's no error check, so it's not worth a function anymore

Follow ups

References