- 23 Jul, 2020 1 commit
-
-
Marko Mäkelä authored
Starting with MDEV-17441 we would no longer have os_once, and we would always initialize zip_pad_info_t::mutex and dict_table_t::autoinc_mutex, even for tables are not in ROW_FORMAT=COMPRESSED nor include any AUTO_INCREMENT column. mutex_free() on those unnecessary objects would make shutdown very slow compared to older versions. Let us use std::mutex for those two mutexes, to reduce the overhead. The critical sections protected by these mutexes is very small, and therefore contention or the need for any instrumentation should be unlikely.
-
- 22 Jul, 2020 3 commits
-
-
Oleksandr Byelkin authored
If there is no current_select and variable is not found among SP variables it can be only an error.
-
Thirunarayanan Balathandayuthapani authored
InnoDB should replace FSP_FLAGS_HAS_PAGE_COMPRESSION check with fil_space_t::is_compressed(). fil_space_t::is_compressed() checks for both non full crc32 and crc32 format.
-
Jan Lindström authored
-
- 21 Jul, 2020 4 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
trx_update_mod_tables_timestamp(): When implementing innodb_evict_tables_on_commit_debug, do not evict tables on which transactional locks exist. This debug variable was broken since its introduction in commit 947b0b57.
-
Monty authored
Problem was that the code didn't handle a transaction created in innodb as part of a failed mysql_lock_tables()
-
Monty authored
The issue was: T1, a parallel slave worker thread, is waiting for another worker thread to commit. While waiting, it has the MDL_BACKUP_COMMIT lock. T2, working for mariabackup, is doing BACKUP STAGE BLOCK_COMMIT and blocks all commits. This causes a deadlock as the thread T1 is waiting for can't commit. Fixed by moving locking of MDL_BACKUP_COMMIT from ha_commit_trans() to commit_one_phase_2() Other things: - Added a new argument to ha_comit_one_phase() to signal if the transaction was a write transaction. - Ensured that ha_maria::implicit_commit() is always called under MDL_BACKUP_COMMIT. This code is not needed in 10.5 - Ensure that MDL_Request values 'type' and 'ticket' are always initialized. This makes it easier to check the state of the MDL_Request. - Moved thd->store_globals() earlier in handle_rpl_parallel_thread() as thd->init_for_queries() could use a MDL that could crash if store_globals where not called. - Don't call ha_enable_transactions() in THD::init_for_queries() as this is both slow (uses MDL locks) and not needed.
-
- 20 Jul, 2020 10 commits
-
-
Eugene Kosov authored
MDEV-22899 Assertion `field->col->is_binary() || field->prefix_len % field->col->mbmaxlen == 0' failed in dict_index_add_to_cache is_part_of_a_key(): detect is TEXT field is a part of some key ha_innobase::can_convert_blob(): now correctly detect whether our blob is a part of some key. Previously the check didn't work in some cases.
-
Aleksey Midenkov authored
Fix stale virtual field value in 4 cases: when virtual field depends on row_start/row_end in timestamp/trx_id versioned table. row_start dep is recalculated in vers_update_fields() (SQL and InnoDB layer). row_end dep is recalculated on history row insert.
-
Aleksey Midenkov authored
MDEV-22061 InnoDB: Assertion of missing row in sec index row_start upon REPLACE on a system-versioned table make_versioned_helper() appended new update field unconditionally while it should check if this field already exists in update vector. Misc renames to conform versioning prefix. vers_update_fields() name conforms with sql layer TABLE::vers_update_fields().
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
When InnoDB is extending a data file, it is updating the FSP_SIZE field in the first page of the data file. In commit 8451e090 (MDEV-11556) we removed a work-around for this bug and made recovery stricter, by making it track changes to FSP_SIZE via redo log records, and extend the data files before any changes are being applied to them. It turns out that the function fsp_fill_free_list() is not crash-safe with respect to this when it is initializing the change buffer bitmap page (page 1, or generally, N*innodb_page_size+1). It uses a separate mini-transaction that is committed (and will be written to the redo log file) before the mini-transaction that actually extended the data file. Hence, recovery can observe a reference to a page that is beyond the current end of the data file. fsp_fill_free_list(): Initialize the change buffer bitmap page in the same mini-transaction. The rest of the changes are fixing a bug that the use of the separate mini-transaction was attempting to work around. Namely, we must ensure that no other thread will access the change buffer bitmap page before our mini-transaction has been committed and all page latches have been released. That is, for read-ahead as well as neighbour flushing, we must avoid accessing pages that might not yet be durably part of the tablespace. fil_space_t::committed_size: The size of the tablespace as persisted by mtr_commit(). fil_space_t::max_page_number_for_io(): Limit the highest page number for I/O batches to committed_size. MTR_MEMO_SPACE_X_LOCK: Replaces MTR_MEMO_X_LOCK for fil_space_t::latch. mtr_x_space_lock(): Replaces mtr_x_lock() for fil_space_t::latch. mtr_memo_slot_release_func(): When releasing MTR_MEMO_SPACE_X_LOCK, copy space->size to space->committed_size. In this way, read-ahead or flushing will never be invoked on pages that do not yet exist according to FSP_SIZE.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
commit 854c219a (MDEV-17301) broke a constraint: Fixed-length columns cannot be extended in InnoDB without rebuilding the table. ha_innobase::can_convert_string(): Correct the condition. We must not allow any instantaneous change to the length of CHAR columns measured in characters. For any format other than ROW_FORMAT=REDUNDANT, we can allow the length in bytes to be extended if mbminlen<mbmaxlen held before the change of the character set.
-
- 18 Jul, 2020 1 commit
-
-
Varun Gupta authored
-
- 17 Jul, 2020 1 commit
-
-
Alexey Botchkov authored
m_file[0] not always is a good sample.
-
- 16 Jul, 2020 8 commits
-
-
Julius Goryavsky authored
-
Julius Goryavsky authored
-
Julius Goryavsky authored
-
Julius Goryavsky authored
Server auto-sets lower_case_file_system value based on default datadir's behavior instead of instead of using the directory specified by the user through the configuration file or command line options. This patch fixes this problem.
-
Julius Goryavsky authored
Server auto-sets lower_case_file_system value based on default datadir's behavior instead of instead of using the directory specified by the user through the configuration file or command line options. This patch fixes this problem.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
In commit 0f90728b (MDEV-16809) we introduced the configuration option innodb_log_optimize_ddl for controlling whether native index creation or table-rebuild in InnoDB should avoid writing full redo log. Fungo Wang reported that this option is causing occasional failures. The reason is that pages may be written to data files in an inconsistent state. Applying log records to such inconsistent pages may fail. The solution is to always invoke PageBulk::finish() before page latches may be released, to ensure that the page contents is in a consistent state. Something similar was implemented in MySQL 8.0.13: mysql/mysql-server@d1254b947354e0f5b7223b09c521bd85f22e1e31 buf_block_t::skip_flush_check: Remove. Suppressing consistency checks is a bad idea. PageBulk::needs_finish(): New predicate: Determine whether PageBulk::finish() must fix up the page. PageBulk::init(): Clear PAGE_DIRECTION to ensure that needs_finish() will hold. We change the field from PAGE_NO_DIRECTION to 0 and back without writing redo log. This trick avoids the need to introduce any new data member to PageBulk. PageBulk::insert(): Replace some high-level accessors to bypass debug assertions related to PAGE_HEAP_TOP that we will be violating until finish() has been executed. PageBulk::finish(): Tolerate m_rec_no==0. We must invoke this also on an empty page, to ensure that PAGE_HEAP_TOP is initialized. PageBulk::commit(): Always invoke finish(). PageBulk::release(), BtrBulk::pageSplit(), BtrBulk::storeExt(), BtrBulk::finish(): Invoke PageBulk::finish().
-
- 15 Jul, 2020 7 commits
-
-
Marko Mäkelä authored
page_simple_validate_old(), page_simple_validate_new(): Require PAGE_N_DIR_SLOTS to be at least 2.
-
Marko Mäkelä authored
MDEV-22721 (commit eba2d10a) inadvertently introduced an infinite loop. page_validate(): Remove the infinite loop.
-
Vladislav Vaintroub authored
-
Marko Mäkelä authored
In fsp_path_to_space_name(), we would access a byte right before the start of the string, tripping AddressSanitizer. This reverts commit d87006a1 and commit a7634281.
-
Marko Mäkelä authored
-
Daniel Black authored
-Wl,-z,relro,-z,now are linker flags and should be checked as such. TODO: perform module, exe shared checks separately rather than a pure linker check.
-
Varun Gupta authored
An oveflow was happening on windows because on Windows sizeof(ulong) is 4 bytes while it is 8 bytes on Linux. Switched avg_frequency and avg length for column statistics to ulonglong. Switched avg_frequency for index statistics to ulonglong.
-
- 14 Jul, 2020 5 commits
-
-
Marko Mäkelä authored
-
Eugene Kosov authored
-
Eugene Kosov authored
This version is not optimized yet. It could have bugs because I didn't check it with unit tests. Also, std::char_traits are not really supported. So, now it's not possible to create f.ex. a case insensitive string_view. fil_path_to_space_name(): renamed, moved to another file and refactored to use string_view
-
Marko Mäkelä authored
The only InnoDB change between MySQL 5.7.30 and MySQL 5.7.31 that is applicable to MariaDB Server was applied in commit 8d061996 (MDEV-23161).
-
Marko Mäkelä authored
-