summaryrefslogtreecommitdiff
path: root/sql/net_serv.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-08-08 20:49:06 +0300
committerunknown <monty@hundin.mysql.fi>2002-08-08 20:49:06 +0300
commit33dab613c7ede7c9d3b7d39252ab29c5ff3b4165 (patch)
tree3a864bb27bc717c690f6d83d2aa5afbc850401a4 /sql/net_serv.cc
parent028cfaba9ba0fcbba30511e6951daab6a1829f20 (diff)
downloadmariadb-git-33dab613c7ede7c9d3b7d39252ab29c5ff3b4165.tar.gz
Added nety_retry_count as a changeable variable
Make safe_mysqld a symlink to mysqld_safe in binary distribution Fixed problem with CTRL-C when using mysqld --bootstrap Docs/manual.texi: Added nety_retry_count as a changeable variables include/mysql_com.h: Added nety_retry_count as a changeable variables libmysql/libmysql.c: Added nety_retry_count as a changeable variables mysql-test/r/olap.result: Fixed wrong error message mysql-test/r/variables.result: Update for freebsd mysql-test/t/variables.test: Update for freebsd scripts/make_binary_distribution.sh: Make safe_mysqld a symlink to mysqld_safe in binary distribution. sql/item_func.cc: Cleaned up tmp_table_field() handling. sql/item_func.h: Cleaned up tmp_table_field() handling. sql/item_strfunc.h: Cleaned up tmp_table_field() handling. sql/item_timefunc.h: Cleaned up tmp_table_field() handling. sql/mysql_priv.h: Added nety_retry_count as a changeable variables sql/mysqld.cc: Added nety_retry_count as a changeable variables Allow one to specify a defaults file to be read when installing MySQL as a service. sql/net_pkg.cc: Added nety_retry_count as a changeable variables sql/net_serv.cc: Added nety_retry_count as a changeable variables sql/set_var.cc: Added nety_retry_count as a changeable variables sql/share/czech/errmsg.txt: Fixed wrong error message sql/share/danish/errmsg.txt: Fixed wrong error message sql/share/english/errmsg.txt: Fixed wrong error message sql/share/estonian/errmsg.txt: Fixed wrong error message sql/share/french/errmsg.txt: Fixed wrong error message sql/share/german/errmsg.txt: Fixed wrong error message sql/share/greek/errmsg.txt: Fixed wrong error message sql/share/hungarian/errmsg.txt: Fixed wrong error message sql/share/italian/errmsg.txt: Fixed wrong error message sql/share/japanese/errmsg.txt: Fixed wrong error message sql/share/korean/errmsg.txt: Fixed wrong error message sql/share/norwegian-ny/errmsg.txt: Fixed wrong error message sql/share/norwegian/errmsg.txt: Fixed wrong error message sql/share/polish/errmsg.txt: Fixed wrong error message sql/share/portuguese/errmsg.txt: Fixed wrong error message sql/share/romanian/errmsg.txt: Fixed wrong error message sql/share/russian/errmsg.txt: Fixed wrong error message sql/share/slovak/errmsg.txt: Fixed wrong error message sql/share/spanish/errmsg.txt: Fixed wrong error message sql/share/swedish/errmsg.txt: Fixed wrong error message sql/share/ukrainian/errmsg.txt: Fixed wrong error message sql/sql_class.cc: Indentaion cleanup sql/sql_class.h: Fixed wrong error message sql/sql_parse.cc: Fixed problem with CTRL-C when using mysqld --bootstrap sql/sql_select.cc: Ensure that select terminates if create_myisam_from_heap() fails. sql/sql_yacc.yy: Portability fix
Diffstat (limited to 'sql/net_serv.cc')
-rw-r--r--sql/net_serv.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 0eb3e1d6a75..8c1792a6c8b 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -62,15 +62,12 @@ extern void query_cache_insert(NET *net, const char *packet, ulong length);
#ifndef NO_ALARM
#include "my_pthread.h"
void sql_print_error(const char *format,...);
-#define RETRY_COUNT mysqld_net_retry_count
-extern ulong mysqld_net_retry_count;
extern ulong bytes_sent, bytes_received;
extern pthread_mutex_t LOCK_bytes_sent , LOCK_bytes_received;
#else
#undef statistic_add
#define statistic_add(A,B,C)
#define DONT_USE_THR_ALARM
-#define RETRY_COUNT 1
#endif /* NO_ALARM */
#include "thr_alarm.h"
@@ -85,11 +82,12 @@ static int net_write_buff(NET *net,const char *packet,ulong len);
int my_net_init(NET *net, Vio* vio)
{
+ DBUG_ENTER("my_net_init");
my_net_local_init(net); /* Set some limits */
if (!(net->buff=(uchar*) my_malloc((uint32) net->max_packet+
NET_HEADER_SIZE + COMP_HEADER_SIZE,
MYF(MY_WME))))
- return 1;
+ DBUG_RETURN(1);
net->buff_end=net->buff+net->max_packet;
net->vio = vio;
net->no_send_ok = 0;
@@ -114,14 +112,16 @@ int my_net_init(NET *net, Vio* vio)
#endif
vio_fastsend(vio);
}
- return 0;
+ DBUG_RETURN(0);
}
void net_end(NET *net)
{
+ DBUG_ENTER("net_end");
my_free((gptr) net->buff,MYF(MY_ALLOW_ZERO_PTR));
net->buff=0;
+ DBUG_VOID_RETURN;
}
@@ -385,7 +385,7 @@ net_real_write(NET *net,const char *packet,ulong len)
my_bool old_mode;
while (vio_blocking(net->vio, TRUE, &old_mode) < 0)
{
- if (vio_should_retry(net->vio) && retry_count++ < RETRY_COUNT)
+ if (vio_should_retry(net->vio) && retry_count++ < net->retry_count)
continue;
#ifdef EXTRA_DEBUG
fprintf(stderr,
@@ -404,7 +404,7 @@ net_real_write(NET *net,const char *packet,ulong len)
if (thr_alarm_in_use(&alarmed) && !thr_got_alarm(&alarmed) &&
interrupted)
{
- if (retry_count++ < RETRY_COUNT)
+ if (retry_count++ < net->retry_count)
continue;
#ifdef EXTRA_DEBUG
fprintf(stderr, "%s: write looped, aborting thread\n",
@@ -476,7 +476,7 @@ static void my_net_skip_rest(NET *net, uint32 remain, thr_alarm_t *alarmed)
my_bool interrupted = vio_should_retry(net->vio);
if (!thr_got_alarm(&alarmed) && interrupted)
{ /* Probably in MIT threads */
- if (retry_count++ < RETRY_COUNT)
+ if (retry_count++ < net->retry_count)
continue;
}
return;
@@ -543,7 +543,7 @@ my_real_read(NET *net, ulong *complen)
while (vio_blocking(net->vio, TRUE, &old_mode) < 0)
{
if (vio_should_retry(net->vio) &&
- retry_count++ < RETRY_COUNT)
+ retry_count++ < net->retry_count)
continue;
DBUG_PRINT("error",
("fcntl returned error %d, aborting thread",
@@ -568,7 +568,7 @@ my_real_read(NET *net, ulong *complen)
if (thr_alarm_in_use(&alarmed) && !thr_got_alarm(&alarmed) &&
interrupted)
{ /* Probably in MIT threads */
- if (retry_count++ < RETRY_COUNT)
+ if (retry_count++ < net->retry_count)
continue;
#ifdef EXTRA_DEBUG
fprintf(stderr, "%s: read looped with error %d, aborting thread\n",