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
Dave Gosselin
MDEV-39856: innochecksum help never stops printing whitespace

The help printer wraps each option description at spaces so it fits a
fixed column.  When a single word is wider than that column there is
no space to break on, so it stops advancing and prints blank,
indented lines without end.  Running innochecksum with no arguments
showed this after a long documentation link was placed in an option
description, but any tool with a similar description is affected.

When a word does not fit the column, print it whole on its own line
instead of looping.  If it is the last word in the description, leave
it for the final write so the help does not end on a blank line.
Bill Jin
MDEV-39548 Further cleanup of MDL_request boilerplate

- Change thd->backup_commit_lock from MDL_request* to MDL_ticket*,
  and convert related call sites in handler.cc, log.cc, sql_class.cc,
  and xa.cc to use MDL_ACQUIRE_LOCK.

- Convert reload_acl_and_cache() in sql_reload.cc, purge_master_logs()
  and reset_master() in sql_repl.cc to MDL_ACQUIRE_LOCK, holding the
  ticket in a local MDL_ticket* (these functions used a local
  MDL_request originally and should not touch thd->backup_commit_lock).

- Convert acquire_lock() in partition_info.cc to MDL_ACQUIRE_LOCK.

- Add MDL_REQUEST_LIST_ADD() helper for enqueuing lock requests into
  MDL_request_list, and convert call sites in sql_base.cc and sp.cc.

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.
bsrikanth-mariadb
Fix opt_context_replay_basic failure due to sql_buffer_result addition
Dave Gosselin
MDEV-39602: Document the join_type enumeration

Replace the one line comment on join_type in sql_select.h with a
comment on each value.  Each comment explains what the access method
is, the conditions under which the optimizer chooses it, and what
EXPLAIN will show for it.
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.
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.
Oleksandr Byelkin
Fix MDEV-39207 test (skip if ha_example is not built)
Alexey Botchkov
MDEV-37262 XMLISVALID() schema validation function.

XMLISVALID function added to the XMLTYPE plugin.
bsrikanth-mariadb
Fix opt_context_load_stats_basic test failures

New table stat fields got added, which cause the offset of the existing
test to change. Fixed the result file.
Sergei Petrunia
Add note_verbosity and sort_buffer size to relevant variables

note_verbosity fixes main.null_key test
sort_buffer_size fixes main.index_intersect_innodb
bsrikanth-mariadb
--disable_replay: show_explain, update

disable tests that have subqueries computed at optimization time
Marko Mäkelä
Fix the Windows glitch
Alexey Botchkov
MDEV-37262 XMLISVALID() schema validation function.

XMLISVALID function added to the XMLTYPE plugin.
Sergei Petrunia
When saving/replaying multi_range_read_info_const, also save/replay mrr_mode

Fixes main.partition_mrr_aria, main.partition_mrr_myisam.
Dave Gosselin
MDEV-39856: innochecksum help never stops printing whitespace

The help printer wraps each option description at spaces so it fits a
fixed column.  When a single word is wider than that column there is
no space to break on, so it stops advancing and prints blank,
indented lines without end.  Running innochecksum with no arguments
showed this after a long documentation link was placed in an option
description, but any tool with a similar description is affected.

When a word does not fit the column, print it whole on its own line
instead of looping.  If it is the last word in the description, leave
it for the final write so the help does not end on a blank line.
bsrikanth-mariadb
Add "sql_buffer_result" to the opt_related_sys_vars list

This fixes main.variables test
Sergei Petrunia
Make Optimizer Context include "subquery_runs": [ NNN, ...].

This shows that subquery(ies) were executed at the optimization phase.
There is no way to replay this, so we do not parse this back.

The idea is to allow "--replay-server" detect this and not try
replaying such queries.
Alexey Botchkov
MDEV-37262 XMLISVALID() schema validation function.

XMLVALID function added to the XMLTYPE plugin.
bsrikanth-mariadb
MDEV-39538: Different costs when same range is read twice

When same range is used as a filter, once in the outer query block, and
the second inside a sub query such as: -

select * from t1
  where year(a) = 2010 and c < (select count(*) from t1 where year(a) = 2010);

