Fixed bug mdev-4420.
The code of JOIN::optimize that performed substitutions for the best equal
field in all ref items did not take into account that a multiple equality
could contain the result of the single-value subquery if the subquery is
inexpensive. This code was corrected.
Also made necessary corresponding corrections in the code of make_join_select().
Merge
Fixed bug mdev-4942.
Made sure that degenerate conjunctions/disjunctions are obtained from
AND/OR conditions.
Tokutek/mysql56#2 get tokudb storage engine to build on mysql 5.6
Fix for bug #17356954 "CANNOT USE SAVEPOINTS AFTER ER_LOCK_DEADLOCK OR
ER_LOCK_WAIT_TIMEOUT".

The problem was that after changes caused by fix bug 14188793 "DEADLOCK
CAUSED BY ALTER TABLE DOEN'T CLEAR STATUS OF ROLLBACKED TRANSACTION"/
bug 17054007 "TRANSACTION IS NOT FULLY ROLLED BACK IN CASE OF INNODB
DEADLOCK implicit rollback of transaction which occurred on ER_LOCK_DEADLOCK
(and ER_LOCK_WAIT_TIMEOUT if innodb_rollback_on_timeout option was set)
didn't start new transaction in @@autocommit=1 mode.

Such behavior although consistent with behavior of explicit ROLLBACK has
broken expectations of users and backward compatibility assumptions.

This patch fixes problem by reverting to starting new transaction
in 5.5/5.6.

The plan is to keep new behavior in trunk so the code change from this
patch is to be null-merged there.
Merge fix for MDEV-4942, 5.3->5.5
Fix for MDEV-4836: Merge with current 5.5
MDEV-4951 drop user leaves privileges

It's safe to delete from HASH when traversing it *backwards*, but not *forwards*.
typo fixed (boolean index attributes didn't work)
HA_ERR_TABLE_DEF_CHANGED is normal situation, not an server-wide exception,
don't log it to the error log.
don't decide on extended keys by DB_TYPE_INNODB, use hton->flags
mtr bug: files outside of both the suite dir and the overlay dir, were
treated as coming from the overlay.
bugfix: storage engine might return a negative error code, but it shouldn't
be ignored on return
Fix for MDEV-4836 fix: take into account situation where "notnull_col IS NULL" is not 
a direct child of the WHERE clause item, but rather is embedded inside Item_cond_and or 
Item_cond_or.
start port to mysql 5.6.13
Fixed bug mdev-4944.
The patch to fix mdev-4418 turned out to be incorrect.
At the substitution of single row tables in make_join_statistics()
the used multiple equalities may change and references to the new multiple
equalities must be updated. The function remove_eq_conds() takes care of it and
it should be called right after the substitution of single row tables.
Calling it after the call of make_join_statistics was a mistake.
Raise version number after cloning 5.1.72
Empty version change upmerge
Fixed bug mdev-4952
When in function remove_eq_conds() a sub-formula of the processed condition
is replaced for another formula we should ensure that in the resulting
formula AND/OR levels must alternate.
Raise version number after cloning 5.5.34