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
Oleg Smirnov
MDEV-38574 Rename cloning functions of class Item and descendants

Rename cloning methods of class Item and its descendants
in the following way:

  (from)            (to)
do_build_clone  -> deep_copy
  build_clone  -> deep_copy_with_checks

do_get_copy  -> shallow_copy
  get_copy  -> shallow_copy_with_checks

to better reflect their functionality.

Also make Item::deep_copy() and shallow_copy() protected.
Outside users should call deep_copy_with_checks()
and shallow_copy_with_checks().
Oleksandr Byelkin
Wolfssl v5.8.4-stable
Sergey Vojtovich
MDEV-37862 - innodb.gap_locks test failure: 0 lock structs, 0 row locks

Test was affected by incompletely closed preceding connections.

Make test agnostic to concurrent connections by querying
InnoDB status only for connections that it uses.

This is an addition to 3b2169f0d1e, which didn't handle a case when
preceding test has active transaction on disconnect.
Alexey Botchkov
MDEV-35766 ST_PointOnSurface returns NULL with Polygon in some case.

We have to take the ending of a polygon into account.
So the order of checking the scan changed.
Thirunarayanan Balathandayuthapani
MDEV-37042  innodb_undo_log_truncate=ON leads to out-of-bounds write

During undo tablespace truncation, pages with LSNs older than the
tablespace creation LSN may still exist in the buffer pool and get
submitted to the doublewrite buffer. When mtr_t::commit_shrink() is
invoked shortly after doublewrite batch submission,
this can lead to out-of-bounds write errors.

Fix:
===
buf_dblwr_t::flush_buffered_writes_completed() : skip doublewrite
processing for pages where the page LSN is older
than the tablespace creation LSN. Such pages belong to the old
tablespace before truncation and should not be written through the
doublewrite buffer.
Marko Mäkelä
MDEV-38595: Simplify InnoDB doublewrite buffer creation

buf_dblwr_t::create(): Create the doublewrite buffer in a single
atomic mini-transaction. Do not write any log records for
initializing any doublewrite buffer pages, in order to avoid
recovery failure with innodb_log_archive=ON starting from the
very beginning.

The mtr.commit() in buf_dblwr_t::create() was observed to
comprise 295 mtr_t::m_memo entries: 1 entry for the
fil_system.sys_space and the rest split between page 5 (TRX_SYS)
and page 0 (allocation metadata). We are nowhere near the
sux_lock::RECURSIVE_MAX limit of 65535 per page descriptor.

Reviewed by: Thirunarayanan Balathandayuthapani
Tested by: Saahil Alam
Alexey Botchkov
MDEV-15479 Empty string is erroneously allowed as a GEOMETRY column value.

Empty string disallowed.
Sergei Golubchik
Add test cases for comment handling in audit plugin

The fix was implemented in 635559a.

Previously with the hand-rolled SQL string parsing in the audit plugin, there
were many simple ways to bypass server audit logging by placing comments
strategically in the query string. The fix in 635559a removes the custom SQL
string parser which addresses the issue.

We now add MTRs for validation.
Alexander Barkov
MDEV-10152 Add support for TYPE .. IS REF CURSOR

Version#2

In progress
Oleg Smirnov
MDEV-38574 Rename cloning functions of class Item and descendants

