Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View


Categories: connectors experimental galera main
Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

connectors experimental galera main
Georgi (Joro) Kodinov
MDEV-35986 - Use memory safe snprintf() in client

Replace sprintf(buf, ...) with snprintf(buf, sizeof(buf), ...),
where buf is allocated with a size known at compile time.

This makes sure we are not writing outside array/string bounds which will
lead to undefined behaviour. In case the code is trying to write outside bounds
- safe version of functions simply cut the string messages so we process this
gracefully.
Dave Gosselin
MDEV-39441: Add dbug_print() helpers for join-related types

Introduces new dbug_print() functions for the following types:
  dbug_print(NESTED_JOIN)
  dbug_print(JOIN)
  dbug_print(TABLE_LIST)
  dbug_print(JOIN_TAB)
  dbug_print(List<Item>)

Typically pointers to instances of the given types are passed.
The dbug_print(List<Item>) is intended to show result row before
sending to client (e.g., invoke in debugger while tracing end_send)
but may work in other contexts.

These functions produce nicely formatted output, please use them
in conjunction with the formatted printfs available in GDB or LLDB:
  (gdb) printf "%s", dbug_print(join_tab)
  (lldb) p printf("%s", dbug_print(table))

Example output from dbug_print(JOIN) in LLDB.  The last line with
value 1302 is the number of characters produced by the printf
command.

(lldb) p printf("%s",dbug_print(join))
JOIN [0x15801bfe8]  table_count=3  const_tables=0
join_list 0x158018340 [1 element(s)]:
--- #0 ---
  [0x15801af10] "(nest_last_join)"  join=INNER (outer_join=0)  nested_join=0x15801b618 (elements=2)
    NESTED_JOIN [0x15801b618]
      used_tables:    0x0
      not_null_tables: 0x0
      n_tables:        0
      counter:        0
      nest_type:      1 (JOIN_OP_NEST)
      nj_map:          0x0
      join_list:
        join_list 0x15801b618 [2 element(s)]:
        --- #0 ---
          [0x15801a308] "t3"  join=LEFT (outer_join=1)  map=0x4
            ON: `test`.`t2`.`a` = `test`.`t3`.`a`
        --- #1 ---
          [0x158019b30] "(nest_last_join)"  join=INNER (outer_join=0)  nested_join=0x15801a238 (elements=2)
            NESTED_JOIN [0x15801a238]
              used_tables:    0x0
              not_null_tables: 0x0
              n_tables:        0
              counter:        0
              nest_type:      0
              nj_map:          0x0
              join_list:
                join_list 0x15801a238 [2 element(s)]:
                --- #0 ---
                  [0x1580187c0] "t1"  join=RIGHT (outer_join=2)  map=0x1
                    ON: `test`.`t1`.`a` = `test`.`t2`.`a`
                --- #1 ---
                  [0x158018f08] "t2"  join=INNER (outer_join=0)  map=0x2
(int) 1302
Yuchen Pei
MDEV-39207 Fix plugin name passed to find_bookmark in test_plugin_options

Should be lowercase, just like in construct_options(). Without this
fix all plugin session vars have test_load always
false (static_unloaded).
Daniel Black
MDEV-38771 RPM conflicts between MariaDB-common and mysql-common

