Skip to content

Commit 1166887

Browse files
author
Jimmy Yang
committed
Fix valgrind error introduced by WL#8149 checkin
1 parent 904aabf commit 1166887

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

storage/innobase/row/row0ins.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,10 +1180,15 @@ row_ins_foreign_check_on_constraint(
11801180

11811181
for (i = 0; i < foreign->n_fields; i++) {
11821182
upd_field_t* ufield = &update->fields[i];
1183+
ulint col_no = dict_index_get_nth_col_no(
1184+
index, i);
11831185

11841186
ufield->field_no = dict_table_get_nth_col_pos(
1185-
table,
1186-
dict_index_get_nth_col_no(index, i));
1187+
table, col_no);
1188+
dict_col_t* col = dict_table_get_nth_col(
1189+
table, col_no);
1190+
dict_col_copy_type(col, dfield_get_type(&ufield->new_val));
1191+
11871192
ufield->orig_len = 0;
11881193
ufield->exp = NULL;
11891194
dfield_set_null(&ufield->new_val);

0 commit comments

Comments
 (0)