List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:April 6 2011 5:41pm
Subject:bzr commit into mysql-trunk branch (alexander.nozdrin:3330) WL#5787
View as plain text  
#At file:///home/alik/MySQL/bzr/00/wl5787/mysql-trunk-wl5787/ based on revid:alexander.nozdrin@stripped

 3330 Alexander Nozdrin	2011-04-06
      Preliminary patch for WL#5787 (IPv6-capable
      INET_ATON and INET_NTOA functions).
      
      The patch move the "#include <netdb.h>" directive
      into my_net.h and remove that directrive from other
      files.

    modified:
      include/my_net.h
      libmysql/libmysql.c
      libmysqld/libmysqld.c
      mysys/my_gethostbyname.c
      sql-common/client.c
      sql/hostname.cc
      sql/item_inetfunc.cc
      sql/mysqld.cc
      sql/sql_connect.cc
      vio/vio_priv.h
=== modified file 'include/my_net.h'
--- a/include/my_net.h	2010-07-23 20:14:35 +0000
+++ b/include/my_net.h	2011-04-06 17:41:16 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -11,7 +11,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
 /*
   This file is also used to make handling of sockets and ioctl()
@@ -27,18 +27,23 @@
 C_MODE_START
 
 #include <errno.h>
+
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
+
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
+
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
+
 #ifdef HAVE_POLL
 #include <sys/poll.h>
 #endif
+
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
@@ -47,9 +52,9 @@ C_MODE_START
 #include <netinet/in_systm.h>
 #include <netinet/in.h>
 #include <netinet/ip.h>
-#if !defined(alpha_linux_port)
-#include <netinet/tcp.h>
-#endif
+# if !defined(alpha_linux_port)
+#   include <netinet/tcp.h>
+# endif
 #endif
 
 #if defined(__WIN__)
@@ -61,7 +66,8 @@ C_MODE_START
   #define SD_BOTH 0x02
 */
 #define SHUT_RDWR 0x02
-
+#else // defined (__WIN__)
+#include <netdb.h>     // getaddrinfo() & co
 #endif
 
 /*

=== modified file 'libmysql/libmysql.c'
--- a/libmysql/libmysql.c	2011-03-08 19:14:42 +0000
+++ b/libmysql/libmysql.c	2011-04-06 17:41:16 +0000
@@ -1,11 +1,8 @@
-/* Copyright (C) 2000-2004 MySQL AB
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation.
-
-   There are special exceptions to the terms and conditions of the GPL as it
-   is applied to this software.
+   the Free Software Foundation; version 2 of the License.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,7 +11,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
 #include <my_global.h>
 #include <my_sys.h>
@@ -34,10 +31,6 @@
 #include <pwd.h>
 #endif
 #if !defined(__WIN__)
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
 #ifdef HAVE_SELECT_H
 #include <select.h>
 #endif

=== modified file 'libmysqld/libmysqld.c'
--- a/libmysqld/libmysqld.c	2010-08-09 08:32:50 +0000
+++ b/libmysqld/libmysqld.c	2011-04-06 17:41:16 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -11,7 +11,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
 #include <my_global.h>
 #include <mysql.h>
@@ -33,10 +33,6 @@
 #include <pwd.h>
 #endif
 #if !defined(__WIN__)
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
 #ifdef HAVE_SELECT_H
 #  include <select.h>
 #endif

=== modified file 'mysys/my_gethostbyname.c'
--- a/mysys/my_gethostbyname.c	2011-01-11 09:09:21 +0000
+++ b/mysys/my_gethostbyname.c	2011-04-06 17:41:16 +0000
@@ -1,26 +1,21 @@
-/* Copyright (C) 2002, 2004 MySQL AB, 2008-2009 Sun Microsystems, Inc
-   
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; version 2
-   of the License.
-   
-   This library is distributed in the hope that it will be useful,
+/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 of the License.
+
+   This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-   
-   You should have received a copy of the GNU Library General Public
-   License along with this library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA */
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
 /* Thread safe version of gethostbyname_r() */
 
 #include "mysys_priv.h"
-#if !defined(__WIN__)
-#include <netdb.h>
-#endif
 #include <my_net.h>
 
 /* This file is not needed if my_gethostbyname_r is a macro */

=== modified file 'sql-common/client.c'
--- a/sql-common/client.c	2011-03-17 09:43:28 +0000
+++ b/sql-common/client.c	2011-04-06 17:41:16 +0000
@@ -37,10 +37,6 @@
 
 #include "mysql.h"
 
-#ifndef __WIN__
-#include <netdb.h>
-#endif
-
 /* Remove client convenience wrappers */
 #undef max_allowed_packet
 #undef net_buffer_length
