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
Aleksey Midenkov
MDEV-25529 ALTER TABLE FORCE syntax improved

Improves ALTER TABLE syntax when alter_list can be supplied alongside a
partitioning expression, so that they can appear in any order. This is
particularly useful for the FORCE clause when adding it to an existing
command.

Also improves handling of AUTO with FORCE, so that AUTO FORCE
specified together provides more consistent syntax, which is used by
this task in further commits.
Aleksey Midenkov
Vanilla: TimestampString for printing timestamps
Yuchen Pei
MDEV-38752 [wip] check supertype

"unimplemented" stubs return true
Raghunandan Bhat
MDEV-39271: SIGSEGV in `check_word`|(`extract_date_time`|`extract_oracle_date_time`)

Problem:
  Date and time functions - `STR_TO_DATE` and `TO_DATE` (in Oracle mode)
  both use `check_word` to check if a string token matches a valid
  locale-specific day or month name. Server crashed because of an
  un-initialized typelib member(`type_lengths`) for date locales which
  are not present in `Oracle_date_locale` (e.g: `ar_DZ`).

Fix:
  Initialize `type_lengths` for all supported locales by iterating over
  `my_locales` array instead of `Oracle_date_locale` during server
  startup.
Vladislav Vaintroub
MDEV-39258 Make THIRD_PARTY_DOWNLOAD_LOCATION settable

Also, on request of Razvan, increase HeidiSQL download timeout
Aleksey Midenkov
Vanilla: cleanup for vers_set_starts() and starts_clause
Raghunandan Bhat
MDEV-39271: SIGSEGV in `check_word`|(`extract_date_time`|`extract_oracle_date_time`)

Problem:
  Date and time functions - `STR_TO_DATE` and `TO_DATE` (in Oracle mode)
  both use `check_word` to check if a string token matches a valid
  locale-specific day or month name. Server crashed because of an
  un-initialized typelib member(`type_lengths`) for date locales which
  are not present in `Oracle_date_locale` (e.g: `ar_DZ`).

Fix:
  Initialize `type_lengths` for all supported locales by iterating over
  `my_locales` array instead of `Oracle_date_locale` during server
  startup.
Raghunandan Bhat
MDEV-39265: Assertion `(mem_root->flags & 4) == 0` failed upon 2nd execution `USING DEFAULT` with sequence

Problem:
  When a prepared statement uses `DEFAULT` with sequence, on its
  second or subsequent execution, server tries to allocate TABLE_LIST
  object (used for adding sequence table to `internal_tables` list) on
  statement's memory root. This fails with an assert because statement's
  memory root is marked read-only after the first execution.

  CREATE SEQUENCE s;
  CREATE TABLE t (a INT DEFAULT(NEXTVAL(s)));
  PREPARE stmt FROM "UPDATE t SET a = ?";

  EXECUTE stmt USING 3; -- first execution, marks mem_root read-only
  EXECUTE stmt USING DEFAULT;  -- tries to allocate on second execution

Fix:
  Temporarily clear the read-only flag on the statement memory root to
  allow the allocation. Also adds a debug hook to verify allocation
  happens not more than once per prepared statement and per internal
  table added to the list.
Aleksey Midenkov
Vanilla: get_next_time() comment
Sergei Petrunia
Fix in condition pushdown code: don't pass List<Field_pair> by value.

Affected functions:
  find_matching_field_pair(Item *item, List<Field_pair> pair_list)
  get_corresponding_field_pair(Item *item, List<Field_pair> pair_list)

Both only traverse the pair_list.
They use List_iterator so we can't easily switch to using const-reference.
Thirunarayanan Balathandayuthapani
MDEV-38822 Lock wait timeout during CREATE TABLE AS SELECT FROM mysql.innodb_table_stats

Analysis:
=========
1) Starts the CREATE TABLE ... SELECT and acquires an Intent Shared lock on
mysql.innodb_table_stats to read the rows. (Transaction: T1)

2) The table t1 is populated. As part of the post-copy phase
(introduced by MDEV-35163), InnoDB triggers the statistics update.

3) InnoDB opens a new internal transaction to update the statistics.
This transaction(T2) attempts to acquire an LOCK_X on the same
table in mysql.innodb_table_stats. T2 (x-lock) must wait for T1 to
commit or rollback because X-locks are incompatible with
IS locks from other trasnaction.

Solution:
========
Currently, Intermediate tables don't trigger dict_stats_update_if_needed(),
so they require explicit stats update via alter_stats_rebuild().
For CREATE...SELECT stats are updated automatically through the normal DML
path via dict_stats_update_if_needed()

