maria:bb-10.4-mdev302018-v2

Last commit made on 2022-12-20
Get this branch:
git clone -b bb-10.4-mdev302018-v2 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-mdev302018-v2
Repository:
lp:maria

Recent commits

3bf9ca1... by Sergey Petrunia

MDEV-30218: Incorrect optimization for rowid_filtering

Patch from Igor Babaev:

- Revert the changes in commit 87eccd

- Instead:
- When considering rowid filter with eq_ref access,
  assume the cost of index-only eq_ref scan is 50% of
  non-index-only eq_ref scan.
- For other kinds of keys: Cap the cost of index-only read estimate
  to the cost of non-index-only read estimate. This is to fix cost
  model inconsistencies where cost of index-only estimate ends up
  being higher.

- When considering rowid filter with range access, do not forget to
  multiply quick_index_only_costs[key_no] by record_count.

c21566a... by musvaage <email address hidden>

header typos

f97f695... by Marko Mäkelä

Merge 10.3 into 10.4

697dbd1... by Daniel Black

MDEV-21187: log_slow_filter="" logs queries not using indexes

Consistent with MDEV-4206 and empty log_slow_filter still means
no explict filtering. Since 21518ab2e453 however the
log_queries_not_using_indexes became stored in the same variable.

As we need to test for the absense of log_queries_not_using_indexes
the SERVER_QUERY_NO_INDEX USED part of log_slow_statement, the empty
criteria resulted in an always true to log queries not using indexes if
log_slow_filter was set to empty.

Adjusted the log_slow.test for MDEV-4206 as slow_log_query has been
global and session for a while and it was relying on the MDEV-21187
buggy behavior to detect a slow query.

Reviewer: Monty

acfaa04... by Daniel Black

MDEV-18591: mysql_install_db - pass --log-error to mysqld in install (#2363)

Previously we parsed it out in mysql_install_db for use in the error
message, but failed to pass it to mysqld in the bootstrap.

Also match log_error as it might appear in the .cnf files.

Thanks Michal Schorm for the test case.

Reviewed by: Faustin Lammler

87eccd7... by Sergey Petrunia

MDEV-30218: Incorrect optimization for rowid_filtering

(Patch from Monty, slightly amended)

Fix rowid filtering optimization in best_access_path():

== Ref access + rowid filtering ==
The cost computations compare #records and index-only scan cost
(keyread_tmp) to find out the per-record advantage one will get if
they skip reading full table record.

The computations produce wrong result when:

- the #records are "clipped down" with s->worst_seeks or
  thd->variables.max_seeks_for_key. keyread_tmp is not clipped
  this way so the numbers are not comparable.

- access_factor is negative. This means index_only read is
  cheaper than non-index-only read.

This patch makes the optimizer not to consider Rowid Filtering in
such cases.
The decision is logged in the Optimizer Trace using
"rowid_filter_skipped" name.

== Range access + rowid filtering ==
when considering to use Rowid Filter with range access, do multiply
keyread_tmp by record_count. That way, it is comparable with the
range access's estimate, which is multiplied by record_count.

fdf43b5... by Marko Mäkelä

Merge 10.3 into 10.4

382e85f... by Daniel Black

MDEV-30065: mariadb-install-db allow for --enforce-storage-engine=InnoDB

Hide the errors related to missing innodb stats tables in bootstrap mode
on the assumption that because we are in bootstrap mode they are going
to be created.

c1cc6e8... by Daniel Black

Correct DBUG_ENTER for Pushdown_derived::execute

a491400... by Julius Goryavsky <email address hidden>

MDEV-29814: galera_var_notify_ssl_ipv6 causes testing system to hang

This commit fixes the test system hanging due to
the galera_var_notify_ssl_ipv6 test and also brings
the wsrep_notify[_ssl].sh files in line with each other
between the user template and the mtr suite.

Quotes are also added here to avoid problems if the
user specifies the value of one of the variables at the
beginning of the file containing shell-specific characters,
for example, if the password or username specified in the
PSWD and USER variables will contain the "$" character.

Also fixed an issue with automatic --ssl-verify-server-cert
option substitution when the corresponding value is set
by the user to "1" or "on".

Also fixed some tests here to avoid joining one of the nodes
to another cluster when the nodes are restarted from the mtr
side, which can lead to random failures when testing with
buildbot.