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-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
more portability fixes for galera.galera_sst_mariabackup_encrypt_with_key_server

make sure pkill doesn't kill itself. it's documented not to do that,
but if it's not called directly (e.g. my_safe_process -> sh -> pkill)
it can still kill its parents.
Sergei Golubchik
MDEV-39812 32-bit size truncation in RocksDB
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.
drrtuy
chore: RYOW MTR test for DuckDB.
Dave Gosselin
test updates based on comments from Oleg
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-40358 symlinked table name is not encoded

encode table name in file name in DATA/INDEX DIRECTORY
Dave Gosselin
MDEV-39397: Document and clean up dump_leaf_key

Add a docblock for dump_leaf_key that describes each parameter
and the leaf payload layout, and documents the return values and
side effects.

Sprinkle inline comments through the body to explain the LIMIT and
OFFSET bookkeeping, the dual purpose of result_finalized, why
borrowing table->record[1] as scratch space is safe, the offset
translation for skipped null bytes, and why the blob_storage
truncation flag is cleared after raising ER_CUT_VALUE_GROUP_CONCAT.

Implement other code cleanups, too, like dropping the unused tmp2
String object and rename old_length to starting_len so the cut_max_length
call reads more directly.  Other changes include narrowing loop
variables to the loop scope, move declarations next to their
first use, and replacing the C casts with static_cast.

There should be no behavior changes at this commit.
Sergei Golubchik
MDEV-40426 CONNECT writes unvalidated data from remote server into fixed-len buffer

use size-bounded scanf formats
Sergei Golubchik
cleanup: main.drop test
Sergei Golubchik
MDEV-40409 ST_GeomFromText stack overrun on deeply nested GeometryCollection
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-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-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.
Dave Gosselin
MDEV-39397: GROUP_CONCAT of BIT returns decimal, not packed bytes

When DISTINCT or ORDER BY is in play, GROUP_CONCAT builds an
internal temp table and converts BIT arguments to integers so records
can be compared by memcmp.  Calling val_str() on that field
then returned the decimal form ("0", "1", "3") instead of the
packed bit bytes that Field_bit::val_str() emits everywhere else,
including the "plain" GROUP_CONCAT path.

Override get_str_from_field() for Item_func_group_concat to detect
when the argument is BIT, read the value as an integer from the
temp table field, and pack it into (max_length + 7) / 8 bytes,
mirroring Field_bit::val_str().  This makes DISTINCT and ORDER BY
agree with the plain path.

Before this change, BIT fields in group_concat were rendered
as ASCII which was incorrect and produced the wrong result as
described in the ticket.  With this fix, we also update the
existing test cases to wrap BIT columns with '+0' so the recorded
output stays in ASCII format.  Now, with this patch and the test
case from the ticket, MariaDB and MySQL produce identical resultset
of a single row, single column having value 08.

By default, a group_concat including BIT fields on MySQL returns a
hexified value for its resultset whereas MariaDB requires the
hex() function to wrap group_concat for the same result:

Setup:
  create table t1(a bit(2), b varchar(10), c bit);
  insert into t1 values (1, 'a', 0), (0, 'b', 1);

MySQL:
  mysql> select group_concat(a, c) from t1;
  +----------------------------------------+
  | group_concat(a, c)                    |
  +----------------------------------------+
  | 0x01002C0001                          |
  +----------------------------------------+
  1 row in set (0.001 sec)

MariaDB:
  MariaDB [test]> select hex(group_concat(a, c)) from t1;
  +-------------------------+
  | hex(group_concat(a, c)) |
  +-------------------------+
  | 01002C0001              |
  +-------------------------+
  1 row in set (0.001 sec)
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-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-40311 also fix mariadb-show and mariadb-convert-table-format
Alessandro Vetere
MDEV-40427 lock_move_reorganize_page() early exit check is useful only with lock elision

After MDEV-40128, the early exit check in lock_move_reorganize_page()
is useful only with lock elision support.
This is because, when lock elision is not supported, TMLockGuard falls
back to behave like LockGuard.
The same check would be done using LockGuard later, in any case.
Hence, the early exit check can be skipped when lock elision is not
supported.
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-40426 CONNECT writes unvalidated data from remote server into fixed-len buffer

