View Bazaar branches
Get this repository:
git clone https://git.launchpad.net/maria

MariaDB has 18 active reviews. See all merge proposals.

Import details

Import Status: Reviewed

This repository is an import of the Git repository at https://github.com/MariaDB/server.git.

The next import is scheduled to run .

Last successful import was .

Import started on juju-1e3bde-prod-lp-code-import-15 and finished taking 5 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 11 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-12 and finished taking 10 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-12 and finished taking 7 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-15 and finished taking 7 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-16 and finished taking 7 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 6 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-16 and finished taking 7 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-12 and finished taking 6 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-12 and finished taking 12 minutes — see the log

Branches

Name Last Modified Last Commit
st-10.3-value-grinding 2022-10-05 12:18:58 UTC
MDEV-29710: Valgrind tests massively fail due to silently killing server on s...

Author: Marko Mäkelä
Author Date: 2022-10-05 12:18:58 UTC

MDEV-29710: Valgrind tests massively fail due to silently killing server on shutdown timeout

Let us disable Valgrind on tests that would fail because a
server shutdown or a STOP SLAVE command would take longer,
causing the test harness to forcibly and silently kill the server
due to an exceeded timeout.

bb-10.6-MDEV-24402 2022-10-05 11:17:27 UTC
Fix CHECK TABLE without EXTENDED

Author: Marko Mäkelä
Author Date: 2022-10-05 11:17:27 UTC

Fix CHECK TABLE without EXTENDED

bb-10.11-midenok 2022-10-05 08:26:52 UTC
MDEV-29701 Inconsistencies and eventual failure upon CREATE OR REPLACE with f...

Author: midenok
Author Date: 2022-10-05 06:18:01 UTC

MDEV-29701 Inconsistencies and eventual failure upon CREATE OR REPLACE with foreign keys

finalize_atomic_replace(): when creating new table it must be checked
that it is valid reference for any existing foreign keys even with
FOREIGN_KEY_CHECKS=OFF. That is the original behavior.

RENAME_CONSTRAINT_IDS: the algorithm was broken when we CREATE OR
REPLACE referenced table. REF_NAME was renamed to backup name and the
new table did't see any referenced keys. We must not change REF_NAME
to backup name in that case. The owner of that foreign key is some
different table and its constraints must be intact.

10.6 2022-10-05 08:03:46 UTC
MDEV-29440 fixup: Clean up dict_load_foreigns()

Author: Marko Mäkelä
Author Date: 2022-10-05 08:03:46 UTC

MDEV-29440 fixup: Clean up dict_load_foreigns()

dict_load_foreigns(): Remove the constant parameter uncommitted=false.
The parameter only had to be added to dict_load_foreign().

Spotted by Alexey Midenkov

bb-10.4-release 2022-10-05 07:09:49 UTC
Remove HAVE_SNPRINTF

Author: Marko Mäkelä
Author Date: 2022-10-05 07:09:49 UTC

Remove HAVE_SNPRINTF

This fixes up commit 77c184df7c056da7364e606ac977cc2d3cd826ad
which explicitly specifies that we use ISO/IEC 9899:1999 (C99),
which includes the snprintf() function.

10.4 2022-10-05 07:09:49 UTC
Remove HAVE_SNPRINTF

Author: Marko Mäkelä
Author Date: 2022-10-05 07:09:49 UTC

Remove HAVE_SNPRINTF

This fixes up commit 77c184df7c056da7364e606ac977cc2d3cd826ad
which explicitly specifies that we use ISO/IEC 9899:1999 (C99),
which includes the snprintf() function.

bb-10.3-MDEV-29666 2022-10-05 06:30:33 UTC
MDEV-29666 InnoDB fails to purge secondary index records when indexed virtual...

Author: Marko Mäkelä
Author Date: 2022-10-05 06:30:33 UTC

MDEV-29666 InnoDB fails to purge secondary index records when indexed virtual columns exist

row_purge_get_partial(): Replaces trx_undo_rec_get_partial_row().
Also copy the purge_node_t::ref to the purge_node_t::row.
In this way, the clustered index key fields will always be
available, even if thanks to
commit d384ead0f024995787b1f29bc672c33b0d3d40a8 (MDEV-14799)
they would no longer be repeated in the remaining part of the
undo log record.

bb-10.11-wlad-MDEV-29251 2022-10-04 23:24:36 UTC
MDEV-29251 Set output directories during compilation

Author: Vladislav Vaintroub
Author Date: 2022-09-30 13:43:36 UTC

MDEV-29251 Set output directories during compilation

..to create s directory layout that closely resembles zip/tarball/MSI
install.

If we call ${CMAKE_BINARY_DIR} rsp CMAKE_BINARY_DIR/$<CONFIG>
$build_dir , then the compilation will place executables into
$build_dir/bin, and plugins into $build_dir/lib/plugins

Immediate benefits are
- searching, copying or symlinking of plugins in mtr is no more necessary
- searching for executables in mtr is simplified.
- Windows mariadbd.exe will to automatically set correct default
plugin directory (it had always been relative to location of the exe itself)

Other changes
"initial_database" target will create datadir $buildroot/data
directory, instead of $buildroot/sql/data, to still allow
server on Windows to start by just typing <path-to-mysqld> --console in
the shell.

10.7-selectivity 2022-10-04 18:46:44 UTC
Added test cases for preceding test

Author: Monty
Author Date: 2022-10-04 13:16:06 UTC

Added test cases for preceding test

This includes all test changes from
"Changing all cost calculation to be given in milliseconds"
and forwards

bb-10.3-midenok 2022-10-04 18:35:44 UTC
MDEV-29697 Assertion failure in Diagnostics_area::set_ok_status

Author: midenok
Author Date: 2022-10-04 18:17:37 UTC

MDEV-29697 Assertion failure in Diagnostics_area::set_ok_status
           upon CREATE OR REPLACE causing ER_UPDATE_TABLE_USED

Missed set return status to 1.

bb-10.6-MDEV-27927-RR-anomaly 2022-10-04 15:05:49 UTC
MDEV-27927 row_sel_try_search_shortcut_for_mysql() does not latch a page, vio...

Author: Vlad Lesin
Author Date: 2022-09-12 15:48:01 UTC

MDEV-27927 row_sel_try_search_shortcut_for_mysql() does not latch a page, violating read view isolation

btr_search_guess_on_hash() would only acquire an index page latch if it
is invoked with ahi_latch=NULL. If it's invoked from
row_sel_try_search_shortcut_for_mysql() with ahi_latch!=NULL, a page
will not be latched, and row_search_mvcc() will get a pointer to the
record, which can be changed by some other transaction before the record
was stored in result buffer with row_sel_store_mysql_rec() call.

ahi_latch argument of btr_cur_search_to_nth_level_func() and
btr_pcur_open_with_no_init_func() is used only for
row_sel_try_search_shortcut_for_mysql().
btr_cur_search_to_nth_level_func(..., ahi_latch !=0, ...) is invoked
only from btr_pcur_open_with_no_init_func(..., ahi_latch !=0, ...),
which, in turns, is invoked only from
row_sel_try_search_shortcut_for_mysql().

