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
Revert "MDEV-39622 OBJECT_INSTANCE_BEGIN in P_S are unstable, difficult to compare"

Let's use MySQL's fix for compatibility

This reverts commit 11c41cd93d2c3732862ba043afd18508021440c0.
Thirunarayanan Balathandayuthapani
MDEV-40621 InnoDB: Failing assertion: doc_id == src_node->last_doc_id

AuxRecordReader::default_word_processor(): InnoDB fails to consider
the ilist data can be stored externally while decoding the auxiliary
table record.
PranavKTiwari
Added test case.
Oleksandr Byelkin
Merge fix
ParadoxV5
MDEV-40647 OOB read in IO Thread if the FDEv does not support Rotate Events

If the replication IO Thread receives a Rotate event following a Format
Description event (FDE) with no post-header length for Rotate events,
the Rotate event’s parser constructor indexes
the FDE’s post-header lengths array out of bounds.
This commit defends against this situation by checking before the
constructor that the FDE describes Rotate events as recognized at all.

In practice, because the Binlog Dump thread generates a Fake
`ROTATE_EVENT` **before** sending the FDE, it has pinned
Rotate events’ post-header length to 8 regardless of FDEs.
This fix solution considers that the FDE’s description should still be
respected, matching the constructor.

Reviewed-by: Kristian Nielsen <[email protected]>
Alexander Barkov
MDEV-39587 Package-wide TYPE for variable declarations

SET sql_mode=ORACLE;
DELIMITER $$
CREATE OR REPLACE PACKAGE pkg AS
  -- Declare a package public data type
  TYPE varchar_array IS TABLE OF VARCHAR(2000) INDEX BY INTEGER;
END;
$$
DELIMITER ;
DELIMITER $$

CREATE OR REPLACE PROCEDURE p1 AS
  v pkg.varchar_array; -- Use the package public data type
BEGIN
  v(0):='test';
  SELECT v(0);
END;
$$
DELIMITER ;

Note, the change is done only for sql_mode=ORACLE, because the TYPE
declaration is not available for the default mode.

Where package-wide types are available
--------------------------------------
- Variabe list type:
    DECLARE var pkg1.type1;

- RETURN type for a package routine:
    CREATE FUNCTION .. RETURN pkg1.type1 ...

- Parameter type for a package routine:
    PROCEDURE p1(param1 pkg1.type1);

- Assoc array element type:
    TYPE assoc1_t IS TABLE OF pkg1.type1 ...

- REF CURSOR RETURN type:
    TYPE cur1_t IS REF CURSOR RETURN pkg1.type1;

Change details
--------------

- Adding a member Lex_length_and_dec_st::m_foreign_module_type
  It's set to true when the data type was initialized from a TYPE
  in foreign routine (e.g. in PACKAGE spec).
  It's needed to prevent use of qualified identifiers in public contexts,
  i.e. in schema public routine parameter types and schema publuc function
  RETURN types.
  Adding a helper method sp_head::check_applicability() which prevents
  use of qualified types in public context.

- Adding a helper method sp_head::raise_unknown_data_type().

- Adding methods LEX::set_field_type_typedef_package_spec() for
  2-step and 3-step qualified indentifiers.
  It's used in field_type_all_with_typedefs which covers cases:
  - Variabe list type        : DECLARE var pkg1.type1;
  - RETURN type              : CREATE FUNCTION .. RETURN pkg1.type1 ...
  - Parameter type          : PROCEDURE p1(param1 pkg1.type1);
  - Assoc array element type : TYPE assoc1_t IS TABLE OF pkg1.type1 ...

- Adding a method LEX::declare_type_ref_cursor_return_typedef().
  It handles cases when a new TYPE REF CURSOR RETURN is declared,
  for both for qualified RETURN types and non-qualified RETURN types:
  - TYPE cur0_t IS REF CURSOR RETURN rec1_t;
  - TYPE cur0_t IS REF CURSOR RETURN pkg1.rec1_t;
  - TYPE cur0_t IS REF CURSOR RETURN db1.pkg1.rec1_t;

  The code was moved from LEX::declare_type_ref_cursor() into
  LEX::declare_type_ref_cursor_return_typedef() and extended
  to cover qualified RETURN types.

- Adding a method Sql_path::find_package_spec_type().
  It iterates through all schemas specified in @@path and searches
  for the given type in the given package.

- Adding a helper method sp_pcontext::type_defs_add_ref_cursor()
  to reuse the code.

