• Vladislav Vaintroub's avatar
    MDEV-33616 workaround libmariadb bug : mysql_errno = 0 on failed connection · f2eda615
    Vladislav Vaintroub authored
    The bug can happens on macOS, if server closes the socket without sending
    error packet to client. Closing the socket on server side is legitimate,
    and happen e.g when write timeout occurs, perhaps also other situations.
    
    However mysqltest is not prepared to handle mysql_errno 0, and erroneously
    thinks connection was successfully established.
    
    The fix/workaround in mysqltest is to treat client failure with
    mysql_errno 0 the same as CR_SERVER_LOST (generic client-side
    communication error)
    
    The real fix in client library would ensure that mysql_errno is set
    on errors.
    f2eda615
mysqltest.cc 322 KB