Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41749: FederatedX pushdown sends "<nop>(" in pushed-down SQL A pushed-down statement containing "x < SOME (subquery)" failed on the remote server with a syntax error, as the query text contained the internal "<nop>(...)" wrapper. "x < ALL (subquery)" is wrapped in "<not>(...)" in the same way. Item_func_not_all::print() prints the wrapper whenever `show` is set. Omit it when QT_PARSABLE is requested, and print the original "x op ALL|ANY (subquery)" in parentheses, so that a parent expression keeps the correct precedence. Add tests to federatedx_pushdown_upd_del covering SOME and ALL in UPDATE, DELETE and multi-table SELECT. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch 'knielsen_fixes_10.11' 10.11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41800 Remove comment Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41803 mariadb-binlog --raw takes the output file name from Rotate events without checking it mariadb-binlog --raw appended the file name from a Rotate event to the --result-file prefix, so a malicious server could make it write files outside that directory. Reject a Rotate event file name with a directory component - a legitimate server only puts a bare file name in the Rotate event Assisted-by: Claude:claude-opus-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41800 Flush stdout after mysqld --help Under load on Windows, the last partial stdout buffer could be lost at exit, so the --help output was truncated, and mysql-test-run.pl failed to parse it. Flush explicitly. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41749: FederatedX pushdown sends "<nop>(" in pushed-down SQL A pushed-down statement containing "x < SOME (subquery)" failed on the remote server with a syntax error, as the query text contained the internal "<nop>(...)" wrapper. "x < ALL (subquery)" is wrapped in "<not>(...)" in the same way. Item_func_not_all::print() prints the wrapper whenever `show` is set, and Item_allany_subselect::select_transformer() sets it for every ALL/ANY subquery. Fix it by omitting the wrapper when QT_PARSABLE is requested. args[0] then prints the original "x op ALL|ANY (subquery)", since Item_allany_subselect::print() re-inverts the comparator. EXPLAIN EXTENDED and view definitions are unaffected, as they do not use QT_PARSABLE. The comparison is printed in parentheses because the wrapper's precedence() is DEFAULT_PRECEDENCE, so a parent expression adds none. Without them "0 = (a < ANY (...))" would reach the remote server as "0 = a < any (...)" and silently return wrong rows. Add tests to federatedx_pushdown_upd_del covering SOME and ALL in UPDATE, DELETE and SELECT, an empty and a NULL-containing subquery, NOT, and the predicate as an operand of another operator. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41801 "performance_schema" is compared case-sensitively in the engine, case-insensitively elsewhere With lower_case_table_names=0 the performance_schema engine discovered its tables only under the exact name, while ACL checks, is_perfschema_db() and mariadb-dump matched the name case-insensitively. A database named, for example, PERFORMANCE_SCHEMA was an ordinary database that got performance_schema access rules. Compare the name case-insensitively in the engine too. Assisted-by: Claude:claude-opus-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Miroslav Rajcic
miroslav.rajcic@oracle.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Bug#39905057: MySQL ExtractValue unclosed CDATA length underflow causes mysqld heap overflow / crash Problem: ======== The XML scanner reports an unterminated <![CDATA[ section as a valid CDATA token. Its end pointer remains at the opening delimiter, while the parser unconditionally removes the opening and closing delimiters. This underflows the value length. ExtractValue() can subsequently pass that length to String::append(), causing a heap overwrite and mysqld crash. Root Cause: =========== my_xml_scan() only sets the token end when it finds ]]>, but my_xml_parse() assumes every CDATA token is complete. Solution: ========= Detect EOF before the CDATA terminator and return a parse error before calling the XML value handler. Add an ExtractValue() regression test verifying that unterminated CDATA is rejected with a warning. Change-Id: I142bafd9ddea185f6b2e87a80af4894f10168291 Fixes MDEV-39571, MDEV-41407 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40760: Stop using common_header_len and post_header_len from FD event The FORMAT_DESCRIPTION_EVENT contains values common_header_len and post_header_len array for individual event types, which were intended to describe the format of following events in the binlog/relaylog. However, this flexibility has been problematic and never useful: - The values have never changed in MariaDB since before 10.0, nor in MySQL. - Having to always have the correct format description event available in the code when reading an event causes a lot of complexity (and has historically caused numerous bugs). - The potential for a corrupt or malicious format description event requires careful validation that these length values are correct, which again has historically seen bugs. Since the values never change anyway, this patch removed the code that reads them when reading the format description event, just using the hard-coded values that are the only valid numbers anyway. Remove support for ancient row events with post_header_len=6. Remove support for reading binlogs created by custom MySQL forks with different common_header_len (ie. MDEV-4645). Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Validate buffer length in Log_event constructors This patch goes through all the constructors of Log_event subclasses that are used to implement read_log_event() and adds error checks on the size of the event buffer to guard against out-of-buffer reads. Adds a lot of checks, and fixes some existing checks that were wrong or in somewhat violation of C++ standard (eg. computing a pointer outside of the available buffer). This removes support for reading Table_map_log_event without metadata; such events were only written by MySQL 5.1 servers going back to 2007. Fix some missing bits in MAX_LOG_EVENT_HEADER, and update test case rpl.rpl_packet with a longer query to still exceed max_allowed_packet. Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41800 Flush stdout after mysqld --help Under load on Windows, the last partial stdout buffer could be lost at exit, so the --help output was truncated, and mysql-test-run.pl failed to parse it. Flush explicitly. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-41318 after-merge fixes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleksandr Byelkin
sanja@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41502 Bulk INSERT: IN list and REGEXP with a parameter use the first parameter set for all rows Optimized array binding INSERT/REPLACE fixes the items once, and parameters are constants, so items cache values computed with the first set of parameters (IN array, compiled REGEXP pattern). Do not treat parameters as constants during optimized array binding execution. Execute LIKE and JSON_SEARCH with a parameter in ESCAPE for every set of parameters, as ESCAPE must be a constant. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleksandr Byelkin
sanja@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-23864 Wrong bulk affected rows with triggers and stored functions In bulk operation reset_diagnostics_area() set DA_OK_BULK before the first OK, so the affected rows of the previous statement were added, and OK of trigger and stored function statements were added too. Remember DA_OK_BULK/DA_EOF_BULK set by the bulk operation and restore it when the diagnostics area is reset (also after an error handled in a trigger or stored function, or a reprepare), and do not set OK status in sub-statements of bulk operation (my_ok(), GET DIAGNOSTICS). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
fix RPAD(), LPAD() and INSERT() not to mangle its arguments they used to overwrite the charset of their arguments, this is incorrect and led to wrong results |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cleanup: undefined function declarations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41808 repeated CTE references keep reparsing exponentially on time and memory Every reference to a CTE after the first re-parses its specification and recursively resolves the references inside the clone, so a chain of CTEs each referencing the previous one twice expands to 2^N re-parses from linear-size SQL, exhausting CPU and memory at parse time. Bound the number of specification clones per statement. Assisted-by: Claude:claude-opus-4-8 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Nikita Malyavin
nikitamalyavin@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41238 mysqltest: add PS_bind_long command mysqltest gets a PS_bind_long command. It binds like PS_bind, but sends every value with mysql_stmt_send_long_data() before each PS_execute, so a test can reach a parameter in LONG_DATA_VALUE state. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40760: Remove Format_description_log_event::event_type_permutation The only use of this member was removed back in 2013 (!), but some (now dead) code remains that accesses the member. This patch removes the member and the related dead code properly. Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Georgi Kodinov
joro@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fix a UBSAN runtime error on MacOSX. When running on MacOSX with `-DWITH_UBSAN` I get the following error at runtime: ``` 2026-10-23 13:28:31 0 [Note] InnoDB: Number of transaction pools: 1 2026-10-23 13:28:31 0 [Note] InnoDB: Using generic crc32 instructions 2026-10-23 13:28:31 0 [Note] InnoDB: innodb_buffer_pool_size_max=8388608m, innodb_buffer_pool_size=128m 2026-10-23 13:28:31 0 [Note] InnoDB: Completed initialization of buffer pool 2026-10-23 13:28:31 0 [Note] InnoDB: End of log at LSN=51660 2026-10-23 13:28:31 0 [Note] InnoDB: 128 rollback segments are active. 2026-10-23 13:28:31 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1" 2026-10-23 13:28:31 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ... 2026-10-23 13:28:31 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB. 2026-10-23 13:28:31 0 [Note] InnoDB: log sequence number 51660; transaction id 14 2026-10-23 13:28:31 0 [Note] InnoDB: Loading buffer pool(s) from /Users/gkodinov/dev/mdev-35715/bld/x/ib_buffer_pool 2026-10-23 13:28:31 0 [Note] Plugin 'FEEDBACK' is disabled. /Users/gkodinov/dev/mdev-35715/mysys/my_stack.c:74:38: runtime error: addition of unsigned offset to 0x00016bcc0050 overflowed to 0x00016b1c2050 ``` This is caused by STACK_DIRECTION being negative and, when multiplied by an unsigned, being converted to a large unsigned before the multiplication. Change stack_size type from size_t to ssize_t to avoid this. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch 'knielsen_log_event_read_validation_base_10.11' into 10.11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleksandr Byelkin
sanja@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-23864 BULK insert wrong values when command contain inner select Optimized array binding INSERT/REPLACE executes the statement once, so subqueries are executed with the first set of parameters only. Execute INSERT/REPLACE, where a subquery result depends on parameters, for every set of parameters (as not optimized array binding commands are executed), keeping the first generated id as the result of the whole operation. Per-row execution also needs warnings counted once, RETURNING metadata sent once (also after reprepare), and an error allowed after successful rows. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| UndefinedBehaviorSanitizer: nullptr-with-nonzero-offset rdb_datadic.cc:558 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Petrunia
sergey@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rename sp_head::dont_freeze_mem_root to dont_freeze_mem_root2, and do NOT set it in set_dont_freeze_mem_root() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40760: Remove unused Format_description_log_event * arguments Follow-up patch, remove a lot of Format_description_log_event * function arguments that are no longer needed. Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleksandr Byelkin
sanja@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-23864 Bulk INSERT loses rows if a stored function executes DML A DML statement of a stored function called by an optimized array binding INSERT consumed the next sets of parameters of the bulk operation. Reset THD::bulk_param during the function execution, as it is done for triggers. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Georg Richter
georg@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Fix test: use DATETIME type instead of TIME | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rex Johnston
rex.johnston@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-36295 INTERVAL function returns inconsistent results when used in a WHERE clause A query like select * from (select a, b from t1 group by a, b) d where interval(d.a, 3, 7) = 1 returned no rows when the condition was pushed into the derived table, although the row (5,20) matches, as condition_pushdown_for_derived=off shows. Item_func_interval kept its first argument, the Item_row, in a member of its own as well as in args[0]. Condition pushdown copies the condition with deep_copy(). The copy of the node got new arguments but kept the member, so it went on reading the original row: the INTERVAL() pushed into the derived table compared the original outer column, and the pushed condition rejected every row. Item_func_interval now reads the row through args[0] alone, so a copy cannot point anywhere else. This commit was prepared with Claude Code (Opus 5). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Item_param::set_param_time and Item_param::set_param_datetime OOB read Item_param::set_param_time and Item_param::set_param_datetime could potentially read 4 bytes beyond the value end of the corrupted packet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fix hang on master when disabling semi-sync There is a global variable global_ack_signal_fd used to signal the receiver thread to wake up when disabling semi-sync. This variable was cleared to -1 in the Ack_listener destructor, which ran at the end of the Ack_receiver::run() function without any locking. If the thread was delayed at that point, it could end up overwriting the new value set by a new receiver thread. This would leave the server in a state with an invalid global_ack_signal_fd and could cause a subsequent disable of semisync to fail due to the wakeup not arriving at the receiver thread. This was seen as a sporadic failure of the test case rpl.rpl_semi_sync_cond_var_per_thd. Fix by not modifying the global in constructor/destructor; instead set and clear the global explicitly, allowing to clear the fd with proper locking while the mutex is still being held. Also fix a missing pthread_join(), which would leak thread descriptors and allow to start a new receiver thread before the old one shut down fully. (Either of these two changes fix the hang bug). Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41804 deeply nested ROWs crash add check_stack_overrun() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Nikita Malyavin
nikitamalyavin@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41238 Bound parameters prevent condition pushdown into a grouped view, while CAST enables it Item_param::deep_copy() returned NULL, and every rewrite that copies a condition gives up on what it cannot copy. A conjunct holding a prepared statement parameter was therefore left out of: - pushdown into derived tables and views, including UNION branches and conditions on a derived table column whose expression holds a parameter; - pushdown from HAVING to WHERE, for the part extracted from an OR; - pushdown into a materialized IN subquery; - split materialization, which then found no split key; - the UPPER(col) IN (...) rewrite, which has skipped such conjuncts since MDEV-40006. When the derived table groups by an expression with a parameter, the condition was pushed into its HAVING instead of its WHERE. CAST(? AS ...) worked around this only by accident. Before the pushdown, constant propagation can replace a constant expression on one side of = with a literal. A bare parameter already counts as a basic constant, so propagation leaves it as it is. A client whose charset differs from the column's got the pushdown by a similar accident: the charset conversion replaces the parameter with a literal. Item_param::shallow_copy() now copies a parameter that holds a value, NULL included, and deep_copy() calls it, as in other leaf items. Every such copy is made while optimizing during EXECUTE, and the next EXECUTE makes a new one, so a copy always carries the value bound for the EXECUTE that made it. A copy that outlived its EXECUTE would keep an old value and point into a string buffer that the next binding may free, so shallow_copy() asserts that it does not allocate on the statement's arena. The copy is not added to m_clones. m_clones keeps the parameter's copies in CTE definitions updated with each new value for the whole life of the statement, while this copy lives for one execution. An unbound parameter, DEFAULT and IGNORE still have no copy. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41622 INSERT crashes on deeply nested GeometryCollection - get_data_size() and init_from_wkb() return their error values on stack overrun, not a valid-looking length - add stack checks to the remaining recursive GeometryCollection methods: wkt, json, mbr, area, length, dimension, store_shapes - test non-GEOMETRY column and SELECT paths Assisted-by: Claude:claude-opus-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41800 Flush stdout after mysqld --help Under load on Windows, the last partial stdout buffer could be lost at exit, so the --help output was truncated, and mysql-test-run.pl failed to parse it. Flush explicitly. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41822 mariadb-binlog ASAN crash on corrupted binlog 1. verify that the null bitmap length doesn't overshoot row event end 2. pass the buffer length to calc_field_size(), so that it'd never read beyond the end |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge into main 10.11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Raghunandan Bhat
raghunandan.bhat96@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40836: SIGSEGV in my_time_fraction_remainder Problem: A window function inside an ORDER BY expression was split twice by `split_sum_func()` first in `setup_order()`, then again in `JOIN::prepare()`. Each split adds the item to `ref_pointer_array`, which resulted in overflow. The split in `setup_order()` was added by MDEV-28094 (8c34eab) to fix a crash in - SELECT EXISTS (SELECT 1 ORDER BY 1+sum(2) OVER ()); `check_and_do_in_subquery_rewrites()` dropped the ORDER BY of that subquery, so `JOIN::prepare()` never split it. But its window function remained in `window_funcs` and was still processed, causing the crash. Fix: - When sub-query re-write drops the ORDER BY, also drop its window functions (already done for UNIONs). - Remove the window function split from `setup_order()`, so it is done only once, in `JOIN::prepare()`. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40745: Validate field parsing of optional_metadata Protect accesses into the m_optional_metadata buffer to not access outside of the buffer in case of corrupt/malicious event data. Protect against buffer overflow of the m_column_name array in case of excessive column names in the event data. Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||