mysql-common and MariaDB-common don't install the same files.
mysql-common (in MySQL 8.0) installs character set files
(/usr/share/mysql/charsets/*) and /usr/lib64/mysql (directory only).

MariaDB common installs character set files in /usr/share/mariadb
and the same /usr/lib64/mysql directory along with client plugins
in /usr/lib64/mysql/plugin. The RPM rules of conflict
only will cause troubles on directories if they are installed with
different metatadata (selinux, ownership, permissions) which isn't
the case.

As the character sets are at a different location MariaDB-common
isn't obsoleting mysql-common in a way that provides compatibilty
with mysql-common, for mysql-libs or otherwise, so its just creating
an install conflict.

Users installing perl-DBD-MySQL notice this because its mysql-libs
dependency pulls mysql-common, which conflicts with MariaDB-common.

We correct by removing the conflict and the provides of MariaDB-common
with resepect to mysql-common.
Sergei Golubchik
MDEV-39301: fix main.xa - Timeout in wait_until_count_sessions.inc

Backport from 11.8 aa2ac3078fa99c7cf712c29023c48ffe68677e10
Abhishek Bansal
MDEV-34079: ST_AsGeoJSON returns incorrect value for empty geometry

ST_AsGeoJSON stripped the first '[' bracket when serializing an EMPTY
GeometryCollection, outputting '{"type": "GeometryCollection",
"geometries":]}'.

This occurred because several Gis_*::get_data_as_json functions
unconditionally truncated the last 2 characters of their String buffer
to remove the trailing ', ' appended inside their element loops. For
empty collections, the loop doesn't execute and there is no trailing
comma, causing the truncate to strip the initial '[' bracket.

Fixed by checking if the last character in the buffer is ' ' before
truncating.
Michal Schorm
MDEV-39278 Validate .cfg file parser string lengths in InnoDB import

Replace overly permissive or missing length limits in the .cfg
metadata file parser (used by ALTER TABLE ... IMPORT TABLESPACE)
with correct constants:

- Field/index/column names: NAME_LEN + 1 (193 bytes including
  NUL), matching the maximum identifier length defined in
  mysql_com.h. Replaces the hardcoded 128 for columns (with
  FIXME) and OS_FILE_MAX_PATH (4000) for index names. Adds
  missing validation for field names.
- Hostname: HOSTNAME_LENGTH + 1 (256), consistent with
  MariaDB's own hostname limit defined in mysql_com.h.
  RFC 1035 defines the textual DNS name limit as 253
  characters (254 with NUL), but HOSTNAME_LENGTH (255) is
  based on the RFC 1034 wire-format limit of 255 octets.
  Using HOSTNAME_LENGTH avoids rejecting .cfg files exported
  from servers with valid 254-255 character hostnames.
- Table name: MAX_FULL_NAME_LEN + 1 (655 bytes including NUL),
  since the .cfg file stores the full db/table name (written
  by row0quiesce.cc as table->name.m_name).

Without these checks, a crafted .cfg file could specify lengths
up to 2^32 via the 4-byte mach_read_from_4() length prefix,
causing excessive memory allocation.

Use ib_senderrf() instead of ib_errf() for reporting validation
failures. ib_errf() pre-formats its message into a single string
and passes it to ib_senderrf(), but ER_IO_READ_ERROR expects
three arguments (%lu, %s, %s). Using ib_senderrf() directly
with the correct arguments avoids this format mismatch.
The pre-existing column name check had the same ib_errf() misuse
and is corrected here as well.

The test covers hostname and table name length validation.
Column name, index name, and field name length validation
are not tested because their offsets are deep in the .cfg
binary format and would require walking past variable-length
sections (autoinc, page size, flags, column/index metadata).

Co-Authored-By: Claude AI <[email protected]>
Marko Mäkelä
MDEV-34482 merge fixup: unstable test case

This fixes up the merge 7c5cac0d515b629df4e17833eac8d258eecd3900
that included b09ce6268aaa63cfe28e2df4905f9bbab7e345c4
whose test is occasionally failing when a non-existing event
is being dropped.

This is as backport of e47db94aea7f0d6e0177e948486fc8860331f05f
Monty
Cleanup memory from OpenSSL at exit.

This removes warnings about not freed memory when using valgrind
Marko Mäkelä
MDEV-16926 fixup: GCC 16 -Wmaybe-uninitialized

Year::year_precision(): Make static, so that VYear::VYear
and VYear_op::VYear_op() will avoid invoking this function with
an unnecessary "this" pointer to an uninitialized object.
Yuchen Pei
Merge branch '10.11' into 11.4
Daniel Black
Bump columnstore engine submodule
Sergei Petrunia
Fix in condition pushdown code: don't pass List<Field_pair> by value.

Affected functions:
  find_matching_field_pair(Item *item, List<Field_pair> pair_list)
  get_corresponding_field_pair(Item *item, List<Field_pair> pair_list)

Both only traverse the pair_list.
They use List_iterator so we can't easily switch to using const-reference.
Marko Mäkelä
MDEV-37058: Assertion failure after change buffer upgrade

log_t::clear_mmap(): Relax a debug assertion that was verified to fail
when upgrading from MariaDB Server 10.6:

mysql-test/mtr main.1st
/path/to/11.4/mariadbd --datadir "$(pwd)"/mysql-test/var/mysqld.1/data

Tested by: Matthias Leich using the test by Elena Stepanova
Reviewed by: Thirunarayanan Balathandayuthapani
Mohammad Tafzeel Shams
MDEV-22186: Add innodb_buffer_pool_in_core_dump to exclude InnoDB buffer pool from cores

Problem:
There is no control to include or exclude large InnoDB buffer pool from
core files, which can lead to unnecessarily large core dumps or prevent
capturing useful memory state.

Solution:
Introduce a new global dynamic system variable innodb_buffer_pool_in_core_dump
that allows excluding InnoDB buffer pool from core dumps using MADV_DONTDUMP
where supported. When enabled the server marks relevant memory regions to be
omitted from core files. The madvise state is dynamically updated when the
variable changes.

This variable is only available on Linux & FreeBSD.

Additionally, a test helper script is introduced to inspect
/proc/<pid>/smaps and verify whether large memory regions are marked
for trimming.

- innodb_buffer_pool_in_core_dump
  Global boolean system variable controlling whether InnoDB buffer
  pool should be excluded from core dumps.
  Default: OFF on non-debug builds with MADV_DONTDUMP support,
  ON otherwise.

- innodb_buffer_pool_in_core_dump_update()
  Update hook that sets innodb_buffer_pool_in_core_dump and triggers runtime
  updates of madvise state for the buffer pool.

- buf_pool_t::in_core_dump
  Variable backing @@innodb_buffer_pool_in_core_dump.

- buf_pool_t::core_advise()
  Advises MADV_DONTDUMP or MADV_DODUMP according to latest
  innodb_buffer_pool_in_core_dump value.

- buf_pool_t::create()
  Updates madvise flag to the buffer pool memory based on
  innodb_buffer_pool_in_core_dump.
  Also moves the mutex initialization at the beginiing of function.

- buf_pool_t::resize()
  Updates the madvise flag for buffer pool to keep it in sync with
  the innodb_buffer_pool_in_core_dump.

- check_core_dump_trim.inc
  Test helper that inspects /proc/<pid>/smaps to detect memory regions
  with the dd VmFlag and determine whether the core file is expected
  to be trimmed based on buffer pool and log buffer sizes.
Sergei Petrunia
Derived Condition Pushdown: add more comments.

Add comments to
- find_producing_item()
- Item_field::derived_field_transformer_for_where()
- Item_field::grouping_field_transformer_for_where()

Also note that Item_default_value::grouping_field_transformer_for_where()
is not implemented.
Daniel Black
MDEV-39207: Fix plugin name passed to find_bookmark in test_plugin_options (test postfix)

Under cursor/ps-protocol(Debug buidl) the UNINSTALL SONAME
in the cleanup could generate WARN_PLUGIN_BUSY during shutdown.

Disable the cursor and ps-protocol around the
disconnect and uninstall soname to resolve the test failure.

Concept/Review/Testing with: Yuchen Pei
Thirunarayanan Balathandayuthapani
MDEV-39081 InnoDB: tried to purge non-delete-marked record, assertion fails in row_purge_del_mark_error

Reason:
=======
Following the changes in MDEV-38734, the server no longer marks
all indexed virtual columns during an UPDATE operation.
Consequently, ha_innobase::update() populates the upd_t vector
with old_vrow but omits the actual data for these virtual columns.

Despite this omission, trx_undo_page_report_modify() continues to
write metadata for indexed virtual columns into the undo log. Because
the actual values are missing from the update vector, the undo log
entry is recorded without the historical data for these columns.

When the purge thread processes the undo log to reconstruct a
previous record state for MVCC, it identifies an indexed virtual
column but finds no associated data.

The purge thread incorrectly interprets this missing data as a NULL
value, rather than a "missing/unrecorded" value. The historical
record is reconstructed with an incorrect NULL for the virtual column.
This causes the purge thread to incorrectly identify and purge
records that are not actually delete-marked, leading to abort
of server.

Solution:
=========
ha_innobase::column_bitmaps_signal(): Revert the column-marking
logic to the state prior to commit a4e4a56720c, ensuring all
indexed virtual columns are unconditionally marked during an UPDATE.

The previous "optimization" attempted to manually detect indexed
column changes before marking virtual columns. The manual check
for indexed column modifications is redundant. InnoDB already
provides the UPD_NODE_NO_ORD_CHANGE flag within row_upd_step().
This flag is being used in trx_undo_page_report_modify() and
trx_undo_read_undo_rec() should log or read virtual column values.

Refactored column_bitmaps_signal() to accept a mark_for_update
parameter that controls when indexed virtual columns are marked.
TABLE::mark_columns_needed_for_update() is the only place that needs
mark_for_update=true because only UPDATE operations need to mark
indexed virtual columns for InnoDB's undo logging mechanism.

INSERT operation is already handled by
TABLE::mark_virtual_columns_for_write(insert_fl=true).
Even the commit a4e4a56720c974b547d4e469a8c54510318bc2c9 changes are
going to affect TABLE::mark_virtual_column_for_write(false) and
It is called during UPDATE operation, and that's when
column_bitmaps_signal() needs to mark  indexed virtual columns.

Online DDL has separate code path which is handled by
row_log_mark_virtual_cols() for all DML operations
Rucha Deodhar
MDEV-39212: JSON_MERGE_PATCH depth crash

Analysis:
The crash happens because we run out of stack space

Fix:
Add a stack overflow check.
Rex Johnston
MDEV-29360 Crash when pushing condition with always false IS NULL into derived

(Edited by Sergei Petrunia)

Problem: when the optimizer attempts to push a condition in form
"merged_view.not_null_column IS NULL" into a derived table other
than the merged_view itself, it may crash.

The cause is this scenario:
1. Condition pushdown code uses walk() with excl_dep_on_grouping_fields()
(or excl_dep_on_table()) to determine whether an Item expression can
be pushed. Item_args::excl_dep_on_table() assumes that any item with
const_item()==1 can be pushed anywhere.

2. Item_func_isnull(not_null_expr) will report const_item()=1 as it
will always evaluate false. However it will have non-const expression
as its argument. As described in #1, this item will be considered pushable.

3. Transformation of item for pushdown is done in "transformer function"
Item_XXX::{derived|grouping}_field_transformer_for_where().
This function will be called for Item_func_isnull's argument.
If the argument is an Item_direct_view_ref, its transformer function
will call find_matching_field_pair() (or find_producing_item())
to locate the origin of the item inside the SELECT we're pushing the
condition into. It will get a NULL pointer (origin not found) and crash.


== The fix ==
Let Item_func_is_null(not_null_expr) report const_item()==true but
let its used_tables() still report those from not_null_expr.

Then, in Item_args, make excl_dep_on_grouping_fields() and
excl_dep_on_table() to check the used tables/columns for items
that report const_item()==true but have non-zero used_tables().
Marko Mäkelä
Merge 10.11 into 11.4
ParadoxV5
Fix `$target_temp_format` in `rpl.rpl_typeconv`

The MTR snippet `suite/rpl/include/check_type.inc`
was setting `@@GLOBAL.mysql56_temporal_format` with the wrong variable.
Daniel Black
MDEV-39015 Debian - columnstore boost deps 1.88+

Columnstore 23.10, the version in MariaDB-server-11.4+
is strictly dependant on a 1.88+ boost version.

As such remove the libboost-[^d]* dependencies of
columnstore until such Debian/Ubuntu version support this.

libboost-dev is still needed for oqgraph

These version are:
* forky/sid
* questing/resolute

The debian/control always contains the version that
would compile on debian/sid. The debian/autobake-deb.sh
adjusts the control file on earlier distros to
remove the dependencies.
Michal Schorm
MDEV-14373: Reject incompatible PLUGIN_xxx build mode at configure time

When a user sets -DPLUGIN_PARTITION=DYNAMIC or
-DPLUGIN_PERFSCHEMA=DYNAMIC, these plugins are declared
STATIC_ONLY in their CMakeLists.txt. Previously, the
MYSQL_ADD_PLUGIN macro would silently skip building such
plugins: the STATIC branch wouldn't match (because the user
requested DYNAMIC), and the DYNAMIC branch would be blocked
by ARG_STATIC_ONLY. The plugin was simply not built.

This caused confusing downstream compile errors in other
plugins that depended on the missing one:

  - PLUGIN_PARTITION=DYNAMIC -> CONNECT fails:
    'struct TABLE_SHARE' has no member named
    'partition_info_str_len'
    'struct TABLE' has no member named 'part_info'

  - PLUGIN_PERFSCHEMA=DYNAMIC -> MariaBackup fails:
    'MY_WME' was not declared in this scope
    'my_read' was not declared in this scope
    'MY_FILE_ERROR' was not declared in this scope

  - PLUGIN_ARIA=DYNAMIC -> Spider fails:
    'MARIA_COLUMNDEF' has not been declared
    (Note: Aria is now MANDATORY and already overrides
    user input; this was likely reproducible in older
    versions where Aria was DEFAULT)

Root cause: The MYSQL_ADD_PLUGIN macro in
cmake/plugin.cmake did not validate that the
user-requested build mode (STATIC or DYNAMIC) was
compatible with the plugin's declared capabilities
(STATIC_ONLY or MODULE_ONLY).

Fix: Add validation immediately after the existing
PLUGIN_xxx value check. If DYNAMIC is requested for a
STATIC_ONLY plugin, or STATIC is requested for a
MODULE_ONLY plugin, emit a FATAL_ERROR with a clear
message telling the user which option to use instead.

Non-MANDATORY plugins with STATIC_ONLY (the new check
catches -DPLUGIN_xxx=DYNAMIC for these):
  - partition (sql/CMakeLists.txt)
  - perfschema (storage/perfschema/CMakeLists.txt)
  - thread_pool_info (sql/CMakeLists.txt)

Conditionally STATIC_ONLY (platform/config-dependent):
  - feedback (only on Windows)

The MANDATORY + STATIC_ONLY plugin sql_sequence is
unaffected: the MANDATORY flag overrides user input to
YES before the new check runs.

MODULE_ONLY plugins (the new check catches
-DPLUGIN_xxx=STATIC for these) include all dynamically-
loaded plugins: federated, spider, rocksdb, mroonga,
oqgraph, example, and ~25 others under plugin/ and
storage/.

The YES and AUTO modes are unaffected since they already
gracefully fall through to whichever mode the plugin
supports.

Co-Authored-By: Claude AI <[email protected]>
Daniel Black
oqgraph: remove openquery.com refs and broken LP links

As requested by Arjen, openquery.com former OQ owner,
the domain is no longer existing and neither is the
launchpad project. There isn't a company that does
support/engineering, so remove those references too.
Yuchen Pei
MDEV-39217 Fix the hash key calculation in session sysvar tracker

MDEV-31751 changed the key from the sys_var pointer to its offset.
This was useful for non-plugin variable aliases, but not so much for
plugin variables which all have offset 0.
Michal Schorm
MDEV-18359, MDEV-26905: Fix invalid XML in charsets Index.xml

Summary:
The charset definition files sql/share/charsets/Index.xml and
mysql-test/std_data/ldml/Index.xml contained duplicate "flag" attributes
on single <collation> elements, violating XML well-formedness rules.
Standard XML parsers (xmllint, libxml2, etc.) reject duplicate attributes,
making these files unparseable by any spec-compliant tool.

Root Cause:
When nopad_bin collations were added, their flags were specified as
XML attributes: flag="binary" flag="nopad". The XML specification
(Section 3.1, Well-Formedness Constraint: Unique Att Spec) prohibits
duplicate attribute names on a single element. MariaDB's custom XML
parser in strings/xml.c happened to process both duplicates because
it handles attributes sequentially in a while loop, but this is
non-standard behavior that breaks interoperability with standard
XML tooling.

What the patch does:
Converts all 24 occurrences of duplicate flag attributes from
self-closing elements with duplicate attributes to elements with
child <flag> nodes. This follows the existing pattern already used
by many collations in the same file (e.g., big5_chinese_ci,
latin1_swedish_ci, utf8mb3_general_ci).

Before (invalid XML):
  <collation name="latin2_nopad_bin" id="1101" flag="binary" flag="nopad"/>

After (valid XML):
  <collation name="latin2_nopad_bin" id="1101">
    <flag>binary</flag>
    <flag>nopad</flag>
  </collation>

No C code changes are required. The _CS_FLAG handler in
strings/ctype.c (around line 621) already processes <flag> child
elements using bitwise OR (|=) to accumulate flags, so both "binary"
(MY_CS_BINSORT) and "nopad" (MY_CS_NOPAD) flags are correctly applied.

Files modified:
- sql/share/charsets/Index.xml (23 collations fixed)
- mysql-test/std_data/ldml/Index.xml (1 collation fixed)

Complete list of 24 collations fixed:

sql/share/charsets/Index.xml:
1. latin2_nopad_bin    (id=1101)
2. dec8_nopad_bin      (id=1093)
3. cp850_nopad_bin      (id=1104)
4. hp8_nopad_bin        (id=1096)
5. koi8r_nopad_bin      (id=1098)
6. swe7_nopad_bin      (id=1106)
7. ascii_nopad_bin      (id=1089)
8. cp1251_nopad_bin    (id=1074)
9. hebrew_nopad_bin    (id=1095)
10. latin7_nopad_bin    (id=1103)
11. koi8u_nopad_bin      (id=1099)
12. greek_nopad_bin      (id=1094)
13. cp1250_nopad_bin    (id=1090)
14. cp1257_nopad_bin    (id=1082)
15. latin5_nopad_bin    (id=1102)
16. armscii8_nopad_bin  (id=1088)
17. cp866_nopad_bin      (id=1092)
18. keybcs2_nopad_bin    (id=1097)
19. macce_nopad_bin      (id=1067)
20. macroman_nopad_bin  (id=1077)
21. cp852_nopad_bin      (id=1105)
22. cp1256_nopad_bin    (id=1091)
23. geostd8_nopad_bin    (id=1117)

mysql-test/std_data/ldml/Index.xml:
24. ascii2_nopad_bin    (id=325)

Validation:
- xmllint --noout passes cleanly on both files after the fix
- Zero duplicate flag attributes remain (verified with grep)
- The fix is consistent with the existing pattern used by other
  collations in the same files

Co-Authored-By: Claude AI <[email protected]>
Dave Gosselin
MDEV-39441: Add dbug_print() helpers for join-related types

Introduces new dbug_print() functions for the following types:
  dbug_print(NESTED_JOIN)
  dbug_print(JOIN)
  dbug_print(TABLE_LIST)
  dbug_print(JOIN_TAB)
  dbug_print(List<Item>)

Typically pointers to instances of the given types are passed.
The dbug_print(List<Item>) is intended to show result row before
sending to client (e.g., invoke in debugger while tracing end_send)
but may work in other contexts.

These functions produce nicely formatted output, please use them
in conjunction with the formatted printfs available in GDB or LLDB:
  (gdb) printf "%s", dbug_print(join_tab)
  (lldb) p printf("%s", dbug_print(table))

Example output from dbug_print(JOIN) in LLDB.  The last line with
value 1302 is the number of characters produced by the printf
command.

(lldb) p printf("%s",dbug_print(join))
JOIN [0x15801bfe8]  table_count=3  const_tables=0
join_list 0x158018340 [1 element(s)]:
--- #0 ---
  [0x15801af10] "(nest_last_join)"  join=INNER (outer_join=0)  nested_join=0x15801b618 (elements=2)
    NESTED_JOIN [0x15801b618]
      used_tables:    0x0
      not_null_tables: 0x0
      n_tables:        0
      counter:        0
      nest_type:      1 (JOIN_OP_NEST)
      nj_map:          0x0
      join_list:
        join_list 0x15801b618 [2 element(s)]:
        --- #0 ---
          [0x15801a308] "t3"  join=LEFT (outer_join=1)  map=0x4
            ON: `test`.`t2`.`a` = `test`.`t3`.`a`
        --- #1 ---
          [0x158019b30] "(nest_last_join)"  join=INNER (outer_join=0)  nested_join=0x15801a238 (elements=2)
            NESTED_JOIN [0x15801a238]
              used_tables:    0x0
              not_null_tables: 0x0
              n_tables:        0
              counter:        0
              nest_type:      0
              nj_map:          0x0
              join_list:
                join_list 0x15801a238 [2 element(s)]:
                --- #0 ---
                  [0x1580187c0] "t1"  join=RIGHT (outer_join=2)  map=0x1
                    ON: `test`.`t1`.`a` = `test`.`t2`.`a`
                --- #1 ---
                  [0x158018f08] "t2"  join=INNER (outer_join=0)  map=0x2
(int) 1302
HNOONa-0
MDEV-39043: String '0' sets the ENUM to an empty string
This fixes the string evaluation logic for ENUM types
so the literal string '0' is treated as index 0
Daniel Black
MDEV-39015 Debian - remove libboost-date-time-dev dependency

In Debian Bullseye + Ubuntu 22.04 the libboost-date-time
library (1.74 boost version) has been a dummy stub.

The header files for boost-date-time are in the libboost-dev
package.
Fariha Shaikh
MDEV-39028 DROP PARTITION, CONVERT OUT require both ALTER and DROP privileges

ALTER TABLE ... DROP PARTITION requires both ALTER and DROP privileges,
which is inconsistent with TRUNCATE PARTITION that only requires DROP.
This prevents fine-grained privilege separation since users who need to
drop partitions must also be granted ALTER, allowing them to perform
any other DDL changes on the table.

Change DROP PARTITION to require only DROP privilege, consistent with
TRUNCATE PARTITION. Users allowed to drop the table should also be
allowed to drop partitions without needing ALTER rights.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
Marko Mäkelä
MDEV-39303: Skip ibuf_upgrade() if innodb_force_recovery=6

ibuf_upgrade_needed(): Pretend that no upgrade is needed when
innodb_force_recovery=6.

srv_load_tables(): Test the least likely condition first.

srv_start(): Remove a message that is duplicating one at the start
of recv_recovery_from_checkpoint_start().

This was tested by starting up a server on an empty data directory
that had been created by MariaDB Server 10.6.

Reviewed by: Thirunarayanan Balathandayuthapani
Marko Mäkelä
Merge 10.6 into 10.11
Daniel Black
MDEV-39157 BUILD_TYPE=mysql_release to remove compile flags

BUILD_TYPE=mysql_release changes a bunch of build flags on Linux/UNIX
systems and our CI processes insufficiently test the impacts of these.

This effectively drops the gcc/clang optimization from O3 of a
release down to O2. The performance gains of O3 vs O2 are currently
insufficiently tested (MDEV-19734 is outstanding).

What is clear is amd64v3 is providing the ability of enhanced MMX
instructions which causes segfaults on unaligned addresses
(MDEV-38989 and others). As compilers get smarter and O3 provides
more transforms is safer if the CMAKE_BUILD_TYPE=RelWithDebInfo
experiences of CI have identical compile flags, with BUILD_TYPE=mysql_release
changing to present required features only.

This resolves MDEV-35809 by removing the specialized optimization
for platforms that are unsupported or unmaintained per PR #3744
comments.
Oleksandr Byelkin
MDEV-39287 (11.4 part) Fix compilation problems with glibc 2.43/gcc 16/fedora 44

Trick compiler with ==.
Thirunarayanan Balathandayuthapani
MDEV-37294  segv in flst::remove_complete(buf_block_t*, unsigned short, unsigned char*, mtr_t*)

Problem:
=======
During system tablespace defragmentation, extent movement occurs
in two phases: prepare and complete.
1) prepare phase validates involved pages and acquires necessary
resources.
2) complete phase performs the actual data copy.

Prepare phase fails to check whether allocating a page will
make the extent FULL. When an extent has exactly (extent_size - 1)
pages used, the prepare phase returns early without latching
the prev/next extent descriptors needed for list manipulation.

Complete phase then allocates the final page, making the
extent full, and attempts to move it from
FSEG_NOT_FULL/FSP_FREE_FRAG to FSEG_FULL/FSP_FULL_FRAG list.
This fails with an assertion because the required blocks were
never latched, causing a crash in flst::remove_complete().

Solution:
========
alloc_from_fseg_prepare(), alloc_from_free_frag_prepare():
call these function only if the extent will be full after
allocation. This makes the
prepare phase to acquire the necessary pages for FSP list manipulation

find_new_extents(): Print more revised information about moving
of extent data and destination extent also.

defragment_level(): Move get_child_pages(new_block) before committing
changes to enable proper rollback on failure. Well, this failure
is theoretically impossible (new block is exact copy of
validated old block).
Raghunandan Bhat
MDEV-37243: SP memory root protection disappears after a metadata change

Problem:
  When a stored routine involes a cursor and metadata of table on which
  the cursor is defined changes, the SP instruction has to be reparsed.
  For ex:
  CREATE OR REPLACE TABLE t1 (a INT);

  CREATE OR REPLACE FUNCTION f1() RETURNS INT
  BEGIN
    DECLARE vc INT DEFAULT 0;
    DECLARE cur CURSOR FOR SELECT a FROM t1;
    OPEN cur;
    FETCH cur INTO vc;
    CLOSE cur;
    RETURN vc;
  END;

  SELECT f1(); - first execution, sp-mem_root marked read-only on exec
  SELECT f1(); - read-only sp-mem_root
  ALTER TABLE t1 MODIFY a TEXT; - metadta change
  SELECT f1(); - reparse, rerun instr and mark new mem_root read-only

  sp_lex_instr is re-parsed after the metadata change, which sets up a
  new mem_root for reparsing. Once the instruction is re-parsed and
  re-executed(via reset_lex_and_exec_core), the new memory root assigned
  to the instruction being reparsed remains writable. This violates the
  invariant of SP memory root protection.

Fix:
  Mark the new memory root created for reparsing with read-only flag,
  after the first execution of the SP instruction.
Yuchen Pei
[fixup] Initialise order->in_field_list

Otherwise we may get

sql/table.h:239:16: runtime error: load of value 165, which is not a valid value for type 'bool'
Oleksandr Byelkin
New CC 3.4
Andrzej Jarzabek
MDEV-39122 Fix my_realpath to treat empty string as current directory

my_realpath() uses my_load_path() as a fallback. my_load_path()
replaces empty string with a current directory. But my_realpath()
didn't do it itself so the result was inconsistent: empty string was
replaced with a current directory, but if the current directory was
symlinked, symlinks were not resolved (as they were for any other,
non-empty, path, including ".").

Fix my_realpath() to treat empty string consisently with all
other paths - replace with a current dir and resolve symlinks too.