summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorJim Winstead <jimw@mysql.com>2009-05-20 17:25:10 -0700
committerJim Winstead <jimw@mysql.com>2009-05-20 17:25:10 -0700
commitd57bb98ff5c62fff7d9912dd0a96ad99fcab3861 (patch)
tree4770e9916be0145bc72ad7d83fd85864a8f74dab /client
parent1e9a02c943101bfd75d539ee58eeed4caf1a17d9 (diff)
downloadmariadb-git-d57bb98ff5c62fff7d9912dd0a96ad99fcab3861.tar.gz
mysqladmin --count=X --sleep=Y would always delay Y seconds after the last
iteration before exiting. (Bug #42639)
Diffstat (limited to 'client')
-rw-r--r--client/mysqladmin.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index 09821d6a995..a4e7c5ad0c9 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -371,7 +371,7 @@ int main(int argc,char *argv[])
}
else
{
- while (!interrupted && (!opt_count_iterations || nr_iterations))
+ while (!interrupted)
{
new_line = 0;
if ((error=execute_commands(&mysql,argc,commands)))
@@ -395,11 +395,11 @@ int main(int argc,char *argv[])
}
if (interval)
{
+ if (opt_count_iterations && --nr_iterations == 0)
+ break;
sleep(interval);
if (new_line)
puts("");
- if (opt_count_iterations)
- nr_iterations--;
}
else
break;