Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42676 Windows MSI: make the firewall exception optional The MSI always added a Windows firewall exception for mysqld.exe. Make it a separate feature, "Firewall exception", under MariaDB Server. It is installed by default, as before. Unselect it in the feature tree, or pass FIREWALL_EXCEPTION= (empty) to msiexec to skip it. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40620: Address review comments on the FULL JOIN code Address review comments and add markdown document describing the feature. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Aleksey Midenkov
midenok@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42662 CREATE TABLE with extra2 data over 64K hits assertion in extra2_write_len() build_frm_image() stores frm.length (FRM_HEADER_SIZE + extra2 size + 4) and the extra2 size in 2-byte header fields, but only the field data type info image was length-checked. A definition with enough extra2 content (e.g. engine-defined table options) failed the assertion in extra2_write_len() in debug builds, and in release builds the lengths were silently truncated, producing an unreadable frm. The fix rejects such a definition with ER_TABLE_DEFINITION_TOO_BIG before the header fields are stored. The field data type info image check is moved ahead of this guard, so that an image over 0xFFFF bytes still gets its specific error message. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42570 rpl.rpl_start_alter_restart_master fails when run in a chain of tests The test shows the slave binary log from the beginning, including the replicated mtr.add_suppression() transaction. How that transaction ends in the slave binary log depends on the engine of mysql.gtid_slave_pos, because the slave updates the table within the same transaction. With Aria (the default under MTR) it ends with Query COMMIT. With InnoDB, InnoDB takes part in the transaction and it ends with Xid COMMIT. Many replication tests change mysql.gtid_slave_pos to InnoDB and don't restore it, for example rpl_start_alter_mysqlbinlog_1, and check-testcase does not check table engines. When mtr reuses the servers after such a test, the result mismatches. The test passes after a restart or with --repeat, because then the table is in Aria. Set the engine of mysql.gtid_slave_pos on the slave to Aria explicitly at the beginning of the test, so that the result does not depend on previous tests. Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Susil Behera |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40620: Run the FULL JOIN tests over more engines and switches full_join.test runs once for every point of three crossed axes, the optimizer switch axis in full_join.combinations, the storage engine axis in full_join_engine.combinations and the index axis in full_join_index.combinations, thirty runs in all. The result file in the tree is the run with the default engine, no added indexes and the switches at their defaults. Every other run's expected output is a diff against it, so a run whose output matches it has no file of its own, and a query added to the test shows up in all thirty runs. The index axis gives every column of every base table a non-unique index on itself. The work is decided by what the database holds at the point full_join_add_indexes.inc is sourced, so a section sources it after the tables it creates. A non-unique index is the only kind that can be added without knowing the data, since a primary key or a unique index would fail on the duplicates and the NULLs that many sections put in a join column on purpose. The switch axis holds the four switches at their defaults and each of them off in turn, which is what makes a wrong result attributable to one transformation. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
don't use OpenSSL 1.0 - fallback to wolfssl 1.0 is EOL since 2019 and does not support TLSv1.3 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
rpl.rpl_corrupted_decimal_precision fails with timeout Due to MDEV-42580, if an earlier test ever set a replication filter, the SQL abort expected in rpl.rpl_corrupted_decimal_precision never happens, and the test fails with a timeout. To avoid it, temporarily enforce the slave restart at the beginning of the test. It should be removed when the bug is fixed |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40620: Allow a nested join as a FULL JOIN operand Phase 2 rejected two shapes. A FULL JOIN whose right operand was a nested join raised ER_FULL_JOIN_BASE_TABLES_ONLY, and a FULL JOIN on the inner side of an enclosing LEFT or RIGHT JOIN raised ER_FULL_JOIN_NOT_ALLOWED_IN_OUTER_JOIN. Both shapes are allowed now and neither error is raised any more. A FULL JOIN emits the rows of one side that never matched with the other side null complemented. An enclosing join's condition has to see those rows complete, which it cannot do while the operand is only a set of tables spread through the join order. An operand that is a nested join is therefore computed into a temporary table before the enclosing join runs, so one JOIN_TAB stands for the whole operand and carries the FULL JOIN's own marks. The chosen plan has to keep such an operand on an unbroken span of the join order, and that span becomes a run of JOIN_TABs of its own, the way a materialized semi join already is. Nothing outside the operand is positioned while the operand is computed, so a table inside it can carry no condition that names an outside table, an equality class that spans the boundary is split at it, and the outer join scope of a join outside it stops there. A nest goes on naming a table that table elimination removed, and an eliminated table is a const table, so the test for entering the run leaves the eliminated tables out. The test for entering a materialized semi join run reads the same way. The operand keeps a copy of its own ON expression, since simplifying the join tree merges an inner join's ON into the enclosing outer join's ON, which is not equivalent for a FULL JOIN because it changes which rows of the right side never match. An operand can itself be built from more than one join, so an ON expression can sit a level or two below the top of it, and every such expression is recorded on the operand as a whole, which is the nest that reads them back. A predicate over the operand is checked again at the entry standing for it, once the null complementing has happened. A FULL JOIN's left side WHERE predicates are deferred to the table that completes its right side even when that side is a nest. The enclosing ON contributes no access path for the operand. Reading a row back restores what a nest table cannot hold on its own, whether the row was null complemented for a column declared NOT NULL, and the status that says whether the table holds a usable row at all. The JOIN_TAB standing for a run covers every table of the nest, the eliminated ones included. The plan output therefore skips only a JOIN_TAB that is a table of the query, since a JOIN_TAB standing for a run is never eliminated. The FULL JOIN code moves out of sql_select.cc, sql_base.cc and table.cc into opt_full_join.cc and opt_full_join.h. JOIN::full_joins holds a Full_join_info, declared in opt_full_join_info.h, for each FULL JOIN that simplify_joins did not rewrite. It holds the two sides, the WHERE conjuncts held back for the FULL JOIN, the tab that reads its right side, the duplicate filter of the right rows that matched, and the next FULL JOIN whose null complement pass runs from the same tab. It replaces fj_dups, fj_first_target and fj_next_target on JOIN_TAB and fj_left_cond on TABLE_LIST. The list is built for each JOIN, so a prepared statement starts every execution with nothing held. opt_join_runs.cc and opt_join_runs.h hold the runs. get_best_combination records every run of the chosen join order in a Join_run_layout before it writes any JOIN_TAB, and the layout gives the exact number of top level JOIN_TABs. make_join_select walks the plan with Join_tab_walk, which keeps the tables a run sets aside on entry until the walk reaches the run's placeholder. A FULL JOIN run can be inside a materialized semi join, so the walk keeps the runs on a stack. make_join_select decides again which conditions wait for a FULL JOIN's right partner, on each condition about to be attached to a table. Distributing the WHERE builds conditions for one table out of disjunctions that span both sides, and a HAVING predicate moved into the WHERE can name the left side alone, so the choice made while the WHERE is rewritten misses both. That earlier choice stays, since it keeps the left side out of ref and range analysis. Whether a condition reads a table after the partner is decided from the join order positions of the tables it reads. An enclosing join's ON supplies no key value for a table on a FULL JOIN's left side, because the null complement pass is complete only once every left row has been read. A key value that reads only tables of the same left side is still allowed. An ORDER BY over a FULL JOIN that simplify_joins kept sorts through a temporary table, because the null complement pass emits right rows after the scan of the first table. EXPLAIN gathers the tables of each run at its own depth, and an operand nest inside a materialized semi join reports under that semi join's id. Sections 22 to 28 cover the new shapes. The section covering more than one matching right side row becomes Section 28, which adds a nest operand to the same case, and the two sections that came with the fixes before this one are renumbered to follow it. Sections 35 to 42 cover an ON expression below the top of an operand, an enclosing ON that keeps the left side NULLs, operand nests that table elimination shrinks, a condition offered to a table inside a run, a prepared WHERE that folds away on a later execution, a FULL JOIN run inside a materialized semi join, and a left side condition over a table before the partner. Sections 8, 18 and 27 gain left side predicates that appear only once the WHERE is rewritten. The helper that gives every column an index of its own comes with them, ahead of the axis that turns it on. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42567 rpl.rpl_change_master_implicit_gtid_warning fails with "Can't initialize replace" when run after another test The test stopped the slave right after include/master-slave.inc and then built CHANGE MASTER coordinates from SHOW SLAVE STATUS. But master-slave.inc only waits for Slave_IO_Running=Yes, which the IO thread reports right after sending COM_BINLOG_DUMP, before it has received anything from the master. If STOP SLAVE arrives before the master's initial fake Rotate event, Master_Log_File is still empty and --replace_result fails with "Can't initialize replace from 'replace_result $io_log_file ...'". The race is lost reliably when the test runs after another replication test (e.g. with --repeat) over a non-TLS replication connection, which is the default in 10.11. There the master's dump thread from the previous test is still waiting for binlog updates when the slave reconnects, and kill_zombie_dump_threads() delays the new dump by at least 100 ms. With TLS replication (the default in 11.4+) the old dump thread is already gone and the test passes; 11.4 with --skip-ssl fails the same way as 10.11. Fix: sync the slave with the master before stopping it, so that the IO thread has read the master's initial events and Master_Log_File and Read_Master_Log_Pos are populated. The result file is unchanged. Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Susil Behera |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42237 rpl.rpl_read_old_relay_log_info fails on Windows (Linux-style path) rpl.rpl_read_old_relay_log_info fails because the test overrides relay-log.info with the Linux-style ./slave-relay-bin.000001, while Windows uses the format with backslashes, .\slave-relay-bin.000001. The patch modifies the file contents using a perl block, which keeps the relay log name intact and only replaces the position. Thus the name remains valid for whatever system the test is run on. Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Susil Behera |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39492 PQ: the workers share one temporary table's worth of memory Every worker's result container is a temporary table that starts in HEAP and converts to Aria on disk when it fills. Each one was sized from the session's min(tmp_memory_table_size, max_heap_table_size), so a team of N workers could hold N times the memory a single temporary table of the session is allowed. init_parallel_workers() now gives each worker a share of that limit, divided by parallel_worker_threads, kept in pwt_row_layout::worker_heap_bytes. The share is left alone when tmp_memory_table_size is at its maximum (no limit) or the limit is 0 (temporary tables forced to disk), and is never rounded down to 0, which would also force them to disk. make_container() and make_container_from() take a for_worker flag; for a worker's container the pwt_worker_heap_size guard lowers the manager THD's tmp_memory_table_size to the share while the container is built, and puts it back after. The guard has to cover both create_tmp_table(), which sets share->max_rows from it, and instantiate_tmp_table(), where ha_heap::create() sets max_table_size from it again. Every container is built on the manager's thread, so the manager's THD is the one both read. The worker containers so sized are the plain-row, scan-only and pre-aggregation ones; the manager's own receive and sort containers keep the session's full size. parallel_ship_cost() charged the disk tier for rows past parallel_divisor full containers; it now counts parallel_divisor shares, so the optimizer does not undercount what spills. mtr's default max_heap_table_size is 1M, which now leaves 256K to each of 4 workers. That spilled the 50 VARCHAR(4000) groups that parallel_query_aggregate expects to stay in heap, and the added spill charge made the serial plan cheaper for the queries parallel_query_worker_side and parallel_query_why expect to run in the workers. These tests set max_heap_table_size to 4M, the 1M per worker they had before, so they go on checking what they were written for. This commit was prepared with Claude Code (Opus 5.5), which traced where the worker containers are sized (create_tmp_table() and ha_heap::create()), wrote the change, ran the parallel_query tests in normal and --ps-protocol modes, confirmed the three failures were the split and not a fault by rerunning them with max_heap_table_size=4M, and made the test changes. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40620: Check column grants for SELECT * over a NATURAL FULL JOIN SELECT * over a NATURAL FULL JOIN now checks the grants of both columns in the COALESCE of each common column. A user with SELECT on t1.a but not on t2.a could read the common column a through select * from t1 natural full join t2, while select a was denied. The COALESCE reaches the SELECT list already resolved, and the check of the join's columns as a whole sees only the left operand. The check runs only when the statement has a FULL JOIN. It covers FULL JOIN USING, prepared statements and an enclosing NATURAL JOIN whose common column is that COALESCE, and natural_full_join_grants.test covers each of these. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42633 rpl.rpl_row_loaddata_concurrent fails with Wrong offset or I/O error when run after another test The test saves only the position from SHOW MASTER STATUS and then sources show_binlog_events.inc without $binlog_file. The resulting SHOW BINLOG EVENTS FROM <pos> therefore reads the first binlog file. If an earlier test in the same server run rotated the binlog (for example, rpl.rpl_parallel_wrong_exec_master_pos runs FLUSH LOGS), the saved position belongs to a later file. In the first file it does not start an event, so the test fails with: ERROR 1220 (HY000): Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error Added RESET MASTER at the start of the test, as rpl_stm_loaddata_concurrent.test already does. Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Susil Behera |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42202 perfschema.relaylog fails when run after other replication tests The test checks file I/O instrumentation accumulated since server startup, so it relied on getting freshly started servers. With duplicate options removed, mtr may now reuse servers left by a previous replication test, and the test sees binary/relay log files and statistics from it. Restart both servers at the beginning of the test, removing binary and relay logs while the servers are down. RESET MASTER and RESET SLAVE are not sufficient, as performance schema keeps instances of files deleted by them, and a restart opens a new binary log anyway. Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Susil Behera |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42628 rpl.rpl_do_grant incorrectly passes on Linux and fails on Windows The test opens connection create_rout_db_slave with host "localhost", the slave port and no socket. mysqltest then uses the default socket, which is the master's. On Unix a connection to "localhost" goes through the socket and ignores the port, so this "slave" connection actually went to the master. On Windows "localhost" means TCP, so the connection really reached the slave. Since MDEV-35617, DROP USER emits ER_ACTIVE_CONNECTIONS_FOR_USER_TO_DROP (4227) when the dropped user still has an active session. On Windows create_rout_db_slave was still connected to the slave when DROP USER 'create_rout_db'@'localhost' ran there, so the note appeared and the result did not match. On Unix the slave had no such session, so the note never appeared, and the "slave" part of the test had been running against the master. Fix: - pass $MASTER_MYSOCK / $SLAVE_MYSOCK explicitly, so each connection reaches the intended server on all platforms; - disconnect create_rout_db_slave right after its last use, before DROP USER on the slave, and wait until the session is gone from information_schema.processlist, because the server finishes a disconnect only after the client has moved on. Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Susil Behera |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42238 rpl.rpl_row_mysqlbinlog fails on Windows (charset problem) rpl.rpl_row_mysqlbinlog fails because apparently the client command line on Windows cannot interpret the literal cp932 string which is passed to it. Since the point of the test is not how the original INSERT happens, but how it further works while replaying the binlog, it should be acceptable to insert a hex-encoded value Reviewed-by: Susil Behera |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42198 Options from MTR opt files are added multiple times Options from .opt files of included files were appended every time the file was sourced, so they got repeated once per include path. It caused unnecessary server restarts, and too long server command lines lead to startup failures on Windows. Now each file caches only its own .opt options plus an ordered list of the files (itself and everything it sources) whose options apply, each file listed once. The test's options are assembled from that list. Options of included files still precede those of the including file. If a file is sourced several times, its options are applied at the place of its last inclusion, so the effective option values stay the same as before, and a test can still source a file again to override options set by files sourced in between. Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Alice Sherepa |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41085 Enable MTR tests on Windows: rpl suite Reviewed-by: Vladislav Vaintroub |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40620: Fix join column grants, view read sets and trace tests A prepared NATURAL or USING join no longer skips the column grant check on the equality it adds to its ON condition. A flag let a user without SELECT on the join column run such a statement. The flag is removed, so the check matches the server before FULL JOIN support and also PostgreSQL, and natural_full_join_grants.test covers it. A FULL JOIN whose left operand is a join no longer crashes inside a merged view or derived table. The columns read by the ON condition of that inner join were missing from the read set of their tables, and they are now marked again. The optimizer trace checks of full_join.test move to full_join_notembedded.test, because the embedded server hides the trace and those checks failed there. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39492 PQ: a worker container rebuilt on disk counts against the temporary space limits When a worker's HEAP container fills, it is rebuilt as an Aria table on the worker's thread. The container is opened cross_thread, which uses HA_OPEN_GLOBAL_TMP_TABLE instead of HA_OPEN_INTERNAL_TABLE so that Aria does not allocate its structures thread-specific, and it keeps HA_OPEN_SIZE_TRACKING, so the share is tracked but not internal. Aria assumed a tracked table is always internal ("Tracked table (always internal)", maria_def.h). _ma_set_share_data_file_length(), which is how a block-record table reports its data file growing, reported the growth to temp_file_size_cb_func() only in the branch taken for an internal table; for any other share it took intern_lock, updated the length, unlocked, and reported nothing. Index file growth (ma_page.c) is reported for any tracked share, so a worker's keyed pre-aggregation container was partly counted, but the data file of every worker container was never counted at all: Max_tmp_space_used stayed 0, and neither max_tmp_session_space_usage nor max_tmp_total_space_usage could stop a parallel query however much it wrote to disk. The growth is now reported for every tracked share, after intern_lock is released for a non-internal one. parallel_query_tmp_space spills every worker's container to disk and checks that the space is counted, and that a session limit and a server limit far below what one worker writes each fail the query. Before this change the query succeeded under both, with Max_tmp_space_used 0. This commit was prepared with Claude Code (Opus 5.5), which found that the limits never fired for a parallel query while setting up the per-worker split of max_tmp_session_space_usage, traced it with a DBUG trace (temp_file_size_cb_func() was called only on the manager's thread, never on the workers') to the internal-table branch in _ma_set_share_data_file_length(), made the change, wrote the test, and ran the parallel_query tests and main.tmp_space_usage in normal and --ps-protocol modes and the maria suite. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42228 MTR tests fail with "File already exist" for .expect files on Windows On Windows mtr workers are threads of one process, so a handle opened while reading the .expect file could be inherited by a server spawned at the same time by another worker. That kept the file from being deleted for the lifetime of that server, and the next --write_file of the .expect file failed with "File already exist". Read the .expect file under the spawn lock. Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Vladislav Vaintroub |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42590 rpl.rpl_start_alter_restart_master leaves replication setup behind Reviewed-by: Susil Behera |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39492 PQ: the workers' temporary space counts against the session's limit as one temp_file_size_cb_func() charges temporary space to current_thd and checks max_tmp_session_space_usage against that THD's own usage. A worker's THD copies the session's variables in pwt_thread::init_worker_thd(), so each worker was checked against the whole session limit on its own, and a parallel query could write parallel_worker_threads times what the session is allowed before any one worker hit it. Dividing the limit evenly between the workers would bound the total, but a worker that got most of the rows would hit its share while the others left theirs unused. Instead every worker charges the session itself. THD gains tmp_space_owner, set on a worker's THD to the manager's, and temp_file_size_cb_func() charges and checks the owner in its place, so the session's tmp_space_used, Max_tmp_space_used and limit cover the workers and the manager together, however the rows are divided. tmp_space_shared, set on the manager's THD from before the first worker starts until every worker has been joined (quiesce_workers(), or the abort path of init_parallel_workers()), makes the callback update its counters under LOCK_thd_data, as it already did for shared_thd. A new flag rather than shared_thd, because shared_thd also changes how the THD's memory is accounted (my_malloc_size_cb_func()), which the manager's ~THD has to reconcile. The lock is now taken before the assertion that reads tmp_space_used, which other threads may be updating. Charges and credits both land on the manager, whichever thread grows a container or frees it, so a worker's own tmp_space_used stays 0 and thread_func_end() no longer hands it over with the other counters. max_tmp_total_space_usage needed nothing: it is checked against one server-wide counter that every thread adds to. parallel_query_tmp_space gains a 2M session limit for a query whose four workers write about 4.3M between them and at most about 1.5M each. With each worker checked against the whole limit the query succeeded; it now fails. This commit was prepared with Claude Code (Opus 5.5), which first divided the limit evenly between the workers and then, at the user's request, replaced that with the shared counter. It measured the query's thresholds under both (about 4.3M shared, about 4.5M split, about 1.5M with neither), confirmed the 2M case fails with the change reverted on its own, found that InnoDB's dynamic chunking spreads even a 500-row table evenly over four workers so that no test without a debug hook can skew the rows, and ran the parallel_query tests and main.tmp_space_usage in normal and --ps-protocol modes, the maria suite and the main suite. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42200 main.mysqlbinlog_stmt_compressed depends on previous tests The test ran mysqlbinlog on the current binlog file from the start, and if that file still held the previous test's events, it would cause a mismatch. Additionally, thread_id value depended on the chain of tests. The part for thread_id is taken from 11.8, to preserve consistency. Assisted-by: Claude:claude-sonnet-5-5 Reviewed-by: Kristian Nielsen |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42236 rpl.rpl_change_master_long_channel_name fails on Windows (too long path) rpl.rpl_change_master_long_channel_name fails on Windows because it expects a 252-character name (base name, excluding the path) to be valid; on Windows the whole path is limited to 260 characters, so a 252-character name makes it too long. The patch disables the test for Windows. Reviewed-by: Susil Behera |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42676 Windows MSI: make the firewall exception optional The MSI always added a Windows firewall exception for the server executable. Make it a separate feature, "Firewall exception", under MariaDB Server. It is installed by default, as before. Unselect it in the feature tree, or pass FIREWALL_EXCEPTION= (empty) to msiexec to skip it. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||