• Vladislav Vaintroub's avatar
    MDEV-4356 : MariaDB does not start if bind-address gets resolved to more than single IP address. · 5ae72bb7
    Vladislav Vaintroub authored
      
    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.
    5ae72bb7
mysqld.cc 276 KB