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

MariaDB has 15 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-98ee42-prod-launchpad-codeimport-0 and finished taking 6 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 7 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-5 and finished taking 7 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-4 and finished taking 6 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 6 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 6 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 5 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 5 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 5 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-5 and finished taking 6 minutes — see the log

Branches

Name Last Modified Last Commit
bb-10.6-MDEV-32297 2024-03-19 01:34:13 UTC
MDEV-32297 pushed condition into context with empty table list crashes.

Author: Rex Johnston
Author Date: 2024-03-19 01:31:58 UTC

MDEV-32297 pushed condition into context with empty table list crashes.

When a condition is pushed into a subquery that has no table references,
under some circumstances, the context for the purposes of name resolution
may be left in an unexpected state.

bb-10.6-wlad 2024-03-18 22:43:56 UTC
Post-fix 567c0973591eb66797bb0f982f312b516f8fe82c

Author: VladislavVaintroub
Author Date: 2024-03-18 22:43:56 UTC

Post-fix 567c0973591eb66797bb0f982f312b516f8fe82c

Do *not* check if socket is closed by another thread. This is
race-condition prone, unnecessary, and harmful. VIO state was introduced
to debug the errors, not to change the behavior.

Rather than checking if socket is closed, add a DBUG_ASSERT that it is
*not* closed, because this is an actual logic error, and can potentially
lead to all sorts of funny behavior like writing error packets to Innodb
files.

Unlike closesocket(), shutdown(2) is not actually race-condition prone,
and it breaks poll() and read(), and it worked for longer than a decade,
and it does not need any state check in the code.

bb-11.0-MDEV-31793 2024-03-18 22:18:45 UTC
MDEV-31793 LooseScan join on derived table crashes

Author: Rex Johnston
Author Date: 2023-11-13 21:12:25 UTC

MDEV-31793 LooseScan join on derived table crashes

Statements that may be affected by this bug have
1) a semi join to a derived table
2) a text or blob field in the select list of the derived table
3) loose scan optimization enabled

When a temporary table is materialized that contains a BLOB or TEXT
field and a unique key is added to this table (for any reason)
a new key field is added as the first key part. This field is to
differentiate NULL from blank strings. This key part had it's store_length
set to zero, causing a potential loose scan to try and allocate then
free zero bytes. It is also an error to add it to the beginning of the
key and this breaks grouping assumptions in the LooseScan code.

Under normal circumstances, a loose scan is never performed on a derived
table, but it is possible to force it by either getting incorrect
statistics from the engine (see OP in MDEV) or altering the plan costs
and disabling some join types (see test case).

10.5 2024-03-18 22:15:03 UTC
MDEV-33636: RPM caps is on mariadbd exe

Author: Daniel Black
Author Date: 2024-03-18 06:37:13 UTC

MDEV-33636: RPM caps is on mariadbd exe

Postfix on 51e3f1daf54309d14fe8db438024d88aa110e86a that
mariadbd should be the executable name rather than capabilities
on a symlink.

st-10.4-wlad 2024-03-18 21:28:16 UTC
MTR, Windows - remove --verbose-restart output on buildbot run

Author: VladislavVaintroub
Author Date: 2024-03-18 21:07:32 UTC

MTR, Windows - remove --verbose-restart output on buildbot run

MTR buildbot output suggest that buildbot can lose some stdout information
by overwriting it with stderr, which is captured separately

This is bad, since stdout contains information about failing test.
So, this is an attempt to minimize the damage by excluding most frequent
stderr messages - those about restart.

10.4 2024-03-18 21:28:16 UTC
MTR, Windows - remove --verbose-restart output on buildbot run

Author: VladislavVaintroub
Author Date: 2024-03-18 21:07:32 UTC

MTR, Windows - remove --verbose-restart output on buildbot run

MTR buildbot output suggest that buildbot can lose some stdout information
by overwriting it with stderr, which is captured separately

This is bad, since stdout contains information about failing test.
So, this is an attempt to minimize the damage by excluding most frequent
stderr messages - those about restart.

bb-10.6-MDEV-33716 2024-03-18 20:55:07 UTC
MDEV-33716: rpl.rpl_semi_sync_slave_enabled_consistent Fails with Error Condi...

Author: Brandon Nesterenko
Author Date: 2024-03-18 20:55:05 UTC

MDEV-33716: rpl.rpl_semi_sync_slave_enabled_consistent Fails with Error Condition Reached

Though the test itself doesn't create any transactions
directly, the added test suppressions are replicated,
and when the SQL thread is stopped mid-execution,
it is set into an error state because these are
non-transactional events being aborted.

This patch fixes the test by ensuring that the test
suppressions are fully replicated before continuing.

bb-11.2-growt 2024-03-18 20:53:44 UTC
try to use growt instead of lf_hash

Author: Nikita Malyavin
Author Date: 2024-03-18 20:43:09 UTC

try to use growt instead of lf_hash

bb-10.5-MDEV-32583 2024-03-18 20:50:19 UTC
MDEV-32583 UUID() should be treated as stochastic for the purposes of forcing...

Author: Rex Johnston
Author Date: 2024-03-18 20:50:19 UTC

MDEV-32583 UUID() should be treated as stochastic for the purposes of forcing query materialization

RAND() and UUID() are treated differently with respect to subquery materialization
both should be marked as uncacheable, forcing materialization.
Altered Create_func_uuid::create_builder() to mark it as uncacheable.

10.6-MDEV-33551 2024-03-18 20:19:47 UTC
MDEV-33551: Review Round 2

Author: Brandon Nesterenko
Author Date: 2024-03-18 14:29:22 UTC

MDEV-33551: Review Round 2

 * Removed part of MDEV-11853 additions, which allowed suspended
   connection threads awaiting their semi-sync ACKs to live until
   their ACKs had been received. This part, however, wasn't needed.
   That is, all that was needed was for the Ack_thread to survive.
   So now the connection threads are killed during phase 1. So
   THD::is_awaiting_semisync_ack, and all its related code was
   removed.

 * COND_binlog_send is repurposed to signal on the condition when
   Active_tranx is emptied during clear_active_tranx_nodes.

 * Await_all_slave_replies is improved to wait only on the
   repurposed COND_binlog_send.

 * If a thread is killed during its wait-for-semi-sync-ACK, it will
   unlink its THD from the Tranx_node, so it cannot be referenced
   or signalled.

 * Before signalling THD::COND_wakeup_ready, ensure the thread
   reference is valid.

 * Test rpl_semi_sync_shutdown_await_ack is updates as following:
    1) Added test case (adapted from Kristian Nielsen) to ensure
       that if a thread awaiting its ACK is killed while
       SHUTDOWN WAIT FOR ALL SLAVES is issued, the primary will
       still wait for the ACK from the killed thread.
    2) As connections which by-passed phase 1 of thread killing no
       longer are delayed for kill until phase 2, we can no longer
       query yes/no tx after receiving an ACK/timeout. The check
       for these variables is removed.
    3) Comment descriptions are updated which mention that the
       connection is alive; and adjusted to be the Ack_thread.

 * Removed Repl_semi_sync_master::cond_timedwait, as different
   condition variables are used with different timings, and
   directly calling mysql_cond_timedwait is more straightforward.

 * Fixed parameter of offset type from NULL to 0.

 * Fixed comment typo log_file_name -> m_trx_rear

bb-10.5-MDEV-19487 2024-03-18 20:00:13 UTC
MDEV-19487: JSON_TYPE doesnt detect the type of String Values

Author: Rucha Deodhar
Author Date: 2024-03-18 20:00:13 UTC

MDEV-19487: JSON_TYPE doesnt detect the type of String Values
(returns NULL) and for Date/DateTime returns "INTEGER"

Analysis:
When the first character of json is scanned it is number. Based on that
integer is returned.
Fix:
Scan rest of the json before returning the final result to ensure json is
valid in the first place in order to have a valid type.

