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-41496 OOB write with RPAD() crash and multi-byte charsets and uservar

item's charset is metadata, it's known at fix_fields and does not
change later. user variables can violate this invariant if they're
changed and used in the same query.

Let's always wrap such variables in Item_func_conv_charset()
to make sure the caller always gets the same fixed charset, no matter
what the actual variable value is.

Variables that aren't changed in the same query do not get this
unnecessary conversion.
Marko Mäkelä
Merge 11.4 into 11.8
Marko Mäkelä
MDEV-41565 Better innodb_log_recovery_target check

log_parse_start(): Account for the mini-transaction trailer.

Also, fix the spelling: fulfil, not "fulfill".

Reviewed by: Alessandro Vetere
Teemu Ollakka
MDEV-40727 rsync SST donor stalls in a whole-host sync()

The rsync SST donor ran a bare sync() between the table flush and the
transfer. sync() flushes every mounted filesystem on the host, so its
duration depends on I/O unrelated to the SST. The donor holds FTWRL,
LOCK_log and a paused provider at that point, so the whole server is
frozen until sync() returns.

Flush only the filesystems that hold the files to transfer: the data
directory, an absolute binlog directory, and each symlinked database
directory.

Use the full sync() where 'sync -f' (syncfs) is not available.
Aleksey Midenkov
MDEV-40821 Wrong result after PORTION OF with subquery (11.4)

Single-table DELETE converted to multi-table (when a subquery
references the target table) skipped FOR PORTION OF row splitting and
the constant expression check, so it deleted whole rows instead of the
portion.

The fix prohibits processing DELETE ... FOR PORTION OF as multi-table,
like DELETE ... RETURNING.
Sergei Golubchik
CONNECT udfs crash on long filename

namely, json_get_item, jsonget_string, json_set_item, jbin_set_item,
bson_get_item, bsonget_string, bson_set_item

Assisted-by: Claude:claude-opus-5-5
Sergei Golubchik
jfile_bjson/jfile_convert/bfile_bjson/bfile_convert crash on lrecl=NULL

tests for
* constant NULL
* not constant NULL
* not constant not NULL

Assisted-by: Claude:claude-opus-5-5
Aleksey Midenkov
MDEV-40821 Wrong result after DELETE HISTORY or PORTION OF (10.11)

The parser assigned versioning conditions of DELETE HISTORY ... BEFORE
SYSTEM_TIME and period conditions of DELETE ... FOR PORTION OF to the
table pointed by last_table(). When the BEFORE SYSTEM_TIME or FOR
PORTION OF expression references another table (e.g. via a subquery or
a sequence function), last_table() is already switched to that table,
and the DELETE target gets no conditions.

DELETE HISTORY then deletes current rows permanently instead of
history, keeps the history it had to purge, and is checked for DELETE
privilege instead of DELETE HISTORY. DELETE HISTORY from a
non-versioned table is not rejected with ER_VERS_NOT_VERSIONED.
DELETE ... FOR PORTION OF deletes all rows of the table, ignoring the
period.

The fix assigns the conditions to the TABLE_LIST returned by
delete_single_table, i.e. the DELETE target itself, regardless of
tables added later in the statement.

DBUG_ASSERT in TABLE::vers_switch_partition() is removed. It checked
delete_history on last_table() and assumed no other table is opened
for write by DELETE HISTORY, which is false for the underlying table
of a view or a table locked by SELECT ... FOR UPDATE in the history
point. The DELETE HISTORY target is already skipped there by its own
delete_history check.
Aleksey Midenkov
MDEV-25529 Auto-create: Pre-existing historical data is not partitioned as specified by ALTER

Adds logic into prep_alter_part_table() for INTERVAL ... AUTO to read the
history range (vers_get_history_range()) and size the new layout from it.
STARTS is aligned to the oldest history row_end (vers_set_starts()) if it
was not specified by the user, or if the user specified it later than
that; in the latter case WARN_VERS_WRONG_STARTS is printed. The history
partitions cover both the newest history row_end and the query time, so
DML after the ALTER does not need to create partitions. A PARTITIONS N
clause is kept if it gives more partitions. An explicit subpartition list
is replaced by as many default subpartitions. If the layout needs more
than MAX_PARTITIONS partitions (counting subpartitions), or the INTERVAL
is longer than the date range, the ALTER fails with
ER_VERS_HIST_PART_FAILED. Month and year intervals are stepped in UTC; a
boundary past the maximum TIMESTAMP ends a partial last history
partition.