The Optimizer Context had two records for multi_range_read_info_const() call,
but had different cost vector members.
The cause is that the first table considered index-only scan on the range,
while the second considered non-index only scan.

However, when replaying the context, the same range got matched
twice, and the costs corresponding to that got returned twice.
Hence the costs in the explain plan output differed as well.

Solution
========
Include a new field called "call_number", while recording range contexts
into the overall context. This way, we could even match the call_number
and return the appropriate cost during replay.
Rex Johnston
MDEV-39495 Parallel Query:comments and code cleanup
Yuchen Pei
MDEV-15621 [refactor] Partitioning cleanup

change p_column_list_val::fixed to a bool
remove redundant end label in partition_info::fix_column_value_functions
Thirunarayanan Balathandayuthapani
MDEV-24813 Drop low-value table_lock test combinations

The three deadlock_*_race tests cannot reach their DEBUG_SYNC race
under a table lock (it degenerates to a timeout), and the three I_S
tests only restate a lock-mode change already covered
by innodb_full_scan.test.
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.
Yuchen Pei
MDEV-39789 Fix compiling without perfschema
Yuchen Pei
MDEV-24813 Signal full scan to storage engines.

When starting to do a full table/index scan without a WHERE or JOIN
condition, tell the storage engine so and the corresponding
ulong-truncated LIMIT.

Include an innodb implementation: added an innodb switch
table_lock_on_full_scan, so that when the switch is on, on receiving
the full scan signal from the sql layer, if the truncated LIMIT is
ULONG_MAX (likely no LIMIT), attempt to acquire a table lock.

Updated tests that have different results with the switch on.

(Comment and code edited by Sergei Petrunia)
Sergei Petrunia
Add --disable_replay in main.key
Alexey Botchkov
next
Sergei Petrunia
Amend --replay-server code: Allocate replay server port based on MTR_BUILD_THREAD

This allows to run multiple mtrs with --replay-server on the same machine.
Marko Mäkelä
MDEV-39861 innodb_log_recovery_target wrongly opens log in read-write mode

log_t::archived_switch_recovery_prepare(): Observe recv_sys.rpo
similar to what recv_sys_t::find_checkpoint() does.
bsrikanth-mariadb
Generate context for table less queries as well.

Fixes func_str, ctype_utf8, ctype_latin1 tests
Marko Mäkelä
MDEV-39861 innodb_log_recovery_target wrongly opens log in read-write mode

log_t::archived_switch_recovery_prepare(): Observe recv_sys.rpo
similar to what recv_sys_t::find_checkpoint() does.
bsrikanth-mariadb
Disable replay for main.user_var

As user variables are not yet supported for replay
Mohammad Tafzeel Shams
MDEV-38305: Expose adaptive hash index statistics in ANALYZE FORMAT=JSON

Expose InnoDB's Adaptive Hash Index (AHI) statistics through ANALYZE
FORMAT=JSON output and global status variables to provide query-level
and system-level visibility into AHI usage and effectiveness.
This allows DBAs and developers to monitor how well
the adaptive hash index is serving their workloads on a per-query basis.

The r_ahi_stats object (nested inside r_engine_stats) now reports four
key metrics: ahi_searches (successful AHI lookups), ahi_searches_btree
(AHI misses requiring B-tree fallback), ahi_rows_added (rows inserted
into AHI), and ahi_pages_added (pages indexed by AHI). These same
metrics are exposed globally via innodb_status_variables.

Transaction-local tracking eliminates contention by accumulating
statistics in trx_t fields (n_sea, n_non_sea, n_ahi_rows_added,
n_ahi_pages_added) and aggregating them into global atomic counters
(btr_cur_n_sea, btr_cur_n_non_sea, btr_ahi_n_rows_added,
btr_ahi_n_pages_added) during trx_t::commit_cleanup() and trx_t::free(),
following the pattern established for buf_pool.stat.n_page_gets.

- btr_ahi_inc_searches(): Increment trx->n_sea when AHI lookup succeeds.
- btr_ahi_inc_searches_btree(): Increment trx->n_non_sea when AHI lookup
  fails and falls back to B-tree search.
