An error occurred fetching the project authors.
- 23 May, 2019 2 commits
-
-
Marko Mäkelä authored
The option innodb_rollback_segments was deprecated already in MariaDB Server 10.0. Its misleadingly named replacement innodb_undo_logs is of very limited use. It makes sense to always create and use the maximum number of rollback segments. Let us remove the deprecated parameter innodb_rollback_segments and deprecate&ignore the parameter innodb_undo_logs (to be removed in a later major release). This work involves some cleanup of InnoDB startup. Similar to other write operations, DROP TABLE will no longer be allowed if innodb_force_recovery is set to a value larger than 3.
-
Marko Mäkelä authored
The transaction isolation levels READ COMMITTED and READ UNCOMMITTED should behave similarly to the old deprecated setting innodb_locks_unsafe_for_binlog=1, that is, avoid acquiring gap locks. row_search_mvcc(): Reduce the scope of some variables, and clean up the initialization and use of the variable set_also_gap_locks.
-
- 17 May, 2019 1 commit
-
-
Marko Mäkelä authored
dict_sys.lock(), dict_sys_lock(): Acquire both mutex and latch. dict_sys.unlock(), dict_sys_unlock(): Release both mutex and latch. dict_sys.assert_locked(): Assert that both mutex and latch are held.
-
- 13 May, 2019 1 commit
-
-
Marko Mäkelä authored
In MySQL 5.7.8 an extra level of pointer indirection was added to dict_operation_lock and some other rw_lock_t without solid justification, in mysql/mysql-server@52720f1772f9f424bf3dd62fa9c214dd608cd036. Let us revert that change and remove the rather useless rw_lock_t constructor and destructor and the magic_n field. In this way, some unnecessary pointer dereferences and heap allocation will be avoided and debugging might be a little easier.
-
- 11 May, 2019 1 commit
-
-
Vicențiu Ciorbaru authored
-
- 03 May, 2019 1 commit
-
-
Marko Mäkelä authored
log_checkpoint(), log_make_checkpoint_at(): Remove the parameter write_always. It seems that the primary purpose of this parameter was to ensure in the function recv_reset_logs() that both checkpoint header pages will be overwritten, when the function is called from the never-enabled function recv_recovery_from_archive_start(). create_log_files(): Merge recv_reset_logs() to its only caller. Debug instrumentation: Prefer to flush the redo log, instead of triggering a redo log checkpoint. page_header_set_field(): Disable a debug assertion that will always fail due to MDEV-19344, now that we no longer initiate a redo log checkpoint before an injected crash. In recv_reset_logs() there used to be two calls to log_make_checkpoint_at(). The apparent purpose of this was to ensure that both InnoDB redo log checkpoint header pages will be initialized or overwritten. The second call was removed (without any explanation) in MySQL 5.6.3: mysql/mysql-server@4ca37968da54ddc6b3b6628f41428ddba1c79bb8 In MySQL 5.6.8 WL#6494, starting with mysql/mysql-server@00a0ba8ad92569fcf08212b3b8cf046dc8a0ce10 the function recv_reset_logs() was not only invoked during InnoDB data file initialization, but also during a regular startup when the redo log is being resized. mysql/mysql-server@45e91679832219e2593c77185342f11f85232b58 in MySQL 5.7.2 removed the UNIV_LOG_ARCHIVE code, but still did not remove the parameter write_always.
-
- 25 Apr, 2019 1 commit
-
-
Marko Mäkelä authored
Normally, the InnoDB master thread executes InnoDB log checkpoints so frequently that bugs in crash recovery or redo logging can be hard to reproduce. This is because crash recovery would start replaying the log only from the latest checkpoint. Because the InnoDB redo log format only allows saving information for at most 2 latest checkpoints, and because the log files are written in a circular fashion, it would be challenging to implement a debug option that would start the redo log apply from the very start of the redo log file.
-
- 07 Feb, 2019 1 commit
-
-
Marko Mäkelä authored
MySQL 5.7 introduced the class page_size_t and increased the size of buffer pool page descriptors by introducing this object to them. Maybe the intention of this exercise was to prepare for a future where the buffer pool could accommodate multiple page sizes. But that future never arrived, not even in MySQL 8.0. It is much easier to manage a pool of a single page size, and typically all storage devices of an InnoDB instance benefit from using the same page size. Let us remove page_size_t from MariaDB Server. This will make it easier to remove support for ROW_FORMAT=COMPRESSED (or make it a compile-time option) in the future, just by removing various occurrences of zip_size.
-
- 23 Jan, 2019 2 commits
-
-
Marko Mäkelä authored
dict_sys_get_size(): Replace the time-consuming loop with a crude estimate that can be computed without holding any mutex. Even before dict_sys->size was removed in MDEV-13325, not all memory allocations by the InnoDB data dictionary cache were being accounted for. One example is foreign key constraints. Another example is virtual column metadata, starting with 10.2.
-
Brave Galera Crew authored
-
- 09 Jan, 2019 1 commit
-
-
Sergey Vojtovich authored
Simplified mutex code. MutexDebug uses OSMutex instead of atomic operations now.
-
- 01 Jan, 2019 2 commits
-
-
Marko Mäkelä authored
-
Michael Widenius authored
-
- 29 Dec, 2018 1 commit
-
-
Sergey Vojtovich authored
srv_sys_t::n_threads_active transition to Atomic_counter.
-
- 28 Dec, 2018 1 commit
-
-
Sergey Vojtovich authored
Simplified worker threads completion waiting, made it use std::atomic.
-
- 27 Dec, 2018 5 commits
-
-
Sergey Vojtovich authored
purge_sys_t::m_paused transition to Atomic_counter. paused_latched() doesn't make much sense: in this particular case it is as fast as atomic load. The sole caller has to reload it's value anyway, due to rw_lock_x_lock(&purge_sys.latch) issuing acquire memory barrier.
-
Sergey Vojtovich authored
trx_sys_t::rseg_history_len transition to Atomic_counter.
-
Sergey Vojtovich authored
os_total_large_mem_allocated transition to Atomic_counter.
-
Sergey Vojtovich authored
Trivial srv_running transition.
-
Marko Mäkelä authored
Now that InnoDB startup drops tables whose name starts with #sql, the table ID alone should be enough to create a unique table name. dict_temp_file_num, dict_mem_init(): Remove. dict_mem_create_temporary_tablename(): Use a combination of "#sql-ib" and the ID of the table that is being rebuilt in TRUNCATE TABLE, or discarded in the commit of table-rebuilding ALTER TABLE...ALGORITHM=INPLACE, or deferred to the DROP queue. Thanks to Sergey Vojtovich for pointing this out.
-
- 27 Nov, 2018 1 commit
-
-
Marko Mäkelä authored
-
- 19 Nov, 2018 1 commit
-
-
Marko Mäkelä authored
-
- 11 Oct, 2018 2 commits
-
-
Marko Mäkelä authored
Rename the 10.2-specific configuration option innodb_unsafe_truncate to innodb_safe_truncate, and invert its value. The default (for now) is innodb_safe_truncate=OFF, to avoid disrupting users with an undo and redo log format change within a Generally Available (GA) release series.
-
Marko Mäkelä authored
While MariaDB Server 10.2 is not really guaranteed to be compatible with Percona XtraBackup 2.4 (for example, the MySQL 5.7 undo log format change that could be present in XtraBackup, but was reverted from MariaDB in MDEV-12289), we do not want to disrupt users who have deployed xtrabackup and MariaDB Server 10.2 in their environments. With this change, MariaDB 10.2 will continue to use the backup-unsafe TRUNCATE TABLE code, so that neither the undo log nor the redo log formats will change in an incompatible way. Undo tablespace truncation will keep using the redo log only. Recovery or backup with old code will fail to shrink the undo tablespace files, but the contents will be recovered just fine. In the MariaDB Server 10.2 series only, we introduce the configuration parameter innodb_unsafe_truncate and make it ON by default. To allow MariaDB Backup (mariabackup) to work properly with TRUNCATE TABLE operations, use loose_innodb_unsafe_truncate=OFF. MariaDB Server 10.3.10 and later releases will always use the backup-safe TRUNCATE TABLE, and this parameter will not be added there. recv_recovery_rollback_active(): Skip row_mysql_drop_garbage_tables() unless innodb_unsafe_truncate=OFF. It is too unsafe to drop orphan tables if RENAME operations are not transactional within InnoDB. LOG_HEADER_FORMAT_10_3: Replaces LOG_HEADER_FORMAT_CURRENT. log_init(), log_group_file_header_flush(), srv_prepare_to_delete_redo_log_files(), innobase_start_or_create_for_mysql(): Choose the redo log format and subformat based on the value of innodb_unsafe_truncate.
-
- 30 Sep, 2018 1 commit
-
-
Marko Mäkelä authored
-
- 11 Sep, 2018 1 commit
-
-
Marko Mäkelä authored
Stop supporting the additional *trunc.log files that were introduced via MySQL 5.7 to MariaDB Server 10.2 and 10.3. DB_TABLESPACE_TRUNCATED: Remove. purge_sys.truncate: A new structure to track undo tablespace file truncation. srv_start(): Remove the call to buf_pool_invalidate(). It is no longer necessary, given that we no longer access things in ways that violate the ARIES protocol. This call was originally added for innodb_file_format, and it may later have been necessary for the proper function of the MySQL 5.7 TRUNCATE recovery, which we are now removing. trx_purge_cleanse_purge_queue(): Take the undo tablespace as a parameter. trx_purge_truncate_history(): Rewrite everything mostly in a single function, replacing references to undo::Truncate. recv_apply_hashed_log_recs(): If any redo log is to be applied, and if the log_sys.log.subformat indicates that separately logged truncate may have been used, refuse to proceed except if innodb_force_recovery is set. We will still refuse crash-upgrade if TRUNCATE TABLE was logged. Undo tablespace truncation would only be logged in undo*trunc.log files, which we are no longer checking for.
-
- 07 Sep, 2018 1 commit
-
-
Marko Mäkelä authored
-
- 21 Aug, 2018 1 commit
-
-
Marko Mäkelä authored
buf_dump(): Only generate the output when shutdown is in progress. log_write_up_to(): Only generate the output before actually writing to the redo log files. srv_purge_should_exit(): Rate-limit the output, and instead of displaying the work done, indicate the work that remains to be done until the completion of the slow shutdown.
-
- 28 May, 2018 1 commit
-
-
Marko Mäkelä authored
MDEV-9931 introduced a counter for keeping track of reads of the first page of InnoDB data files, because the original implementation of data-at-rest-encryption for InnoDB introduced new code paths for reading the pages. Ultimately, the extra reads of the first page were removed, and the encryption subsystem will be initialized whenever we first read the first page of each data file, in fil_node_open_file(). It should not be that interesting to observe how many times an InnoDB data file was opened for the first time.
-
- 24 May, 2018 1 commit
-
-
Marko Mäkelä authored
thd_destructor_proxy(): Ensure that purge actually exits, like the logic should have been ever since MDEV-14080. srv_purge_shutdown(): A new function to wait for the purge coordinator to exit. Before exiting, the purge coordinator will ensure that all purge workers have exited.
-
- 16 May, 2018 1 commit
-
-
Marko Mäkelä authored
srv_purge_coordinator_thread(): Wait for all purge worker threads to actually exit. An analysis of a core dump of a hung 10.3 server revealed that one srv_worker_thread did not exit, even though the purge coordinator had exited. This caused kill_server_thread and mysqld_main to wait indefinitely. The main InnoDB shutdown was never called, because unireg_end() was never called.
-
- 15 May, 2018 1 commit
-
-
Marko Mäkelä authored
Thanks to Sergey Vojtovich for feedback and many ideas. purge_state_t: Remove. The states are replaced with purge_sys_t::enabled() and purge_sys_t::paused() as follows: PURGE_STATE_INIT, PURGE_STATE_EXIT, PURGE_STATE_DISABLED: !enabled(). PURGE_STATE_RUN, PURGE_STATE_STOP: paused() distinguishes these. purge_sys_t::m_paused: Renamed from purge_sys_t::n_stop. Protected by atomic memory access only, not purge_sys_t::latch. purge_sys_t::m_enabled: An atomically updated Boolean that replaces purge_sys_t::state. purge_sys_t::running: Remove, because it duplicates srv_sys.n_threads_active[SRV_PURGE]. purge_sys_t::running(): Accessor for srv_sys.n_threads_active[SRV_PURGE]. purge_sys_t::stop(): Renamed from trx_purge_stop(). purge_sys_t::resume(): Renamed from trx_purge_run(). Do not acquire latch; solely rely on atomics. purge_sys_t::is_initialised(), purge_sys_t::m_initialised: Remove. purge_sys_t::create(), purge_sys_t::close(): Instead of invoking is_initialised(), check whether event is NULL. purge_sys_t::event: Move before latch, so that fields that are protected by latch can reside on the same cache line with latch. srv_start_wait_for_purge_to_start(): Merge to the only caller srv_start().
-
- 14 May, 2018 1 commit
-
-
Marko Mäkelä authored
trx_purge_stop(): Release purge_sys->latch before attempting to wake up the purge threads, so that they can actually wake up. This is a regression of commit a13a636c which attempted to fix MDEV-11802 by ensuring that srv_purge_wakeup() will actually wait until all purge threads wake up. Due to the purge_sys->latch, the threads might never wake up, because some purge threads could end up waiting for purge_sys->latch in trx_undo_prev_version_build() while holding dict_operation_lock in shared mode. This in turn would block any DDL operations, the InnoDB master thread, and InnoDB shutdown.
-
- 09 May, 2018 1 commit
-
-
Thirunarayanan Balathandayuthapani authored
Problem: ======= InnoDB master thread encounters the shutdown state as SRV_SHUTDOWN_FLUSH_PHASE when innodb_force_recovery >=2 and slow scheduling of master thread during shutdown. Fix: ==== There is no need for master thread itself if innodb_force_recovery >=2. Don't create the master thread if innodb_force_recovery >= 2
-
- 01 May, 2018 1 commit
-
-
Marko Mäkelä authored
Remove unused InnoDB function parameters and functions. i_s_sys_virtual_fill_table(): Do not allocate heap memory. mtr_is_block_fix(): Replace with mtr_memo_contains(). mtr_is_page_fix(): Replace with mtr_memo_contains_page().
-
- 30 Apr, 2018 1 commit
-
-
Marko Mäkelä authored
Implement innodb_flush_method as an enum parameter in Mariabackup, instead of ignoring the option and hard-wiring it to a default value. xb0xb.h: Remove. Only xtrabackup.cc refers to the enum parameters. innodb_flush_method_names[], innodb_flush_method_typelib[]: Define as non-static, so that mariabackup can share the definitions. srv_file_flush_method: Change the type to ulong, to match the assignment in init_one_value() and handle_options() in mariabackup.
-
- 29 Apr, 2018 1 commit
-
-
Marko Mäkelä authored
Bind more InnoDB parameters directly to MYSQL_SYSVAR and remove "shadow variables". innodb_change_buffering: Declare as ENUM, not STRING. innodb_flush_method: Declare as ENUM, not STRING. innodb_log_buffer_size: Bind directly to srv_log_buffer_size, without rounding it to a multiple of innodb_page_size. LOG_BUFFER_SIZE: Remove. SysTablespace::normalize_size(): Renamed from normalize(). innodb_init_params(): A new function to initialize and validate InnoDB startup parameters. innodb_init(): Renamed from innobase_init(). Invoke innodb_init_params() before actually trying to start up InnoDB. srv_start(bool): Renamed from innobase_start_or_create_for_mysql(). Added the input parameter create_new_db. SRV_ALL_O_DIRECT_FSYNC: Define only for _WIN32. xb_normalize_init_values(): Merge to innodb_init_param().
-
- 28 Apr, 2018 3 commits
-
-
Marko Mäkelä authored
Instead, shift by srv_page_size_shift.
-
Marko Mäkelä authored
Try to use one variable (srv_page_size) for innodb_page_size. Also, replace UNIV_PAGE_SIZE_SHIFT with srv_page_size_shift.
-
Marko Mäkelä authored
Change innodb_buffer_pool_size, innodb_fill_factor to unsigned.
-