In case of fast ALTER TABLE, f.ex. when partitioning already exists, the
above logic is ignored unless FORCE clause is specified. When user
specifies partition list explicitly the above logic is ignored even with
FORCE clause. With FORCE on a table already partitioned by SYSTEM_TIME
the work is done on a clone of the partitioning info. The parsed settings
are copied into the clone's vers_info with
Vers_part_info::copy_settings(), which keeps the clone's now_part and
hist_part (the parsed ones are NULL).

Before reading the range, the metadata lock is upgraded to
MDL_SHARED_NO_WRITE, and then the copy does not run online, so DML
cannot add history that would not fit the computed layout until the
ALTER ends (Alter_info::vers_history_read). LOCK=NONE and
ALGORITHM=INPLACE/NOCOPY/INSTANT are rejected for such ALTER before the
upgrade, so they do not wait for concurrent DML; the ALGORITHM error is
reported by the new Alter_info::report_algorithm_unsupported(), which
mysql_alter_table() uses as well. The range is read under a table lock
taken with mysql_lock_tables(), as some engines (Aria) set up their
transaction in THR_LOCK callbacks. The scan can be killed.

WARN_VERS_STARTS_BEYOND_INTERVAL for ALTER .. AUTO is checked after the
alignment, so it is not printed when STARTS was re-aligned to the history.

vers_get_history_range() detects if an index can be used for row_end
min/max stats and if so it gets it with ha_index_first() and
HA_READ_BEFORE_KEY (as it must ignore current data). Otherwise it does a
table scan to read the stats. Current rows with the pre-11.5 row_end
marker are not taken for history either. In the index they sort below
history after 2038, so the minimum is read after them. There is
test_mdev-25529 debug keyword to check the both and compare results.
WARN_VERS_SLOW_ROW_END is printed if the scan read any row and there is no
usable index (a disabled one does not count as missing).

Static key_cmp was renamed to key_eq to resolve compilation after key.h
was included as key_cmp was already declared there.
Sergei Petrunia
Disable cloning for Item_sum_sp, Enable deletion of test clone for Item_func_in
Aleksey Midenkov
MDEV-40821 SIGSEGV in Window_funcs_sort::setup

Window_funcs_sort failed accessing win_func->window_spec as window
spec was not defined in the query. Usually this is checked by fixing
item win_func, but it was not done by vers_setup_conds().

Actually, earlier check by vers_setup_conds() must fail on DELETE
HISTORY from non-versioned table, but TABLE_LIST for t1 has no
versioning conditions.

The cause was the parser assigning versioning conditions to wrong
table pointed by last_table() which was already switched to another
table from SYSTEM_TIME expression (cs1).

The fix assigns versioning conditions to query_tables, as
delete_single_table puts the DELETE target first there, and tables
referenced later in the statement are appended after it.

Same fix applied to delete_single_table_for_period (period_conditions)
and to DBUG_ASSERT in TABLE::vers_switch_partition(), which checked
delete_history on last_table(). Tests added for both cases.

Without a window function the bug does not crash but silently loses
data: when the BEFORE SYSTEM_TIME or FOR PORTION OF expression
references another table (e.g. via a subquery), the conditions go to
that table. DELETE HISTORY then deletes current rows instead of
history, and is checked for DELETE privilege instead of DELETE
HISTORY. DELETE ... FOR PORTION OF deletes all rows of the table,
ignoring the period.

DELETE ... FOR PORTION OF converted to multi-table (due to index hints
or a subquery on the target table) deleted whole rows instead of
splitting them and skipped the constant expression check. The fix
prohibits processing it as multi-table, like DELETE ... RETURNING.

Warning WARN_INDEX_HINTS_IGNORED now names the clause the index hints
are incompatible with: RETURNING or FOR PORTION OF.
Sergei Golubchik
MDEV-41603 DECODE_HISTOGRAM crashes when decoding JSON_HB

don't return a pointer to a local buffer
Sergei Golubchik
MDEV-41608 some CONNECT jfile/bfile udfs ignore FILE and secure_file_priv

