- 16 Jul, 2020 4 commits
-
-
Marko Mäkelä authored
-
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 9 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.
-
Daniel Black authored
Linux glibc has deprecated ftime resutlting in a compile error on Fedora-32. Per manual clock_gettime is the suggested replacement. Because my_timer_milliseconds is a relative time used by largely the perfomrance schema, CLOCK_MONOTONIC_COARSE is used. This has been available since Linux-2.6.32. The low overhead is shows in the unittest: $ unittest/mysys/my_rdtsc-t 1..11 # ----- Routine --------------- # myt.cycles.routine : 5 # myt.nanoseconds.routine : 11 # myt.microseconds.routine : 13 # myt.milliseconds.routine : 18 # myt.ticks.routine : 17 # ----- Frequency ------------- # myt.cycles.frequency : 3596597014 # myt.nanoseconds.frequency : 1000000000 # myt.microseconds.frequency : 1000000 # myt.milliseconds.frequency : 1039 # myt.ticks.frequency : 103 # ----- Resolution ------------ # myt.cycles.resolution : 1 # myt.nanoseconds.resolution : 1 # myt.microseconds.resolution : 1 # myt.milliseconds.resolution : 1 # myt.ticks.resolution : 1 # ----- Overhead -------------- # myt.cycles.overhead : 118 # myt.nanoseconds.overhead : 234 # myt.microseconds.overhead : 222 # myt.milliseconds.overhead : 30 # myt.ticks.overhead : 4946 ok 1 - my_timer_init() did not crash ok 2 - The cycle timer is strictly increasing ok 3 - The cycle timer is implemented ok 4 - The nanosecond timer is increasing ok 5 - The nanosecond timer is implemented ok 6 - The microsecond timer is increasing ok 7 - The microsecond timer is implemented ok 8 - The millisecond timer is increasing ok 9 - The millisecond timer is implemented ok 10 - The tick timer is increasing ok 11 - The tick timer is implemented
-
Marko Mäkelä authored
-
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
-
Alexander Barkov authored
Avoid character set conversion for numeric data in this scenario: SET NAMES utf8; CREATE OR REPLACE TABLE t1 (a INT); INSERT INTO t1 VALUES (1); SELECT a FROM t1;
-
Alexander Barkov authored
- Renaming this virtual method store() to store_str(): store(const char *str, size_t length, CHARSET_INFO *src_cs, CHARSET_INFO *dst_cs) We'll be adding more variants of store*() soon. This change will help to avoid ambiguities during overloading. - Adding a helper method store_ident(). - Renaming store_str(const LEX_CSTRING &s...) to store_lex_cstring(), to avoid ambiguties during overloading. - Adding a helper method store() for backward compatibility, to avoid a lot of changes in the code now. But eventually we should replace store() to non-ambiguius methods store_str() or store_ident(). - Adding a helper method Protocol::needs_conversion() and reusing it in two places.
-
- 14 Jul, 2020 15 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
We must prevent InnoDB purge from acquiring MDL on the tables. Since MDEV-12288, INSERT is generating work for purge.
-
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 9 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.
-
Alexander Barkov authored
-
Alexander Barkov authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
buf_pool_t::page_hash_table::create(): Use aligned_malloc() for the hash array, to get the page_hash_latch aligned on the same L1 data cache line as the data that it is protecting.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This form of corruption was only reproduced on MariaDB 10.5.4 after the MDEV-22867 fix was applied in commit 43120009. While we do not know how to reproduce this corruption in MariaDB 10.4, we are applying the code fix without a test case. btr_cur_pessimistic_update(): Invoke btr_set_instant() if needed.
-
- 12 Jul, 2020 1 commit
-
-
Rucha Deodhar authored
MDEV-22058: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status Error state is not stored in check_and_do_in_subquery_rewrites() when there is illegal combination of optimizer switches. So all the functions eventually return false. Thus the assetion failure.
-
- 11 Jul, 2020 2 commits
-
-
Roman Nozdrin authored
-
Eugene Kosov authored
-