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

Branches

Name Last Modified Last Commit
bb-10.6-monty 2024-02-27 12:55:47 UTC
Fixed failure in test connect.drop-open-error for embedded server

Author: Monty
Author Date: 2024-02-26 12:52:38 UTC

Fixed failure in test connect.drop-open-error for embedded server

10.5-MDEV-33011 2024-02-27 12:29:20 UTC
MDEV-33011 mariabackup --backup: FATAL ERROR: ... Can't open datafile cool_do...

Author: mariadb-DebarunBanerjee
Author Date: 2024-02-27 12:29:20 UTC

MDEV-33011 mariabackup --backup: FATAL ERROR: ... Can't open datafile cool_down/t3

The root cause is the WAL logging of file operation when the actual
operation fails afterwards. It creates a situation with a log entry for
a operation that would always fail. I could simulate both the backup
scenario error and Innodb recovery failure exploiting the weakness.

We are following WAL for file rename operation and once logged the
operation must eventually complete successfully, or it is a major
catastrophe. Right now, we fail for rename and handle it as normal error
and it is the problem.

I created a patch to address RENAME operation to a non existing schema
where the destination schema directory is missing. The patch checks for
the missing schema before logging in an attempt to avoid the failure
after WAL log is written/flushed. I also checked that the schema cannot
be dropped or there cannot be any race with other rename to the same
file. This is protected by the MDL lock in SQL today.

The patch should this be a good improvement over the current situation
and solves the issue at hand.

11.4-midenok-mysqltest 2024-02-27 12:13:45 UTC
mysqltest intelligible error message about empty variable name

Author: midenok
Author Date: 2024-02-27 12:13:45 UTC

mysqltest intelligible error message about empty variable name

knielsen_xa_sched_minimal_fix 2024-02-27 11:19:18 UTC
Refactor parallel replication round-robin scheduling to use explicit FIFO

Author: Kristian Nielsen
Author Date: 2024-02-27 11:19:18 UTC

Refactor parallel replication round-robin scheduling to use explicit FIFO

When choosing the scheduling bucket for the next event group in
rpl_parallel_entry::choose_thread(), use an explicit FIFO for the
round-robin selection instead of a simple cyclic counter i := (i+1) % N.

This allows to schedule XA COMMIT/ROLLBACK dependencies explicitly without
changing the round-robin scheduling of other event groups.

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

bb-10.11-all-builders 2024-02-27 10:12:08 UTC
MDEV-33429 compilation of MariaDB 10.11.7 fails on arm32, sizeof(MYSQL) is wrong

Author: Sergei Golubchik
Author Date: 2024-02-25 18:00:48 UTC

MDEV-33429 compilation of MariaDB 10.11.7 fails on arm32, sizeof(MYSQL) is wrong

10.6 2024-02-27 09:14:28 UTC
MDEV-24671 fixup: Remove srv_max_n_threads

Author: Marko Mäkelä
Author Date: 2024-02-27 09:14:28 UTC

MDEV-24671 fixup: Remove srv_max_n_threads

The variable srv_max_n_threads lost its usefulness in
commit db006a9a43b6e68c4b92d2762043fa76b313623c (MDEV-21452)
and commit e71e6133535da8d5eab86e504f0b116a03680780 (MDEV-24671).

bb-10.11-backup 2024-02-27 09:01:48 UTC
Fixed compiler warnings

Author: Monty
Author Date: 2024-02-10 16:11:40 UTC

Fixed compiler warnings

maria-10.11-backup 2024-02-27 09:01:48 UTC
Fixed compiler warnings

Author: Monty
Author Date: 2024-02-10 16:11:40 UTC

Fixed compiler warnings

bb-10.4-julius-galera 2024-02-27 08:48:26 UTC
galera: correction after wsrep-lib update

Author: Julius Goryavsky
Author Date: 2024-02-19 17:17:36 UTC

galera: correction after wsrep-lib update

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

10.4 2024-02-27 08:48:26 UTC
galera: correction after wsrep-lib update

Author: Julius Goryavsky
Author Date: 2024-02-19 17:17:36 UTC

galera: correction after wsrep-lib update

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

bb-10.5-mdev-33220 2024-02-27 08:32:15 UTC
MDEV-33220 Fix -Wmaybe-uninitialized warnings

Author: Yuchen Pei
Author Date: 2024-02-27 08:32:15 UTC

MDEV-33220 Fix -Wmaybe-uninitialized warnings

bb-10.4-mdev32454-hf 2024-02-27 07:42:19 UTC
MDEV-32454 JSON test has problem in view protocol.

Author: Alexey Botchkov
Author Date: 2023-12-14 20:48:48 UTC

MDEV-32454 JSON test has problem in view protocol.

Few Item_func_json_xxx::fix_length_and_dec() functions fixed.

10.4-MDEV-19044 2024-02-27 07:29:46 UTC
MDEV-19044 Alter table corrupts while applying the modification log

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2024-02-26 07:10:14 UTC

MDEV-19044 Alter table corrupts while applying the modification log

Problem:
========
- InnoDB reads the length of the variable length field wrongly
while applying the modification log of instant table.

Solution:
========
rec_init_offsets_comp_ordinary(): For the temporary instant
file record, InnoDB should read the length of the variable length
field from the record itself.

bb-10.5-ycp 2024-02-27 02:31:58 UTC
MDEV-33538 make auxiliary spider plugins init depend on actual spider

Author: Yuchen Pei
Author Date: 2024-02-27 02:31:58 UTC

MDEV-33538 make auxiliary spider plugins init depend on actual spider

The two I_S plugins SPIDER_ALLOC_MEM and SPIDER_WRAPPER_PROTOCOL
only makes sense if the main SPIDER plugin is installed. Further,
SPIDER_ALLOC_MEM requires a mutex that requires SPIDER init to fill
the table.

bb-10.5-mdev-33538 2024-02-27 02:31:58 UTC
MDEV-33538 make auxiliary spider plugins init depend on actual spider

Author: Yuchen Pei
Author Date: 2024-02-27 02:31:58 UTC

MDEV-33538 make auxiliary spider plugins init depend on actual spider

The two I_S plugins SPIDER_ALLOC_MEM and SPIDER_WRAPPER_PROTOCOL
only makes sense if the main SPIDER plugin is installed. Further,
SPIDER_ALLOC_MEM requires a mutex that requires SPIDER init to fill
the table.

bb-11.4-midenok-MDEV-30973 2024-02-26 23:22:24 UTC
Emb fix

Author: midenok
Author Date: 2024-02-26 23:22:24 UTC

Emb fix

bb-10.5-mdev-30073-6 2024-02-26 21:11:39 UTC
MDEV-30073 Wrong result on 2nd execution of PS for query with NOT EXISTS

Author: Igor Babaev
Author Date: 2024-02-15 05:21:43 UTC

MDEV-30073 Wrong result on 2nd execution of PS for query with NOT EXISTS

This is a preliminary patch to check possible failures in buildbot.
Variant 6

10.6-MDEV-33546 2024-02-26 19:26:29 UTC
MDEV-33546: Rpl_semi_sync_slave_status is ON When Replication Is Not Configured

Author: Brandon Nesterenko
Author Date: 2024-02-26 19:14:07 UTC

MDEV-33546: Rpl_semi_sync_slave_status is ON When Replication Is Not Configured

