diff options
author | Nirbhay Choubey <nirbhay.choubey@sun.com> | 2011-01-16 02:04:08 +0530 |
---|---|---|
committer | Nirbhay Choubey <nirbhay.choubey@sun.com> | 2011-01-16 02:04:08 +0530 |
commit | 44d23cdbc0ecd9efa570cfa58abd0543782995ef (patch) | |
tree | 3b660426873d0d26542df838b0e9b4ad8536b279 /client/mysqladmin.cc | |
parent | 382778358210db2706a551b1e312d5a3edcf8b32 (diff) | |
download | mariadb-git-44d23cdbc0ecd9efa570cfa58abd0543782995ef.tar.gz |
Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
When mysqldadmin is run with sleep and count options,
it goes into an infinite loop and keeps executing the
specified command.
This happened because the statement, responsible for
decrementing the count value, was missing.
Fixed by adding a statement which will decrement the
count value for each iteration.
Diffstat (limited to 'client/mysqladmin.cc')
-rw-r--r-- | client/mysqladmin.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index fe3e51a4d61..18ee8fae400 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -416,6 +416,9 @@ int main(int argc,char *argv[]) if (interval) /* --sleep=interval given */ { + if (opt_count_iterations && --nr_iterations == 0) + break; + /* If connection was dropped (unintentionally, or due to SHUTDOWN), re-establish it if --wait ("retry-connect") was given and user |