Commit graph

202821 commits

Author SHA1 Message Date
Dave Gosselin
682364e5c0 MDEV-36042 Assertion failed in Binary_string::q_append
Like MDEV-35062, reserve sufficient space in the result for
q_append'ed data, as q_append does not itself reserve space like
it's append counterpart.
2025-03-19 13:49:36 -04:00
Dave Gosselin
2f8d84b225 Fix spatial_utility_function_simplify 'unknown column' errors 2025-03-18 14:21:30 -04:00
Dave Gosselin
f052381263 MDEV-35975 Server crashes after CREATE VIEW as SELECT ST_COLLECT...
Ensure that orig_args is populated during Item_func_collect::fix_fields_impl
2025-03-18 13:46:39 -04:00
Dave Gosselin
ed413938cf MDEV-35102 CREATE TABLE AS SELECT ST_collect ... does not work
Update max_length field during fix_fields to ensure that the column
has the correct length during CREATE TABLE.  st_collect now returns
a geometry type rather than a blob.
2025-03-18 13:46:39 -04:00
Alexey Botchkov
cf6acf2f01 MDEV-35960 st_isvalid(NULL) should not end up with an error, but return NULL.
Now these return NULL if the argument is NULL and an error if the
argument is not a valid geometry.
2025-03-18 13:46:39 -04:00
Alexey Botchkov
2e40a0877d MDEV-35126 Wrong results from st_isvalid for multipolygon.
The Gis_polygon::is_valid() and the Gis_multi_polygon::is_valid()
  implemented with precise geometry engine.
2025-03-18 13:46:39 -04:00
Dave Gosselin
a1a31a6d8b MDEV-35103 CREATE TABLE AS SELECT ST_VALIDATE creates a column with datatype point, not geometry
Changes the type handler for geometry validate from 'point' to 'geometry'
2025-03-18 13:46:39 -04:00
Dave Gosselin
14480602e0 MDEV-35062 Assertion failed in Binary_string::q_append
Reserve sufficient space in the result for q_append'ed data, as
q_append does not itself reserve space like it's append counterpart.
2025-03-18 13:46:39 -04:00
Dave Gosselin
7e09883d79 MDEV-34940: Fix Item_func_collect inheritance
Creates new parent Item_sum_str for Item_func_group_concat and
Item_func_collect, migrating shared methods from each of those
latter classes to the former.  Simultaneously, tighten up the
method scopes.
2025-03-18 13:46:39 -04:00
Dave Gosselin
be821d48a2 MDEV-34969: test main.spatial_utility_function_simplify fails
The commented=out tests are known to have different results on
different architectures due to floating-point tolerance calculations
being slightly different; higher tolerance answers for the same
geometries match.
2025-03-18 13:46:39 -04:00
Dave Gosselin
72b01e9756 GIS update get_copy overrides to do_get_copy const 2025-03-18 13:46:39 -04:00
Sergei Golubchik
39ec1984f1 GIS fixes for --view 2025-03-18 13:46:39 -04:00
StefanoPetrilli
46dcf68512 MDEV-34278: Implements DISTINCT for ST_Collect
Implements the DISTINCT modifier for ST_Collect

Author: StefanoPetrilli <stefanop_1999@hotmail.it>
2025-03-18 13:46:39 -04:00
Stefano Petrilli
396128b247 MDEV-34278: Implement the GIS function ST_Collect
The GIS function ST_Collect takes as input multiple geometries and
returns the aggregation of the distinct geometry arguments.
The resulting value type is choosen using the following policy:
  - If all arguments are Point values, the result is a MultiPoint value.
  - If all arguments are LineString values, the result is a
    MultiLineString value.
  - If all arguments are Polygon values, the result is a MultiPolygon
    value.
  - Otherwise, the result is a GeometryCollection value.

If there are multiple geometry arguments and those arguments are in the
same SRS, the return value is in that SRS. If those arguments are not
in the same SRS, an ER_GIS_DIFFERENT_SRIDS_AGGREGATION error occurs.

Author: StefanoPetrilli <stefanop_1999@hotmail.it>
Co-authored-by: Torje Digernes <torje.digernes@oracle.com>
Co-authored-by: Steinar H. Gunderson <steinar.gunderson@oracle.com>
2025-03-18 13:46:39 -04:00
Stefano Petrilli
751968d7b3 MDEV-34137: Implement the GIS function ST_Validate
The GIS function ST_Validate takes ad input a geometry and verifies that
- is compliant with the Well-Known Binary (WKB) format and Spatial
  Reference System Identifier (SRID) syntax.