Skip calling dict_stats_update() in alter_stats_rebuild() for
non-intermediate tables when using copy algorithm, since their statistics will
be updated automatically via dict_stats_update_if_needed().
Aleksey Midenkov
Vanilla: cleanup for vers_set_starts() and starts_clause
Sergei Petrunia
Derived Condition Pushdown: add more comments.

Add comments to
- find_producing_item()
- Item_field::derived_field_transformer_for_where()
- Item_field::grouping_field_transformer_for_where()

Also note that Item_default_value::grouping_field_transformer_for_where()
is not implemented.
Aleksey Midenkov
Vanilla: converted COMBINE macro to interval2usec inline function
Aleksey Midenkov
MDEV-36362 MariaDB crashes when parsing fuzzer generated PARTITION

Function calls in INTERVAL expression of DDL have little
sense. SETVAL() fails because sequences require opened tables and
vers_set_interval() is called at earlier stage.

The fix throws ER_SUBQUERIES_NOT_SUPPORTED for sequence functions
SETVAL(), NEXTVAL(), LASTVAL() when the context does not allow
subselect (determined by clause_that_disallows_subselect).
Rex Johnston
MDEV-29360 Crash when pushing condition with always false IS NULL into derived

(Edited by Sergei Petrunia)

Problem: when the optimizer attempts to push a condition in form
"merged_view.not_null_column IS NULL" into a derived table other
than the merged_view itself, it may crash.

The cause is this scenario:
1. Condition pushdown code uses walk() with excl_dep_on_grouping_fields()
(or excl_dep_on_table()) to determine whether an Item expression can
be pushed. Item_args::excl_dep_on_table() assumes that any item with
const_item()==1 can be pushed anywhere.

2. Item_func_isnull(not_null_expr) will report const_item()=1 as it
will always evaluate false. However it will have non-const expression
as its argument. As described in #1, this item will be considered pushable.

3. Transformation of item for pushdown is done in "transformer function"
Item_XXX::{derived|grouping}_field_transformer_for_where().
This function will be called for Item_func_isnull's argument.
If the argument is an Item_direct_view_ref, its transformer function
will call find_matching_field_pair() (or find_producing_item())
to locate the origin of the item inside the SELECT we're pushing the
condition into. It will get a NULL pointer (origin not found) and crash.


== The fix ==
Let Item_func_is_null(not_null_expr) report const_item()==true but
let its used_tables() still report those from not_null_expr.

Then, in Item_args, make excl_dep_on_grouping_fields() and
excl_dep_on_table() to check the used tables/columns for items
that report const_item()==true but have non-zero used_tables().
forkfun
MDEV-30295 mysqldump produces syntactically incorrect statement

Remove version-specific executable comments, that were used for backward compatibility
with old MySQL versions (3.2, 4.0, 4.1, 5.0).
Oleg Smirnov
MDEV-38728 Improve join size estimation for ref access

When estimating number of rows produced by a join after `ref` access,
the optimizer assumes all driving table values will find matches
in the inner table. This causes overestimation when the driving
table has more distinct values than the inner table's key.

Fix: use number of distinct values (NDV) for columns in the
join predicate to calculate match probability:
  match_prob = min(1.0, NDV(inner) / NDV(driving))
The expected number of records after `ref` access is then multiplied
by match probability to provide more accurate estimate.

Limitations:
- EITS must be available for both columns in the join predicate
- both columns must be real table fields
- only single-column ref access is supported
- only first key part of the inner table's index is used

TODO:
- WHERE filter on the driving table may reduce NDV and affect estimation.
  Currently, it is handled by evaluating of partial joins cardinality,
  but it is an approximation. Can it be done more precisely?

This commit overwrites only those test results which have been verified,
i.e. provided better join size estimation. Other failing tests are not
yet verified.
Aleksey Midenkov
Vanilla: get_next_time() comment
Marko Mäkelä
Merge MDEV-21423
Daniel Black
Test: can the Debian 11.8+ builders Deb13, Ubu26.04 handle 11.4

The version hacks is faked so the CI systems will run but its obviously
only 11.4
Rex Johnston
MDEV-29360 Crash when pushing condition with always false IS NULL into derived

When a condition containing an always FALSE range part is pushed
down into a derived table, an enclosed outer reference can cause
a null pointer crash.  An example

SELECT * FROM (SELECT id  FROM t1 GROUP BY id) dt1, (SELECT id FROM t2) dt2, t3
  WHERE dt2.id = t3.id AND dt1.id BETWEEN 0 AND (dt2.id IS NULL);