also they should all have maybe_null=true
Sergei Golubchik
fix NULL handling for jfile_bjson/jfile_convert/bfile_bjson/bfile_convert

to be consistent with other functions

Assisted-by: Claude:claude-opus-5-5
Sergei Golubchik
MDEV-41641 CONNECT REST can bypass FILE protection

only allow http and https schemes for REST
Aleksey Midenkov
MDEV-40821 Wrong result after DELETE HISTORY or PORTION OF (10.11)

The parser assigned versioning conditions of DELETE HISTORY ... BEFORE
SYSTEM_TIME and period conditions of DELETE ... FOR PORTION OF to the
table pointed by last_table(). When the BEFORE SYSTEM_TIME or FOR
PORTION OF expression references another table (e.g. via a subquery or
a sequence function), last_table() is already switched to that table,
and the DELETE target gets no conditions.

DELETE HISTORY then deletes current rows permanently instead of
history, keeps the history it had to purge, and is checked for DELETE
privilege instead of DELETE HISTORY. DELETE HISTORY from a
non-versioned table is not rejected with ER_VERS_NOT_VERSIONED.
DELETE ... FOR PORTION OF deletes all rows of the table, ignoring the
period.

The fix assigns the conditions to the TABLE_LIST returned by
delete_single_table, i.e. the DELETE target itself, regardless of
tables added later in the statement.

DBUG_ASSERT in TABLE::vers_switch_partition() is removed. It checked
delete_history on last_table() and assumed no other table is opened
for write by DELETE HISTORY, which is false for the underlying table
of a view or a table locked by SELECT ... FOR UPDATE in the history
point. The DELETE HISTORY target is already skipped there by its own
delete_history check.
Aleksey Midenkov
MDEV-40821 Wrong result after PORTION OF with subquery (11.4)

Single-table DELETE converted to multi-table (when a subquery
references the target table) skipped FOR PORTION OF row splitting and
the constant expression check, so it deleted whole rows instead of the
portion.

The fix prohibits processing DELETE ... FOR PORTION OF as multi-table,
like DELETE ... RETURNING.
Aleksey Midenkov
MDEV-40821 Wrong result after PORTION OF with subquery (11.4)

Single-table DELETE converted to multi-table (when a subquery
references the target table) skipped FOR PORTION OF row splitting and
the constant expression check, so it deleted whole rows instead of the
portion.

The fix prohibits processing DELETE ... FOR PORTION OF as multi-table,
like DELETE ... RETURNING.
Sergei Golubchik
fix RPAD(), LPAD() and INSERT() not to mangle its arguments

they used to overwrite the charset of their arguments, this is
incorrect and led to wrong results
Sergei Golubchik
CONNECT: more FILE and secure_file_priv checks in udfs

Assisted-by: Claude:claude-opus-5-5
Sergei Golubchik
cleanup: connect.rest test

no need to run the same CREATE TABLE twice, first to check if it works
and then to test its result
mariadb-PranavTiwari
Added sci
Sergei Golubchik
MDEV-41613 CONNECT jfile_convert crashes on invalid file

Assisted-by: Claude:claude-opus-5-5
Sergei Golubchik
cleanup: remove unused variable
Aleksey Midenkov
MDEV-40821 Wrong result after DELETE HISTORY or PORTION OF (10.11)

The parser assigned versioning conditions of DELETE HISTORY ... BEFORE
SYSTEM_TIME and period conditions of DELETE ... FOR PORTION OF to the
table pointed by last_table(). When the BEFORE SYSTEM_TIME or FOR
PORTION OF expression references another table (e.g. via a subquery or
a sequence function), last_table() is already switched to that table,
and the DELETE target gets no conditions.

DELETE HISTORY then deletes current rows permanently instead of
history, keeps the history it had to purge, and is checked for DELETE
privilege instead of DELETE HISTORY. DELETE HISTORY from a
non-versioned table is not rejected with ER_VERS_NOT_VERSIONED.
DELETE ... FOR PORTION OF deletes all rows of the table, ignoring the
period.

The fix assigns the conditions to the TABLE_LIST returned by
delete_single_table, i.e. the DELETE target itself, regardless of
tables added later in the statement.