- is geometrically valid.
If the input is valid return it, else it returns NULL. The use case of
this function is to filter out invalid geometry data.

Author: StefanoPetrilli <stefanop_1999@hotmail.it>
Co-authored-by: Torje Digernes <torje.digernes@oracle.com>
Co-authored-by: Hans H Melby <hans.h.melby@oracle.com>
Co-authored-by: Jon Olav Hauglid <jon.hauglid@oracle.com>
Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com>
Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Co-authored-by: David.Zhao <david.zhao@oracle.com>
Co-authored-by: Pavan <pavan.naik@oracle.com>
2025-03-18 13:46:37 -04:00
StefanoPetrilli
2d21711402 MDEV-34276: Implements the function ST_IsValid
The GIS function ST_Simplify takes ad input a geometry and returns 1
if the argument is geometrically valid, 0 if the argument is not
geometrically valid.

Author: StefanoPetrilli <stefanop_1999@hotmail.it>
Co-authored-by: Ahmed Ibrahim <ahmed.ibr.hashim@gmail.com>
Co-authored-by: Jon Olav Hauglid <jon.hauglid@oracle.com>
Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com>
Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Co-authored-by: Menelaos Karavelas <menelaos.karavelas@oracle.com>
Co-authored-by: David.Zhao <david.zhao@oracle.com>
Co-authored-by: Pavan <pavan.naik@oracle.com>
2025-03-18 13:46:24 -04:00
Stefano Petrilli
339ec588a9 MDEV-34141: Implements the function ST_Simplify
The GIS function ST_Simplify takes ad input a geometry and a double. It
applies the Ramer-Douglas-Peucker algorithm on the geometry and returns
the resulting geometry. The tests have been cherry-picked from the MySQL
implementation of this function to grant compatibility among the two
implementations.

Co-authored-by: David Zhao <david.zhao@oracle.com>
Co-authored-by: Pavan Naik <pavan.naik@oracle.com>
Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com>
Co-authored-by: Jon Hauglid <jon.hauglid@oracle.com>
Co-authored-by: Hans H Melby <hans.h.melby@oracle.com>
Co-authored-by: Tor Didriksen <tor.didriksen@oracle.com>
2025-03-18 13:46:22 -04:00
StefanoPetrilli
34de409e62 fix typo spatial_ref_sys 2025-03-18 13:45:58 -04:00
StefanoPetrilli
a799a426db MDEV-34276: Implements the function ST_IsValid
The GIS function ST_Simplify takes ad input a geometry and returns 1
if the argument is geometrically valid, 0 if the argument is not
geometrically valid.

Author: StefanoPetrilli <stefanop_1999@hotmail.it>
Co-authored-by: Ahmed Ibrahim <ahmed.ibr.hashim@gmail.com>
Co-authored-by: Jon Olav Hauglid <jon.hauglid@oracle.com>
Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com>
Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Co-authored-by: Menelaos Karavelas <menelaos.karavelas@oracle.com>
Co-authored-by: David.Zhao <david.zhao@oracle.com>
Co-authored-by: Pavan <pavan.naik@oracle.com>
2025-03-18 13:45:56 -04:00
StefanoPetrilli
e12de62c5c MDEV-34177: Implements ST_PointFromGeoHash
The GIS function ST_PointFromGeoHash takes in input a geohash and
returns a point where the x is the longitude and the y is the latitude.
The latitude is returned as a numeric value in the interval [180, -180].
The longitude is returned as a numeric value in the interval [90, -90].
If the argument is NULL, the return value is NULL. If the argument is
invalid, an ER_GIS_INVALID_DATA is thrown.

