diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index 35b896bfe495..c346dbadfe06 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -880,7 +880,7 @@ static void row_ins_foreign_fill_virtual(upd_node_t *cascade, const rec_t *rec, dfield_t *vfield = innobase_get_computed_value( update->old_vrow, col, index, &v_heap, update->heap, nullptr, thd, - nullptr, nullptr, nullptr, nullptr, &prebuilt->compress_heap); + nullptr, nullptr, nullptr, nullptr, &prebuilt->blob_heap); if (vfield == nullptr) { *err = DB_COMPUTE_VALUE_FAILED; @@ -918,7 +918,7 @@ static void row_ins_foreign_fill_virtual(upd_node_t *cascade, const rec_t *rec, } dfield_t *new_vfield = innobase_get_computed_value( update->old_vrow, col, index, &v_heap, update->heap, nullptr, thd, - nullptr, nullptr, node->update, foreign, &prebuilt->compress_heap); + nullptr, nullptr, node->update, foreign, &prebuilt->blob_heap); dfield_copy(&(upd_field->new_val), new_vfield); } } @@ -926,7 +926,7 @@ static void row_ins_foreign_fill_virtual(upd_node_t *cascade, const rec_t *rec, if (!node->is_delete && (foreign->type & DICT_FOREIGN_ON_UPDATE_CASCADE)) { dfield_t *new_vfield = innobase_get_computed_value( update->old_vrow, col, index, &v_heap, update->heap, nullptr, thd, - nullptr, nullptr, node->update, foreign, &prebuilt->compress_heap); + nullptr, nullptr, node->update, foreign, &prebuilt->blob_heap); if (new_vfield == nullptr) { *err = DB_COMPUTE_VALUE_FAILED; diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index 77dcbadbe9b2..69229f7dcdaa 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -1249,8 +1249,13 @@ que_thr_t *row_purge_step(que_thr_t *thr) { row_purge_end(thr); } - if (thr->prebuilt != nullptr && thr->prebuilt->compress_heap != nullptr) - mem_heap_empty(thr->prebuilt->compress_heap); + /* Most probably this is not needed at all, because purge for virtual columns + is disabled in 8.0 (see #ifdef INNODB_DD_VC_SUPPORT) */ + if (thr->prebuilt != nullptr && thr->prebuilt->blob_heap != nullptr) + mem_heap_empty(thr->prebuilt->blob_heap); + + /* compress_heap was not used */ + ut_ad(thr->prebuilt == 0 || thr->prebuilt->compress_heap == 0); return (thr); } diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index 21b551cf1889..10071c78e81a 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -241,7 +241,7 @@ static dberr_t row_sel_sec_rec_is_for_clust_rec( vfield = innobase_get_computed_value( row, v_col, clust_index, &heap, heap, nullptr, thr_get_trx(thr)->mysql_thd, thr->prebuilt->m_mysql_table, nullptr, - nullptr, nullptr, &thr->prebuilt->compress_heap); + nullptr, nullptr, &thr->prebuilt->blob_heap); if (vfield == nullptr) { /* This may happen e.g. when this statement is executed in @@ -2830,7 +2830,7 @@ void row_sel_field_store_in_mysql_format_func( row_sel_field_store_in_mysql_format(mysql_rec + templ->mysql_col_offset, templ, rec_index, field_no, data, len, - &prebuilt->compress_heap, ULINT_UNDEFINED); + &prebuilt->blob_heap, ULINT_UNDEFINED); if (heap != blob_heap) { mem_heap_free(heap); @@ -2886,7 +2886,7 @@ void row_sel_field_store_in_mysql_format_func( row_sel_field_store_in_mysql_format(mysql_rec + templ->mysql_col_offset, templ, rec_index, field_no, data, len, - &prebuilt->compress_heap, sec_field_no); + &prebuilt->blob_heap, sec_field_no); } ut_ad(rec_field_not_null_not_add_col_def(len)); @@ -3004,7 +3004,7 @@ bool row_sel_store_mysql_rec(byte *mysql_rec, row_prebuilt_t *prebuilt, row_sel_field_store_in_mysql_format( mysql_rec + templ->mysql_col_offset, templ, rec_index, templ->clust_rec_field_no, (const byte *)dfield->data, dfield->len, - &prebuilt->compress_heap, ULINT_UNDEFINED); + &prebuilt->blob_heap, ULINT_UNDEFINED); if (templ->mysql_null_bit_mask) { mysql_rec[templ->mysql_null_byte_offset] &= ~(byte)templ->mysql_null_bit_mask; diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index ef8646174f18..35306b9cbcda 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -937,7 +937,7 @@ upd_t *row_upd_build_difference_binary( dfield_t *vfield = innobase_get_computed_value( update->old_vrow, col, index, &v_heap, heap, nullptr, thd, - mysql_table, nullptr, nullptr, nullptr, &prebuilt->compress_heap); + mysql_table, nullptr, nullptr, nullptr, &prebuilt->blob_heap); if (vfield == nullptr) { *error = DB_COMPUTE_VALUE_FAILED; @@ -1899,9 +1899,9 @@ static void row_upd_store_v_row(upd_node_t *node, const upd_t *update, THD *thd, row_upd_dup_v_new_vals(update); new_val_v_cols_dup = true; } - innobase_get_computed_value(node->row, col, index, &heap, - node->heap, nullptr, thd, mysql_table, - nullptr, nullptr, nullptr, &prebuilt->compress_heap); + innobase_get_computed_value( + node->row, col, index, &heap, node->heap, nullptr, thd, + mysql_table, nullptr, nullptr, nullptr, &prebuilt->blob_heap); } } } else { @@ -1909,7 +1909,7 @@ static void row_upd_store_v_row(upd_node_t *node, const upd_t *update, THD *thd, deleting row */ innobase_get_computed_value(node->row, col, index, &heap, node->heap, nullptr, thd, mysql_table, nullptr, - nullptr, nullptr, &prebuilt->compress_heap); + nullptr, nullptr, &prebuilt->blob_heap); } } } diff --git a/storage/innobase/row/row0vers.cc b/storage/innobase/row/row0vers.cc index 7bd61f1d0e33..7dbf6ddfad1b 100644 --- a/storage/innobase/row/row0vers.cc +++ b/storage/innobase/row/row0vers.cc @@ -652,7 +652,7 @@ static void row_vers_build_clust_v_col(dtuple_t *row, dict_index_t *clust_index, innobase_get_computed_value(row, col, clust_index, &local_heap, heap, nullptr, current_thd, nullptr, nullptr, - nullptr, nullptr, &prebuilt->compress_heap); + nullptr, nullptr, &prebuilt->blob_heap); } } diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index a78cc8f28dad..ea4d2ec8d69c 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -277,11 +277,16 @@ Frees the global purge system control structure. */ void trx_purge_sys_close() { if (!purge_sys) return; + /* Most probably this is not needed at all, because purge for virtual columns + is disabled in 8.0 (see #ifdef INNODB_DD_VC_SUPPORT) */ for (que_thr_t *thr = UT_LIST_GET_FIRST(purge_sys->query->thrs); thr != nullptr; thr = UT_LIST_GET_NEXT(thrs, thr)) { - if (thr->prebuilt != nullptr && thr->prebuilt->compress_heap != nullptr) { - row_mysql_prebuilt_free_compress_heap(thr->prebuilt); + if (thr->prebuilt != nullptr && thr->prebuilt->blob_heap != nullptr) { + row_mysql_prebuilt_free_blob_heap(thr->prebuilt); } + + /* compress_heap was not used */ + ut_ad(thr->prebuilt == 0 || thr->prebuilt->compress_heap == 0); } que_graph_free(purge_sys->query);