maria:bb-11.1-MDEV-31599

Last commit made on 2023-11-02
Get this branch:
git clone -b bb-11.1-MDEV-31599 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-11.1-MDEV-31599
Repository:
lp:maria

Recent commits

5d3e14d... by Rucha Deodhar <email address hidden>

MDEV-31599: Assertion `0' failed in Item_param::can_return_value
from Item::val_json, UBSAN: member access within null pointer of
type 'struct String' in sql/item_jsonfunc.cc

Analysis:
The first argument of json_schema_valid() needs to be a constant.
Fix:
Parse the schema if the item is constant otherwise set it to return null.

855356c... by Oleg Smirnov

MDEV-32382 FederatedX error on pushdown of statements having CTE

Pushing down statements to FederatedX engine is implemented by
printing either SELECT_LEX or SELECT_LEX_UNIT into a string and
sending that string to the engine. In the case of pushing down a
single SELECT having a CTE (WITH clause) there was a problem, because
normally single SELECTs were printed using SELECT_LEX::print().
But CTEs are stored in the upper unit of the SELECT_LEX -
SELECT_LEX_UNIT, so they were not unfolded in the string produced.

The solution is to invoke SELECT_LEX_UNIT::print() when pushing down
single SELECT statements (but not those which are parts of units),
so the possible CTEs are unfolded and printed.

Reviewed by Sergei Petrunia (<email address hidden>)

9b2a65e... by Marko Mäkelä

Merge 11.0 into 11.1

be24e75... by Marko Mäkelä

Merge 10.11 into 11.0

f833ef5... by Marko Mäkelä

Merge 10.10 into 10.11

c857259... by Marko Mäkelä

Merge 10.6 into 10.10

bf7c6fc... by Marko Mäkelä

MDEV-32511 Assertion !os_aio_pending_writes() failed

In MemorySanitizer builds of 10.10 and 10.11, we would rather often
have the assertion fail in innodb_init() during mariadb-backup --prepare.
The assertion could also fail during InnoDB startup, but less often.

Before commit 685d958e38b825ad9829be311f26729cccf37c46 in 10.8 the
log file cleanup after a successfully applied backup is different,
and the os_aio_pending_writes() assertion is in srv0start.cc.

IORequest::write_complete(): Invoke node->complete_write() before
releasing the page latch, so that a log checkpoint that is about to
execute concurrently will not miss a fdatasync() or fsync() on the
file, in case this was the first write since the last such call.

create_log_file(), srv_start(): Replace the debug assertion with
a debug check. For all intents and purposes, all writes could have
been completed but some write_io_callback() may not have invoked
io_slots::release() yet.

2ecc044... by Marko Mäkelä

Merge 10.10 into 10.11

a49ebf7... by Monty <email address hidden>

Fixed memory leak when using histograms

This was introduced in last merge with 10.6
The reason is that 10.6 does not need anything special to free histograms
as everything is allocated on a memroot.
In 10.10 histograms is using the vector class, which has some problems:
- No automatic free
- No memory usage accounting
(we should at some point remove vector usage because of the above problem)

Fixed by expliciting freeing histograms when freeing TABLE_STATISTICS
objects.

0563106... by Marko Mäkelä

Merge 10.6 into 10.10