- 16 Nov, 2022 1 commit
-
-
Sergei Golubchik authored
MDEV-25625 Test sys_vars.wsrep_on_without_provider fails: mysqltest: At line 8: query 'SET GLOBAL wsrep_on=ON' failed with wrong errno 1193: 'Unknown system variable 'wsrep_on'', instead of 1210...
-
- 15 Nov, 2022 2 commits
-
-
Marko Mäkelä authored
If a log checkpoint occurs at the end LSN of mtr.commit_shrink(space) in trx_purge_truncate_history(), then recovery may fail because it could try to apply too old log records to too old copies of undo log pages. This was repeated with the following test: ./mtr innodb.undo_log_truncate,4k,strict_full_crc32 recv_sys_t::trim(): Move some code to the caller. recv_sys_t::apply(): For undo tablespace truncation, discard all old redo log for the undo tablespace, and then truncate the file to the desired size. Tested by: Matthias Leich
-
Alexander Barkov authored
-
- 14 Nov, 2022 5 commits
-
-
Marko Mäkelä authored
ibuf.size, ibuf.max_size: Changed the type to Atomic_relaxed<ulint> in order to fix some (not all) race conditions. ibuf_contract(): Renamed from ibuf_merge_pages(ulint*). ibuf_merge(), ibuf_merge_all(): Removed. srv_shutdown(): Invoke log_free_check() and ibuf_contract(). Even though ibuf_contract() is not writing anything, it will trigger calls of ibuf_merge_or_delete_for_page(), which will write something. Because we cannot invoke log_free_check() at that low level, we must invoke it at the high level. srv_shutdown_print(): Replaces srv_shutdown_print_master_pending(). Report progress and remaining work every 15 seconds. For the change buffer merge, the remaining work is indicated by ibuf.size.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The InnoDB write-ahead log ib_logfile0 is of fixed size, specified by innodb_log_file_size. If the tail of the log manages to overwrite the head (latest checkpoint) of the log, crash recovery will be broken. Let us clarify the messages about this, including adding a message on the completion of a log checkpoint that notes that the dangerous situation is over. To reproduce the dangerous scenario, we will introduce the debug injection label ib_log_checkpoint_avoid_hard, which will avoid log checkpoints even harder than the previous ib_log_checkpoint_avoid. log_t::overwrite_warned: The first known dangerous log sequence number. Set in log_close() and cleared in log_write_checkpoint_info(), which will output a "Crash recovery was broken" message.
-
Marko Mäkelä authored
srv_shutdown(): Do not call log_free_check(), because it will now be repeatedly called by ibuf_merge_all(). Do not call srv_sync_log_buffer_in_background(), because we do not actually care about durability during shutdown. Log writes will already be triggered by buf_flush_page_cleaner() for writing back modified pages, possibly by log_free_check(). logs_empty_and_mark_files_at_shutdown(): Clean up a condition. This function is the caller of srv_shutdown(), and it will ensure that the log and the buffer pool will be in clean state before shutdown.
-
- 13 Nov, 2022 1 commit
-
-
Dominik Hassler authored
-
- 10 Nov, 2022 1 commit
-
-
Marko Mäkelä authored
mtr_t::release_page(): Remove. The function became unused in commit 56f6dab1 when the call was replaced with a call to mtr_t::memo_release().
-
- 09 Nov, 2022 5 commits
-
-
asklavou authored
-
asklavou authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This is a backport of commit 8b6a308e from MariaDB Server 10.6.11. No attempt to reproduce the hang in earlier an earlier version of MariaDB Server than 10.6 was made. In each caller of fseg_n_reserved_pages() except ibuf_init_at_db_start() which is a special case for ibuf.index at database startup, we must hold an index latch that prevents concurrent allocation or freeing of index pages. Any operation that allocates or free pages that belong to an index tree must first acquire an index latch in non-shared mode, and while holding that, acquire an index root page latch in non-shared mode. btr_get_size(), btr_get_size_and_reserved(): Assert that a strong enough index latch is being held. dict_stats_update_transient_for_index(), dict_stats_analyze_index(): Acquire a strong enough index latch. These operations had followed the same order of acquiring latches in every InnoDB version since the very beginning (commit c533308a). The hang was introduced in commit 2e814d47 which imported mysql/mysql-server@ac74632293bea967b352d1b472abedeeaa921b98 which failed to strengthen the locking requirements of the function btr_get_size().
-
- 08 Nov, 2022 15 commits
-
-
Marko Mäkelä authored
-
Andrew Hutchings authored
* MDEV-29397 Fix note turning into error ODBC Rewind triggered an error with no SQL, but this is sometimes a valid condition (as can be seen with other classes). Setting this to a 0 return stops errors firing when they shouldn't. Also fixes ASAN hits from in MDEV-29687 tabext.cpp.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Let us avoid excessive allocation of explicit record locks.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
spatial_index_info: Replaces index_tuple_info_t. Always take a memory heap as a parameter to the member functions. Remove pointer indirection for m_dtuple_vec. spatial_index_info::add(): Duplicate any PRIMARY KEY fields that would point to within ext->buf because that buffer will be allocated in a shorter-lifetime memory heap.
-
Marko Mäkelä authored
Every operation that is going to write redo log is supposed to invoke log_free_check() before acquiring any latches. If there is a risk of log buffer overrun, a log checkpoint would be triggered by that call. ibuf_merge_space(), ibuf_merge_in_background(), ibuf_delete_for_discarded_space(): Invoke log_free_check() when the current thread is not holding any page latches. Unfortunately, in lower-level code called from ibuf_insert() or ibuf_merge_or_delete_for_page(), some page latches may be held and a call to log_free_check() could hang. ibuf_set_bitmap_for_bulk_load(): Use the caller's mini-transaction. The caller should have invoked log_free_check() while not holding any page latches.
-
Marko Mäkelä authored
Something appears to be broken in the DBUG subsystem. Let us remove frequent calls to it from the InnoDB internal SQL interpreter that is used in the purge of transaction history. The DBUG_PRINT in que_eval_sql() can remain for now, because those operations are much less frequent.
-
Marko Mäkelä authored
This fixes up commit e3c39c0b
-
Marko Mäkelä authored
-
Marko Mäkelä authored
InnoDB crash recovery can run out of memory before commit 50324ce6 in MariaDB Server 10.5. Let us disable some frequently failing recovery tests in earlier versions.
-
Marko Mäkelä authored
Not creating explicit record locks will speed up the test. Also, disable the use of InnoDB persistent statistics in the test of MDEV-27270 to avoid intermittent failures in 10.6 or later (after commit 9608773f) due to the nondeterministic scheduling of STATS_AUTO_PERSISTENT.
-
Marko Mäkelä authored
The file plugin_exports became unused in commit fec844ac
-
Marko Mäkelä authored
-
- 07 Nov, 2022 8 commits
-
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
Daniel Bartholomew authored
-
Daniel Bartholomew authored
-
Daniel Bartholomew authored
-
Thirunarayanan Balathandayuthapani authored
- mariabackup fails to assign srv_undo_space_id_start when the dedicated undo tablespaces are disabled
-
Sachin authored
Problem:- We are able to insert duplicate value in table because cmp_binary_offset is not able to differentiate between NULL and empty string. So check_duplicate_long_entry_key is never called and we don't check for duplicate. Solution Added a if condition with is_null() on field which can differentiate between NULL and empty string.
-
- 05 Nov, 2022 1 commit
-
-
Vladislav Vaintroub authored
When trying to output stacktrace, and addr2line is not installed, the child process forked by start_addr2line_fork() will fail to do exec(), and finish with exit(1). There is a problem with exit() though - it runs exit handlers, and for the forked copy of crashing process, it is a bad idea. In 10.5+ code for example, exit handlers include tpool::task_group static destructors, and it will hang infinitely waiting for completion of the outstanding tasks. The fix is to use _exit() instead, which skips the execution of exit handlers
-
- 03 Nov, 2022 1 commit
-
-
Ian Gilfillan authored
-