Fixed bug mdev-4996.
The fix for bug mdev-4971 not always correctly set the pointers to
inherited multiple equalities in objects of the Item_equal class.
MDEV-4863 COALESCE(time_or_datetime) returns wrong results in numeric context
MDEV-5011: ERROR Plugin 'MEMORY' has ref_count=1 after shutdown for SJM queries
- Provide a special execution path for cleanup of degenerate 
  non-merged semi-join children of degenerate selects.
MDEV-5005: Subquery in Procedure somehow affecting temporary table

Removed unneeded set of TABLE_LIST::skip_temporary flag.
MDEV-4724 Some temporal functions do not preserve microseconds
Fixed bug mdev-5015.
The patch for mdev-4355 had a defect: the cached values for bitmaps of
used tables were not updated when processing degenerate OR formulas.
MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10')
MDEV-4869 Wrong result of MAKETIME(0, 0, -0.1)

Adding a test case only.

The problem was fixed by:

  MDEV-4724 Some temporal functions do not preserve microseconds

modified:
  mysql-test/r/func_time.result
  mysql-test/t/func_time.test
MDEV-4870 Wrong values of CASE, COALESCE, IFNULL on a combination of different temporal types

Adding test cases from the bug report only.

The problem was earlier fixed by:
MDEV-4863 COALESCE(time_or_datetime) returns wrong results in numeric context

modified:
  mysql-test/r/func_time.result
  mysql-test/t/func_time.test
MDEV-4861 TIME/DATETIME arithmetics does not preserve INTERVAL precision
Adding tests only.

The problem was earlier fixed by 
MDEV-4724 Some temporal functions do not preserve microseconds
backport from 10.0

mtr can crash occasionally.
This happens when mtr sends to a child mtr process (or vice-versa) a packet,
that gets truncated or, perhaps, split in two.
Then the other side cannot deserialize it and fails as above.
MDEV-5039: incorrect Item_func_regex::update_used_tables()

Other fix of maybe_null problem and revert of revno: 3608 "MDEV-3873 & MDEV-3876 & MDEV-3912 : Wrong result (extra rows) with ALL subquery from a MERGE view."
Fixed bug mdev-5028.
Apparently in a general case a short-cut for the distinct optimization
is invalid if join buffers are used to join tables after the tables whose
values are to selected.
Fixed bug mdev-5078.
For aggregated fields from views/derived tables the possible adjustment
of thd->lex->in_sum_func->max_arg_level in the function Item_field::fix_fields
must be done before we leave the function.
Fixed bug mdev-5105.
The bug caused a memory overwrite in the function update_ref_and_keys()
It happened due to a wrong value of SELECT_LEX::cond_count. This value
historically was calculated by the fix_fields method. Now the logic of
calling this method became too complicated and, as a result, this value
is calculated not always correctly.
The patch changes the way how and when  the values of SELECT_LEX::cond_count
and of SELECT_LEX::between_count are calculated. The new code does it just at
the beginning of update_ref_and_keys().
Fixed a problem of the patch for mdev-5105 that caused valgrind complains.
Fixed bug mdev-5132.
Objects of the classes Item_func_isnull and Item_func_isnotnull
must have the flag sargable set to TRUE.
Set the value of the flag sargable only in constructors of the 
classes inherited from Item_int_func.
Fixed bug mdev-5135.
The patch for bug mdev-5105 incorrectly counted conditions in nested joins.
MDEV-5107:Left Join Yields All Nulls Instead of Appropriate Matches
MDEV-5034:Wrong result on LEFT JOIN with a SELECT SQ or a merge view, UNION in IN subquery

Make reset null_row same as it was set in evaluate_null_complemented_join_record().

The problem was that view firlds detect null_row by not-yet-reset table.
MDEV-4890 Valgrind warnings on shutdown on a build with openSSL