Modernize bison usage to work with bison3

Summary:
Feature: Build Improvements

Fix usage of bison, roughly similar to MDEV-4902.  This works
with old and new bisons.

https://mariadb.atlassian.net/browse/MDEV-4902

Test Plan: built on my devserver, built on debian unstable

Reviewers: pivanof, steaphan, darnaut

Reviewed By: pivanof

CC: steaphan, darnaut

Differential Revision: https://reviews.facebook.net/D17229
Fix mysqld--help-notwin-profiling output for 5.6.17

Summary:
Feature: Basic Test Fixes

Another command-line option was added in MySQL-5.6.17, but this version
of this test is new in WebScaleSQL, so it wasn't updated.

Since I only ran all the tests with the default builds, I did so with
PerfSchema disabled, and so this test was skipped, and this change
was missed.  This diff just fixes that one .result file.

This will be squashed with: https://reviews.facebook.net/D15753

Test Plan:
Built with perfschema enabled, with profiling, ran:
mtr --record main.mysqld--help-notwin-profiling

Built with perfschema enabled, without profiling, ran:
mtr --record main.mysqld--help-notwin

Reviewers: pivanof, inaam-rana, darnaut

Reviewed By: pivanof

CC: jtolmer

Differential Revision: https://reviews.facebook.net/D17529
Stabilize two new tests in MySQL-5.6.17

Summary:
Feature: Basic Test Fixes

These two new tests in 5.6.17 added some selects without ORDER BY:
1) main.partition_index_innodb
2) main.partition_index_myisam

So, the result files may not match, even if their results are correct.

This fixes that.

Test Plan:
Before these change were made, these tests showed failures after
later (correct) changes were added, while rebasing the Facebook
branch onto WebScaleSQL-5.6.17.

mtr main.partition_index_innodb main.partition_index_myisam

Verified the only output changes were "ORDER BY" and result order.

Reviewers: pivanof, inaam-rana, darnaut

Reviewed By: pivanof

CC: WebScaleSQL

Differential Revision: https://reviews.facebook.net/D17637
Fix compilation errors on osx

Summary:
Feature: Compilation

Use timeout_t instead of scalar value in vio_io_wait()

Test Plan: mtr

Reviewers: pivanof, steaphan, darnaut

Reviewed By: steaphan

CC: jtolmer, CalvinSun, WebScaleSQL

Differential Revision: https://reviews.facebook.net/D17667
Spurious wakeup in lock_wait_suspend_thread()

Summary:
Feature: Performance improvement in locking subsystem

This is a fix for upstream bug#72123

lock_timeout thread works in a tight loop waking up every second
and checking for lock_wait_timeout. In addition, when a mysql
thread is forced to wait on a lock, it signals the lock_timeout thread
as well. This call is not required. In a heavily contended workload
each thread going to wait will signal the lock_timeout thread making
it work all the time. As lock_timeout thread scans the array of
waiting threads under lock_sys::wait_mutex which is already very
hot in contneded loads, these extra scans can cause significanct
performance regression.

Also, in various codepaths lock_timeout thread is signalled where
actual intention was to signal the innodb monitor thread.

Test Plan: mtr

Reviewers: pivanof, darnaut

Reviewed By: darnaut

CC: jtolmer, CalvinSun, WebScaleSQL, steaphan

Differential Revision: https://reviews.facebook.net/D17673
Change the default value for innodb_log_compressed_pages to false

Summary:
Feature: 2012 InnoDB Compression

Logging these pages is a waste.  We don't want this to be enabled.

One caution here: If the zlib version used by innodb is changed, but
the running version is still the previous version, and the running
version crashes, it is *possible* crash recovery could fail.

When crash recovery uses a zlib version at all different than the
version used by the crashed instance, it is *possible* that a redone
compression could fail, where the original did not, because the new
zlib version compresses the same data to a slightly larger size.

Because of the nature of compression, this is even possible when
upgrading to a version of zlib which actually peforms overall better
compression than the previous version.

If this happens, mysql will fail to recover, since a page split can
not be safely triggered during crash recovery.

So, either the exact zlib version must be controlled between builds,
or these rare recovery failures must be accepted.  The cost of
logging these pages is quite high, so we consider this limitation to
be worthwhile.

This failure scenario can not happen if there was a clean shutdown.
This is only relevant to restarting crashed instances, or starting an
instance built via a hot backup too (XtraBackup).

Test Plan: mtr

Reviewers: inaam-rana, pivanof

Reviewed By: inaam-rana

CC: jtolmer, WebScaleSQL

Differential Revision: https://reviews.facebook.net/D17685
Add an option to disable deadlock checking in InnoDB

Summary:
Feature: Performance of locking subsystem

Deadlock detecion code can be expensive when a lots of threads
wait for the same lock i.e.: a hotspot scenario. At times, it is
much more efficient to disable deadlock detection code and rely
on innodb_lock_wait_timeout to rollback in case of deadlock.

This patch adds an option innodb_deadlock_detect (default TRUE)
to disable the deadlock detection code.

Test Plan: mtr

Reviewers: pivanof, steaphan, darnaut

Reviewed By: darnaut

CC: jtolmer, CalvinSun, WebScaleSQL

Differential Revision: https://reviews.facebook.net/D17679
os_event_wait_time_low(): wait time calculation is messed up

Summary:
Feature: Core logic error

This is a fix for upstream bug#72520

In os_event_wait_time_low() the logic to calculate abs_time
for wait is broken. The bug has been present at least since
5.5. It gets acutely sensitized when sub-second wait intervals
are passed. It is particularly relevant to us because the
page_cleaner thread will mostly request sub-second wait
intervals. This can potentially lead to a near tight loop
behaviour of page_cleaner with much less sleep then what we'd
actually expect.

Test Plan: mtr

Reviewers: pivanof, steaphan, darnaut

Reviewed By: pivanof

CC: jtolmer, CalvinSun, WebScaleSQL

Differential Revision: https://reviews.facebook.net/D18459
Merge pull request #1 from webscalesql/webscalesql-5.6.17

Webscalesql 5.6.17