bb-10.5-MDEV-32287 2024-03-18 18:42:58 UTC
MDEV-32287: JSON_EXTRACT not returning multiple values for same path

Author: Rucha Deodhar
Author Date: 2024-03-18 18:34:47 UTC

MDEV-32287: JSON_EXTRACT not returning multiple values for same path

Analysis:
When scanning json and getting the exact path at each step, if a path
is reached, we end up adding the item in the result and immediately get the
next item which results in current path changing.
Fix:
Instead of immediately returning the item, count the occurences of the path
in argument and append in the result as needed.

11.4-mdev-32777 2024-03-18 18:42:58 UTC
MDEV-32777 DDL operations very slow under macOS

Author: Dave Gosselin
Author Date: 2024-03-18 17:03:33 UTC

MDEV-32777 DDL operations very slow under macOS

macOS is a development platform for our product but calls to
fcntl(F_FULLFSYNC) are too slow for developer needs. macOS offers
at least three different disk flush calls, making tradeoffs between
reliability and performance (see analysis notes on this MDEV).
On macOS only and as a compromise, we will back out the change to
call fcntl(F_FULLFSYNC), sacrificing a full flush in favor of more
performant writes.

bb-10.4-mdev-32401 2024-03-18 16:32:17 UTC
MDEV-32401: expression cache heap-use-after-free

Author: Dave Gosselin
Author Date: 2024-01-26 16:13:48 UTC

MDEV-32401: expression cache heap-use-after-free

Queries selecting a TEXT column by alias, then joining that with a subquery
referencing the same alias may invoke a subquery expression cache. Typically,
these caches expect to rely on heap memory for their backing temporary table,
but TEXT (and BLOB) types require an ARIA backing; in this case, a crash may
result. Such a query may look like:

SELECT t1.d FROM (SELECT c AS d FROM t0) AS t1 JOIN t0 ON (
  SELECT ORD((SELECT BIT_OR(d))) FROM t0 GROUP BY d
);

This patch checks if there are blob types present before attempting to create
the SQL expression cache and if so, it does not, leaving the associated item
cache transparent.

The Expression_cache_tmptable implements the Expression_cache using a temporary
table. During Expression_cache_tmptable::init, we expect the created temporary
table to have the heap handlerton. However, for the crash in this ticket, it
is created using the ARIA handlerton instead. This happens because the
Create_tmp_table::choose_engine selects the ARIA engine because the temporary
table's associated TABLE_SHARE indicates that there are BLOB fields present.
This is true because TEXT fields are handled in the same way as BLOB fields in
our system; in our grammar, both TEXT and BLOB types rely on the
type_handler_blob handler. After the temporary table is created and the engine
associated with it, we then invoke move_field on each field associated with
the TABLE_SHARE. However, once this is complete and we return to
Expression_cache_tmptable::init, we check to see that the heap hton is used as
expected and it is not: so we delete the temporary table. Unfortunately, this
leaves the pointers inside the Field objects dangling, and we crash later as
indicated in the stack traces on this ticket. Non-BLOB types avoid this
problem because they end up with a temporary table backed by the heap
handlerton.

11.4-macos-test-exclusion-mechanism 2024-03-18 16:31:03 UTC
MTR flag to mark tests as incompatible with macOS

Author: Dave Gosselin
Author Date: 2024-03-07 20:31:26 UTC

MTR flag to mark tests as incompatible with macOS

Introduces a new MTR include, not_mac.inc, which when included
at the top of a test, prevents that test from running on macOS.

11.4-mdev-33460 2024-03-18 16:26:49 UTC
MDEV-33460 select '123' 'x'; unexpected result

Author: Dave Gosselin
Author Date: 2024-03-13 20:56:37 UTC

MDEV-33460 select '123' 'x'; unexpected result

Queries that select concatenated constant strings now have
colname and value that match. For example,
  SELECT '123' 'x';
will return a result where the column name and value both
are '123x'.

11.4-mdev-33652 2024-03-18 16:03:55 UTC
MDEV-33652 compat/oracle.sp-inout fails on macOS

Author: Dave Gosselin
Author Date: 2024-03-13 13:25:50 UTC

MDEV-33652 compat/oracle.sp-inout fails on macOS

On systems where the database is running from a case-insensitive
filesystem (like APFS which is case-insensitive by default), we
discard the SP name case information. Later, if we print or
otherwise display this name to the user, it’s shown as all
lowercase, in contradiction to our documentation.

When specifying the name of a SP, we remember that name both in its
original case and in a lowercase form. We show the original case
to the user whenever it may appear in an error message or show output.
We retain the all-lowercase value for internal processing as we do today,
so internal SP lookup procedures are unaffected.

10.6 2024-03-18 15:07:32 UTC
Merge 10.5 into 10.6

Author: Marko Mäkelä
Author Date: 2024-03-18 15:07:32 UTC

Merge 10.5 into 10.6

10.6-MDEV-33542 2024-03-18 14:26:28 UTC
MDEV-33542 Inplace algorithm occupies more disk space compared to copy algor...

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2024-03-18 14:26:02 UTC

MDEV-33542 Inplace algorithm occupies more disk space compared to copy algorithm

Problem:
=======
- In case of large file size, InnoDB eagerly adds the new extent
even though there are many existing unused pages of the segment.
Reason is that in case of larger file size, threshold
(1/8 of reserved pages) for adding new extent has been
reached frequently.

Solution:
=========
- Try to utilise the unused pages in the segment before adding
the new extent in the file segment.

need_for_new_extent(): In case of larger file size, try to use
the 4 * FSP_EXTENT_SIZE as threshold to allocate the new extent.

fseg_alloc_free_page_low(): Rewrote the function to allocate
the page in the following order.
1) Try to get the page from existing segment extent.
2) Check whether the segment needs new extent
(need_for_new_extent()) and allocate the new extent,
find the page.
3) Take individual page from the unused page from
segment or tablespace.
4) Allocate a new extent and take first page from it.

Removed FSEG_FILLFACTOR, FSEG_FRAG_LIMIT variable.

bb-11.4-midenok 2024-03-18 14:02:36 UTC
MDEV-27293 Allow converting a versioned table from implicit

Author: midenok
Author Date: 2024-03-13 22:39:14 UTC

MDEV-27293 Allow converting a versioned table from implicit
           to explicit row_start/row_end columns

In case of adding both system fields of same type (length, unsigned
flag) as old implicit system fields do the rename of implicit system
fields to the ones specified in ALTER, remove SYSTEM_INVISIBLE flag in
that case. Correct PERIOD clause must be specified in ALTER as well.

bb-11.5-MDEV-30366-bulk-return 2024-03-18 13:12:54 UTC
mysqltest: support MARIADB_OPT_RESTRICTED_AUTH

Author: Sergei Golubchik
Author Date: 2024-03-15 17:42:06 UTC

mysqltest: support MARIADB_OPT_RESTRICTED_AUTH

C/C 3.4 disables mysql_old_password by default, so

add an option for the `connect` command to support specifying
allowed authentication plugins (MARIADB_OPT_RESTRICTED_AUTH).

use it to enable mysql_old_password when needed for testing

bb-11.5-wlad 2024-03-18 12:30:03 UTC
MDEV-33519 Remove WITH_SSL=<custom_location_of_openssl> option

Author: VladislavVaintroub
Author Date: 2024-03-18 12:30:03 UTC

MDEV-33519 Remove WITH_SSL=<custom_location_of_openssl> option

This commit removes the WITH_SSL=<custom_location_of_openssl> option,
leaving only -DWITH_SSL=bundled/system.

The rationale behind this removal is as follows:

1. The WITH_SSL=<custom_location_of_openssl> option is obscure
and not widely used.

2. There is no added value in this option compared to using
OPENSSL_ROOT_DIR. In fact, the availability of "helpful" MySQL options
might discourage users from exploring proper CMake options independently.

