List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:November 9 2007 12:05pm
Subject:bk commit into 4.1 tree (svoj:1.2692) BUG#29083
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of svoj. When svoj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-11-09 16:05:01+04:00, svoj@stripped +3 -0
  BUG#29083 - test suite times out on OS X 64bit - also in older releases
  
  The "mysql client in mysqld"(which is used by
  replication and federated) should use alarms instead of setting
  socket timeout value if the rest of the server uses alarm. By
  always calling 'my_net_set_write_timeout'
  or 'net_set_read_timeout' when changing the timeout value(s), the
  selection whether to use alarms or timeouts will be handled by
  ifdef's in those two functions.
  
  This is minimal backport of patch for BUG#26664, which was pushed
  to 5.0 and up.
  
  Affects 4.1 only.

  include/mysql_com.h@stripped, 2007-11-09 16:05:01+04:00, svoj@stripped +5 -0
    Move the net_set_*_timeout function declarations to mysql_com.h

  sql-common/client.c@stripped, 2007-11-09 16:05:01+04:00, svoj@stripped +2 -4
     Use my_net_read_timeout or my_net_write_timeout when setting the timeouts

  sql/mysql_priv.h@stripped, 2007-11-09 16:05:01+04:00, svoj@stripped +0 -3
    Move the net_set_*_timeout function declarations to mysql_com.h

diff -Nrup a/include/mysql_com.h b/include/mysql_com.h
--- a/include/mysql_com.h	2006-09-27 17:49:12 +05:00
+++ b/include/mysql_com.h	2007-11-09 16:05:01 +04:00
@@ -291,6 +291,11 @@ my_bool	net_write_command(NET *net,unsig
 int	net_real_write(NET *net,const char *packet,unsigned long len);
 unsigned long my_net_read(NET *net);
 
+#ifdef _global_h
+void net_set_write_timeout(NET *net, uint timeout);
+void net_set_read_timeout(NET *net, uint timeout);
+#endif
+
 /*
   The following function is not meant for normal usage
   Currently it's used internally by manager.c
diff -Nrup a/sql/mysql_priv.h b/sql/mysql_priv.h
--- a/sql/mysql_priv.h	2007-07-17 01:38:49 +05:00
+++ b/sql/mysql_priv.h	2007-11-09 16:05:01 +04:00
@@ -59,9 +59,6 @@ void kill_one_thread(THD *thd, ulong id)
 bool net_request_file(NET* net, const char* fname);
 char* query_table_status(THD *thd,const char *db,const char *table_name);
 
-void net_set_write_timeout(NET *net, uint timeout);
-void net_set_read_timeout(NET *net, uint timeout);
-
 #define x_free(A)	{ my_free((gptr) (A),MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); }
 #define safeFree(x)	{ if(x) { my_free((gptr) x,MYF(0)); x = NULL; } }
 #define PREV_BITS(type,A)	((type) (((type) 1 << (A)) -1))
diff -Nrup a/sql-common/client.c b/sql-common/client.c
--- a/sql-common/client.c	2007-07-20 16:05:54 +05:00
+++ b/sql-common/client.c	2007-11-09 16:05:01 +04:00
@@ -1884,13 +1884,11 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
 
   /* If user set read_timeout, let it override the default */
   if (mysql->options.read_timeout)
-    net->read_timeout= mysql->options.read_timeout;
-  vio_timeout(net->vio, 0, net->read_timeout);
+    net_set_read_timeout(net, mysql->options.read_timeout);
 
   /* If user set write_timeout, let it override the default */
   if (mysql->options.write_timeout)
-    net->write_timeout= mysql->options.write_timeout;
-  vio_timeout(net->vio, 1, net->write_timeout);
+    net_set_write_timeout(net, mysql->options.write_timeout);
 
   if (mysql->options.max_allowed_packet)
     net->max_packet_size= mysql->options.max_allowed_packet;
Thread
bk commit into 4.1 tree (svoj:1.2692) BUG#29083Sergey Vojtovich9 Nov