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
Alexandru Diaconu
MDEV-38853 Guard VALIDITY_ASSERT in Json_writer for NDEBUG builds

Guard VALIDITY_ASSERT in Json_writer::add_unquoted_str() and
Json_writer::add_str() with !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
to avoid references to debug-only symbols in release builds.

Reported-by: Bjarne D Mathiesen
Original-patch-by: Bjarne D Mathiesen
(from JIRA / MacPorts PR28680).
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.
Daniel Black
MDEV-38771 RPM conflicts between MariaDB-common and mysql-common

mysql-common and MariaDB-common don't install the same files.
mysql-common (in MySQL 8.0) installs character set files
(/usr/share/mysql/charsets/*) and /usr/lib64/mysql (directory only).

MariaDB common installs character set files in /usr/share/mariadb
and the same /usr/lib64/mysql directory along with client plugins
in /usr/lib64/mysql/plugin. The RPM rules of conflict
only will cause troubles on directories if they are installed with
different metatadata (selinux, ownership, permissions) which isn't
the case.

As the character sets are at a different location MariaDB-common
isn't obsoleting mysql-common in a way that provides compatibilty
with mysql-common, for mysql-libs or otherwise, so its just creating
an install conflict.

Users installing perl-DBD-MySQL notice this because its mysql-libs
dependency pulls mysql-common, which conflicts with MariaDB-common.

We correct by removing the conflict and the provides of MariaDB-common
with resepect to mysql-common.
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.
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.
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
Ahmad
MDEV-35821: Add vector index size to INDEX_LENGTH in SHOW TABLE STATUS

Vector indexes are stored in a separate internal table (hlindex).
The main table's storage engine knows nothing about it, INDEX_LENGTH
was always reported as 0 for tables with vector indexes.

the fix: after calling info() on the main table handler in sql_show.cc,
check if the table has an hlindex, open it if needed, and add its data_file_length to
index_file_length before writing to the information schema record.
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()
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