3. Users may incorrectly assume full MySQL compatibility even with this
option, including undocumented behaviors such as MySQL's preference for static libraries
with WITH_SSL=<custom_location_of_openssl>.

This change simplifies the configuration options and encourages users to
adopt more standardized and documented practices.

bb-11.2-MDEV-33525 2024-03-18 10:43:16 UTC
MDEV-33525: Recreate/reuse temporary table

Author: Dmitry Shulga
Author Date: 2024-03-18 10:43:16 UTC

MDEV-33525: Recreate/reuse temporary table

Calling a stored function that uses a cursor inside its body
could produce the error ER_NO_SUCH_TABLE on the second execution
in case the cursor uses multi-table query and one of the tables
is a temporary table just created before querying the cursor and
dropped just after the query has been executed.

The reason for issue is that re-parsing of failed a SP instruction
caused be create/drop of the temporary table used LEX object
left from previous parsing of a SP instruction's query instead
re-initialize the lex object before parsing.

To fix the issue, add initialization of lex for cursor's
statement before re-parsing the query of a failed SP instruction.

bb-10.6-bar-MDEV-33648 2024-03-18 10:13:22 UTC
Leak-proof error cleanup in Item_in_subselect::setup_mat_engine()

Author: Sergey Petrunia
Author Date: 2024-03-18 10:12:23 UTC

Leak-proof error cleanup in Item_in_subselect::setup_mat_engine()

The only pointer to allocated "engine" is in mat_engine local variable.
Free the mat_engine if we've failed to initialize it.

bb-11.5-bar-MDEV-31340 2024-03-18 09:41:32 UTC
reset cached client plugin when it's no longer needed

Author: Sergei Golubchik
Author Date: 2024-03-17 14:00:09 UTC

reset cached client plugin when it's no longer needed

it's a pointer into the net buffer, so it might be overwritten by the
next read or write. And the next plugin switch (in multi-auth) will
try to compare it (in send_plugin_request_packet) which is normally
harmless but fails the assert with Lex_ident::is_valid_ident()

bb-11.5-serg 2024-03-18 09:40:43 UTC
wsrep.wsrep_provider_plugin_defaults update to 26.4.17

Author: Sergei Golubchik
Author Date: 2024-03-17 09:41:59 UTC

wsrep.wsrep_provider_plugin_defaults update to 26.4.17

bb-11.5-password-errors 2024-03-18 09:02:30 UTC
MDEV-32218 PASSWORD_EXPIRATION_TIME column

Author: Sergei Golubchik
Author Date: 2024-03-15 21:12:30 UTC

MDEV-32218 PASSWORD_EXPIRATION_TIME column

* show it as a datetime, not number of seconds
* show all users
* show manually expired users as 0000-00-00 00:00:00
* show default expiration interval correctly
* numerous test fixes, add more tests
* fix compilation of embedded

bb-11.5-bar-MDEV-25829 2024-03-18 08:52:13 UTC
fixup MDEV-25829 step #3

Author: Sergei Golubchik
Author Date: 2024-03-16 07:58:38 UTC

fixup MDEV-25829 step #3

bb-11.4-MDEV-18478-v4-MDEV-12404 2024-03-18 08:20:53 UTC
fixup MDEV-18478 ANALYZE for statement part#2

Author: Sergei Golubchik
Author Date: 2024-03-16 19:09:00 UTC

fixup MDEV-18478 ANALYZE for statement part#2

Error:Run-Time Check Failure #3 - The variable 'r_filtered' is being used without being initialized. At :0

10.6-MDEV-33613 2024-03-18 07:20:00 UTC
squash! d45b7f665513e5a8e24799157b64caa7c5685a03

Author: Marko Mäkelä
Author Date: 2024-03-18 07:20:00 UTC

squash! d45b7f665513e5a8e24799157b64caa7c5685a03

buf_flush_LRU_list_batch(): Increment the eviction counter for blocks
of temporary, discarded or dropped tablespaces.

bb-11.5-MDEV-32188-timestamps 2024-03-18 06:32:06 UTC
fixup MDEV-33449 improving repair of tables

Author: Sergei Golubchik
Author Date: 2024-03-16 22:12:19 UTC

fixup MDEV-33449 improving repair of tables

bb-11.5-MDEV-31466 2024-03-18 03:47:30 UTC
MDEV-31466 Add optional correlation column list for derived tables

Author: Rex Johnston
Author Date: 2023-08-18 03:51:54 UTC

MDEV-31466 Add optional correlation column list for derived tables

extend Mariadb to support column name assignment in derived sytax
(some expression) [as|=] ident [(comma separated column name list)]

bb-10.4-mdev-33706 2024-03-18 02:38:07 UTC
MDEV-33494 fix spider init with no_zero_date global sql mode

Author: Yuchen Pei
Author Date: 2024-02-20 00:20:21 UTC

MDEV-33494 fix spider init with no_zero_date global sql mode

Like the fix for MDEV-32753 and MDEV-33242, spider init queries
creates new connections that use the global sql_mode of the existing
connection.

bb-10.5-mdev-33679 2024-03-18 02:20:39 UTC
MDEV-33679 Spider group by handler: skip on multiple equalities

Author: Yuchen Pei
Author Date: 2024-03-18 02:11:49 UTC

MDEV-33679 Spider group by handler: skip on multiple equalities

The spider group by handler is created in
JOIN::make_aggr_tables_info(), by which time calls to
substitute_for_best_equal_field() should have already removed all the
multiple equalities (i.e. Item_equal, with MULT_EQUAL_FUNC func_type).
Therefore, if there is still such items, it is deemed as an optimizer
bug and should be skipped.

bb-10.4-mdev-33679 2024-03-18 02:11:49 UTC
MDEV-33679 Spider group by handler: skip on multiple equalities

Author: Yuchen Pei
Author Date: 2024-03-18 02:11:49 UTC

MDEV-33679 Spider group by handler: skip on multiple equalities

The spider group by handler is created in
JOIN::make_aggr_tables_info(), by which time calls to
substitute_for_best_equal_field() should have already removed all the
multiple equalities (i.e. Item_equal, with MULT_EQUAL_FUNC func_type).
Therefore, if there is still such items, it is deemed as an optimizer
bug and should be skipped.

bb-10.4-mdev-33220 2024-03-17 23:01:37 UTC
MDEV-33220 Fix -wmaybe-uninitialized warnings

Author: Yuchen Pei
Author Date: 2024-03-17 23:01:37 UTC

MDEV-33220 Fix -wmaybe-uninitialized warnings

bb-10.6-MDEV-33668 2024-03-17 22:58:17 UTC
MDEV-33668: Remove redundant wait_for_prior_commit when applying XA PREPARE

Author: Kristian Nielsen
Author Date: 2024-03-17 22:54:23 UTC

MDEV-33668: Remove redundant wait_for_prior_commit when applying XA PREPARE

This was blocking XA PREPARE from group-committing with any prior transaction
in parallel replication, which would limit performance.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>

knielsen_xa_sched_minimal_fix 2024-03-17 22:54:23 UTC
MDEV-33668: Remove redundant wait_for_prior_commit when applying XA PREPARE

Author: Kristian Nielsen
Author Date: 2024-03-17 22:54:23 UTC

MDEV-33668: Remove redundant wait_for_prior_commit when applying XA PREPARE

This was blocking XA PREPARE from group-committing with any prior transaction
in parallel replication, which would limit performance.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>

bb-11.5-MDEV-33501-query-response-time 2024-03-17 22:39:21 UTC
MDEV-33501 Extend query_response_time plugin to be compatible with Percona se...

Author: Monty
Author Date: 2024-02-20 15:25:40 UTC

MDEV-33501 Extend query_response_time plugin to be compatible with Percona server

This is to update the plugin to be compatible with Percona's
query_response_time plugin, with some additions.
Some of the tests are taken from Percona server.