use size-bounded scanf formats
Mohammad Tafzeel Shams
MDEV-39800: Assertion `!(mode & 2048U) || (mode & 512U) || is_supremum' failed

ISSUE:

Lock bypassing optimization allows an X-lock request to skip
waiting locks when the requesting transaction already holds an
S-lock on the same record. This optimization is designed for
regular B-tree record locks that use heap-number-based conflict
detection.

Spatial index predicate locks use different semantics. They
perform MBR (Minimum Bounding Rectangle) overlap checks for
conflict detection and must not participate in bypass
optimization.

The assertion failure occurred because predicate insert
intention locks is not considered inside lock bypass code,
which assumed all insert intention locks must be either gap
locks or on the supremum record (MDEV-34877).

ut_ad(!(insert_intention) || (gap) || is_supremum)

Additionally, predicate locks could incorrectly enable
bypass_mode because the existing checks did not explicitly
exclude LOCK_PREDICATE locks.

FIX:

- lock_t::is_predicate(): Add a helper to identify spatial
  index locks.

- lock_t::can_be_bypassed(): Return false for predicate
  locks.

- lock_rec_has_to_wait_in_queue(): Update the assertion to
  allow predicate insert intention locks. Also add a
  !is_predicate() check to bypass_mode calculation.

- lock_rec_queue_validate_bypass(): Add an early return to
  skip bypass validation for predicate locks.
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.
drrtuy
fix: MDEV-40379 temporary disable CREATE TEMPORARY TABLE engine=DuckDB b/c of naming temp table naming inconsitencies b/w MariaDB and DuckDB.
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-39816 MyISAM crash on corrupted MYI with invalid keyseg length

check that the keyseg lengths are sane.

fix Aria too.
Dave Gosselin
MDEV-39397: Document and clean up dump_leaf_key

Add a docblock for dump_leaf_key that describes each parameter
and the leaf payload layout, and documents the return values and
side effects.

Sprinkle inline comments through the body to explain the LIMIT and
OFFSET bookkeeping, the dual purpose of result_finalized, why
borrowing table->record[1] as scratch space is safe, the offset
translation for skipped null bytes, and why the blob_storage
truncation flag is cleared after raising ER_CUT_VALUE_GROUP_CONCAT.

Implement other code cleanups, too, like dropping the unused tmp2
String object and rename old_length to starting_len so the cut_max_length
call reads more directly.  Other changes include narrowing loop
variables to the loop scope, move declarations next to their
first use, and replacing the C casts with static_cast.

There should be no behavior changes at this commit.
Alessandro Vetere
MDEV-40408 btr_page_reorganize_low() uses the buffer pool just to obtain a scratch block

Add a pool of scratch blocks, btr_scratch_pool_t, to be used instead
of the global buffer pool in the page-reorganization operations,
when a scratch block is needed.
Removes the needs of obtaining the buf_pool.mutex in such functions,
and any delay while holding at least page X-latch that it might have
caused.
drrtuy
fix: DuckDB now optionally read same transactions writes applied to other engines tables.
Sergei Golubchik
MDEV-40409 ST_GeomFromText stack overrun on deeply nested GeometryCollection
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.
Alessandro Vetere
MDEV-40427 lock_move_reorganize_page() early exit check is useful only with lock elision

After MDEV-40128, the early exit check in lock_move_reorganize_page()
is useful only with lock elision support.
This is because, when lock elision is not supported, TMLockGuard falls
back to behave like LockGuard.
The same check would be done using LockGuard later, in any case.
Hence, the early exit check can be skipped when lock elision is not
supported.
Alexander Barkov
MDEV-40396 open SYS_REFCURSOR crash, if too many cursors

When THD::m_statement_cursor was resized by a call of alloc_dynamic,
the memory location of all sp_cursor::result changed.
Therefore all members "select_result *Server_side_cursor::select"
previously initialized in the constructor to addresses of
sp_cursor::result became invalid.

Fix:
- Removing the member "select_result *result;" from Server_side_cursor.
- Passing instead a new "select_result *" parameter to
  methods open() and fetch() of Server_side_cursor and its descendant
  Materialized cursor.

So now, for example, when sp_cursor::fetch() is called, it executes:

    server_side_cursor->fetch(&result/*new parameter*/, 1);

The address value `&result` is now always correct.
Sergei Golubchik
MDEV-40311 mariadb-dump doesn't always quote identifiers

covers:
* DROP TRIGGER
* CHANGE MASTER
* CREATE FUNCTION
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-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-40425 handlersocket crashes on read with huge number of fields

* fix handlersocket to unlink it's THD, this apparently was broken
  for years
* add a check for fldnum
* add a first ever handlersocket test
Sergei Golubchik
MDEV-40409 ST_GeomFromText stack overrun on deeply nested GeometryCollection
Sergei Golubchik
MDEV-40426 CONNECT writes unvalidated data from remote server into fixed-len buffer

use size-bounded scanf formats