mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
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. client/mysqladmin.cc: Bug#58221 : mysqladmin --sleep=x --count=x keeps looping Added a condition to check and decrement the count value stored in nr_iterations per iteration. mysql-test/r/mysqladmin.result: Added a testcase for Bug#58221. mysql-test/t/mysqladmin.test: Added a testcase for Bug#58221.
This commit is contained in:
parent
3a6b404849
commit
208b677637
3 changed files with 23 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue