From 1f5ca66e53b165c29ea733acd0fab79975a43eda Mon Sep 17 00:00:00 2001 From: Nikita Malyavin Date: Wed, 27 Oct 2021 18:37:33 +0300 Subject: =?UTF-8?q?MDEV-26866=20FOREIGN=20KEY=E2=80=A6SET=20NULL=20corrupt?= =?UTF-8?q?s=20an=20index=20on=20a=20virtual=20column?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The initial test case for MySQL Bug #33053297 is based on mysql/mysql-server@27130e25078864b010d81266f9613d389d4a229b. innobase_get_field_from_update_vector is not a suitable function to fetch updated row info, as well as parent table's update vector is not always suitable. For instance, in case of DELETE it contains undefined data. castade->update vector seems to be good enough to fetch all base columns update data, and besides faster, and less error-prone. --- storage/innobase/row/row0vers.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage/innobase/row/row0vers.cc') diff --git a/storage/innobase/row/row0vers.cc b/storage/innobase/row/row0vers.cc index b9bc8418366..bf229966525 100644 --- a/storage/innobase/row/row0vers.cc +++ b/storage/innobase/row/row0vers.cc @@ -491,7 +491,7 @@ row_vers_build_clust_v_col( dfield_t *vfield = innobase_get_computed_value( row, col, clust_index, &vc.heap, heap, NULL, thd, maria_table, record, NULL, - NULL, NULL); + NULL); if (vfield == NULL) { innobase_report_computed_value_failed(row); ut_ad(0); -- cgit v1.2.1