maria:bb-10.6-MDEV-31380

Last commit made on 2023-06-01
Get this branch:
git clone -b bb-10.6-MDEV-31380 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.6-MDEV-31380
Repository:
lp:maria

Recent commits

d4f1884... by Sergey Petrunia

MDEV-31380: Assertion `s->table->opt_range_condition_rows <= s->found_records' failed

LooseScan code set opt_range_condition_rows to be the

  MIN(loose_scan_plan->records, table->records)

totally ignoring possible quick range selects. If there was a quick
select $QUICK on another index with

  $QUICK->records < loose_scan_plan->records

this would create a situation where

   opt_range_condition_rows > $QUICK->records

which caused an assert.
Fixed by making opt_range_condition_rows to be the minimum #rows
of any quick select.

5919f7b... by THIRUNARAYANAN BALATHANDAYUTHAPANI

MDEV-31264 Purge trying to access freed secondary index page

- InnoDB purge tries to access aborted secondary index and access
the freed secondary index root page.

e3b0615... by Marko Mäkelä

MDEV-31347 fil_ibd_create() may hijack the file handle of an old file

fil_ibd_create(): Hold fil_system.mutex until fil_node_t::find_metadata()
has completed, so that node->handle cannot be closed by a concurrent
thread. This race condition was introduced
in commit 10dd290b4b8b8b235c8cf42e100f0a4415629e79 (MDEV-17380).

Tested by: Matthias Leich

eb20e7c... by Marko Mäkelä

MDEV-31353 InnoDB recovery hangs after reporting corruption

recv_recover_page(): Remove some code which was added in
commit 0b47c126e31cddda1e94588799599e138400bcf8 with
no good reason and which would cause a hang after a corrupted
page was reported during crash recovery.

Tested by: Matthias Leich

30fb72c... by Tuukka Pasanen <email address hidden>

MDEV-31331: Fix cut'n'paste variable name in Debian pre-inst script

There is unwanted cut'n'paste variable name in Debian pre-inst
script which causes:

df: '': No such file or directory
/var/lib/dpkg/tmp.ci/preinst: line 215: [: : integer expression expected

Rename variable to correct one and make check that that directory
or symlink really exists. If it does not then fail with error
and message.

a6c0a27... by Marko Mäkelä

MDEV-31362 recv_sys_t::apply(bool): Assertion `!last_batch || recovered_lsn == scanned_lsn' failed

recv_sys_t::apply(): Remove a bogus debug assertion that had been
added in commit f2c17cc9d9bcd634887846d3064bcb71243f9cc0 (MDEV-29911).

It is perfectly normal that when the server was killed in the middle of
writing multiple redo log blocks, the recovery would end such that
recv_sys.scanned_lsn will point to the end of the last complete 512-byte
log block, but recv_sys.recovered_lsn will be less than that.

Also, correct the function comment of recv_sys_t::parse().

ea66df2... by Otto Kekalainen <email address hidden>

Deb: Fix blocksize check to use $mysql_datadir/$datadir correctly

In commit f99a8918 this line was changed to not use awk, and new version
copied both to init file and preinst file but overlooking that they use
different variable names.

Also fix minor syntax issues to make Shellcheck happy.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer
Amazon Web Services, Inc.

ce547cf... by Marko Mäkelä

MDEV-31350: Hang in innodb.recovery_memory

buf_flush_page_cleaner(): Whenever buf_pool.ran_out(), invoke
buf_pool.get_oldest_modification(0) so that all clean blocks
will be removed from buf_pool.flush_list and buf_flush_LRU_list_batch()
will be able to evict some pages.

This fixes a regression that was likely caused by
commit a55b951e6082a4ce9a1f2ed5ee176ea7dbbaf1f2 (MDEV-26827).

7b72fc0... by Marko Mäkelä

MDEV-22739 !cursor->index->is_committed() in row0ins.cc

row_ins_sec_index_entry_by_modify(): When noticing a corrupted secondary
index on which CREATE INDEX is not in progress, return DB_CORRUPTION
instead of intentionally crashing the server.

Tested by: Matthias Leich

e38c075... by Marko Mäkelä

MDEV-31346 trx_purge_add_undo_to_history() is not optimal

trx_undo_set_state_at_finish(): Merge to its only caller,
trx_purge_add_undo_to_history().

trx_purge_add_undo_to_history(): Evaluate the condition related to
TRX_UNDO_STATE only once.

Tested by: Matthias Leich