DBUG_ASSERT in TABLE::vers_switch_partition() is removed. It checked
delete_history on last_table() and assumed no other table is opened
for write by DELETE HISTORY, which is false for the underlying table
of a view or a table locked by SELECT ... FOR UPDATE in the history
point. The DELETE HISTORY target is already skipped there by its own
delete_history check.
Sergei Golubchik
Item_func_decode_histogram::val_str shouldn't modify its arguments
Aleksey Midenkov
MDEV-40821 Wrong result after DELETE HISTORY or PORTION OF (10.11)

The parser assigned versioning conditions of DELETE HISTORY ... BEFORE
SYSTEM_TIME and period conditions of DELETE ... FOR PORTION OF to the
table pointed by last_table(). When the BEFORE SYSTEM_TIME or FOR
PORTION OF expression references another table (e.g. via a subquery or
a sequence function), last_table() is already switched to that table,
and the DELETE target gets no conditions.

DELETE HISTORY then deletes current rows permanently instead of
history, keeps the history it had to purge, and is checked for DELETE
privilege instead of DELETE HISTORY. DELETE HISTORY from a
non-versioned table is not rejected with ER_VERS_NOT_VERSIONED.
DELETE ... FOR PORTION OF deletes all rows of the table, ignoring the
period.

The fix assigns the conditions to the TABLE_LIST returned by
delete_single_table, i.e. the DELETE target itself, regardless of
tables added later in the statement.

DBUG_ASSERT in TABLE::vers_switch_partition() is removed. It checked
delete_history on last_table() and assumed no other table is opened
for write by DELETE HISTORY, which is false for the underlying table
of a view or a table locked by SELECT ... FOR UPDATE in the history
point. The DELETE HISTORY target is already skipped there by its own
delete_history check.
Aleksey Midenkov
MDEV-40821 Wrong result after DELETE HISTORY or PORTION OF (10.11)

The parser assigned versioning conditions of DELETE HISTORY ... BEFORE
SYSTEM_TIME and period conditions of DELETE ... FOR PORTION OF to the
table pointed by last_table(). When the BEFORE SYSTEM_TIME or FOR
PORTION OF expression references another table (e.g. via a subquery or
a sequence function), last_table() is already switched to that table,
and the DELETE target gets no conditions.

DELETE HISTORY then deletes current rows permanently instead of
history, keeps the history it had to purge, and is checked for DELETE
privilege instead of DELETE HISTORY. DELETE HISTORY from a
non-versioned table is not rejected with ER_VERS_NOT_VERSIONED.
DELETE ... FOR PORTION OF deletes all rows of the table, ignoring the
period.

The fix assigns the conditions to the TABLE_LIST returned by
delete_single_table, i.e. the DELETE target itself, regardless of
tables added later in the statement.

DBUG_ASSERT in TABLE::vers_switch_partition() is removed. It checked
delete_history on last_table() and assumed no other table is opened
for write by DELETE HISTORY, which is false for the underlying table
of a view or a table locked by SELECT ... FOR UPDATE in the history
point. The DELETE HISTORY target is already skipped there by its own
delete_history check.
Jan Lindström
MDEV-40727 rsync SST symlink coverage gaps

Failure:
- Filesystem flush before transfer only checks symlinks directly under
  the data directory, missing a per-table DATA/INDEX DIRECTORY symlink
  one level deeper (MyISAM, Aria), and missing InnoDB's per-table DATA
  DIRECTORY entirely, since that uses a '.isl' text file, not a symlink.
- The database directory transfer recreates symlinks as symlinks. The
  joiner's rsync daemon cannot keep an absolute symlink target as-is,
  so a MyISAM or Aria table placed by DATA DIRECTORY or INDEX DIRECTORY
  comes out unreadable after the SST.

Fix:
- Extend the flush's symlink search to two levels deep, and add a scan
  for '.isl' files, flushing the filesystem each one points to.
- Transfer the database directories with --copy-links instead of
  --links, so a table file reached through a symlink is copied by
  content instead of recreated as a broken symlink.

Test:
- MDEV-40727.test creates an Aria table with DATA DIRECTORY and INDEX
  DIRECTORY and an InnoDB table with DATA DIRECTORY, forces a full SST,
  then checks the donor's log for the flush of both external
  directories and checksums every table in database test between the
  two nodes.