Author: StefanoPetrilli <stefanop_1999@hotmail.it>
Co-authored-by: kevincheng2 <chengyf112@gmail.com>
Co-authored-by: Catalin Besleaga <catalin.besleaga@oracle.com>
Co-authored-by: Gleb Shchepa <gleb.shchepa@oracle.com>
Co-authored-by: Tatiana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
Co-authored-by: Martin Hansson <martin.hansson@oracle.com>
Co-authored-by: Deepa Dixit <deepa.dixit@oracle.com>
Co-authored-by: Hans H Melby <hans.h.melby@oracle.com>
Co-authored-by: Jens Even Berg Blomsøy <jens.even.blomsoy@oracle.com>
Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com>
Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Co-authored-by: BennyWang <benny.wang@oracle.com>
Co-authored-by: David.Zhao <david.zhao@oracle.com>
Co-authored-by: Erik Froseth <erik.froseth@oracle.com>
2025-03-18 13:45:35 -04:00
Stefano Petrilli
f0b501652a MDEV-34160: Implements ST_LongFromGeoHash
The GIS function ST_LongFromGeoHash takes in input a geohash and returns
its longitude.
The longitude is returned as a numeric value in the interval
[180, -180].
If the argument is NULL, the return value is NULL. If the argument is
invalid, an ER_GIS_INVALID_DATA is thrown.

Author: StefanoPetrilli <stefanop_1999@hotmail.it>
Co-authored-by: kevincheng2 <chengyf112@gmail.com>
Co-authored-by: Catalin Besleaga <catalin.besleaga@oracle.com>
Co-authored-by: Gleb Shchepa <gleb.shchepa@oracle.com>
Co-authored-by: Tatiana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
Co-authored-by: Martin Hansson <martin.hansson@oracle.com>
Co-authored-by: Deepa Dixit <deepa.dixit@oracle.com>
Co-authored-by: Hans H Melby <hans.h.melby@oracle.com>
Co-authored-by: Jens Even Berg Blomsøy <jens.even.blomsoy@oracle.com>
Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com>
Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Co-authored-by: BennyWang <benny.wang@oracle.com>
Co-authored-by: David.Zhao <david.zhao@oracle.com>
Co-authored-by: Erik Froseth <erik.froseth@oracle.com>
2025-03-18 13:45:35 -04:00
Stefano Petrilli
48d37e3843 MDEV-34159: Implements ST_LatFromGeoHash
The GIS function ST_LatFromGeoHash takes in input a geohash and returns
its latitude.
The latitude is returned as a numeric value in the interval [90, -90].
If the argument is NULL, the return value is NULL. If the argument is
invalid, an ER_INCORRECT_TYPE is thrown.

Author: StefanoPetrilli <stefanop_1999@hotmail.it>
Co-authored-by: kevincheng2 <chengyf112@gmail.com>
Co-authored-by: Catalin Besleaga <catalin.besleaga@oracle.com>
Co-authored-by: Gleb Shchepa <gleb.shchepa@oracle.com>
Co-authored-by: Tatiana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
Co-authored-by: Martin Hansson <martin.hansson@oracle.com>
Co-authored-by: Deepa Dixit <deepa.dixit@oracle.com>
Co-authored-by: Hans H Melby <hans.h.melby@oracle.com>
Co-authored-by: Jens Even Berg Blomsøy <jens.even.blomsoy@oracle.com>
Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com>
Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Co-authored-by: BennyWang <benny.wang@oracle.com>
Co-authored-by: David.Zhao <david.zhao@oracle.com>
Co-authored-by: Erik Froseth <erik.froseth@oracle.com>
2025-03-18 13:45:35 -04:00
StefanoPetrilli
0c8d2a6ca8 MDEV-34138: Implements the function MBRCoveredBy
Returns 1 or 0 to indicate whether the minimum bounding rectangle of g1
is covered by the minimum bounding rectangle of g2. The tests have been
cherry-picked from the MySQL implementation of this function to grant
compatibility among the two implementations.

Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com>
Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Co-authored-by: Martin Hansson  <martin.hansson@oracle.com>
Co-authored-by: Erik Froseth <erik.froseth@oracle.com>
Co-authored-by: Hans H Melby <hans.h.melby@oracle.com>
Co-authored-by: Jens Even Berg Blomsøy <jens.even.blomosoy@oracle.com>
Co-authored-by: David Zhao <david.zhao@oracle.com>
Co-authored-by: BennyWang <benny.wang@oracle.com>
2025-03-18 13:45:34 -04:00
Stefano Petrilli
e158acee33 MDEV-34158: Implement the GIS function ST_Geohash
The function returns the geohash corresponding to the input values.
The GIS function ST_GeoHash takes as input:

  (longitude, latitude, max_length), OR
  (point, max_length)

The longitue parameter is a numeric value in the interval [180, -180],
the latitude is a numeric value in the interval [90, -90].
In the case of point, the x coordinate is treated as the latitude and
the y coordinate is treated as the latitude. Even in the case of a
point, the same constraints apply.
The max_length parameter is the upper limit on the resulting string
size and cannot exceed 100.

