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
cleanup: rename an argument
Kristian Nielsen
MDEV-39277: Performance regression in 12.3.0 when using legacy binlog

The flags trx->active_commit_ordered and trx->active_prepare got cleared in
trx_init() during the fast part of commit (ie. commit_ordered()). This is
too early, then the values are lost when processing reaches
trx_commit_complete_for_mysql(). This caused the MDEV-232 optimization to be
omitted, adding an extra fsync() at the end of commit when using the legacy
binlog and causing severe performance regression.

The values of trx->active_commit_ordered and trx->active_prepare must
persist to the end of commit procesing, same as trx->is_registered. This is
done in this patch, active_commit_ordered and active_prepare are cleared in
trx_deregister_from_2pc() together with trx->is_registered in
trx_deregister_from_2pc(), and asserted to be cleared when
trx->is_registered is set for a following transaction.

Signed-off-by: Kristian Nielsen <[email protected]>
Marko Mäkelä
Merge MDEV-37949
Raghunandan Bhat
MDEV-39356: Server crashes when executing `UPDATE ... FOR PORTION OF` with a normal table

Problem:
  Executing an `UPDATE ... FOR PORTION OF` statement on a table without
  a defined period results in assertion failure. The code in
  `SELECT_LEX::period_setup_conds` attempts to compare a NULL
  period name identifier using `streq()`, which triggers the assertion
  in `strnncoll` funtion.

Fix:
  Replace `streq` with `streq_safe` in `SELECT_LEX::period_setup_conds`
  to handle NULL pointers safely via an early-exit.
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:
========
- Introduced purge_table class which has the following
purge_table: Stores either TABLE* (for tables with indexed virtual
columns) or MDL_ticket* (for tables without) in a single union
using LSB as a flag.
For tables with indexed virtual columns: opens TABLE*, accesses
MDL_ticket* via TABLE->mdl_ticket
For tables without indexed virtual columns: stores only MDL_ticket*.

trx_purge_attach_undo_recs(): Coordinator opens both dict_table_t*
and TABLE* with proper MDL protection. Workers access cached
table pointers from purge_node_t->tables without opening
their own handles

purge_sys.coordinator_thd: Distinguish coordinator from workers
in cleanup logic. Skip innobase_reset_background_thd() for
coordinator thread to prevent premature table closure during
batch processing. Workers still call cleanup to release their
thread-local resources

trx_purge_close_tables():
Rewrite for purge coordinator thread
1) Close all dict_table_t* objects first
2) Call close_thread_tables() once for all TABLE* objects
3) Release MDL tickets last, after tables are closed

Added table->lock_mutex protection when reading (or) writing
vc_templ->mysql_table and mysql_table_query_id. Clear cached
TABLE* pointers before closing tables to prevent stale pointer
access

Declared open_purge_table() and close_thread_tables() in trx0purge.cc
Declared reset_thd() in row0purge.cc and dict0stats_bg.cc.
Removed innobase_reset_background_thd()

# Conflicts:
# storage/innobase/row/row0purge.cc
# storage/innobase/trx/trx0purge.cc
PranavKTiwari
MDEV-39245-Check that plugin name is pure ASCII

Added check to validate manadatory/optional plugins defined in codebase doesn't contains Non-ASCII character.
Added check to validate plugin installed thorugh SQL commands(run time plugins thorugh .so file) does not contains Non-ASCII character.
Marko Mäkelä
fixup! b182d721372bbb85b90118ace5065f5a279a3586

Do not ignore errors from backup_end
Sergei Golubchik
cleanup: remove explicit rounding before decimal2longlong

embed rounding into decimal2longlong instead.
this avoid carry propagation loop on rounding.
and allows decimal2longlong detect truncation correctly
Marko Mäkelä
squash! 076a99e1189e737120f1628854177c5942e96c89

log_t::set_archive(): In SET GLOBAL innodb_log_archive=OFF,
trigger a write-ahead of the log if necessary, to prevent overrun.
Sergei Golubchik
MDEV-39111 The query returns an incorrect value when using LPAD and REPLACE

REPLACE() tries to modify its first argument in-place, provided it's
not a constant (like in REPLACE("foo", "bar"))

When the first argument was Item_cache_str, it was not marked as
a constant, thus REPLACE modified it in-place, and result of the
previous row leaked into the next one.
Sergei Golubchik
MDEV-39154 wrong OOM handling in collect_grouping_fields()

correct (and document) the return values for collect_grouping_fields()
Marko Mäkelä
Try to avoid a sharing violation on Windows
Marko Mäkelä
Twist CreateHardLink() params
Sergei Golubchik
MDEV-38199 Optimizer Error with = SOME on UNIQUE Column Using Decimal/Integer Types

return 1 (non-fatal error) when a decimal or float number
was modified when stored in Field_long (= fractional part was lost).

This tells the optimizer that a number with a non-zero fractional
part cannot be found in an index over an integer field.
Alexey Botchkov
MDEV-39210 ExtractValue/UpdateXML crash.