is considered as one that can be pushed into the derived table dt1
because the expression (dt2.id IS NULL) is identified as always false.
On the on other hand the condition still contains a reference to a
column of the table dt2. When pushing the condition to the where clause
of the derived table dt1 a copy of it is created and this copy is
transformed to be used in the new where clause. When the transformation
procedure encounters a reference dt2.id it crashes the server as only
the references to the columns used in the group by list of the
specification of dt1 or those equal to them are expected in the
condition that can be pushed into the where clause of the derived table.

We modify attributes of the item representing Item_func_isnull wrapped
around a non nullable item.  It is still flagged as a const item, but the
used_tables map is now (perhaps) not empty.

For pushing into grouped derived tables,
Item_args::excl_dep_on_grouping_fields is modified to not check for
exclusion of items that are const(ant) but additionally use no tables.

More generically, Item::excl_dep_on_table is similarly modified for
selection of pushed predicates into non grouped derived tables, such
as those seen in the 2nd of our queries in the test case.
Alexey Botchkov
MDEV-39124 XMLTYPE: allow only well-formed XML.

Necessary checks added to the XMLTYPE.
Aleksey Midenkov
Vanilla: TimestampString for printing timestamps
forkfun
MDEV-30295 mysqldump produces syntactically incorrect statement

Remove version-specific executable comments, that were used for backward compatibility
with old MySQL versions (3.2, 4.0, 4.1, 5.0).
Rucha Deodhar
MDEV-39213: json range syntax crash

Analysis:
When json is being parsed, the step decreases without a out-of-bound check
resulting in failure.
Fix:
Before decreasing the step, check if it will result into out of bound.
Aleksey Midenkov
MDEV-25529 ALTER TABLE FORCE syntax improved

Improves ALTER TABLE syntax when alter_list can be supplied alongside a
partitioning expression, so that they can appear in any order. This is
particularly useful for the FORCE clause when adding it to an existing
command.

Also improves handling of AUTO with FORCE, so that AUTO FORCE
specified together provides more consistent syntax, which is used by
this task in further commits.
Monty
Another fix
Monty
fixup
Monty
Fix compilation eror because of -Wframe-larger-than= in sql_show.cc

gcc 15.1.15 gives the following error, possible from static struct
initialization:

/my/maria-11.8/sql/sql_show.cc: In function ‘void __static_initialization_and_destruction_0()’:
/my/maria-11.8/sql/sql_show.cc:11356:1: error: the frame size of 62880 bytes is larger than 16384 bytes [-Werror=frame-larger-than=]

Fixed by adding PRAGMA_DISABLE_CHECK_STACK_FRAME to sql_show.cc
Rex Johnston
MDEV-29360 Crash when pushing condition with always false IS NULL into derived

When a condition containing an always FALSE range part is pushed
down into a derived table, an enclosed outer reference can cause
a null pointer crash.  An example

SELECT * FROM (SELECT id  FROM t1 GROUP BY id) dt1, (SELECT id FROM t2) dt2, t3
  WHERE dt2.id = t3.id AND dt1.id BETWEEN 0 AND (dt2.id IS NULL);

is considered as one that can be pushed into the derived table dt1
because the expression (dt2.id IS NULL) is identified as always false.
On the on other hand the condition still contains a reference to a
column of the table dt2. When pushing the condition to the where clause
of the derived table dt1 a copy of it is created and this copy is
transformed to be used in the new where clause. When the transformation
procedure encounters a reference dt2.id it crashes the server as only
the references to the columns used in the group by list of the
specification of dt1 or those equal to them are expected in the
condition that can be pushed into the where clause of the derived table.

We modify attributes of the item representing Item_func_isnull wrapped
around a non nullable item.  It is still flagged as a const item, but the
used_tables map is now (perhaps) not empty.

For pushing into grouped derived tables,
Item_args::excl_dep_on_grouping_fields is modified to not check for
exclusion of items that are const(ant) but additionally use no tables.

More generically, Item::excl_dep_on_table is similarly modified for
selection of pushed predicates into non grouped derived tables, such
as those seen in the 2nd of our queries in the test case.
Monty
fixup2
Yuchen Pei
MDEV-38752 [wip] check supertype

stubs return true
Rex Johnston
MDEV-29360 Crash when pushing condition with always false IS NULL into derived

(Edited by Sergei Petrunia)

Problem: when the optimizer attempts to push a condition in form
"merged_view.not_null_column IS NULL" into a derived table other
than the merged_view itself, it may crash.

The cause is this scenario:
1. Condition pushdown code uses walk() with excl_dep_on_grouping_fields()
(or excl_dep_on_table()) to determine whether an Item expression can
be pushed. Item_args::excl_dep_on_table() assumes that any item with
const_item()==1 can be pushed anywhere.

