summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2006-03-02 10:48:54 +0100
committerunknown <serg@serg.mylan>2006-03-02 10:48:54 +0100
commitda383890ae0a3e4e8b4f8a5d55205743d929b3b2 (patch)
treea754a7072807d41aa899797bb478cf4fabead62b
parent5d40b535c592fefc2aceaf89b7a42e8224fa1ed9 (diff)
downloadmariadb-git-da383890ae0a3e4e8b4f8a5d55205743d929b3b2.tar.gz
crazy - for the last week mysqlslap.test was generating 400 sigsegvs
per run, failing ALL mysql_real_connect() calls - nobody noticed, the test always appeared to "pass".
-rw-r--r--client/mysqlslap.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index c7f6e7425ce..23eba64c332 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -1086,6 +1086,9 @@ WAIT:
int status, pid;
pid= wait(&status);
DBUG_PRINT("info", ("Parent: child %d status %d", pid, status));
+ if (status != 0)
+ printf("%s: Child %d died with the status %d\n",
+ my_progname, pid, status);
}
}
#endif
@@ -1122,11 +1125,11 @@ run_task(thread_context *con)
DBUG_PRINT("info", ("trying to connect to host %s as user %s", host, user));
lock_file= my_open(lock_file_str, O_RDWR, MYF(0));
my_lock(lock_file, F_RDLCK, 0, F_TO_EOF, MYF(0));
- if (!opt_only_print)
+ if (!opt_only_print)
{
- if (!(mysql= mysql_real_connect(NULL, host, user, opt_password,
- create_schema_string,
- opt_mysql_port,
+ if (!(mysql= mysql_real_connect(mysql, host, user, opt_password,
+ create_schema_string,
+ opt_mysql_port,
opt_mysql_unix_port,
0)))
{
@@ -1136,12 +1139,12 @@ run_task(thread_context *con)
}
DBUG_PRINT("info", ("connected."));
- queries= 0;
+ queries= 0;
limit_not_met:
for (ptr= con->stmt; ptr && ptr->length; ptr= ptr->next)
{
- if (opt_only_print)
+ if (opt_only_print)
{
printf("%.*s;\n", (uint)ptr->length, ptr->string);
}