summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-10-11 22:02:16 +0300
committerunknown <monty@hundin.mysql.fi>2001-10-11 22:02:16 +0300
commit2a4845b48461a472522b57a9c9e1c11ae76f712f (patch)
tree6e9587de81599ae478e9d6deedc5fd8a0f4fd970 /tools
parentdd94eb03890805bcf0679f42f3cd62d247c2538f (diff)
downloadmariadb-git-2a4845b48461a472522b57a9c9e1c11ae76f712f.tar.gz
Cleanups
client/mysqlmanagerc.c: Only use needed include files libmysql/manager.c: cleanup include files scripts/make_binary_distribution.sh: Fixed wrong filename sql/mysqld.cc: cleanup tools/mysqlmanager.c: Read with retrys
Diffstat (limited to 'tools')
-rw-r--r--tools/mysqlmanager.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c
index f2f89c6bc07..9cb04505e2f 100644
--- a/tools/mysqlmanager.c
+++ b/tools/mysqlmanager.c
@@ -88,6 +88,8 @@
#define MAX_LAUNCHER_MSG 256
#endif
+#define MAX_RETRY_COUNT 100
+
/* Variable naming convention - if starts with manager_, either is set
directly by the user, or used closely in ocnjunction with a variable
set by the user
@@ -1161,10 +1163,15 @@ static char* read_line(struct manager_thd* thd)
{
int len,read_len;
char *block_end,*p_back;
+ uint retry_count=0;
+
read_len = min(NET_BLOCK,(uint)(buf_end-p));
- if ((len=vio_read(thd->vio,p,read_len))<=0)
+ while ((len=vio_read(thd->vio,p,read_len))<=0)
{
- log_err("Error reading command from client");
+ if (vio_should_retry(thd->vio) && retry_count++ < MAX_RETRY_COUNT)
+ continue;
+ log_err("Error reading command from client (Error: %d)",
+ vio_errno(thd->vio));
thd->fatal=1;
return 0;
}