maria:bb-10.4-mdev26301-with-trace

Last commit made on 2023-05-03
Get this branch:
git clone -b bb-10.4-mdev26301-with-trace https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-mdev26301-with-trace
Repository:
lp:maria

Recent commits

bd3a954... by Sergey Petrunia

MDEV-26301: Split optimization refills: Optimizer Trace coverage

Add Optimizer Trace printouts.

8a1bfc1... by Igor Babaev

MDEV-26301 Split optimization refills temporary table too many times

This patch optimizes the number of refills for the lateral derived table
to which a materialized derived table subject to split optimization is
is converted. This optimized number of refills is now considered as the
expected number of refills of the materialized derived table when searching
for the best possible splitting of the table.

5dc9a6b... by Igor Babaev

MDEV-31102 Crash when pushing condition into view defined as union

This bug could manifest itself at the first execution of prepared statement
created for queries using a materialized view defined as union. A crash
could happen for sure if the query contained a condition pushable into
the view and this condition was over the column defined via a complex string
expression requiring implicit conversion from one charset to another for
some of its sub-expressions. The bug could cause crashes when executing
PS for some other queries whose optimization needed building clones for
such expressions.

This bug was introduced in the patch for MDEV-29988 where the class
Item_direct_ref_to_item was added. The implementations of the virtual
methods get_copy() and build_clone() were invalid for the class and this
could cause crashes after the method build_clone() was called for
expressions containing objects of the Item_direct_ref_to_item type.

Approved by Sergei Golubchik <email address hidden>

d3e394b... by Alexander Barkov

A cleanup for MDEV-30968 mariadb-backup does not copy Aria logs if aria_log_dir_path is used

Fixing buildbot failures on mariabackup.aria_log_dir_path_rel.

The problem was that directory_exists() was called with the
relative aria_log_dir_path value, while the current directory
in mariadb-backup is not necessarily equal to datadir when MTR is running.

Fix:

- Moving building the absolute path un level upper:
  from the function copy_back_aria_logs() to the function copy_back().
- Passing the built absolute path to both directory_exists() and
  copy_back_aria_logs() as a parameter.

6dc6c22... by Igor Babaev

MDEV-31085 Crash when processing multi-update using view with optimizer_trace on

This bug caused server crash when processing a multi-update statement that
used views if optimizer tracing was enabled.
The bug was introduced in the patch for MDEV-30539 that could incorrectly
detect the most top level selects of queries if views were used in them.

Approved by Oleksandr Byelkin <email address hidden>

9f98a2a... by Alexander Barkov

MDEV-30968 mariadb-backup does not copy Aria logs if aria_log_dir_path is used

- `mariadb-backup --backup` was fixed to fetch the value of the
   @@aria_log_dir_path server variable and copy aria_log* files
   from @@aria_log_dir_path directory to the backup directory.
   Absolute and relative (to --datadir) paths are supported.

   Before this change aria_log* files were copied to the backup
   only if they were in the default location in @@datadir.

- `mariadb-backup --copy-back` now understands a new my.cnf and command line
   parameter --aria-log-dir-path.

  `mariadb-backup --copy-back` in the main loop in copy_back()
   (when copying back from the backup directory to --datadir)
   was fixed to ignore all aria_log* files.

   A new function copy_back_aria_logs() was added.
   It consists of a separate loop copying back aria_log* files from
   the backup directory to the directory specified in --aria-log-dir-path.
   Absolute and relative (to --datadir) paths are supported.
   If --aria-log-dir-path is not specified,
   aria_log* files are copied to --datadir by default.

- The function is_absolute_path() was fixed to understand MTR style
  paths on Windows with forward slashes, e.g.
   --aria-log-dir-path=D:/Buildbot/amd64-windows/build/mysql-test/var/...

da1c91f... by Daniel Black

MDEV-30713 field length handling for CONNECT engine

fp->field_length was unsigned and therefore the negative
condition around it.

Backport of cc182aca9352 fixes it, however to correct the
consistent use of types pcf->Length needs to be unsigned
too.

At one point pcf->Precision is assigned from pcf->Length so
that's also unsigned.

GetTypeSize is assigned to length and has a length argument.
A -1 default value seemed dangerious to case, so at least 0
should assert if every hit.

3d27f6d... by Oleksandr "Sanja" Byelkin

Merge branch '10.3' into 10.4

fc6e8a3... by Mikhail Chalov <email address hidden>

Minimize unsafe C functions usage - replace strcat() and strcpy()

Similar to 567b6812 continue to replace use of strcat() and
strcpy() with safer options strncat() and strncpy().

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

854e8b1... by Marko Mäkelä

MDEV-28976 fixup: A better fix

do_shutdown_server(): After sending SIGKILL, invoke wait_until_dead().
Thanks to Sergei Golubchik for pointing out that the previous fix
does not actually work.