- 20 Jul, 2020 7 commits
-
-
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 14 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
-
Marko Mäkelä authored
The only InnoDB changes between Percona XtraDB Server 5.6.47-87.0 and 5.6.48-88.0 are related to InnoDB changes between MySQL 5.6.47 and MySQL 5.6.48, which we had already applied.
-
Marko Mäkelä authored
There were no InnoDB changes between MySQL 5.6.48 and MySQL 5.6.49.
-
Marko Mäkelä authored
This issue was originally reported by Fungo Wang, along with a fix, as MySQL Bug #98990. His suggested fix was applied as part of mysql/mysql-server@a003fc373d1adb3ccea353b5d7d83f6c4c552383 and released in MySQL 5.7.31. i_s_metrics_fill(): Add the missing call to Field::set_notnull(), and simplify some code.
-
Eugene Kosov authored
-
Thirunarayanan Balathandayuthapani authored
- i_s_fts_index_cache_fill() should take shared lock of fts cache before accessing index cache to avoid reading stale data.
-
-
Thirunarayanan Balathandayuthapani authored
- Problem is that test case creates iblogfile* files. So existing ibdata pages could point to future LSN. Fix is that taking the backup of data before iblogfile* creation and apply it before exiting the test case.
-
-
Thirunarayanan Balathandayuthapani authored
MDEV-22890 DEADLOCK of threads detected: row0sel.cc S-LOCK / btr0cur.cc S-LOCK / row0quiesce.cc X-LOCK Problem: ======= - Read operations are always allowed to hold a secondary index leaf latch and then look up the corresponding clustered index record. Flush table operation acquires secondary index latch while holding a clustered index latch. It leads to deadlock violation. Fix: ==== - Flush table operation should acquire secondary index before taking clustered index to avoid deadlock violation with select operation.
-
- 13 Jul, 2020 2 commits
-
-
Vicențiu Ciorbaru authored
Only install wsrep scripts and links if WSREP_ON is actually set
-
Varun Gupta authored
MDEV-22463: Element_type &Bounds_checked_array<Item *>::operator[](size_t) [Element_type = Item *]: Assertion `n < m_size' failed. Allocate space for fields inside the window function (arguments, PARTITION BY and ORDER BY clause) in the ref pointer array. All fields inside the window function are part of the temporary table that is required for the window function computation.
-