If a server has a default configuration (e.g. in a my.cnf file) with
rpl_semi_sync_slave_enabled set, on server start, the corresponding
rpl_semi_sync_slave_status variable will also be ON initially, even
if the slave was never configured/started. This is because the
Repl_semi_sync_slave initialization logic (function init_object())
sets the running status to the enabled value during
init_server_components().

This patch fixes this by removing the statement which sets the
semi-sync slave running status from the initialization logic. An
additional change needed from this is to semi-sync recovery: this
status variable was used as a condition to determine binlog
truncation during server recovery. This patch also switches this
condition to reference the global rpl_semi_sync_slave_enabled
variable. Though note, the semi-sync recovery condition is to be
changed entirely with the MDEV-33424 agenda.

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

bb-10.11-monty 2024-02-26 17:45:11 UTC
Some changes to prepare for updated maria-backup

Author: Monty
Author Date: 2023-12-02 15:58:26 UTC

Some changes to prepare for updated maria-backup

- Updated prototype for is_binary_frm_header().
- Added extra argument to ma_control_file_open().
- Added ma_control_file_open_or_create() for usage by tests.
  (to make test a bit simpler).

bb-10.5-igor 2024-02-26 17:28:35 UTC
MDEV-31276 Wrong warnings on 2-nd execution of PS for query with GROUP_CONCAT

Author: Igor Babaev
Author Date: 2024-02-23 06:58:52 UTC

MDEV-31276 Wrong warnings on 2-nd execution of PS for query with GROUP_CONCAT

If a query with GROUP_CONCAT is executed then the server reports a warning
every time when the length of the result of this function exceeds the set
value of the system variable group_concat_max_len. This bug led to the set
of warnings from the second execution of the prepared statement that did
not coincide with the one from the first execution if the executed query
was a grouping query over a join of tables using GROUP_CONCAT function and
join cache was not allowed to be employed.
The descrepancy of the sets of warnings was due to lack of cleanup for
Item_func_group_concat::row_count after execution of the query.

Approved by Oleksandr Byelkin <sanja@mariadb.com>

10.5 2024-02-26 17:28:35 UTC
MDEV-31276 Wrong warnings on 2-nd execution of PS for query with GROUP_CONCAT

Author: Igor Babaev
Author Date: 2024-02-23 06:58:52 UTC

MDEV-31276 Wrong warnings on 2-nd execution of PS for query with GROUP_CONCAT

If a query with GROUP_CONCAT is executed then the server reports a warning
every time when the length of the result of this function exceeds the set
value of the system variable group_concat_max_len. This bug led to the set
of warnings from the second execution of the prepared statement that did
not coincide with the one from the first execution if the executed query
was a grouping query over a join of tables using GROUP_CONCAT function and
join cache was not allowed to be employed.
The descrepancy of the sets of warnings was due to lack of cleanup for
Item_func_group_concat::row_count after execution of the query.

Approved by Oleksandr Byelkin <sanja@mariadb.com>

bb-10.11-bar-MDEV-33442 2024-02-26 15:00:45 UTC
MDEV-33442 REPAIR TABLE corrupts UUIDs

Author: Alexander Barkov
Author Date: 2024-02-14 08:21:59 UTC

MDEV-33442 REPAIR TABLE corrupts UUIDs

Problem:
REPAIR TABLE executed for a pre-MDEV-29959 table (with the old UUID format)
updated the server version in the FRM file without rewriting the data,
so it created a new FRM for old UUIDs. After that MariaDB could not
read UUIDs correctly.

Fix:

- Adding a new virtual method in class Type_handler:

      virtual bool type_handler_for_implicit_upgrade() const;

  * For the up-to-date data types it returns "this".
  * For the data types which need to be implicitly upgraded
    during REPAIR TABLE or ALTER TABLE, it returns a pointer
    to a new replacement data type handler.

    Old VARCHAR and old UUID type handlers override this method.
    See more comments below.

- Changing the semantics of the method

    Type_handler::Column_definition_implicit_upgrade(Column_definition *c)

  to the opposite, so now:
    * c->type_handler() references the old data type (to upgrade from)
    * "this" references the new data type (to upgrade to).

  Before this change Column_definition_implicit_upgrade() was supposed
  to be called with the old data type handler (to upgrade from).

  Renaming the method to Column_definition_implicit_upgrade_to_this(),
  to avoid automatic merges in this method.

  Reflecting this change in Create_field::upgrade_data_types().

- Replacing the hard-coded data type tests inside handler::check_old_types()
  to a call for the new virtual method
  Type_handler::type_handler_for_implicit_upgrade()

- Overriding Type_handler_fbt::type_handler_for_implicit_upgrade()
  to call a new method FbtImpl::type_handler_for_implicit_upgrade().

  Reasoning:

  Type_handler_fbt is a template, so it has access only to "this".
  So in case of UUID data types, the type handler for old UUID
  knows nothing about the type handler of new UUID inside sql_type_fixedbin.h.
  So let's have Type_handler_fbt delegate type_handler_for_implicit_upgrade()
  to its Type_collection, which knows both new UUID and old UUID.

- Adding Type_collection_uuid::type_handler_for_implicit_upgrade().
  It returns a pointer to the new UUID type handler.

- Overriding Type_handler_var_string::type_handler_for_implicit_upgrade()
  to return a pointer to type_handler_varchar (true VARCHAR).

- Cleanup: these two methods:
    handler::check_old_types()
    handler::ha_check_for_upgrade()
  were always called consequently.
  So moving the call for check_old_types() inside ha_check_for_upgrade(),
  and making check_old_types() private.

- Cleanup: removing the "bool varchar" parameter from fill_alter_inplace_info(),
  as its not used any more.

10.11 2024-02-26 15:00:45 UTC
MDEV-33442 REPAIR TABLE corrupts UUIDs

Author: Alexander Barkov
Author Date: 2024-02-14 08:21:59 UTC

MDEV-33442 REPAIR TABLE corrupts UUIDs

Problem:
REPAIR TABLE executed for a pre-MDEV-29959 table (with the old UUID format)
updated the server version in the FRM file without rewriting the data,
so it created a new FRM for old UUIDs. After that MariaDB could not
read UUIDs correctly.

Fix:

- Adding a new virtual method in class Type_handler:

      virtual bool type_handler_for_implicit_upgrade() const;

  * For the up-to-date data types it returns "this".
  * For the data types which need to be implicitly upgraded
    during REPAIR TABLE or ALTER TABLE, it returns a pointer
    to a new replacement data type handler.

    Old VARCHAR and old UUID type handlers override this method.
    See more comments below.

- Changing the semantics of the method

    Type_handler::Column_definition_implicit_upgrade(Column_definition *c)

  to the opposite, so now:
    * c->type_handler() references the old data type (to upgrade from)
    * "this" references the new data type (to upgrade to).

  Before this change Column_definition_implicit_upgrade() was supposed
  to be called with the old data type handler (to upgrade from).

  Renaming the method to Column_definition_implicit_upgrade_to_this(),
  to avoid automatic merges in this method.

  Reflecting this change in Create_field::upgrade_data_types().

- Replacing the hard-coded data type tests inside handler::check_old_types()
  to a call for the new virtual method
  Type_handler::type_handler_for_implicit_upgrade()

- Overriding Type_handler_fbt::type_handler_for_implicit_upgrade()
  to call a new method FbtImpl::type_handler_for_implicit_upgrade().

  Reasoning:

  Type_handler_fbt is a template, so it has access only to "this".
  So in case of UUID data types, the type handler for old UUID
  knows nothing about the type handler of new UUID inside sql_type_fixedbin.h.
  So let's have Type_handler_fbt delegate type_handler_for_implicit_upgrade()
  to its Type_collection, which knows both new UUID and old UUID.

