Fix 
- bug 1217002 (RENAME/DROP crashes with innodb_track_changed_pages);
- bug 1213885 (Failing assertion: error == DB_SUCCESS in file
  handler0alter.cc line 4897 | abort in commit_cache_rebuild).

Both bugs are caused by a recent upstream change that makes
MLOG_FILE_RENAME to replay unconditionally whenever such log record is
parsed, which includes online log tracking.

Fix by
- asserting in fil_op_log_parse_or_replay() that, if a file operation
  is about to be executed, that recovery is on, and
- adjusting recv_parse_or_apply_log_rec_body() to only pass non-zero
  space_id to fil_op_log_parse_or_replay if recovery is on.  A
  non-zero space_id is what causes fil_op_log_parse_or_replay() to
  replay and not only parse the log record.

Changes for testing:
- backport from 5.5+ the debug-only innodb_log_checkpoint_now system
  variable;
- make innodb_track_changed_pages a dynamic variable, for debug builds
  only, to provide the ability to stop log tracking temporarily;
- add a new debug-only system variable innodb_track_redo_log_now, that
  issues a synchronuous redo log parse request;
- add a new debug sync point to row_merge_rename_tables();
- use all of the above to add a testcase to
  percona_changed_page_bmp_debug test.
Merge bug 1217002 and bug 1213885 fixes from 5.1.

Mostly an automerge.  Extra changes on the top in the sys_vars
testsuite: 
- backport the test for innodb_log_checkpoint_now with 5.6 file-ids;
- add a test for innodb_track_redo_log_now;
- adjust the test for innodb_track_changed_pages to be skipped on
  debug builds.
Merge bug 1217002 and bug 1213885 fixes from 5.5.  The only change
from the 5.5 version is that the debug sync point is moved to
commit_cache_rebuild and renamed to commit_cache_rebuild_middle to
account for 5.6 InnoDB ALTER TABLE refactorings.
Automerge lp:~laurynas-biveinis/percona-server/bug1217002-5.6
Fix bug 1227581 (InnoDB: Failing assertion: buf_page_in_file(bpage) in
file buf0flu.cc line 2674 | abort (sig=6) in
buf_pool_get_dirty_pages_count on ALTER TABLE).

The issue is that buf_LRU_free_page() may perform a flush list
relocation for a dirty zip page, making it possible to observe a page
in BUF_BLOCK_REMOVE_HASH state on the flush list between
buf_LRU_block_remove_hashed() and buf_flush_relocate_on_flush_list()
calls, if another thread reads flush list pages without the LRU list
mutex.

Places where a thread iterates through the flush list without the LRU
list mutex and does not expect to see a BUF_BLOCK_REMOVE_HASH page are
buf_pool_get_dirty_pages_count(), buf_do_flush_list_batch(), and
buf_get_latched_pages_number_instance().  The fix is to accept such
pages there:
- in buf_pool_get_dirty_pages_count() check such page as if it were
  BUF_BLOCK_FILE_PAGE;
- in buf_flush_page_and_try_neighbors(), called from
  buf_do_flush_list_batch(), do not attempt to flush such page.
- in buf_flush_set_hp(), also called from buf_do_flush_list_batch(),
  allow setting hazard pointer on such page.
- in buf_get_latched_pages_number_instance(), silently accept such
  page as BUF_BLOCK_FILE_PAGE.
Automerge lp:~laurynas-biveinis/percona-server/bug1227581
Include the InnoDB memcached plugin

Add -DWITH_INNODB_MEMCACHED=ON to the rpm, dpkg and binary builders.
Automerge lp:~ignacio-nin/percona-server/5.6-bug1159621