I suppose that separate case with ahi_latch!=0 was intentionally
implemented to protect row_sel_store_mysql_rec() call in
row_search_mvcc() just after row_sel_try_search_shortcut_for_mysql()
call. After the ahi_latch was moved from row_seach_mvcc() to
row_sel_try_search_shortcut_for_mysql(), there is no need in it at all
if btr_search_guess_on_hash() latches a page unconditionally. And if
btr_search_guess_on_hash() latched the page, any access to the record in
row_sel_try_search_shortcut_for_mysql() after btr_pcur_open_with_no_init()
call will be protected with page latch.

The fix is to remove ahi_latch argument from
btr_pcur_open_with_no_init_func(), btr_cur_search_to_nth_level_func()
and btr_search_guess_on_hash().

There will not be test, as to test it we need to freeze some SELECT
execution in the point between row_sel_try_search_shortcut_for_mysql()
and row_sel_store_mysql_rec() calls in row_search_mvcc(), and to change
the record in some other transaction to let row_sel_store_mysql_rec() to
store changed record in result buffer. Buf we can't do this with the
fix, as the page will be latched in btr_search_guess_on_hash() call.

10.5 2022-10-04 13:09:37 UTC
MDEV-29484 Assertion `!trx_free || !trx->locked_connections' failed in spider...

Author: Nayuta Yanagisawa
Author Date: 2022-09-29 09:50:29 UTC

MDEV-29484 Assertion `!trx_free || !trx->locked_connections' failed in spider_free_trx_conn on LOCK TABLES

In MDEV-28352, we've modified spider_free_trx_conn() so that it frees
a connection only when the connection is locking no remote table.

However, when a user connection to a Spider node is disconnected, the
corresponding connections to remote data nodes from the Spider node
must be freed immediately.

Thus, the modification above leads an assertion error on the debug
build and a hang on the non-debug build. We partly revert MDEV-28352
to fix the problem.

bb-10.11-selectivity 2022-10-04 12:48:00 UTC
Fix compile warning-as-error on amd64-ubuntu-1804-clang10-asan

Author: Sergey Petrunia
Author Date: 2022-10-04 09:12:20 UTC

Fix compile warning-as-error on amd64-ubuntu-1804-clang10-asan

bb-10.11-release 2022-10-04 11:55:38 UTC
Merge branch '10.10' into 10.11

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-04 11:55:38 UTC

Merge branch '10.10' into 10.11

10.11 2022-10-04 11:55:38 UTC
Merge branch '10.10' into 10.11

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-04 11:55:38 UTC

Merge branch '10.10' into 10.11

bb-10.10-release 2022-10-04 11:32:38 UTC
Merge branch '10.9' into 10.10

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-04 11:32:38 UTC

Merge branch '10.9' into 10.10

10.10 2022-10-04 11:32:38 UTC
Merge branch '10.9' into 10.10

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-04 11:32:38 UTC

Merge branch '10.9' into 10.10

bb-10.9-release 2022-10-04 11:23:13 UTC
Merge branch '10.8' into 10.9

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-04 11:23:13 UTC

Merge branch '10.8' into 10.9

10.9 2022-10-04 11:23:13 UTC
Merge branch '10.8' into 10.9

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-04 11:23:13 UTC

Merge branch '10.8' into 10.9

10.3 2022-10-04 11:16:17 UTC
MDEV-27682: bundled wsrep_notify.sh causes mariadbd to freeze during start

Author: Julius Goryavsky
Author Date: 2022-10-04 11:15:52 UTC

MDEV-27682: bundled wsrep_notify.sh causes mariadbd to freeze during start

This commit adds automation that will reduce the possibility
of user errors when customizing wsrep_notify.sh (in particular
caused by user-specified parameters). Now all leading and trailing
spaces are removed from the user-specified parameters and automatic
port and host address substitution has been added to scripts, as
well as automatic password substitution to the client command line,
only if it is specified in the wsrep_notify.sh and not as empty
strings. Also added support for automatic substitution of the all
SSL-related parameters and improved parsing for ipv6 addresses
(to allow "[...]" notation for ipv6 addresses). Also added a
test to check if the wsrep notify script will works with SSL.

bb-10.3-MDEV-27682-galera 2022-10-04 11:16:17 UTC
MDEV-27682: bundled wsrep_notify.sh causes mariadbd to freeze during start

Author: Julius Goryavsky
Author Date: 2022-10-04 11:15:52 UTC

MDEV-27682: bundled wsrep_notify.sh causes mariadbd to freeze during start

This commit adds automation that will reduce the possibility
of user errors when customizing wsrep_notify.sh (in particular
caused by user-specified parameters). Now all leading and trailing
spaces are removed from the user-specified parameters and automatic
port and host address substitution has been added to scripts, as
well as automatic password substitution to the client command line,
only if it is specified in the wsrep_notify.sh and not as empty
strings. Also added support for automatic substitution of the all
SSL-related parameters and improved parsing for ipv6 addresses
(to allow "[...]" notation for ipv6 addresses). Also added a
test to check if the wsrep notify script will works with SSL.

bb-10.4-MDEV-29142 2022-10-04 11:08:36 UTC
MDEV-26597 : Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == ...

Author: Jan Lindström
Author Date: 2022-10-04 11:08:36 UTC

MDEV-26597 : Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())' failed.

If repl.max_ws_size is set too low following CREATE TABLE could fail
during commit. In this case wsrep_commit_empty should allow rolling
it back if provider state is s_aborted.

Furhermore, original ER_ERROR_DURING_COMMIT does not really tell anything
clear for user. Therefore, this commit adds a new error
ER_TOO_BIG_WRITESET. This will change some test cases output.

bb-10.5-bar-MDEV-29481 2022-10-04 10:54:28 UTC
MDEV-28822 Table from older version requires table rebuild when adding column...

Author: Alexander Barkov
Author Date: 2022-10-04 07:44:14 UTC

MDEV-28822 Table from older version requires table rebuild when adding column to table with multi-column index

This problem was earlier fixed in 10.4 by the patch for MDEV-29481.

Adding MTR tests only.

bb-10.3-MDEV-27927-RR-anomaly 2022-10-04 10:47:00 UTC
MDEV-27927 row_sel_try_search_shortcut_for_mysql() does not latch a page, vio...

Author: Vlad Lesin
Author Date: 2022-08-31 14:49:38 UTC

MDEV-27927 row_sel_try_search_shortcut_for_mysql() does not latch a page, violating read view isolation

btr_search_guess_on_hash() would only acquire an index page latch if it
is invoked with ahi_latch=NULL. If it's invoked from
row_sel_try_search_shortcut_for_mysql() with ahi_latch!=NULL, a page
will not be latched, and row_search_mvcc() will get a pointer to the
record, which can be changed by some other transaction before the record
was stored in result buffer with row_sel_store_mysql_rec() call.

ahi_latch argument of btr_cur_search_to_nth_level_func() and
btr_pcur_open_with_no_init_func() is used only for
row_sel_try_search_shortcut_for_mysql().
btr_cur_search_to_nth_level_func(..., ahi_latch !=0, ...) is invoked
only from btr_pcur_open_with_no_init_func(..., ahi_latch !=0, ...),
which, in turns, is invoked only from
row_sel_try_search_shortcut_for_mysql().