- btr_ahi_inc_rows_added(): Increment trx->n_ahi_rows_added when rows
  are added to the adaptive hash index structure.
- btr_ahi_inc_pages_added(): Increment trx->n_ahi_pages_added when new
  pages are indexed by AHI.
- btr_cur_t::search_leaf(): Call btr_ahi_inc_searches() on successful
  AHI hit and btr_ahi_inc_searches_btree() on AHI miss.
- btr_cur_n_sea, btr_cur_n_non_sea: Replace sharded ib_counter_t with simple
  atomic counters.
- MONITOR_OVLD_ADAPTIVE_HASH_ROW_ADDED, MONITOR_OVLD_ADAPTIVE_HASH_PAGE_ADDED:
  Convert monitor counters to "overload" type that read from global atomic
  counters btr_ahi_n_rows_added and btr_ahi_n_pages_added respectively instead
  of maintaining separate statistics.
- trace_engine_stats(): Output r_ahi_stats object with all four AHI
  counters in JSON format when any AHI activity is detected during query
  execution.
- ha_handler_stats: Added ahi_searches, ahi_searches_btree, ahi_rows_added,
  and ahi_pages_added fields to track per-query AHI statistics.
- Add mtr parameter to btr_search_move_or_delete_hash_entries(),
  btr_cur_t::search_info_update(), btr_search_update_hash_on_insert(),
  btr_search_update_hash_ref(), btr_search_info_update_hash(), and
  btr_search_build_page_hash_index() to allow updating AHI statistics.
- ahi_stats.test: Comprehensive verification of AHI statistics reporting
  across different scenarios: insufficient accesses (no AHI build),
  threshold triggering (AHI construction), heavy warmup (full AHI
  utilization), and disabled AHI (verify zero statistics).
- check_ahi_status.inc: Reusable include file for executing queries with
  configurable warmup repetitions and extracting AHI statistics from
  ANALYZE FORMAT=JSON output using JSON path expressions.
Sergei Petrunia
Fix mtr --replay-server main.select_found

Make show_create_table_ex/get_default_field_value() use
Field::real_maybe_null(), not maybe_null().

Before, the difference didn't matter as show_create_table_ex() was
only invoked in SHOW CREATE TABLE where columns are not made NULLable.

Optimizer context code invokes show_create_tableas show_create_table_ex()
in all queries, so now the distinction matters.
Vladislav Vaintroub
MDEV-14443 DENY statement

Implements DENY/REVOKE DENY and associated tasks.
Sergei Petrunia
Add -disable_replay next_query Dont support table-less queries that require settings

Fixes ctype_utf8, func_str
Dave Gosselin
MDEV-35291 derived_with_keys not applied for UNION with const filter

The optimizer fails to generate a derived key when a materialized
UNION derived table is filtered by a constant equality, as in:

  SELECT dt.* FROM
    ((SELECT * FROM t1 LIMIT 100) UNION
    (SELECT * FROM t1 LIMIT 200)) dt
  WHERE id = 1;

The condition cannot be pushed into the underlying SELECTs because
LIMIT inside each branch blocks pushdown, so the only remaining
optimization is to build a derived key on id and access via
ref(const).  But add_key_part() registers KEYUSE entries for the
materialized derived only when the value side of the equality
references another table.  That excludes constants, leaving the
outer query no choice but to scan the full materialized result.

Investigation showed that this is the same defect that Rex Johnston
already fixed under MDEV-39499 (see the bb-11.4-MDEV-39499 branch).

This commit ports the add_key_part() change from MDEV-39499 to
10.11.  It does not port the rest of Rex's commit because it depends
on KEY::rec_per_key_null_aware() and the KEY::all_nulls_key_parts
bitmap populated by the rewritten sql_statistics code, neither of
which exists in 10.11.  But it turns out that doesn't matter for
this bug and the add_key_part() is sufficient to fix it.
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.
Sergei Petrunia
Make --replay-server support "Optimizer Context Stopword": subquery_runs

If a stopword is present in the optimizer context, we do not try to
replay it.