XML parser fixed to handle <! and <? correctly.
Sergei Golubchik
MDEV-23507 Wrong duplicate key value printed in ER_DUP_ENTRY

repair_by_sort() does not use table->record[0]
but print_keydup_error() expects to see the conflicting row there.
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:
========
- Introduced purge_table class which has the following
purge_table: Stores either TABLE* (for tables with indexed virtual
columns) or MDL_ticket* (for tables without) in a single union
using LSB as a flag.
For tables with indexed virtual columns: opens TABLE*, accesses
MDL_ticket* via TABLE->mdl_ticket
For tables without indexed virtual columns: stores only MDL_ticket*.

trx_purge_attach_undo_recs(): Coordinator opens both dict_table_t*
and TABLE* with proper MDL protection. Workers access cached
table pointers from purge_node_t->tables without opening
their own handles

purge_sys.coordinator_thd: Distinguish coordinator from workers
in cleanup logic. Skip innobase_reset_background_thd() for
coordinator thread to prevent premature table closure during
batch processing. Workers still call cleanup to release their
thread-local resources

trx_purge_close_tables():
Rewrite for purge coordinator thread
1) Close all dict_table_t* objects first
2) Call close_thread_tables() once for all TABLE* objects
3) Release MDL tickets last, after tables are closed

Added table->lock_mutex protection when reading (or) writing
vc_templ->mysql_table and mysql_table_query_id. Clear cached
TABLE* pointers before closing tables to prevent stale pointer
access

Declared open_purge_table() and close_thread_tables() in trx0purge.cc
Declared reset_thd() in row0purge.cc and dict0stats_bg.cc.
Removed innobase_reset_background_thd()
Marko Mäkelä
fixup! 48de279004b9a9089a0e449f393722a5c1be423e
Sergei Golubchik
MDEV-30255 0 changed to 0.0 caused by DISTINCT and UNION ALL

Revert "MDEV-17256 Decimal field multiplication bug." (57898316b6fb)

It removes zero truncation from decimal_mul() and fixes
reported symptoms.

But reintroduces multiplication bug.
PranavKTiwari
MDEV-39184 Stabilize metadata_lock_info test output using sorted results

Add --sorted_result to the affected test to ensure deterministic ordering
of metadata_lock_info output. Since MDL lock iteration order depends on
hash_value() and underlying Split-Ordered List behavior, it may vary with
internal changes such as enum value shifts.

Sorting the result removes dependency on implementation-specific ordering,
avoiding the need to update result files for non-functional changes while
preserving test correctness.
Sergei Golubchik
MDEV-39112 The query returns incorrect results when using LPAD

LPAD was modifying its first argument, even if it was a const string
Marko Mäkelä
Keep track of the last copied log file
PranavKTiwari
MDEV-39245- Added different test cases to validate the non-ascii changes.
Alexey Botchkov
MDEV-39210 ExtractValue/UpdateXML crash.

XML parser fixed to handle <! and <? correctly.
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:
========
- Introduced purge_table class which has the following
purge_table: Stores either TABLE* (for tables with indexed virtual
columns) or MDL_ticket* (for tables without) in a single union
using LSB as a flag.
For tables with indexed virtual columns: opens TABLE*, accesses
MDL_ticket* via TABLE->mdl_ticket
For tables without indexed virtual columns: stores only MDL_ticket*.

trx_purge_attach_undo_recs(): Coordinator opens both dict_table_t*
and TABLE* with proper MDL protection. Workers access cached
table pointers from purge_node_t->tables without opening
their own handles

purge_sys.coordinator_thd: Distinguish coordinator from workers
in cleanup logic. Skip innobase_reset_background_thd() for
coordinator thread to prevent premature table closure during
batch processing. Workers still call cleanup to release their
thread-local resources

trx_purge_close_tables():
Rewrite for purge coordinator thread
1) Get MDL_tickets for the tables opened
2) Call close_thread_tables() once for all TABLE* objects
3) Close the table and release the MDL

Added table->lock_mutex protection when reading (or) writing
vc_templ->mysql_table and mysql_table_query_id. Clear cached
TABLE* pointers before closing tables to prevent stale pointer
access

Declared open_purge_table() and close_thread_tables() in trx0purge.cc
Declared reset_thd() in row0purge.cc and dict0stats_bg.cc.
Removed innobase_reset_background_thd()
Marko Mäkelä
fixup! b182d721372bbb85b90118ace5065f5a279a3586

Release write fix when skipping a write
Yuchen Pei
MDEV-39282 Use a POD type for longlong_hybrid_number in bison
PranavKTiwari
MDEV-39245-Check that plugin name is pure ASCII

Added check to validate manadatory/optional plugins defined in codebase doesn't contains Non-ASCII character.
Added check to validate plugin installed thorugh SQL commands(run time plugins thorugh .so file) does not contains Non-ASCII character.
bsrikanth-mariadb
MDEV-39347: Referred databases are not present in the context