@@ -61,6 +57,7 @@ my_bool	net_flush(NET *net);
 #else  /*EMBEDDED_LIBRARY*/
 #define CLI_MYSQL_REAL_CONNECT STDCALL mysql_real_connect
 #endif /*EMBEDDED_LIBRARY*/
+
 #include <my_sys.h>
 #include <mysys_err.h>
 #include <m_string.h>
@@ -69,6 +66,7 @@ my_bool	net_flush(NET *net);
 #include "mysqld_error.h"
 #include "errmsg.h"
 #include <violite.h>
+
 #if !defined(__WIN__)
 #include <my_pthread.h>				/* because of signal()	*/
 #endif /* !defined(__WIN__) */
@@ -76,21 +74,20 @@ my_bool	net_flush(NET *net);
 #include <sys/stat.h>
 #include <signal.h>
 #include <time.h>
+
 #ifdef	 HAVE_PWD_H
 #include <pwd.h>
 #endif
+
 #if !defined(__WIN__)
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
 #ifdef HAVE_SELECT_H
 #  include <select.h>
 #endif
 #ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
+#  include <sys/select.h>
 #endif
 #endif /* !defined(__WIN__) */
+
 #ifdef HAVE_SYS_UN_H
 #  include <sys/un.h>
 #endif
@@ -111,6 +108,7 @@ my_bool	net_flush(NET *net);
 #include "client_settings.h"
 #include <sql_common.h>
 #include <mysql/client_plugin.h>
+
 #define native_password_plugin_name "mysql_native_password"
 #define old_password_plugin_name    "mysql_old_password"
 

=== modified file 'sql/hostname.cc'
--- a/sql/hostname.cc	2010-07-23 20:59:42 +0000
+++ b/sql/hostname.cc	2011-04-06 17:41:16 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,10 +26,6 @@
 
 #include "sql_priv.h"
 #include "hostname.h"
-#include "my_global.h"
-#ifndef __WIN__
-#include <netdb.h>        // getservbyname, servent
-#endif
 #include "hash_filo.h"
 #include <m_ctype.h>
 #include "log.h"                                // sql_print_warning,

=== modified file 'sql/item_inetfunc.cc'
--- a/sql/item_inetfunc.cc	2011-03-29 13:25:20 +0000
+++ b/sql/item_inetfunc.cc	2011-04-06 17:41:16 +0000
@@ -13,11 +13,6 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-
 #include "item_inetfunc.h"
 
 #include "violite.h"  // vio_getnameinfo()

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2011-03-25 14:35:13 +0000
+++ b/sql/mysqld.cc	2011-04-06 17:41:16 +0000
@@ -17,9 +17,6 @@
 #include "sql_priv.h"
 #include "unireg.h"
 #include <signal.h>
-#ifndef __WIN__
-#include <netdb.h>        // getservbyname, servent
-#endif
 #include "sql_parse.h"    // test_if_data_home_dir
 #include "sql_cache.h"    // query_cache, query_cache_*
 #include "sql_locale.h"   // MY_LOCALES, my_locales, my_locale_by_name

=== modified file 'sql/sql_connect.cc'
--- a/sql/sql_connect.cc	2011-03-15 15:49:50 +0000
+++ b/sql/sql_connect.cc	2011-04-06 17:41:16 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,9 +20,6 @@
 
 #include "my_global.h"
 #include "sql_priv.h"
-#ifndef __WIN__
-#include <netdb.h>        // getservbyname, servent
-#endif
 #include "sql_audit.h"
 #include "sql_connect.h"
 #include "my_global.h"

=== modified file 'vio/vio_priv.h'
--- a/vio/vio_priv.h	2010-06-07 14:01:39 +0000
+++ b/vio/vio_priv.h	2011-04-06 17:41:16 +0000
@@ -1,7 +1,7 @@
 #ifndef VIO_PRIV_INCLUDED
 #define VIO_PRIV_INCLUDED
 
-/* Copyright (C) 2003 MySQL AB
+/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
 /* Structures and functions private to the vio package */
 
@@ -25,11 +25,6 @@
 #include <m_string.h>
 #include <violite.h>
 
-#ifndef __WIN__
-#include <sys/socket.h>
-#include <netdb.h>
-#endif
-
 #ifdef _WIN32
 void	vio_win32_timeout(Vio *vio, uint which, uint timeout);
 #endif


Attachment: [text/bzr-bundle] bzr/alexander.nozdrin@oracle.com-20110406174116-iatofhow4tm9109r.bundle
Thread
bzr commit into mysql-trunk branch (alexander.nozdrin:3330) WL#5787Alexander Nozdrin6 Apr