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
Sergei Golubchik
MDEV-39812 32-bit size truncation in RocksDB
KhaledR57
MDEV-40353 Add eval parameter to write_file and append_file

mysqltest substituted variables in the file name of write_file and
append_file, but not in the content, so tests had to fall back to
"exec echo ... >> file" to put a computed value into a file.

Add an optional third parameter, eval, which makes the content go
through do_eval(). It is off by default, because existing tests write
content that contains a literal $ or backslash.
Sergei Golubchik
MDEV-40426 CONNECT writes unvalidated data from remote server into fixed-len buffer

use size-bounded scanf formats
Sergei Golubchik
MDEV-40308 single quotes make SHOW CREATE USER invalid

use append_unescaped() for '-quoted strings in SHOW CREATE USER
and SHOW GRANTS. Use append_identifier() for user- and hostnames.
Sergei Golubchik
MDEV-40360 CONNECT REST can pass arguments to curl via HTTP parameter

tell curl to not try to interpret url as a parameter
Sergei Golubchik
MDEV-40311 mariadb-dump doesn't always quote identifiers

covers:
* DROP TRIGGER
* CHANGE MASTER
* CREATE FUNCTION
* CREATE SERVER
* INSTALL PLUGIN
Sergei Golubchik
MDEV-40329 Binary_string::qs_append(char): Assertion `str_length + (uint32) (1) <= Alloced_length' failed in AsText

Geometry::as_wkt() didn't take into account bytes written into the
result string in the recusrive call of get_data_as_wkt().
Gis_geometry_collection::get_data_as_wkt() didn't reserve space at all.
Thus nested geometry collections could overflow the buffer.
Georgi (Joro) Kodinov
MDEV-17746: perfschema.dml_threads failed in buildbot with wrong errno

The test was trying to update the performance_schema.threads row for
the current connection. And if that row was not found or was the same,
there's nothing to update hence no update not allowed error.

MariaDB has a device to skip calling ha_update_row() if the old and the
new records are identical.

The connection id is increasing by at least 2 for every test run.
Eventually it will hit the constant 12 in the UPDATE and the server
will not call ha_update_row() at all and won't get the error.
This is not a bug: it's reasonable behavior.

Stablizied the test by changing the UPDATE value to thread_id
+ const.

Co-authored-by: Grok
Sergei Golubchik
MDEV-40395 MyISAM/Aria silently truncate extensions from filenames, if too long

* move all common fn_format flags that mi_create/maria_create use
  into one single #define.
* simplify (MY_APPEND_EXT is redundant and MY_REPLACE_EXT does nothing
  when no . is present in the filename)
* use MY_SAFE_PATH everywhere (return NULL if too long)
* set my_errno= ENAMETOOLONG on too long
* abort mi_create/maria_create if returned NULL
Sergei Golubchik
MDEV-40329 Binary_string::qs_append(char): Assertion `str_length + (uint32) (1) <= Alloced_length' failed in AsText

Geometry::as_wkt() didn't take into account bytes written into the
result string in the recusrive call of get_data_as_wkt().
Gis_geometry_collection::get_data_as_wkt() didn't reserve space at all.
Thus nested geometry collections could overflow the buffer.
Sergei Golubchik
MDEV-40328 ASAN error on malformed WKB multipolygon

before `data+= WKB_HEADER_SIZE` verify that there's enough data.

rewrite this line in Gis_multi_line_string::get_mbr to make clear
that it does not need this check.
Sergei Golubchik
MDEV-40362 #mysql50# mixes up with table names in the table cache and on disk

1.
Only allow #mysql50# prefix on table names that
can not be decoded from a file name to a table name.
It is an error to put this prefix on a name that can be accessed
as a valid table name without a prefix. Use `t1` not `#mysql50#t1`,
use `a-b` not `#mysql50#a@002db`.

2.
Don't allow creation of new tables with the #mysql50# prefix.

Except when in SQLCOM_ALTER_DB_UPGRADE - main.upgrade test runs
ALTER DATABASE `#mysql50#mysqltest-1` UPGRADE DATA DIRECTORY NAME;
This command moves tables from the old db name to the new db name,
and some of these tables also have old #mysql50# names.

3.
Also don't allow to create such databases, views, partitions,
subpartitions, sequences, triggers.
Sergei Golubchik
cleanup: main.drop test
Georg Richter
Fix potential OOM vulnerability via oversized column counts

A malicious proxy or Man-in-the-Middle (MitM) could inject a large length-encoded
integer for the result set field count. Untrusted column counts could trigger
excessive memory allocation in the client, leading to an Out-Of-Memory
crash.

To prevent this, restrict the maximum allowed column count per result set via
a new option `MARIADB_OPT_MAX_COLUMNS`, defaulting to MAX_RESULT_COLUMNS (65,535).

