maria:bb-10.6-mdev31067-variant3

Last commit made on 2023-05-22
Get this branch:
git clone -b bb-10.6-mdev31067-variant3 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.6-mdev31067-variant3
Repository:
lp:maria

Recent commits

cbc2797... by Sergey Petrunia

MDEV-31067: selectivity_from_histogram >1.0 for a DOUBLE_PREC_HB - V3-Fix1

Variant #3, fix for trivial errors.

5285832... by Sergey Petrunia

MDEV-31067: selectivity_from_histogram >1.0 for a DOUBLE_PREC_HB histogram

Variant #3.

When Histogram::point_selectivity() sees that the point value of interest
falls into one bucket, it tries to guess whether the bucket has many
different (unpopular) values or a few popular values. (The number of
rows is fixed, as it's a Height-balanced histogram).
The basis for this guess is the "width" of the value range the bucket
covers. Buckets covering wider value ranges are assumed to contain
values with proportionally lower frequencies.

This is just a [brave] guesswork. For a very narrow bucket, it may
produce an estimate that's larger than total #rows in the bucket
or even in the whole table.

Remove it and replace with another approach:
compute the point selectivity by assuming that the number of rows that
matches a point column=val condition is the average #rows for non-common
value. A value is non-common if it takes less than one whole histogram
bucket.

8f87023... by Andrei <email address hidden>

MDEV-28777 binlog.binlog_truncate_multi_engine failed in bb with Lost connection

The 2013 error was right to catch the case B of the test unprepared
for an expected simulated crash.

The test gets refined to SELECT a (type of) bool value before the
crash is invoked.

3b85e3d... by Daniel Black

MDEV-30687: Make small facelifting to autobake-debs.sh (fix)

Appending to 'eatmydata' will obviously cause an executable that
doesn't exist. Use an array to create the entire executable.

Also while we are at it, check the fakeroot actually works before
using it.

71f16c8... by Vlad Lesin

MDEV-31049 fil_delete_tablespace() returns wrong file handle if tablespace was closed by parallel thread

fil_delete_tablespace() stores file handle in local variable and calls
mtr_t::commit_file()=>fil_system_t::detach(..., detach_handle=true), which
sets space->chain.start->handle = OS_FILE_CLOSED. fil_system_t::detach()
is invoked under fil_system.mutex.

But before the mutex is acquired some parallel thread can change
space->chain.start->handle. fil_delete_tablespace() returns value, stored
in local variable, i.e. wrong value.

File handle can be closed, for example, from buf_flush_space() when the
limit of innodb_open_files exceded and fil_space_t::get() causes
fil_space_t::try_to_close() call.

fil_space_t::try_to_close() is executed under fil_system.mutex. And
mtr_t::commit_file() locks it for fil_system_t::detach() call.
fil_system_t::detach() returns detached file handle if its argument
detach_handle is true. The fix is to let mtr_t::commit_file() to pass
that detached file handle to fil_delete_tablespace().

0cca816... by Vlad Lesin

MDEV-30775 Performance regression in fil_space_t::try_to_close() introduced in MDEV-23855

Post-push fix.

10.5 MDEV-30775 fix inserts just opened tablespace just after the element
which fil_system.space_list_last_opened points to.

In MDEV-25223 fil_system_t::space_list was changed from UT_LIST to
ilist. ilist<...>::insert(iterator pos, reference value) inserts element
to list before pos.

But it was not taken into account during 10.5->10.6 merge in
85cbfaefee694cdd490b357444f24ff16b8042e8, and the fix
does not work properly, i.e. it inserted just opened tablespace to the
position preceding fil_system.space_list_last_opened.

f2fde3f... by Tuukka Pasanen <email address hidden>

MDEV-30687: Make small facelifting to autobake-debs.sh

Currently autobake-debs.sh does not pass shellcheck
it fails making errors:

 * SC1091 when using shellcheck -x it needs to know where to
   find ./VERSION. As this is not needed we just specify it
   as /dev/null as mentioned in shellcheck documentation:
   https://www.shellcheck.net/wiki/SC1091

 * SC2086 make sure that there is no globbing or word splitting
   in dpkg-buidpackage string. This not big problem or about to happen
   but now extra parameter parsing is more Bash compliant with
   using array.
   Change BUILDPACKAGE_PREPEND to BUILDPACKAGE_DPKGCMD which holds
   'eatmydata' if it's available and needed 'dpkg-buildpackage'
   https://www.shellcheck.net/wiki/SC2086

Fix small script indentation problem.

1e4eef5... by Tuukka Pasanen <email address hidden>

MDEV-31045: Fix regression building on Ubuntu 18.04

Github PR #2424 regressed Ubuntu 18.04 building
other than x86_64 machines. Architecture that are
impacted are PPC64 and ARM64.
This was because of changes in debian/rules file
which caused removing dependency to package 'libpmem-dev'
and CMake which '-DWITH_PMEM' removing not working
correctly. Package libpmem-dev was removed but
it still required to have PMEM with CMake which.
Commit make change that -DWITH_PMEM is correctly removed
if it's not wanted.

f50abab... by Marko Mäkelä

MDEV-31048 PERFORMANCE_SCHEMA lakcs InnoDB read_slots and write_slots

tpool::cache::m_mtx: Add PERFORMANCE_SCHEMA instrumentation
(wait/synch/mutex/innodb/tpool_cache_mutex). This covers the
InnoDB read_slots and write_slots for asynchronous data page I/O.

c0eeb72... by Marko Mäkelä

MDEV-28974 fixup: Fix error and warning messages

fil_name_process(): Starting with
commit 212994f704496d01881f377e34e04bd007e5e298
the name is not guaranteed to be NUL terminated.