1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

2 Commits

Author SHA1 Message Date
Marko Mäkelä
0331f1fff7 MDEV-36227 Race condition between ALTER TABLE…EXCHANGE PARTITION and SELECT
In commit 6e6a1b316c (MDEV-35000)
a race condition was exposed.

ha_innobase::check_if_incompatible_data(): If the statistics have
already been initialized for the table, skip the invocation of
innobase_copy_frm_flags_from_create_info() in order to avoid
unexpectedly ruining things for other threads that are concurrently
accessing the table.

dict_stats_save(): Add debug instrumentation that is necessary for
reproducing the interlocking of the failure scenario.
2025-03-07 10:52:59 +02:00
Marko Mäkelä
e44ca6cc9c MDEV-14825 Assertion `col->ord_part' in row_build_index_entry_low upon ROLLBACK or DELETE with concurrent ALTER on partitioned table
If creating a secondary index fails (typically, ADD UNIQUE INDEX fails
due to duplicate key), it is possible that concurrently running UPDATE
or DELETE will access the index stub and hit the debug assertion.

It does not make any sense to keep updating an uncommitted index whose
creation has failed.

dict_index_t::is_corrupted(): Replaces dict_index_is_corrupted().
Also take online_status into account.

Replace some calls to dict_index_is_clust() with calls to
dict_index_t::is_primary().
2018-05-07 15:39:29 +03:00