- Added plugins QUERY_RESPONSE_TIME_READ, QUERY_RESPONSE_TIME_WRITE and
  QUERY_RESPONSE_TIME_READ_WRITE.
- Added option query_response_time_session_stats, with possible values
  GLOBAL, ON or OFF, to the query_response_time plugin.

Notes:
- All modules are dependent on QUERY_RESPONSE_READ_TIME. This must always
  be enabled if any of the other modules are used.
  This will be auto-enabled in the near future.
- Accounting are done per statement. Stored functions are regarded
  as part of the original statement.
- For stored procedures the accounting are done per statement executed
  in the stored procedure. CALL will not be accounted because of this.
- FLUSH commands will not be accounted for. This is to ensure that
  FLUSH QUERY_RESPONSE_TIME is not part of the statistics.
  (This helps when testing with mtr and otherwise).

bb-11.5-MDEV-33152-index-statistics 2024-03-17 22:38:07 UTC
Optimize checking if a table is a statistics table

Author: Monty
Author Date: 2024-01-04 18:44:38 UTC

Optimize checking if a table is a statistics table

bb-11.5-MDEV-28671-deprecated-in-cmdline 2024-03-17 22:10:27 UTC
cleanup: remove convert_dash_to_underscore

Author: Sergei Golubchik
Author Date: 2024-03-12 13:08:23 UTC

cleanup: remove convert_dash_to_underscore

it was a no-op, plugin variables don't have dashes

bb-11.5-MDEV-33151-userstat 2024-03-17 21:42:39 UTC
MDEV-33151 Add more columns to TABLE_STATISTICS and USER STATS

Author: Monty
Author Date: 2023-12-31 14:32:16 UTC

MDEV-33151 Add more columns to TABLE_STATISTICS and USER STATS

Columns added to TABLE_STATISTICS
- ROWS_INSERTED, ROWS_DELETED, ROWS_UPDATED, KEY_READ_HITS and
  KEY_READ_MISSES.

Columns added to CLIENT_STATISTICS and USER_STATISTICS:
- KEY_READ_HITS and KEY_READ_MISSES.

User visible changes (except new columns):
- CLIENT_STATISTICS and USER_STATISTICS has columns KEY_READ_HITS and
  KEY_READ_MISSES added after column ROWS_UPDATED before SELECT_COMMANDS.

Other changes:
- Do not collect table statistics for system tables like index_stats
  table_stats, performance_schema, information_schema etc as the user
  has no control of these and the generate noice in the statistics.
- All row variables that are part of user_stats are moved to
  'struct rows_stats' to make it easy to clear all of them at once.
- ha_read_key_misses added to STATUS_VAR

Notes:
- userstat.result has a change of numbers of rows for handler_read_key.
  This is because use-stat-tables is now disabled for the test.

bb-11.5-MDEV-33144-slow-query-log-always-write-time 2024-03-17 21:39:58 UTC
MDEV-33144 Implement the Percona variable slow_query_log_always_write_time

Author: Monty
Author Date: 2023-12-31 10:41:25 UTC

MDEV-33144 Implement the Percona variable slow_query_log_always_write_time

This task is inspired by the Percona implementation of
slow_query_log_always_write_time.

This task implements the variable log_slow_always_query_time (name
matching other MariaDB variables using the slow query log). The
default value for the variable is 0, which makes MariaDB compatible
with older installations.

For queries with execution time longer than log_slow_always_query_time
the variables log_slow_rate_limit and log_slow_min_examined_row_limit
will not ignored and the query will be written to the slow query log
if there is no other limitations (like log_slow_filter etc).

Other things:
- long_query_time internal variable renamed to log_slow_query_time.
- More descriptive information for "log_slow_query_time".

bb-11.5-MDEV-9101-max-tmp-space-used 2024-03-17 20:33:47 UTC
fixup MDEV-9101 Limit size of created disk temporary files and tables

Author: Sergei Golubchik
Author Date: 2024-03-16 22:47:59 UTC

fixup MDEV-9101 Limit size of created disk temporary files and tables

bb-11.5-MDEV-33145-flush-global-status 2024-03-17 18:58:05 UTC
fixup MDEV-33145 Add FLUSH GLOBAL STATUS

Author: Sergei Golubchik
Author Date: 2024-03-16 12:53:05 UTC

fixup MDEV-33145 Add FLUSH GLOBAL STATUS

preview-11.5-preview 2024-03-17 16:24:33 UTC
fixup MDEV-9101 Limit size of created disk temporary files and tables

Author: Sergei Golubchik
Author Date: 2024-03-16 22:47:59 UTC

fixup MDEV-9101 Limit size of created disk temporary files and tables

bb-10.5-MDEV-22141 2024-03-15 19:04:02 UTC
MDEV-22141: JSON_REMOVE returns NULL on valid arguments

Author: Rucha Deodhar
Author Date: 2024-03-15 18:58:48 UTC

MDEV-22141: JSON_REMOVE returns NULL on valid arguments

Analysis:
When we scan json to get to a beginning according to the path, we end up
scanning json even if we have exhausted it. When eventually returns error.

Fix:
Continue scanning json only if we have not exhausted it and return result
accordingly.

bb-10.6-MDEV-28621-no-elimination 2024-03-15 18:05:05 UTC
MDEV-28621: What if we didn't eliminate subqueries?

Author: Sergey Petrunia
Author Date: 2024-03-15 18:05:05 UTC

MDEV-28621: What if we didn't eliminate subqueries?

We would just remove the items.

So far I've hit only one issue - testcase for MDEV-28617.
The issue is that if you don't have an Item pointing to the
subquery, fix_fields() won't be called at all.

However, the tables are still in the table list. And code like

INSERT INTO t1 SELECT FROM ... t1 ...

will search for the second reference to t1, and if it is in
a merged-derived will try to switch it into materialized.
However this will fail as the derived table's SELECT_LEX_UNIT is
not fixed.

10.6-MDEV-28621-no-elimination 2024-03-15 18:05:05 UTC
MDEV-28621: What if we didn't eliminate subqueries?

Author: Sergey Petrunia
Author Date: 2024-03-15 18:05:05 UTC

MDEV-28621: What if we didn't eliminate subqueries?

We would just remove the items.

So far I've hit only one issue - testcase for MDEV-28617.
The issue is that if you don't have an Item pointing to the
subquery, fix_fields() won't be called at all.

However, the tables are still in the table list. And code like

INSERT INTO t1 SELECT FROM ... t1 ...

will search for the second reference to t1, and if it is in
a merged-derived will try to switch it into materialized.
However this will fail as the derived table's SELECT_LEX_UNIT is
not fixed.

st-10.11-knielsen 2024-03-15 17:18:42 UTC
MDEV-32976: Un-deprecate MASTER_USE_GTID=Current_Pos

Author: Kristian Nielsen
Author Date: 2024-03-08 15:26:07 UTC

MDEV-32976: Un-deprecate MASTER_USE_GTID=Current_Pos

Remove incorrect deprecation.

Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>

10.11 2024-03-15 17:18:42 UTC
MDEV-32976: Un-deprecate MASTER_USE_GTID=Current_Pos

Author: Kristian Nielsen
Author Date: 2024-03-08 15:26:07 UTC

MDEV-32976: Un-deprecate MASTER_USE_GTID=Current_Pos

Remove incorrect deprecation.

Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>

bb-11.5-hints 2024-03-15 13:58:38 UTC
WIP: Parser for optimizer hints

Author: Oleg Smirnov
Author Date: 2024-03-10 10:03:04 UTC

WIP: Parser for optimizer hints

bb-10.10-MDEV-32726 2024-03-15 13:12:28 UTC
MDEV-32726: Fix failing test fir freebsd for json

Author: Rucha Deodhar
Author Date: 2023-11-10 10:31:15 UTC

MDEV-32726: Fix failing test fir freebsd for json

Json test about max statement time fails with freebsd because on some
architectures the test might execute faster and the statement may not fail.

