Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
drrtuy
drrtuy@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fix: fix stack size warning. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fariha Shaikh
farihais@amazon.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39153 Fix sporadic main.change_master_default mismatch The test used "restart_abort:" in the expect file, which MTR never recognized. It fell through to the else branch, deleted restart_opts, and started the server with defaults (heartbeat_period=60 instead of 0). Replace restart_abort with direct --exec $MYSQLD calls. 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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Aleksey Midenkov
midenok@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
WITHOUT_ABI_CHECK followup Followup for b337e14440b as info_src takes time too. info_src does not make much sense without ABI check. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fix locking bug around rpl_binlog_state::find_most_recent(). The rpl_binlog_state::find_most_recent() returned an rpl_gtid* pointing into internal memory of the rpl_binlog_state object that could change anytime after returning from the function, potentially having the caller read invalid data. Fix by instead copying the rpl_gtid value out into caller-supplied memory. Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
forkfun
alice.sherepa@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch '11.4' into '11.8' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40012 Parallel Query: execute the join in the worker threads Each parallel worker now runs the join and the WHERE over its own chunk of the driving table and ships the base-table columns of every row that qualified. The manager copies those columns back into the fields they came from in its own table instances, so that after a row is drained its records hold what a serial scan would have left there, and then evaluates the select list against them and sends the row. This replaces the model where the workers shipped raw source records and the manager ran the join. The transport carries columns rather than projected values because anything the manager does with a row beyond sending it reads a record, and not all of those reads go through Items that could be re-pointed: create_tmp_table() builds Copy_field pairs holding raw Field pointers into the base tables. make_join_readinfo()'s gate, can_run_query_in_workers(), chooses the worker-side path for an inner select-project[-join] over a parallel-scannable driving table: no tmp table, no LIMIT/SQL_CALC_FOUND_ROWS/procedure/aggregate, no outer join, no semijoin strategy the worker's plain nested loop cannot honour, and every non-driving table reached by eq_ref, ref or full scan. Every expression it hands a worker has to deep-copy into something that shares no node with the original and reads no table outside the join, or the copy would carry the manager's own items onto a worker's tables. do_select() then runs run_worker_side_join(); anything ineligible runs serially. Each worker opens a private copy of every non-const table, deep-clones and field-rebinds the conditions and the shipped column list, rebuilds each ref, scans its chunk, runs its own inner nested loop and ships the columns it read for each full match. It runs under the session's query id, so an item holding a value for the statement recomputes it rather than handing out the one it was cloned with. sql_parallel_execution.cc holds all of the above; sql_parallel_workers.cc keeps the worker threads, the batch channel and their lifetime. Tests: parallel_query_worker_side, parallel_query_join and parallel_query_clone compare a parallel result set against a serial one; parallel_query and parallel_query_oom moved to a plain SELECT and were re-recorded. .claude/commits/MDEV-40012.md records what came from the 13.0 branch verbatim, what was adapted to this tree, and what is new here. This commit was prepared with Claude Code: it ported the work from the 13.0 branch onto this tree's refactored structures and renamed scan API, found and fixed the two holes this tree's deeper Item copying opens -- an expression reaching a table the worker does not have, and a statement-lifetime item cached against query id 0 -- split the file, and ran the suites. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40009 SIGSEGV in Sql_path::from_text Problem: - The string passed to Sql_path::from_text() could be in various character sets, returned by Item::val_str_ascii(), which is not necessarily utf8mb3. - While the code in Sql_path::from_text() was written in the way that "str" was considered to be in utf8mb3. - As as result, cs->charset() in this line: auto len = cs->charlen(curr, end); could return a negative value and the whole loop got stuck. Changes: - Fixing Sys_var_path::from_item() to use val_str() instead of val_str_ascii(), to get the original value from "item", without any conversion. - Moving the conversion code inside Sql_path::from_text(). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Aleksey Midenkov
midenok@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39063 Server crashes at Item_func_lastval and Item_func_setval with CTE alias Pure aliases are not handled properly by Item_func_lastval::val_int() and Item_func_setval::val_int(). This is followup fix for MDEV-33985 where it missed similar cases for LASTVAL() and SETVAL(). add_table_to_list() does not create MDL request for pure aliases, i.e. when there is no table_list->db set or TL_OPTION_ALIAS was set. When the expression is not inside CTE the case with empty db is handled by: else if (!lex->with_cte_resolution && lex->copy_db_to(&db)) DBUG_RETURN(0); So, table_list gets current database name and the query is failed with ER_NO_SUCH_TABLE error. The fix adds the case of is_pure_alias() check for val_int() methods and fails it with ER_NOT_SEQUENCE2 error. Note: semantics for TL_OPTION_ALIAS cannot be based on empty db, only parser can set TL_OPTION_ALIAS as resolve_references_to_cte() relies on TL_OPTION_ALIAS after copy_db_to(). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40790 SELECT INTO row_type_of.field crashes the server The server crashed on DBUG_ASSERT on a SELECT into: - a `ROW TYPE OF table1` field variable - a `ROW TYPE OF cursor1` field variable Fix: - Adding a class my_var_sp_row_field_by_name - Adding a method sp_rcontext::set_variable_row_field_by_name() - Fixing the DBUG_ASSERT |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ParadoxV5
paradox.ver5@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Test for MDEV-39788 MDEV-39788 found that the recent refactor on the `main` (now 12.3) branch missed the (inconsistent) detail that, unlike `relay-log.info`, `master.info`’s line count _includes_ the line-count line itself. This commit extends and simplifies the test `rpl.rpl_read_new_relay_log_info` to `main.rpl_new_info` so it * Checks this detail to remind future changes of this type of mistake. * Covers `@@master_info` as well. * Covers the refactor’s buggy format as a downgrade/revert test. While here, this commit also includes a new-format version of MDEV-38020’s test to double as the value read check. Reviewed-by: Brandon Nesterenko <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
forkfun
alice.sherepa@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39522 Query with UNION fails in Oracle sql_mode with ER_BAD_FIELD_ERROR/ER_UNKNOWN_TABLE MDEV-37325 unconditionally wrapped union subqueries in derived tables, breaking name resolution of outer-scope/correlated references inside the unions (producing ER_UNKNOWN_TABLE errors). Delay the wrap until a following operator has a different linkage. In Oracle mode all set operators share one priority and bind left-to-right, so wrapping the accumulated prefix on each operator change enforces it. This also corrects the row multiplicity of mixed set operations toward left-to-right order. create_priority_nest(): when the nest covers the whole prefix, point the wrapper's first_nested at itself. Cut the prefix with cut_next() before wrapping and re-register it on the outer unit; Aleksey Midenkov: In Oracle mode optimize_bag_operation() returns early, so union_distinct is never recomputed and the stale value reaches execution. Register the wrapper first, then run fix_distinct(): reset_distinct() now scans the new outer chain (the wrapper alone) and correctly leaves union_distinct NULL; a following DISTINCT operand re-establishes it. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39803 RPM dependencies missing from MariaDB-server-galera package RPM dependencies where not included in cpack build due to incorrect component name. Corrects a103be381b38 Becase the wsrep_info plugin installs as a plugin, it overrites the cpack_rpm server-galera PACKAGE_DEPENDS. As such make the cmake/plugin.cmake only sets the PACKAGE_DEPENDS if not already set. This allows plugin to override automatic REQUIRES, fine-tuning their own dependencies |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40639 Open SYS_REFCURSOR crash, if many cursors inside a function Problem: If: - A routine A() opened a SYS_REFCURSOR with a function B() in the SELECT list - The function B() also opened some SYS_REFCURSORs Then reallocation of the cursor array THD::m_statement_cursors could happen during the execution of B(), so all sp_cursor_array_element pointers inside sp_instr_copen_by_ref::exec_core() of routine A() became invalid. Fix: Chaging the data type of sp_cursor_array: - from Dynamic_array<sp_cursor_array_element> - to Dynamic_array<sp_cursor_array_element*> So now only reallocations of the array of cursor pointers happen, while sp_cursor_array_element instances always stay on their originally allocated memory positions. Note: sp_cursor_array_element instances are allocated using the standart C++ "new" and deleted using the standard C++ "delete". Using a MEM_ROOT does not seem to be relevant here. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40012 Parallel Query: execute the join in the worker threads Each parallel worker now runs the join and the WHERE over its own chunk of the driving table and ships the base-table columns of every row that qualified. The manager copies those columns back into the fields they came from in its own table instances, so that after a row is drained its records hold what a serial scan would have left there, and then evaluates the select list against them and sends the row. This replaces the model where the workers shipped raw source records and the manager ran the join. The transport carries columns rather than projected values because anything the manager does with a row beyond sending it reads a record, and not all of those reads go through Items that could be re-pointed: create_tmp_table() builds Copy_field pairs holding raw Field pointers into the base tables. make_join_readinfo()'s gate, can_run_query_in_workers(), chooses the worker-side path for an inner select-project[-join] over a parallel-scannable driving table: no tmp table, no LIMIT/SQL_CALC_FOUND_ROWS/procedure/aggregate, no outer join, no semijoin strategy the worker's plain nested loop cannot honour, and every non-driving table reached by eq_ref, ref or full scan. Every expression it hands a worker has to deep-copy into something that shares no node with the original and reads no table outside the join, or the copy would carry the manager's own items onto a worker's tables. do_select() then runs run_worker_side_join(); anything ineligible runs serially. Each worker opens a private copy of every non-const table, deep-clones and field-rebinds the conditions and the shipped column list, rebuilds each ref, scans its chunk, runs its own inner nested loop and ships the columns it read for each full match. It runs under the session's query id, so an item holding a value for the statement recomputes it rather than handing out the one it was cloned with. sql_parallel_execution.cc holds all of the above; sql_parallel_workers.cc keeps the worker threads, the batch channel and their lifetime. Tests: parallel_query_worker_side, parallel_query_join and parallel_query_clone compare a parallel result set against a serial one; parallel_query and parallel_query_oom moved to a plain SELECT and were re-recorded. .claude/commits/MDEV-40012.md records what came from the 13.0 branch verbatim, what was adapted to this tree, and what is new here. This commit was prepared with Claude Code: it ported the work from the 13.0 branch onto this tree's refactored structures and renamed scan API, found and fixed the two holes this tree's deeper Item copying opens -- an expression reaching a table the worker does not have, and a statement-lifetime item cached against query id 0 -- split the file, and ran the suites. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ParadoxV5
paradox.ver5@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39788: Remove added line in `master.info` format The line-count lines in `master.info` and `relay-log.info` have been inconsistent (off by one) since their introduction. MDEV-37530 “fixed” this with its common code merger by chance, changing `master.info` to use `relay-log.info`’s line-count definition. This change, howëver, affected backward compatibility, as `master.info` now expects an ignored MySQL-only line where the first `key=value` option, `master_use_gtid`, is. Since this legacy text-based format has limitations that make it due for replacement, only code reüsablility is valuable, and its consistency does not outweigh its compatibility. Therefore, this commit solves this problem without reverting code by: * Changing the writing code to be compatible with both interpretations (albeit inconsistent with the reading code) * Adding a shim entry to `master.info`’s list to emulate prior versions’ reading behaviour * Although this solution can only restore upgrade compatibility with versions 10.0+, versions before MariaDB 10 have long been EOL. While here, this commit also fixes code and comments that contradict the actual effect. [P.S.] The test for this regression is pushed to 10.11 in PR #5147. Reviewed-by: Brandon Nesterenko <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39226: Push whole multi-table update/delete down into engines Give storage engines a way to take over an entire multi-table UPDATE/DELETE, the way they can already take over a SELECT. Without it the join, the row matching and every modification run in the SQL layer even when an engine could do the whole statement itself in one step; a single-table UPDATE/DELETE already avoids this via direct_update_rows()/direct_delete_rows(), but a multi-table statement has no primary handler object to drive that path. This adds a generic, engine-agnostic pushdown interface: the SQL layer offers the statement to the engine, and if the engine accepts it, it performs the whole thing and reports only the row counts. - Split select_handler into a pushdown_handler base with select_handler (result set) and a new multi_upddel_handler (runs a whole UPDATE/DELETE, reports row counts, reported as PUSHED UPDATE/PUSHED DELETE); add handlerton::create_multi_upddel, looked up in Sql_cmd_dml::execute_inner(). - multi_update/multi_delete gain direct_update_delete_done(), which records the engine's counts so send_eof() binlogs and replies without the SQL-layer loop; it forces statement-format binlogging so the change still replicates under binlog_format=ROW, and errors out instead of silently dropping counts for an unsupported result object. - FederatedX implements the interface as the reference engine used to test correctness: it prints the statement back and runs it remotely, passes the engine's error code/SQLSTATE through, reads the matched count from the remote info string, executes IGNORE locally, and only pushes down when all tables share one remote server (same as SELECT/derived/unit pushdown). Test: federated.federatedx_pushdown_upd_del. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40012 PQ: divide the whole join's cost, not the split table's scale_cost_for_parallel_scan() discounted the driving table's scan and nothing else, so every table joined after it was costed at its ull serial price. But a worker does not only scan its chunk: it runs the whole join over that chunk, so the work of each later table is divided between the workers exactly as the scan is. POSITION gains parallel_workers, set on the driving table when the access finally chosen for it was the scan that was costed as parallel, and left at 0 otherwise, including on a driving table whose scan lost to an index, where nothing is parallel. Each table joined after it divides its cost by that number. This commit was prepared with Claude Code |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fariha Shaikh
farihais@amazon.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39459 Fix bad sync pattern for chain replication MTR tests In chain replication (1->2->3), syncing only server_3 after save_master_gtid on server_1 does not guarantee server_2 has committed, because server_2's binlog dump thread can send events to server_3 before commit_ordered() completes on server_2. Fix affected rpl tests by syncing server_2 before server_3, and update result files accordingly. 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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleksandr Byelkin
sanja@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40173 RPM conflicts on /usr/lib64/security The move of the install location of pam files in MDEV-37197 (34aac090f2acc1a4b5850810fe41370c19659d55) resulted in different install locations on different RPM distros. Correct the RPM packaging to ignore the path of the pam files (but not the pam files themselves). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Remove no_valgrind_without_big.inc from *C* include dir The identical file is in mysql-test/include where it is used. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
drrtuy
drrtuy@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fix: MDEV-40452 ASAN builds complain about enourmous stack consumption b/c of the reference pointer used for stack usage calculations. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39813 ST_GeomFromGeoJSON does not control recursion depth Using stack_p wasn't a portable concept in 12.3 when JSON parsing got unlimited depth. To let ST_GeomFromGeoJSON was already a recursive function, needed because object order of "type" may be after the "geometries", but with json_engine_t no longer enforcing the depth, some stack checking was required. Use the check_stack_depth function to allow excessively deep GeoJSON objects to error. As this is cleaned up the gis-json test can be enabled. The exceeding stack depth is moved to lotofstack.test. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Andrei Elkin
andrei.elkin@pp.inet.fi |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40824 slave_run_triggers_for_rbr enabled slave ignores after-insert trigger's error MDEV-15990 commit did not handle after-trigger error on slave_run_triggers_for_rbr slave server. That made an error from such failing trigger lost. The reason was a flaw in new logics coded for Write_rows_log_event::write_row(). It is amended now. For any sql error out of the after-trigger HA_ERR_GENERIC handler error code is returned instead of zero. That error-stops serial slave as expected (also by pre-MDEV-15990 code). Optimistic parallel slave may retry, contingent upon the trigger's sql error. Note: idempotent-mode tolerance of trigger-internal errors and the per-row last_errno reset are left for a follow-up. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Aleksey Midenkov
midenok@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38854 Assertion table->vers_write fails upon ODKU into table with versioned column In MDEV-25644 vers_check_update() sets vers_write to false in case it returns false. It is ok for UPDATE but is not correct for ODKU is bulk insert requires vers_write on next tuple. The fix return vers_write value back when vers_check_update() and related vers_insert_history_row() are done in ODKU. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexey (Holyfoot) Botchkov
holyfoot@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39654 No warning after CAST( AS xmltype). Warning added. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Mohammad Tafzeel Shams
tafzeel.shams@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39800: Assertion `!(mode & 2048U) || (mode & 512U) || is_supremum' failed ISSUE: Lock bypassing optimization allows an X-lock request to skip waiting locks when the requesting transaction already holds an S-lock on the same record. This optimization is designed for regular B-tree record locks that use heap-number-based conflict detection. Spatial index predicate locks use different semantics. They perform MBR (Minimum Bounding Rectangle) overlap checks for conflict detection and must not participate in bypass optimization. The assertion failure occurred because predicate insert intention locks is not considered inside lock bypass code, which assumed all insert intention locks must be either gap locks or on the supremum record (MDEV-34877). ut_ad(!(insert_intention) || (gap) || is_supremum) Additionally, predicate locks could incorrectly enable bypass_mode because the existing checks did not explicitly exclude LOCK_PREDICATE locks. FIX: - lock_t::is_predicate(): Add a helper to identify spatial index locks. - lock_t::can_be_bypassed(): Return false for predicate locks. - lock_rec_has_to_wait_in_queue(): Update the assertion to allow predicate insert intention locks. Also add a !is_predicate() check to bypass_mode calculation. - lock_rec_queue_validate_bypass(): Add an early return to skip bypass validation for predicate locks. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
drrtuy
drrtuy@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chore: renaming, extra docs and bump DuckDB to gamma. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
KhaledR57
khaled57.dev@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40494 KEY_OP_DEL_PREFIX subtracts unchecked length from page_length The KEY_OP_DEL_PREFIX branch of _ma_apply_redo_index() subtracted the logged length from page_length and used the difference as a bmove() size, guarded only by a DBUG_ASSERT, which is compiled out when DBUG_OFF is set. A length larger than the used page underflows that size, and a length larger than page_length wraps page_length itself. Turn the assert into a runtime check, written as an addition rather than the assert's subtraction, which underflows on a page shorter than its own header. A refused record takes the error path that was already there. The test forges the logged length with corrupt_del_prefix, then crashes the server so recovery has to replay the record. The workload splits and merges index pages: this record comes from the underflow path, so plain inserts never produce one. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Georgi (Joro) Kodinov
joro@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40661: mysql_upgrade.test not stable on a busy server The cleanup of the old connection goes on in the background. It can take longer on a busy server and this triggers the active sessions warning in DROP user. Stablizied the test by disabling the warnings. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
forkfun
alice.sherepa@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch '11.8' into '12.3' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40729: Refactor my_xid to be a struct with the full data This is a refactoring commit in preparation for changing the internal XID used for binlog two-phase commit and recovery. The existing internal XID consists of server_id (4 bytes) and query_id (8 bytes). But the existing code only puts the query_id into the my_xid datatype, leaving the server_id implicit in the parts of the code that pass around my_xid, thus hard-wiring to the server_id global value. This commit changes my_xid to be a struct containing conn_id and commit_id, to match what will be used in MDEV-40729 where these constitute a transaction id shared between the server and the client. To clearly distinguish the refactor-only changes from changes in logic, this commit only changes the code to pass around two-value my_xid explicitly, but preserves the existing (server_id, query_id) values in internal XID. It maps server_id to commit_id, and query_id to conn_id. An empty / dummy my_xid is used with the value 0 in a couple of places in the existing code; this is replaced with a my_xid with commit_id==0. This will not conflict with real XID, as server_id cannot be 0, and in MDEV-40729 the commit_id will start at 1. Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexey (Holyfoot) Botchkov
holyfoot@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39683 Numeric aggregates should end up with an error for xmltype. Appropriate xxx_fix_length_and_dec() added to the Type_handler_xmltype. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Prathamesh Hukkeri
prathamesh04@users.noreply.github.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40122: `+DEFAULT` is not a valid value for master_heartbeat_period MDEV-28302 changed the grammar for master_heartbeat_period to accept DEFAULT (via num_or_default), while MDEV-38454 added an opt_plus to allow numeric values with an explicit `+` sign. The combination made the rule `opt_plus num_or_default`, which also accepted `+DEFAULT`, equivalent to `= DEFAULT`. Move the opt_plus under num_or_default's definition, so that `+` may only precede a numeric literal, and DEFAULT is a separate alternative. Now `master_heartbeat_period= +DEFAULT` is a syntax error again, while `= +45` and `= DEFAULT` are both accepted. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40012 PQ: divide the whole join's cost, not the split table's scale_cost_for_parallel_scan() discounted the driving table's scan and nothing else, so every table joined after it was costed at its ull serial price. But a worker does not only scan its chunk: it runs the whole join over that chunk, so the work of each later table is divided between the workers exactly as the scan is. POSITION gains parallel_workers, set on the driving table when the access finally chosen for it was the scan that was costed as parallel, and left at 0 otherwise, including on a driving table whose scan lost to an index, where nothing is parallel. Each table joined after it divides its cost by that number. This commit was prepared with Claude Code |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Petrunia
sergey@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40738: main.cte_update_delete missing DROP VIEW v1, refers to wrong MDEVs. Fix the testcase. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
drrtuy
drrtuy@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chore: DuckDB build.sh exposes build with ASAN flag. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39226: Push whole multi-table update/delete down into engines Give storage engines a way to take over an entire multi-table UPDATE/DELETE, the way they can already take over a SELECT. Without it the join, the row matching and every modification run in the SQL layer even when an engine could do the whole statement itself in one step; a single-table UPDATE/DELETE already avoids this via direct_update_rows()/direct_delete_rows(), but a multi-table statement has no primary handler object to drive that path. This adds a generic, engine-agnostic pushdown interface: the SQL layer offers the statement to the engine, and if the engine accepts it, it performs the whole thing and reports only the row counts. - Split select_handler into a pushdown_handler base with select_handler (result set) and a new multi_upddel_handler (runs a whole UPDATE/DELETE, reports row counts, reported as PUSHED UPDATE/PUSHED DELETE); add handlerton::create_multi_upddel, looked up in Sql_cmd_dml::execute_inner(). - multi_update/multi_delete gain direct_update_delete_done(), which records the engine's counts so send_eof() binlogs and replies without the SQL-layer loop; it forces statement-format binlogging so the change still replicates under binlog_format=ROW, and errors out instead of silently dropping counts for an unsupported result object. - FederatedX implements the interface as the reference engine used to test correctness: it prints the statement back and runs it remotely, passes the engine's error code/SQLSTATE through, reads the matched count from the remote info string, executes IGNORE locally, and only pushes down when all tables share one remote server (same as SELECT/derived/unit pushdown). Test: federated.federatedx_pushdown_upd_del. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
forkfun
alice.sherepa@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch '10.11' into '11.4' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39113 MSAN/ADDR addr2line stack resolver detrimental MSAN/ASAN test environment, the addr2line was so high in memory utilization that it was the pick of the OOM killer to resolve the OOM situation. Once this occurred there wasn't a saved core or gdb backtrace of the core to resolve the issue. To resolve this, make stack-trace default to 0 (off) for the addr2line base implementation under memory sanitizer and address sanitizer. MariaDB-backup also forces the enabling of stack-trace. Disabling this unconditionally reduces the risk of a user operational impact if a lengthy stack trace starting in a mariadb-backup critical locked period. The mysqld--help test now excludes the stack-trace as its result is environment dependant. The "Defaults to..." output for suppressed variables, currently only stack-trace, is excluded. Since thread-stack is an excluded varable, the ubsan/asan exclusions from commits dfa6fba9595a and dfa6fba9595a aren't required. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Mohammad Tafzeel Shams
tafzeel.shams@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40504: Fix memory leak in mariabackup incremental copy ibx_copy_incremental_over_full() : Replace die() with proper error handling to avoid memory leaks when RocksDB backup directory operations fail. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||