Rename `Item::clone_item()` to `clone_constant()`, and do
the same for any overloads in descendant items.
The function returns non-NULL only for items that represent
constant literals.
Sergei Golubchik
MDEV-38604 Assertion `thd->utime_after_query >= thd->utime_after_lock' failed in query_response_time_audit_notify on 2nd execution of SP with query cache

even when PS is served from a query cache, thd->utime_after_query
must be updated.

also, backport the assert from 11.8
Vladislav Vaintroub
MDEV-37527 Client plugins are underlinked

Provide test case
KhaledR57
MDEV-37072: Implement IS JSON predicate

Add support for the SQL standard IS JSON predicate with the syntax:
expr IS [ NOT ] JSON [ { VALUE | ARRAY | OBJECT | SCALAR } ]
[ { WITH | WITHOUT } UNIQUE [ KEYS ] ]

The predicate allows checking if an expression is valid JSON
and optionally constrains the JSON type (VALUE, ARRAY, OBJECT,
SCALAR) and whether object keys are unique.

The implementation includes:
- Basic IS JSON validation
- Support for NOT operator
- Type constraints (VALUE, ARRAY, OBJECT, SCALAR)
- Unique keys constraint (WITH/WITHOUT UNIQUE KEYS)
Oleksandr Byelkin
10.6 adjasts
Alexey Botchkov
MDEV-35766 ST_PointOnSurface returns NULL with Polygon in some case.

We have to take the ending of a polygon into account.
So the order of checking the scan changed.
Raghunandan Bhat
MDEV-38487: Prevent aggregate function cloning when pushing HAVING into WHERE

Problem:
  When building a pushable condition that can be pushed from HAVING into
  WHERE, the server tries to clone aggregate functions. This is not
  necessary because aggregate functions can not be pushed into WHERE
  anyway.

Fix:
  This fix introduces a check within `Item::build_pushable_cond` to skip
  cloning aggregate functions.

Also fixes assert failure in MDEV-38492, by adding a missing copy method
for `Item_aggregate_ref`.
Marko Mäkelä
MDEV-23298 fixup: have_perfschema.inc
Hemant Dangi
MDL BF-BF conflict on ALTER and INSERT with multi-level foreign key parents

Issue:
On galera write node INSERT statements does not acquire MDL locks on it's all child
tables and thereby wsrep certification keys are also added for limited tables, but
on applier nodes it does acquire MDL locks for all child tables. This can result
into MDL BF-BF conflict on applier node when transactions referring to parent and
child tables are executed concurrently. For example:

Tables with foreign keys: t1<-t2<-t3<-t4
Conflicting transactions: INSERT t1 and DROP TABLE t4

Wsrep certification keys taken on write node:
- for INSERT t1: t1 and t2
- for DROP TABLE t4: t4

On applier node MDL BF-BF conflict happened between two transaction because
MDL locks on t1, t2, t3 and t4 were taken for INSERT t1, which conflicted
with MDL lock on t4 taken by DROP TABLE t4.
The Wsrep certification keys helps in resolving this MDL BF-BF conflict by
prioritizing and scheduling concurrent transactions. But to generate Wsrep
certification keys it needs to open and take MDL locks on all the child tables.

On applier nodes Write_rows event is implicitly a REPLACE, deleting all conflicting
rows which can cause cascading FK actions and locks on foreign key children tables.

Solution:
For Galera applier nodes the Write_rows event is considered pure INSERT
which will never cause cascading FK actions and locks on foreign key children tables.
Alexey Botchkov
MDEV-35426 Stack smashing in spider_db_mbase::xa_end (opt), ASAN: stack-buffer-overflow in Binary_string::q_append, and Assertion `str.alloced_length() >= str.length() + data_len' failed in spider_string::q_append on SELECT.

The buffer size has to be increased because we store the hexadecimal
representation of the data which takes twice it's length plust the '0x'
starter. Also string representation of the long should be increased.
Aleksey Midenkov
MDEV-32317 ref_ptrs exhaust on multiple ORDER by func from winfunc

Each ORDER and WHERE slot may generate split, see code like this:

  if ((item->with_sum_func() && item->type() != Item::SUM_FUNC_ITEM) ||
    item->with_window_func())
  item->split_sum_func(thd, ref_ptrs, all_fields, SPLIT_SUM_SELECT);

Such kind of code is done in JOIN::prepare(), setup_order(),
setup_fields(), setup_group() and split_sum_func2() itself.

Since we are at the phase of ref_ptrs allocation, items are not fixed
yet and we cannot calculate precisely how much ref_ptrs is needed. We
can estimate at most how much is needed. In the worst case each window
function generates split on each ORDER BY field, GROUP BY field and
WHERE field, so the counts of these should be multiplied by window
funcs count.