To simulate failure regardless of architecture, introduce a wait of seconds
longer than the max_statement_time.

bb-10.5-MDEV-17943 2024-03-15 11:17:21 UTC
MDEV-17943: Unfortunate error code/message upon SET DEFAULT ROLE FOR

Author: Rucha Deodhar
Author Date: 2024-03-15 11:17:21 UTC

MDEV-17943: Unfortunate error code/message upon SET DEFAULT ROLE FOR

Analysis: Wrong error message.
Fix: Change the error message.

bb-10.5-knielsen 2024-03-15 10:34:50 UTC
Merge 10.4 to 10.5.

Author: Kristian Nielsen
Author Date: 2024-03-15 10:34:50 UTC

Merge 10.4 to 10.5.

Null-merge this patch, which was cherry-picked from 10.6 to 10.4:

commit 8b3f470c0bdf183b26cb2b06a9ae416aa7f16b04 (origin/bb-10.5-monty)
Author: Monty <monty@mariadb.org>
Date: Fri Mar 1 11:21:50 2024 +0200

    Fixed random failure in main.kill_processlist-6619

10.6-MDEV-33588 2024-03-15 09:18:51 UTC
squash! c10fd5d9797fa5d7629c0e07fe5da46f5ba5013d

Author: Marko Mäkelä
Author Date: 2024-03-15 09:18:51 UTC

squash! c10fd5d9797fa5d7629c0e07fe5da46f5ba5013d

btr_pcur_optimistic_latch_leaves(): Validate the FIL_PAGE_PREV after
acquiring a latch on the current page. The buf_block_t::modify_clock
is only being incremented when records are deleted or pages
reorganized or evicted.

bb-10.11-serg 2024-03-15 08:42:37 UTC
buildbot

Author: Sergei Golubchik
Author Date: 2024-03-15 08:42:37 UTC

buildbot

bb-10.11-release 2024-03-15 08:42:37 UTC
buildbot

Author: Sergei Golubchik
Author Date: 2024-03-15 08:42:37 UTC

buildbot

bb-10.5-mdev-33220 2024-03-15 06:18:59 UTC
MDEV-33220 Fix -wmaybe-uninitialized warnings

Author: Yuchen Pei
Author Date: 2024-03-15 06:13:21 UTC

MDEV-33220 Fix -wmaybe-uninitialized warnings

bb-10.5-ycp 2024-03-15 04:00:06 UTC
MDEV-33679 [poc] Construct queries for Item_equal in spider group by handler

Author: Yuchen Pei
Author Date: 2024-03-15 03:46:26 UTC

MDEV-33679 [poc] Construct queries for Item_equal in spider group by handler

bb-10.5-mdev-33679-print-item-equal 2024-03-15 04:00:06 UTC
MDEV-33679 [poc] Construct queries for Item_equal in spider group by handler

Author: Yuchen Pei
Author Date: 2024-03-15 03:46:26 UTC

MDEV-33679 [poc] Construct queries for Item_equal in spider group by handler

bb-11.5-opentables 2024-03-15 01:19:53 UTC
MDEV-30182: Optimize open_tables to take O(N) time

Author: Vanislavsky
Author Date: 2023-07-12 14:46:46 UTC

MDEV-30182: Optimize open_tables to take O(N) time

======
This is an adopted version of patch provided in the PR #MariaDB/2680
Original author: Sergey Vanislavskiy
Adopted by: Nikita Maliavin
======

Table opening stage was known to make two list traversals:
1. In find_fk_prelocked_table, all the query_tables list is traversed for each
foreign key of a table to open.
2. MDL_context::find_ticket traverses all mdl tickets, one ticket per table.

Both result in O(tables^2) time total.
This may dramatically increase the query latencty in the following known cases:
* updates/deletes on tables with many children
* DMLs in transactions involving many different tables

Also, it slows down the DROP DATABASE performance, with a big enough amount of
tables.

So to optimize this out the following is done:
* A hash table with all FK-prelocked tables is added to THD. A table is filled
and queried inside find_fk_prelocked_table, and cleaned up at the query end.
* The find_ticket implementation is replaced with two consecutive hash lookups.
* A hash table with all tickets for current context (Query_tables_list) is
added.
* find_fk_prelocked_table now makes a hash lookup as well. We have to calculate
a hash value for this lookup, so MDL_key is created earlier. It's then reused
if a new table list is created.

Given the requirement of no performance degradation for a small table value,
a new data structure is introduced: Open_address_hash.

Open_address_hash is a generic data structure, that is optimized for usage with
a few elements, similarly to the "short string optimization" in c++ standard
libraries: if a number of elements can fit the structure's class body inline,
then they are placed there. One bit is borrowed to indicate whether the inline
mode is used.

This also means that this optimization cannot work in 32-bit environments.

The hash table is implemented from scratch using open address hashing to reduce
memory fragmentation, reduce allocation pressure and memory footprint.

Speaking of the memory footprint, it is expected to be as follows:
* +4x pointer size for each connection (2 pointers per hash, two hashes total)
* +4x pointer size for each prepared statement, or cached/exected stored
procedure.
* If number of tables opened > 2, then +2x pointer size per table, because the
hash load factor is kept 50% at this moment
* If number of FK-prelocked tables opened > 2, then +2x pointer size per
FK-prelocked table.

st-10.4-knielsen 2024-03-14 21:48:12 UTC
MDEV-10793: MDEV-33292: main.kill_processlist-6619 fails sporadically in buil...

Author: Kristian Nielsen
Author Date: 2024-03-14 21:48:12 UTC

MDEV-10793: MDEV-33292: main.kill_processlist-6619 fails sporadically in buildbot

There were several races in the main.kill_processlist-6619 testcase:

 - Lingering connections from a previous test case could be visible in SHOW
   PROCESSLIST and cause .result diff.
 - A sync point "dispatch_command_end" was ineffective, as it was consumed at
   the end of the SET DEBUG command itself.
 - The signal from sync point "before_execute_sql_command" could override an
   earlier signal, causing DEBUG_SYNC timeout and test failure.
 - The final SHOW PROCESSLIST could occasionally see a connection in state
   "Busy" instead of the expected "Sleep".

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>

bb-10.6-release 2024-03-14 18:52:08 UTC
Merge branch '10.5' into 10.6

Author: Sergei Golubchik
Author Date: 2024-03-14 18:52:08 UTC

Merge branch '10.5' into 10.6

bb-10.6-serg 2024-03-14 18:50:10 UTC
Merge remote-tracking branch 'github/10.5' into bb-10.6-serg

Author: Sergei Golubchik
Author Date: 2024-03-14 18:50:10 UTC

Merge remote-tracking branch 'github/10.5' into bb-10.6-serg

bb-10.5-serg 2024-03-14 18:11:18 UTC
cmake: append to the array correctly

Author: Sergei Golubchik
Author Date: 2024-03-14 14:31:46 UTC

cmake: append to the array correctly

it was generating broken spec files

bb-10.6-MDEV-31949_ver0_opt 2024-03-14 16:49:52 UTC
Test fixes: rpl_parallel_xa_same_xid needs greater slave_transaction_retries

Author: Andrei
Author Date: 2024-03-14 16:49:52 UTC

Test fixes: rpl_parallel_xa_same_xid needs greater slave_transaction_retries

The reason is that in the duplicate xid case
  XAC_k(xid) -> XAP_k+i(xid)
dependency is handled with XAP's retry when the xid still in XAC's
possession.
Todo: implement a sleep interval in between of two consequent retry cycles.

bb-11.2-opentables 2024-03-14 14:46:32 UTC
adopt library

Author: Nikita Malyavin
Author Date: 2024-03-13 20:13:22 UTC

adopt library

bb-10.5-release 2024-03-14 14:31:46 UTC
cmake: append to the array correctly

Author: Sergei Golubchik
Author Date: 2024-03-14 14:31:46 UTC