- Adding Type_collection_uuid::type_handler_for_implicit_upgrade().
  It returns a pointer to the new UUID type handler.

- Overriding Type_handler_var_string::type_handler_for_implicit_upgrade()
  to return a pointer to type_handler_varchar (true VARCHAR).

- Cleanup: these two methods:
    handler::check_old_types()
    handler::ha_check_for_upgrade()
  were always called consequently.
  So moving the call for check_old_types() inside ha_check_for_upgrade(),
  and making check_old_types() private.

- Cleanup: removing the "bool varchar" parameter from fill_alter_inplace_info(),
  as its not used any more.

bb-10.4-mdev-28509 2024-02-26 14:20:44 UTC
MDEV-28509 Dereferenced null pointer of type 'struct JOIN_TAB' in add_key_field

Author: Dave Gosselin
Author Date: 2023-11-30 16:18:17 UTC

MDEV-28509 Dereferenced null pointer of type 'struct JOIN_TAB' in add_key_field

This patch fixes a crash when calculating join statistics during query
optimization for queries with dangling WINDOW references. Put another way,
the system may crash when a query defines a WINDOW but doesn't then refer to
it.

Item::marker is overloaded for different uses, the most typical refer to it as
a bit field. However, the setup_group function uses it to mark that a field
was found when traversing a GROUP BY. Originally, this marking set the
Item::marker field to 1 to indicate that it was found. Later on in setup_group
(and only when SQL mode ONLY_FULL_GROUP_BY is enabled), we would skip any such
marked fields when checking that fields only referenced those found in the
GROUP BY; otherwise, it would be silly to find fields of the GROUP BY within
the GROUP BY field itself. Setting Item::marker to 1 seemed mostly harmless
at that point in time. But later, in git sha 4d143a6ff6, we introduced
several changes: (1) the value of marker in setup_group was changed from 1 to
UNDEF_POS, (2) Item::marker was changed from uint8 to int8 (which has since
been changed to an int), and (3) UNDEF_POS which is defined to be -1 was also
added.

Queries that define WINDOWs internally will setup groups and orders as part
of query processing via the setup_group function. Consequently because of
the behavior described earlier above, such queries may have items with markers
as UNDEF_POS (-1, or 0xffffffff) which is the same as marking all of the flag
bits as set. This is disastrous for those users of Item::marker which refer
to it as a bit field as some of those bits are mutually exclusive in meaning,
and in many places we don't mask the bits we're interested in, we just
compare the value of the field as a whole to some flag value with direct
comparison. In particular, the method
Item_direct_view_ref::grouping_field_transformer_for_where would
incorrectly see that the ref's marker was set for substitution when it was
actually -1, all bits set, taking the wrong execution path leading to the
crash.

Upon return from the setup_group function, we set the value of the marker
flag to zero if we set it to -1. This preserves the marker behavior for
'full group by' (if configured) while not otherwise allowing the marker
flag state to leak outside of this function.

bb-11.5-monty 2024-02-26 12:55:59 UTC
Generate a warning(note) and write to error log if master_pos_wait() fails.

Author: Monty
Author Date: 2024-02-26 10:10:08 UTC

Generate a warning(note) and write to error log if master_pos_wait() fails.

This is to make it easier to understand why master_pos_wait() fails in mtr.

knielsen_binlog_in_engine 2024-02-26 12:17:33 UTC
Binlog in Engine: Very first sketch, able to create and write an InnoDB table...

Author: Kristian Nielsen
Author Date: 2024-02-25 16:41:50 UTC

Binlog in Engine: Very first sketch, able to create and write an InnoDB tablespace

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

bb-10.4-bar-MDEV-32975 2024-02-26 11:39:13 UTC
MDEV-32975 Default charset doesn't work with PHP MySQLi extension

Author: Alexander Barkov
Author Date: 2024-01-26 09:12:03 UTC

MDEV-32975 Default charset doesn't work with PHP MySQLi extension

When sending the server default collation ID to the client
in the handshake packet, translate a 2-byte collation ID
to the ID of the default collation for the character set.

11.4 2024-02-26 11:01:38 UTC
Moved test for online alter in connect to separate test

Author: Monty
Author Date: 2024-02-26 11:01:38 UTC

Moved test for online alter in connect to separate test

This was needed as mtr --embedded connect.alter failed as online is
ignored for embedder server.
This fixes a wrong commit 30c965f8664cd0aad44847c0b99b618d385c2ffe

bb-11.4-monty 2024-02-26 11:01:38 UTC
Moved test for online alter in connect to separate test

Author: Monty
Author Date: 2024-02-26 11:01:38 UTC

Moved test for online alter in connect to separate test

This was needed as mtr --embedded connect.alter failed as online is
ignored for embedder server.
This fixes a wrong commit 30c965f8664cd0aad44847c0b99b618d385c2ffe

bb-11.4-MDEV-18478-v4 2024-02-26 08:32:38 UTC
MDEV-18478 ANALYZE for statement should show selectivity of pushed index cond...

Author: Sergey Petrunia
Author Date: 2024-02-26 08:32:38 UTC

MDEV-18478 ANALYZE for statement should show selectivity of pushed index condition

Part#2, variant 2: Make the printed r_ values in JSON output consistent.
After this patch, ANALYZE output has:

- r_index_rows (NEW) - Observed number of rows before ICP or Rowid Filtering
  checks. This is a per-scan average. like r_rows and "rows" are.

- r_rows (AS BEFORE) - Observed number of rows after ICP and Rowid Filtering.

- r_icp_filtered (NEW) - Observed selectivity of ICP condition.

- (AS BEFORE) observed selectivity of Rowid Filter is in
  $.rowid_filter.r_selectivity_pct

- r_total_filtered - Observed combined selectivity: fraction of rows left
  after applying ICP condition, Rowid Filter, and attached_condition.
  This is now comparable with "filtered" and is printed right after it.

- r_filtered (AS BEFORE) - Observed selectivity of "attached_condition".

Tabular ANALYZE output is not changed. Note that JSON's r_filtered and
r_rows have the same meanings as before and have the same meaning as in
tabular output.

bb-10.5-mdev-33539 2024-02-26 06:00:22 UTC
MDEV-33539 spider: remove some unused code in self reference checks

Author: Yuchen Pei
Author Date: 2024-02-26 04:00:54 UTC

MDEV-33539 spider: remove some unused code in self reference checks

bb-10.11-serg 2024-02-25 18:00:48 UTC
MDEV-33429 Compilation of MariaDB 10.11.7 fails on arm32, sizeof(MYSQL) is wrong

Author: Sergei Golubchik
Author Date: 2024-02-25 18:00:48 UTC

MDEV-33429 Compilation of MariaDB 10.11.7 fails on arm32, sizeof(MYSQL) is wrong

10.6-MDEV-29445 2024-02-23 15:17:16 UTC
MDEV-25340 Server startup with large innodb_buffer_pool_size takes a long time

Author: Marko Mäkelä
Author Date: 2023-08-11 14:01:57 UTC

MDEV-25340 Server startup with large innodb_buffer_pool_size takes a long time

buf_pool_t::create(), buf_pool_t::chunk_t::create(): Only initialize
the first page descriptor of each chunk.

