maria:bb-10.9-mdev-31524

Last commit made on 2023-07-13
Get this branch:
git clone -b bb-10.9-mdev-31524 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.9-mdev-31524
Repository:
lp:maria

Recent commits

06a61b8... by Yuchen Pei <email address hidden>

MDEV-31524 Fixing spider table param / variable overriding

The existing (incorrect) overriding mechanism is:

Non-minus-one var value overrides table param overrides default value.

Before MDEV-27169, unspecified var value is -1. So if the user sets
both the var to be a value other than -1 and the table param, the var
value will prevail, which is incorrect.

After MDEV-27169, unspecified var value is default value. So if the
user does not set the var but sets the table param, the default value
will prevail, which is even more incorrect.

This patch fixes it so that table param, if specified, always
overrides var value, and the latter if not specified or set to -1,
falls back to the default value

We achieve this by replacing all such overriding in spd_param.cc with
macros that override in the correct way, and removing all the
"overriding -1" lines involving table params in
spider_set_connect_info_default() except for those table params not
defined as sysvar/thdvar in spd_params.cc

We also introduced macros for non-overriding sysvar and thdvar, so
that the code is cleaner and less error-prone

In server versions where MDEV-27169 has not been applied, we also
backport the patch, that is, replacing -1 default values with real
default values

In server versions where MDEV-28006 has not been applied, we do the
same for udf params

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

Make sure that here is MariaDB client available

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

MDEV-31118: Add Lintian overrides for false positives

MariaDB Compression pluging pacakages mariadb-plugin-provider-*
have only one shared object and those are not linked against
libc and it's intentional so supressing error
library-not-linked-against-libc

There is needed dependency for Systemd DH plugin which
makes error missing-build-dependency-for-dh-addon obsolette.

Reworked debian/control that makes most of
version-substvar-for-external-package error not correct
so remove those that are not available anymore and update
those that are still relevant.

NOTE TO MERGER: This is only up-to MariaDB 10.10.

14eff72... by Tuukka Pasanen <email address hidden>

MDEV-31118: Override lintian dh-addon for systemd

Lintian erros with
 missing-build-dependency-for-dh-addon systemd (*)

One of these premises should be installed:
 debhelper:any (>= 9.20160709~)
 debhelper-compat:any
 dh-sequence-systemd:any
 dh-systemd:any

As there is package debhelper version 10 or higher required
for build. This is false positive Lintian error which should
be supressed..

NOTE TO MERGER: This is only up-to MariaDB 10.10.

3dd3308... by Tuukka Pasanen <email address hidden>

MDEV-31118: Rework Salsa-CI YAML work again

Salsa-CI file has got in malfunction state and
if fails with YAML error:
 mariadb-10.3 with Buster backports upgrade job:
 undefined need: build buster-backports

Also remove Salsa-CI MariaDB 10.3 double
upgrade target.

There is also several upgrades which makes
test green again.

NOTE TO MERGER: This is only up-to MariaDB 10.10.

Remove

90cd3b3... by Tuukka Pasanen <email address hidden>

MDEV-31118: Remove version-substvar-for-external-package problems

In debian/control file there is several mariadb-*-10.9 Conflicts
or Replaces that which are not neede on MariaDB 10.9 anymore
as there is not suffix anymore.

Package libmariadbclient-dev is part of Ubuntu and it's
not build with official package so there can't be
variable: '${source:Version}' which is used with packages
that are part of package.

NOTE TO MERGER: This is only up-to MariaDB 10.10.

7cde5c5... by Marko Mäkelä

Merge 10.6 into 10.9

c358e21... by Marko Mäkelä

MDEV-31642: Upgrade may crash if innodb_log_file_buffering=OFF

recv_log_recover_10_5(): Make reads aligned by 4096 bytes, to avoid
any trouble in case the file was opened in O_DIRECT mode and
the physical block size is larger than 512 bytes.
Because innodb_log_file_size used to be defined in whole megabytes,
reading multiples of 4096 bytes instead of 512 should not be an issue.

6ed14bc... by Monty <email address hidden>

Disable view protocol for opt_trace.test

This is because some plan changes because of views

99bd226... by Monty <email address hidden>

MDEV-31558 Add InnoDB engine information to the slow query log

The new statistics is enabled by adding the "engine", "innodb" or "full"
option to --log-slow-verbosity

Example output:

 # Pages_accessed: 184 Pages_read: 95 Pages_updated: 0 Old_rows_read: 1
 # Pages_read_time: 17.0204 Engine_time: 248.1297

Page_read_time is time doing physical reads inside a storage engine.
(Writes cannot be tracked as these are usually done in the background).
Engine_time is the time spent inside the storage engine for the full
duration of the read/write/update calls. It uses the same code as
'analyze statement' for calculating the time spent.

The engine statistics is done with a generic interface that should be
easy for any engine to use. It can also easily be extended to provide
even more statistics.

Currently only InnoDB has counters for Pages_% and Undo_% status.
Engine_time works for all engines.

Implementation details:

class ha_handler_stats holds all engine stats. This class is included
in handler and THD classes.
While a query is running, all statistics is updated in the handler. In
close_thread_tables() the statistics is added to the THD.

handler::handler_stats is a pointer to where statistics should be
collected. This is set to point to handler::active_handler_stats if
stats are requested. If not, it is set to 0.
handler_stats has also an element, 'active' that is 1 if stats are
requested. This is to allow engines to avoid doing any 'if's while
updating the statistics.

Cloned or partition tables have the pointer set to the base table if
status are requested.

There is a small performance impact when using --log-slow-verbosity=engine:
- All engine calls in 'select' will be timed.
- IO calls for InnoDB reads will be timed.
- Incrementation of counters are done on local variables and accesses
  are inline, so these should have very little impact.
- Statistics has to be reset for each statement for the THD and each
  used handler. This is only 40 bytes, which should be neglectable.
- For partition tables we have to loop over all partitions to update
  the handler_status as part of table_init(). Can be optimized in the
  future to only do this is log-slow-verbosity changes. For this to work
  we have to update handler_status for all opened partitions and
  also for all partitions opened in the future.

Other things:
- Added options 'engine' and 'full' to log-slow-verbosity.
- Some of the new files in the test suite comes from Percona server, which
  has similar status information.
- buf_page_optimistic_get(): Do not increment any counter, since we are
  only validating a pointer, not performing any buf_pool.page_hash lookup.
- Added THD argument to save_explain_data_intern().
- Switched arguments for save_explain_.*_data() to have
  always THD first (generates better code as other functions also have THD
  first).