1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-02 19:25:03 +03:00

62 Commits

Author SHA1 Message Date
Marko Mäkelä
1f4ee3fa5a MDEV-20117 Assertion 0 failed in row_sel_get_clust_rec_for_mysql
The crash scenario is as follows:

(1) A non-empty table exists.
(2) MDEV-15562 instant ADD/DROP/reorder has been invoked.
(3) Some purgeable undo log exists for the table.
(4) The table becomes empty, containing not even any delete-marked records,
only containing the hidden metadata record that was added in (2).
(5) An instant ADD/DROP/reorder column is executed, and the table
is emptied and the (2) metadata removed.
(6) Purge processes an undo log record from (3), which will refer to
a non-existent clustered index field, because the metadata that
was created in (2) was remoeved in (5).

We fix this by adjusting step (5) so that we will never remove the
MDEV-15562-style metadata record. Removing the MDEV-11369 metadata
record (instant ADD COLUMN to the end of the table) is completely
fine at any time when the table becomes empty, because
dict_index_t::n_fields will remain unchanged.

innobase_instant_try(): Never remove the MDEV-15562 metadata record.

page_cur_delete_rec(): Do not reset FIL_PAGE_TYPE when the
MDEV-15562 metadata record is being removed as part of
btr_cur_pessimistic_update() invoked by innobase_instant_try().
2019-09-26 19:45:10 +03:00
Marko Mäkelä
ebddd8699c MDEV-20565 Assertion failure on CHANGE COLUMN...SYSTEM VERSIONING
innobase_rename_or_enlarge_column_try(): Relax a debug assertion.
The DATA_VERSIONED bits in dict_col_t::prtype do not affect the
storage format.
2019-09-12 11:42:48 +03:00
Eugene Kosov
7bccd2910f MDEV-20479 assertion failure in dict_table_get_nth_col() after INSTANT DROP COLUMN
get_col_list_to_be_dropped() incorrectly returned uninteresting instantly
dropped column which was missing in a new dict_index_t

get_col_list_to_be_dropped(): rename to collect_columns_from_dropped_indexes
and stop return dropped columns
2019-09-03 22:08:30 +03:00
Marko Mäkelä
e9c1701e11 Merge 10.3 into 10.4 2019-07-25 18:42:06 +03:00
Marko Mäkelä
09e9f884f1 MDEV-20048 Assertion 'n < tuple->n_fields on ROLLBACK after DROP COLUMN
btr_push_update_extern_fields(): Add a parameter for the original number
of fields in the record before btr_cur_trim(). Assume that this function
will only be called for the clustered index, which is the only index
that can contain off-page columns.

trx_undo_prev_version_build(), btr_cur_pessimistic_update():
Only invoke btr_push_update_extern_fields() for the clustered index.
2019-07-19 18:13:36 +03:00
Thirunarayanan Balathandayuthapani
07b1a26c33 MDEV-19630 ALTER TABLE ... ADD COLUMN damages foreign keys
which are pointed to the table being altered
Problem:
========
	InnoDB failed to change the column name present in foreign key cache
for instant add column. So it leads to column mismatch for the consecutive
rename of column.

Solution:
=========
	Evict the foreign key information from cache and load the foreign
key information again for instant operation.
2019-07-10 13:24:10 +05:30
Marko Mäkelä
f9ab7b473a MDEV-18623 Assertion after DROP FULLTEXT INDEX and removing NOT NULL
instant_alter_column_possible(): Do not support instantaneous removal
of NOT NULL if the table needs to be rebuilt for removing the hidden
FTS_DOC_ID column. This is not ideal and should ultimately be fixed
properly in MDEV-17459.
2019-04-02 11:03:44 +03:00
Marko Mäkelä
43c20542dd MDEV-19030: Assertion failed in rec_init_offsets() after DROP COLUMN
This basically is a duplicate of MDEV-18219, proving that the
assertion was not relaxed correctly.

dict_index_t::in_instant_init: A debug flag that will only be set in
btr_cur_instant_init_low() in order to suppress the assertion failure
in rec_init_offsets() for that code path only.
2019-04-02 11:03:44 +03:00
Marko Mäkelä
b8e867e869 MDEV-18219 Assertion index->n_core_null_bytes <= ... after DROP COLUMN
rec_init_offsets(): Relax a debug assertion that is too strict
during the execution of btr_cur_instant_init_low().
2019-02-08 18:46:03 +02:00
Eugene Kosov
10dac4293f MDEV-18444 ROW_FORMAT=COMPRESSED unnecessarily requires NOCOPY for INSTANT operation
instant_alter_column_possible(): allow non-rebuilding operations for
ROW_FORMAT=COMPRESSED
2019-02-07 12:20:53 +02:00
Marko Mäkelä
8aae31cf49 Merge 10.3 into 10.4 2019-01-21 11:21:33 +02:00
Marko Mäkelä
d4144c8e01 MDEV-17821 Assertion !page_rec_is_supremum(rec) failed in btr_pcur_store_position
MDEV-11369 (instant ADD COLUMN) introduced a regression in the case the
leftmost leaf page of the clustered index is empty except for the
hidden metadata record.

btr_pcur_store_position(): If the only record in the leftmost leaf page
is the metadata record, store the position before the first user record
in the tree.
2019-01-21 09:50:52 +02:00