Skip to content

Commit

Permalink
MDEV-33972: Memory corruption in innodb.insert_into_empty
Browse files Browse the repository at this point in the history
trx_t::bulk_insert_apply_for_table(dict_table_t *table):
Do not write through an invalid iterator.
This fixes up commit 863f599 (MDEV-33868).
  • Loading branch information
dr-m committed Apr 23, 2024
1 parent f0d0ddc commit 455a15f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions storage/innobase/row/row0merge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5374,13 +5374,15 @@ dberr_t trx_t::bulk_insert_apply_for_table(dict_table_t *table)
if (UNIV_UNLIKELY(!bulk_insert))
return DB_SUCCESS;
auto it= mod_tables.find(table);
if (it != mod_tables.end() && it->second.bulk_store)
if (it != mod_tables.end())
{
if (dberr_t err= it->second.write_bulk(table, this))
{
bulk_rollback_low();
return err;
}
it->second.end_bulk_insert();
it->second.end_bulk_insert();
}
return DB_SUCCESS;
}

Expand Down

0 comments on commit 455a15f

Please sign in to comment.