- 16 Nov, 2022 2 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 14 Nov, 2022 8 commits
-
-
Marko Mäkelä authored
-
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
row_check_index(): Treat secondary indexes of temporary tables as if SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED is in effect. That is, only consider the delete-mark and nothing else.
-
Thirunarayanan Balathandayuthapani authored
- Changed the page0 perl corruption code in test case to avoid the bogus error in windows
-
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
-
- 11 Nov, 2022 2 commits
-
-
Alexander Barkov authored
This bug was previously fixed in 10.6.11 by: MDEV-28327 InnoDB persistent statistics fail to update after bulk insert Adding MTR tests only. Also, fixing the old test for MDEV-28327 to make "mtr" reliably pass with/without --mysqld=--innodb-stats-persistent=0, and with different page sizes, as suggested by Marko.
-
Otto Kekäläinen authored
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup This fixes autobake-deb.sh builds on Sid which was visible as 4 failing build steps on Salsa-CI. - In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to fix builds that failed with error: Error - unknown release codename n/a - Refactor list to have Ubuntu versions first, then Debian, and as last the special case of Debian Sid - Fix minor syntax issues detected by Shellcheck Also remove useless DEB_HOST_ARCH_CPU check from debian/rules: * It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway * The variable name was wrong and always empty * If variable would have been correct, logic was still reversed - Define 3h timeout as the default 1h timeout on Gitlab.com (and others) is usually not enough for initial (uncached) MariaDB builds. - Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm are no longer possible due to: Bug#993755: libcrypt.so.1: cannot open shared object file when upgrading from Stretch to Sid (https://bugs.debian.org/993755) - Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures to reveal bug MDEV-28640. Originally this step was failing as the uring dependencies in upstream builders lagged behind and there was nothing that needed work, only time time to resolve. Now there is an actual bug in packaging that should be visible as a CI failure. - Stop testing for 'service mysql status' on systems that upgraded from MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control changes in 10.6 on upstream the upgrade is no longer compatible in a way that would maintain the init.d script with name 'mysql'. - Fix typos where mergers had changed occurrences of 10.5 to 10.6 while they intentionally need to be exactly 10.5, otherwise the meaning changes. - Align autopkgtest code with downstream official Debian packaging one. This is change is safe on a stable branch because is only affects builds and testing, not any actual usage of MariaDB 10.6. - Standardize on using capitalized 'YES' in CMake build options (instead of 'yes' or mixed case) - Add some comments to better document debian/rules - Fix typo in Lintian overrides Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634 MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633 When built with LTO on Ubuntu, MariaDB does not catch an exception when the uring initialization fails due to a low RLIMIT_MEMLOCK value. This commit amends the commit 0609b345 to be identical to the one done downstream in Debian: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179 This way both the inline comments and 'git blame' for this section will show properly why this is needed, and the fix is one that is fully tested on Debian and Ubuntu. Also having this section fully identical in upstream MariaDB and downstream Debian will make the packaging maintenance easier as 'diff` runs on this file will not flag this as a difference anymore. In MDEV-28640 the init script failed to stop/start the MariaDB server due to missing mysqladmin on the system. This was however very hard to spot from the console output. Add an explicit check for the binary the script depends on, and fail verbosely if the dependency is missing.
-
- 10 Nov, 2022 5 commits
-
-
Marko Mäkelä authored
mlog_init_t::mark_ibuf_exist(): After applying the changes, invoke clear(). It turns out that multiple calls to recv_sys.apply(true) are possible during recovery. Therefore, we might redundantly invoke mlog_init_t::mark_ibuf_exist() multiple times. Starting with commit aaef2e1d the call buf_page_t::set_ibuf_exist() is not idempotent, because the flag is actually represented by 2 values of a 3-bit state field.
-
Marko Mäkelä authored
-
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().
-
Marko Mäkelä authored
This fixes up commit 314ed9f5 and commit 9608773f
-
Marko Mäkelä authored
A number of tests often trip warnings on Valgrind, because Valgrind runs all threads in a single thread and may cause starvation: InnoDB: A long wait (... seconds) was observed for dict_sys.latch Let us disable those tests on Valgrind in order to avoid bogus failures.
-
- 09 Nov, 2022 8 commits
-
-
asklavou authored
-
Marko Mäkelä authored
Starting with commit 8f8ba758 the assertion would fail in ./mtr --mysqld=--innodb-adaptive-hash-index innodb.instant_alter_crash and it would keep failing even after commit d2e649ae
-
asklavou authored
-
Marko Mäkelä authored
-
Marko Mäkelä 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 14 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
ha_innobase::referenced_by_foreign_key(): Protect the check with dict_sys.freeze(), to prevent races with TRUNCATE TABLE. The test innodb.instant_alter_crash has been adjusted for this additional locking. dict_table_is_referenced_by_foreign_key(): Removed (merged to the only caller). create_table_info_t::create_table(): Ignore missing indexes for FOREIGN KEY constraints if foreign_key_checks=0. create_table_info_t::create_table_update_dict(): Rewritten as a static function. Do not return any error. ha_innobase::create(): When trx!=nullptr and we are operating on a persistent table, do not rollback, commit, or release the data dictionary latch. ha_innobase::truncate(): Protect the entire critical section with an exclusive dict_sys.latch, so that ha_innobase::referenced_by_foreign_key() on referenced tables will return a consistent result. In case of a failure, invoke dict_load_foreigns() to restore also any FOREIGN KEY constraints. ha_innobase::free_foreign_key_create_info(): Define inline. lock_release(): Disregard innodb_evict_tables_on_commit_debug=ON when dict_sys.locked() holds. It would hold when fts_load_stopword() is invoked by create_table_info_t::create_table_update_dict(). dict_sys_t::locked(): Return whether the current thread is holding the exclusive dict_sys.latch. dict_sys_t::frozen_not_locked(): Return whether any thread is holding a shared dict_sys.latch. In the test main.mysql_upgrade, the InnoDB persistent statistics will no longer be recalculated in ha_innobase::open() as part of CHECK TABLE ... FOR UPGRADE. They were deleted earlier in the test. Tested by: Matthias Leich
-
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.
-
Thirunarayanan Balathandayuthapani authored
- During alter operation of compressed table, page split operation chooses the first record of the page as split record and it leads to empty left page. This issue caused by the commit 77b3959b (MDEV-28457). page_rec_is_second(), page_rec_is_second_last(): Removed the functions since it is a deadcode.
-
Thirunarayanan Balathandayuthapani authored
MDEV-29853 Assertion `!strstr(table->name.m_name, "/FTS_") || purge_sys.must_wait_FTS()' failed in trx_t::commit - Failing debug assertion is to indicate whether the purge thread is waiting when fts auxilary table is being dropped. But assertion fails if the table name contains FTS_. So in fts_drop_table(), InnoDB sets the auxilary table flag in transaction modified table list.
-
Thirunarayanan Balathandayuthapani authored
- InnoDB information schema query access the tablespace name after getting freed by concurrent rename operation. To avoid this, InnoDB should take exclusive tablespace latch during rename operation and I_S query should take shared tablespace latch before accessing the name
-
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.
-