Assisted-by: https://mariadb.org/governance/governance-ai-policy/
Aleksey Midenkov
MDEV-40821 SIGSEGV in Window_funcs_sort::setup

Window_funcs_sort failed accessing win_func->window_spec as window
spec was not defined in the query. Usually this is checked by fixing
item win_func, but it was not done by vers_setup_conds().

Actually, earlier check by vers_setup_conds() must fail on DELETE
HISTORY from non-versioned table, but TABLE_LIST for t1 has no
versioning conditions.

The cause was the parser assigning versioning conditions to wrong
table pointed by last_table() which was already switched to another
table from SYSTEM_TIME expression (cs1).

The fix assigns versioning conditions to query_tables, as
delete_single_table puts the DELETE target first there, and tables
referenced later in the statement are appended after it.

Same fix applied to delete_single_table_for_period (period_conditions)
and to DBUG_ASSERT in TABLE::vers_switch_partition(), which checked
delete_history on last_table(). Tests added for both cases.

Without a window function the bug does not crash but silently loses
data: when the BEFORE SYSTEM_TIME or FOR PORTION OF expression
references another table (e.g. via a subquery), the conditions go to
that table. DELETE HISTORY then deletes current rows instead of
history, and is checked for DELETE privilege instead of DELETE
HISTORY. DELETE ... FOR PORTION OF deletes all rows of the table,
ignoring the period.

DELETE ... FOR PORTION OF converted to multi-table (due to index hints
or a subquery on the target table) deleted whole rows instead of
splitting them and skipped the constant expression check. The fix
prohibits processing it as multi-table, like DELETE ... RETURNING.

Warning WARN_INDEX_HINTS_IGNORED now names the clause the index hints
are incompatible with: RETURNING or FOR PORTION OF.
Aleksey Midenkov
MDEV-40821 Wrong result after PORTION OF with subquery (11.4)

Single-table DELETE converted to multi-table (when a subquery
references the target table) skipped FOR PORTION OF row splitting and
the constant expression check, so it deleted whole rows instead of the
portion.

The fix prohibits processing DELETE ... FOR PORTION OF as multi-table,
like DELETE ... RETURNING.
Sergei Golubchik
MDEV-41626 definer check in CREATE PROCEDURE is too lax
Sergei Golubchik
cleanup: use a local HTTP server in connect.rest

The test depended on an external site, so it was slow and unreliable.
Serve std_data/bios.json from a forked perl server instead.

Assisted-by: Claude:claude-opus-5-5
mariadb-PranavTiwari
Added sci
Aleksey Midenkov
MDEV-40799 Runtime plugin/UDF load errors lost under --silent-startup

Regression from MDEV-32745 (7828fb475b0), which guarded the
plugin-load my_error() calls with opt_silent_startup.  That option is
a lifetime global, set once at startup and never reset, so the guard
suppressed the SQL error for the whole server lifetime, not just
during startup.  Runtime operations (INSTALL PLUGIN, CREATE FUNCTION
... SONAME) then skipped my_error(), never set the diagnostics area
and wrongly succeeded - e.g. main.ps's "call proc_1()" no longer
failed with ER_CANT_OPEN_LIBRARY.

Startup callers pass MYF(ME_ERROR_LOG); runtime callers pass MYF(0).
Gate the silencing on that flag via silent_plugin_startup() so it
applies only to the startup error-log path, and runtime errors always
reach the client.