cmake: append to the array correctly

it was generating broken spec files

10.6-MDEV-29445 2024-03-14 13:45:26 UTC
squash! 5704eeb9df09b12c9da3736a7e470c93aa7f0b87

Author: Marko Mäkelä
Author Date: 2024-03-14 13:45:26 UTC

squash! 5704eeb9df09b12c9da3736a7e470c93aa7f0b87

This reverts the incorrect "bool combined" part of
22e7eca3501310f800a9dbc221359472a7beca39 in buf_buddy_shrink().

buf_buddy_free_low(): Do not care about buffer pool shrinking.
This will be handled by buf_buddy_shrink() and
buf_buddy_condense_free().

buf_pool_t::contains_zip(): Added a parameter for the
number of least significant pointer bits to disregard,
so that we can find any pointers to within a block
that is supposed to be free.

buf_buddy_alloc_zip(): Assert !buf_pool.contains_zip()
when we are allocating from the binary buddy system.
Previously we were asserting this on multiple recursion levels.

buf_buddy_block_free(), buf_buddy_free_low():
Assert !buf_pool.contains_zip().

buf_buddy_alloc_from(): Remove the redundant parameter j.

buf_pool_t::resize(): Always zero out b->page.zip.data.
Failure to do so would cause crashes or corruption in
the test innodb.innodb_buffer_pool_resize due to
duplicated allocation in the buddy system.

buf_pool_t::LRU_shrink(): Check if buffer pool shrinking needs
to process a buffer page.

buf_flush_LRU_list_batch(): Add the parameter shrinking.
If we are shrinking, invoke buf_pool_t::LRU_shrink() to see
if we must keep going.

buf_do_LRU_batch(): Skip buf_free_from_unzip_LRU_list_batch()
if we are shrinking the buffer pool. In that case, we want
to minimize the page relocations and just finish as quickly
as possible.

10.6-MDEV-33672 2024-03-14 13:28:56 UTC
MDEV-33672: Gtid_log_event Construction from File Should Ensure Event Length ...

Author: Brandon Nesterenko
Author Date: 2024-03-13 20:45:31 UTC

MDEV-33672: Gtid_log_event Construction from File Should Ensure Event Length When Using Extra Flags

A GTID event can have variable length, with a contributing factor to
the variable length being the optional extra flags field. This field
is a bitmap, where each set bit indicates an additional value that
should be appended to the event, e.g. multi-engine transactions
append a number to indicate the number of additional engines a
transaction uses. However, if the extra flags bit is set, and no
additional fields are appended to the event, the server can still
try to read from memory as if it did exist (note that in debug
builds, there is a DBUG_ASSERT condition that will cause the server
to crash).

This patch fixes this to check that the length of the event is
aligned with the expectation set by the extra flags. The is_valid()
check of a Gtid event is extended to ensure that the extra_flags is
consistent with valid values, so after unmarshaling the event, it
can be verified for correctness. If found invalid, the server will
report an error about an invalid event in the binary log.

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

bb-11.5-mdev-22168 2024-03-14 11:38:59 UTC
test if the ha_partition::update_optimizer_costs is ever called.

Author: Alexey Botchkov
Author Date: 2024-03-14 11:38:59 UTC

test if the ha_partition::update_optimizer_costs is ever called.

bb-11.4-MDEV-18478-v4 2024-03-14 11:22:05 UTC
MDEV-18478: part 3: late code cleanups, no functional changes.

Author: Sergey Petrunia
Author Date: 2024-03-14 11:22:05 UTC

MDEV-18478: part 3: late code cleanups, no functional changes.

bb-10.4-MDEV-33218 2024-03-14 08:43:03 UTC
MDEV-33218: Assertion `active_arena->is_stmt_prepare_or_first_stmt_execute() ...

Author: Dmitry Shulga
Author Date: 2024-03-13 13:07:04 UTC

MDEV-33218: Assertion `active_arena->is_stmt_prepare_or_first_stmt_execute() || active_arena->state == Query_arena::STMT_SP_QUERY_ARGUMENTS' failed in st_select_lex::fix_prepare_information

In case there is a view that queried from a stored routine or
a prepared statement and this temporary table is dropped between
executions of SP/PS, then it leads to hitting an assertion
at the SELECT_LEX::fix_prepare_information. The fired assertion
 was added by the commit 85f2e4f8e8c82978bd9cc0af9bfd2b549ea04d65
(MDEV-32466: Potential memory leak on executing of create view statement).
Firing of this assertion means memory leaking on execution of SP/PS.
Moreover, if the added assert be commented out, different result sets
can be produced by the statement SELECT * FROM the hidden table.

Both hitting the assertion and different result sets have the same root
cause. This cause is usage of temporary table's metadata after the table
itself has been dropped. To fix the issue, reload the cache of stored
routines. To do it cache of stored routines is reset at the end of
execution of the function dispatch_command(). Next time any stored routine
be called it will be loaded from the table mysql.proc. This happens inside
the method Sp_handler::sp_cache_routine where loading of a stored routine
is performed in case it missed in cache. Loading is performed unconditionally
while previously it was controlled by the parameter lookup_only. By that
reason the signature of the method Sroutine_hash_entry::sp_cache_routine
was changed by removing unused parameter lookup_only.

Clearing of sp caches affects the test main.lock_sync since it forces
opening and locking the table mysql.proc but the test assumes that each
statement locks its tables once during its execution. To keep this invariant
the debug sync points with names "before_lock_tables_takes_lock" and
"after_lock_tables_takes_lock" are not activated on handling the table
mysql.proc

bb-10.5-hf 2024-03-14 07:36:28 UTC
MDEV-33393 audit plugin do not report user did the action.

Author: Alexey Botchkov
Author Date: 2024-03-07 12:02:35 UTC

MDEV-33393 audit plugin do not report user did the action.

Specific test for the auditing plugin v1 instead of the rpl_auditing
test.

bb-11.0-mdev-32609 2024-03-14 06:34:51 UTC
MDEV-32609 [poc] Implement Item_window_func::change_context_processor()

Author: Yuchen Pei
Author Date: 2024-03-14 06:34:51 UTC

MDEV-32609 [poc] Implement Item_window_func::change_context_processor()

bb-10.4-julius-galera 2024-03-14 05:00:14 UTC
galera: wsrep-lib submodule update

Author: Julius Goryavsky
Author Date: 2024-03-13 12:52:36 UTC

galera: wsrep-lib submodule update

bb-10.4-MDEV-28621 2024-03-13 22:58:38 UTC
MDEV-28621 group by optimization incorrectly removing subquery where subject ...

Author: Rex Johnston
Author Date: 2024-03-12 03:04:24 UTC

MDEV-28621 group by optimization incorrectly removing subquery where subject buried in a function

Group by optimization can sometimes remove a subquery/derived table where this
derived table doesn't directly appear in the select list, but does appear in the
arguments to a function on the select list. Under these circumstances we should
_also_ not remove the subquery associated with this group by.

bb-11.5-monty 2024-03-13 14:08:50 UTC
ALTER TABLE and replication should convert old row_end timestamps to new time...

Author: Monty
Author Date: 2023-12-19 15:51:23 UTC

ALTER TABLE and replication should convert old row_end timestamps to new timestamp range

MDEV-32188 make TIMESTAMP use whole 32-bit unsigned range

- Added --update-history option to mariadb-dump to change 2038
  row_end timestamp to 2106.
- Updated ALTER TABLE ... to convert old row_end timestamps to
  2106 timestamp for tables created before MariaDB 11.4.0.
- Fixed bug in CHECK TABLE where we wrongly suggested to USE REPAIR
  TABLE when ALTER TABLE...FORCE is needed.
- mariadb-check printed table names that where used with REPAIR TABLE but
  did not print table names used with ALTER TABLE or with name repair.
  Fixed by always printing a table that is fixed if --silent is not
  used.