buf_pool_t::lazy_allocate(): Lazily initialize a previously allocated
page descriptor and advance buf_pool_t::chunk_t::blocks_end until
the allocated capacity has been reached (blocks_end == blocks + size).

buf_pool_t::lazy_allocate_size(): Return the number of allocation requests
that buf_pool_t::lazy_allocate() can serve.

buf_pool_t::fully_initialized: Set if lazy_allocate_size() == 0.

Most references to chunk->size have been replaced with
chunk->blocks_end - chunk->blocks.

bb-10.5-bar-MDEV-33496 2024-02-23 14:30:06 UTC
MDEV-33496 Out of range error in AVG(YEAR(datetime)) due to a wrong data type

Author: Alexander Barkov
Author Date: 2024-02-21 07:41:50 UTC

MDEV-33496 Out of range error in AVG(YEAR(datetime)) due to a wrong data type

Functions extracting non-negative datetime components:

- YEAR(dt), EXTRACT(YEAR FROM dt)
- QUARTER(td), EXTRACT(QUARTER FROM dt)
- MONTH(dt), EXTRACT(MONTH FROM dt)
- WEEK(dt), EXTRACT(WEEK FROM dt)
- HOUR(dt),
- MINUTE(dt),
- SECOND(dt),
- MICROSECOND(dt),
- DAYOFYEAR(dt)
- EXTRACT(YEAR_MONTH FROM dt)

did not set their max_length properly, so in the DECIMAL
context they created a too small DECIMAL column, which
led to the 'Out of range value' error.

The problem is that most of these functions historically
returned the signed INT data type.

There were two simple ways to fix these functions:
1. Add +1 to max_length.
   But this would also change their size in the string context
   and create too long VARCHAR columns, with +1 excessive size.

2. Preserve max_length, but change the data type from INT to INT UNSIGNED.
   But this would break backward compatibility.
   Also, using UNSIGNED is generally not desirable,
   it's better to stay with signed when possible.

This fix implements another solution, which it makes all these functions
work well in all contexts: int, decimal, string.

Fix details:

- Adding a new special class Type_handler_long_ge0 - the data type
  handler for expressions which:
  * should look like normal signed INT
  * but which known not to return negative values
  Expressions handled by Type_handler_long_ge0 store in Item::max_length
  only the number of digits, without adding +1 for the sign.

- Fixing Item_extract to use Type_handler_long_ge0
  for non-negative datetime components:
   YEAR, YEAR_MONTH, QUARTER, MONTH, WEEK

- Adding a new abstract class Item_long_ge0_func, for functions
  returning non-negative datetime components.
  Item_long_ge0_func uses Type_handler_long_ge0 as the type handler.
  The class hierarchy now looks as follows:

Item_long_ge0_func
  Item_long_func_date_field
    Item_func_to_days
    Item_func_dayofmonth
    Item_func_dayofyear
    Item_func_quarter
    Item_func_year
  Item_long_func_time_field
    Item_func_hour
    Item_func_minute
    Item_func_second
    Item_func_microsecond

- Cleanup: EXTRACT(QUARTER FROM dt) created an excessive VARCHAR column
  in string context. Changing its length from 2 to 1.

bb-10.6-julius-galera 2024-02-23 13:33:30 UTC
galera: correction after wsrep-lib update

Author: Julius Goryavsky
Author Date: 2024-02-19 17:17:36 UTC

galera: correction after wsrep-lib update

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

10.11-MDEV-33515 2024-02-23 11:59:01 UTC
MDEV-33515 experiment: Remove log_sys.lsn_lock

Author: Marko Mäkelä
Author Date: 2024-02-23 11:59:01 UTC

MDEV-33515 experiment: Remove log_sys.lsn_lock

Let us protect log writes with an exclusive log_sys.latch
and use srw_spin_lock for it.

bb-11.4-vec-vicentiu 2024-02-23 09:46:46 UTC
Vec insert and search working on a multi-layer

Author: Vicențiu Ciorbaru
Author Date: 2024-02-23 09:46:46 UTC

Vec insert and search working on a multi-layer

bb-10.11-MDEV-32898-pkgtest 2024-02-23 08:09:14 UTC
fixup! 4d04025ef98ed82b41aecb4a17c66d96a4a65de6

Author: Marko Mäkelä
Author Date: 2024-02-23 08:09:14 UTC

fixup! 4d04025ef98ed82b41aecb4a17c66d96a4a65de6

Improve tests

bb-11.5-password-errors 2024-02-22 22:13:10 UTC
MDEV-23729 INFORMATION_SCHEMA for users locked due to max_password_errors

Author: Nikita Malyavin
Author Date: 2024-02-21 16:11:09 UTC

MDEV-23729 INFORMATION_SCHEMA for users locked due to max_password_errors

bb-10.6-serg 2024-02-22 20:02:01 UTC
MDEV-29167 new db-level SHOW CREATE ROUTINE privilege

Author: Oleksandr "Sanja" Byelkin
Author Date: 2023-09-04 11:04:06 UTC

MDEV-29167 new db-level SHOW CREATE ROUTINE privilege

reserve a bit for 11.3+ privilege, don't freak out if it is present
in privilege tables

bb-11.4-midenok-MDEV-20865 2024-02-22 13:32:03 UTC
Buffer overflow fix

Author: midenok
Author Date: 2024-02-20 18:42:48 UTC

Buffer overflow fix

FN_REFLEN does not include finalizing \0.

TODO:

There are more buffers of size FN_REFLEN. If they hold C strings meant
to be 0-terminated they are all bugs!

bb-10.6-MDEV-32898-pkgtest 2024-02-22 11:53:17 UTC
WIP fix MDEV-26643

Author: Marko Mäkelä
Author Date: 2024-02-22 11:53:17 UTC

WIP fix MDEV-26643

st-11.0-thiru 2024-02-22 07:19:39 UTC
MDEV-30655 IMPORT TABLESPACE fails with column count or index count mismatch

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2024-02-22 07:19:39 UTC

MDEV-30655 IMPORT TABLESPACE fails with column count or index count mismatch

- Merge commit ceb72cceb575266207a00b3f2b2fac56f0474f34
conflicts with 944beb9e7acd53488dbfc7edc09bf29e10ce68ab (MDEV-19506)
and fails to update the table after reloading the fts table.

11.0 2024-02-22 07:19:39 UTC
MDEV-30655 IMPORT TABLESPACE fails with column count or index count mismatch

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2024-02-22 07:19:39 UTC

MDEV-30655 IMPORT TABLESPACE fails with column count or index count mismatch

- Merge commit ceb72cceb575266207a00b3f2b2fac56f0474f34
conflicts with 944beb9e7acd53488dbfc7edc09bf29e10ce68ab (MDEV-19506)
and fails to update the table after reloading the fts table.

bb-11.4-wlad-MDEV-32841 2024-02-21 19:58:01 UTC
MDEV-32841 Add tests for new counters.

Author: VladislavVaintroub
Author Date: 2024-01-24 18:28:51 UTC

MDEV-32841 Add tests for new counters.

Only add innodb_async_reads/writes_total_count here.
For all other counters, writing reproducible tests is rather tricky.

bb-11.3-serg 2024-02-21 17:56:49 UTC
MDEV-33459 upgrades 11.X.2→11.(X+1).2

Author: Sergei Golubchik
Author Date: 2024-02-21 09:38:17 UTC

MDEV-33459 upgrades 11.X.2→11.(X+1).2

allow RPM upgrades from a different minor version,
if the major version is the same.

