Commit 6afbeb4c authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Cleanups

parent ac250625
......@@ -17,27 +17,15 @@
#define MANAGER_CLIENT_VERSION "1.0"
#include <my_global.h>
#include <my_sys.h>
#include <m_string.h>
#include <mysql.h>
#include <mysql_version.h>
#include <m_ctype.h>
#ifdef OS2
#include <config-os2.h>
#else
#include <my_config.h>
#endif
#include <my_dir.h>
#include <hash.h>
#include <mysqld_error.h>
#include <stdio.h>
#include <stdlib.h>
#include <my_sys.h>
#include <m_string.h>
#include <getopt.h>
#include <stdarg.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <violite.h>
#ifndef MYSQL_MANAGER_PORT
#define MYSQL_MANAGER_PORT 23546
......
......@@ -16,31 +16,30 @@
MA 02111-1307, USA */
#include <my_global.h>
#if defined(__WIN__) || defined(_WIN32) || defined(_WIN64)
#include <winsock.h>
#include <odbcinst.h>
#if defined(THREAD)
#include <my_pthread.h> /* because of signal() */
#endif
#include "mysql.h"
#include "mysql_version.h"
#include "mysqld_error.h"
#include <my_sys.h>
#include <mysys_err.h>
#include <m_string.h>
#include <m_ctype.h>
#include "mysql.h"
#include "mysql_version.h"
#include "mysqld_error.h"
#include "errmsg.h"
#include <my_net.h>
#include <errmsg.h>
#include <violite.h>
#include <sys/stat.h>
#include <signal.h>
#include <time.h>
#include <errno.h>
#ifdef HAVE_PWD_H
#include <pwd.h>
#if defined(OS2)
# include <sys/un.h>
#elif !defined( __WIN__)
#include <sys/resource.h>
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
#endif
#if !defined(MSDOS) && !defined(__WIN__)
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#ifdef HAVE_SELECT_H
# include <select.h>
......@@ -48,18 +47,13 @@
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#endif
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
#endif
#if defined(THREAD) && !defined(__WIN__)
#include <my_pthread.h> /* because of signal() */
#endif
#include <sys/utsname.h>
#endif /* __WIN__ */
#ifndef INADDR_NONE
#define INADDR_NONE -1
#endif
#define RES_BUF_SHIFT 5
#define SOCKET_ERROR -1
#define NET_BUF_SIZE 2048
......
......@@ -70,7 +70,7 @@ for i in extra/comp_err extra/replace extra/perror extra/resolveip \
client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin \
client/.libs/mysqldump client/.libs/mysqlimport client/.libs/mysqltest \
client/.libs/mysqlcheck \
client/.libs/mysqlmanagerc client/libs/mysqlmanager-pwgen \
client/.libs/mysqlmanagerc client/.libs/mysqlmanager-pwgen \
tools/.libs/mysqlmanager
do
if [ -f $i ]
......
......@@ -77,9 +77,7 @@ extern "C" { // Because of SCO 3.2V4.2
#include <sys/select.h>
#endif
#include <sys/utsname.h>
#else
#include <windows.h>
#endif // __WIN__
#endif /* __WIN__ */
#ifdef HAVE_LIBWRAP
#include <tcpd.h>
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment