- 21 Feb, 2023 1 commit
-
-
Marko Mäkelä authored
-
- 20 Feb, 2023 1 commit
-
-
Sergei Golubchik authored
-
- 17 Feb, 2023 1 commit
-
-
Thirunarayanan Balathandayuthapani authored
is being called - Recovery fails to release log_sys.latch for non-last batch before preallocates the block in recv_read_in_area().
-
- 16 Feb, 2023 16 commits
-
-
Sergei Golubchik authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This is a partial revert of commit 8b6a308e (MDEV-29883) and a follow-up to the merge commit 394fc71f (MDEV-24569). The latching order related to any operation that accesses the allocation metadata of an InnoDB index tree is as follows: 1. Acquire dict_index_t::lock in non-shared mode. 2. Acquire the index root page latch in non-shared mode. 3. Possibly acquire further index page latches. Unless an exclusive dict_index_t::lock is held, this must follow the root-to-leaf, left-to-right order. 4. Acquire a *non-shared* fil_space_t::latch. 5. Acquire latches on the allocation metadata pages. 6. Possibly allocate and write some pages, or free some pages. btr_get_size_and_reserved(), dict_stats_update_transient_for_index(), dict_stats_analyze_index(): Acquire an exclusive fil_space_t::latch in order to avoid a deadlock in fseg_n_reserved_pages() in case of concurrent access to multiple indexes sharing the same "inode page". fseg_page_is_allocated(): Acquire an exclusive fil_space_t::latch in order to avoid deadlocks. All callers are holding latches on a buffer pool page, or an index, or both. Before commit edbde4a1 (MDEV-24167) a third mode was available that would not conflict with the shared fil_space_t::latch acquired by ha_innobase::info_low(), i_s_sys_tablespaces_fill_table(), or i_s_tablespaces_encryption_fill_table(). Because those calls should be rather rare, it makes sense to use the simple rw_lock with only shared and exclusive modes. fil_crypt_get_page_throttle(): Avoid invoking fseg_page_is_allocated() on an allocation bitmap page (which can never be freed), to avoid acquiring a shared latch on top of an exclusive one. mtr_t::s_lock_space(), MTR_MEMO_SPACE_S_LOCK: Remove.
-
Marko Mäkelä authored
buf_pool_t::watch_set(): Always buffer-fix a block if one was found, no matter if it is a watch sentinel or a buffer page. The type of the block descriptor will be rechecked in buf_page_t::watch_unset(). Do not expect the caller to acquire the page hash latch. Starting with commit bd5a6403 it is safe to release buf_pool.mutex before acquiring a buf_pool.page_hash latch. buf_page_get_low(): Adjust to the changed buf_pool_t::watch_set(). This simplifies the logic and fixes a bug that was reproduced when using debug builds and the setting innodb_change_buffering_debug=1.
-
Marko Mäkelä authored
buf_read_page_low(): Map the buf_page_t::read_complete() return value DB_FAIL to DB_PAGE_CORRUPTED. The purpose of the DB_FAIL return value is to avoid error log noise when read-ahead brings in an unused page that is typically filled with NUL bytes. If a synchronous read is bringing in a corrupted page where the page frame does not contain the expected tablespace identifier and page number, that must be treated as an attempt to read a corrupted page. The correct error code for this is DB_PAGE_CORRUPTED. The error code DB_FAIL is not handled by row_mysql_handle_errors(). This was missed in commit 0b47c126 (MDEV-13542).
-
Marko Mäkelä authored
-
- 15 Feb, 2023 11 commits
-
-
Julius Goryavsky authored
Post-fix to MDEV-30318 and MDEV-22570-related changes: unified handling of wsrep_provider by code so that "none" is interpreted as case-insensitive everywhere and that work with an empty string is supported everywhere.
-
Marko Mäkelä authored
This almost completely reverts commit acd23da4 and retains a safe optimization: recv_sys_t::parse(): Remove any old redo log records for the truncated tablespace, to free up memory earlier. If recovery consists of multiple batches, then recv_sys_t::apply() will must invoke recv_sys_t::trim() again to avoid wrongly applying old log records to an already truncated undo tablespace.
-
Vicențiu Ciorbaru authored
WITH TIES would not take effect if SELECT DISTINCT was used in a context where an INDEX is used to resolve the ORDER BY clause. WITH TIES relies on the `JOIN::order` to contain the non-constant fields to test the equality of ORDER BY fiels required for WITH TIES. The cause of the problem was a premature removal of the `JOIN::order` member during a DISTINCT optimization. This lead to WITH TIES code assuming ORDER BY only contained "constant" elements. Disable this optimization when WITH TIES is in effect. (side-note: the order by removal does not impact any current tests, thus it will be removed in a future version) Reviewed by: monty@mariadb.org
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
-
Monty authored
(fp->field_length is always >= 0)
-
Monty authored
This allows one to always use --skip-create-table for repeated runs.
-
Monty authored
There was a bug in JOIN::make_notnull_conds_for_range_scans() when clearing TABLE->tmp_set, which was used to mark fields that could not be null. This function was only used if 'not_null_range_scan=on' is set. The effect was that tmp_set contained a 'random value' and this caused the optimizer to think that some fields could not be null. FLUSH TABLES clears tmp_set and because of this things worked temporarily. Fixed by clearing tmp_set properly.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
-
Sergei Petrunia authored
JOIN_CACHE::alloc_buffer() used wrong logic when calculating the size of all join buffers. Then, it computed the ratio by which JOIN::shrink_join_buffers() should shrink the buffers. shrink_join_buffers() ended up in a situation where buffers would not fit into the total quota after shrinking, which resulted in negative buffer sizes. Due to use of unsigned integers it would cause very large buffers to be used instead. Make JOIN_CACHE::alloc_buffer() use the same logic as JOIN::shrink_join_buffers() when it calculates the total size of all join buffers so far. Also, add a safety check in JOIN::shrink_join_buffers() This patch doesn't include a testcase, because the original test dataset is too big and fragile. We have dbt3_s001.inc but I wasn't able to demonstrate the issue with it.
-
- 14 Feb, 2023 10 commits
-
-
Monty authored
-
Andrew Hutchings authored
Very minor hits found by Coverity for the S3 engine.
-
Marko Mäkelä authored
-
Jan Lindström authored
Do not compile wsrep_provider plugin if WITH_WSREP is not enabled. We should not enable wsrep_provider plugin if WSREP_ON=OFF and at that case we can only print information that Plugin 'wsrep-provider' is disabled. Make sure tests require Galera library 26.4.14 if needed.
-
Jan Lindström authored
MDEV-30133 MariaDB startup does not validate plugin-wsrep-provider when wsrep_mode=off or wsrep_provider is not set Refuse to start if WSREP_ON=OFF or wsrep_provider is not set or it is set to 'none' if plugin-wsrep-provider is used.
-
Jan Lindström authored
When wsrep-provider-options plugin is initialized we need to update wsrep-provider-options variable as READ_ONLY.
-
Daniele Sciascia authored
- Provider options are read from the provider during startup, before plugins are initialized. - New wsrep_provider plugin for which sysvars are generated dynamically from options read from the provider. - The plugin is enabled by option plugin-wsrep-provider=ON. If enabled, wsrep_provider_options can no longer be used, (an error is raised on attempts to do so). - Each option is either string, integer, double or bool - Options can be dynamic / readonly - Options can be deprecated Limitations: - We do not check that the value of a provider option falls within a certain range. This type of validation is still done in Galera side. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
-
Thirunarayanan Balathandayuthapani authored
- cmp_rec_rec_simple() fails to detect duplicate key error for bulk insert operation
-
Thirunarayanan Balathandayuthapani authored
- InnoDB fails to reset the after_apply variable before applying the redo log in last batch during multi-batch recovery.
-
Thirunarayanan Balathandayuthapani authored
- During non-last batch of multi-batch recovery, InnoDB holds log_sys.mutex and preallocates the block which may intiate page flush, which may initiate log flush, which requires log_sys.mutex to acquire again. This leads to assert failure. So InnoDB recovery should release log_sys.mutex before preallocating the block.
-