- Adding a new method sp_package::get_typedef() to search
  for TYPE definitions in PACKAGE specifications.

- Adding a new method sp_head::get_typedef_package_spec()
  to search for TYPE definitions used by a PROCEDURE or FUNCTION.

- Adding a helper method
    Sp_handler::sp_cache_routine_reentrant_suppress_errors
  Adding a method Sp_handler::find_package_spec().
Oleksandr Byelkin
Merge branch 'bb-10.11-release' into bb-11.4-release
Oleksandr Byelkin
Merge branch '11.4' into bb-11.4-release
bsrikanth-mariadb
Do not dump stats for read only engines' tables.

Stats for tables from engines such as Archive, S3, PerfSchema, and
Sequence shouldn't be recorded in the context.

Added few tests for Sequence's engine tables like seq_1_to_5.
Oleksandr Byelkin
Merge branch 'bb-11.4-release' into bb-11.8-release
Sergei Golubchik
BUG#39449066 Refactor performance schema OBJECT_INSTANCE_BEGIN columns

Fix for MariaDB 10.6
Fariha Shaikh
MDEV-39459 Fix bad sync pattern for chain replication MTR tests

In chain replication (1->2->3), syncing only server_3 after
save_master_gtid on server_1 does not guarantee server_2 has committed,
because server_2's binlog dump thread can send events to server_3 before
commit_ordered() completes on server_2.

Fix affected rpl tests by syncing server_2 before server_3, and update
result files accordingly.

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.
Oleksandr Byelkin
Merge branch '10.6' into 10.11
sjaakola
MDEV-36677 rsync sst fails with different innodb_log_group_home_dir and datadir

Backported the fix done by Pekka Lampio for mariaDB 11.4 in PR
https://github.com/mariadb-corporation/codership-mariadb-server/pull/543

The PR has a fix for wsrep_sst_rsync script and new mtr test:
galera_3nodes.galera_mdev_36677" to check that the rsync SST method of Galera
works correctly also when the joiner node store InnoDB log files in a dedicated
directory separate from the data dictionary

Note: merging this PR to 11.4 may not be fully functional as there are other
changes in the rsync SST script. Take a look at the original 11.4 PR when merging.
Yuchen Pei
MDEV-24813 [to-squash] Fix avoid_deadlock_with_blocked failure in 32bit

Similar to the previous sub-block, could be a race condition
bsrikanth-mariadb
MDEV-40553: unprintable gis ranges in trace and context

When ranges were specified in a query for GIS types, the recorded trace
and context couldn't print the range information. Instead, it only
showed unprintable_geometry_value.

This PR extends the geometric field type Field_geom to print appropriate
key value in the range.
drrtuy
fix: MDEV-40610 fix for SQL injection in DEFAULT expression.
Rex Johnston
MDEV-39492 Parallel Query: cover TPC-H Q1

The query the last few commits were for, run end to end: a filtered scan
of one large table into four SUMs, three AVGs and a COUNT, grouped on two
columns. It is the shape that showed pre-aggregation was worth building
-- measured, it spent 4.2 of its 4.8 seconds on the manager, which is
work no number of workers reduced. Now every worker's whole chunk leaves
it as six rows.

Compared against the serial answer as it stands rather than as a
fingerprint, because its own ORDER BY is applied to the finished groups.

This commit was prepared with Claude Code.
Yuchen Pei
MDEV-40486 Length check for vector fields in CREATE TABLE ... SELECT

The changes of MDEV-39558 2b6529426a7e7c65d286e093d84138be9dcc34a3
added length check assertion in Field_varstring constructors, and
length check in type inference for SELECT set operations, to emit
errors before reaching the assertions.

That change caused an error to turn into an assertion failure in a
separate path, when the length limit violation is not detected before
tripping the assertion. So in this patch we fix it by adding an
earlier length check in that path.

