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
Enable release builds
Oleg Smirnov
Enable re-split of marked chunks
drrtuy
chore: update DuckDB docs and info.
Thirunarayanan Balathandayuthapani
MDEV-28730 Remove internal parser usage from InnoDB FTS

InnoDB FTS performed all reads and DML on its auxiliary,
common and CONFIG tables through the InnoDB internal SQL
graph parser. Replace that path with direct B-tree access
via a new query-executor layer, and delete the parser-era
helpers.

row0query.h, row/row0query.cc - new QueryExecutor:
- General MVCC-aware record traversal and basic DML on the
clustered index. Sits on a btr_pcur and a transaction-owned
mtr; record processing goes through a RecordCallback that
bundles two std::functions:
  compare_record() returns SKIP / PROCESS / STOP for a record
  process_record() handles each PROCESS-ed (MVCC-visible) row

Public API:
  read()              scan a clustered index with a search key
  read_all()          full clustered scan (optional start tuple)
  read_by_index()    scan a secondary index, fetch the matching
                      clustered record, deliver it to the callback
  insert_record()    insert a tuple into the clustered index
  delete_record()    delete a row identified by tuple
  delete_all()        delete every row in the clustered index
  select_for_update() position+X-lock the matching clustered row
  update_record()    update the row select_for_update() locked,
                      falling back to optimistic/pessimistic and
                      external storage paths as needed
  replace_record()    upsert: select_for_update()+update_record(),
                      else insert_record()
  lock_table(), handle_wait(), commit_mtr()

fts0exec.h, fts/fts0exec.cc - new FTSQueryExecutor:
Thin wrapper over QueryExecutor specialised for FTS tables.
Opens and locks the required tables once and exposes typed
helpers keyed by table family.

Auxiliary INDEX_[1..6]:
  open_all_aux_tables()
  insert_aux_record(aux_index, fts_aux_data_t)
  delete_aux_record(aux_index, fts_aux_data_t)
  read_aux()        range scan from a given word
  read_from_range()  paginated read that absorbs
                    DB_FTS_EXCEED_RESULT_CACHE_LIMIT internally
                    and resumes from the last word seen

Common deletion tables (DELETED, DELETED_CACHE, BEING_DELETED,
                        BEING_DELETED_CACHE):
  open_all_deletion_tables()
  insert_common_record(), delete_common_record(),
  delete_all_common_records(), read_all_common()

CONFIG table (<key, value>):
  open_config_table() / set_config_table()
  insert_config_record(), update_config_record() (upsert),
  delete_config_record(), read_config_with_lock()

fts_aux_data_t carries the auxiliary row payload.
RecordCallback specialisations live alongside the executor:

CommonTableReader collects doc_ids from common tables that
share the <doc_id> schema.

ConfigReader extracts <key, value> and provides
compare_config_key() for fast key matching.

AuxRecordReader scans auxiliary indexes with an
AuxCompareMode (GREATER_EQUAL / GREATER / LIKE / EQUAL) driving the
comparator; tracks the last word seen so a paginated scan can resume.

fts_query() walks index and common tables via
QueryExecutor::read_by_index() with RecordCallback;

fts_write_node() writes auxiliary rows through
FTSQueryExecutor::insert_aux_record() / delete_aux_record()
with fts_aux_data_t.

fts_optimize_write_word() now goes through the same
insert/delete path.

fts_select_index{,_by_range,_by_hash} return uint8_t (was
ulint) with a simpler control flow.

fts_optimize_table() binds a thd to its transaction whether
invoked from a user thread or the FTS optimize thread.

fts_optimize_t drops its fts_index_table and fts_common_table
fts_table_t fields; fts_query_t drops fts_common_table.

storage/innobase/fts/fts0sql.cc is deleted along with the
commented-out and unreferenced parser-era helpers it held.

dict_sys.latch is now acquired once per fts_sync_table(),
fts_optimize_table() and fts_query() call to open every
auxiliary and common table in one pass, instead of being
re-acquired per table.