Author: StefanoPetrilli <stefanop_1999@hotmail.it>
Co-authored-by: kevincheng2 <chengyf112@gmail.com>
Co-authored-by: Catalin Besleaga <catalin.besleaga@oracle.com>
Co-authored-by: Gleb Shchepa <gleb.shchepa@oracle.com>
Co-authored-by: Tatiana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
Co-authored-by: Martin Hansson <martin.hansson@oracle.com>
Co-authored-by: Deepa Dixit <deepa.dixit@oracle.com>
Co-authored-by: Hans H Melby <hans.h.melby@oracle.com>
Co-authored-by: Jens Even Berg Blomsøy <jens.even.blomsoy@oracle.com>
Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com>
Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Co-authored-by: BennyWang <benny.wang@oracle.com>
Co-authored-by: David.Zhao <david.zhao@oracle.com>
Co-authored-by: Erik Froseth <erik.froseth@oracle.com>
2025-03-18 13:45:14 -04:00
Sergey Vojtovich
c3f21762e9 Corrections to parent "speedup collation" commit
Rather than populating collation_name_hash in a separate loop, call
my_hash_insert() from appropriate methods.
2025-03-18 18:40:43 +04:00
Jitesh Chawla
543ebbcf8e MDEV-35876 - speedup collation/charset lookup
Replaces O(n) linear scans for collation lookups with O(1) hash lookups
to eliminate performance bottlenecks as collation counts grow.
2025-03-18 18:40:43 +04:00
Sergey Vojtovich
feb1cf9086 Corrections to parent "fix typos" commmit 2025-03-14 12:08:56 +04:00
Vasilii Lakhin
717c12de0e Fix typos in C comments inside sql/ 2025-03-14 12:08:56 +04:00
Marko Mäkelä
153778437d Merge 11.8 into main 2025-03-05 21:20:02 +02:00
Marko Mäkelä
bb9f010432 Merge 11.4 into 11.8 2025-03-05 20:39:47 +02:00
Hossam Hassan
689bed1940 MDEV-23818 mysql option --script-dir
This commit introduces an additional command line option to the mariadb
client.
--script-dir=<directory> will cause the `source` command to look for
files initially in CWD, then in <script-dir> if not found in CWD.
2025-03-05 16:50:18 +02:00
Marko Mäkelä
2183f302c8 MDEV-33489 atomic.alter_table is too slow with SSL
The test is killing and restarting the server very many times.
This may lead to timeouts on architectures or builds that lack
an SIMD based encryption implementation, such as IBM System Z (s390x)
or cmake -DWITH_MSAN=ON builds.
2025-03-05 11:44:38 +02:00
Vladislav Vaintroub
3a81664cb8 Review fixes
- explain why "long" is deprecated, point out to Wikipedia 64bit data models article.
- fix typo
2025-03-03 14:54:40 +02:00
Vladislav Vaintroub
1fecf581ac Rewrite the 'Types' chapter in coding standards.
Problem - current coding standards explicitly discourages
use of int, char, short etc, and recommends fixed types instead.

This is overly pedantic. The real problem, and the only problem we have
with types concerning portability, the inappropriate use of `long` is
too easy to overlook.

Thus,un-deprecate the types that are portable, for all practical purpose
i.e int, short, long long. Warning that char might be unsigned, though,
all compilers have appropriate flags.

Yet, use strongly wording to deprecate long and ulong, those are the types
that create real portability problems.
2025-03-03 14:54:40 +02:00
Marko Mäkelä
49a6baec56 Merge 10.11 into 11.4 2025-03-03 11:07:56 +02:00
Marko Mäkelä
6e6a1b316c MDEV-35000: dict_table_close() breaks STATS_AUTO_RECALC
stats_deinit(): Replaces dict_stats_deinit().
Deinitialize the statistics for persistent tables,
so that they will be reloaded or recalculated
on a subsequent ha_innobase::open().

ha_innobase::rename_table(): Invoke stats_deinit() so that the
subsequent ha_innobase::open() will reload the InnoDB persistent
statistics. That is, it will remain possible to have the InnoDB
persistent statistics reloaded by executing the following:
RENAME TABLE t TO tmp, tmp TO t;

