MDEV-4243 Warnings/errors while compiling with clang
Update tests results, mysql-test/r/windows.result
MDEV-4161 Assertion `status_var.memory_used == 0' fails in virtual THD::~THD()

init join->top_join_tab_count to be in sync with join->join_tab=stat,
otherwise a query can be killed in-between and join_tab's won't be deleted
(JOIN::cleanup won't call JOIN_TAB::cleanup)
MDEV-4088 Replication 10.0 -> 5.5 fails

update 5.1 to replicate from 10.0 and
to show the server version (as of 10.0) correctly
fix have_debug_sync.inc to be more robust
(debug_sync value can have single quotes)
compilation warnings
MDEV-4338 - Support FusionIO/directFS atomic writes
MDEV-4338 - Support FusionIO/directFS atomic writes
If a range tree has a branch that is an expensive constant,
currently get_mm_tree skipped the evaluation of this constant
and icorrectly proceeded. The correct behavior is to return a
NULL subtree, according to the IF branch being fixed - when it
evaluates the constant it returns a value, and doesn't continue
further.
MDEV-4316 MariaDB server crash with signal 11

fulltext search was initialized for all MATCH ... AGAINST items
at the end of the JOIN::optimize(). But since 5.3 derived tables
are initialized lazily on first use, very late in the sub_select().

Skip Item_func_match::init_search initialization if the corresponding
table isn't open yet; repeat fulltext initialization for all
not-yet-initialized MATCH ... AGAINST items after creating derived tables.
MDEV-4244 [PATCH] Buffer overruns and use-after-free errors

fixes for gcc 4.8 -fsanitize=address
MDEV-4244 [PATCH] Buffer overruns and use-after-free errors

fixes for gcc 4.8 - compilation warnings and -fsanitize=address
MDEV-4356 : MariaDB does not start if bind-address gets resolved to more than single IP address.
  
MySQL bug http://bugs.mysql.com/bug.php?id=61713 was fixed in 5.5
  
Fix is to remove check for multiple entries returned by getaddrinfo(), and use the first entry that works  - i.e socket can be created.  

Unlike Oracle/MySQL's fix ,this one  is kept minimal : 
-  we do not prioritize IPv4 over IPv6,  orr other way around,  and just rely on operating system to sort getaddrinfo() entries in sensible order. There is RFC that defines  what is sensible order for getaddrinfo entries ( RFC 3484), and OS specific tweaks are also possible , like /etc/gai.conf o Linux.
-  also,  we do not force "0.0.0.0" address if bind-address is not given -  this would be a change in behavior of 5.5 at least on Windows, where passing NULL as  to getaddrinfo()  gives back IPv6-wildcard.
5.1 merge
5.2 merge
5.3 merge
complier warnings. hide the redundant condition under #ifdef
(because only there it  makes any sense)
Increase default value of max_binlog_cache_size and max_binlog_stmt_cache_size to ulonglong_max.
This fixes that by default LOAD DATA INFILE will not generate the error:
"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage..."
add missing tests
compiler warnings