I suppose that separate case with ahi_latch!=0 was intentionally
implemented to protect row_sel_store_mysql_rec() call in
row_search_mvcc() just after row_sel_try_search_shortcut_for_mysql()
call. After the ahi_latch was moved from row_seach_mvcc() to
row_sel_try_search_shortcut_for_mysql(), there is no need in it at all
if btr_search_guess_on_hash() latches a page unconditionally. And if
btr_search_guess_on_hash() latched the page, any access to the record in
row_sel_try_search_shortcut_for_mysql() after btr_pcur_open_with_no_init()
call will be protected with the page latch.

The fix is to remove ahi_latch argument from
btr_pcur_open_with_no_init_func(), btr_cur_search_to_nth_level_func()
and btr_search_guess_on_hash().

There will not be test, as to test it we need to freeze some SELECT
execution in the point between row_sel_try_search_shortcut_for_mysql()
and row_sel_store_mysql_rec() calls in row_search_mvcc(), and to change
the record in some other transaction to let row_sel_store_mysql_rec() to
store changed record in result buffer. Buf we can't do this with the
fix, as the page will be latched in btr_search_guess_on_hash() call.

bb-10.11-MDEV-7567 2022-10-04 10:28:04 UTC
MDEV-29625 Some clients/scripts refer to old slow log variables

Author: Sergei Golubchik
Author Date: 2022-09-26 17:21:24 UTC

MDEV-29625 Some clients/scripts refer to old slow log variables

bb-10.6-MDEV-29662 2022-10-04 10:09:59 UTC
MDEV-29622 Replace same values in 'IN' list with an equality

Author: Oleg Smirnov
Author Date: 2022-10-04 09:45:51 UTC

MDEV-29622 Replace same values in 'IN' list with an equality

If all elements in the list of 'IN' or 'NOT IN' clause are equal
and there are no NULLs then clause
- "a IN (e1,..,en)" can be converted to "a = e1"
- "a NOT IN (e1,..,en)" can be converted to "a <> e1".
This means an object of Item_func_in can be replaced with object of
Item_func_eq for IN (e1,..,en) clause and Item_func_ne for
NOT IN (e1,...,en). Such a replacement allows the optimizer to choose
a better execution plan

10.8 2022-10-04 09:42:37 UTC
Merge branch '10.7' into 10.8

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-04 09:42:37 UTC

Merge branch '10.7' into 10.8

bb-10.8-release 2022-10-04 09:42:37 UTC
Merge branch '10.7' into 10.8

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-04 09:42:37 UTC

Merge branch '10.7' into 10.8

bb-10.11-selectivity-before-fix1 2022-10-04 09:12:20 UTC
Fix compile warning-as-error on amd64-ubuntu-1804-clang10-asan

Author: Sergey Petrunia
Author Date: 2022-10-04 09:12:20 UTC

Fix compile warning-as-error on amd64-ubuntu-1804-clang10-asan

bb-10.4-monty 2022-10-04 08:59:01 UTC
Disable valgrind for test in main that takes > 200 seconds

Author: Monty
Author Date: 2022-10-04 08:26:50 UTC

Disable valgrind for test in main that takes > 200 seconds

One can run these with --valgrind --big

bb-10.7-release 2022-10-04 05:41:35 UTC
Merge branch '10.6' into 10.7

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-04 05:41:35 UTC

Merge branch '10.6' into 10.7

10.7 2022-10-04 05:41:35 UTC
Merge branch '10.6' into 10.7

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-04 05:41:35 UTC

Merge branch '10.6' into 10.7

bb-10.11-MDEV-16546 2022-10-03 20:47:36 UTC
test, system_versioning_insert_history and partitioning

Author: Sergei Golubchik
Author Date: 2022-10-03 20:47:36 UTC

test, system_versioning_insert_history and partitioning

bb-10.5-midenok 2022-10-03 16:40:39 UTC
MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned t...

Author: midenok
Author Date: 2022-09-28 11:21:29 UTC

MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned table

When f.ex. table is partitioned by HASH(a) and we rename column `a' to
`b' partitioning filter stays unchanged: HASH(a). That's the wrong
behavior.

The patch updates partitioning filter in accordance to the new columns
names. That includes partition/subpartition expression and
partition/subpartition field list.

bb-10.11-MDEV-28883-MDEV-29390-tests 2022-10-03 16:35:49 UTC
MDEV-29390: Improve coverage for UPDATE and DELETE statements in MTR test...

Author: Lena Startseva
Author Date: 2022-10-03 16:35:49 UTC

    MDEV-29390: Improve coverage for UPDATE and DELETE statements in MTR test suites

    Added "explain" for queries and checks for engines

bb-10.10-ddl-nikita 2022-10-03 16:02:30 UTC
MDEV-29069 follow-up: fix replication with extra fields + tests

Author: Nikita Malyavin
Author Date: 2022-09-30 02:52:58 UTC

MDEV-29069 follow-up: fix replication with extra fields + tests

bb-10.6-release 2022-10-03 14:20:59 UTC
Merge branch '10.5' into 10.6

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-10-03 14:20:59 UTC

Merge branch '10.5' into 10.6

st-10.6-MDEV-29575-is_crash 2022-10-03 11:45:58 UTC
MDEV-29575 Access to innodb_trx, innodb_locks and innodb_lock_waits along wit...

Author: Vlad Lesin
Author Date: 2022-09-30 15:13:21 UTC

MDEV-29575 Access to innodb_trx, innodb_locks and innodb_lock_waits along with detached XA's can cause SIGSEGV

trx->mysql_thd can be zeroed-out between thd_get_thread_id() and
thd_query_safe() calls in fill_trx_row(). trx_disconnect_prepared()
zeroes out trx->mysql_thd. And this can cause null pointer dereferencing
in fill_trx_row().

fill_trx_row() is invoked from fetch_data_into_cache(), which, in turns,
iterates transactions with trx_sys.trx_list.for_each() function, which
holds trx_sys.trx_list.mutex during the iteration.

Bug fix is in reseting trx_t::mysql_thd in trx_disconnect_prepared()
under trx_sys.trx_list.mutex lock.

MTR test case can't be created for the fix, as we need to wait for
trx_t::mysql_thd reseting in fill_trx_row() after trx_t::mysql_thd was
checked for null while trx_sys.trx_list.mutex is held. But
trx_t::mysql_thd must be reset in trx_disconnect_prepared() under
trx_sys.trx_list.mutex. There will be deadlock.

bb-10.7-serg 2022-10-03 09:25:25 UTC
Merge branch '10.6' into 10.7

Author: Sergei Golubchik
Author Date: 2022-10-03 09:25:25 UTC

Merge branch '10.6' into 10.7

bb-10.4-bar-MDEV-29481 2022-10-03 06:32:42 UTC
MDEV-29481 mariadb-upgrade prints confusing statement

Author: Alexander Barkov
Author Date: 2022-09-15 14:41:50 UTC

MDEV-29481 mariadb-upgrade prints confusing statement

This is a new version of the patch instead of the reverted:

  MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade

This patch changes the behavior of ALTER for pre-MDEV-20704
tables containing indexes with erroneous HA_BINARY_PACK_KEY or HA_PACK_KEY
on numeric columns (DECIMAL, DOUBLE, FLOAT).

In case of a difference in key packing related flags,
ALTER with ALGORITHM=NOCOPY and ALGORITHM=INSTANT is now disallowed
only if the underlying engine really supports key packing:

- InnoDB does not support key packing. So the difference in
  HA_BINARY_PACK_KEY/HA_PACK_KEY flags is ignored.
  This makes NOCOPY/INSTANT work without errors.

- MyISAM and Aria support key packing. Indexes on numeric columns
  which erroneously had HA_BINARY_PACK_KEY or HA_PACK_KEY flags
  really performed string-alike key packing, but very inefficiently.
  These indexes are rebuilt during ALTER, now without HA_*PACK_KEY flags.
  Therefore the NOCOPY and INSTANT algorithms are not supported for
  these engines.

bb-10.6-MDEV-19229 2022-10-03 05:35:35 UTC
MDEV-19229 Allow innodb_undo_tablespaces to be changed after database creation

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2022-10-02 17:03:04 UTC

MDEV-19229 Allow innodb_undo_tablespaces to be changed after database creation

trx_sys_t::undo_log_empty: Set to true if there are no undo log
to rollback and purge.

The algorithm for re-creating the undo tablespace when
trx_sys_t::undo_log_empty is enabled:

1) trx_rseg_reset(): Reset the TRX_SYS page and assign all
rollback segment slots from 1..128 to FIL_NULL

2) srv_undo_delete_old_tablespaces(): Delete the old undo tablespaces
present in the undo log directory

3) Make checkpoint to get rid of old undo log tablespaces redo logs

4) Update the binlog and WSREP information in system tablespace
rollback segment header

5) Assign new start space id for the undo log tablespaces

6) Re-create the undo log tablespaces. InnoDB uses same
mtr for above (4), (5), (6)

7) Make checkpoint again, so that server or mariabackup
can read the undo log tablespace page0 before applying
the redo logs

7) Assign the rollback segment header page for each rollback
segment slots

srv_undo_tablespaces_reinit(): Recreate the undo log tablespaces.
It does reset trx_sys page, delete the old undo tablespaces,
update the binlog offset, write set replication checkpoint
in system rollback segment page

trx_rseg_update_binlog_offset(): Added 2 new parameters to pass
binlog file name and binlog offset

trx_rseg_array_init(): Return error if the rollback segment
slot points to non-existent tablespace

srv_undo_tablespaces_init(): Added new parameter mtr that can be
used for reinitialization of undo tablespaces

wf_incremental_process(): Detects whether TRX_SYS page has been
modified since last backup. If it is then incremental backup
fails and throws the information about taking full backup again

xb_assign_undo_space_start(): Removed the function. Because
undo001 has first undo space id value in page0

Added test case to test the scenario during startup and mariabackup
incremental process too.

bb-10.6-serg 2022-10-02 20:14:21 UTC
Merge branch '10.5' into 10.6

Author: Sergei Golubchik
Author Date: 2022-10-02 20:14:21 UTC

Merge branch '10.5' into 10.6

bb-10.5-serg 2022-10-02 12:38:13 UTC
Merge branch '10.4' into 10.5

Author: Sergei Golubchik
Author Date: 2022-10-02 12:38:13 UTC

Merge branch '10.4' into 10.5

bb-10.11-MDEV-29624 2022-10-02 05:23:58 UTC
MDEV-29624 Fix memory leak on pushdown of derived table

Author: Oleg Smirnov
Author Date: 2022-10-01 15:37:25 UTC

MDEV-29624 Fix memory leak on pushdown of derived table

Deallocation of TABLE_LIST::dt_handler and TABLE_LIST::pushdown_derived
was performed in multiple places if code. This not only made the code
more difficult to maintain but also lead to memory leaks when
dt_handler and pushdown_derived were allocated but actual pushdown
of the derived table did not take place due to the whole embedding
unit pushdown.
This commit puts deallocation of TABLE_LIST::dt_handler and
TABLE_LIST::pushdown_derived to the single point - JOIN::cleanup().

bb-10.11-anel-rpl-filter 2022-10-02 05:18:54 UTC
MDEV-15530: Variable replicate_rewrite_db cannot be found in "show global var...

Author: Anel Husakovic
Author Date: 2022-09-30 08:23:26 UTC

MDEV-15530: Variable replicate_rewrite_db cannot be found in "show global variables"

- Enable `SHOW SLAVE STATUS` command to output `replicate_rewrite_db`
- Update `protocol::store(I_List<i_string>*)` method

Reviewer:Brandon Nesterenko <brandon.nesterenko@mariadb.com>

bb-10.4-serg 2022-10-01 21:07:26 UTC
Merge branch '10.3' into 10.4

Author: Sergei Golubchik
Author Date: 2022-10-01 21:07:26 UTC

Merge branch '10.3' into 10.4

bb-10.3-serg 2022-10-01 15:45:23 UTC
cleanup: suppress rocksdb compilation warning, fix a comment

Author: Sergei Golubchik
Author Date: 2022-10-01 14:10:27 UTC

cleanup: suppress rocksdb compilation warning, fix a comment

bb-10.7-mdev29677 2022-10-01 12:41:04 UTC
MDEV-29677: Wrong result with join query and innodb fulltext search

Author: Sergey Petrunia
Author Date: 2022-10-01 12:41:04 UTC

MDEV-29677: Wrong result with join query and innodb fulltext search

InnoDB FTS scan was used by a subquery. A subquery execution may start
a table read and continue until it finds the first matching record
combination. This can happen before the table read returns EOF.

The next time the subquery is executed, it will start another table read.
InnoDB FTS table read fails to re-initialize its data structures in this
scenario and will try to continue the scan started at the first execution.

Fixed by ha_innobase::ft_init() to stop the FTS scan if there is one.

Additional complication is the testcase: The original testcase used
the query plan with DEPENDENT SUBQUERY, but then Exists-to-IN optimization
was pushed which changed the test query's query plan to use MATERIALIZED.

The query plan with MATERIALIZED didn't hit the bug. I've adjusted the
testcase to use the QEP with DEPENDENT SUBQUERY instead.

bb-10.4-bar-MDEV-20760 2022-09-30 10:56:33 UTC
MDEV-20760 Add Type_handler::KEY_pack_flags()

Author: Alexander Barkov
Author Date: 2019-10-05 14:16:37 UTC

MDEV-20760 Add Type_handler::KEY_pack_flags()

Backporting from 10.5 to 10.4

This is needed to fix MDEV-28727 easier.