11.3 2024-02-21 17:56:49 UTC
MDEV-33459 upgrades 11.X.2→11.(X+1).2

Author: Sergei Golubchik
Author Date: 2024-02-21 09:38:17 UTC

MDEV-33459 upgrades 11.X.2→11.(X+1).2

allow RPM upgrades from a different minor version,
if the major version is the same.

bb-11.4-password-errors 2024-02-21 16:11:09 UTC
MDEV-23729 INFORMATION_SCHEMA for users locked due to max_password_errors

Author: Nikita Malyavin
Author Date: 2024-02-21 16:11:09 UTC

MDEV-23729 INFORMATION_SCHEMA for users locked due to max_password_errors

bb-11.4-georg 2024-02-21 15:59:50 UTC
test fixes:

Author: Georg Richter
Author Date: 2024-02-21 15:59:50 UTC

test fixes:

Since TLSv1.0 is no longer supported in C/C 3.4, TLS1.0 tests which
were expected to fail are removed.

bb-11.1-midenok 2024-02-21 12:30:38 UTC
Columnstore empty submodule fix

Author: midenok
Author Date: 2024-02-20 18:32:30 UTC

Columnstore empty submodule fix

CMake doesn't set ${PLUGIN_COLUMNSTORE} to anything.

11.0-MDEV-26603 2024-02-21 10:57:48 UTC
Merge

Author: Marko Mäkelä
Author Date: 2024-02-21 10:57:48 UTC

Merge

Unresolved conflicts: storage/innobase/os/os0file.cc
FIXME: Unchecked return value of log_write_and_flush() in
mtr_t::commit_file()

10.6-MDEV-33508 2024-02-21 09:35:06 UTC
MDEV-33508 Performance regression due to frequent scan of full buf_pool.flush...

Author: Marko Mäkelä
Author Date: 2024-02-21 09:35:06 UTC

MDEV-33508 Performance regression due to frequent scan of full buf_pool.flush_list

buf_flush_page_cleaner(): Remove a loop that had originally been added
in commit 9d1466522ea92963ac6ca16b597392714280c9f1 (MDEV-32029) and made
redundant by commit 5b53342a6a59ae1141b2a46467954fc3836f8e80 (MDEV-32588).

Starting with commit d34479dc664d4cbd4e9dad6b0f92d7c8e55595d1 (MDEV-33053)
this loop would cause a significant performance regression in workloads
where buf_pool.need_LRU_eviction() constantly holds in
buf_flush_page_cleaner().

Thanks to Steve Shaw for noticing this.

bb-10.5-mdev-33493 2024-02-21 03:18:53 UTC
MDEV-33493 Spider: Make a symlink result file a normal file

Author: Yuchen Pei
Author Date: 2024-02-21 03:17:34 UTC

MDEV-33493 Spider: Make a symlink result file a normal file

bb-11.5-mdev-31789 2024-02-21 01:19:26 UTC
MDEV-31789 Deprecate spider_casual_read

Author: Yuchen Pei
Author Date: 2024-02-21 01:19:26 UTC

MDEV-31789 Deprecate spider_casual_read

The corresponding table param was deprecated as part of MDEV-28861

11.5 2024-02-21 00:19:27 UTC
MDEV-28152 Features for sequences

Author: Yuchen Pei
Author Date: 2024-01-04 01:12:50 UTC

MDEV-28152 Features for sequences

- Add `as <int_type>` to sequence creation options
  - int_type can be signed or unsigned integer types, including
    tinyint, smallint, mediumint, int and bigint
  - Limitation: when alter sequence as <new_int_type>, cannot have any
    other alter options in the same statement
  - Limitation: increment remains signed longlong, and the hidden
    constraint (cache_size x abs(increment) < longlong_max) stays for
    unsigned types. This means for bigint unsigned, neither
    abs(increment) nor (cache_size x abs(increment)) can be between
    longlong_max and ulonglong_max
- Truncating maxvalue and minvalue from user input to the nearest max
  or min value of the type, plus or minus 1. When the truncation
  happens, a warning is emitted
- Information schema table for sequences

bb-11.5-mdev-28152 2024-02-21 00:19:27 UTC
MDEV-28152 Features for sequences

Author: Yuchen Pei
Author Date: 2024-01-04 01:12:50 UTC

MDEV-28152 Features for sequences

- Add `as <int_type>` to sequence creation options
  - int_type can be signed or unsigned integer types, including
    tinyint, smallint, mediumint, int and bigint
  - Limitation: when alter sequence as <new_int_type>, cannot have any
    other alter options in the same statement
  - Limitation: increment remains signed longlong, and the hidden
    constraint (cache_size x abs(increment) < longlong_max) stays for
    unsigned types. This means for bigint unsigned, neither
    abs(increment) nor (cache_size x abs(increment)) can be between
    longlong_max and ulonglong_max
- Truncating maxvalue and minvalue from user input to the nearest max
  or min value of the type, plus or minus 1. When the truncation
  happens, a warning is emitted
- Information schema table for sequences

bb-11.4-midenok-MDEV-20865-new 2024-02-20 18:47:46 UTC
Buffer overflow fix

Author: midenok
Author Date: 2024-02-20 18:42:48 UTC

Buffer overflow fix

FN_REFLEN does not include finalizing \0.

TODO:

There are more buffers of size FN_REFLEN. If they hold C strings meant
to be 0-terminated they are all bugs!

