maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #13236
Re: b1b38b64598: MDEV-29181 Potential corruption on FK update on a table with vcol index
Hi, Nikita,
On Sep 27, Nikita Malyavin wrote:
> Sergei, I have reworded the commit message, please see it here:
> https://github.com/MariaDB/server/commit/3a3064e355bac20ed56ae807e790068e16dd16f3
Same thing. I still cannot understand from the comment what the problem
was.
>> > This new solution simply does the following:
>> > * Sets up a referenced table list in TABLE instance (sql_base.cc)
>> > * Iterates through it along with dict_table_t::referenced_set
>> > (row_upd_check_references_constraints)
>> > * Passes corresponding prebuilt through a call chain to
>> > row_ins_foreign_check_on_constraint
>> > * Sets up newly created upd_node_t::prebuilt field and uses it
>> > accordingly is cascade update.
>>
>> Is this upd_node_t::prebuilt used anywhere? As a prebuilt, I mean.
>> I couldn't find it (it's a complex patch, so I couldn've missed it).
>> As far as I can see, it's only used to store a pointer to TABLE.
>>
>> So it seems to me than a simpler fix for this bug could be:
>> * remove vc_templ caching (mysql_table and mysql_table_query_id)
>> * store TABLE* in upd_node_t.
>>
> Not sure about the lifetimes, so it's not necessarily simpler.
> prebuilt is not used in this patch, but it is used during online row
> logging to convert the row to [my]sql format.
It is. But it's used as node->prebuilt->m_mysql_table.
And I write "store TABLE* in upd_node_t", so that'll work for online
alter too.
Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx
References