maria:bb-10.4-mdev30218-part2

Last commit made on 2023-01-26
Get this branch:
git clone -b bb-10.4-mdev30218-part2 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-mdev30218-part2
Repository:
lp:maria

Recent commits

678f222... by Sergey Petrunia

MDEV-30218: Incorrect optimization for rowid_filtering, correction

Enable use of Rowid Filter optimization with eq_ref access.
Use the following assumptions:
- Assume index-only access cost is 50% of non-index-only access cost.
- Take into account that "Eq_ref access cache" reduces the number of
  lookups eq_ref access will make.
  = This means the number of Rowid Filter checks is reduced also
  = Eq_ref access cost is computed using that assumption (see
    prev_record_reads() call), so we should use it in all cost '
    computations.

765291d... by Daniel Black

CREDITS: re-instate Tencent Cloud

This was an accidential deletion looking at an outdated list.

284810b... by Yuchen Pei

MDEV-30370 Fixing spider hang when server aborts

This is Kentoku's patch for MDEV-22979 (e6e41f04f4e + 22a0097727f),
which fixes 30370.

It changes the wait to a timed wait for the first sts thread, which
waits on server start to execute the init queries for spider. It also
flips the flag init_command to false when the sts thread is being
freed. With these changes the sts thread can check the flag regularly
and abort the init_queries when it finds out the init_command is
false. This avoids the deadlock that causes the problem in MDEV-30370.

It also fixes MDEV-22979 for 10.4, but not 10.5. I have not tested
higher versions for MDEV-22979.

A test has also been done on MDEV-29904 to avoid regression, given
MDEV-27233 is a similar problem and its patch caused the
regression. The test passes for 10.4-11.0.

However, this adhoc test only works consistently when placed in the
main testsuite. We should not place spider tests in the main suite, so
we do not include it in this commit. A patch for MDEV-27912 should fix
this problem and allow a proper test for MDEV-29904. See comments in
the jira ticket MDEV-30370/29904 for the adhoc testcase used for this
commit.

801c0b4... by Ian Gilfillan <email address hidden>

Update 10.4 HELP tables

734ad06... by Sergei Golubchik

MDEV-29461 AddressSanitizer: stack-buffer-overflow in strxmov

0c27559... by Sergei Golubchik

MDEV-26817 runtime error: index 24320 out of bounds for type 'json_string_char_classes [128] *and* ASAN: global-buffer-overflow on address ... READ of size 4 on SELECT JSON_VALID

protect from out-of-bound array access

it was already done in all other places, this one was the only one missed

fc292f4... by Sergei Golubchik

MDEV-29199 Unique hash key is ignored upon INSERT ... SELECT into non-empty MyISAM table

disable bulk insert optimization if long uniques are used, because they
need to read the table (index_read) after every inserted now. And bulk
insert optimization might disable indexes.

bulk insert is already disabled in other cases when there are chances
that the table will be read duing the bulk insert.

db50919... by Sergei Golubchik

MDEV-27631 Assertion `global_status_var.global_memory_used == 0' failed in mysqld_exit

plugin_vars_free_values() was walking plugin sysvars and thus
did not free memory of plugin PLUGIN_VAR_NOSYSVAR vars.

* change it to walk all plugin vars
* add the pluginname_ prefix to NOSYSVARS var names too,
  so that plugin_vars_free_values() would be able to find their
  bookmarks

f3f09de... by Jan Lindström

Merge branch 'codership-10.4-fix-sst_received' into bb-10.4-MDEV-30419

b2b9d91... by Oleg Smirnov

MDEV-29294 Assertion `functype() == ((Item_cond *) new_item)->functype()' failed in Item_cond::remove_eq_conds on SELECT

Item_singlerow_subselect may be converted to Item_cond during
optimization. So there is a possibility of constructing nested
Item_cond_and or Item_cond_or which is not allowed (such
conditions must be flattened).
This commit checks if such kind of optimization has been applied
and flattens the condition if needed