- Added TABLE::vers_fix_old_timestamp() that will change max-timestamp
  for versioned tables when replication from a pre-11.4.0 server.

A few test cases changed. This is caused by:
- CHECK TABLE now prints 'Please do ALTER TABLE... instead of
  'Please do REPAIR TABLE' when there is a problem with the information
  in the .frm file (for example a very old frm file).
- mariadb-check now prints repaired table names.
- mariadb-check also now prints nicer error message in case ALTER TABLE
  is needed to repair a table.

bb-10.5-MDEV-25089-v2-galera 2024-03-13 13:18:35 UTC
MDEV-25089 : Assertion `error.len > 0' failed in wsrep_status_t galera::Repli...

Author: =?utf-8?q?Jan_Lindstr=C3=B6m?=
Author Date: 2023-11-01 09:07:16 UTC

MDEV-25089 : Assertion `error.len > 0' failed in wsrep_status_t galera::ReplicatorSMM::handle_apply_error(galera::TrxHandleSlave&, const wsrep_buf_t&, const string&)

Problem is that Galera starts TOI (total order isolation) i.e.
it sends query to all nodes. Later it is discovered that
used engine or other feature is not supported by Galera.
Because TOI is executed parallelly in all nodes appliers
could execute given TOI and ignore the error and
start inconsistency voting causing node to leave from
cluster or we might have a crash as reported.

For example SEQUENCE engine does not support GEOMETRY data
type causing either inconsistency between nodes (because
some errors are ignored on applier) or crash.

Fixed my adding new function wsrep_check_support to check
can Galera support provided CREATE TABLE/SEQUENCE before TOI is
started and if not clear error message is provided to
the user.

Currently, not supported cases:

* CREATE TABLE ... AS SELECT when streaming replication is used
* CREATE TABLE ... WITH SYSTEM VERSIONING AS SELECT
* CREATE TABLE ... ENGINE=SEQUENCE
* CREATE SEQUENCE ... ENGINE!=InnoDB
* ALTER TABLE t ... ENGINE!=InnoDB where table t is SEQUENCE

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>

bb-10.4-MDEV-21864 2024-03-13 13:01:07 UTC
MDEV-21864 Commands start-all-slaves and stop-all-slaves are not listed in my...

Author: Oleksandr "Sanja" Byelkin
Author Date: 2024-03-13 11:21:53 UTC

MDEV-21864 Commands start-all-slaves and stop-all-slaves are not listed in mysqladmin help

Added commands to the help

bb-10.5-MDEV-32787-galera 2024-03-13 12:56:06 UTC
galera: wsrep-lib submodule update

Author: Julius Goryavsky
Author Date: 2024-03-13 12:56:06 UTC

galera: wsrep-lib submodule update

bb-10.6-MDEV-32787-galera 2024-03-13 12:44:26 UTC
galera: correction after wsrep-lib submodule update

Author: Julius Goryavsky
Author Date: 2024-03-13 12:44:26 UTC

galera: correction after wsrep-lib submodule update

Correction to ensure compatibility with the updated wsrep-lib library.

bb-10.4-knielsen 2024-03-13 12:18:20 UTC
MDEV-33475: --gtid-ignore-duplicate can double-apply event in case of paralle...

Author: Kristian Nielsen
Author Date: 2024-03-08 21:18:44 UTC

MDEV-33475: --gtid-ignore-duplicate can double-apply event in case of parallel replication retry

When rolling back and retrying a transaction in parallel replication, don't
release the domain ownership (for --gtid-ignore-duplicates) as part of the
rollback. Otherwise another master connection could grab the ownership and
double-apply the transaction in parallel with the retry.

Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>

bb-11.4-MDEV-30366-bulk-results-2 2024-03-13 11:38:40 UTC
CC 3.4

Author: Oleksandr "Sanja" Byelkin
Author Date: 2024-03-13 11:38:40 UTC

CC 3.4

bb-11.4-timestamp 2024-03-13 10:16:40 UTC
Fixed typo in mariadb-install-db

Author: Monty
Author Date: 2024-02-20 13:03:31 UTC

Fixed typo in mariadb-install-db

bb-11.4-mdev12404-asserts 2024-03-13 09:15:25 UTC
MDEV-12404: Add assertions about Index Condition Pushdown use

Author: Sergey Petrunia
Author Date: 2024-03-13 08:53:31 UTC

MDEV-12404: Add assertions about Index Condition Pushdown use

Add assertions about limitations one has when using Index Condition
Pushdown:
- add handler::assert_icp_limitations()
- call this function from functions that may attempt violations.

Verified that assert_icp_limitations() as well as calls to it are
compiled away in release build.

bb-10.4-ycp 2024-03-13 06:47:00 UTC
MDEV-29363 avoid adding items with subqueries to item_equal

Author: Yuchen Pei
Author Date: 2024-03-13 06:47:00 UTC

MDEV-29363 avoid adding items with subqueries to item_equal

The optimizer constructs multiple equalities, and swap them in during
equality propagation. In doing so, it may create multiple pointers to
the same item. When the item contain subqueries, bad things can
happen. For example, in pushdown of HAVING to WHERE, if the HAVING
conditions contain multiple equalities with a const subquery, the
subquery will not be excluded from pushdown into WHERE. And if there
are multiple pointers to the same subquery, it may unfix the subquery
and destroy and rebuild its join, which could cause further
use-after-free if there are external pointers to items in the
join (e.g. tmp table fields as in the main case in MDEV-29363).

This patch also fixes cases in MDEV-32424, MDEV-32608, MDEV-32539.

bb-10.11-ycp 2024-03-13 06:43:40 UTC
MDEV-29363 avoid adding items with subqueries to item_equal

Author: Yuchen Pei
Author Date: 2024-03-13 06:43:40 UTC

MDEV-29363 avoid adding items with subqueries to item_equal

The optimizer constructs multiple equalities, and swap them in during
equality propagation. In doing so, it may create multiple pointers to
the same item. When the item contain subqueries, bad things can
happen. For example, in pushdown of HAVING to WHERE, if the HAVING
conditions contain multiple equalities with a const subquery, the
subquery will not be excluded from pushdown into WHERE. And if there
are multiple pointers to the same subquery, it may unfix the subquery
and destroy and rebuild its join, which could cause further
use-after-free if there are external pointers to items in the
join (e.g. tmp table fields as in the main case in MDEV-29363).

This patch also fixes cases in MDEV-32424, MDEV-32608, MDEV-32539.

bb-11.0-ycp 2024-03-13 06:10:58 UTC
MDEV-29363 avoid adding items with subqueries to item_equal

Author: Yuchen Pei
Author Date: 2024-03-13 05:11:28 UTC

MDEV-29363 avoid adding items with subqueries to item_equal

The optimizer constructs multiple equalities, and swap them in during
equality propagation. In doing so, it may create multiple pointers to
the same item. When the item contain subqueries, bad things can
happen. For example, in pushdown of HAVING to WHERE, if the HAVING
conditions contain multiple equalities with a const subquery, the
subquery will not be excluded from pushdown into WHERE. And if there
are multiple pointers to the same subquery, it may unfix the subquery
and destroy and rebuild its join, which could cause further
use-after-free if there are external pointers to items in the
join (e.g. tmp table fields as in the main case in MDEV-29363).

This patch also fixes cases in MDEV-32424, MDEV-32608, MDEV-32539.

bb-10.6-ycp 2024-03-13 05:46:56 UTC
MDEV-29363 avoid adding items with subqueries to item_equal

Author: Yuchen Pei
Author Date: 2024-03-13 05:11:28 UTC

MDEV-29363 avoid adding items with subqueries to item_equal