bb-10.3-MDEV-17124 2022-09-30 10:11:37 UTC
MDEV-17124: mariadb 10.1.34, views and prepared statements: ERROR 1615 (HY00...

Author: Oleksandr "Sanja" Byelkin
Author Date: 2019-04-17 13:50:59 UTC

MDEV-17124: mariadb 10.1.34, views and prepared statements: ERROR 1615 (HY000): Prepared statement needs to be re-prepared

The problem is that if table definition cache (TDC) is full of real tables
which are in tables cache, view definition can not stay there so will be
removed by its own underlying tables.
In situation above old mechanism of detection matching definition in PS
and current version always require reprepare and so prevent executing
the PS.

One work around is to increase TDC, other - improve version check for
views/triggers (which is done here). Now in suspicious cases we check:
 - timestamp (microseconds) of the view to be sure that version really
   have changed;
 - time (microseconds) of creation of a trigger related to time
   (microseconds) of statement preparation.

bb-10.11-serg 2022-09-30 08:39:47 UTC
Merge branch '10.10' into 10.11

Author: Sergei Golubchik
Author Date: 2022-09-30 08:39:47 UTC

Merge branch '10.10' into 10.11

bb-10.4-bar-keyflags 2022-09-30 07:08:49 UTC
MDEV-29672 Add MTR tests covering key and key segment flags and types

Author: Alexander Barkov
Author Date: 2022-09-28 14:49:09 UTC

MDEV-29672 Add MTR tests covering key and key segment flags and types

st-10.5-marko 2022-09-30 05:25:00 UTC
Cleanup: Remove innobase_destroy_background_thd()

Author: Marko Mäkelä
Author Date: 2022-09-30 05:25:00 UTC

Cleanup: Remove innobase_destroy_background_thd()

We do not need a non-inline wrapper for the function
destroy_background_thd().

bb-10.10-serg 2022-09-29 20:38:24 UTC
MDEV-29608 Default SSL makes mysqlslap much slower, tests fail with timeout

Author: Sergei Golubchik
Author Date: 2022-09-23 12:37:58 UTC

MDEV-29608 Default SSL makes mysqlslap much slower, tests fail with timeout

mysqlslap has an unusual semantics of the --iterations option, so that
$ mysqlslap --concurrency=16 --iterations=1000
performs 16,000 connections. Because of that it gets many times slower
with --ssl

Let's disable ssl for mysqlslap in mysql-test

bb-10.3-MDEV-28798 2022-09-29 19:40:51 UTC
MDEV-18798: Remove trailing whitespaces

Author: Brandon Nesterenko
Author Date: 2022-09-29 19:40:51 UTC

MDEV-18798: Remove trailing whitespaces

bb-10.3-anel-MDEV-28455-temporary-grant-2 2022-09-29 11:11:34 UTC
MDEV-28455: CREATE TEMPORARY TABLES privilege is insufficient for SHOW COLUMNS

Author: Anel Husakovic
Author Date: 2022-07-04 13:27:36 UTC

MDEV-28455: CREATE TEMPORARY TABLES privilege is insufficient for SHOW COLUMNS

=========== Problem =============
- `show columns` is not working for temporary tables, even though there
is enough privilege `create temporary tables`.
=========== Solution =============
- Append `TMP_TABLE_ACLS` privilege when running `show columns` for temp
tables.
- Additionally `check_access()` for database only once, not for each
field
=========== Additionally =============
- Update comments for function `check_table_access` arguments

Reviewed by: <vicentiu@mariadb.org>

bb-10.3-igor 2022-09-29 05:33:05 UTC
MDEV-29361 Infinite recursive calls when detecting CTE dependencies

Author: Igor Babaev
Author Date: 2022-09-23 04:40:33 UTC

MDEV-29361 Infinite recursive calls when detecting CTE dependencies

This patch resolves the problem of improper name resolution of table
references to embedded CTEs for some queries. This improper binding could
lead to
  - infinite sequence of calls of recursive functions
  - crashes due to resolution of null pointers
  - wrong result sets returned by queries
  - bogus error messages

If the definition of a CTE contains with clauses then such CTE is called
embedding CTE while CTEs from the with clauses are called embedded CTEs.
If a table reference used in the definition of an embedded CTE cannot be
resolved within the unit that contains this reference it still may be
resolved against a CTE definition from the with clause with one of the
embedding CTEs.
A table reference can be resolved against a CTE definition if it used in
the the scope of this definition and it refers to the name of the CTE.
Table reference t is in the scope of the CTE definition of CTE cte if
- the definition of cte is an element of a with clause declared as
  RECURSIVE and the reference t belongs either to the unit to which
  this with clause is attached or to one of the elements of this clause
- the definition of cte is an element of a with clause without RECURSIVE
  specifier and the reference t belongs either to the unit to which this
  with clause is attached or to one of the elements from this clause that
  are placed before the definition of cte.
If a table reference can be resolved against several CTE definitions then
it is bound to the most embedded.

The code before this patch not always resolved table references used in
embedded CTE according to the above rules.

Approved by Oleksandr Byelkin <sanja@mariadb.com>

st-10.7-thiru 2022-09-28 13:11:00 UTC
MDEV-29570 InnoDB fails to clean bulk buffer when server does rollback o...

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2022-09-28 13:11:00 UTC

MDEV-29570 InnoDB fails to clean bulk buffer when server does rollback operation

- During bulk insert, server detects the error and does rollback
operation. At that time, InnoDB fails to clean up the bulk insert
buffer

trx_t::rollback_finish(): Removed the clean up of modified tables
from transaction

trx_t::commit_cleanup(): Free the bulk buffer for bulk insert operation

trx_t::commit(): Check whether modified table wasn't dropped only
for non-dictionary transaction

bb-10.11-all-builders 2022-09-28 09:07:21 UTC
MDEV-27691: make working view-protocol

Author: Lena Startseva
Author Date: 2022-09-28 09:07:21 UTC

MDEV-27691: make working view-protocol

Update tests for version 10.11

bb-10.10-all-builders 2022-09-28 06:53:08 UTC
MDEV-27691: make working view-protocol

Author: Lena Startseva
Author Date: 2022-09-28 06:53:08 UTC

MDEV-27691: make working view-protocol

Update tests for version 10.10

bb-10.3-MDEV-29644 2022-09-28 05:55:56 UTC
MDEV-29644 a potential bug of null pointer dereference in spider_db_mbase::pr...

Author: Nayuta Yanagisawa
Author Date: 2022-09-27 06:22:57 UTC

MDEV-29644 a potential bug of null pointer dereference in spider_db_mbase::print_warnings()

The function spider_db_mbase::print_warnings() can potentially result
in a null pointer dereference.

Remove the null pointer dereference by cleaning up the function.

bb-10.6-MDEV-26391-galera 2022-09-28 05:46:11 UTC
MDEV-26391 BF abortable mariabackup execution

Author: sjaakola
Author Date: 2022-06-17 12:16:23 UTC

MDEV-26391 BF abortable mariabackup execution

This commit changes backup execution (namely the block ddl phase),
so that node is not paused from cluster. Instead, the following
backup execution is declared as vulnerable for possible cluster
level conflicts, especially with DDL statement applying. With
this, the mariabackup execuion may be aborted, if DDL statements
happen during backup execution. This abortable backup execution
is optional feature and may be enabled/disabled by wsrep_mode
BF_ABORT_MARIABACKUP.

Note that we force old style node desync and pause, despite
of WSREP_MODE_BF_MARIABACKUP if node is operating as SST donor.

bb-10.10-MDEV-29517 2022-09-27 21:57:33 UTC
MDEV-29517: rpl.rpl_change_master_demote sporadically fails in BB

Author: Angelique Sklavounos
Author Date: 2022-09-12 15:53:21 UTC

MDEV-29517: rpl.rpl_change_master_demote sporadically fails in BB

Problem:
=======
Test Case 4 sporadically failed upon waiting for the slave to start during
master demotion to slave, due to a GTID event not existing in the new
master's binlog. If by chance the original slave (new master) did not yet
receive all the binlog events, then this failure could occur.

Solution:
========
Sync slave with master GTID before master demotion.

Reviewed By:
============
Brandon Nesterenko <brandon.nesterenko@mariadb.com>

bb-10.5-MDEV-29607 2022-09-27 16:37:19 UTC
MDEV-29607: binlog.binlog_checkpoint fails in buildbot with result content mi...

Author: Brandon Nesterenko
Author Date: 2022-09-27 16:31:24 UTC

MDEV-29607: binlog.binlog_checkpoint fails in buildbot with result content mismatch

Problem:
========
There is a race condition in binlog.binlog_checkpoint between the
binlog background thread creating a binlog checkpoint event, and the
connection thread binlogging a query event for creating a table.
Because the test outputs the events for validation, the order
between these two events can be different, resulting in a failed
test.

Solution:
========
Instead of outputting the binlog events, use assert_grep to validate
the content of the binlog is correct.

Reviewed By:
============
<TODO>

bb-10.4-MDEV-29456 2022-09-27 14:29:16 UTC
MDEV-29421 Thread (10.6+) and server hangs (10.4/10.5) in 'Opening tables' (o...

Author: Nayuta Yanagisawa
Author Date: 2022-09-06 13:35:03 UTC

MDEV-29421 Thread (10.6+) and server hangs (10.4/10.5) in 'Opening tables' (on optimized builds) and SIGABRT in safe_mutex_lock (on debug) on I_S read when using Spider

In spider_free_share(), Spider acquires the mutex, spider_open_tables,
and then makes statistics of the target table persistent.

When table_open_cache is small, the statistics persistence can lead to
another call of spider_free_share() and this results in the double
lock on the mutex.

The mutex spider_tbl_mutex is acquired unnecessarily long. Shortening
the locking period resolves the problem.

bb-10.9-all-builders 2022-09-27 14:24:33 UTC
MDEV-27691: make working view-protocol

Author: Lena Startseva
Author Date: 2022-09-27 14:24:33 UTC

MDEV-27691: make working view-protocol

Update tests for version 10.9

bb-10.11-mdev-25080-fix1 2022-09-27 13:15:56 UTC
MDEV-25080 Fix pushdown of UNIONs containing different data types

Author: Oleg Smirnov
Author Date: 2022-09-27 13:15:39 UTC

MDEV-25080 Fix pushdown of UNIONs containing different data types

Select_handler must take into account all parts of a unit
(UNION/EXCEPT/INTERSECT) when creating temporary table for the result.
This applies to both entire unit pushdown and pushdown of parts of
the unit. This guarantees that field types of the temporary table
are set correctly.

bb-10.3-MDEV-28669-galera 2022-09-27 11:53:01 UTC
MDEV-28669: processing for recursive subdirectories

Author: Julius Goryavsky
Author Date: 2022-09-20 12:24:05 UTC

MDEV-28669: processing for recursive subdirectories

bb-10.8-all-builders 2022-09-27 11:50:18 UTC
MDEV-27691: make working view-protocol

Author: Lena Startseva
Author Date: 2022-09-27 11:50:18 UTC

MDEV-27691: make working view-protocol

Update tests for version 10.8

bb-10.3-mdev-21134-hf 2022-09-27 11:27:34 UTC
MDEV-21134 Crash with partitioned table, PARTITION syntax, and index_merge.

Author: Alexey Botchkov
Author Date: 2022-08-19 07:24:51 UTC

MDEV-21134 Crash with partitioned table, PARTITION syntax, and index_merge.

When the partition table is cloned, the handlers for the partitions that were not opened
should anyway be created (but not opened).

bb-10.7-all-builders 2022-09-27 10:47:12 UTC
MDEV-27691: make working view-protocol

Author: Lena Startseva
Author Date: 2022-09-27 10:47:12 UTC

MDEV-27691: make working view-protocol

Update tests for version 10.7

bb-10.7-MDEV-29570 2022-09-27 08:57:19 UTC
MDEV-29570 InnoDB fails to clean bulk buffer when server does rollback o...

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2022-09-27 08:57:19 UTC

MDEV-29570 InnoDB fails to clean bulk buffer when server does rollback operation

- During bulk insert, server detects the error and does rollback
operation. At that time, InnoDB fails to clean up the bulk insert
buffer

trx_t::rollback_finish(): Remove modified tables from transaction

trx_t::commit_cleanup(): Free the bulk buffer for bulk insert operation

trx_t::commit(): Check whether modified table wasn't dropped only
for non-dictionary transaction

bb-10.4-MDEV-29022 2022-09-27 07:57:40 UTC
MDEV-29022 add_slave destroy child list and has dead code

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-07-04 13:23:01 UTC

MDEV-29022 add_slave destroy child list and has dead code

Nowdays subquery in a UNION's ORDER BY placed correctly in fake select,
the only problem was incorrect Name_resolution_contect is fixed by this
patch in parsing, so we do not need scanning/reseting of ORDER BY of
a union.

(in 10.4 all work in parser correctly)

bb-10.3-MDEV-29022 2022-09-27 07:56:21 UTC
MDEV-29022 add_slave destroy child list and has dead code

Author: Oleksandr "Sanja" Byelkin
Author Date: 2022-07-04 13:23:01 UTC

MDEV-29022 add_slave destroy child list and has dead code

Nowdays subquery in a UNION's ORDER BY placed correctly in fake select,
the only problem was incorrect Name_resolution_contect is fixed by this
patch in parsing, so we do not need scanning/reseting of ORDER BY of
a union.

bb-10.6-all-builders 2022-09-27 06:18:28 UTC
MDEV-27691: make working view-protocol

Author: Lena Startseva
Author Date: 2022-09-27 03:55:22 UTC

MDEV-27691: make working view-protocol

Update tests for version 10.6

bb-10.3-MDEV-29636 2022-09-27 03:01:29 UTC
MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_i...

Author: Nayuta Yanagisawa
Author Date: 2022-09-27 03:01:29 UTC

MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed in ha_partition::set_auto_increment_if_higher upon REPLACE with partition pruning

The bug is caused by a similar mechanism as MDEV-21027.

The function, check_insert_or_replace_autoincrement, failed to open
all the partitions on REPLACE SELECT statements and it results in the
assertion error.

bb-10.11-MDEV-29596 2022-09-26 18:36:29 UTC
MDEV-29632 SUPER users created before 10.11 should retain READ_ONLY ADMIN pri...

Author: Sergei Golubchik
Author Date: 2022-09-26 18:26:29 UTC

MDEV-29632 SUPER users created before 10.11 should retain READ_ONLY ADMIN privilege upon upgrade

bb-10.3-mdev-29490 2022-09-26 15:36:38 UTC
Disabling false_duper-6543 test for embedded.

Author: Lawrin Novitsky
Author Date: 2022-09-26 15:23:47 UTC

Disabling false_duper-6543 test for embedded.

ha_federated.so uses C API. C API functions have been renamed in the server,
but not renamed in embedded, since embedded server library should have proper
C API, as expected by programs using it.
Thus the same ha_federated.so cannot work both for server and embedded
server library.

As all federated tests are already disabled for embedded,
federated isn't supposed to work for embedded anyway, and thus the test
is being disabled.

bb-10.3-all-builders 2022-09-26 15:36:38 UTC
Disabling false_duper-6543 test for embedded.

Author: Lawrin Novitsky
Author Date: 2022-09-26 15:23:47 UTC

Disabling false_duper-6543 test for embedded.

ha_federated.so uses C API. C API functions have been renamed in the server,
but not renamed in embedded, since embedded server library should have proper
C API, as expected by programs using it.
Thus the same ha_federated.so cannot work both for server and embedded
server library.

As all federated tests are already disabled for embedded,
federated isn't supposed to work for embedded anyway, and thus the test
is being disabled.

bb-10.5-MDEV-26852 2022-09-26 14:17:55 UTC
MDEV-26852 Spider: -Werror=maybe-uninitialized raises on spd_sys_table.cc and...

Author: Nayuta Yanagisawa
Author Date: 2022-09-26 14:17:55 UTC

MDEV-26852 Spider: -Werror=maybe-uninitialized raises on spd_sys_table.cc and ha_spider.cc

The warning "maybe-uninitialized" raises on spd_sys_table.cc and
ha_spider.cc when the sever is compiled with CMAKE_CXX_FLAGS=-Og.

bb-10.5-all-builders 2022-09-26 03:25:41 UTC
MDEV-27691: make working view-protocol

Author: Lena Startseva
Author Date: 2022-09-16 10:55:42 UTC

MDEV-27691: make working view-protocol

Update tests for version 10.5

bb-10.11-MDEV-5215 2022-09-24 21:12:00 UTC
remove LEX_USER->is_public

Author: Sergei Golubchik
Author Date: 2022-09-24 21:12:00 UTC

remove LEX_USER->is_public

it's now redundant

preview-10.11-preview 2022-09-23 14:38:31 UTC
cherry-pick from 10.10

Author: Sergei Golubchik
Author Date: 2022-09-23 12:37:58 UTC

cherry-pick from 10.10

MDEV-29608 Default SSL makes mysqlslap much slower, tests fail with timeout

mysqlslap has an unusual semantics of the --iterations option, so that
$ mysqlslap --concurrency=16 --iterations=1000
performs 16,000 connections. Because of that it gets many times slower
with --ssl

Let's disable ssl for mysqlslap in mysql-test

bb-10.4-all-builders 2022-09-23 12:47:30 UTC
MDEV-27691: make working view-protocol

Author: Lena Startseva
Author Date: 2022-09-15 11:30:13 UTC

MDEV-27691: make working view-protocol

Update tests for version 10.4

st-10.6-thiru 2022-09-23 06:12:00 UTC
MDEV-29277 On error, fts_sync_table() fails to release a table handle

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2022-09-20 05:59:08 UTC

MDEV-29277 On error, fts_sync_table() fails to release a table handle

 fts_sync_commit() fails to release the auxiliary table handle
when it encounters error. This issue is caused by
commit 1fd7d3a9adac50de37e40e92188077e3515de505(MDEV-25581).
fts_cache_clear() releases the auxiliary table handles.
MDEV-25581's patch clear the cache only if fts_sync_commit was
successful.

bb-10.9-bar-MDEV-29446 2022-09-22 08:53:05 UTC
10.9 specific fixes for MDEV-29446 Change SHOW CREATE TABLE to display defaul...

Author: Alexander Barkov
Author Date: 2022-09-22 08:53:05 UTC

10.9 specific fixes for MDEV-29446 Change SHOW CREATE TABLE to display default collations

Fixing the JSON_TABLE related code according to MDEV-29446.

bb-10.9-bar-merge 2022-09-22 07:36:18 UTC
A cleanup for MDEV-29446 Change SHOW CREATE TABLE to display default collation

Author: Alexander Barkov
Author Date: 2022-09-22 07:36:18 UTC

A cleanup for MDEV-29446 Change SHOW CREATE TABLE to display default collation

Recording test results according to MDEV-29446 changes:

  plugin/hashicorp_key_management/mysql-test/vault/r/hashicorp_encode.result

bb-10.5-MDEV-25616 2022-09-21 16:55:25 UTC
MDEV-25616: Transactional and slave binlog fix

Author: Brandon Nesterenko
Author Date: 2022-09-14 21:16:45 UTC

MDEV-25616: Transactional and slave binlog fix

Andrei's previous commit fixed non-transactional
XA completion actions from being binlogged by
propagating the handler from a failed statement
into the transaction. The remaining problem is
with failed transactional statements. Specifically,
when the binlog format is in row mode, the binlog
handler is added to the transaction before the
write into the storage engine would happen.
In binlog_commit, however, the trx_cache is empty,
forcing the reset of the cache manager, resulting
in the XA PREPARE not being binlogged, yet the
XA COMMIT or ROLLBACK would be.

Another issue was that a slave could receive
an empty XA transaction (ie start through commit),
but would not binlog it due to its empty body,
resulting in inconsistency between master/slave
behavior.

To fix the first issue, the cache manager reset
check logic is extended to ensure that the
transaction is actuall effective, i.e. has writes.
To fix the second problem, the slave thread is
modified to always binlog XA events.

bb-10.3-nayuta 2022-09-21 13:02:21 UTC
Backport fix for MDEV-29352 to 10.3-10.5

Author: Alexey Botchkov
Author Date: 2022-09-13 02:46:28 UTC

Backport fix for MDEV-29352 to 10.3-10.5

The fix for MDEV-29352 was pushed to 10.6+ but the code causing the
bug is old and the bug is unlikely to be a recent regression in 10.6.
So, we apply the fix also to older versions, 10.3-10.5.

The original commit message:

MDEV-29352 SIGSEGV's in strlen and unknown location on optimized builds at SHUTDOWN

When the UDF creation frails to write the newly created UDF into
the related system table, the UDF is still created in memory.

However, as it is now, the related DLL is unloaded in this case right
in the mysql_create_function. And failure happens when the UDF handle
is freed and tries to unload the respective DLL which is still unloaded.

preview-10.11-mdev20609-is_parameters 2022-09-21 10:07:43 UTC
MDEV-29104 Optimize queries to INFORMATION_SCHEMA.PARAMETERS/ROUTINES

Author: Oleg Smirnov
Author Date: 2022-09-19 14:36:09 UTC

MDEV-29104 Optimize queries to INFORMATION_SCHEMA.PARAMETERS/ROUTINES

For queries like
    "SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
      WHERE SPECIFIC_NAME='proc_name'"
and
    "SELECT * FROM INFORMATION_SCHEMA.ROUTINES
      WHERE ROUTINE_NAME='proc_name'"
there is a possibility to avoid loading a stored procedure code and
parsing it to retrieve parameters.
If the name of the procedure/function is specified explicitly then
it is possible to filter out routines that do not match at
an early stage.

bb-10.7-MDEV-27233 2022-09-21 06:22:57 UTC
MDEV-27233 Server hangs when using --init-file which loads Spider and creates...

Author: Nayuta Yanagisawa
Author Date: 2022-04-25 09:29:01 UTC

MDEV-27233 Server hangs when using --init-file which loads Spider and creates a Spider table

Spider waits until the server initialization has been completed
(i.e., mysqld_server_started has been set to 1) before creating the
Spider system tables. Spider also wait until the system tables have
been created before instantiating ha_spider.

These waits leads to dead lock when a non-system Spider table is
created by --in-file. This is because queries passed by --in-file
are executed during the server initialization and creating the
non-system Spider causes an instantiation of ha_spider.

In the first place, there seems to be no need for Spider to do such
a synchronization. Thus, we simply remove the synchronization.

bb-10.3-MDEV-24283 2022-09-21 05:21:28 UTC
MDEV-24283 Assertion `bitmap_is_set(&m_part_info->read_partitions, m_part_spe...

Author: Nayuta Yanagisawa
Author Date: 2022-09-20 12:28:19 UTC

MDEV-24283 Assertion `bitmap_is_set(&m_part_info->read_partitions, m_part_spec.start_part)' failed in ha_partition::handle_ordered_index_scan

On the optimization of MAX/MIN clauses by opt_sum_query(), the
optimizer tries to access a partitioned table, even though all the
partitions of the table have been pruned away in a earlier stage.
This leads to the assertion error.

We stop the optimization by opt_sum_query() if all the partitions
were pruned way.

bb-10.11-MDEV-29104 2022-09-21 05:11:42 UTC
MDEV-29104 Optimize queries to INFORMATION_SCHEMA.PARAMETERS/ROUTINES

Author: Oleg Smirnov
Author Date: 2022-09-19 14:36:09 UTC

MDEV-29104 Optimize queries to INFORMATION_SCHEMA.PARAMETERS/ROUTINES

For queries like
    "SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
      WHERE SPECIFIC_NAME='proc_name'"
and
    "SELECT * FROM INFORMATION_SCHEMA.ROUTINES
      WHERE ROUTINE_NAME='proc_name'"
there is a possibility to avoid loading a stored procedure code and
parsing it to retrieve parameters.
If the name of the procedure/function is specified explicitly then
it is possible to filter out routines that do not match at
an early stage.

10.11-MDEV-5816-1 2022-09-20 16:07:24 UTC
MDEV-5816: Stored programs: validation of stored program statements

Author: Dmitry Shulga
Author Date: 2022-09-20 16:07:24 UTC

MDEV-5816: Stored programs: validation of stored program statements

Follow-up patch that fixes existing mtr tests.

bb-10.11-MDEV-5816 2022-09-20 14:44:41 UTC
MDEV-5816: Stored programs: validation of stored program statements

Author: Dmitry Shulga
Author Date: 2022-09-20 14:44:41 UTC

MDEV-5816: Stored programs: validation of stored program statements

This is the prerequisite patch introducing the class sp_lex_instr
that encapsulates access to an instance of the class sp_lex_keeper.
Every SP instruction that need to get access to a LEX object on its
processing should inherit this class and implement two abstract methods:
  is_invalid(),
  invalidate().

These methods will be used in subsequent patches to implement recompilation of
SP instructions on failure.

Currently, the following instructions are derived from the class sp_lex_instr:
  sp_instr_stmt,
  sp_instr_set,
  sp_instr_set_trigger_field,
  sp_instr_jump_if_not,
  sp_instr_freturn,
  sp_instr_cpush,
  sp_instr_cursor_copy_struct,
  sp_instr_set_case_expr

Additionally, this patch converts the class sp_instr_opt_meta
to base abstract class (that is, not inherited from the class
sp_instr). Since this class originally was designed to provide a way
for opimizer to update a destination address for jump SP-instructions,
the only useful method at the interface of this class is set_destination
and therefore inheritance from the class sp_instr is meaningless.

Every jump SP instruction now must be inhereted directly from
the class sp_instr_opt_meta and additionally from either the class
sp_lex_instr or sp_instr depending on whether this SP instruction
need to get access to a LEX object or not.

Moreover, the class sp_cursor doesn't own a data member of
the class sp_lex_keeper any more. Instead, the virtual method
get_lex_keeper() has been added to the class sp_cursor() that
returns nullptr and this method is overridden in the derived class
sp_instr_cpush to provide a pointer to a real instance of
the class sp_lex_keeper. Doing this way we exclude duplication
of a data member of the type sp_lex_keeper at the class sp_instr_cpush
since it is derived both from sp_lex_instr and sp_cursor, and sp_lex_instr
already encapsulates a data member of the class sp_lex_keeper.

vicentiu-tmp 2022-09-20 13:14:44 UTC
MDEV-14443: Ignore denies privilege now takes effect

Author: Vicențiu Ciorbaru
Author Date: 2022-09-12 13:37:52 UTC

MDEV-14443: Ignore denies privilege now takes effect

bb-10.11-MDEV-27128 2022-09-20 09:07:21 UTC
MDEV-27128: Implement JSON Schema Validation FUNCTION

Author: Rucha Deodhar
Author Date: 2022-05-02 09:07:37 UTC

MDEV-27128: Implement JSON Schema Validation FUNCTION

Idea:
The json schema (st_json_schema) is used to validate all kinds of json
value types. So it can be viewed as a structure with different
sub-structure that represents each type of json value with their own
constraints.
So we use an object of type st_json_schema for validation.
The schema that we want to validate a json document against is basically
set of key-value pairs so it can be parsed same way as any other json
string. So we scan through the schema, store the validation information
in relevant sub-structures of st_json schema. This is later used in
Item_func_json_schema_valid::val_int() to validate document again schema.

bb-10.6-MDEV-29277 2022-09-20 06:45:01 UTC
MDEV-29277 On error, fts_sync_table() fails to release a table handle

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2022-09-20 05:59:08 UTC

MDEV-29277 On error, fts_sync_table() fails to release a table handle

 fts_sync_commit() fails to release the auxiliary table handle
when it encounters error. This issue is caused by
commit 1fd7d3a9adac50de37e40e92188077e3515de505(MDEV-25581).
fts_cache_clear() releases the auxiliary table handles.
MDEV-25581's patch clear the cache only if fts_sync_commit was
successful.

bb-10.9-bumpversion 2022-09-19 14:57:07 UTC
bump the VERSION

Author: Daniel Bartholomew
Author Date: 2022-09-19 14:57:07 UTC

bump the VERSION

bb-10.8-bumpversion 2022-09-19 14:33:31 UTC
bump the VERSION

Author: Daniel Bartholomew
Author Date: 2022-09-19 14:33:31 UTC

bump the VERSION

1100 of 1507 results

Other repositories

Name Last Modified
lp:maria 2 hours ago
lp:~maria-captains/maria/+git/connector-c 2018-01-08
12 of 2 results
You can't create new repositories for MariaDB.