mysqladmin --count=X --sleep=Y would always delay Y seconds after the last

iteration before exiting. (Bug #42639)
This commit is contained in:
Jim Winstead 2009-05-20 17:25:10 -07:00
parent 1e9a02c943
commit d57bb98ff5

View File

@ -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;