Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CI, Windows : increase MTR parallelism on Windows ARM64 The number of parallel MTR workers was previously reduced to avoid out-of-memory failures, likely caused by a Windows memory manager issue. The issue no longer reproduces after the CI image update. Restore a higher worker count to reduce the test runtime. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Petrunia
sergey@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Refactoring: simplify code in estimate_table_group_cardinality() Should work exactly the same as before. Do not search in join->join_tab array to find the table by its table_map bit. Get it from the Item_field object and Field that refers to that table. (This is preparation for fix for MDEV-37732) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Nikita Malyavin
nikitamalyavin@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40410 follow-up: also fix TSan build for Clang < 22 Clang predefines __SANITIZE_THREAD__ only from version 22; check __has_feature(thread_sanitizer) as well. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Raghunandan Bhat
raghunandan.bhat96@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39095: Fixes to MariaDB Syntax Checker - Skip initializing stopwords for full-text indexes when checking syntax. - Skip changing data directory when checking syntax. - Show help message when syntax checker is used in interactive mode. - Initialize THD with a dummy database name to prevent `No database selected` error. - Rename `PARSER_STATE` in check_syntax.cc to `Syntax_checker_state` to avoid confusion with `Parser_state` class. - Increase max length of delimiter token to 16 to match mariadb client. - Support many statements in one query, like the client does (e.g. `SET @a=1; SELECT @a|` with DELIMITER |). Report correct line numbers for errors in them. - Report only errors, not notes or warnings. A stored function with the name of a native function is accepted, a UDF with such a name is an error. - Apply SET statements that change how later statements are parsed: - Applied: session sql_mode and character_set_client, SET NAMES, SET CHARACTER SET. Values can be constants, DEFAULT, user variables, @@sql_mode or @@character_set_client. - Tracked: user variables set from such values, so the `SET @OLD_SQL_MODE=@@SQL_MODE ... SET SQL_MODE=@OLD_SQL_MODE` pattern from dumps works. - Ignored: SET GLOBAL, other variables, and values that need executing (a user variable set from one is unset). - Split statements using the current client character set. - Treat enabled plugins as available, so that partitioning syntax is accepted. Initialize data type and function plugins, so that their types and functions are known. - Recognize system variables of enabled plugins (binlog_checksum, innodb_*, aria_*) without initializing the plugins. - Support CREATE PACKAGE BODY when CREATE PACKAGE is earlier in the input. DROP PACKAGE removes it. A body without its package is an error. - Refuse to run --check-syntax together with --bootstrap. - More tests: DDLs, DMLs, Stored Procedures, Views, sql_mode, character sets, plugins, packages |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39972 Incorrect result of $[last] of JSON MDEV-40971 JSON Path Array Index 32-bit Integer Truncation Wraparound ( [ 2 3 2 + n ] ≡ [2 3 2+n]≡[n]) MDEV-40986 JSON edit functions' array-index 32-bit wraparound (edit variant of M4 — modifies the wrong position) - has_negative_path has to be set for every row. Before, it was only set when the path was parsed. If the path argument is a constant, c_path->parsed stays set after the first row and the path is not parsed again, but we still have to set has_negative_path if needed. - Setting c_path->p.types_used= JSON_PATH_KEY_NULL in the loop was wrong as it reset the JSON_PATH_NEGATIVE_INDEX bit of constant paths. The reset is not needed, as json_path_setup() resets it. - A range with only positive bounds no longer depends on the array sizes. - Ensure we do not get integer overflow when calculating array indexes in json_path_setup(). An index that does not fit in an int is now a path syntax error. Reviewed by: Alexey Botchkov <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MGL-359 close() hangs when the last receiver exits on error A Galera node hangs on shutdown if its last receiver thread leaves on an error, such as a failed inconsistency vote, while the application closes the provider: the call to close the provider never returns. A thread that waits for the result of an inconsistency vote hangs in the same way when the connection to the group fails. Both calls now end. The provider reaches CLOSED, and the waiting thread gets an error and treats the vote as failed. If the last receiver exits on error after close() has set closing_, nothing processes the self-leave. The provider never reaches CLOSED and close() waits forever. Move the provider to CLOSED from the receiver exit path whoever called start_closing() first. start_closing() still runs only once. Always send the zero view, and clear the receive queue before it is destroyed. Accept WSREP_FATAL in the assert on retval, since the inconsistency exit returns it. A thread waiting in gcs_vote() for the result of an inconsistency vote hangs the same way if the GCS receive thread exits on a core error. That exit never reaches gcs_handle_act_conf(), so nothing signals vote_cond_. Wake the voter with -EBADFD when the receive thread exits. The wake-up must not replace an answer that is already stored. Add the flag vote_done_, set when a result is stored and the voter is signalled, and cleared in gcs_vote() before the vote is sent. The wake-up, the vote result handler and the configuration change handler store a result only while the voter waits and vote_done_ is false. gcs_vote() waits in a loop on vote_done_. gcs_vote() checks the connection state again after it gets the vote lock, and returns -EBADFD with a log line when the connection is closed. A voter that waited for another vote to end then does not send into a closed connection. gu_lock_step_destroy() looped forever when the lock step was not enabled. It now waits only while a thread is waiting at the lock step. Add debug point async_recv_force_inconsistency, sync point async_recv_exit_before_closing_check and debug point gcs_recv_exit_on_vote_wait. Add debug points gcs_wake_voter_after_vote, gcs_group_change_after_vote and gcs_second_vote_after_vote, and sync point gcs_vote_before_lock. Add debug point gcs_recv_exit_on_message. They are compiled only with GU_DBUG_ON. Unit tests in the GCS vote suite: gcs_vote_recv_thread_exit covers the voter wake-up. gcs_vote_result_before_recv_thread_exit, gcs_vote_result_before_group_change and gcs_vote_result_before_second_vote check that a stored result is kept. gcs_vote_after_recv_thread_exit covers the state check. gcs_vote_conn_destroy and gcs_destroy_drops_queued_actions cover destroy of the connection. The tests for both hang cases that use the server debug points are in the server part (MDEV-40150, galera.MDEV-40150 and galera.MDEV-40150_vote). The vote and configuration handlers move into helpers that the debug points reuse. The debug points and the code that changed have short comments. Free the buffers of actions that are dropped. gcs_destroy(), the inconsistency exit and the two receive thread debug points removed queued or received actions without freeing them. Let gu_fifo_clear() take a release callback and free each buffer by action type: gcache for ordered actions and state requests, malloc for the rest. The vote test receive loop frees the actions it fetches. Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Updated sql-bench to benchmark json functions Other things: - Added compare-result --adjust to compare benchmark with different query/row count - Have different configure options for MySQL and MariaDB - Use highrest timers for tests for more accurate results |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-26448 CAST(expr AS JSON) Until we have a true JSON TYPE, the definition of CAST(X to JSON) will be IDENTICAL to: IF X IS NULL RETURN NULL ELSE IF X is of type temporal RETURN "X" # Tagged as a JSON OBJECT. This matches MySQL 8.0 ELSE IF JSON_VALID(X) RETURN X # Tagged as JSON object ELSE GIVE_ERROR FI Reviewed by: Alexey Botchkov <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Teemu Ollakka
teemu.ollakka@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Fix actions pull request branch | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Updated sql-bench to benchmark json functions Other things: - Added compare-result --adjust to compare benchmark with different query/row count - Have different configure options for MySQL and MariaDB - Use highrest timers for tests for more accurate resutls |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37708 Assertion `!trx->is_bulk_insert()' failed or HA_ERR_KEY_NOT_FOUND Problem: ======= A multi-row REPLACE into an empty InnoDB table, replicated in ROW format with unique_checks=0 and foreign_key_checks=0, stops the slave SQL thread with HA_ERR_KEY_NOT_FOUND (error 1032). The master logs the statement as WRITE_ROWS, DELETE_ROWS, WRITE_ROWS. On the slave, the first WRITE_ROWS goes to InnoDB's bulk insert buffer, because the event is applied like a plain INSERT into an empty table. The buffered row is applied to the table only at the end of the statement. DELETE_ROWS searches for that row in the index and cannot find it. Solution: ======== Added a new flag, HA_EXTRA_FLUSH_BULK_INSERT. The row event applier sends it before a DELETE_ROWS or UPDATE_ROWS event that continues a statement, that is, when an earlier row event of the same statement has already been executed. InnoDB then applies the buffered rows and stops buffering, so the following search finds them. The flag is not sent for the first event of a statement, where nothing can be buffered, so ordinary deletes and updates are not affected. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39095 MariaDB server syntax checker Adds option --check-syntax to mariadbd server. This allows one to check if mariadbd supports some particular syntax. Example usage: cat file-with-sql-syntax | mariadbd [--no-defaults] --check-syntax |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Teemu Ollakka
teemu.ollakka@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Migrate PR smoke tests to GitHub Actions Run galera unit tests with ASAN Debug, UBSAN Debug and RelWithDebInfo builds, each with GALERA_WITH_SSL=ON and OFF. Run wsrep-lib dbsim with an ASAN provider. Run galera MTR suites with a Debug provider on a minimal Debug MariaDB server build from the 10.11 and main branches, with four workers. Skip MTR tests that fail in GitHub Actions. Pass MTR when failed tests pass on the last retry. Upload MTR logs when mtr fails or the job is cancelled. Remove the Jenkins pipelines. Give the workflow token read access only, and do not keep it after checkout. Assisted-by: Claude:claude-opus-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
OmarAbdo
omargamer10a@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41697 ST_Collect returns a MULTIPOINT in some cases Item_func_collect::val_str() used wkb_last as the 'first element' sentinel, but wkb_last equals wkb_geometrycollection, so a POINT after mixed types reset the type. Use an explicit is_first flag. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Petrunia
sergey@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| In TABLE::init(), set opt_range_condition_rows=HA_ERR_END_OF_FILE, not 0. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
sjaakola
seppo.jaakola@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42499 Wait for rollback of recovered transactions before IST applying When a Galera node restarts after a crash, InnoDB rolls back the transactions recovered from the undo log in a background task. These backgroung rollbacks may still be processing, When the node begins to apply IST events. IST processing and backgroud rollbacks may end up in lock conflicts. Backgrond rollback processing thread does not have THD associated, and this eventually caused the crash by SEGFAULT. MDEV-33278 has a fix for this by forcing the IST execution to wait for background rollback transactions. This commit has more elegant fix, by delaying the IST applying phase to begin only after all background rollbacks are complete. Similar work has been done earlier in MENT-432, but this patch was not effective in current version, and has bee modified somewhat. Commit has a new mtr Test galera.galera_ist_recovered_trx_rollback |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39972 Incorrect result of $[last] of JSON MDEV-40971 JSON Path Array Index 32-bit Integer Truncation Wraparound ( [ 2 3 2 + n ] ≡ [2 3 2+n]≡[n]) MDEV-40986 JSON edit functions' array-index 32-bit wraparound (edit variant of M4 — modifies the wrong position) - has_negative_path has to be set for every row. Before, it was only set when the path was parsed. If the path argument is a constant, c_path->parsed stays set after the first row and the path is not parsed again, but we still have to set has_negative_path if needed. - Setting c_path->p.types_used= JSON_PATH_KEY_NULL in the loop was wrong as it reset the JSON_PATH_NEGATIVE_INDEX bit of constant paths. The reset is not needed, as json_path_setup() resets it. - A range with only positive bounds no longer depends on the array sizes. - Ensure we do not get integer overflow when calculating array indexes in json_path_setup(). An index that does not fit in an int is now a path syntax error. Reviewed by: Alexey Botchkov <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Add my_allocate_file() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-26448 CAST(expr AS JSON) Until we have a true JSON TYPE, the definition of CAST(X to JSON) will be IDENTICAL to: IF X IS NULL RETURN NULL ELSE IF X is of type temporal RETURN "X" # Tagged as a JSON OBJECT. This matches MySQL 8.0 ELSE IF JSON_VALID(X) RETURN X # Tagged as JSON object ELSE GIVE_ERROR FI Reviewed by: Alexey Botchkov <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Updated sql-bench to benchmark json functions Other things: - Added compare-result --adjust to compare benchmark with different query/row count - Have different configure options for MySQL and MariaDB - Use highrest timers for tests for more accurate resutls |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set version to 10.4.34-6442 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Removed compiler warning in ha_perfschema.cc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Teemu Ollakka
teemu.ollakka@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge remote-tracking branch 'origin/4.x-github-actions' into 4.ee-github-actions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Aleksey Midenkov
midenok@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-20865 get_def_part_engine() keeps the legacy engine fallback With the stricter extra2_read_len(), a short-form extra2 length running past the segment end made ha_partition::get_def_part_engine() return no engine and raise no error, so for example DROP TABLE could treat the table as missing and leave its partition files behind. For a corrupt frm (a malformed extra2 length, an extra2 segment past the end of the file or a truncated frm, which DROP TABLE rejects before it gets here) it now falls back to the engine type in the .par file and reports the corruption with an ER_NOT_FORM_FILE warning. For a short-form length this is the behavior before the stricter check; a malformed long-form length and the other two cases returned no engine before as well. DROP TABLE of a table with corrupt extra2 then removes all the files. RENAME TABLE renames the files, then fails with ER_NOT_FORM_FILE when it opens the renamed frm, and renames the files back. TODO: fixup to 56c8234351d (MDEV-20865 extra2_read_len() fix) and update its ha_partition paragraph |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39938 JSON_TABLE ignores negative indexes and 'last' in paths The row path and NESTED PATH of JSON_TABLE gave no rows for paths like $[-1], $[last] and $[1 to last], because Json_table_nested_path::scan_next() passed no array sizes to json_path_compare(). Fixed by counting the array sizes during the scan when the path has negative indexes or 'last', in the same way as JSON_EXTRACT() does. This also fixes the code from the MDEV-39972 that was only needed as a temporary workaround for this issue. Reviewed by: Alexey Botchkov <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39676 : Galera Cluster-peer > Donor command execution Add verification of wsrep_sst_donor, wsrep_sst_method and wsrep_sst_receive_address so that they contain only supported characters. But allow NULL or empty value. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37708 Assertion `!trx->is_bulk_insert()' failed or HA_ERR_KEY_NOT_FOUND Problem: ======= A multi-row REPLACE into an empty InnoDB table, replicated in ROW format with unique_checks=0 and foreign_key_checks=0, stops the slave SQL thread with HA_ERR_KEY_NOT_FOUND (error 1032). The master logs the statement as WRITE_ROWS, DELETE_ROWS, WRITE_ROWS. On the slave, the first WRITE_ROWS goes to InnoDB's bulk insert buffer, because the event is applied like a plain INSERT into an empty table. The buffered row is applied to the table only at the end of the statement. DELETE_ROWS searches for that row in the index and cannot find it. Solution: ======== Added a new flag, HA_EXTRA_FLUSH_BULK_INSERT. The row event applier sends it before a DELETE_ROWS or UPDATE_ROWS event that continues a statement, that is, when an earlier row event of the same statement has already been executed. InnoDB then applies the buffered rows and stops buffering, so the following search finds them. The flag is not sent for the first event of a statement, where nothing can be buffered, so ordinary deletes and updates are not affected. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexey Yurchenko
alexey.yurchenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MGL-301 Don't add failed certification seqnos to deps_set_ Since these writesets failed certification their dependencies are moot and their last_seen_seqno_ can (and should) be ignored. Otherwise we may have a situation when a writeset with an exceptionally large certification window may hold back the index cleanup. This is a pre-requisite for the MGL-301 fix. To ensure consistency add TrxHandleSlave::is_depandency() method and a unit test. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39938 JSON_TABLE ignores negative indexes and 'last' in paths The row path and NESTED PATH of JSON_TABLE gave no rows for paths like $[-1], $[last] and $[1 to last], because Json_table_nested_path::scan_next() passed no array sizes to json_path_compare(). Fixed by counting the array sizes during the scan when the path has negative indexes or 'last', in the same way as JSON_EXTRACT() does. This also fixes the code from the MDEV-39972 that was only needed as a temporary workaround for this issue. Reviewed by: Alexey Botchkov <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Aleksey Midenkov
midenok@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-20865 Extra2_info keeps unknown optional extra2 values Extra2_info::read() skipped extra2 values of unknown optional types (below EXTRA2_ENGINE_IMPORTANT) without keeping them, so an frm rewritten through read() and write() lost values written by a newer server. read() now keeps such values (type and a pointer into the frm image) in the dynamic array Extra2_info::unknown, store_size() counts them and write() writes them back after the known values. The plain members moved to the base struct Extra2_values, which reset() clears with bzero(). write() has no caller yet, so the extra2_rewrite debug keyword makes every frm read also write the extra2 values into a new image and read them back. main.frm-debug uses it for all extra2 sections, for 1-byte and 3-byte value lengths and for an unknown optional value. TODO: fixup to ca3ba52ca12 (MDEV-20865 extra2_fields refactored to Extra2_info class) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexey Yurchenko
alexey.yurchenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch 'MGL-301-4.x' into MGL-301-4.ee | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Raghunandan Bhat
raghunandan.bhat96@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39095: Fixes to MariaDB Syntax Checker - Skip initializing stopwords for full-text indexes when checking syntax. - Skip changing data directory when checking syntax. - Show help message when syntax checker is used in interactive mode. - Initialize THD with a dummy database name to prevent `No database selected` error. - Rename `PARSER_STATE` in check_syntax.cc to `Syntax_checker_state` to avoid confusion with `Parser_state` class. - Increase max length of delimiter token to 16 to match mariadb client. - Support many statements in one query, like the client does (e.g. `SET @a=1; SELECT @a|` with DELIMITER |). Report correct line numbers for errors in them. - Report only errors, not notes or warnings. A stored function with the name of a native function is accepted, a UDF with such a name is an error. - Apply SET statements that change how later statements are parsed: - Applied: session sql_mode and character_set_client, SET NAMES, SET CHARACTER SET. Values can be constants, DEFAULT, user variables, @@sql_mode or @@character_set_client. - Tracked: user variables set from such values, so the `SET @OLD_SQL_MODE=@@SQL_MODE ... SET SQL_MODE=@OLD_SQL_MODE` pattern from dumps works. - Ignored: SET GLOBAL, other variables, and values that need executing (a user variable set from one is unset). - Split statements using the current client character set. - Treat enabled plugins as available, so that partitioning syntax is accepted. Initialize data type and function plugins, so that their types and functions are known. - Recognize system variables of enabled plugins (binlog_checksum, innodb_*, aria_*) without initializing the plugins. - Support CREATE PACKAGE BODY when CREATE PACKAGE is earlier in the input. DROP PACKAGE removes it. A body without its package is an error. - Refuse to run --check-syntax together with --bootstrap. - More tests: DDLs, DMLs, Stored Procedures, Views, sql_mode, character sets, plugins, packages |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Teemu Ollakka
teemu.ollakka@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge remote-tracking branch 'upstream/4.ee' into mariadb-4.x-github-actions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Andrei Elkin
andrei.elkin@pp.inet.fi |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37990 review: mirgate from std::algorithm-based to sorted array, ... a custom dichotomy search and "expanding" insert. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Monty
monty@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Removed compiler warning in ha_perfschema.cc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37708 Assertion `!trx->is_bulk_insert()' failed or HA_ERR_KEY_NOT_FOUND Problem: ======= A multi-row REPLACE into an empty InnoDB table loses its rows when the table has an AFTER DELETE trigger and the session has unique_checks=0 and foreign_key_checks=0. Normal REPLACE does not use bulk insert, because the SQL layer needs the duplicate-key error right away. InnoDB knows it is a REPLACE only from HA_EXTRA_WRITE_CAN_REPLACE, which sets trx->duplicates. The server does not send that flag when DELETE triggers exist. So InnoDB buffers the first row, the duplicate is never reported for the second row, and the old row is not deleted. The buffered rows are applied at statement end. In this case, table ends up empty and the trigger count is 0. Solution: ======== Added a new flag, HA_EXTRA_WRITE_IS_REPLACE, it is sent only for a REPLACE on a table that has DELETE triggers. HA_EXTRA_WRITE_CAN_REPLACE tells the engine that write_row() may replace a conflicting row by itself, without reporting the duplicate to the SQL layer. Federated (REPLACE INTO on the remote server), Spider, Sphinx and Mroonga (storage mode) act on it. The flag is not sent for tables with DELETE triggers (bug#13479, commit e08a2b326b1), because such an engine would replace the row without the SQL layer calling delete_row(), and the DELETE triggers would not fire. Sending it for these tables would break that, so the old flag cannot change its meaning. The new flag only says that the statement is a REPLACE and duplicates must be reported at once. Engines that do not know it ignore it. Only InnoDB acts on it and ha_partition forwards it to the partitions. The flag is sent by the new helper set_replace_mode(), which is used by REPLACE, REPLACE ... SELECT, CREATE TABLE ... REPLACE SELECT and LOAD DATA ... REPLACE. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexey Yurchenko
alexey.yurchenko@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MGL-301 Galera donor deadlocks after serving rsync SST Blocking SST blocks applying on the donor side and may lead to a significant lag and replication queue by the end of SST. Once the node transitions from the DONOR state to JOINED it may start to issue its own transactions despite the lag: technically it is not incorrect as it has a well-defined state and if the writeset passes subsequent certification it is good to go. However, to pass the certification the client thread must enter local monitor which has a limited window size and if the node lag is large enough the resulting seqno does not fit in the window and the thread blocks waiting to enter the monitor. All this time it remains unaddressable and uninterruptible by the previously ordered writesets which may need to abort it due to locking conflicts. This causes a deadlock where applier cannot proceed and is holding all other appliers because it is waiting for a database lock, a BF thread that cannot interrupt the local client thread because the latter is not in the monitor and the local thread which cannot enter the monitor because all appliers are stuck in applying phase and can't advance the monitor segno. To fix that: - don't let the node replicate a writeset if there is a risk that the writeset may end waiting for local monitor - for that check the expected local seqno value. If it is more than half of the monitor's process size ahead - treat such condition as must_abort and rollback the transaction. - in the extremely unlikely event that the local writeset still ends up unadmitted into the monitor ring buffer process array fallback to a dynamically allocated reserve map so that interrupt() or sel_cancel() can still address it and cancel the wait similarly to how it does to the entries in the process_ array. Make sure that set_initial_position() deals with overflow entries appropriately. Also add a unit test for the monitor class. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Add my_allocate_file() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Merge branch '4.x-MGL-359' into 4.ee-MGL-359 Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||