2. Item_func_isnull(not_null_expr) will report const_item()=1 as it
will always evaluate false. However it will have non-const expression
as its argument. As described in #1, this item will be considered pushable.

3. Transformation of item for pushdown is done in "transformer function"
Item_XXX::{derived|grouping}_field_transformer_for_where().
This function will be called for Item_func_isnull's argument.
If the argument is an Item_direct_view_ref, its transformer function
will call find_matching_field_pair() (or find_producing_item())
to locate the origin of the item inside the SELECT we're pushing the
condition into. It will get a NULL pointer (origin not found) and crash.
Thirunarayanan Balathandayuthapani
MDEV-39261 MariaDB crash on startup in presence of indexed virtual columns

Problem:
========
A single InnoDB purge worker thread can process undo logs from different
tables within the same batch. But get_purge_table(), open_purge_table()
incorrectly assumes that a 1:1 relationship between a purge worker thread
and a table within a single batch. Based on this wrong assumtion,
InnoDB attempts to reuse TABLE objects cached in thd->open_tables for
virtual column computation.

1) Purge worker opens Table A and caches the TABLE pointer in thd->open_tables.
2) Same purge worker moves to Table B in the same batch, get_purge_table()
retrieves the cached pointer for Table A instead of opening Table B.
3) Because innobase::open() is ignored for Table B, the virtual column
template is never initialized.
4) virtual column computation for Table B aborts the server

Solution:
========
The purge coordinator thread now opens both InnoDB dict_table_t* and
MariaDB TABLE* handles during batch preparation in
trx_purge_attach_undo_recs(). These handles are stored in a new
purge_table_ctx_t structure within each purge_node_t->tables map,
keyed by table_id. When worker thread needs TABLE* for virtual column
computation, it fetches the TABLE* from purge_node_t->tables.

purge_table_ctx_t(): Structure to hold dict_table_t*, MDL_ticket* and
TABLE* for each table during batch processing. TABLE* is being opened
only when virtual index exists for the table.

innobase_open_purge_table(), innobase_close_thread_table(): wrapper to
make open_purge_table(), close_thread_tables() accessible from InnoDB
purge subsystem

trx_purge_table_open(): Modified to open TABLE* using the
coordinator's MDL ticket

open_purge_table(): Accept and use the MDL ticket from coordinator thread

purge_sys_t::coordinator_thd: To track the coordinator thread in purge
subsystem

purge_node_t::end(): Skip innobase_reset_background_thd() for the coordinator
thread to prevent the premature table closure

trx_purge(): Closes the coordinator's TABLE* objects after all workers
are completed
Daniel Black
MDEV-39157 BUILD_TYPE=mysql_release to remove compile flags

BUILD_TYPE=mysql_release changes a bunch of build flags on Linux/UNIX
systems and our CI processes insufficiently test the impacts of these.

This effectively drops the gcc/clang optimization from O3 of a
release down to O2. The performance gains of O3 vs O2 are currently
insufficiently tested (MDEV-19734 is outstanding).

What is clear is amd64v3 is providing the ability of enhanced MMX
instructions which causes segfaults on unaligned addresses
(MDEV-38989 and others). As compilers get smarter and O3 provides
more transforms is safer if the CMAKE_BUILD_TYPE=RelWithDebInfo
experiences of CI have identical compile flags, with BUILD_TYPE=mysql_release
changing to present required features only.

This resolves MDEV-35809 by removing the specialized optimization
for platforms that are unsupported or unmaintained per PR #3744
comments.
Aleksey Midenkov
Vanilla: converted COMBINE macro to interval2usec inline function
abdelrahim
MDEV-38670 Unary minus on empty string returns -0

Normalize -0.0 to +0.0 in Item_func_neg::real_op() to match
binary subtraction behavior. Add test case in type_newdecimal.

add result for tests

fix tests

Revert whitespace changes in type_newdecimal.result

Revert whitespace changes in type_newdecimal.test

normalize all real_op functions in item_func.cc and item_cmpfunc.cc to convert -0.0 to 0.0

normalize all real_op functions in item_func.cc and item_cmpfunc.cc to convert -0.0 to 0.0

normalize all real_op functions in item_func.cc and item_cmpfunc.cc to convert -0.0 to 0.0

normalize all real_op functions in item_func.cc and item_cmpfunc.cc to convert -0.0 to 0.0

normalize -0.0 to 0.0

normalize -0.0 to 0.0

Revert unintended changes in item_func.h

Revert unintended changes in item_func.h (10.6)

fix dtoa.cc and feild.cc and remove past edits

fix buildbot/amd64-ubuntu-2204-debug-ps failed test

fix result which print (-0,0)

rm

fix typo

fix typo