Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PS-5363 (Merge MySQL 8.0.17): Merging mysql-8.0.17
https://jira.percona.com/browse/PS-5363 - Mark keyring_vault pluging as PLUGIN_OPT_ALLOW_EARLY, as the keyring plugins should be after WL#12935 [6]. - Revert our fix for PS-5126 due to upstream fix for bug 93544 (3bb6832, 68e1a95). - Reconcile our fix for PS-5485 with upstream fix for bug 64665 [2] by removing undo-specific checks in i_s_dict_fill_innodb_tablespaces so that the upstream fix handles them, and reverting our additions to innodb.innodb_undo_basic test due to slightly different fix behavior. - Revert our fix PS-5221 due to upstream fix for bug 93708. Note that upstream reported performance regression caused by using std::chrono library. Thus, replaced the parts of our fix that are not touched by upstream (i.e. LRU manager sleeps and "failure to get a free page" printouts) with ut_time_monotonic_ms too. Part of the fix [3] removes ut_usectime/ut_time_us, thus replace them with ut_time_monotonic_ms/ut_time_monotonic_us too in other our patches. At the same time use ut_time_monotonic_us_t type as appropriate. - Resolve interaction between our fix for PS-1689 / bug 72466 and os_event changes in upstream [3]. The upstream introduced a condition variable attribute that must be initialized before any condition variable. And our patch forced some of the mutex events to be created at startup time. The combination of these changes suffers from C++ initialization order fiasco. Observe that startup-time created mutexes are still unusable and that subsequent mutex_create does placement new, which constructs them again. Thus fix by avoiding the startup-time construction but keep the static memory allocation for them by introducing a new type ib_uninitialized_mutex_t, which holds memory for the mutex and later becomes ib_mutex_t. Convert all global and static variable InnoDB mutexes to ib_uninitialized_mutex_t. As a consequence, since mutex_own macro was converted to an inline function, fix upstream bug 96401 (No-op mutex_own calls instead of ut_ad(mutex_own)). - Convert LRU manager and redo log tracking thread to use the new InnoDB background thread framework [5]. - Replace alloc_root calls with MEM_ROOT::Alloc in accordance with upstream [1]. - Replace some uses of uint64 with uint64_t due to upstream migrating towards the same. - Replace trx_sys_update_mysql_binlog_position call with trx_sys_write_binlog_position due to upstream [4]. - Restore ReadView::up_limit_id() method, which was removed by [4], because it is used by our INFORMATION_SCHEMA.XTRADB_READ_VIEW table. - Update TravisCI and CircleCI configs to use clang-format version 8 instead of 5 due to upstream [7]. - Renamed rocksdb.foo and tokudb.foo MTR suites to rocksdb_foo and tokudb_foo due to stricter MTR checking which points out that dots are not allowed inside suite names. - Cleanup MTR disabled.def to remove missing tests and to fix up suites of disabled and then moved tests. This has been caused by stricted disabled.def validation by the upstream. [1]: commit 5001463 Author: Steinar H. Gunderson <[email protected]> Date: Mon Feb 11 16:14:21 2019 +0100 Bug #26781567: REMOVE C LEGACY [noclose] Remove all uses of the obsolete wrappers init_alloc() and sql_alloc(). This is done 99% mechanically, with Perl and clang-format; there was one case in opt_range.cc that required manual intervention (a ternary expression used for the MEM_ROOT), and of course the removals themselves. Change-Id: Iaa11deadbded0253a6b5e0dd3a417c650a4692fa [2]: commit ab2817b Author: Mayank Prasad <[email protected]> Date: Mon Apr 22 12:43:17 2019 +0530 Bug#29492911 : ENABLING UNDO-TABLESPACE ENCRYPTION DOESN'T MARK TABLESPACE ENCRYPTION FLAG Issue: - Encryption information displayed in INFORMATION_SCHEMA.INNODB_TABLESPACES is being picked from DD metadata. - Change in encryption of UNDO Tablespaces is governed by server variable innodb_undo_log_encryption instead of a DDL. - Thus this DD metadata is not changed when UNDO encryption (server variable) is changed. - Thus changes of UNDO tablespace encryption is not updated in INFORMATION_SHCEMA.INNODB_TABLESPACES. Fix: - A complete fix would be to alter UNDO Tablespace Encryption using a DDL. Once that is done, DD metadata will be updated and Encryption information in INNODB_TABLESPACES will also be reflected correctly. - This patch if a workaroung fix. - As of now, UNDO Tablespace Encryption is governed by srv_undo_log_encrypt global variable. So while populating INFORMATION_SCHEMA.INNODB_TABLESPACES for UNDO Tablespace Encryption information, set it according to srv_undo_log_encrypt. Reviewed by : Kevin Lewis <[email protected]> RB : 21933 [3]: commit 0fddbfa Author: Pawe<C5><82> Olchawa <[email protected]> Date: Wed Mar 27 04:36:41 2019 +0100 BUG#29138644 PAGE CLEANER WILL SLEEP FOR LONG TIME IF CLOCK CHANGES 1. We use pthread_condattr_setclock() to configure CLOCK_MONOTONIC as a clock used in pthread_cond_timedwait (in os_event). 2. We check if we succeeded to setup the CLOCK_MONOTONIC and fallback to the old way if we failed (emitting a warning). 3. We rely on clock_gettime() in the os_event::wait_time_low() if we succeeded to setup the CLOCK_MONOTONIC. 4. Usages of functions that return seconds/milliseconds/microseconds since epoch, became replaced with usages of functions that return monotonic number of seconds/ms/us since epoch. These new functions are based on usage of std::chrono::steady_clock. There are still some usages of ut_time (returns system time) in cases where the time is exposed to the user (e.g. when trx was started). I left them as they were. Keep in mind that some OS could still have their own minor issues with the CLOCK_MONOTONIC, in which case you might want to update the OS. If one day, we switched from direct usages of pthread_cond to usages of std::condition_variable (in os_event), we could then delete all usages of the clock_gettime. That's why I put that code very close to os_event. There are no other usages. What's more, because of that I could remove implementation of the my_gettimeofday for Windows. RB: 21796 [4]: commit 1efd16d Author: Debarun Banerjee <[email protected]> Date: Fri May 17 18:11:07 2019 +0530 Backport 8.0 wl#11636 InnoDB: Clone Remote provisioning RB 21407 Reviewed-by: Pawel Olchawa <[email protected]> Annamalai Gurusami <[email protected]> Backport 8.0 wl#9211 InnoDB: Clone Replication Coordinates RB 21417 Reviewed-by: Pawel Olchawa <[email protected]> Pedro Figueiredo <[email protected]> Backport 8.0 wl#9682 InnoDB: Support cloning encrypted and compressed database RB 21409 Reviewed-by: Mayank Prasad <[email protected]> Kevin Lewis <[email protected]> [5]: commit cd6fab0 Author: Pawe<C5><82> Olchawa <[email protected]> Date: Thu Apr 11 13:33:16 2019 +0200 BUG#29417503 MYSQL COULD HANG DURING SHUTDOWN BECAUSE OF ZOMBIE IN MYSQL_TRX_LIST Proper and efficient mechanism to check if threads are gone is delivered. Based on that the code is fixed for all background threads that are started in InnoDB. Also, shutdown in InnoDB was not precise enough regarding when the master thread should exit. That is fixed - a new intermediate state of shutdown is introduced, which is placed between CLEANUP and FLUSH_PHASE and marks the point since which master should be closed. RB: 21627 [6]: commit a37f91a Author: Georgi Kodinov <[email protected]> Date: Thu Feb 7 17:25:43 2019 +0100 WL#12935: Control what plugins can be passed to --early-plugin-load RB#21450 [7]: commit e0981d9 Author: Anonymous Reformatter <matt.reform@invalid> Date: Tue Apr 2 11:03:07 2019 +0200 Bug #29588949: UPGRADE TO CLANG-FORMAT 8 Upgrade clang-format settings from 5.0 to 8, and rerun it over the entire code base. The real committer is Steinar H. Gunderson <[email protected]>, but the author has been set to Anonymous Reformatter so that git blame won't show myself as author of all existing code. To ignore whitespace changes caused by this commit, please use git blame -w. For ignoring larger changes, you can run blame on the commit immediately preceding this, as follows: git blame clang-format-8-base^ -- path/to/file.cc Change-Id: Ia6fe3de72ab6e760b678305175204f216185fa89
- Loading branch information