Move InnoDB message from warning to info

Summary:
Jenkins hit a failure in innodb.innodb-wl5522-debug-zip
because InnoDB generated a warning that, after the server
was intentionally SIGKILL'ed as part of the test, it hit
a corrupt page. But in this specific case the InnoDB wil
attempt to recover the page from the doublewrite buffer
so there is no need for the message to be a warning.

Test Plan: Jenkins

Reviewers: steaphan

Reviewed By: steaphan
Add error messages for main.slow_log_extra_big

Summary:
main.slow_log_extra_big fails intermittenly. We add a few
error messages so that the log tells us more when this test fails.

Test Plan: Jenkins (arc unit)

Reviewers: jtolmer, nizamordulu

Reviewed By: jtolmer
Initialize innodb_sync_pool_size, even without mysql.

Summary:
Set the initial value of srv_sync_pool_size to 1024.

This has no effect on anything in mysql, as it is overwritten on init.

However, when innodb is used without mysql (like xtrabackup), it matters.

Test Plan: Jenkins

Reviewers: rudradevbasak

Reviewed By: rudradevbasak
Initialize error messages for xtrabackup

Summary:
Without this initialization any access to error messages will cause a
segfault.

Test Plan: Successfully carried out a full backup on admarketdbs

Reviewers: steaphan

Reviewed By: steaphan
xtrabackup: Do not FLUSH TABLES WITH READ LOCK on master

Summary:
Enable option_no_lock by default
Run mysql_lockall() always for slaves

Test Plan:
Will run a couple of backups to verify, but should be safe enough.
Apparently we have been making this change everytime a new version
of xtrabackup was merged into ours.

Reviewers: steaphan

Reviewed By: steaphan
Add GTID info to START TRANSACTION WITH CONSISTENT INNODB SNAPSHOT

Summary:
Print gtid information with START TRANSACTION WITH CONSISTENT INNODB
SNAPSHOT so that it is easier to take backup on slaves when we deploy
gtid feature.

Test Plan:
Added gtid_mode to rpl_innodb_snapshot mtr test case. Use the
Gtid_executed output of START TRANSACTION WITH CONSISTENT INNODB
SNAPSHOT and run SET @@global.gtid_purged = "gtid_executed" on slave.
Finally verify that both master and slave are consistent with each
other.

Reviewers: jtolmer

Reviewed By: jtolmer
Oracle's diff for MTS recovery SEGV

Summary:
http://bugs.mysql.com/bug.php?id=68506 contains a one
line fix for the SEGV hit when running multi-threaded
slave. I tested the fix in our 5.6.11 branch and it
fixed the problem with Yoshi's repro case.

Test Plan: Jenkins

Reviewers: sanpra90, yoshinori

Reviewed By: sanpra90
Back-port Oracle's stop-sleeping patch from 5.6

Summary:
This is a fix for: bugs.mysql.com/68588

This is being used as a stop-gap for the fact that this is not fixed:
	bugs.mysql.com/45892 (Re-opened as: bugs.mysql.com/68555)

This should be part of 5.6.12, so we won't need to port this forward.

Hopefully bug # 45892/68555 will be fixed in 5.6.12 too.

Test Plan: Jenkins

Reviewers: jtolmer, yoshinori

Reviewed By: jtolmer
Port v5.1: Skip fsyncs on O_DIRECT

Summary:
Oracle's implementation of this (O_DIRECT_NO_FSYNC) is broken.
On xfs, it misses required fsync()s when an ibd file changes size.

This changes O_DIRECT to skip fsync()s which are not required on xfs,
while leaving O_DIRECT_NO_FSYNC unmodified.

Test Plan: Jenkins, Yoshinori

Reviewers: jtolmer

Reviewed By: jtolmer
Port v5.1 Prefix Index Queries Optimization

Summary:
Optimize prefix index queries to skip cluster index lookup when possible.

Currently InnoDB will always fetch the clustered index (primary key
index) for all prefix columns in an index, even when the value of a
particular record is smaller than the prefix length.  This change
optimizes that case to use the record from the secondary index and avoid
the extra lookup.

Also adds two status vars that track how effective this is:

    innodb_secondary_index_triggered_cluster_reads:
	Times secondary index lookup triggered cluster lookup.

    innodb_secondary_index_triggered_cluster_reads_avoided:
	Times prefix optimization avoided triggering cluster lookup.

Test Plan:
Jenkins, all pass.

New test included, fails without this change, passes with it.

Random toggle added to stress tests, the small ones all pass,
and the nightly Jenkins stress tests should all pass too.

Reviewers: chip, hfisk

Reviewed By: chip