dict_table_close(table): Replaced with table->release().
There will no longer be any logic that would attempt to ensure
that the InnoDB persistent statistics will be reloaded after
FLUSH TABLES has been executed. This also fixes the problem that
dict_table_t::stat_modified_counter would be frequently reset to 0,
whenever ha_innobase::open() is invoked after the table reference
count had dropped to 0.

dict_table_close(table, thd, mdl): Remove the parameter "dict_locked".
Do not try to invalidate the statistics.

ha_innobase::statistics_init(): Replaces dict_stats_init(table).

Reviewed by: Thirunarayanan Balathandayuthapani
2025-02-28 09:00:16 +02:00
Marko Mäkelä
1ed09cfdcb MDEV-35000 preparation: Clean up dict_table_t::stat
innodb_stats_transient_sample_pages, innodb_stats_persistent_sample_pages:
Change the type to UNSIGNED, because the number of pages in a table
is limited to 32 bits by the InnoDB file format.

btr_get_size_and_reserved(), fseg_get_n_frag_pages(),
fseg_n_reserved_pages_low(), fseg_n_reserved_pages(): Return uint32_t.
The file format limits page numbers to 32 bits.

dict_table_t::stat: An Atomic_relaxed<uint32_t> that combines a
number of metadata fields.

innodb_copy_stat_flags(): Copy the statistics flags from
TABLE_SHARE or HA_CREATE_INFO.

dict_table_t::stats_initialized(), dict_table_t::stats_is_persistent():
Accessors to dict_table_t::stat.

Reviewed by: Thirunarayanan Balathandayuthapani
2025-02-28 08:55:16 +02:00
Sergei Petrunia
1965b2be16 MDEV-34620: Lots of index_merge created and discarded for many-way OR
If a query has many OR-ed constructs which can use multiple indexes

  (key1=1 AND key2=10) OR
  (key1=2 AND key2=20) OR
  (key1=3 AND key2=30) OR
  ...

The range optimizer would construct and then discard a lot of potential
index_merge plans. This process
1. is CPU-intensive
2. can hit the @@optimizer_max_sel_args limitation after which all
   potential range or index_merge plans are discarded.

The fix is to apply a heuristic: if there is an OR clause with more than
MAX_OR_ELEMENTS_FOR_INDEX_MERGE=100 branches (hard-coded constant),
disallow construction of index_merge plans for the OR branches.
2025-02-27 15:29:42 +02:00
Oleg Smirnov
733852d4c3 BKA join cache buffer is employed despite join_cache_level=3 (flat BNLH)
In the `check_join_cache_usage()` function there is a branching issue
where an accidental fall-through to BKA/BKAH buffers may occur, even
when the join_cache_level setting does not permit their use.

This patch corrects the condition to ensure that BKA/BKAH join caching
is only enabled when explicitly allowed by join_cache_level

Reviewer: Sergei Petrunia <sergey@mariadb.com>
2025-02-27 16:47:25 +07:00
ParadoxV5
5091986cea misc. sql/slave.cc & co. refactor
* `get_master_version_and_clock()` de-duplicate label using fall-through
* `io_slave_killed()` & `check_io_slave_killed()`:
  * reüse the result from the level lower
  * add distinguishing docs
* `try_to_reconnect()`: extract `'` from `if`-`else`
* `handle_slave_io()`: Both `while`s have the same condition;
  looks like the outer `while` can simply be an `if`.
* `connect_to_master()`:
  * assume `mysql_errno()` is not 0 on connection error
  * utilize 0’s falsiness in the loop
  * extend docs
* `sql/sql_show.cc`: refactor SHOW ALL REPLICAS filter’s condition
* `sql/mysqld.cc`: init `master-retry-count` with `master_retry_count`

Reviewed-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2025-02-26 20:37:53 -07:00
ParadoxV5
e2dbd9b6ac MDEV-35304: Add Connects_Tried and Master_Retry_Count to SSS
When the IO thread (re)connect to a primary,
no updates are available besides unique errors that cause the failure.
These new `Master_info` numbers supplement SHOW SLAVE STATUS’s (most-
recent) ‘Connecting’ state with statistics on (re)connect attempts:

* `Connects_Tried`: how many retries have been attempted so far
  This was previously a local variable that only counted re-attempts;
  it’s now meaningful even after the “Connecting” state concludes.
* `Master_Retry_Count` (from MDEV-25674): out of how many configured

Side-note: Some of the tests updated by this commit dump the entire
SHOW SLAVE STATUS, which might include non-deterministic entries.

