lp:~laurynas-biveinis/percona-server/mysql-5.7-percona-patches

Created by Laurynas Biveinis and last modified
Get this branch:
bzr branch lp:~laurynas-biveinis/percona-server/mysql-5.7-percona-patches
Only Laurynas Biveinis can upload to this branch. If you are Laurynas Biveinis please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Recent revisions

8784. By Laurynas Biveinis

Fix http://bugs.mysql.com/bug.php?id=75534 (Solve buffer pool mutex
contention by splitting it). The patch:
- Removes the buffer pool mutex. Introduces several new list/hash
  protecting mutexes, and access without any mutex to several
  variables. There atomic variables or os_rmb/os_wmb is used where
  deemed appropriate. volatile is not used.
  The new mutexes are
  - LRU_list_mutex for the LRU_list;
  - zip_free mutex for the zip_free arrays;
  - zip_hash mutex for the zip_hash hash and in_zip_hash flag;
  - free_list_mutex for the free_list and withdraw list. If desired,
    withdraw_list_mutex may be easily further split in the future.
  buf_pool->watch[] and all bpage protection has been moved to
  page_hash.
  The variables switched from buffer pool mutex protection to atomic
  operations and/or os_rmb/os_wmb. Particularly the uses of latter, while
  I tried to make them correct, might be very debatable.
  - srv_buf_pool_old_size, srv_buf_pool_size, srv_buf_pool_curr_size,
    srv_buf_pool_base_size
  - buf_pool->buddy_stat[i].used
  - buf_pool->curr_size, n_chunks_new
- Reduces critical section length or removes it completely for
  buf_block_buf_fix_inc/dec calls.
- Exploits the fact that freed pages must have no pointers to them
  from the buffer pool nor from any other thread except for the
  freeing one to remove redundant locking. The same applies to freshly
  allocated pages before any pointers to them are published. This
  however necessitates removing some of the debug checks that scan
  buffer pool chunks directly, as they don't have a way to freeze such
  blocks. (buf_block_align)
- Related to above, add more consistency asserts to
  buf_page_set_state. Add some scalability asserts (!mutex_own) too.
- buf_buddy_alloc rewritten not to require the buffer pool mutex at
  the start, which then might be released, and this fact propagated to
  the caller to make decisions to re-check things. It is now called
  with mutexes unlocked, and the caller buf_page_init_for_read
  algorithm has been simplified. All its allocations now happen with
  mutexes unlocked.
- buf_flush_LRU_list_batch uses mutex_enter_nowait to skip over any
  currently-locked blocks.
- Removed some outdated buf0buf.cc comments.
- Added new testcases innodb_buffer_pool_resize_multiple_pools and
  innodb_buffer_pool_debug. Also added innodb_zip/innodb-buffer-pool,
  which is an old XtraDB regression testcase (Launchpad bug 317074).

Bugs fixed fully or partially, besides the current one:
- http://bugs.mysql.com/bug.php?id=64344 fixed buf_page_init_for_read
  holding mutexes while allocating memory. It also should be easier to
  fix buf_LRU_free_page now.
- http://bugs.mysql.com/bug.php?id=75504

8783. By Laurynas Biveinis

Fix http://bugs.mysql.com/bug.php?id=75642 (Extend valid range of
dummy certificates ni mysql-test/std_data) by updating the
certificates by the ones posted on the bug report.

Update openssl_1 testcase for the new certificates, re-record
openssl_1 and ssl testcases.

8782. By Laurynas Biveinis

Fix bug http://bugs.mysql.com/bug.php?id=75595.

Implement new option innodb-log-checksum-algorithm with same possible
values and algorithms as innodb-checksum-algorithm.

Patch author Alexey Kopytov.

8781. By Laurynas Biveinis

Fix bug http://bugs.mysql.com/bug.php?id=75699 (Unstable testcase
sys_vars.session_track_system_variables_basic).

Fix by adding ORDER BY to INFORMATION_SCHEMA.GLOBAL_VARIABLES and
SESSION_VARIABLES queries.

8780. By Laurynas Biveinis

Fix bug http://bugs.mysql.com/bug.php?id=69146 (Needless log flush
order mutex acquisition in buf_pool_get_oldest_modification) by
removing the redundant locking.

8779. By Laurynas Biveinis

Fix http://bugs.mysql.com/bug.php?id=68476 (Suboptimal code in
my_strnxfrm_simple()) by removing the redundant if from the function.

8778. By Laurynas Biveinis

Fix http://bugs.mysql.com/bug.php?id=68713
(create_duplicate_weedout_tmp_table() leaves key_part_flag
uninitialized).

Replace the custom key_part_info initialization code with a
key_part_info->init_from_field call that initializes key_part_flag
too.

8777. By Laurynas Biveinis

Fix http://bugs.mysql.com/bug.php?id=68970 (fsp_reserve_free_extents
switches from small to big tblspace handling too early) by:

- adjusting fsp_reserve_free_extents to actually do the documented
  logic of using special rules for small single-table tablespaces for
  the ones smaller than FSP_EXTENT_SIZE pages rather than
  FSP_EXTENT_SIZE / 2 pages. This applies for non-BLOB reservation
  type, which is not subject to special small tablespace handling.
- in the same function, set the number of available free extents
  n_free_up to zero instead of overwrapped large numbers if allocating
  for BLOBs.
- tweak assertion in fsp_reserve_free_pages for the new cutoff value.
- add assert to fsp_get_available_space_in_free_extents that we don't
  end up with overwrapped free extent value.
- re-record innodb_zip.innodb_wl6347_comp_indx_stat as with the above
  changes the tablespace file ends up being one page larger at the
  check time.

8776. By Laurynas Biveinis

Add new option --manual-lldb to mysql-test-run.pl, implementing
http://bugs.mysql.com/bug.php?id=73418. The behavior of the option is
the same as --manual-gdb but with LLDB instead of GDB: create the
debugger startup scripts, print the invocation commands, and wait for
the mysqld processes to start.

8775. By Laurynas Biveinis

Fix http://bugs.mysql.com/bug.php?id=71183 (os_file_fsync() should
handle fsync() returning EINTR) by repeating the os_file_fsync loop if
fsync call failed and returned EINTR in errno.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.