maria:bb-10.9-MDEV-26278

Last commit made on 2022-06-13
Get this branch:
git clone -b bb-10.9-MDEV-26278 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.9-MDEV-26278
Repository:
lp:maria

Recent commits

1f1b7cc... by Oleg Smirnov

MDEV-26278 Add functionality to eliminate derived tables from the query

Elimination of unnecessary tables from SQL queries is already present
in MariaDB. But it only works for regular tables and not for derived ones.

Imagine we have a view:
  CREATE VIEW v1 AS SELECT a, b, max(c) AS maxc FROM t1 GROUP BY a, b

Due to "GROUP BY a, b" the values of combinations {a, b} are unique,
and this fact can be treated as like derived table "v1" has a unique key
on fields {a, b}.

Suppose we have a SQL query:
  SELECT t2.* FROM t2 LEFT JOIN v1 ON t2.a=v1.a and t2.b=v1.b

1. Since {v1.a, v1.b} is unique and both these fields are bound to t2,
   "v1" is functionally dependent on t2.
   This means every record of "t2" will be either joined with
   a single record of "v1" or NULL-complemented.
2. No fields of "v1" are present on the SELECT list

These two facts allow the server to completely exclude (eliminate)
the derived table "v1" from the query.

a9e00a0... by Marko Mäkelä

Merge 10.8 into 10.9

8251a9f... by Marko Mäkelä

MDEV-27848 fixup: Use os_file_close_func()

To close a non-instrumented file, os_file_close_func() should be used
instead of os_file_close().

f1beeb5... by Marko Mäkelä

MDEV-27848: Remove unused wait/io/file/innodb/innodb_log_file

The performance_schema counter wait/io/file/innodb/innodb_log_file
is always reported as 0.

The way how redo log writes are being waited for was refactored in
commit 30ea63b7d2077883713e63cbf4e661ba0345bf68 by the introduction
of flush_lock and write_lock. Even before that change, all the
wait/io/file/innodb/ counters were always 0 in my tests.

Moreover, if the PMEM interface that was introduced in
commit 3daef523af25e4f1e4e75d2c26a9b25475f0c679
is being used, writes to the InnoDB log file will completely avoid
any system calls and performance_schema instrumentation.
In commit 685d958e38b825ad9829be311f26729cccf37c46 also the reads
of the redo log (during recovery) would bypass any system calls.

f8b3c66... by Marko Mäkelä

Merge 10.8 into 10.9

3b06415... by Marko Mäkelä

Clean up log resizing

log_t::rename_resized(): Replaces create_log_file_rename()

delete_log_files(): Moved to a separate function. Also invoked
on a normal startup when the log is not being resized, to
remove any garbage log files.

create_log_file(): Remove the std::string& parameter.

os_file_delete_if_exists_func() [_WIN32]: Do not retry DeleteFile()
on ERROR_ACCESS_DENIED.

73605d1... by Marko Mäkelä

Clean up some @return and @retval comments

972b456... by Vladislav Vaintroub

fixup 63b9d6e7ea77e26b666 , log_sys.write_buf can't run in a loop

The write_lock is released after the first time already.

This leaves the hole in the log_write_and_flush logic, some
flush_lock/write_lock waiters could be hanging, until the
background redo log flush comes.

The possibility of that is relatively tiny though.

63b9d6e... by Vladislav Vaintroub

Restore the MDEV-26789 logic, partially lost in refactoring.

b5852ff... by Marko Mäkelä

MDEV-27735 Deprecate the parameter innodb_change_buffering

As a follow-up to MDEV-27734 Set innodb_change_buffering=none by default
we mark the option innodb_change_buffering deprecated, to inform users
of its future removal.