Reviewed-by: Kristian Nielsen <knielsen@knielsen-hq.org>
Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
2025-02-26 20:37:53 -07:00
ParadoxV5
7094a75596 MDEV-25674: Add CHANGE MASTER TO master_retry_count
This new CHANGE MASTER TO field specifies the `--master-retry-count`
(global option: the number of Primary connection attempts)
for each multi-source replica; i.e, per-channel `performance_schema.`
`replication_connection_configuration.CONNECTION_RETRY_COUNT`.

`--master-retry-count` remains the default for new `CHANGE MASTER TO`s.

This new keyword and `master-info` entry
matches those of pre-‘REPLICATION SOURCE’ MySQL.
2025-02-26 20:37:53 -07:00
ParadoxV5
66f52ba630 slave.cc try_to_reconnect remove retry_counter
`try_to_reconnect()` wraps `safe_reconnect()` with logging, but the
latter already loops reconnection attempts up to `master_retry_count`
times with `mi->connect_retry`-msec sleeps inbetween.
This means `try_to_reconnect()` has been counting disconnects of the
replication session (since it doesn’t loop) while `safe_reconnect()`
was counting actual tries (which may be multiple per disconnect).
In practice, this outer counter’s only benefit was to override the edge
case `--master-retry-count=0` that the inner loop doesn’t cover with 1.
2025-02-26 20:37:53 -07:00
Marko Mäkelä
937ae4137e MDEV-36155: MSAN use-of-uninitialized-value innodb.log_file_size_online
Writing the redo log resized will write uninitialized data. There is
a MEM_MAKE_DEFINED construct in the code to bless this however it was
correct on the initial length, but not the changed length.

The MEM_MAKE_DEFINED is moved earlier in the code where the length
contains the correct value.
2025-02-27 08:19:07 +11:00
Monty
2c0ba2680b load_db_opt was always doing a file access if db.opt file did not exist
Added caching of database directories that did not have a db.opt file.
This was common for older MariaDB installaiton or if a user created
a database with 'mkdir'.

Other things:
- Give a note "no db.opt file" if one uses SHOW CREATE DATABASE one
  a database without a db.opt file.
2025-02-26 12:40:07 +02:00
Monty
cf01bfe811 Extended mariadb-test-run to define MARIADB_TOPDIR and MARIADB_DATADIR
This is for preparing MariaDB for catalogs.

mtr tests should in the future use MARIADB_TOPDIR or MARIADB_DATADIR
instead of '@@datadir'. This is especially true for replication tests
that access binlog files.

MARIADB_TOPDIR is the top directory where binary log and engine log files
resides.
MARIADB_DATADIR is the directory where the database/schema directories
resides.

MARIADB_TOPDIR is not depending on catalogs.
When catalogs is used MARIADB_DATADIR will point to the directory of the
current catalog. If catalogs is not used then
MARIAD_DATADIR=MARIADB_TOPDIR.
2025-02-25 16:52:54 +02:00
Monty
7b59a4dbc2 Allow 'mariadb' as a connection wrapper name for FederatedX.
One can now use 'mariadb' and/or 'mysql' asr wrapper name to connect
to MariaDB or MySQL.
2025-02-25 16:04:56 +02:00
Monty
aea440d3e7 Fixed mysqld_list_processes to remove a possibility to access null pointers 2025-02-25 15:56:13 +02:00
Marko Mäkelä
809a0cebdc MDEV-36152 mariadb-backup --backup crash during innodb_undo_log_truncate=ON, innodb_encrypt_log=ON
recv_sys_t::parse(): Allocate decrypt_buf also for storing==BACKUP
but limit its size to correspond to 1 byte of record payload.
Ensure that last_offset=0 for storing==BACKUP.
When parsing INIT_PAGE or FREE_PAGE, avoid an unnecessary
l.copy_if_needed() for storing!=YES.
When parsing EXTENDED in storing==BACKUP, properly invoke
l.copy_if_needed() on a large enough decrypt_buf.
When parsing WRITE, MEMMOVE, MEMSET in storing==BACKUP,
skip further validation (and potential overflow of the tiny decrypt_buf),
like we used to do before commit 46aaf328ce
(MDEV-35830).

Reviewed by: Debarun Banerjee
2025-02-25 11:41:49 +02:00
Marko Mäkelä
0c204bfb87 Merge 10.6 into 10.11 2025-02-25 10:23:24 +02:00