Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| update libmariadb | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Use the server's MariaDB::zlib target when built as a submodule When Connector/C is built inside the MariaDB server tree, pick up the server's zlib via the MariaDB::zlib target instead of running FIND_PACKAGE(ZLIB), so the connector uses exactly the same zlib (bundled or system) as the server and no longer depends on the FindZLIB result-variable signature. Standalone builds are unchanged - they still fall back to FIND_PACKAGE(ZLIB). Also stop adding zlib to CMAKE_REQUIRED_LIBRARIES: ZLIB_LIBRARY may now be an (ALIAS) target which cannot be used inside try_compile() checks, and none of those checks need zlib. Server: MDEV-37996 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fariha Shaikh
farihais@amazon.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-33660 Add note when setting AUTO_INCREMENT lower than next value Currently, ALTER TABLE ... AUTO_INCREMENT = N silently fails when using values lower than the next AUTO_INCREMENT value in the column. Add a note when attempting to set AUTO_INCREMENT to a lower value than the next AUTO_INCREMENT value, and maintain the higher value. Update existing test suites and add a new test to the maria suite for the newly added note. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fix wide-decimal fetch in prepared statements Regression from dcd0a343 (CONC-820): fetching a decimal via a prepared statement could return MYSQL_DATA_MALFORMED (error 102) for valid rows. - MAX_DECIMAL_LEN was 67 (max storable precision 65 + 2), but the server's maximum decimal string length is 83 (DECIMAL_MAX_STR_LENGTH = max possible precision 81 + 2). Corrected to 83. - The check also rejected on field->length (display width), which can legitimately exceed the max string length for computed expressions such as TRUNCATE(<81 digits>, 28). Only the actual data length matters for buffer safety, so field->length is no longer checked. Server: MDEV-37996 (found by --ps-protocol tests) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39451 Cleanup Item_sum_ntile::val_int Reduce function calls that just returns partition_row_count_ Add some assertions and explanations |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| update libmariadb | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Brandon Nesterenko
brandon.nesterenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39302: main.xa wrong errno ER_XAER_NOTA instead of ER_XA_RBROLLBACK Revert some changes of bead24b7f3dff5a1fe8bcd283eccb7b654495b3e which incorrectly removed wait_until_count_sessions.inc from xa.test. This test relies on having fully disconnected sessions with prepared XA transactions before progressing with the test. I.e., the prepared transaction must be made fully recoverable before the test progresses to try and XA COMMIT/ROLLBACK the transaction. Signed-off-by: Brandon Nesterenko <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39451 Accounting for truncation to value_max_length in the ntile comparison When truncation to value_max_length in ntile function happens, the cached string value is the truncated string. For the purpose of comparison to determine the size of the current partition, it should not compare the original string with the truncated string. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
sjaakola
seppo.jaakola@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39681 delayed BF aborting with multi master load Reason for the hanging, and occasional crashes turned out to be orphaned innodb lock wait request of a BF aborted local transaction, which had arrived in commit stage. Reason is that wsrep BF-abort marks a transaction a deadlock victim out-of-band, so (unlike native deadlock resolution) the victim can still own a live LOCK_WAIT request; if that orphaned waiter survives into commit/rollback, another transaction granting it calls lock_wait_end() cross-thread and corrupts the victim's state — surfacing as the lock_wait_end, que_thr_step, and rollback_finish assertions. This commit has fixes for claering lock wait status of BF aborted transactions. Commit has also a new mtr test: galera.galera_bf_abort_orphan_lock to work as regression test for the fix. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39841 handlersocket plugin default secret is empty if handlersocket_plain_secret is not specified, generate a random one. one can still set an empty secret in my.cnf if needed. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39942: use actual_rec_per_key in loose scan sj optimization While performing loose scan semi-join optimization in Loose_scan_opt::check_ref_access_part1() [opt_subselect.h], the filtered value in the explain plan was in-consistent for a table with index when same data was inserted using "insert into t1 values()...", and "insert into t1 select * from t2". This is noticed when rec_per_key[] was used to get the number of records during optimization. However, when actual_rec_per_key() is used to get the number of records, we don't notice this discrepancy. This PR changes the rec_per_key[] usage to actual_rec_per_key() in the method Loose_scan_opt::check_ref_access_part1() [opt_subselect.h] |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added logic for global temp table. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| github copilot review instructions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39776 SHOW CREATE TABLE corrupts `-quoted table options Two problems: 1. option value specified as `foo bar` was not quoted, printed as foo bar, breaking CREATE TABLE. 2. Option value that included */ was printed as is, in unknown options when the whole option was commented out, this broke the comment: /* opt='val*/ue' */ Fix: simplify value printing, ignore the original quoting, always print the value quoted as a string. Break comment markers with an escape (as *\/) if inside a comment. Note, cannot use `-quoting, because \-escapes don't work inside, backticks, so */ cannot be broken. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Remove bogus length check in mthd_stmt_fetch_to_bind The CONC-820 check flagged a row as malformed whenever the server's declared field/data length exceeded a fixed maximum. That maximum is unrelated to the caller's output buffer and is legitimately exceeded by computed expressions (e.g. TRUNCATE(<81-digit value>, 28)), so valid results failed with CR_MALFORMED_PACKET under --ps-protocol (server MDEV-37996). The sentinel check (data_len > remaining packet space) is the real malformed-packet guard and is kept. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37781 ASAN build crashes on deep query with low thread stack check_stack_overrun() was compiled out under ASAN, so a deeply nested expression recursed in Item_func::fix_fields() until the stack was exhausted and the server crashed instead of reporting ER_STACK_OVERRUN_NEED_MORE. Since MDEV-34533 (Monty) the stack usage seems to be accounted correctly under ASAN via my_get_stack_pointer(), so the check seems to works there too. Fix: Remove the #ifndef __SANITIZE_ADDRESS__ guard from check_stack_overrun() Add a test for ER_STACK_OVERRUN_NEED_MORE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37781 ASAN build crashes on deep query with low thread stack check_stack_overrun() was compiled out under ASAN, so a deeply nested expression recursed in Item_func::fix_fields() until the stack was exhausted and the server crashed instead of reporting ER_STACK_OVERRUN_NEED_MORE. Since MDEV-34533 (Monty) the stack usage seems to be accounted correctly under ASAN via my_get_stack_pointer(), so the check seems to works there too. Fix: Remove the #ifndef __SANITIZE_ADDRESS__ guard from check_stack_overrun() Add a test for ER_STACK_OVERRUN_NEED_MORE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Use the server's MariaDB::zlib target when built as a submodule (#316) When Connector/C is built inside the MariaDB server tree, pick up the server's zlib via the MariaDB::zlib target instead of running FIND_PACKAGE(ZLIB), so the connector uses exactly the same zlib (bundled or system) as the server and no longer depends on the FindZLIB result-variable signature. Standalone builds are unchanged - they still fall back to FIND_PACKAGE(ZLIB). Also stop adding zlib to CMAKE_REQUIRED_LIBRARIES: ZLIB_LIBRARY may now be an (ALIAS) target which cannot be used inside try_compile() checks, and none of those checks need zlib. Server: MDEV-37996 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
sjaakola
seppo.jaakola@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38243 Write binlog row events for changes done by cascading FK operations This commit implements a feature which changes the handling of cascading foreign key operations to write the changes of cascading operations into binlog. The applying of such transaction, in the slave node, will apply just the binlog events, and does not execute the actual foreign key cascade operation. This will simplify the slave side replication applying and make it more predictable in terms of potential interference with other parallel applying happning in the node. This feature can be turned ON/OFF by new variable: rpl_use_binlog_events_for_fk_cascade, with default value OFF The actual implementation is largely by windsurf. The commit has also mtr tests for testing rpl_use_binlog_events_for_fk_cascade feature: rpl.rpl_fk_cascade_binlog_row, rpl.rpl_fk_set_null_binlog_row and rpl.fk_cascade_binlog_row_rollback |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-33524: marked_for_read assertion with virtual column A couple of things interact in this scenario. 1. A virtual column whose value depends on session state, such as a VCOL calling DATE_FORMAT, has fix_fields (via fix_expr) run on it again before each INSERT. For a table reused from the cache this runs in Vcol_expr_context before setup_tables sets the table map. The test first opens t1 with a SELECT that fails before setup_tables, leaving it cached with map zero. 2. When the connection character set needs conversion, CONCAT (more generally, any charset aggregation) wraps that column in a charset converter. The converter evaluates any argument reported as constant, so it calls val_str() on the column as part of fix_fields, before a row exists and without the column in the read set. On DEBUG builds this fails the marked_for_read assertion; otherwise it reads an unread column. Consequently: When a table instance is opened, fix_fields runs with table->map already nonzero, but the fix_fields (via fix_expr) call from vcol_fix_expr did not have it nonzero; so set table->map=1 during Vcol_expr_context::init. The original Vcol_expr_context::init() (MDEV-24176) called init_lex_with_single_table, which set table->map= 1 as a side effect. A later merge of 10.2 into 10.3 (6f6c74b0d18) replaced that call with a backup of table->expr_arena, dropping the side effect. The destructor of the Vcol_expr_context will reset the map back to its original value. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added logic for global temp table. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-24658: Optimizer trace reads a column not marked for read When the optimizer trace is enabled, it's safe to read from a constant table because the value in record[0] was materialized during optimization and remains available, even after constants propagation has removed the table from the read set. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Brandon Nesterenko
brandon.nesterenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39302: main.xa wrong errno ER_XAER_NOTA instead of ER_XA_RBROLLBACK When a session has a prepared an XA transaction (via XA PREPARE), if it is not yet finalized (via XA COMMIT / ROLLBACK) when the session disconnects, there is cleanup logic by the disconnecting session to put this hanging transaction into a recoverable state. The main.xa test follows a pattern where it disconnects these transactions, but doesn't wait for the session to finalize before it tries to finalize these transactions. If the transaction hasn't yet been put into a recoverable state, when the test tries to XA COMMIT or XA ROLLBACK the transaction, it results in the error: mysqltest: At line 831: query 'xa commit 'c:foo'' failed: ER_XAER_NOTA (1397): XAER_NOTA: Unknown XID The test is fixed by waiting for the XA PREPARE'ing session to finalize and be disconnected before trying to recover/commit/rollback it. Signed-off-by: Brandon Nesterenko <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-24658: Optimizer trace reads a column not marked for read When the optimizer trace is enabled, it's safe to read from a constant table because the value in record[0] was materialized during optimization and remains available, even after constants propagation has removed the table from the read set. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Brandon Nesterenko
brandon.nesterenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39302: main.xa wrong errno ER_XAER_NOTA instead of ER_XA_RBROLLBACK Revert some changes of bead24b7f3dff5a1fe8bcd283eccb7b654495b3e which incorrectly removed wait_until_count_sessions.inc from xa.test. This test relies on having fully disconnected sessions with prepared XA transactions before progressing with the test. I.e., the prepared transaction must be made fully recoverable before the test progresses to try and XA COMMIT/ROLLBACK the transaction. Signed-off-by: Brandon Nesterenko <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37781 ASAN build crashes on deep query with low thread stack check_stack_overrun() was compiled out under ASAN, so a deeply nested expression recursed in Item_func::fix_fields() until the stack was exhausted and the server crashed instead of reporting ER_STACK_OVERRUN_NEED_MORE. Since MDEV-34533 (Monty) the stack usage seems to be accounted correctly under ASAN via my_get_stack_pointer(), so the check seems to works there too. Fix: Remove the #ifndef __SANITIZE_ADDRESS__ guard from check_stack_overrun() Add a test for ER_STACK_OVERRUN_NEED_MORE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PranavKTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added logic for global temp table. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39451 Cleanup Item_sum_ntile::val_int Reduce function calls that just returns partition_row_count_ Add some assertions and explanations |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Remove bogus length checks in mthd_stmt_fetch_to_bind Commit dcd0a343 ("Length and type checking for stmt_fetch_to_bind") added checks that reject valid rows; under --ps-protocol the server test suite hits them and buildbot fails (server MDEV-37996). Both checks are wrong. Display length (field->length > MAX_ZEROFILL_LEN / MAX_DECIMAL_LEN): field->length is result-set metadata -- the column's maximum display width from the column-definition packet -- not the size of any row value. It is routinely larger than the data and can be arbitrarily large for computed expressions (zerofill, wide DECIMAL such as TRUNCATE(<81-digit value>, 28)), so this rejected perfectly valid rows. Decimal data length (data_len > MAX_DECIMAL_LEN, capped at 67 vs the server maximum DECIMAL_MAX_STR_LENGTH = 83): redundant. A DECIMAL is fetched by ps_fetch_string, which ignores the field and passes the raw bytes to convert_froma_string; numbers are parsed with explicit begin/end pointers and strings are copied with MIN(len, buffer_length). Nothing is sized by data_len, so the value is handled safely at any length and the check guards nothing. The sentinel (data_len > remaining packet space) already prevents reading past the packet and is the only check the row data needs. Remove both checks, the now-unused MAX_ZEROFILL_LEN / MAX_DECIMAL_LEN, and the test case that asserted the removed display-length behaviour. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37781 ASAN build crashes on deep query with low thread stack check_stack_overrun() was compiled out under ASAN, so a deeply nested expression recursed in Item_func::fix_fields() until the stack was exhausted and the server crashed instead of reporting ER_STACK_OVERRUN_NEED_MORE. Since MDEV-34533 (Monty) the stack usage seems to be accounted correctly under ASAN via my_get_stack_pointer(), so the check seems to works there too. Fix: Remove the #ifndef __SANITIZE_ADDRESS__ guard from check_stack_overrun() Add a test for ER_STACK_OVERRUN_NEED_MORE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37996 update libmariadb to use server's MariaDB::zlib Remove hack in cmake/mariadb_connector_c.cmake that sets variables to make connectors FIND_PACKAGE(ZLIB) use server's zlib. it is not necessary anymore, and is expressed more directly. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
forkfun
alice.sherepa@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39380 Assertion `arg2_int >= 0' failed in Item_func_additive_op::result_precision A 0xHHHH / b'..' literal keeps its hex_hybrid type through COALESCE/IF/IFNULL/NVL/NVL2/NULLIF/CASE/LEAST/GREATEST, but was evaluated, sized and stored as a string, so a wrapped literal behaved differently from a bare one (10+COALESCE(0x31) gave 11 instead of 59;). After the patch the numeric side of Type_handler_hex_hybrid so it matches the bare literal: - val_int/val_real/val_decimal read the bytes as a hex hybrid, not a number string - Item_decimal_precision returns the integer precision (correct DECIMAL sizing for AVG/SUM, views, CREATE ... SELECT) - Item_save_in_field stores it like the bare literal into any column type - keep the hybrid type when aggregated with NULL (COALESCE(NULL, 0x31)) - restore decimals=0/unsigned after string attribute aggregation |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39451 Accounting for truncation to value_max_length in the ntile comparison When truncation to value_max_length in ntile function happens, the cached string value is the truncated string. For the purpose of comparison to determine the size of the current partition, it should not compare the original string with the truncated string. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39841 handlersocket plugin default secret is empty if handlersocket_plain_secret is not specified, generate a random one. one can still set an empty secret in my.cnf if needed. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Brandon Nesterenko
brandon.nesterenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39302: main.xa wrong errno ER_XAER_NOTA instead of ER_XA_RBROLLBACK When a session has a prepared an XA transaction (via XA PREPARE), if it is not yet finalized (via XA COMMIT / ROLLBACK) when the session disconnects, there is cleanup logic by the disconnecting session to put this hanging transaction into a recoverable state. The main.xa test follows a pattern where it disconnects these transactions, but doesn't wait for the session to finalize before it tries to finalize these transactions. If the transaction hasn't yet been put into a recoverable state, when the test tries to XA COMMIT or XA ROLLBACK the transaction, it results in the error: mysqltest: At line 831: query 'xa commit 'c:foo'' failed: ER_XAER_NOTA (1397): XAER_NOTA: Unknown XID The test is fixed by waiting for the XA PREPARE'ing session to finalize and be disconnected before trying to recover/commit/rollback it. Signed-off-by: Brandon Nesterenko <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39776 SHOW CREATE TABLE corrupts `-quoted table options Two problems: 1. option value specified as `foo bar` was not quoted, printed as foo bar, breaking CREATE TABLE. 2. Option value that included */ was printed as is, in unknown options when the whole option was commented out, this broke the comment: /* opt='val*/ue' */ Fix: simplify value printing, ignore the original quoting, always print the value quoted as a string. Break comment markers with an escape (as *\/) if inside a comment. Note, cannot use `-quoting, because \-escapes don't work inside, backticks, so */ cannot be broken. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dave Gosselin
dave.gosselin@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-33524: marked_for_read assertion with virtual column vcol.vcol_misc deadlocks under --view-protocol at the FLUSH TABLES WITH READ LOCK block. The main connection holds the global read lock. The SELECT COUNT(*) FROM t1 query becomes CREATE OR REPLACE VIEW on a separate connection, and that DDL blocks on the read lock and never returns. So the same mysqltest client never reaches unlock tables. The fix is to wrap only that one SELECT in the view_protocol guards. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Brandon Nesterenko
brandon.nesterenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39302: main.xa wrong errno ER_XAER_NOTA instead of ER_XA_RBROLLBACK When a session has a prepared an XA transaction (via XA PREPARE), if it is not yet finalized (via XA COMMIT / ROLLBACK) when the session disconnects, there is cleanup logic by the disconnecting session to put this hanging transaction into a recoverable state. The main.xa test follows a pattern where it disconnects these transactions, but doesn't wait for the session to finalize before it tries to finalize these transactions. If the transaction hasn't yet been put into a recoverable state, when the test tries to XA COMMIT or XA ROLLBACK the transaction, it results in the error: mysqltest: At line 831: query 'xa commit 'c:foo'' failed: ER_XAER_NOTA (1397): XAER_NOTA: Unknown XID The test is fixed by waiting for the XA PREPARE'ing session to finalize and be disconnected before trying to recover/commit/rollback it. Signed-off-by: Brandon Nesterenko <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Aleksey Midenkov
midenok@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39306 Index corruption on UPDATE when using versioned InnoDB table (on UPDATE) VCOL_UPDATE_FOR_READ does not update virtual fields for the following cases: 1. It is not in read_set; 2. It is not in the index, but can be calculated from index columns; 3. It is stored virtual column. VCOL_UPDATE_FOR_WRITE does not have conditions 2. and 3. Test case fails condition 3., stored vcol was not updated by VCOL_UPDATE_FOR_READ. Since vers_update_fields() is only for write operations it is safe to change it to VCOL_UPDATE_FOR_WRITE. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||