Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pekka Lampio
pekka.lampio@galeracluster.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Mohammad Tafzeel Shams
tafzeel.shams@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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 during trx_t::commit_cleanup() and trx_t::free(), following the pattern established for buf_pool.stat.n_page_gets. AHI counters are now organized as data members of the btr_sea structure where they logically belong, using anonymous unions to enable both atomic writes and direct non-atomic reads. - 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_sea: Add four counter members with anonymous unions to allow atomic writes and lockless reads: hit_count/hit_count_nonatomic (successful AHI lookups), miss_count/miss_count_nonatomic (B-tree searches after AHI miss), rows_added/rows_added_nonatomic (rows added to AHI), and pages_added/pages_added_nonatomic (pages added to AHI). Also includes hit_count_old and miss_count_old variant for computing deltas in monitor output. - btr0cur.h/btr0cur.cc: Remove global declarations and definitions of btr_cur_n_sea, btr_cur_n_non_sea, btr_cur_n_sea_old, btr_cur_n_non_sea_old, btr_ahi_n_rows_added, and btr_ahi_n_pages_added as they are now data members of btr_sea. - export_var_t: Remove innodb_ahi_hit, innodb_ahi_miss, innodb_ahi_rows_added, and innodb_ahi_pages_added members. MySQL status variables now point directly to btr_search counters. - innodb_status_variables[]: Change AHI status variable pointers from &export_vars.innodb_ahi_* to &btr_search.*_nonatomic, enabling zero-copy reads: adaptive_hash_hash_searches points to &btr_search.hit_count_nonatomic, adaptive_hash_non_hash_searches to &btr_search.miss_count_nonatomic, adaptive_hash_rows_added to &btr_search.rows_added_nonatomic, and adaptive_hash_pages_added to &btr_search.pages_added_nonatomic. - MONITOR_OVLD_ADAPTIVE_HASH_ROW_ADDED, MONITOR_OVLD_ADAPTIVE_HASH_PAGE_ADDED: Convert monitor counters to "overload" type that read from atomic counters btr_search.rows_added and btr_search.pages_added respectively instead of maintaining separate statistics. - trx_t::commit_cleanup() and trx_t::free(): Update transaction cleanup to increment btr_search.hit_count, btr_search.miss_count, btr_search.rows_added, and btr_search.pages_added instead of the old global counters. - 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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-22943: Assertion 'marked_for_read()' failed in Field_varstring::val_str on CHECKSUM TABLE use_all_stored_columns() cleared read_set bits for all generated columns, including persistent generated columns. This caused stored generated columns to be accessed without being marked for read, leading to a marked_for_read() assertion during CHECKSUM TABLE EXTENDED. Only exclude non-stored virtual generated columns from read_set. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40012 Parallel Query: execute the join in the worker threads Each parallel worker now runs the whole select-project[-join] query over its own chunk of the driving table -- WHERE filtering, select-list projection and the joins to the other tables -- and ships the final result rows to the manager, which only concatenates them and sends them to the client. This replaces the model where workers shipped raw source records and the manager ran the join. make_join_readinfo()'s gate (can_run_query_in_workers) chooses the worker-side path for an inner select-project[-join] with a parallel- scannable driving table: no tmp table (group/distinct/order/window/ buffer), no LIMIT/SQL_CALC_FOUND_ROWS/procedure/aggregate, no outer join or semijoin, and every non-driving table reached by eq_ref/ref/full scan. do_select() then runs run_worker_side_join() instead of the nested loop; anything ineligible runs serially. Each worker opens a private copy of every non-const table, deep-clones and field-rebinds the conditions and select list, and rebuilds each ref (clone_table_ref, mirroring create_ref_for_key). It scans its driving chunk, runs its own inner nested loop (cp_buffer_from_ref + ha_index_read_map / ha_index_next_same for ref/eq_ref, rnd scan otherwise), projects each full match into a private result table and ships the row image; the manager drains and sends. A killed worker's own ER_QUERY_INTERRUPTED is no longer treated as a fatal evaluation error (PWT_error_handler guards with !thd->killed) so kills keep propagating through kill_signal with the correct kill type. Tests: parallel_query_worker_side (single table) and parallel_query_join (eq_ref, ref with fan-out, 3-table chain, full-scan inner table) compare the parallel result set against serial. parallel_query / parallel_query_oom moved to a plain SELECT (which now runs worker-side) and were re-recorded. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added test case. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-29909 : SST fails when table is defined with DATA DIRECTORY='/path/to' and datafile is larger than datadir space std::filesystem is not available in all supported environments. Replaced by using statvfs if available. If not available return error and SST will fail. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Petrunia
sergey@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Review input: add more comments, function renames. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Mohammad Tafzeel Shams
tafzeel.shams@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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 during trx_t::commit_cleanup() and trx_t::free(), following the pattern established for buf_pool.stat.n_page_gets. AHI counters are now organized as data members of the btr_sea structure where they logically belong, using anonymous unions to enable both atomic writes and direct non-atomic reads. - 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_sea: Add four counter members with anonymous unions to allow atomic writes and lockless reads: hit_count/hit_count_nonatomic (successful AHI lookups), miss_count/miss_count_nonatomic (B-tree searches after AHI miss), rows_added/rows_added_nonatomic (rows added to AHI), and pages_added/pages_added_nonatomic (pages added to AHI). Also includes hit_count_old and miss_count_old variant for computing deltas in monitor output. - btr0cur.h/btr0cur.cc: Remove global declarations and definitions of btr_cur_n_sea, btr_cur_n_non_sea, btr_cur_n_sea_old, btr_cur_n_non_sea_old, btr_ahi_n_rows_added, and btr_ahi_n_pages_added as they are now data members of btr_sea. - export_var_t: Remove innodb_ahi_hit, innodb_ahi_miss, innodb_ahi_rows_added, and innodb_ahi_pages_added members. MySQL status variables now point directly to btr_search counters. - innodb_status_variables[]: Change AHI status variable pointers from &export_vars.innodb_ahi_* to &btr_search.*_nonatomic, enabling zero-copy reads: adaptive_hash_hash_searches points to &btr_search.hit_count_nonatomic, adaptive_hash_non_hash_searches to &btr_search.miss_count_nonatomic, adaptive_hash_rows_added to &btr_search.rows_added_nonatomic, and adaptive_hash_pages_added to &btr_search.pages_added_nonatomic. - MONITOR_OVLD_ADAPTIVE_HASH_ROW_ADDED, MONITOR_OVLD_ADAPTIVE_HASH_PAGE_ADDED: Convert monitor counters to "overload" type that read from atomic counters btr_search.rows_added and btr_search.pages_added respectively instead of maintaining separate statistics. - trx_t::commit_cleanup() and trx_t::free(): Update transaction cleanup to increment btr_search.hit_count, btr_search.miss_count, btr_search.rows_added, and btr_search.pages_added instead of the old global counters. - 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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added test case. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Implement most of backup_stream_start() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pekka Lampio
pekka.lampio@galeracluster.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| No target directory for streaming | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38210: Unary negation of LONGTEXT, wrong result under GROUP BY Unary negation of a LONGTEXT or LONGBLOB value returned the wrong result under GROUP BY. The length of the result was set to the argument length plus one for the sign, but for these two types the argument length is already the largest value the length field can hold, so adding one wrapped it back to zero. A zero length result loses its value when it is stored in the temporary table that GROUP BY builds, so the query returned an empty value instead of the expected number. The argument length is now limited before the sign character is added, so it can no longer wrap to zero. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38210: Unary negation of LONGTEXT, wrong result under GROUP BY Unary negation of a LONGTEXT or LONGBLOB value returned the wrong result under GROUP BY. The length of the result was set to the argument length plus one for the sign, but for these two types the argument length is already the largest value the length field can hold, so adding one wrapped it back to zero. A zero length result loses its value when it is stored in the temporary table that GROUP BY builds, so the query returned an empty value instead of the expected number. The argument length is now limited before the sign character is added, so it can no longer wrap to zero. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39952: Skip binlog_in_engine tests that need mariabackup Several tests in the binlog_in_engine suite run the mariabackup binary but did not check that it was built. When the server is built with WITH_MARIABACKUP=OFF, the test runner leaves the mariabackup command empty and these tests fail instead of being skipped. Add include/have_mariabackup_binary.inc, which skips the test when the binary is not available, and source it from the affected tests. Unlike have_mariabackup.inc, it does not also require socat or nc, because these tests copy the backup to a local directory rather than streaming it. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-22943: Assertion 'marked_for_read()' failed in Field_varstring::val_str on CHECKSUM TABLE use_all_stored_columns() cleared read_set bits for all generated columns, including persistent generated columns. This caused stored generated columns to be accessed without being marked for read, leading to a marked_for_read() assertion during CHECKSUM TABLE EXTENDED. Only exclude non-stored virtual generated columns from read_set. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39862 innodb_log_archive=ON corruption after modifying file parameters log_t::set_buffered(), log_t::set_write_through(): If a log file switch with innodb_log_archive=ON is in progress, ignore a SET GLOBAL statement that would attempt to modify innodb_log_file_buffering or innodb_log_file_write_through. This prevents the log from becoming corrupted. The problem was that we would close log_sys.log.m_file that pointed to the latest log file and then reopen a second handle to the previous log file, which log_sys.resize_log.m_file is already pointing to. As a result, log records would be written to the wrong log file, causing the log to be corrupted. The statements SET GLOBAL innodb_log_file_buffering and SET GLOBAL innodb_log_file_write_through will also be ignored when a SET GLOBAL innodb_log_file_size operation is in progress on a circular-format log (ib_logfile0). The statements will have an effect when InnoDB is holding only one log file open, which should be most of the time. These statements have no effect when the log file is mapped to persistent memory. Whether a requested change took place can be checked by executing a statement like the following: SELECT @@GLOBAL.innodb_log_file_buffering; Tested by: Saahil Alam |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fixup! 00667433f33a8c6e113565ba43e7cfca8e7a2563 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39952: Skip tests that need mariabackup Skips tests that require mariabackup if mariabackup was not built (WITH_MARIABACKUP=OFF). Backport of the same MTR change from 12.3 but applied to additional tests. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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(). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40012 Parallel Query: execute the join in the worker threads Each parallel worker now runs the whole select-project[-join] query over its own chunk of the driving table -- WHERE filtering, select-list projection and the joins to the other tables -- and ships the final result rows to the manager, which only concatenates them and sends them to the client. This replaces the model where workers shipped raw source records and the manager ran the join. make_join_readinfo()'s gate (can_run_query_in_workers) chooses the worker-side path for an inner select-project[-join] with a parallel- scannable driving table: no tmp table (group/distinct/order/window/ buffer), no LIMIT/SQL_CALC_FOUND_ROWS/procedure/aggregate, no outer join or semijoin, and every non-driving table reached by eq_ref/ref/full scan. do_select() then runs run_worker_side_join() instead of the nested loop; anything ineligible runs serially. Each worker opens a private copy of every non-const table, deep-clones and field-rebinds the conditions and select list, and rebuilds each ref (clone_table_ref, mirroring create_ref_for_key). It scans its driving chunk, runs its own inner nested loop (cp_buffer_from_ref + ha_index_read_map / ha_index_next_same for ref/eq_ref, rnd scan otherwise), projects each full match into a private result table and ships the row image; the manager drains and sends. A killed worker's own ER_QUERY_INTERRUPTED is no longer treated as a fatal evaluation error (PWT_error_handler guards with !thd->killed) so kills keep propagating through kill_signal with the correct kill type. Tests: parallel_query_worker_side (single table) and parallel_query_join (eq_ref, ref with fan-out, 3-table chain, full-scan inner table) compare the parallel result set against serial. parallel_query / parallel_query_oom moved to a plain SELECT (which now runs worker-side) and were re-recorded. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fariha Shaikh
farihais@amazon.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39931 Fix main.socket_conflict failure when running as root The test directly executes $MYSQLD via --exec, bypassing MTR's automatic --user=root injection. In GitLab CI containers where tests run as root, mariadbd refuses to start and the test fails. Skip the test when running as root, matching the existing approach used by the related main.bad_startup_options test. 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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Mohammad Tafzeel Shams
tafzeel.shams@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38305: Expose adaptive hash index statistics in ANALYZE FORMAT=JSON - btr_sea::n_parts : change from ulong to uint to reduce struct size and eliminate padding hole |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rucha Deodhar
rucha.deodhar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-29909 : SST fails when table is defined with DATA DIRECTORY='/path/to' and datafile is larger than datadir space std::filesystem is not available in all supported environments. Replaced by using statvfs if available. If not available return error and SST will fail. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-32796 [wip] Allow spider to be uninstalled using UNISTALL statements Still failing many tests: spider/bugfix.mdev_34421 spider/bg.ha spider/bg.ha_part spider/bugfix.self_reference_multi spider/bugfix.delete_with_float_column_default spider/bugfix.delete_with_float_column_mariadb spider/bugfix.mdev_28856 spider/bugfix.delete_with_float_column_mysql spider/bugfix.mdev_29963 spider/bugfix.mdev_29027 spider/bugfix.mdev_29484 spider/bugfix.mdev_29667 spider/bugfix.mdev_34636 spider/bugfix.mdev_31463 spider/bugfix.mdev_37972 spider/bugfix.return_found_rows_insert spider/bugfix.return_found_rows_update spider/bugfix.slave_trx_isolation spider.slave_trx_isolation spider.ha spider.ha_part |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39862: Add TODO comments about MDEV-36828 This addresses a review comment by Thirunarayanan Balathandayuthapani |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-15621 [to-squash] fix compiling | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-15621 [to-squash] fix compiling | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Petrunia
sergey@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Add copyright header to sql_partition_auto_interval.cc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-22943: Assertion 'marked_for_read()' failed in Field_varstring::val_str on CHECKSUM TABLE use_all_stored_columns() cleared read_set bits for all generated columns, including persistent generated columns. This caused stored generated columns to be accessed without being marked for read, leading to a marked_for_read() assertion during CHECKSUM TABLE EXTENDED. Only exclude non-stored virtual generated columns from read_set. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Petrunia
sergey@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Move auto-partitioning sql_partition_auto_interval.cc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39492 Parallel Query: execute the join in the worker threads Each parallel worker now runs the whole select-project[-join] query over its own chunk of the driving table -- WHERE filtering, select-list projection and the joins to the other tables -- and ships the final result rows to the manager, which only concatenates them and sends them to the client. This replaces the model where workers shipped raw source records and the manager ran the join. make_join_readinfo()'s gate (can_run_query_in_workers) chooses the worker-side path for an inner select-project[-join] with a parallel- scannable driving table: no tmp table (group/distinct/order/window/ buffer), no LIMIT/SQL_CALC_FOUND_ROWS/procedure/aggregate, no outer join or semijoin, and every non-driving table reached by eq_ref/ref/full scan. do_select() then runs run_worker_side_join() instead of the nested loop; anything ineligible runs serially. Each worker opens a private copy of every non-const table, deep-clones and field-rebinds the conditions and select list, and rebuilds each ref (clone_table_ref, mirroring create_ref_for_key). It scans its driving chunk, runs its own inner nested loop (cp_buffer_from_ref + ha_index_read_map / ha_index_next_same for ref/eq_ref, rnd scan otherwise), projects each full match into a private result table and ships the row image; the manager drains and sends. A killed worker's own ER_QUERY_INTERRUPTED is no longer treated as a fatal evaluation error (PWT_error_handler guards with !thd->killed) so kills keep propagating through kill_signal with the correct kill type. Tests: parallel_query_worker_side (single table) and parallel_query_join (eq_ref, ref with fan-out, 3-table chain, full-scan inner table) compare the parallel result set against serial. parallel_query / parallel_query_oom moved to a plain SELECT (which now runs worker-side) and were re-recorded. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added tes case | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Mohammad Tafzeel Shams
tafzeel.shams@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38305: Expose adaptive hash index statistics in ANALYZE FORMAT=JSON - btr_sea::n_parts : change from ulong to uint to reduce struct size and eliminate padding hole |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
More stub for streaming backup TODO: Cover the InnoDB log copying TODO: Cover non-InnoDB files TODO: Actually implement the tar format |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-22943: Assertion 'marked_for_read()' failed in Field_varstring::val_str on CHECKSUM TABLE use_all_stored_columns() cleared read_set bits for all generated columns, including persistent generated columns. This caused stored generated columns to be accessed without being marked for read, leading to a marked_for_read() assertion during CHECKSUM TABLE EXTENDED. Only exclude non-stored virtual generated columns from read_set. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||