List:Internals« Previous MessageNext Message »
From:monty Date:April 17 2002 8:45am
Subject:bk commit into 3.23 tree
View as plain text  
Below is the list of changes that have just been commited into a local
3.23. repository of monty. When monty does a push, they will be
propogaged to the main repository and within 24 hours after the push into
the public repository. For information on how to access
the public repository see
http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.996 02/04/17 11:45:26 monty@stripped +1 -0
  Abort if 'listen()' on TCP/IP fails.

  sql/mysqld.cc
    1.236 02/04/17 11:45:15 monty@stripped +7 -6
    Abort if 'listen()' on TCP/IP fails.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	monty
# Host:	tik.mysql.fi
# Root:	/home/my/mysql-3.23

--- 1.235/sql/mysqld.cc	Tue Apr 16 16:29:03 2002
+++ 1.236/sql/mysqld.cc	Wed Apr 17 11:45:15 2002
@@ -917,21 +917,22 @@
     IPaddr.sin_addr.s_addr = my_bind_addr;
     IPaddr.sin_port = (unsigned short) htons((unsigned short) mysql_port);
     (void) setsockopt(ip_sock,SOL_SOCKET,SO_REUSEADDR,(char*)&arg,sizeof(arg));
-    for(;;)
+    if (bind(ip_sock, my_reinterpret_cast(struct sockaddr *) (&IPaddr),
+	     sizeof(IPaddr)) < 0)
     {
-      if (bind(ip_sock, my_reinterpret_cast(struct sockaddr *) (&IPaddr),
-	       sizeof(IPaddr)) >= 0)
-	break;
       DBUG_PRINT("error",("Got error: %d from bind",socket_errno));
-      sql_perror("Can't start server: Bind on TCP/IP port");/* Had a loop here */
+      sql_perror("Can't start server: Bind on TCP/IP port");
       sql_print_error("Do you already have another mysqld server running on port: %d ?",mysql_port);
       unireg_abort(1);
     }
     if (listen(ip_sock,(int) back_log) < 0)
+    {
+      sql_perror("Can't start server: listen() on TCP/IP port");
       sql_print_error("Warning:  listen() on TCP/IP failed with error %d",
 		      socket_errno);
+      unireg_abort(1);
+    }
   }
-
   if (mysqld_chroot)
     set_root(mysqld_chroot);
 
Thread
bk commit into 3.23 treemonty17 Apr