bb-10.4-MDEV-33218 2024-02-20 16:50:06 UTC
MDEV-33218: Assertion `active_arena->is_stmt_prepare_or_first_stmt_execute()...

Author: Dmitry Shulga
Author Date: 2024-02-20 16:50:06 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-MDEV-33500 2024-02-20 15:19:18 UTC
MDEV-33500: rpl.rpl_parallel_sbm can fail on slow machines, e.g. MSAN/Valgrin...

Author: Brandon Nesterenko
Author Date: 2024-02-20 15:16:15 UTC

MDEV-33500: rpl.rpl_parallel_sbm can fail on slow machines, e.g. MSAN/Valgrind builders

In an addition to test rpl.rpl_parallel_sbm added by MDEV-32265, the
test uses sleep statements alone to test Seconds_Behind_Master with
delayed replication. On slow running machines, the test can pass the
intended MASTER_DELAY duration and Seconds_Behind_Master can become
0, when the test expects the transaction to still be actively in a
delaying state.

This can be consistently reproduced by adding a sleep statement
before the call to

--let = query_get_value(SHOW SLAVE STATUS, Seconds_Behind_Master, 1)

to sleep past the delay end point.

This patch fixes this by locking the table which the delayed
transaction targets so Second_Behind_Master cannot be updated before
the test reads it for validation.

11.1-merge 2024-02-20 14:01:30 UTC
WIP merge 11.0 into 11.1

Author: Marko Mäkelä
Author Date: 2024-02-20 14:01:30 UTC

WIP merge 11.0 into 11.1

Failing tests: main.function_defaults main.ps mariabackup.rpl_clone_slave

bb-10.4-mutex 2024-02-20 13:18:51 UTC
Record correct mutex (LOCK_STATUS and acl_cache) order for debugging.

Author: Oleksandr "Sanja" Byelkin
Author Date: 2024-02-20 12:36:18 UTC

Record correct mutex (LOCK_STATUS and acl_cache) order for debugging.

bb-10.5-monty 2024-02-20 11:48:20 UTC
Disable error messages in mysql-install-db for not writable log directory

Author: Monty
Author Date: 2024-02-20 11:48:20 UTC

Disable error messages in mysql-install-db for not writable log directory

bb-11.4-bar-MDEV-12252 2024-02-20 09:49:54 UTC
MDEV-12252 ROW data type for stored function return values

Author: Alexander Barkov
Author Date: 2023-09-25 17:48:01 UTC

MDEV-12252 ROW data type for stored function return values

Adding support for the ROW data type in the stored function RETURNS clause:

- explicit ROW(..members...) for both sql_mode=DEFAULT and sql_mode=ORACLE

  CREATE FUNCTION f1() RETURNS ROW(a INT, b VARCHAR(32)) ...

- anchored "ROW TYPE OF [db1.]table1" declarations for sql_mode=DEFAULT

  CREATE FUNCTION f1() RETURNS ROW TYPE OF test.t1 ...

- anchored "[db1.]table1%ROWTYPE" declarations for sql_mode=ORACLE

  CREATE FUNCTION f1() RETURN test.t1%ROWTYPE ...

Adding support for anchored scalar data types in RETURNS clause:

- "TYPE OF [db1.]table1.column1" for sql_mode=DEFAULT

  CREATE FUNCTION f1() RETURNS TYPE OF test.t1.column1;

- "[db1.]table1.column1" for sql_mode=ORACLE

  CREATE FUNCTION f1() RETURN test.t1.column1%TYPE;

Details:

- Adding a new sql_mode_t parameter to
    sp_head::create()
    sp_head::sp_head()
    sp_package::create()
    sp_package::sp_package()
  to guarantee early initialization of sp_head::m_sql_mode.
  Before this change, this member was not initialized at all during
  CREATE FUNCTION/PROCEDURE/PACKAGE statements, and was not used.
  Now it needs to be initialized to write properly the
  mysql.proc.returns column, according to the create time sql_mode.

- Moving the code from the loop body in sp_rcontext::init_var_items()
  into a separate member Spvar_definition::make_item_field_row(),
  to reuse this code for variable/parameter definitions
  and for the RETURNS clause.

- Changing the data type of sp_head::m_return_field_def
  from Column_definition to Spvar_definition.
  So now it supports not only SQL column field types,
  but also explicit ROW and anchored ROW data types.

- Modifying sql_yacc.yy to support the new grammar.
  Adding new helper methods:
    * sf_return_fill_definition_row()
    * sf_return_fill_definition_rowtype_of()
    * sf_return_fill_definition_type_of()

- Fixing tests in:
  * Virtual_tmp_table::setup_field_pointers() in sql_select.cc
  * Send_field::normalize() in field.h
  to prevent calling Type_handler_row::field_type(),
  which is implemented a DBUG_ASSERT(0).
  Before this patch the affected methods were called only
  for scalar data types. Now ROW is also possible.

- Adding a new virtual method Field::cols()

- Overriding methods:
   Item_func_sp::cols()
   Item_func_sp::element_index()
   Item_func_sp::check_cols()
   Item_func_sp::bring_value()
  to support the ROW data type.

- Extending the rule sp_return_type to support
  * explicit ROW and anchored ROW data types
  * anchored scalar data types

- Overriding Field_row::sql_type() to print
  the data type of an explicit ROW.

bb-11.3-release 2024-02-20 08:32:26 UTC
Merge branch '11.3' into mariadb-11.3.2

Author: Oleksandr "Sanja" Byelkin
Author Date: 2024-02-20 08:32:26 UTC

Merge branch '11.3' into mariadb-11.3.2

bb-10.6-MDEV-32297 2024-02-20 02:00:05 UTC
MDEV-32297 pushed condition into context with empty table list crashes.

Author: Rex Johnston
Author Date: 2024-02-20 02:00:05 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.

11.5-wlad 2024-02-20 01:26:50 UTC
x

Author: VladislavVaintroub
Author Date: 2024-02-20 01:26:50 UTC

x

bb-10.6-todo-4509 2024-02-19 22:38:37 UTC
Trivial fix in my_bitmap.c

Author: Sergey Petrunia
Author Date: 2024-02-19 22:38:37 UTC

Trivial fix in my_bitmap.c

st-10.6-wlad 2024-02-19 14:35:06 UTC
MDEV-33488 Windows 11 misdetects mariadbd as LowQoS process, throttles CPU.

Author: VladislavVaintroub
Author Date: 2024-02-19 13:30:46 UTC

MDEV-33488 Windows 11 misdetects mariadbd as LowQoS process, throttles CPU.

The effect is reduced performance, at least on hybrid processor systems.

To fix, turn off throttling power explicitly at server startup.

bb-11.4-bar-MDEV-32380 2024-02-19 12:36:58 UTC
MDEV-32380 Array data type for stored routnes

Author: Alexander Barkov
Author Date: 2023-10-07 15:35:18 UTC

MDEV-32380 Array data type for stored routnes

10.6-mdev-20250-hf 2024-02-19 10:04:39 UTC
MDEV-20250

Author: Alexey Botchkov
Author Date: 2024-02-19 10:04:39 UTC

MDEV-20250

preliminary solution.

11.1-MDEV-31154 2024-02-19 06:40:32 UTC
MDEV-31154 Fatal InnoDB error or assertion `!is_v' failure upon multi-update ...

Author: mariadb-DebarunBanerjee
Author Date: 2024-02-19 06:40:32 UTC