No new test case: the runtime failure path is already covered by
existing tests (e.g. main.ps's ER_CANT_OPEN_LIBRARY check).  The
regression stayed invisible only because stock MTR does not start
servers with --silent-startup.  A dedicated test would have to restart
the server with --silent-startup solely to assert that a startup-only
option does not affect runtime, which adds little over the restored
invariant.
Sergei Golubchik
MDEV-41622 INSERT crashes on deeply nested GeometryCollection

- get_data_size() and init_from_wkb() return their error values on
  stack overrun, not a valid-looking length
- add stack checks to the remaining recursive GeometryCollection
  methods: wkt, json, mbr, area, length, dimension, store_shapes
- test non-GEOMETRY column and SELECT paths

Assisted-by: Claude:claude-opus-5-5
Sergei Golubchik
cleanup: use StringBuffer<>
Aleksey Midenkov
MDEV-25529 Auto-create: Pre-existing historical data is not partitioned as specified by ALTER

Adds logic into prep_alter_part_table() for INTERVAL ... AUTO to read the
history range (vers_get_history_range()) and size the new layout from it.
STARTS is aligned to the oldest history row_end (vers_set_starts()) if it
was not specified by the user, or if the user specified it later than
that; in the latter case WARN_VERS_WRONG_STARTS is printed. The history
partitions cover both the newest history row_end and the query time, so
DML after the ALTER does not need to create partitions. A PARTITIONS N
clause is kept if it gives more partitions. An explicit subpartition list
is replaced by as many default subpartitions. If the layout needs more
than MAX_PARTITIONS partitions (counting subpartitions), or the INTERVAL
is longer than the date range, the ALTER fails with
ER_VERS_HIST_PART_FAILED. Month and year intervals are stepped in UTC; a
boundary past the maximum TIMESTAMP ends a partial last history
partition.

In case of fast ALTER TABLE, f.ex. when partitioning already exists, the
above logic is ignored unless FORCE clause is specified. When user
specifies partition list explicitly the above logic is ignored even with
FORCE clause. With FORCE on a table already partitioned by SYSTEM_TIME
the work is done on a clone of the partitioning info. The parsed settings
are copied into the clone's vers_info with
Vers_part_info::copy_settings(), which keeps the clone's now_part and
hist_part (the parsed ones are NULL).

Before reading the range, the metadata lock is upgraded to
MDL_SHARED_NO_WRITE, and then the copy does not run online, so DML
cannot add history that would not fit the computed layout until the
ALTER ends (Alter_info::vers_history_read). LOCK=NONE and
ALGORITHM=INPLACE/NOCOPY/INSTANT are rejected for such ALTER before the
upgrade, so they do not wait for concurrent DML; the ALGORITHM error is
reported by the new Alter_info::report_algorithm_unsupported(), which
mysql_alter_table() uses as well. The range is read under a table lock
taken with mysql_lock_tables(), as some engines (Aria) set up their
transaction in THR_LOCK callbacks. The scan can be killed.

WARN_VERS_STARTS_BEYOND_INTERVAL for ALTER .. AUTO is checked after the
alignment, so it is not printed when STARTS was re-aligned to the history.

vers_get_history_range() detects if an index can be used for row_end
min/max stats and if so it gets it with ha_index_first() and
HA_READ_BEFORE_KEY (as it must ignore current data). Otherwise it does a
table scan to read the stats. Current rows with the pre-11.5 row_end
marker are not taken for history either. In the index they sort below
history after 2038, so the minimum is read after them. There is
test_mdev-25529 debug keyword to check the both and compare results.
WARN_VERS_SLOW_ROW_END is printed if the scan read any row and there is no
usable index (a disabled one does not count as missing).

Static key_cmp was renamed to key_eq to resolve compilation after key.h
was included as key_cmp was already declared there.
Sergei Golubchik
cleanup: connect test
forkfun
MDEV-24557 mariadb-dump: import MySQL 5.7 and 8.x users, grants, roles

mariadb-dump --system=users/all now dumps a MySQL 5.7+ source as
MariaDB statements. MySQL is recognised by the version string and the
absence of mysql.roles_mapping, so --version= cannot fool it.

- Privileges are mapped to MariaDB ones; others are dropped with a
  "# WARNING". WITH GRANT OPTION is dropped from a mapped privilege.
- CREATE USER clauses MariaDB lacks are dropped, with a warning for
  the lossy ones. An unsupported auth plugin locks the account.
- Roles are inferred from mysql.user, since MySQL has no role flag.
  Same-named roles on several hosts merge into one.
- A statement containing "*/" is emitted as EXECUTE IMMEDIATE
  CONCAT('..*', '/..'), so it cannot end the /*M!...*/ wrapper.
- The self-DROP guard now matches current_user() and runs before the
  first DROP USER.

Translators are in client/mysql8_translate.cc. The MySQL-source paths
run only against a real MySQL; recapture mysql8_users_dump*.sql
(recipe in mysql8_users_setup.sql) when they change.

Assisted-By: Claude:claude-5.5-sonnet