diff options
author | monty@narttu.mysql.fi <> | 2003-06-05 11:55:03 +0300 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2003-06-05 11:55:03 +0300 |
commit | cd3b680db00f52d7a502bf62513789f54b2dbcd0 (patch) | |
tree | 3c2332de57f252bf22a3521630dfb71230b5a62d /sql/net_serv.cc | |
parent | 23daa1b2c902f7a24d7d5c8d4cb7c15edaeb2954 (diff) | |
download | mariadb-git-cd3b680db00f52d7a502bf62513789f54b2dbcd0.tar.gz |
Fixed problem with alarms when reading too big packet
Diffstat (limited to 'sql/net_serv.cc')
-rw-r--r-- | sql/net_serv.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/net_serv.cc b/sql/net_serv.cc index c8c774d365f..0b332f84bac 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -431,13 +431,13 @@ net_real_write(NET *net,const char *packet,ulong len) big packet */ -static void my_net_skip_rest(NET *net, ulong remain, thr_alarm_t *alarmed) +static void my_net_skip_rest(NET *net, ulong remain, thr_alarm_t *alarmed, + ALARM *alarm_buff) { - ALARM alarm_buff; uint retry_count=0; - if (!thr_alarm_in_use(&alarmed)) + if (!thr_alarm_in_use(alarmed)) { - if (!thr_alarm(alarmed,net->timeout,&alarm_buff) || + if (!thr_alarm(alarmed,net->timeout,alarm_buff) || (!vio_is_blocking(net->vio) && vio_blocking(net->vio,TRUE) < 0)) return; /* Can't setup, abort */ } @@ -606,7 +606,7 @@ my_real_read(NET *net, ulong *complen) { #ifdef MYSQL_SERVER if (i == 1) - my_net_skip_rest(net, len, &alarmed); + my_net_skip_rest(net, len, &alarmed, &alarm_buff); #endif len= packet_error; /* Return error */ goto end; |