As the split can be done in both setup_without_group() and
JOIN::prepare() simultaneously, the factor of window funcs should be
multiplied by 2.

The similar case may be with inner sumfunc items as of the condition

  item->with_sum_func() && item->type() != Item::SUM_FUNC_ITEM

but factor of these is harder to predict at the stage of unfixed
items.
Hemant Dangi
MDL BF-BF conflict on ALTER and INSERT with multi-level foreign key parents

Issue:
On galera write node INSERT statements does not acquire MDL locks on it's all child
tables and thereby wsrep certification keys are also added for limited tables, but
on applier nodes it does acquire MDL locks for all child tables. This can result
into MDL BF-BF conflict on applier node when transactions referring to parent and
child tables are executed concurrently. For example:

Tables with foreign keys: t1<-t2<-t3<-t4
Conflicting transactions: INSERT t1 and DROP TABLE t4

Wsrep certification keys taken on write node:
- for INSERT t1: t1 and t2
- for DROP TABLE t4: t4

On applier node MDL BF-BF conflict happened between two transaction because
MDL locks on t1, t2, t3 and t4 were taken for INSERT t1, which conflicted
with MDL lock on t4 taken by DROP TABLE t4.
The Wsrep certification keys helps in resolving this MDL BF-BF conflict by
prioritizing and scheduling concurrent transactions. But to generate Wsrep
certification keys it needs to open and take MDL locks on all the child tables.

On applier nodes Write_rows event is implicitly a REPLACE, deleting all conflicting
rows which can cause cascading FK actions and locks on foreign key children tables.