The reason that we place this check inside
Item_func_vec_fromtext::fix_length_and_dec rather than say
`create_field_for_create_select is for consistency:

If

create table t1 as select
vec_fromtext(concat('[',group_concat(1),']')) as c1 from seq_1_to_64;

fails due to length limit violation, then so should

create table t1 (v vector(64) not null);
insert into t1 select vec_fromtext(concat('[',group_concat(1),']'))
from seq_1_to_64;

Also use max_char_length() instead of max_length. This is a more
accurate length of characters. And add handling of empty string edge
case. Added testcases accordingly.

The change that uses max_char_length() causes side effects where
creating a table using a VEC_FROMTEXT(CHAR(1)) would result in a
0-dimensional vector field. This is accurate but 0-dim vector table
fields should not be allowed. So we add a check for that too, as well
as an exception of (?) prepared statement placeholders.

Also fixed the underflow in (args[0]->max_length - 1) * 2 when the
arg's max length is 0. Previously this underflow would cause

create table t1 select vec_fromtext(NULL)

to fail with ER_TOO_BIG_FIELDLENGTH. Now the zero length check would
cause it to fail with a different error (ER_WRONG_ARGUMENTS).
Sergei Golubchik
rename plugin.cmake -> mariadb-plugin-config.cmake

to make it possible for the same plugin to compile inside and outside
the server source tree.

switch example plugins to use that.
Oleksandr Byelkin
Merge branch '10.11' into bb-10.11-release
ParadoxV5
MDEV-40365/MDEV-40366 test fixes

* The crafted invalid FDEs were omitted their checksums, even though
  the base code (still) adds the checksum length to the event length.
  This commit fixes this discrepancy by not skipping the event footer
  step (write the checksum, and finish up encryption if active),
  so the fault injections are more self-contained.

  This discrepancy did not matter in practice because
  * The event loading simply assumes the first
    few bytes of the next event as the unused checksum.
  * The fix to `get_checksum_alg()` is detecting invalidity before the
    code reaches the fixed parser-contructor.
    This is rather an implementation detail, though, as the constructor
    fix would come to effect if we refactor `get_checksum_alg()` away.

* This commit also disables echoing `SHOW BINLOG EVENTS IN`
  to the results in case the `$binlog_file` is not consistent.
Sergei Golubchik
MDEV-40571 insufficient validation of frm data when opening a table

numerous checks that the frm is valid, no OOB reads,
values make sense (number of keyparts not less than number of keys,
no keys means no keyparts, number of long unique fields is not larger than
number of fields, fields values in the record don't overlap and don't
go over record ends, and so on). most asserts were changed to if()'s
PranavKTiwari
Added test case.
Teemu Ollakka
crash in wsrep_provider_options_init() with wsrep provider plugin

wsrep_provider_plugin_init() marked wsrep_provider_options read only
by mutating the sys_var's flags directly, instead of going through the
sys_var layer. Since MDEV-40341 move_allocated_sysvars_to_root() moves
the value of every read only global string sysvar into the read only
memroot and clears the ALLOCATED flag. wsrep_provider_options_init()
then called my_free() on memroot memory, which aborted on the garbage
allocation header.

Remove the flag mutation instead of working around its effects.
wsrep_provider_options stays a normal read-write variable and is kept
in sync with the provider whenever a plugin sysvar changes.

SET on wsrep_provider_options is still rejected while the
wsrep-provider plugin is loaded, via the existing
wsrep_provider_options_check() function. Its error message now states
the real reason instead of "is a read only variable", which was
misleading: the variable is not statically read only, and
information_schema correctly reports READ_ONLY=NO for it.
Sergei Golubchik
cleanup: sys_vars.secure_file_priv test
Fariha Shaikh
MDEV-39459 Fix bad sync pattern for chain replication MTR tests

In chain replication (1->2->3), syncing only server_3 after
save_master_gtid on server_1 does not guarantee server_2 has committed,
because server_2's binlog dump thread can send events to server_3 before
commit_ordered() completes on server_2.

Fix affected rpl tests by syncing server_2 before server_3, and update
result files accordingly.

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.
Rex Johnston
MDEV-39492 Parallel Query: MIN and MAX merged the row, not the partial

A grouped pre-aggregation answered a MIN() or MAX() wrongly whenever the
manager's aggregation table outgrew memory: with tmp_table_size squeezed
so that 300 groups do not fit, the same query gave one answer serially
and another in the workers.

end_update() folds a partial into a group with update_field(), which
takes the pending direct value. When the table fills, the server moves it
to disk and hands the rest of the rows to end_unique_update() instead,
which folds them a different way round: it calls reset_field() first,
before it knows whether the group is new, and only calls update_field()
if the write turns out to be a duplicate.

Item_sum_sum and Item_sum_count are built for that. Their reset_field()
records in direct_reseted_field that the direct value went into the field
rather than being added, and their update_field() honours the flag, so
the value is merged once either way. Item_sum_min_max cleared
direct_added in reset_field() and had no such flag, so the update_field()
that followed compared args[0] -- the base-table column, holding the row
the worker shipped -- against the group. What that row carries is one
row of the group, not the group's extreme, so the answer was the extreme
over one row per worker per flush.

Give Item_sum_min_max the flag its siblings have. Nothing else in the
server reaches this: direct_add() has no other caller.

The test makes the difference visible rather than incidental. The group's
shipped row is its smallest pk, so a MAX() that merged the row instead of
the partial reports a smaller number, while the MIN() beside it looks
right either way.

This commit was prepared with Claude Code: it reasoned that the shape had
to be wrong, could not make it fail until it arranged for the manager's
table to overflow while the workers' tables did not, and wrote the fix
and the test.
bsrikanth-mariadb
Do not dump stats and const rows for read only engines' tables.

Stats for tables from engines such as Archive, S3, PerfSchema, and
Sequence shouldn't be recorded in the context. Similarly, const row
records should also not be stored in the context.

Added few tests for Sequence's engine tables like seq_1_to_5.
Sergei Golubchik
MDEV-40589 default exclude list for secure-file-priv

don't allow to access /proc if secure-file-priv="",
set secure-file-priv=/ to access everything and disable the exclude list

remove test for a conditon that can no longer happen
Thirunarayanan Balathandayuthapani
MDEV-40621 InnoDB: Failing assertion: doc_id == src_node->last_doc_id

AuxRecordReader::default_word_processor(): InnoDB fails to consider
the ilist data can be stored externally while decoding the auxiliary
table record.
ParadoxV5
[temp] Test MDEV-40647

It does not typically fail, but should trip MSAN.
Alexey Botchkov
MDEV-39750 ExtractValue does not control recursion depth.

Stack exhaustive test shouldn't be ran with the ASAN/UBSAN.
Rex Johnston
MDEV-39492 Parallel Query: merge a partial AVG per group

AVG was refused on the grounds that an average cannot be averaged, and
that is true of the value but not of what a worker actually has. Its
temp-table field holds the pair the average is computed from -- the sum
and the count of values that went into it -- and a pair like that merges
by adding both halves. A worker accumulating a group into its own table
therefore already has, in the shipped row, exactly what the manager needs.

  - Item_sum_avg::direct_add() takes that pair. The sum half rides on
    Item_sum_sum's own direct_* members, so a count of zero is told to it
    the way it tells itself a NULL sum: a null pointer for the decimal
    overload, a flag for the real one, and nothing is merged.
  - reset_field() and update_field() honour it, one starting a group's
    pair from the partial and the other adding the partial into it. Both
    also record direct_reseted_field, so that a switch to
    end_unique_update() -- which resets before it knows whether the group
    is new -- merges the pair once rather than twice or not at all.
  - pwt_manager::direct_add_partials() reads the shipped column the way
    the aggregate reads its own field: the sum packed at the front and
    the count in the eight bytes after it, at the sizes the aggregate was
    laid out with.

Only with a GROUP BY, and for the shape of the column rather than the
arithmetic. Item_sum_avg::create_tmp_field() lays the pair out only for a
table it is asked to key; for any other it gives a plain column holding
the average, which nothing can be merged into. A worker's grouping table
is keyed, so a grouped query has the pair to ship and an ungrouped one
does not.

Verified against the serial answer over a decimal average, a real one, a
few groups and many, and a group whose averaged column is entirely NULL
-- where the partial is a count of zero and the answer has to stay NULL
rather than become 0.

This commit was prepared with Claude Code: it worked out that the pair
was already in the field, wrote the overloads and the unpacking, and
wrote the tests.
Yuchen Pei
MDEV-40632 Use my_fprintf in trx_print_low

To fix for windows %p in `fprintf(f, "TRANSACTION (%p)", trx);` is not
prefixed with 0x
Fariha Shaikh
MDEV-39459 Fix bad sync pattern for chain replication MTR tests

In chain replication (1->2->3), syncing only server_3 after
save_master_gtid on server_1 does not guarantee server_2 has committed,
because server_2's binlog dump thread can send events to server_3 before
commit_ordered() completes on server_2.

Fix affected rpl tests by syncing server_2 before server_3, and update
result files accordingly.

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.
drrtuy
fix: MDEV-40386 disable MTR tests for MSAN builds b/c MSAN build is unstable.
Oleksandr Byelkin
Merge fix
Yuchen Pei
MDEV-40632 Use my_fprintf in trx_print_low

To fix for windows %p in `fprintf(f, "TRANSACTION (%p)", trx);` is not
prefixed with 0x