summaryrefslogtreecommitdiff
path: root/storage/innobase/row/row0ins.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/row/row0ins.cc')
-rw-r--r--storage/innobase/row/row0ins.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 9b2ea9db542..f3f2ccdcd0a 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -864,7 +864,6 @@ row_ins_invalidate_query_cache(
innobase_invalidate_query_cache(thr_get_trx(thr), name);
}
-
/** Fill virtual column information in cascade node for the child table.
@param[out] cascade child update node
@param[in] rec clustered rec of child table
@@ -911,6 +910,11 @@ row_ins_foreign_fill_virtual(
if (!record) {
return DB_OUT_OF_MEMORY;
}
+ ut_ad(!node->is_delete
+ || (foreign->type & DICT_FOREIGN_ON_DELETE_SET_NULL));
+ ut_ad(foreign->type & (DICT_FOREIGN_ON_DELETE_SET_NULL
+ | DICT_FOREIGN_ON_UPDATE_SET_NULL
+ | DICT_FOREIGN_ON_UPDATE_CASCADE));
for (uint16_t i = 0; i < n_v_fld; i++) {
@@ -926,7 +930,7 @@ row_ins_foreign_fill_virtual(
dfield_t* vfield = innobase_get_computed_value(
update->old_vrow, col, index,
&vc.heap, update->heap, NULL, thd, mysql_table,
- record, NULL, NULL, NULL);
+ record, NULL, NULL);
if (vfield == NULL) {
return DB_COMPUTE_VALUE_FAILED;
@@ -942,16 +946,11 @@ row_ins_foreign_fill_virtual(
upd_field_set_v_field_no(upd_field, i, index);
- bool set_null =
- node->is_delete
- ? (foreign->type & DICT_FOREIGN_ON_DELETE_SET_NULL)
- : (foreign->type & DICT_FOREIGN_ON_UPDATE_SET_NULL);
-
dfield_t* new_vfield = innobase_get_computed_value(
update->old_vrow, col, index,
&vc.heap, update->heap, NULL, thd,
mysql_table, record, NULL,
- set_null ? update : node->update, foreign);
+ update);
if (new_vfield == NULL) {
return DB_COMPUTE_VALUE_FAILED;