Fix for bug #1196383: thread pool breaks -DWITH_PERFSCHEMA_ENGINE=OFF.
This patch introduces some directives for conditional compilation in
threadpool.cc and threadpool_common.cc.
Merge fix for bug #1196383 from 5.5 with some adjustments.
Bump versions to 5.6.13-60.6
This patch fixes multiple issues.
- assertion failure (pfs->m_idle || (state == PSI_SOCKET_STATE_IDLE)) in pfs.cc
PFS updates of current State of socket in threadpool has been improved.
* as comment in threadpool_common.cc states, there is a possibility for
more than one iteration of loop in threadpool_process_request to be done,
which is handled now. Cases when loop wasn't executed at all are also
handled.
- change in mysqld.cc is aimed to prevent race condition (concurrent changes
in THD and it's PFS structures) which caused SIGSEGV's on server shutdown.
- adding vio_cancel for socket and other VIO implementations allows to
handle kill idle transaction correctly. Similar change present in 5.5
branch Percona Server rev. 442.1.4.
- test case for bug #1201681
Tune page cleaner thread, implementing
https://blueprints.launchpad.net/percona-server/+spec/cleaner-tuning-5.6. 

Create new type, local tu buf0flu.cc, struct flush_counters_t, that
has separate flushed and evicted page counters.  Adjust
buf_flush_LRU_list(), buf_do_LRU_batch(), buf_flush_batch(), and
buf_flush_LRU() to return it.

In buf_flush_LRU_list(), add new arg limited_scan that optionally
limits the total number of scanned pages to srv_LRU_scan_depth, limit
scans to not go deeper than srv_LRU_scan_depth in the LRU list.

In buf_flush_common(), only call buf_dblwr_flush_buffered_writes() if
there have been flushed pages, fixing
http://bugs.mysql.com/bug.php?id=69170 / bug 1231918 ("buf_flush_LRU
is lazy" | buf_flush_common() calls buf_dblwr_flush_buffered_writes()
even when no pages flushed).

Rewrite buf_flush_list() to divide flush requests into chunks that are
issued to buffer pool instances in parallel and limit total running
time to a new UNIV_PERF_DEBUG-only variable
innodb_cleaner_max_flush_time, default 1000 miliseconds.  The chunk
size is specified by a new UNIV_PERF_DEBUG-only variable
innodb_cleaner_flush_chunk_size, default 100.

Rewrite buf_flush_LRU_tail() to add timeouts as in buf_flush_list,
governed by a new UNIV_PERF_DEBUG-only variable
innodb_cleaner_max_lru_time.  Likewise issue chunk batches to buffer
pool instances in parallel, with the exception of buffer pool
instances with almost-empty free lists (as defined by
UNIV_PERF_DEBUG-only innodb_cleaner_free_list_lwm, default 10%), for
which batches are issued sequentially.  Make the chunk size tunable by
a new UNIV_PERF_DEBUG-only variable innodb_cleaner_lru_chunk_size,
default 100.

The timeouts in buf_flush_list() and buf_flush_LRU_tail() fix
http://bugs.mysql.com/bug.php?id=70453 / bug 1232101 (Add hard
timeouts to page cleaner flushes).

Add new functions buf_get_total_free_list_length(),
buf_cleaner_adapt_lru_sleep_time(), and
page_cleaner_adapt_flush_sleep_time().  They implement adaptive sleep
time reduction that may reduce page cleaner iteration time below 1
second and thus implement furious flushing, fixing
http://bugs.mysql.com/bug.php?id=68481 / bug 1232406 (Implement
furious flushing for 5.6).

The adaptiveness is implemented as follows.  Maintain a desired target
sleep time for LRU flushes.  If the total length of all buffer pool
instances is <1%, no sleep; if <5%, sleep 50 ms less, if between 5%
and 20%, no change; if >20%, sleep 50ms longer.  Then, if the
checkpoint age is in preflush sync zone, set the sleep time to zero.

Add a new UNIV_PERF_DEBUG-only variable
innodb_cleaner_eviction_factor, default FALSE, that, if enabled, makes
LRU tail flushing to use evicted instead of flushed page counts for
its heuristics.

Add sys_vars tests for these variables.
Automerge lp:~sergei.glushchenko/percona-server/5.6-ps-bug1196383
Automerge lp:~percona-core/percona-server/release-5.6.13-60.6
Automerge lp:~sergei.glushchenko/percona-server/5.6-ps-bug1194097
- Bug #1154619 - A page comparing different Percona Server versions
- updated the Changed in 5.6 page with features ported in RC4
Merge lp:~hrvojem/percona-server/bug1154619-5.6
http://jenkins.percona.com/job/merge-PS-5.6-docs-kickoff/30/
The memory is allocated once by OpenSSL and cannot be released by using
interface provided by OpenSSL. Suppression exists for this issue but
error log is not fully resolved for this case. This patch relaxes the
suppression a bit.
Automerge lp:~laurynas-biveinis/percona-server/xtradb-cleaner-tuning-5.6
- removed the compatibility pages - Bug #1133569
- DOC-20 - documented the PS-5.5 collations being replaced by the upstream
Bug 1201033: Crash when using AES_ENCRYPT on empty string
Old versions of OpenSSL report internal error if 0-length
source buffer is passed to EVP_EncryptUpdate.
Fix introduces workaround for this issue by avoiding
EVP_EncryptUpdate invocation for zero length strings.
Automerge lp:~sergei.glushchenko/percona-server/5.6-ps-bug1201033
Automerge lp:~sergei.glushchenko/percona-server/5.6-ps-bug1205196
Merge lp:~hrvojem/percona-server/bug1133569-5.6
http://jenkins.percona.com/job/merge-PS-5.6-docs-kickoff/31/