MDEV-31154 Fatal InnoDB error or assertion `!is_v' failure upon multi-update with indexed virtual column

This is issue is about row ID filtering used with index on virtual
column(s). We hit debug assert and crash while building the record
template in Innodb. The primary reason is that we try to force the code
path to use the ICP path. With ICP, we don't support index with virtual
column and we validate it while index condition is pushed.

Simplify the code for building template to handle both ICP and Row ID
filtering by skipping virtual columns.

bb-10.6-mdev-33434 2024-02-19 04:34:35 UTC
MDEV-33434 spider direct sql: Check length before memcpy

Author: Yuchen Pei
Author Date: 2024-02-19 04:12:16 UTC

MDEV-33434 spider direct sql: Check length before memcpy

similar to MDEV-30981

bb-10.5-mdev-33434 2024-02-19 04:12:16 UTC
MDEV-33434 spider direct sql: Check length before memcpy

Author: Yuchen Pei
Author Date: 2024-02-19 04:12:16 UTC

MDEV-33434 spider direct sql: Check length before memcpy

similar to MDEV-30981

bb-11.4-bumpversion 2024-02-17 22:18:13 UTC
Merge branch 'bb-11.4-bumpversion' of github.com:MariaDB/server into bb-11.4-...

Author: Daniel Bartholomew
Author Date: 2024-02-17 22:18:13 UTC

Merge branch 'bb-11.4-bumpversion' of github.com:MariaDB/server into bb-11.4-bumpversion

bb-11.5-serg 2024-02-17 16:10:25 UTC
remove deprecated since 10.4

Author: Sergei Golubchik
Author Date: 2024-02-15 23:07:33 UTC

remove deprecated since 10.4

bb-11.4-serg 2024-02-17 14:30:50 UTC
bump the VERSION

Author: Daniel Bartholomew
Author Date: 2024-02-16 21:40:32 UTC

bump the VERSION

bb-11.3-bumpversion 2024-02-16 21:33:35 UTC
Merge branch 'bb-11.3-bumpversion' of github.com:MariaDB/server into bb-11.3-...

Author: Daniel Bartholomew
Author Date: 2024-02-16 21:33:35 UTC

Merge branch 'bb-11.3-bumpversion' of github.com:MariaDB/server into bb-11.3-bumpversion

bb-10.5-all-builders 2024-02-16 16:43:21 UTC
speed up SSL connection time by approx factor of 2, for WolfSSL.

Author: VladislavVaintroub
Author Date: 2024-02-16 12:54:47 UTC

speed up SSL connection time by approx factor of 2, for WolfSSL.

Optimize common RSA math operations (WOLFSSL_HAVE_SP_RSA),
Use intel assembly optimizations for it.

"slow" ssl tests, such as main.ssl-big and main.ssl_connect now execute
in half the time, with this patch.

10.6-MDEV-32175 2024-02-16 15:58:35 UTC
MDEV-32175 References to buf_page_t::frame may cost some performance

Author: Marko Mäkelä
Author Date: 2024-02-16 15:58:35 UTC

MDEV-32175 References to buf_page_t::frame may cost some performance

This is work in progress, for performance testing.

Based on the outcome, we might want to revert changes that cause
additional calls to page_offset() or page_align().

bb-10.5-wlad 2024-02-16 13:29:28 UTC
Speed up wolfssl connnections by approx factor of 2

Author: VladislavVaintroub
Author Date: 2024-02-16 12:54:47 UTC

Speed up wolfssl connnections by approx factor of 2

Optimize RSA math operations(with intel assembly on x64)

bb-10.4-knielsen 2024-02-16 11:48:30 UTC
MDEV-33468: Crash due to missing stack overrun check in two recursive functions

Author: Kristian Nielsen
Author Date: 2024-02-15 09:41:23 UTC

MDEV-33468: Crash due to missing stack overrun check in two recursive functions

Thanks to Yury Chaikou for finding this problem (and the fix).

Reviewed-by: Monty <monty@mariadb.org>
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>

bb-11.4-MDEV-33436 2024-02-16 10:04:19 UTC
MDEV-33436 Transform OUTER JOIN to INNER JOIN in subqueries used with IN oper...

Author: Oleg Smirnov
Author Date: 2024-02-16 07:48:26 UTC

MDEV-33436 Transform OUTER JOIN to INNER JOIN in subqueries used with IN operator

This commit adds logging of the transformations made to joins
to the optimizer trace

10.6-MDEV-31949-xlle 2024-02-15 18:48:58 UTC
Another increment to Xlle support.

Author: Andrei
Author Date: 2024-02-15 18:48:58 UTC

Another increment to Xlle support.

- xid:s of Xlle are treated as if they are XAP:s at the start of
  the (recovery) initial binlog file
- xid_cache_insert() needs an explicit "was binlogged" argument
  when xid is recovered (into prepared state)
- Xid_list_log_event::Xid_list_log_event() made to compute
  the size of the list inside the ctor's body; its
  List_log_event base is inited with zero.
  That's 'cos thd_arg may be also null and then a THD instance
  has to be dynamically created, to be passed to methods dealing
  with the list, also at time of `mysqld_server_started` is still false.

10.6-MDEV-33325 2024-02-15 16:31:04 UTC
MDEV-33325 Crash in flst_read_addr on corrupted data

Author: Marko Mäkelä
Author Date: 2024-02-15 16:31:04 UTC

MDEV-33325 Crash in flst_read_addr on corrupted data

flst_read_addr(): Remove assertions. Instead, we will check these
conditions in the callers and avoid a crash in case of corruption.
We will check the conditions more carefully, because the callers
know more exact bounds for the page numbers and the byte offsets
withing pages.

In the following functions, the assertions will be removed without
replacement: flst_insert_after(), flst_insert_before(), flst_add_last(),
flst_add_first(), flst_remove(). These functions insert or delete
items in the doubly linked list of pages. There are debug assertions
for validating the input. We may copy corrupted pointers from existing
list nodes. Corruption will be noticed when the lists are being read.

10.6-MDEV-32898 2024-02-15 13:58:53 UTC
fixup! 816019b615f1f4f832d53684bb96a0317de01fc5

Author: Marko Mäkelä
Author Date: 2024-02-15 13:58:53 UTC

fixup! 816019b615f1f4f832d53684bb96a0317de01fc5

Improve tests

bb-11.4-release 2024-02-15 12:53:21 UTC
Merge branch '11.3' into 11.4

Author: Oleksandr "Sanja" Byelkin
Author Date: 2024-02-15 12:53:21 UTC

Merge branch '11.3' into 11.4

bb-11.4-all-builders 2024-02-14 15:19:22 UTC
MDEV-31857 fix galera.MW-284

Author: Sergei Golubchik
Author Date: 2024-02-14 15:19:01 UTC

MDEV-31857 fix galera.MW-284

followup for abcd23add202

bb-10.4-midenok 2024-02-13 16:54:51 UTC
STRY52685064: make sure plugin_dir has a value (#53)

Author: Bob Dempsey
Author Date: 2021-12-02 20:11:11 UTC

STRY52685064: make sure plugin_dir has a value (#53)

bb-11.0-midenok 2024-02-13 16:54:06 UTC
MDEV-30973 Run-time configuration and fixes

Author: midenok
Author Date: 2023-10-11 15:40:40 UTC

MDEV-30973 Run-time configuration and fixes

Logging slave retries is only needed for short period of time during
measurement. Requiring server restart makes this feature inconvenient
(or impossible in some cases).

This patch provides run-time configuration which requires concurrency
protection between writing output file and switching logging off.

ConfigFactory.pm provides correctly suffixed logname for master and
slave.

FLUSH ERROR LOGS flushes slave retries log as well.

Configuration options (Global):

  log_slave_retries
  log_slave_retries_file
  log_slave_retries_max

log_slave_retries enables or disables logging of slave retries.

log_slave_retries_file specifies path to log file.
Defaults to mysqld-retries.err in the default error log location.

log_slave_retries_max specifies maximum retry attempt at which the
repeated message is printed (see below).

10.6-MDEV-33454 2024-02-13 15:17:13 UTC
MDEV-33454 release row locks for non-modified rows at XA PREPARE

Author: Marko Mäkelä
Author Date: 2024-02-13 15:17:13 UTC

MDEV-33454 release row locks for non-modified rows at XA PREPARE

From the correctness point of view, it should be safe to release
all locks on index records that were not modified by the transaction.
Doing so should make the locks after XA PREPARE fully compatible
with what would happen if the server were restarted: InnoDB table
IX locks and exclusive record locks would be resurrected based on
undo log records.

Concurrently running transactions that are waiting for a lock may invoke
lock_rec_convert_impl_to_expl() to create an explicit record lock object
on behalf of the lock-owning transaction so that they can attaching
their waiting lock request on the explicit record lock object. Explicit
locks would be released by trx_t::release_locks() during commit or
rollback.

Any clustered index record whose DB_TRX_ID belongs to a transaction that
is in active or XA PREPARE state will be implicitly locked by that
transaction. On XA PREPARE, we can release explicit exclusive locks on
records whose DB_TRX_ID does not match the current transaction identifier.

lock_rec_unlock_unmodified(): Release record locks that are not implicitly
held by the current transaction.

lock_release_on_prepare_try(), lock_release_on_prepare():
Invoke lock_rec_unlock_unmodified().

row_trx_id_offset(): Declare non-static.

lock_rec_unlock(): Replaces lock_rec_unlock_supremum().

bb-11.4-timestamp 2024-02-13 13:37:14 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.4-release 2024-02-13 08:24:32 UTC
fix view protocol in MDEV-29179

Author: Oleksandr "Sanja" Byelkin
Author Date: 2024-02-13 08:24:32 UTC

fix view protocol in MDEV-29179

bb-10.4-mdev-33441 2024-02-12 13:41:28 UTC
MDEV-33441 Do not deinit plugin variables when retry requested

Author: Yuchen Pei
Author Date: 2024-02-12 10:08:22 UTC

MDEV-33441 Do not deinit plugin variables when retry requested

After MDEV-31400, plugins are allowed to ask for retries when failing
initialisation. However, such failures also cause plugin system
variables to be deleted (plugin_variables_deinit()) before retrying
and are not re-added during retry.

We fix this by checking that if the plugin has requested a retry the
variables are not deleted. Because plugin_deinitialize() also calls
plugin_variables_deinit(), if the retry fails, the variables will
still be deleted.

Alternatives considered:

- remove the plugin_variables_deinit() from plugin_initialize() error
handling altogether. We decide to take a more conservative approach
here.

- re-add the system variables during retry. It is more complicated
than simply iterating over plugin->system_vars and call
my_hash_insert(). For example we will need to assign values to
the test_load field and extract more code from test_plugin_options(),
if that is possible.

bb-10.4-mdev-33434 2024-02-12 13:11:21 UTC
MDEV-33434 spider direct sql: Check length before memcpy

Author: Yuchen Pei
Author Date: 2024-02-12 13:11:21 UTC

MDEV-33434 spider direct sql: Check length before memcpy

similar to MDEV-30981

bb-10.6-mdev-33441 2024-02-12 10:09:02 UTC
MDEV-33441 Do not deinit plugin variables when retry requested

Author: Yuchen Pei
Author Date: 2024-02-12 10:08:22 UTC

MDEV-33441 Do not deinit plugin variables when retry requested

After MDEV-31400, plugins are allowed to ask for retries when failing
initialisation. However, such failures also cause plugin system
variables to be deleted (plugin_variables_deinit()) before retrying
and are not re-added during retry.

We fix this by checking that if the plugin has requested a retry the
variables are not deleted. Because plugin_deinitialize() also calls
plugin_variables_deinit(), if the retry fails, the variables will
still be deleted.

Alternatives considered:

- remove the plugin_variables_deinit() from plugin_initialize() error
handling altogether. We decide to take a more conservative approach
here.

- re-add the system variables during retry. It is more complicated
than simply iterating over plugin->system_vars and call
my_hash_insert(). For example we will need to assign values to
the test_load field and extract more code from test_plugin_options(),
if that is possible.

knielsen_mdev33426_11.4 2024-02-12 08:46:31 UTC
MDEV-33426: Aria temptables wrong thread-specific memory accounting in slave ...

Author: Kristian Nielsen
Author Date: 2024-02-11 10:57:42 UTC

MDEV-33426: Aria temptables wrong thread-specific memory accounting in slave thread

Aria temporary tables account allocated memory as specific to the current
THD. But this fails for slave threads, where the temporary tables need to be
detached from any specific THD.

Introduce a new flag to mark temporary tables in replication as "global",
and use that inside Aria to not account memory allocations as thread
specific for such tables.

Based on original suggestion by Monty.

Reviewed-by: Monty <monty@mariadb.org>
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>

bb-10.4-knielsen-mdev33426 2024-02-11 13:37:47 UTC
MDEV-33426: Aria temptables wrong thread-specific memory accounting in slave ...

Author: Kristian Nielsen
Author Date: 2024-02-11 10:57:42 UTC

MDEV-33426: Aria temptables wrong thread-specific memory accounting in slave thread

Aria temporary tables account allocated memory as specific to the current
THD. But this fails for slave threads, where the temporary tables need to be
detached from any specific THD.

Introduce a new flag to mark temporary tables in replication as "global",
and use that inside Aria to not account memory allocations as thread
specific for such tables.

Based on original suggestion by Monty.

Reviewed-by: Monty <monty@mariadb.org>
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>

bb-11.4-vec 2024-02-10 15:17:28 UTC
initial support for vector indexes

Author: Sergei Golubchik
Author Date: 2024-01-17 14:32:45 UTC

initial support for vector indexes

MDEV-33407 Parser support for vector indexes

The syntax is

  create table t1 (... vector index (v) ...);

limitation:
* v is a binary string and NOT NULL
* only one vector index per table
* temporary tables are not supported

MDEV-33404 Engine-independent indexes: subtable method

added support for so-called "high level indexes", they are not visible
to the storage engine, implemented on the sql level. For every such
an index in a table, say, t1, the server implicitly creates a second
table named, like, t1#i#05 (where "05" is the index number in t1).
This table has a fixed structure, no frm, not accessible directly,
doesn't go into the table cache, needs no MDLs.

MDEV-33406 basic optimizer support for k-NN searches

for a query like SELECT ... ORDER BY func() optimizer will use
item_func->part_of_sortkey() to decide what keys can be used
to resolve ORDER BY.

bb-11.4-wlad 2024-02-09 13:57:54 UTC
MDEV-33430 - Fix self-signed certificate errors on Windows

Author: VladislavVaintroub
Author Date: 2024-02-09 01:18:32 UTC

MDEV-33430 - Fix self-signed certificate errors on Windows

Adjust test after fixing the C/C.

On Windows, use --host=127.0.0.2 to fake "insecure" transport
with TCP connection for test purposes. 127.0.0.2 is loopback address,
that can be used instead of usual 127.0.0.1

Unfortunately, this technique does not work on all *nixes the same,
notably neither on BSDs nor Solaris. Thus default --host=localhost
remains "insecure" transport,when TCP is used. but it is not that critical,
the "self-signed" is not nearly as annoying on *nixes as it is on Windows.

bb-10.5-MDEV-14357 2024-02-08 20:27:55 UTC
MDEV-14357: rpl.rpl_domain_id_filter_io_crash failed in buildbot with wrong r...

Author: Brandon Nesterenko
Author Date: 2024-02-08 16:55:02 UTC

MDEV-14357: rpl.rpl_domain_id_filter_io_crash failed in buildbot with wrong result

A race condition with the SQL thread, where depending on if it was
killed before or after it had executed the fake/generated IGN_GTIDS
Gtid_list_log_event, may or may not update gtid_slave_pos with the
position of the ignored events. Then, the slave would be restarted
while resetting IGNORE_DOMAIN_IDS to be empty, which would result in
the slave requesting different starting locations, depending on
whether or not gtid_slave_pos was updated. And, because previously
ignored events could now be requested and executed (no longer
ignored), their presence would fail the test.

This patch fixes this in two ways. First, to use GTID positions for
synchronization rather than binlog file positions. Then second, to
synchronize the SQL thread’s gtid_slave_pos with the ignored events
before killing the SQL thread.

To consistently reproduce the test failure, the following patch can
be applied:

diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc
index f51f5b7deec..de62233acff 100644
--- a/sql/log_event_server.cc
+++ b/sql/log_event_server.cc
@@ -3686,6 +3686,12 @@ Gtid_list_log_event::do_apply_event(rpl_group_info *rgi)
     void *hton= NULL;
     uint32 i;

+ sleep(1);
+ if (rli->sql_driver_thd->killed || rli->abort_slave)
+ {
+ return 0;
+ }
+

1100 of 2238 results

Other repositories

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