maria:bb-10.5-danielblack-MDEV-26891-delay-insert-virt-crash-pr1943

Last commit made on 2021-11-22
Get this branch:
git clone -b bb-10.5-danielblack-MDEV-26891-delay-insert-virt-crash-pr1943 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.5-danielblack-MDEV-26891-delay-insert-virt-crash-pr1943
Repository:
lp:maria

Recent commits

48bf7e6... by Elena Stepanova

MDEV-26891 Server crashes upon INSERT DELAYED with virtual columns (test)

9383152... by kohei-matsuyama <email address hidden>

MDEV-26891 Server crashes upon INSERT DELAYED with virtual columns

Crash occurs in Field::register_field_in_read_map

Closes #1943

5489ce0... by Marko Mäkelä

Merge 10.4 into 10.5

70e788b... by Marko Mäkelä

Merge 10.3 into 10.4

9962cda... by Marko Mäkelä

Merge 10.2 into 10.3

878f7e3... by Marko Mäkelä

MDEV-23805 fixup: Adjsut the MDEV-16131 and MDEV-24730 tests

MDEV-23805 simplified the treatment of empty tables during ALTER TABLE,
which could prevent the scenarios that were previously reported and
fixed as MDEV-16131 and MDEV-24730.

With the MDEV-23805 fix, the statement
SET DEBUG_SYNC = 'now WAIT_FOR copied';
could occasionally time out, depending on timing.
Apparently, there was a race condition where purge could resume
(and empty the table) before ALTER TABLE got the chance to execute.
We must prevent the purge of history from running before
ALTER TABLE has started executing.

ed0a224... by Eugene

MDEV-26747 improve corruption check for encrypted tables on ALTER IMPORT

fil_space_decrypt(): change signature to return status via dberr_t only.
Also replace impossible condition with an assertion and prove it via
test cases.

8f24f5f... by Igor Babaev

MDEV-26825 Bogus error for query with two usage of CTE referring another CTE

  This bug affected queries with two or more references to a CTE referring
another CTE if the definition of the latter contained an invocation of
a stored function that used a base table. The bug could lead to a bogus
error message or to an assertion failure.
  For any non-first reference to CTE cte1 With_element::clone_parsed_spec()
is called that parses the specification of cte1 to construct the unit
structure for this usage of cte1. If cte1 refers to another CTE cte2
outside of the specification of cte1 then With_element::clone_parsed_spec()
has to be called for cte2 as well. This call is made by the function
LEX::resolve_references_to_cte() within the invocation of the function
With_element::clone_parsed_spec() for cte1.
  When the specification of a CTE is parsed all table references encountered
in it must be added to the global list of table references for the query.
As the specification for the non-first usage of a CTE is parsed at a
recursive call of the parser the function With_element::clone_parsed_spec()
invoked at this recursive call should takes care of appending the list of
table references encountered in the specification of this CTE cte1 to the
list of table references created for the query. And it should do it after
the call of LEX::resolve_references_to_cte() that resolves references to
CTEs defined outside of the specification of cte1 because this call may
invoke the parser again for specifications of other CTEs and the table
references from their specifications must ultimately appear in the global
list of table references of the query.
  The code of With_element::clone_parsed_spec() misplaced the call of
LEX::resolve_references_to_cte(). As a result LEX::query_tables_last used
for the query that was supposed to point to the field 'next_global' of the
last element in the global list of table references actually pointed to
'next_global' of the previous element.
  The above inconsistency certainly caused serious problems when table
references used in the stored functions invoked in cloned specifications
of CTEs were added to the global list of table references.

ebb15f9... by Marko Mäkelä

MDEV-27059 page_zip_dir_insert() may corrupt ROW_FORMAT=COMPRESSED tables

In commit 7ae21b18a6b73bbc3bf1ff448faf60c29ac1d386 (MDEV-12353)
the recovery of ROW_FORMAT=COMPRESSED tables was changed.
Changes would be logged in a physical format for the compressed
page image, so that the page need not be decompressed or compressed
during recovery.

page_zip_write_rec(): Log any update of the delete-mark flag in the
ROW_FORMAT=COMPRESSED page.

page_zip_dir_insert(): Copy the delete-mark flag. A delete-marked
record may be inserted by btr_cur_pessimistic_update() via
btr_cur_insert_if_possible(), page_cur_tuple_insert(),
page_cur_insert_rec_zip(). In the observed scenario, it was
an ROLLBACK. Presumably, the test case involved repeated DELETE
and INSERT of the same key, or updating a key back and forth.
This change alone might make the adjustment in page_zip_write_rec()
redundant, but we play it safe because we failed to create a
minimal test case for this scenario.

09205a1... by Marko Mäkelä

Merge 10.4 into 10.5