If a server or proxy sends a field count exceeding this threshold:
1. Reject the packet immediately before allocation.
2. Raise CR_ERR_TOO_MUCH_COLUMNS (5027).
3. Set `mysql->net.error = 2` to prevent subsequent commands from reading
  desynchronized buffer state.
Sergei Golubchik
MDEV-40311 also fix mariadb-show and mariadb-convert-table-format
Sergei Golubchik
MDEV-39818 backtick in FK names breaks SHOW CREATE TABLE

InnoDB used to have two versions of innobase_quote_identifier().
One that handled embedded backticks and one that didn't.

Let's use just one implementation that handles backticks.
Keep the other one as a helper that writes to FILE but does not
implement the quoting logic.
Alexey (Holyfoot) Botchkov
MDEV-40394 XML schema fails on self-referencing type.

Copy XMLSchema_user_type information when the type is used recursively.
Copies that were once created are stored in m_c_free and then reused
later to avoid memory issues.
Sergei Golubchik
MDEV-40470 GRANT PROXY with empty password incorrectly checks grantor's privileges

empty password and empty plugin name don't mean "authentication
was not specified", they mean "empty authentication was specified"
Sergei Golubchik
MDEV-40358 symlinked table name is not encoded

encode table name in file name in DATA/INDEX DIRECTORY
Georgi (Joro) Kodinov
MDEV-17746: perfschema.dml_threads failed in buildbot with wrong errno

The test was trying to update the performance_schema.threads row for
the current connection. And if that row was not found or was the same,
there's nothing to update hence no update not allowed error.

MariaDB has a device to skip calling ha_update_row() if the old and the
new records are identical.

The connection id is increasing by at least 2 for every test run.
Eventually it will hit the constant 12 in the UPDATE and the server
will not call ha_update_row() at all and won't get the error.
This is not a bug: it's reasonable behavior.

Stablizied the test by changing the UPDATE value to thread_id
+ const.

Co-authored-by: Grok
Sergei Golubchik
MDEV-40409 ST_GeomFromText stack overrun on deeply nested GeometryCollection
Sergei Golubchik
MDEV-39776 SHOW CREATE TABLE corrupts `-quoted table options

Three problems:

1. Option value specified as `foo bar` was not quoted,
  printed as foo bar, breaking CREATE TABLE.
2. Option value that included */ was printed as is, in unknown
  options when the whole option was commented out, this broke the
  comment: /* opt='val*/ue' */
3. Option names can include */ too, `opt*/ion`=1

Fix: simplify value printing, ignore the original quoting, always
print the value quoted as a string. Break comment markers with an
escape (as *\/) if inside a comment. As \-escapes don't work inside,
backticks, we cannot use `-quoting for option values at all.

For the same reason we cannot allow */ inside option names, thus
let's only allow keywords for option names and reject fancy names
even if IGNORE_BAD_TABLE_OPTIONS is in force.
Sergei Golubchik
MDEV-40328 ASAN error on malformed WKB multipolygon

before `data+= WKB_HEADER_SIZE` verify that there's enough data.

rewrite this line in Gis_multi_line_string::get_mbr to make clear
that it does not need this check.
Sergei Golubchik
MDEV-40358 symlinked table name is not encoded

encode table name in file name in DATA/INDEX DIRECTORY
Sergei Golubchik
MDEV-40360 CONNECT REST can pass arguments to curl via HTTP parameter

tell curl to not try to interpret url as a parameter
Sergei Golubchik
MDEV-40470 GRANT PROXY with empty password incorrectly checks grantor's privileges

empty password and empty plugin name don't mean "authentication
was not specified", they mean "empty authentication was specified"
Sergei Golubchik
MDEV-40426 CONNECT writes unvalidated data from remote server into fixed-len buffer

use size-bounded scanf formats
Sergei Golubchik
MDEV-40311 also fix mariadb-show and mariadb-convert-table-format
bsrikanth-mariadb
MDEV-40388: sequence.simple fails on replay

sequence table was determined using tbl->table->s->sequence. The
intention was to not record sequence table information. However, the
check was only partially correct.

Instead, we could compare using the engine name like
if (!tbl->is_view() && tbl->table)
{
  handlerton *hton= tbl->table->file->partition_ht();
  const LEX_CSTRING *engine_name= hton_name(hton);
  if (strcmp(engine_name->str, "SEQUENCE") == 0 ||
      strcmp(engine_name->str, "SQL_SEQUENCE") == 0)
    continue;
}
This makes the sequence.simple succeed
Sergei Golubchik
MDEV-40362 #mysql50# mixes up with table names in the table cache and on disk

1.
Only allow #mysql50# prefix on table names that
can not be decoded from a file name to a table name.
It is an error to put this prefix on a name that can be accessed
as a valid table name without a prefix. Use `t1` not `#mysql50#t1`,
use `a-b` not `#mysql50#a@002db`.

2.
Don't allow creation of new tables with the #mysql50# prefix.

Except when in SQLCOM_ALTER_DB_UPGRADE - main.upgrade test runs
ALTER DATABASE `#mysql50#mysqltest-1` UPGRADE DATA DIRECTORY NAME;
This command moves tables from the old db name to the new db name,
and some of these tables also have old #mysql50# names.

3.
Also don't allow to create such databases, views, partitions,
subpartitions, sequences, triggers.
Sergei Golubchik
MDEV-39816 MyISAM crash on corrupted MYI with invalid keyseg length

check that the keyseg lengths are sane.

fix Aria too.
Sergei Golubchik
MDEV-40395 MyISAM/Aria silently truncate extensions from filenames, if too long

* move all common fn_format flags that mi_create/maria_create use
  into one single #define.
* simplify (MY_APPEND_EXT is redundant and MY_REPLACE_EXT does nothing
  when no . is present in the filename)
* use MY_SAFE_PATH everywhere (return NULL if too long)
* set my_errno= ENAMETOOLONG on too long
* abort mi_create/maria_create if returned NULL
Sergei Golubchik
MDEV-30942 MSAN_OPTIONS=poison_in_dtor=1 causes failures in free_root()

Materialized_cursor included MEM_ROOT where it itself (Materialized_cursor)
was allocated. Materialized_cursor inherits from Server_side_cursor,
and Server_side_cursor::operator delete frees this mem_root.

This offends MSAN with poison_in_dtor, because when Materialized_cursor
is destroyed, MEM_ROOT is poisoned and Server_side_cursor::operator delete
accesses memory it really shouldn't.

Fix:
* MEM_ROOT is moved into Server_side_cursor. Materialized_cursor is
  the only class inheriting from it, so nobody is affected.
* operator delete is replaced with a function cdestroy() which
  saves the MEM_ROOT, deletes the object, then frees the root.
* cannot close() from ~Materialized_cursor anymore, main_mem_root
  should be copied before the destruction
Sergei Golubchik
MDEV-39817 JSON_ARRAYAGG() returns garbage because of off-by-one error

don't truncate to a position somewhere between
[old_length, max_length-1] if old_length == max_length.
Simply set the length to old_length in this case.

Also, max_length cannot be zero.
Sergei Golubchik
cleanup: main.drop test
Mohammad Tafzeel Shams
MDEV-39795: Assertion `n_reserved > 0' failed

Problem:
========

1. Assertion `n_reserved > 0` failed in fseg_create():

fsp_reserve_free_extents() has a special condition for small
tablespaces where it reserves individual pages instead of full
extents. In such cases, n_reserved can be 0 even when the
reservation succeeds, causing the assertion ut_ad(n_reserved > 0)
to fail incorrectly.

The code was checking n_reserved to determine whether a reservation
had already been attempted, but this logic breaks for small
tablespaces where pages, rather than extents, are reserved.

2. Encryption metadata not cleared for compressed-only pages:

buf_page_encrypt() only cleared encryption-related metadata
fields (key-version and crypt-checksum) when the page was
neither encrypted nor compressed. However, these fields should
also be cleared when page_compressed is true but encrypted is
false, to avoid leaving stale encryption metadata in
compressed-only pages.

Solution:
=========

buf_page_encrypt(): Refactored the early-return logic. Encryption
metadata fields are now cleared whenever encrypted is false,
regardless of page_compressed. The function returns early only
when both !encrypted and !page_compressed.

fseg_create(): Reintroduced a boolean variable `reserved` to track
whether fsp_reserve_free_extents() has been attempted (removed as
part of MDEV-38419 | c7313da), replacing assertion `n_reserved > 0`.
Added an early return when DB_DECRYPTION_FAILED is encountered
during inode allocation.

my_error_innodb(): Added handling for DB_DECRYPTION_FAILED to
report decryption errors to the user through ER_GET_ERRMSG.
Sergei Golubchik
MDEV-30942 MSAN_OPTIONS=poison_in_dtor=1 causes failures in free_root()

Materialized_cursor included MEM_ROOT where it itself (Materialized_cursor)
was allocated. Materialized_cursor inherits from Server_side_cursor,
and Server_side_cursor::operator delete frees this mem_root.

This offends MSAN with poison_in_dtor, because when Materialized_cursor
is destroyed, MEM_ROOT is poisoned and Server_side_cursor::operator delete
accesses memory it really shouldn't.

Fix:
* MEM_ROOT is moved into Server_side_cursor. Materialized_cursor is
  the only class inheriting from it, so nobody is affected.
* operator delete is replaced with a function cdestroy() which
  saves the MEM_ROOT, deletes the object, then frees the root.
* cannot close() from ~Materialized_cursor anymore, main_mem_root
  should be copied before the destruction
Sergei Golubchik
MDEV-40065 bundled command-line clients don't always enforce length limits on server results

replace strmov/strxmov with strnmov, strmake, or my_snprintf
Sergei Golubchik
MDEV-40409 ST_GeomFromText stack overrun on deeply nested GeometryCollection