Every FTS trx_create() site now takes the THD from a real
caller (user trx, fts_opt_thd, DDL ctx->trx, ha_thd())
instead of either leaving it NULL or pulling current_thd.

fts_commit(): Each fts_commit_table() used to create transaction
and commit, producing N undo segments, N read views and N group-commit
batches for N FTS tables touched by the user statement.
fts_commit() now creates one internal trx, runs every
fts_commit_table() under it, and commits once.

fts_optimize_word() could fail when source nodes have equal
boundary doc_ids.  Loosen the merge predicate from '>' to
'>=' so legitimate overlapping ranges that occur when nodes
fill to FTS_ILIST_MAX_SIZE at doc_id boundaries are handled
correctly.

INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE (i_s.cc) wires the
shared words_heap via set_words_heap() and empties it per batch
with mem_heap_empty(); the per-fetch cleanup frees only the
per-node ilist (ut_alloc'd) and skips fts_word_free().
Oleg Smirnov
Enable InnoDB pre-fetcher for parallel scans
Rex Johnston
MDEV-39859 Remove per worker tmp tables, ship raw records to manager
Oleg Smirnov
Fix failing tests
Rex Johnston
MDEV-39495 Parallel Query: Use temporary work tables to ship results: basic test

Built on top of MDEV-39492, the parallel worker manager creates N
temporary tables and gives them to each parallel worker to populate.
At the conclusion of all worker threads, each row from the above tables
is added to the join_tab->table representing the query result.  To use

MariaDB [test]> set session parallel_worker_threads=10;
Query OK, 0 rows affected (0.001 sec)

MariaDB [test]> select SQL_BUFFER_RESULT * from t1 join seq_1_to_5 on t1.a = seq;
+------+------+-----+
| a    | b    | seq |
+------+------+-----+
|    1 | one  |  1 |
|    2 | two  |  2 |
|    1 | un  |  1 |
|    1 | one  |  1 |
|    2 | two  |  2 |
|    1 | un  |  1 |
|    1 | one  |  1 |
|    2 | two  |  2 |
|    1 | un  |  1 |
|    1 | one  |  1 |
|    2 | two  |  2 |
|    1 | un  |  1 |
|    1 | one  |  1 |
|    2 | two  |  2 |
|    1 | un  |  1 |
|    1 | one  |  1 |
|    2 | two  |  2 |
|    1 | un  |  1 |
|    1 | one  |  1 |
|    2 | two  |  2 |
|    1 | un  |  1 |
|    1 | one  |  1 |
|    2 | two  |  2 |
|    1 | un  |  1 |
|    1 | one  |  1 |
|    2 | two  |  2 |
|    1 | un  |  1 |
|    1 | one  |  1 |
|    2 | two  |  2 |
|    1 | un  |  1 |
+------+------+-----+
30 rows in set (0.010 sec)

Each worker has read the first table with a JT_ALL access method and
replicated the results back to the manager thread, which executes the
rest of the join.  In the above example there are 10 worker threads, so
10 copies of the join result.

MDEV-39859 alter parallel scan costs to favour putting table first.
Jan Lindström
MDEV-38870 : Galera test failure on galera.MDEV-38201

Test changes only. Moved wait condition where node should
disconnect from cluster because it has become inconsistent.
After that next FLUSH HOST based on timing could return
not supported or timeout.
Pekka Lampio
MDEV-38386 Fix incomplete cleanup in Galera MTR tests failing under --repeat

A number of Galera MTR tests pass on the first run but fail on a second
--repeat iteration, because server, cluster or filesystem state leaks
across runs and the test does not restore a clean starting state.

Fix the cleanup (or force a fresh cluster) in the affected tests. Each
fix was verified with --repeat=2 --force.

1. Stale async-slave GTID position (11 tests)

  RESET SLAVE [ALL] does not clear gtid_slave_pos. As the master does
  RESET MASTER in cleanup, on the next run the slave considers the
  events already applied and skips them, so the replicated tables never
  appear. Clear the position with SET GLOBAL gtid_slave_pos = "".

2. Leftover binlog GTID state from trailing cleanup (1 test)

  Trailing DROP TABLE / mtr.add_suppression statements ran after the
  .inc's reset master and re-populated node_2's binlog. gtid_binlog_state
  keeps the latest seqno per (domain, server_id) pair, so a stray
  0-2-<n> survived into the next run and broke the state comparison.
  Reorder the cleanup and reset node_2's binlog last.

3. Cluster-global, one-time or time-window state (11 tests)

  The wsrep GTID domain seqno is cluster-global and is not reset by
  reset master (nor by a mid-test SST rejoin); error-log contents,
  warning-flood suppression timers and one-time bootstrap behaviour are
  likewise not restored by in-test cleanup. Force a fresh cluster with
  include/force_restart.inc.

4. Leftover filesystem artifacts (1 test)

  mariabackup refuses to back up into a non-empty target directory, so
  the leftover target dirs from the previous run made the backup fail
  silently and the expected log messages never appeared. Remove the
  target directories in cleanup.
Rucha Deodhar
MDEV-34723: NEW and OLD in a trigger as row variables

Implementation:
NEW and OLD represent the entire table row. So it can be thought of as
list of Item_trigger_field. When we are in a trigger and NEW or OLD is
encountered, create Item_trigger_row object with same constructor as
Item_trigger_field, it will also be used later while creating
Item_trigger_field objects. Populate the m_fields list while
fixing fields. Create a corresponding instruction sp_instr_set_trigger_row
which will be used to set the values
Daniel Black
MDEV-31209 Queries with window functions do not obey KILL / max_statement_time

Window functions run in a loop in
Frame_cursor::compute_values_for_current_row which can include a large
number of rows.

Adjust this function to check for the current thd being killed by only
every 256 rows, so as not to destroy any CPU pipelining or similar.
Varun Deep Saini
MDEV-25727 Add FORMAT JSON support to JSON_TABLE

Allow explicit FORMAT JSON columns in JSON_TABLE for supported
string, blob, and JSON targets.

Preserve the explicit clause in view printing and add regression
coverage for formatted extraction, unsupported targets, and SHOW
CREATE VIEW.

Signed-off-by: Varun Deep Saini <[email protected]>
Signed-off-by: Varun Deep Saini <[email protected]>
Fariha Shaikh
MDEV-39928 Fix GitLab CI centos9 job failure

The centos9 job uses yum-builddep -y mariadb-server to install build
dependencies, but the mariadb-server source package has been removed
from CentOS Stream 9 repositories. Replace with explicit installation of
the required build dependencies.

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.
Raghunandan Bhat
MDEV-39559: Assertion `b` failed in `my_strnncoll_xxxx_nopad_ci`

Problem:
  When verifying a `UNIQUE` constraint over an empty BLOB/TEXT column,
  `Field_blob::cmp(a_ptr, b_ptr)` extracts a NULL data pointer (with
  length 0) from the record slot and forwards it to the charset-level
  comparison, which asserts non-NULL pointers (added in MDEV-35717).

  A zero-length blob is allowed to have a NULL data pointer in its
  record slot; `Field_blob::val_decimal()` already treats (NULL, 0) as
  an empty value. The comparison paths missed that substitution.

Fix:
  - In `Field_blob::cmp(a_ptr, b_ptr)`, `Field_blob::cmp_prefix()` and
    `Field_blob::key_cmp(key_ptr, max_key_length)`, substitute "" for a
    NULL data pointer before delegating to the comparison.
  - Add a debug assert in each of the above functions to document the
    invariant that a NULL pointer is only valid alongside zero length
    and (NULL, length>0) is invalid.
Yuchen Pei
MDEV-32796 [demo] federatedx suffers the same problem as spider
Oleg Smirnov
Enable re-split of marked chunks
Yuchen Pei
MDEV-15621 Auto add RANGE COLUMNS partitions by interval

Allow auto partitioning by interval in PARTITION BY RANGE COLUMNS

PARTITION BY RANGE COLUMNS (col_name)
INTERVAL interval [AUTO]
(
  PARTITION partition_name VALUES LESS THAN (value)
  [, PARTITION partition_name VALUES LESS THAN (value) ... ]
)

where

- col_name is the name of one column of type DATE or DATETIME or
  TIMESTAMP

- at least one partition is supplied, and the highest partition cannot
  have MAXVALUE range

- INTERVAL interval is a positive time interval. it can be mariadb
  format or oracle NUMTODSINTERVAL/NUMTOYMINTERVAL format. Like
  versioning, the smallest unit is second, i.e. no subsecond like
  microsecond.

- DATE column cannot have interval with values less than a day

- Subpartitions are allowed, but restricted to existing subpartition
  types, i.e. [LINEAR] (KEY|HASH)

When performing one of the following DML statements on such a table,
it will first add partitions by the specified interval until the
partition covers the current time:

- INSERT
- INSERT ... SELECT
- LOAD
- UPDATE
- REPLACE
- REPLACE ... SELECT

Partition addition will not cause an implicit commit like DDL normally
does.

The partitions are named pN.

Otherwise the table behaves exactly the same as a normal RANGE COLUMNS
partitioned table.

Note that TIMESTAMP is not allowed as a type for PARTITION BY RANGE
COLUMNS otherwise.
Alexander Barkov
MDEV-39518 Allow prepared statements in stored functions in assignment right hand

In progress
Alexander Barkov
MDEV-39518 Allow prepared statements in stored functions in assignment right hand

In progress
Vladislav Vaintroub
MDEV-38369 improve heap allocation performance on Windows with segmentHeap

Use modern segmentHeap heap manager on Windows.

The problem it is solving is severily reduced scalability on concurrent
OLTP benchmarks, due to inherent scalability problems in default NT Heap
implementation.

The benchmarks (see the corresponding ticket) show improvements across
the board, with about 5-10% on low concurrency up to several orders of
magnitude on high concurrency.
Vladislav Vaintroub
MDEV-40002 REVOKE DENY on table debug asserts with existing GRANT, without existing DENY

Fix handling of update_denies_in_user_table() inside replace_table_table()

replace_table_table is "special", and should return  -1 if  grant was
revoked, 1 if error, 0 if success. Whenever it is used, caller explicitly
checks for return code greater 0

It did however return -1 on all errors with denies. The debug assertion
that catches cases where my_error() is followed by my_ok() fired then.

This is now fixed. Added test cases for "REVOKE DENY on non-existing DENY
and existing GRANT" scenarios.
Marko Mäkelä
Multi-threaded backup and stub of streaming backup
PranavKTiwari
Assertion 'marked_for_read()' failed in Field_varstring::val_str on CHECKSUM TABLE
Thirunarayanan Balathandayuthapani
- Addressed the failures
Dave Gosselin
MDEV-38158:  Incorrect query result

When setup_copy_fields() needs to copy a non-aggregate function value,
it doesn't construct an Item_copy directly.  Instead, it calls
Type_handler::create_item_copy, which is a kind of factory.  The base
Type_handler::create_item_copy returns Item_copy_string.  Some type
handlers override it, like timestamp and fixed binary.  However, the
numeric type handlers (e.g., float, double, int, decimal) did not, so
they fell through to that base and got Item_copy_string.

A SELECT that aggregates will copy each non aggregate function value
into a temporary table through an Item_copy object, whose concrete
type is chosen by the create_item_copy method on the value's type
handler.  For numeric types that method returned Item_copy_string,
which stores the value as text.  A FLOAT keeps only FLT_DIG
significant digits as text, too few to reproduce its 24 bit mantissa,
so the copied value differed from the original.  With one row per
group, CAST(c1 AS FLOAT) - MIN(CAST(c1 AS FLOAT)) returned a large
number instead of zero.

Add Item_copy_real with Item_copy_float and Item_copy_double variants
that keep the value as a double, the same way Item_cache_real does, and
let the float and double type handlers create them.  This mirrors the
existing copy items for timestamp and fixed binary types.
drrtuy
chore: TPC-H automation and packaging section update in README.
Rex Johnston
MDEV-39492 Parallel Query: Study how to create worker threads

Introduces parallel_worker_threads variable to control the number
of worker threads created by a parallel execution query.

2 new files, sql_parallel_workers.h sql_parallel_workers.cc which
contain structures for the creation, management and deletion of
parallel worker threads (pwt_ in the name).  Main management
class created in the stack in JOIN::exec, implemented for the
top level select.

Current parallel_worker_thread_func sleeps for 10 seconds, generates
a warning, signals the main thread, sleeps 10 seconds, signals the
main thread again, sets it's finished flag and cleans it's THD.

The main thread loops through worker threads, looking for finished
thread and cleans them up if they have finished.
It then waits for a signal, then processes it's message queue.

Threads are registed in server_threads, so are visible in
information_schema.processlist and the show processlist command.

We check that a kill query on a parallel worker is passed onto it's
manager and the query is properly aborted, and that a kill connection
is handled properly in parallel_worker.test.

Review input 1: cleanup earlier

Do cleanup before we've finished sending the result to the client.
This way, one can see the errors (and eventually warnings) marshalled
back to the main thread and returned to the user:

MariaDB [test]> set parallel_worker_threads=10;
Query OK, 0 rows affected (0.001 sec)

MariaDB [test]> select seq from seq_1_to_10;
ERROR 4103 (HY000): Argument to the worker_busted_function() function does not belong to the range [0,1]

Assisted by Sergei Petrunia and Claude Code.
bsrikanth-mariadb
store index_name instead of index number everywhere in the context

Multi_range_read_const_call_record, and dump_mrr_info_calls()
already store index names. However, cost_index_read_call_record,
dump_index_read_calls() were using index numbers.

To be consistent, this PR changes index methods, and classes
to use index name instead of index number.
Rex Johnston
MDEV-39495 Parallel Query:comments and code cleanup
Vladislav Vaintroub
Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Oleg Smirnov
WIP: Split InnoDB table into chunks and process chunks one by one in parallel scan manner
Rex Johnston
MDEV-39495 Parallel Query:comments and code cleanup
Rex Johnston
MDEV-39859 Remove per worker tmp tables, ship raw records to manager
Oleg Smirnov
Enable release builds
Marko Mäkelä
fixup! 8077134777e3d3fda875413b45f440873c46e358
Oleg Smirnov
WIP: Integrate chunked InnoDB scan with parallel workers framework
Rucha Deodhar
MDEV-39878: JSON_ARRAY_INTERSECT: nested call JSON_ARRAY_INTERSECT(
JSON_ARRAY_INTERSECT(a,b), b) returns NULL instead of intersect result

Analysis:
Evaluating args[0] inside fix_length_and_dec() forces the argument to run
during the query preparation phase. If args[0] is a nested function,
its runtime memory structures are not yet initialized. This causes a
early failure that makes inner function as NULL before the query
starts executing.

Fix:
Wrap the evaluation in a const_item() check so it only runs during setup
if the argument is a constant. Otherwise, do it in runtime.
Oleg Smirnov
Enable InnoDB pre-fetcher for parallel scans
Vladislav Vaintroub
MDEV-38369 improve heap allocation performance on Windows with segmentHeap

Use modern segmentHeap heap manager on Windows.

The problem it is solving is severily reduced scalability on concurrent
OLTP benchmarks, due to inherent scalability problems in default NT Heap
implementation.

The benchmarks (see the corresponding ticket) show improvements across
the board, with about 5-10% on low concurrency up to several orders of
magnitude on high concurrency.