summaryrefslogtreecommitdiff
path: root/sql/mini_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mini_client.cc')
-rw-r--r--sql/mini_client.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/mini_client.cc b/sql/mini_client.cc
index 2de5227a953..7db9f046389 100644
--- a/sql/mini_client.cc
+++ b/sql/mini_client.cc
@@ -15,11 +15,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
- mini MySQL client to be included into the server to do server to server
- commincation by Sasha Pachev
+ mini MySQL client to be included into the server to do server to server
+ commincation by Sasha Pachev
- Note: all file-global symbols must begin with mc_ , even the static ones, just
- in case we decide to make them external at some point
+ Note: all file-global symbols must begin with mc_ , even the static ones,
+ just in case we decide to make them external at some point
*/
#include <my_global.h>
@@ -655,6 +655,11 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
sprintf(host_info=buff,ER(CR_TCP_CONNECTION),host);
DBUG_PRINT("info",("Server name: '%s'. TCP sock: %d", host,port));
thr_alarm_init(&alarmed);
+ /*
+ We don't have to check status for thr_alarm as it's not fatal if
+ we didn't manage to set an alarm. (In this case the socket call
+ will just block for a while).
+ */
thr_alarm(&alarmed, net_read_timeout, &alarm_buff);
sock = (my_socket) socket(AF_INET,SOCK_STREAM,0);
thr_end_alarm(&alarmed);