Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41171 I_S.TABLES fast path does not count examined rows The fast path of MDEV-31342 sent rows but did not update the examined row count. The slow query log showed rows_examined=0 for a query that read three rows. Count each row that the fast path reads, as the regular path does for the rows it reads from the temporary table. The test also covers Rows_sent, Empty_queries and the slow log. It adds the ANALYZE SELECT case of MDEV-41165. Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41171 I_S.TABLES fast path does not count examined rows The fast path of MDEV-31342 sent rows but did not update the examined row count. The slow query log showed rows_examined=0 for a query that read three rows. Count each row that the fast path reads, as the regular path does for the rows it reads from the temporary table. The test also covers Rows_sent, Empty_queries and the slow log. It adds the ANALYZE SELECT case of MDEV-41165. Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
mariadb-PranavTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41137 Add CHARACTER SET ANY_CS and CHARSET OF / %CHARSET Stored routines: - CHARACTER SET ANY_CS: a routine parameter takes the character set and collation of the actual argument at call time, without conversion. Allowed on procedure and function parameters only. - CHARSET OF var (var%CHARSET in sql_mode=ORACLE): a parameter or variable takes the character set and collation of a previous parameter or variable. Resolved at CREATE time if the source has a fixed character set, at call time if it is ANY_CS or anchored to one. - information_schema.parameters reports NULL character set and collation for ANY_CS and call-time anchors. New tests: main.sp-charset-any_cs, compat/oracle.sp-charset-any_cs. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Georg Richter
georg@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42145: Enable crl/crl_path for wolfssl/gnutls - Fixed abort if a crl or crl_path was passed to a server which was built with WolfSSL - Enable tests for all configurations |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42164 mariadb-import --use-threads can kill its own connection When a worker fails, kill_tp_connections() sent mysql_kill() for every worker connection over the failing worker's own connection. It could kill itself first, and the remaining kills then failed on the dead connection, so the other workers were not killed and the server kept running their LOAD DATA after the client exited. Skip the own connection when killing, and close it afterwards. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 one range slot per ARRAY index Before, every MEMBER OF / JSON_OVERLAPS / JSON_CONTAINS point got its own cloned KEY_PART and key slot, and points were combined only through index_merge (OR) or by picking one slot (AND). Now all points on an ARRAY key part share the original slot: * SEL_ARG_ARRAY holds a list of make_key() points ("the array contains any of them") and the summed records_in_range() estimate and cost, taken once when the point is built. * key_or() of two ARRAY ranges takes the union of the points; key_and() keeps the operand with the lower estimate, the WHERE condition checks the rest. * KEY_PART cloning (get_claimed_key_part()) is now RTREE-only, so ARRAY-only queries size SEL_TREE::keys by param->keys again. * QUICK_RANGE_SELECT_ARRAY gets one QUICK_RANGE per point and passes all points to hlindex_read_first(); json_index reads them in turn and skips trefs it has already returned. * check_quick_select_array() uses the stored estimate, and rejects non-ARRAY SEL_ARGs (e.g. IS NULL) on the ARRAY key part. ORed MEMBER OF and JSON_OVERLAPS now give a single range scan instead of index_merge sort_union, with no MAX_KEY limit on the number of points. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41165: use I_S fast path with max_statement_time Remove the max_statement_time fallback from is_simple_is_query(). The fast path now runs with a statement timer set. In get_schema_tables_result(), add the debug sync point i_s_fast_path_before_eof before EOF is sent. If the query was killed or timed out after the WHERE condition was evaluated, send the kill message instead of EOF. Test changes: - mdev_31342: rename the max_statement_time case, expect is_fast_path in EXPLAIN FORMAT=JSON, add the End of 13.2 tests marker. - mdev_31342_kill (new): KILL QUERY and max_statement_time expiry after the scan, before EOF, plus a Handler_tmp_write check that the fast path is used. Co-authored-by: Oleksandr Byelkin <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 bound range optimizer work for many ARRAY index points With one range slot per ARRAY index, the number of points in a SEL_ARG_ARRAY is no longer bounded by MAX_KEY, and a JSON_OVERLAPS or JSON_CONTAINS constant with N elements cost (see the TODOs): * N records_in_range() index dives, one per leaf, even when the estimate is never used; * O(N^2) work in key_or_array(), which copied both point lists into a new SEL_ARG_ARRAY on every OR and deduplicated with a linear scan. Now: * key_or_array() appends the smaller point list to the larger SEL_ARG_ARRAY in place, or to a copy of it if it is shared (use_count > 0), without sorting or deduplicating. * SEL_ARG_ARRAY::normalize() sorts and deduplicates the points once, when they are needed: estimates, quick select, optimizer trace. * SEL_ARG_ARRAY::estimate() computes rows and cost lazily, on first use (key_and() or check_quick_select_array()). With eq_range_index_dive_limit or more points it dives on that many points spread over the sorted list and extrapolates. * JSON_CONTAINS skips duplicate elements of the constant and uses at most eq_range_index_dive_limit distinct ones for the range, since each AND costs a dive and fewer conjuncts give a superset. Points are now read in sorted order, so the order of rows from an ARRAY index range scan may differ. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41171 I_S.TABLES fast path ignores ROWNUM and ROWS EXAMINED The fast path of MDEV-31342 streams rows of a simple SELECT on INFORMATION_SCHEMA.TABLES. ROWNUM() in the WHERE clause and LIMIT ROWS EXAMINED are handled by the join. The fast path bypassed both and returned every row without a warning. Do not use the fast path for a query with ROWNUM() or with LIMIT ROWS EXAMINED. The test also covers @@sql_select_limit and FOUND_ROWS(). Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38643: ST_GeomFromText marks its SELECT with UNCACHEABLE_RAND This patch removes the flag from ST_GeomFromText, ST_GeomFromWKB, ST_GeomFromGeoJSON, ST_AsGeoJSON. When called with one argument, these functions set UNCACHEABLE_RAND on the enclosing SELECT. In contrast, the forms with more arguments never set that flag. The flag was added in 2006 by commit 384407aaeb3, which moved the function parsing out of sql_yacc.yy. The prior grammar rules did not set the flag for these, either. The new code has the same form as the code for ENCRYPT, which requires the UNCACHEABLE_RAND flag as its one argument variant takes its salt from the clock. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38741 mtr: do not suppress the reason of a client disconnect The global suppressions of "Aborted connection", in mariadb-test-run.pl and mtr_warnings.sql, hid the line that the client disconnect watcher writes when it aborts a command: "Aborted connection N to db: 'x' user: 'u' host: 'h' (Client disconnected)". Nothing showed when the watcher aborted a connection that it should have left alone. main.locale found one, because its server log is in German and the English entry did not match. Make the two entries skip a line that ends in "(Client disconnected)". Other aborted connections are suppressed as before. The tests that drop a client on purpose accept the reason: have_disconnect_watcher.inc, which the tests of the watcher include, and dirty_close, loaddata, sp_notembedded, ssl_timeout, mysqltest, innodb_bug38231, innodb.xa_recovery, mysql_client_test, mysql_client_test_nonblock, mysql_client_test_comp, rpl_semi_sync_shutdown_await_ack, spider/bugfix.mdev_35959 (a Spider link that times out), main.mysqldump (mariadb-import can leave a LOAD DATA running when it fails, MDEV-42164) and mariabackup.nolock_ddl_during_backup_end (mariabackup ends in the middle of a backup). The Connector/C tests of the unit suite close connections on purpose, but cannot call mtr.add_suppression(), so suite.pm adds it before each of them. A replica closes its connection on purpose when it is stopped, in any phase of its setup, also while the master runs one of its first queries. rpl_init.inc accepts the reason for every server of the replication tests, without writing it to the binlog. A binlog dump thread logs its disconnect with another message, and only with log_warnings=4. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-25848 Allow "js IS NOT NULL AND <JSON_SARGABLE_PREDICATE on js>" to use range access | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41171 I_S.TABLES fast path ignores ROWNUM and ROWS EXAMINED The fast path of MDEV-31342 streams rows of a simple SELECT on INFORMATION_SCHEMA.TABLES. ROWNUM() in the WHERE clause and LIMIT ROWS EXAMINED are handled by the join. The fast path bypassed both and returned every row without a warning. Do not use the fast path for a query with ROWNUM() or with LIMIT ROWS EXAMINED. The test also covers @@sql_select_limit and FOUND_ROWS(). Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42139 fix spurious wakeup in gu_debug_sync_wait() In galera_3nodes.galera_join_with_cc_X this let a waiter on the "process_primary_configuration" sync point disappear from wsrep_debug_sync_waiters between a wait_condition.inc poll and the test's own follow-up SELECT, producing an empty result instead of the point name. Test now requires Galera library 26.4.29 where fix for spurious wakeup in gu_debug_sync_wait() is. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hemant Dangi
hemant.dangi@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42122: check_port() must verify the listener is our own Issue: wait_for_listen() asks check_port() whether a process named socat/nc/netcat is listening on the expected port, but passes no PID to match against, so check_port() accepts any process with that name anywhere on the system. On a busy host running many concurrent SSTs, an unrelated process can transiently hold the same port number, and wait_for_listen() then reports "ready" even though this invocation's own listener never came up. Solution: When check_port() isn't given a specific PID to match, verify that a candidate process found by name and port is this script's own process or a descendant of it, rather than accepting any same-named process. Existing callers that already pass a known PID are unaffected. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 one range slot per ARRAY index Before, every MEMBER OF / JSON_OVERLAPS / JSON_CONTAINS point got its own cloned KEY_PART and key slot, and points were combined only through index_merge (OR) or by picking one slot (AND). Now all points on an ARRAY key part share the original slot: * SEL_ARG_ARRAY holds a list of make_key() points ("the array contains any of them") and the summed records_in_range() estimate and cost, taken once when the point is built. * key_or() of two ARRAY ranges takes the union of the points; key_and() keeps the operand with the lower estimate, the WHERE condition checks the rest. * KEY_PART cloning (get_claimed_key_part()) is now RTREE-only, so ARRAY-only queries size SEL_TREE::keys by param->keys again. * QUICK_RANGE_SELECT_ARRAY gets one QUICK_RANGE per point and passes all points to hlindex_read_first(); json_index reads them in turn and skips trefs it has already returned. * check_quick_select_array() uses the stored estimate, and rejects non-ARRAY SEL_ARGs (e.g. IS NULL) on the ARRAY key part. ORed MEMBER OF and JSON_OVERLAPS now give a single range scan instead of index_merge sort_union, with no MAX_KEY limit on the number of points. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 bound range optimizer work for many ARRAY index points With one range slot per ARRAY index, the number of points in a SEL_ARG_ARRAY is no longer bounded by MAX_KEY, and a JSON_OVERLAPS or JSON_CONTAINS constant with N elements cost (see the TODOs): * N records_in_range() index dives, one per leaf, even when the estimate is never used; * O(N^2) work in key_or_array(), which copied both point lists into a new SEL_ARG_ARRAY on every OR and deduplicated with a linear scan. Now: * key_or_array() appends the smaller point list to the larger SEL_ARG_ARRAY in place, or to a copy of it if it is shared (use_count > 0), without sorting or deduplicating. * SEL_ARG_ARRAY::normalize() sorts and deduplicates the points once, when they are needed: estimates, quick select, optimizer trace. * SEL_ARG_ARRAY::estimate() computes rows and cost lazily, on first use (key_and() or check_quick_select_array()). With eq_range_index_dive_limit or more points it dives on that many points spread over the sorted list and extrapolates. * JSON_CONTAINS skips duplicate elements of the constant and uses at most eq_range_index_dive_limit distinct ones for the range, since each AND costs a dive and fewer conjuncts give a superset. Points are now read in sorted order, so the order of rows from an ARRAY index range scan may differ. Co-Authored-By: Claude Opus 5.5 <[email protected]> MDEV-25848 deduplicate JSON_OVERLAPS/JSON_CONTAINS elements when parsing Skip duplicate elements of the constant in json_get_range_elements(), using a hash on the element's JSON text, instead of in json_get_func_mm_tree() for JSON_CONTAINS only. Duplicates now never become Items, SEL_ARG_ARRAY leaves or make_key() calls, for JSON_OVERLAPS as well, and json_get_func_mm_tree() only counts the distinct elements against eq_range_index_dive_limit. The text includes the quotes of strings, so "1" and 1 are different. Equal values with different text, such as 1 and 1.0, are still deduplicated later by SEL_ARG_ARRAY::normalize(). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Mohammad Tafzeel Shams
tafzeel.shams@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39647: Deleted Virtual secondary records might never get purged and cause table bloating Virtual column values are not stored in the clustered index. To check whether a secondary index record that includes a virtual column can be purged, row_purge_vc_matches_cluster() and row_vers_build_cur_vrow_low() read those values from the undo log by invoking trx_undo_prev_version_build() with TRX_UNDO_PREV_IN_PURGE. Since MDEV-24402, this read was skipped if purge_sys.end_view saw the transaction. That happens as soon as a purge batch has ended inside the undo log of the transaction, even though the remaining undo log records of the transaction have not been freed. With no values to compare, row_purge_vc_matches_cluster() assumed a match, row_purge_is_unsafe() returned true, and the delete-marked secondary index record was never removed. CHECK TABLE...EXTENDED reported "Clustered index record not found". Changes: - trx_undo_prev_version_build(): For TRX_UNDO_PREV_IN_PURGE, always read the undo log record, using purge_sys_t::view_guard::PURGE. Only purge tasks set this flag. The callers never read past the undo log record being purged, and purge only frees undo log records before purge_sys.head. - innodb.purge_secondary updates an indexed virtual column several times in one transaction, with innodb_purge_batch_size=1 so that its undo log is purged across several batches. CHECK TABLE...EXTENDED must not report any leftover secondary index records. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pekka Lampio
pekka.lampio@galeracluster.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38999: Galera - stale reads in explicit transactions wsrep_must_sync_wait() skipped a statement's causal wait unconditionally once a multi-statement transaction was open, regardless of which wsrep_sync_wait bit was configured - so later statements could run against a view no fresher than whatever BEGIN itself happened to check. A timed-out wait's error also stayed sticky until commit/rollback, breaking ROLLBACK itself. Fix: only skip the wait once the transaction has made its first write or locking read (SELECT ... FOR UPDATE/LOCK IN SHARE MODE, including via a stored procedure CALL, autocommit statements, and UNION) - after that, re-waiting risks a self-deadlock against the local applier. Clear a timed-out wait's error immediately instead of leaving it sticky. Tests: galera_MDEV-38999*.test cover the bitmask gap, the self-deadlock risk, stored-procedure/UNION/autocommit locking reads, and the query cache's independent wait path. Assisted-by Claude AI |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41165 Assertion in set_eof_status in I_S.TABLES fast path The fast path of MDEV-31342 streams rows for a simple SELECT on INFORMATION_SCHEMA.TABLES. Evaluating the WHERE clause can fail after the statement is killed. SLEEP() sets ER_QUERY_INTERRUPTED or ER_STATEMENT_TIMEOUT. get_schema_tables_result() then called my_eof() with the error already set. This failed the assertion in Diagnostics_area::set_eof_status(). Do not call my_eof() when the statement has an error. The existing error handling after the loop reports the error once. Do not use the fast path when max_statement_time is set. Tests cover SET STATEMENT max_statement_time, KILL QUERY and KILL CONNECTION. Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
rusher
diego.dupin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch '3.4' into 3.4-perf | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Georgi (Joro) Kodinov
joro@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42175: Do not compile 32-bit instructions for wolfSSL on 64bit platforms. WolfSSL doesn't need some 32 bit code if it detects proper 64 bit mode. Added a check for __uint128_t and made the 32 bit file conditional on this. See https://github.com/wolfSSL/wolfssl/issues/11874 for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 bound range optimizer work for many ARRAY index points With one range slot per ARRAY index, the number of points in a SEL_ARG_ARRAY is no longer bounded by MAX_KEY, and a JSON_OVERLAPS or JSON_CONTAINS constant with N elements cost (see the TODOs): * N records_in_range() index dives, one per leaf, even when the estimate is never used; * O(N^2) work in key_or_array(), which copied both point lists into a new SEL_ARG_ARRAY on every OR and deduplicated with a linear scan. Now: * key_or_array() appends the smaller point list to the larger SEL_ARG_ARRAY in place, or to a copy of it if it is shared (use_count > 0), without sorting or deduplicating. * SEL_ARG_ARRAY::normalize() sorts and deduplicates the points once, when they are needed: estimates, quick select, optimizer trace. * SEL_ARG_ARRAY::estimate() computes rows and cost lazily, on first use (key_and() or check_quick_select_array()). With eq_range_index_dive_limit or more points it dives on that many points spread over the sorted list and extrapolates. * JSON_CONTAINS skips duplicate elements of the constant and uses at most eq_range_index_dive_limit distinct ones for the range, since each AND costs a dive and fewer conjuncts give a superset. Points are now read in sorted order, so the order of rows from an ARRAY index range scan may differ. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexey (Holyfoot) Botchkov
holyfoot@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41821 XMLISVALID returns unexepected result, various corner cases. Control of empty builtin types added. complexType with only optional particles allows empty element. maxOccurs now handled in <choice>. No type in <element> now is allowed. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41165: use I_S fast path with max_statement_time Remove the max_statement_time fallback from is_simple_is_query(). The fast path now runs with a statement timer set. In get_schema_tables_result(), add the debug sync point i_s_fast_path_before_eof before EOF is sent. If the query was killed or timed out after the WHERE condition was evaluated, send the kill message instead of EOF. Test changes: - mdev_31342: rename the max_statement_time case, expect is_fast_path in EXPLAIN FORMAT=JSON, add the End of 13.2 tests marker. - mdev_31342_kill (new): KILL QUERY and max_statement_time expiry after the scan, before EOF, plus a Handler_tmp_write check that the fast path is used. Co-authored-by: Oleksandr Byelkin <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
rusher
diego.dupin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [misc] Move the error-state test into CLEAR_CLIENT_ERROR and CLEAR_CLIENT_STMT_ERROR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hemant Dangi
hemant.dangi@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch '10.11' into 10.11-MDEV-42122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42164 mariadb-import --use-threads can kill its own connection When a worker fails, kill_tp_connections() sent mysql_kill() for every worker connection over the failing worker's own connection. It could kill itself first, and the remaining kills then failed on the dead connection, so the other workers were not killed and the server kept running their LOAD DATA after the client exited. Skip the own connection when killing, and close it afterwards. The test counts the KILL commands the server receives. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexey (Holyfoot) Botchkov
holyfoot@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-36261 XMLTYPE: methods - step 1 Method functions added to the XMLTYPE. functions added here are: FUNCTION XMLTYPE.createNonSchemaBasedXML() RETURN XMLType FUNCTION XMLTYPE.getClobVal() RETURN LONGTEXT FUNCTION XMLTYPE.getNamespace() RETURN LONGTEXT FUNCTION XMLTYPE.isFragment() RETURN INTEGER FUNCTION XMLTYPE.getNumberVal() RETURN DOUBLE FUNCTION XMLTYPE.getStringVal() RETURN LONGTEXT FUNCTION XMLTYPE.getRootElement() RETURN LONGTEXT |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
mariadb-PranavTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| d | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 bound range optimizer work for many ARRAY index points With one range slot per ARRAY index, the number of points in a SEL_ARG_ARRAY is no longer bounded by MAX_KEY, and a JSON_OVERLAPS or JSON_CONTAINS constant with N elements cost (see the TODOs): * N records_in_range() index dives, one per leaf, even when the estimate is never used; * O(N^2) work in key_or_array(), which copied both point lists into a new SEL_ARG_ARRAY on every OR and deduplicated with a linear scan. Now: * key_or_array() appends the smaller point list to the larger SEL_ARG_ARRAY in place, or to a copy of it if it is shared (use_count > 0), without sorting or deduplicating. * SEL_ARG_ARRAY::normalize() sorts and deduplicates the points once, when they are needed: estimates, quick select, optimizer trace. * SEL_ARG_ARRAY::estimate() computes rows and cost lazily, on first use (key_and() or check_quick_select_array()). With eq_range_index_dive_limit or more points it dives on that many points spread over the sorted list and extrapolates. * JSON_CONTAINS skips duplicate elements of the constant and uses at most eq_range_index_dive_limit distinct ones for the range, since each AND costs a dive and fewer conjuncts give a superset. Points are now read in sorted order, so the order of rows from an ARRAY index range scan may differ. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
mariadb-PranavTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hemant Dangi
hemant.dangi@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42122: check_port() must verify the listener is our own Issue: wait_for_listen() asks check_port() whether a process named socat/nc/netcat is listening on the expected port, but passes no PID to match against, so check_port() accepts any process with that name anywhere on the system. On a busy host running many concurrent SSTs, an unrelated process can transiently hold the same port number, and wait_for_listen() then reports "ready" even though this invocation's own listener never came up. Solution: When check_port() isn't given a specific PID to match, verify that a candidate process found by name and port is this script's own process or a descendant of it, rather than accepting any same-named process. Existing callers that already pass a known PID are unaffected. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 one range slot per ARRAY index Before, every MEMBER OF / JSON_OVERLAPS / JSON_CONTAINS point got its own cloned KEY_PART and key slot, and points were combined only through index_merge (OR) or by picking one slot (AND). Now all points on an ARRAY key part share the original slot: * SEL_ARG_ARRAY holds a list of make_key() points ("the array contains any of them") and the summed records_in_range() estimate and cost, taken once when the point is built. * key_or() of two ARRAY ranges takes the union of the points; key_and() keeps the operand with the lower estimate, the WHERE condition checks the rest. * KEY_PART cloning (get_claimed_key_part()) is now RTREE-only, so ARRAY-only queries size SEL_TREE::keys by param->keys again. * QUICK_RANGE_SELECT_ARRAY gets one QUICK_RANGE per point and passes all points to hlindex_read_first(); json_index reads them in turn and skips trefs it has already returned. * check_quick_select_array() uses the stored estimate, and rejects non-ARRAY SEL_ARGs (e.g. IS NULL) on the ARRAY key part. ORed MEMBER OF and JSON_OVERLAPS now give a single range scan instead of index_merge sort_union, with no MAX_KEY limit on the number of points. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
mariadb-PranavTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41137 Add CHARACTER SET ANY_CS and CHARSET OF / %CHARSET Stored routines: - CHARACTER SET ANY_CS: a routine parameter takes the character set and collation of the actual argument at call time, without conversion. Allowed on procedure and function parameters only. - CHARSET OF var (var%CHARSET in sql_mode=ORACLE): a parameter or variable takes the character set and collation of a previous parameter or variable. Resolved at CREATE time if the source has a fixed character set, at call time if it is ANY_CS or anchored to one. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41165 Assertion in set_eof_status in I_S.TABLES fast path The fast path of MDEV-31342 streams rows for a simple SELECT on INFORMATION_SCHEMA.TABLES. Evaluating the WHERE clause can fail after the statement is killed. SLEEP() sets ER_QUERY_INTERRUPTED or ER_STATEMENT_TIMEOUT. get_schema_tables_result() then called my_eof() with the error already set. This failed the assertion in Diagnostics_area::set_eof_status(). Do not call my_eof() when the statement has an error. The existing error handling after the loop reports the error once. Do not use the fast path when max_statement_time is set. Tests cover SET STATEMENT max_statement_time, KILL QUERY and KILL CONNECTION. Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42164 mariadb-import --use-threads can kill its own connection When a worker fails, kill_tp_connections() sent mysql_kill() for every worker connection over the failing worker's own connection. It could kill itself first, and the remaining kills then failed on the dead connection, so the other workers were not killed and the server kept running their LOAD DATA after the client exited. Skip the own connection when killing, and close it afterwards. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pekka Lampio
pekka.lampio@galeracluster.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38999: Galera - stale reads in explicit transactions wsrep_must_sync_wait() skipped a statement's causal wait unconditionally once a multi-statement transaction was open, regardless of which wsrep_sync_wait bit was configured - so later statements could run against a view no fresher than whatever BEGIN itself happened to check. A timed-out wait's error also stayed sticky until commit/rollback, breaking ROLLBACK itself. Fix: only skip the wait once the transaction has made its first write or locking read (SELECT ... FOR UPDATE/LOCK IN SHARE MODE, including via a stored procedure CALL, autocommit statements, and UNION) - after that, re-waiting risks a self-deadlock against the local applier. Clear a timed-out wait's error immediately instead of leaving it sticky. Tests: galera_MDEV-38999*.test cover the bitmask gap, the self-deadlock risk, stored-procedure/UNION/autocommit locking reads, and the query cache's independent wait path. Assisted-by Claude AI |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||