Currently, only create/use DDLs for the database that is in the
current thread is stored in the context.
However, we do store CREATE DDL statements of other database tables
in the context, if they are referred by the query.
So, while replaying the context, if the other database is not present
in the system, then we get an error.

== SOLUTION ==
Store CREATE DATABASE DDLs of the databases to the context, if any of those database tables are referred by the original query.
PranavKTiwari
MDEV-39245-Check that plugin name is pure ASCII

Added check to validate manadatory/optional plugins defined in codebase doesn't contains Non-ASCII character.
Added check to validate plugin installed thorugh SQL commands(run time plugins thorugh .so file) does not contains Non-ASCII character.
Sergei Golubchik
MDEV-30255 0 changed to 0.0 caused by DISTINCT and UNION ALL

Revert "MDEV-17256 Decimal field multiplication bug" (57898316b6fb)
This removes zero truncation from decimal_mul() and fixes
the reported symptom.

Fix multiplication correctly - by truncating long factors before
multiplication. Not both equally, but in a way that minimizes the
error.

Add more multiplication tests to verify that now multiplication
works correctly.
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:
========
- Introduced purge_table class which has the following
purge_table: Stores either TABLE* (for tables with indexed virtual
columns) or MDL_ticket* (for tables without) in a single union
using LSB as a flag.
For tables with indexed virtual columns: opens TABLE*, accesses
MDL_ticket* via TABLE->mdl_ticket
For tables without indexed virtual columns: stores only MDL_ticket*.

trx_purge_attach_undo_recs(): Coordinator opens both dict_table_t*
and TABLE* with proper MDL protection. Workers access cached
table pointers from purge_node_t->tables without opening
their own handles

purge_sys.coordinator_thd: Distinguish coordinator from workers
in cleanup logic. Skip innobase_reset_background_thd() for
coordinator thread to prevent premature table closure during
batch processing. Workers still call cleanup to release their
thread-local resources

trx_purge_close_tables():
Rewrite for purge coordinator thread
1) Close all dict_table_t* objects first
2) Call close_thread_tables() once for all TABLE* objects
3) Release MDL tickets last, after tables are closed

Added table->lock_mutex protection when reading (or) writing
vc_templ->mysql_table and mysql_table_query_id. Clear cached
TABLE* pointers before closing tables to prevent stale pointer
access

Declared open_purge_table() and close_thread_tables() in trx0purge.cc
Declared reset_thd() in row0purge.cc and dict0stats_bg.cc.
Removed innobase_reset_background_thd()
Yuchen Pei
MDEV-38752 Check that virtual column is a supertype to its expression before substitution

New optimizations were introduced that substitute virtual column
expressions (abbr. vcol expr) with index virtual columns (abbr. vcol
field) in WHERE, ORDER BY and GROUP BY.

In this patch we introduce checks that the type of a vcol field is the
supertype to its vcol expr, and if not, do not proceed the
optimization. This ensures that the substitution is safe and does not
for example lose information due to truncation.

For simplicity, the version of the check implemented is strict with
100% precision, meaning that there are instances where vcol field is a
supertype to vcol expr, but the check returns false.

Type not covered in tests: Type_handler_null

Thanks to Jarir Khan <[email protected]> for initial patches
addressing this issue.
Marko Mäkelä
fixup! 36f92a4c34ff52468423c3597678dbbb043bbae8
Oleg Smirnov
MDEV-28598 Assertion 'got_name == named_item_expected()' failed

This assertion triggered on an attempt to write a piece of corrupt
JSON to the optimizer trace:
  "transformation": {
    "select_id": 2,
    "from": "IN (SELECT)",
    "to": "semijoin",
    {
      "join_optimization": {
      "select_id": 3,
      "steps": []
    }
  }

This happened because some parts of the query may be evaluated right
during the optimization stage. To handle such cases Json_writer will now
implicitly add named members with automatically assigned names
"implicitly_added_member_#1", "implicitly_added_member_#2", etc
to preserve JSON document correctness. Also the tail of the JSON document
will be printed to stderr before abort.
Those two improvements only apply for Debug builds, not for Release ones
as the Release builds skip JSON correctness checks
Raghunandan Bhat
MDEV-37491: Assertion `(mem_root->flags & 4) == 0` failed in `void *alloc_root(MEM_ROOT *, size_t)`

Problem:
  Server crashes when a procedure with default parameter is executed and
  default value for the parameter is evaluated after the procedure's
  first execution.

  CREATE PROCEDURE p(x INT DEFAULT (SELECT 1)) ...
  CALL p(1); -- first exec, marks mem_root read-only
  CALL p(); -- tries to allocate on locked when executing DEFAULT

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.
Sergei Golubchik
MDEV-17256 Decimal field multiplication bug

Fix multiplication correctly - by truncating long factors before
multiplication. Not both equally, but in a way that minimizes the
error.

Add more multiplication tests to verify that now multiplication
works correctly.
Sergei Golubchik
MDEV-39131 Wrong Results in Identical Queries Involving Grouping and Bitwise NOT (~)

Item_copy_string::val_int() should take into account item's
unsignedness