Solution:
For Galera applier nodes the Write_rows event is considered pure INSERT
which will never cause cascading FK actions and locks on foreign key children tables.
Oleksandr Byelkin
MDEV-35288 Assertion `!is_cond()' failed in virtual longlong Item_bool_func::val_int()

Boolean function now uses val_bool to get string result (val_str())
Rophy Tsai
MDEV-38431: fix database pointer calculation for long passwords

When a client connects with CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA
capability and a password >= 251 bytes, the server incorrectly
calculates the database name pointer.

For passwords >= 251 bytes, LENENC uses a 3-byte prefix (0xFC + 2 bytes),
but the old code assumed a 1-byte prefix. Fix by using the passwd pointer
which has already been advanced past the length prefix by
safe_net_field_length_ll().

Also fix db pointer calculation for old protocol (!CLIENT_SECURE_CONNECTION)
where the password is null-terminated and needs +1 to skip the terminator.
Oleksandr Byelkin
new CC
Mohammad Tafzeel Shams
MDEV-38140: InnoDB index corruption after UPDATE affecting virtual
columns

Issue:
- Purge thread attempts to purge a secondary index record that is not
  delete-marked.

Root Cause:
- When a secondary index includes a virtual column whose v_pos is
  greater than the number of fields in the clustered index record, the
  virtual column is incorrectly skipped while reading from the undo
  record.
- This leads the purge logic to incorrectly assume it is safe to purge
  the secondary index record.
- The code also confuses the nth virtual column with the nth stored
  column when writing ordering columns at the end of the undo record.

Fix:
- In trx_undo_update_rec_get_update(): Skip a virtual column only
  when v_pos == FIL_NULL, not when v_pos is greater than the number
  of fields.
- In trx_undo_page_report_modify(): Ensure ordering columns are
  written based on the correct stored-column positions, without
  confusing them with virtual-column positions.
Alexey Botchkov
MDEV-36058 ST_CROSSES returns 0 instead of NULL.

Add check for the arguments.
KhaledR57
MDEV-36107 MDEV-36108 Enhance mysqltest language with expression evaluation and variable substitutions

mysqltest had limited scripting capabilities, requiring complex
workarounds for mathematical calculations and string manipulations
in test cases. This commit solves these limitations by adding a new
`$(...)` syntax that enables direct evaluation of mathematical, logical,
and string expressions within test scripts.

Expression Evaluation (MDEV-36107):
- Recursive descent parser supporting arithmetic, logical, comparison,
  and bitwise operators with proper precedence
- Support for integers (decimal, hex, binary), booleans, strings, and
  NULL values
- Variable substitution within expressions
- Integration with existing mysqltest control flow

String Functions (MDEV-36108):
- Base conversion functions supporting bases 2-62
- String manipulation and processing functions
- Regular expression functions
- Conditional and numeric utility functions

The implementation enhances mysqltest's scripting capabilities while
maintaining full backward compatibility.
gkodinov
MDEV-38642: Missing Null terminator in the definition of mysqldump's --system typelib

There was a missing NULL element terminator for --system's type
library definition.

This was causing a crash in find_type_eol when e.g. an incomplete
value was passed to --system where it keeps iterating until it
finds the NULL as a typelib element.

Fixed by appending a NullS to the definition.
Test case added.
Alexey Botchkov
MDEV-36058 ST_CROSSES returns 0 instead of NULL.

Add check for the arguments.
Marko Mäkelä
MDEV-38618 Unused variable dict_table_t::fk_max_recusive_level

Ever since mysql/mysql-server@377774689bf6a16af74182753fe950d514c2c6dd
was applied in commit 2e814d4702d71a04388386a9f591d14a35980bfed
the data member dict_table_t::fk_max_recusive_level is never being
read, only initialized as 0. Let us follow the lead of
mysql/mysql-server@b22ac19f104c3b3654601b387c37ee82af180d7a
and remove this useless field.
Thirunarayanan Balathandayuthapani
MDEV-38667  Assertion in diagnostics area on DDL stats timeout

Reason:
======
During InnoDB DDL, statistics updation fails due to lock wait
timeout and calls push_warning_printf() to generate warnings
but then returns success, causing the SQL layer
to attempt calling set_ok_status() when the diagnostics area
is already set.

Solution:
=========
By temporarily setting abort_on_warning to false around operations
that prevents warning to error escalation and restore the original
setting after calling HA_EXTRA_END_ALTER_COPY for alter operation.
Tony Chen
Add additional password obfuscation test cases for server audit plugin

- GRANT SELECT ... IDENTIFIED BY
- CHANGE MASTER ... MASTER_PASSWORD
- CREATE SERVER ... PASSWORD
- ALTER SERVER ... PASSWORD

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
Vladislav Vaintroub
pcre2 10.47
Marko Mäkelä
MDEV-21816 Suboptimal implementation of my_convert()

my_convert(): Correctly identify unaligned access by invoking memcpy(),
which will be translated to a single x86 MOV instruction already by
GCC 4.8.5. Also, process the data 64 bits at a time when possible.

The use of memcpy() prevents GCC from emitting a SIMD instruction that
expects aligned memory (MDEV-37148, MDEV-37786, MDEV-38398) and
allows us to enable the fast path across all ISA.

Reviewed by: Alexander Barkov
Reviewed by: Vladislav Vaintroub
Alexey Botchkov
MDEV-35426 Stack smashing in spider_db_mbase::xa_end (opt), ASAN: stack-buffer-overflow in Binary_string::q_append, and Assertion `str.alloced_length() >= str.length() + data_len' failed in spider_string::q_append on SELECT.

The buffer size has to be increased because we store the hexadecimal
representation of the data which takes twice it's length plust the '0x'
starter. Also string representation of the long should be increased.
Marko Mäkelä
fixup! 9a4fce9ff36c07f73682893069d167ecb36a5096

Fix ut_ad(!resize_log.is_opened()) in log_t::archive_new_write()
Sergei Golubchik
MDEV-38604 fix SP execution too
Alexey Botchkov
MDEV-35766 ST_PointOnSurface returns NULL with Polygon in some case.

We have to take the ending of a polygon into account.
So the order of checking the scan changed.
Alexey Botchkov
MDEV-35766 ST_PointOnSurface returns NULL with Polygon in some case.

We have to take the ending of a polygon into account.
So the order of checking the scan changed.
Sergei Golubchik
MDEV-32317 fix the test for --view