summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am21
-rw-r--r--tools/mysqlmanager.c12
2 files changed, 19 insertions, 14 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index bf81005ca2c..0f726bd5fc3 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -15,14 +15,19 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Process this file with automake to create Makefile.in
-INCLUDES= @MT_INCLUDES@ -I$(top_builddir)/include \
- -I$(top_srcdir)/include $(openssl_includes)
-LDADD= @CLIENT_EXTRA_LDFLAGS@ @openssl_libs@ \
- $(top_builddir)/libmysql_r/libmysqlclient_r.la \
- @ZLIB_LIBS@
-bin_PROGRAMS= mysqlmanager
-mysqlmanager_SOURCES= mysqlmanager.c
-mysqlmanager_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
+if HAVE_YASSL
+ yassl_dummy_link_fix= $(top_srcdir)/extra/yassl/src/dummy.cpp
+else
+ yassl_dummy_link_fix=
+endif
+INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
+ $(openssl_includes)
+LDADD= @CLIENT_EXTRA_LDFLAGS@ \
+ $(top_builddir)/libmysql_r/libmysqlclient_r.la \
+ @openssl_libs@ @ZLIB_LIBS@
+bin_PROGRAMS= mysqltestmanager
+mysqltestmanager_SOURCES= mysqlmanager.c $(yassl_dummy_link_fix)
+mysqltestmanager_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
DEF= -DUNDEF_THREADS_HACK
# Don't update the files from bitkeeper
diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c
index 27caa1e0255..4a5c08be50a 100644
--- a/tools/mysqlmanager.c
+++ b/tools/mysqlmanager.c
@@ -557,14 +557,13 @@ HANDLE_DECL(handle_set_exec_stderr)
static int set_exec_param(struct manager_thd* thd, char* args_start,
char* args_end, PARAM_TYPE param_type)
{
- int num_args;
const char* error=0;
struct manager_exec* e;
char* arg_p;
char* param;
int param_size;
- if ((num_args=tokenize_args(args_start,&args_end))<2)
+ if (tokenize_args(args_start,&args_end) < 2)
{
error="Too few arguments";
goto err;
@@ -607,12 +606,11 @@ err:
HANDLE_DECL(handle_start_exec)
{
- int num_args;
struct manager_exec* e;
int ident_len;
const char* error=0;
struct timespec t;
- if ((num_args=tokenize_args(args_start,&args_end))<1)
+ if (tokenize_args(args_start,&args_end) < 1)
{
error="Too few arguments";
goto err;
@@ -656,12 +654,11 @@ err:
HANDLE_DECL(handle_stop_exec)
{
- int num_args;
struct timespec abstime;
struct manager_exec* e;
int ident_len;
const char* error=0;
- if ((num_args=tokenize_args(args_start,&args_end))<2)
+ if (tokenize_args(args_start,&args_end) <2)
{
error="Too few arguments";
goto err;
@@ -877,7 +874,10 @@ static void manager_exec_connect(struct manager_exec* e)
{
if (mysql_real_connect(&e->mysql,e->con_host,e->con_user,e->con_pass,0,
e->con_port,e->con_sock,0))
+ {
+ e->mysql.reconnect= 1;
return;
+ }
sleep(1);
}
e->error="Could not connect to MySQL server withing the number of tries";