summaryrefslogtreecommitdiff
path: root/client/mysqlslap.c
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2009-11-30 22:37:27 +0100
committerunknown <knielsen@knielsen-hq.org>2009-11-30 22:37:27 +0100
commitdb260b19e3edb9e153abf784711a3ae13e40db4a (patch)
tree4a9d9e50072d36ee917a570f8bf83a0117e971db /client/mysqlslap.c
parent0df8279c468235f4feaf9eb25aa2beb5032ee1dc (diff)
parent4a458290441937661136c73afa61393a6634f7b0 (diff)
downloadmariadb-git-db260b19e3edb9e153abf784711a3ae13e40db4a.tar.gz
Merge MySQL 5.1.41 into MariaDB trunk, including a number of after-merge fixes.
Also merge charset patch.
Diffstat (limited to 'client/mysqlslap.c')
-rw-r--r--client/mysqlslap.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index 5a0bbfe533f..f0f377971ac 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 MySQL AB
+/* Copyright (C) 2005 MySQL AB, 2009 Sun Microsystems, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -423,6 +423,7 @@ void concurrency_loop(MYSQL *mysql, uint current, option_string *eptr)
stats *sptr;
conclusions conclusion;
unsigned long long client_limit;
+ int sysret;
head_sptr= (stats *)my_malloc(sizeof(stats) * iterations,
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
@@ -472,7 +473,10 @@ void concurrency_loop(MYSQL *mysql, uint current, option_string *eptr)
run_query(mysql, "SET AUTOCOMMIT=0", strlen("SET AUTOCOMMIT=0"));
if (pre_system)
- if (system(pre_system)) { /* Ignore for now */ }
+ if ((sysret= system(pre_system)) != 0)
+ fprintf(stderr,
+ "Warning: Execution of pre_system option returned %d.\n",
+ sysret);
/*
Pre statements are always run after all other logic so they can
@@ -487,8 +491,10 @@ void concurrency_loop(MYSQL *mysql, uint current, option_string *eptr)
run_statements(mysql, post_statements);
if (post_system)
- if (system(post_system)) { /* Ignore for now */ }
-
+ if ((sysret= system(post_system)) != 0)
+ fprintf(stderr,
+ "Warning: Execution of post_system option returned %d.\n",
+ sysret);
/* We are finished with this run */
if (auto_generate_sql_autoincrement || auto_generate_sql_guid_primary)
drop_primary_key_list();
@@ -1942,7 +1948,7 @@ end:
if (!opt_only_print)
mysql_close(mysql);
- my_thread_end();
+ mysql_thread_end();
pthread_mutex_lock(&counter_mutex);
thread_counter--;