The optimizer constructs multiple equalities, and swap them in during
equality propagation. In doing so, it may create multiple pointers to
the same item. When the item contain subqueries, bad things can
happen. For example, in pushdown of HAVING to WHERE, if the HAVING
conditions contain multiple equalities with a const subquery, the
subquery will not be excluded from pushdown into WHERE. And if there
are multiple pointers to the same subquery, it may unfix the subquery
and destroy and rebuild its join, which could cause further
use-after-free if there are external pointers to items in the
join (e.g. tmp table fields as in the main case in MDEV-29363).

This patch also fixes cases in MDEV-32424, MDEV-32608, MDEV-32539.

11.5-MDEV-31466 2024-03-12 20:21:12 UTC
Merge branch '11.5' into 11.5-MDEV-31466

Author: Rex Johnston
Author Date: 2024-03-12 20:21:12 UTC

Merge branch '11.5' into 11.5-MDEV-31466

review__knielsen_xa_sched_minimal_fix 2024-03-12 19:04:34 UTC
MDEV-31949 Review/simplification over knielsen_xa_sched_minimal_fix

Author: Andrei
Author Date: 2024-03-12 19:04:34 UTC

MDEV-31949 Review/simplification over knielsen_xa_sched_minimal_fix

Use the idea of knielsen_xa_sched_minimal_fix's branch to
mingle the Round-Robin scheduling of the base, which remains intact,
with out-of-order one for XA:s that depends via their xids.

The commit is now just as a poc still sustaining
 rpl.rpl_parallel_optimistic_xa
Other tests are not checked.

bb-11.4-mdev-12404 2024-03-12 17:27:16 UTC
MDEV-12404 Index condition pushdown on partitioned tables

Author: Dave Gosselin
Author Date: 2024-01-31 16:59:21 UTC

MDEV-12404 Index condition pushdown on partitioned tables

Support index condition pushdown within partitioned tables.
- ha_partition will pass the pushed index condition into all of the used
  partitions.
  - We require that all of the partitions to handle the pushed index
    condition in the same way.
- When using ICP, one may read rows (e.g. call h->index_read_map(buf, ...)
  only to buf= table->record[0], for two reasons:
  * Pushed index condition's Item_field objects point into record[0]
  * InnoDB requires this: it calls offset() which assumes record[0].
  So, when using ICP, ha_partition will read partition records to
  table->record[0] and then will copy record away if it needs it to be
  elsewhere.

bb-10.6-monty 2024-03-12 17:00:41 UTC
MDEV-33622 Server crashes when the UPDATE statement (which has duplicate key)...

Author: Monty
Author Date: 2024-03-12 16:23:51 UTC

MDEV-33622 Server crashes when the UPDATE statement (which has duplicate key) is run after setting a low thread_stack

This was caused by wrong allocation of variable on stack.
(Was allocating 4K of data instead of 512 bytes).

No test case as the original MDEV test cases is not usable for mtr.

bb-11.5-bar-MDEV-33621 2024-03-12 05:33:20 UTC
MDEV-33621 Unify duplicate code in my_wildcmp_uca_impl() and my_wildcmp_unico...

Author: Alexander Barkov
Author Date: 2024-03-07 08:00:36 UTC

MDEV-33621 Unify duplicate code in my_wildcmp_uca_impl() and my_wildcmp_unicode_impl()

This is a refactoring patch, it does not change the behaviour.
The MTR tests are being added only to cover the LIKE predicate better.
(these tests should have been added earlier under terms of MDEV 9711).
This patch does not need its own specific MTR tests.

Moving the duplicate code into a new shared file ctype-wildcmp.inl
and including it from multiple places, to define the following functions:

- my_wildcmp_uca_impl(), in ctype-uca.c

  For utf8mb3, utf8mb4, ucs2, utf16, utf32, using cs->cset->mb_wc().
  For UCA based collations.

- my_wildcmp_mb2_or_mb4_general_ci_impl(), in ctype-ucs2.c:

  For ucs2, utf16, utf32, using cs->cset->mb_wc().
  For general_ci-style collations:
      - xxx_general_ci
      - xxx_general_mysql500_ci
      - xxx_general_nopad_ci

- my_wildcmp_mb2_or_mb4_bin_impl(), in ctype-ucs2.c:

  For ucs2, utf16, utf32, using cs->cset->mb_wc().
  For _bin collations:
      - xxx_bin
      - xxx_nopad_bin

- my_wildcmp_utf8mb3_general_ci_impl(), in ctype-utf8.c

  Optimized for utf8mb3, using my_mb_wc_utf8mb3_quick().

  For general_ci-style collations:
      - utf8mb3_general_ci
      - utf8mb3_general_mysql500_ci
      - utf8mb3_general_nopad_ci

- my_wildcmp_utf8mb4_general_ci_impl(), in ctype-utf8.c

  Optimized for utf8mb4, using my_mb_wc_utf8mb4_quick().

  For general_ci-style collations:
      - utf8mb4_general_ci
      - utf8mb4_general_nopad_ci

11.5 2024-03-12 05:33:20 UTC
MDEV-33621 Unify duplicate code in my_wildcmp_uca_impl() and my_wildcmp_unico...

Author: Alexander Barkov
Author Date: 2024-03-07 08:00:36 UTC

MDEV-33621 Unify duplicate code in my_wildcmp_uca_impl() and my_wildcmp_unicode_impl()

This is a refactoring patch, it does not change the behaviour.
The MTR tests are being added only to cover the LIKE predicate better.
(these tests should have been added earlier under terms of MDEV 9711).
This patch does not need its own specific MTR tests.

Moving the duplicate code into a new shared file ctype-wildcmp.inl
and including it from multiple places, to define the following functions:

- my_wildcmp_uca_impl(), in ctype-uca.c

  For utf8mb3, utf8mb4, ucs2, utf16, utf32, using cs->cset->mb_wc().
  For UCA based collations.

- my_wildcmp_mb2_or_mb4_general_ci_impl(), in ctype-ucs2.c:

  For ucs2, utf16, utf32, using cs->cset->mb_wc().
  For general_ci-style collations:
      - xxx_general_ci
      - xxx_general_mysql500_ci
      - xxx_general_nopad_ci

- my_wildcmp_mb2_or_mb4_bin_impl(), in ctype-ucs2.c:

  For ucs2, utf16, utf32, using cs->cset->mb_wc().
  For _bin collations:
      - xxx_bin
      - xxx_nopad_bin

- my_wildcmp_utf8mb3_general_ci_impl(), in ctype-utf8.c

  Optimized for utf8mb3, using my_mb_wc_utf8mb3_quick().

  For general_ci-style collations:
      - utf8mb3_general_ci
      - utf8mb3_general_mysql500_ci
      - utf8mb3_general_nopad_ci

- my_wildcmp_utf8mb4_general_ci_impl(), in ctype-utf8.c

  Optimized for utf8mb4, using my_mb_wc_utf8mb4_quick().

  For general_ci-style collations:
      - utf8mb4_general_ci
      - utf8mb4_general_nopad_ci

bb-11.4-mdev-33608 2024-03-12 02:09:11 UTC
MDEV-33608 Skip spider/bugfix.quick_mode_N for valgrind builds

Author: Yuchen Pei
Author Date: 2024-03-12 02:09:11 UTC

MDEV-33608 Skip spider/bugfix.quick_mode_N for valgrind builds

ASAN builds pass so it's ok

bb-11.5-mdev-31609 2024-03-11 23:30:23 UTC
MDEV-31609 Send initial values of system variables in first OK packet

Author: Yuchen Pei
Author Date: 2024-03-01 01:59:21 UTC

MDEV-31609 Send initial values of system variables in first OK packet

Values of all session tracking system variables will be sent in the
first ok packet upon connection after successful authentication.

Also updated mtr to print session track info on connection (h/t Sergei
Golubchik) so that we can write mtr tests for this change.

bb-10.6-spetrunia-tmp 2024-03-11 19:07:56 UTC
tmp

Author: Sergey Petrunia
Author Date: 2024-03-11 19:07:56 UTC

tmp

1100 of 2299 results

Other repositories

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