- 02 Aug, 2022 1 commit
-
-
Marko Mäkelä authored
-
- 01 Aug, 2022 5 commits
-
-
Marko Mäkelä authored
fil_name_process(): Upon processing a new file name for FILE_RENAME, rename the tablespace in deferred_spaces. recv_sys_t::parse(): Rearrange some code to slightly improve the locality of reference. Invoke fil_name_process() with FILE_MODIFY, FILE_DELETE or the new case FILE_RENAME, for the new file name of the file. This should be a regression due to commit 86dc7b4d (MDEV-24626) and it might also affect the crash recovery of DDL operations.
-
Marko Mäkelä authored
btr_page_reorganize_low(): Restore mtr->set_log_mode() before returning. innobase_instant_try(): Do not invoke rec_get_offsets() if btr_cur_pessimistic_update() failed. The cursor position may be invalid.
-
Norio Akagi authored
Starting since this commit 36cdd5c3 there is an ASAN stack-buffer-overflow error because we append a NULL terminator beyond the length of memory allocated. Reviewed by: Monty and Nayuta Yanagisawa
-
Thirunarayanan Balathandayuthapani authored
- Change partition does undo logging of all rows unnecessarily and it invokes bulk insert during DDL. Better to avoid the logging of undo records during copy of the parititon.
-
Marko Mäkelä authored
The function rec_get_offsets_func() used to hit ut_error due to an invalid rec_get_status() value of a ROW_FORMAT!=REDUNDANT record. This fix is twofold: We will not only avoid a crash on corruption in this case, but we will also make more effort to validate each record every time we are iterating over index page records. rec_get_offsets_func(): Do not crash on a corrupted record. page_rec_get_nth(): Return nullptr on error. page_dir_slot_get_rec_validate(): Like page_dir_slot_get_rec(), but validate the pointer and return nullptr on error. page_cur_search_with_match(), page_cur_search_with_match_bytes(), page_dir_split_slot(), page_cur_move_to_next(): Indicate failure in a return value. page_cur_search(): Replaced with page_cur_search_with_match(). rec_get_next_ptr_const(), rec_get_next_ptr(): Replaced with page_rec_get_next_low(). TODO: rtr_page_split_initialize_nodes(), rtr_update_mbr_field(), and possibly other SPATIAL INDEX functions fail to properly handle errors. Reviewed by: Thirunarayanan Balathandayuthapani Tested by: Matthias Leich Performance tested by: Axel Schwenke
-
- 29 Jul, 2022 1 commit
-
-
Rucha Deodhar authored
Fixup to MDEV-28762. Fixes warnings about unused variable "stack_used_up" during building with RelWithDebInfo
-
- 28 Jul, 2022 3 commits
-
-
Daniel Lenski authored
MDEV-28782: modify mariadb-tzinfo-to-sql to set 'wsrep*' variables appropriately in cases where Galera is not compiled in In 3b662c6e, it was discovered that the values of the 'wsrep_is_on' and 'wsrep_cannot_replicate_tz' variables need to be overridden for embedded builds to pass However, there are other build configurations where these variables also have NULL values. The mariadb-tzinfo-to-sql script (implemented in sql/tztime.cc) can be slightly modified to set its 'wsrep_is_on' and 'wsrep_cannot_replicate_tz' variables more predictably in all such cases, thus allowing the mysql_tzinfo_to_sql_symlink.test test to pass without any special-casing for particular build types. See comments: - https://github.com/MariaDB/server/commit/3b662c6ebd26b54ce534d9e7451cdc31e6c0046c#r78994411 - https://jira.mariadb.org/browse/MDEV-28782?focusedCommentId=230038&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-230038 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.
-
Thirunarayanan Balathandayuthapani authored
loss of debug sync signal
-
Daniel Black authored
At some point the incrementing of the transaction counter got dropped. Thanks Agustin for the bug report.
-
- 27 Jul, 2022 8 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Starting with commit da094188 (MDEV-24393), MariaDB will no longer acquire advisory file locks on InnoDB data files by default, because it would create a large number of entries in Linux /proc/locks. The motivation for acquiring the file locks is to prevent accidental concurrent startup of multiple server processes on the same data files. Such mistake still turns out to be relatively common, based on corruption bug reports from the community. To prevent corruption due to concurrent startup attempts, the Aria storage engine would unconditionally acquire an advisory lock on one of its log files. Solution: InnoDB will always lock its system tablespace files. (Ever since commit 685d958e the InnoDB log file will not necessarily be open while the server is running, because it can be accessed via memory-mapped I/O.) If more protection is desired, then the option --external-locking can be used. The mandatory advisory lock also fixes intermittent failures of some crash recovery tests. It turns out that when the mtr test harness kills and restarts the server, it will not actually ensure that the old process has terminated before starting the new one.
-
Oleksandr Byelkin authored
-
Marko Mäkelä authored
After reverting commit commit 39f45f6f all combinations of this test would crash the server.
-
Igor Babaev authored
This bug could cause a crash of the server when executing queries containing ANY/ALL predicands with redundant subqueries in GROUP BY clauses. These subqueries are eliminated by remove_redundant_subquery_clause() together with elimination of GROUP BY list containing these subqueries. However the references to the elements of the GROUP BY remained in the JOIN::all_fields list of the right operand of of the ALL/ANY predicand. Later these references confused make_aggr_tables_info() when forming proper execution structures after ALL/ANY predicands had been replaced with expressions containing MIN/MAX set functions. The patch just removes these references from JOIN::all_fields list used by the subquery of the ALL/ANY predicand when its GROUP BY clause is eliminated. Approved by Oleksandr Byelkin <sanja@mariadb.com>
-
- 26 Jul, 2022 19 commits
-
-
Sergei Golubchik authored
followup for 4bc34ef3
-
Marko Mäkelä authored
prepare_inplace_add_virtual(): Over-estimate the size of the arrays by not subtracting table->s->virtual_fields (which may refer to stored, not virtual generated columns). InnoDB only distinguishes virtual columns.
-
Andrei authored
... on semisync slave To provide semisync master crash-recovery the same server-id transactions were made to accept for execution on the semisync slave when the strict gtid mode (see MDEV-27760). That however caused out-of-order error on a master's transaction server of the circular setup. The error was fair in the sense of the gtid strict mode rule as indeed under the condition of the circular setup the replicated transaction already exists in the local binlog. This is fixed by the commit to ignore on the gtid strict mode semisync slave those gtids that exist in the slave's binlog that effectively restores the default same-server-id ignore policy. At the same time the fixes complies with MDEV-21117 semisync slave recovery to accept the same server-id transactions that do not exist in local binlog.
-
Daniel Black authored
SHOW ENGINE INNODB STATUS and SHOW GLOBAL VARIABLES were blocking on the locks used to access the history length in MDEV-29141. While the reason for the blockage was elsewhere, we should make these monitoring commands less blocking as there is a trx_sys.history_size_approx function that can be used. SHOW ENGINE INNODB STATUS and SHOW GLOBAL STATUS LIKE 'innodb_history_list_length' and Innodb Monitors can use trx_sys.history_size_approx().
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Thirunarayanan Balathandayuthapani authored
- Import tablespace re-evicts and reload the table definition. During that time, innodb has to load the table even though the secondary fts index marked as corrupted
-
Thirunarayanan Balathandayuthapani authored
- InnoDB should ignore the single word followed by apostrophe while tokenising the document. Example is that if the input string is O'brien then right now, InnoDB seperates into two tokens as O, brien. But after this patch, InnoDB can ignore the token 'O' and consider only 'brien'.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The logic on Windows was originally simplified in commit 4bca1a78 for storage/xtradb and later in commit 6304c0bf for storage/innobase.
-
Marko Mäkelä authored
Unlike GCC, clang could optimize away alloca() and thus the ALLOCATE_MEM_ON_STACK() instrumentation. To make it harder, let us invoke a non-inline function on the entire allocated buffer.
-
Andrei authored
The hang may be caused by a 1pc branch that was fixed by MDEV-26031 in 10.6 and up. That commit did not look relevant in 10.5 and below so was not pushed to the low branches. To possibly tackle the reported issue the MDEV-26031 is backported now with a test that unlike 10.6 does not expose the former bug in 10.5. It is only needed for checking a refined logics inside MYSQL_BIN_LOG::write_transaction_to_binlog. The latter is made to do away with xid-unlogging (which is suspected to have been at fault) for xid-less transaction.
-
Mikhail Chalov authored
This commit replaces sprintf(buf, ...) with snprintf(buf, sizeof(buf), ...), specifically in the "easy" cases where buf is allocated with a size known at compile time. The changes make sure we are not write outside array/string bounds which will lead to undefined behaviour. In case the code is trying to write outside bounds - safe version of functions simply cut the string messages so we process this gracefully. 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. bsonudf.cpp warnings cleanup by Daniel Black Reviewer: Daniel Black
-
Thirunarayanan Balathandayuthapani authored
- Remove the FILE_MODIFY message in backup_file_op()
-
Thirunarayanan Balathandayuthapani authored
MDEV-28679 After upgrade to 10.7.3-1 with enabled data-at-rest encryption unable to restore dump file. - InnoDB bulk insert fails to use encryption buffer for encrypting the temporary log file. Declare the m_crypt_block, m_crypt_pfx in row_merge_bulk_t to be used for encrypting the temporary file.
-
Thirunarayanan Balathandayuthapani authored
If transaction does bulk insert and disables the foreign_key_check then InnoDB fails with the assert failure. InnoDB has strict assertion that check_foreigns and unique_secondary_check should be enabled if the transaction does bulk insert in innodb_prepare_commit_versioned().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Rucha Deodhar authored
This commit is a fixup for MDEV-28762 Analysis: Some recursive json functions dont check for stack control Fix: Add check_stack_overrun(). The last argument is NULL because it is not used
-
- 25 Jul, 2022 3 commits
-
-
Brandon Nesterenko authored
Problem: ======= This patch addresses two issues: 1. An incident event can be incorrectly reported for transactions which are rolled back successfully. That is, an incident event should only be generated for failed “non-transactional transactions” (i.e., those which modify non-transactional tables) because they cannot be rolled back. 2. When the mariadb slave (error) stops at receiving the incident event there's no description of what led to it. Neither in the event nor in the master's error log. Solution: ======== Before reporting an incident event for a transaction, first validate that it is “non-transactional” (i.e. cannot be safely rolled back). To determine if a transaction is non-transactional, lex->stmt_accessed_table(LEX::STMT_WRITES_NON_TRANS_TABLE) is used because it is set previously in THD::decide_logging_format(). Additionally, when an incident event is written, write an error message to the server’s error log to indicate the underlying issue. Reviewed by: =========== Andrei Elkin <andrei.elkin@mariadb.com>
-
Rucha Deodhar authored
-
Marko Mäkelä authored
Spotted by Thirunarayanan Balathandayuthapani.
-